diff options
Diffstat (limited to 'engine/gfx')
-rw-r--r-- | engine/gfx/cgb_layouts.asm | 53 | ||||
-rw-r--r-- | engine/gfx/color.asm | 22 | ||||
-rw-r--r-- | engine/gfx/load_font.asm | 15 | ||||
-rw-r--r-- | engine/gfx/load_pics.asm | 4 | ||||
-rw-r--r-- | engine/gfx/mon_icons.asm | 4 | ||||
-rw-r--r-- | engine/gfx/sprite_anims.asm | 10 | ||||
-rw-r--r-- | engine/gfx/sprites.asm | 8 |
7 files changed, 56 insertions, 60 deletions
diff --git a/engine/gfx/cgb_layouts.asm b/engine/gfx/cgb_layouts.asm index a41456fd6..70cb5325a 100644 --- a/engine/gfx/cgb_layouts.asm +++ b/engine/gfx/cgb_layouts.asm @@ -261,7 +261,7 @@ _CGB_Pokedex: ld a, [wCurPartySpecies] cp $ff jr nz, .is_pokemon - ld hl, .PokedexQuestionMarkPalette + ld hl, PokedexQuestionMarkPalette call LoadHLPaletteIntoDE ; green question mark palette jr .got_palette @@ -275,7 +275,7 @@ _CGB_Pokedex: ld a, $1 ; green question mark palette call FillBoxCGB call InitPartyMenuOBPals - ld hl, .PokedexCursorPalette + ld hl, PokedexCursorPalette ld de, wOBPals1 palette 7 ; green cursor palette ld bc, 1 palettes ld a, BANK(wOBPals1) @@ -286,10 +286,10 @@ _CGB_Pokedex: ldh [hCGBPalUpdate], a ret -.PokedexQuestionMarkPalette: +PokedexQuestionMarkPalette: INCLUDE "gfx/pokedex/question_mark.pal" -.PokedexCursorPalette: +PokedexCursorPalette: INCLUDE "gfx/pokedex/cursor.pal" _CGB_BillsPC: @@ -300,15 +300,15 @@ _CGB_BillsPC: ld a, [wCurPartySpecies] cp $ff jr nz, .GetMonPalette - ld hl, .BillsPCOrangePalette + ld hl, BillsPCOrangePalette call LoadHLPaletteIntoDE - jr .Resume + jr .GotPalette .GetMonPalette: ld bc, wTempMonDVs call GetPlayerOrMonPalettePointer call LoadPalette_White_Col1_Col2_Black -.Resume: +.GotPalette: call WipeAttrmap hlcoord 1, 4, wAttrmap lb bc, 7, 7 @@ -321,16 +321,16 @@ _CGB_BillsPC: ldh [hCGBPalUpdate], a ret -.Function9009: - ld hl, .BillsPCOrangePalette +Function9009: + ld hl, BillsPCOrangePalette call LoadHLPaletteIntoDE - jr .asm_901a + jr .GotPalette -.unused +.GetMonPalette: ld bc, wTempMonDVs call GetPlayerOrMonPalettePointer call LoadPalette_White_Col1_Col2_Black -.asm_901a +.GotPalette: call WipeAttrmap hlcoord 1, 1, wAttrmap lb bc, 7, 7 @@ -343,7 +343,7 @@ _CGB_BillsPC: ldh [hCGBPalUpdate], a ret -.BillsPCOrangePalette: +BillsPCOrangePalette: INCLUDE "gfx/pc/orange.pal" _CGB_PokedexUnownMode: @@ -886,10 +886,10 @@ _CGB_GamefreakLogo: ld a, PREDEFPAL_GAMEFREAK_LOGO_BG call GetPredefPal call LoadHLPaletteIntoDE - ld hl, .Palette + ld hl, .GamefreakLogoOBPalette ld de, wOBPals1 call LoadHLPaletteIntoDE - ld hl, .Palette + ld hl, .GamefreakLogoOBPalette ld de, wOBPals1 palette 1 call LoadHLPaletteIntoDE call WipeAttrmap @@ -897,7 +897,7 @@ _CGB_GamefreakLogo: call ApplyPals ret -.Palette: +.GamefreakLogoOBPalette: INCLUDE "gfx/splash/logo.pal" _CGB_PlayerOrMonFrontpicPals: @@ -947,7 +947,7 @@ _CGB_TrainerOrMonFrontpicPals: ret _CGB_MysteryGift: - ld hl, .Palettes + ld hl, .MysteryGiftPalettes ld de, wBGPals1 ld bc, 2 palettes ld a, BANK(wBGPals1) @@ -977,5 +977,22 @@ _CGB_MysteryGift: call ApplyAttrmap ret -.Palettes: +.MysteryGiftPalettes: INCLUDE "gfx/mystery_gift/mystery_gift.pal" + +Unreferenced_GS_CGB_MysteryGift: + ld hl, .MysteryGiftPalette + ld de, wBGPals1 + ld bc, 1 palettes + ld a, BANK(wBGPals1) + call FarCopyWRAM + call ApplyPals + call WipeAttrmap + call ApplyAttrmap + ret + +.MysteryGiftPalette: + RGB 31, 31, 31 + RGB 09, 31, 31 + RGB 10, 12, 31 + RGB 00, 03, 19 diff --git a/engine/gfx/color.asm b/engine/gfx/color.asm index 0051d4162..cef6381ec 100644 --- a/engine/gfx/color.asm +++ b/engine/gfx/color.asm @@ -446,23 +446,6 @@ INCLUDE "gfx/mail/mail.pal" INCLUDE "engine/gfx/cgb_layouts.asm" -Unreferenced_Function95f0: - ld hl, .Palette - ld de, wBGPals1 - ld bc, 1 palettes - ld a, BANK(wBGPals1) - call FarCopyWRAM - call ApplyPals - call WipeAttrmap - call ApplyAttrmap - ret - -.Palette: - RGB 31, 31, 31 - RGB 09, 31, 31 - RGB 10, 12, 31 - RGB 00, 03, 19 - CopyFourPalettes: ld de, wBGPals1 ld c, 4 @@ -992,7 +975,7 @@ PushSGBBorder: ret .LoadSGBBorderPointers: - ld hl, SGBBorder + ld hl, SGBBorderGFX ld de, SGBBorderMap ret @@ -1198,7 +1181,7 @@ SGBBorderPalettes: ; assumed to come after SGBBorderMap INCLUDE "gfx/sgb/sgb_border.pal" -SGBBorder: +SGBBorderGFX: INCBIN "gfx/sgb/sgb_border.2bpp" HPBarPals: @@ -1237,7 +1220,6 @@ LoadMapPals: add hl, de ld e, l ld d, h - ; Switch to palettes WRAM bank ldh a, [rSVBK] push af ld a, BANK(wBGPals1) diff --git a/engine/gfx/load_font.asm b/engine/gfx/load_font.asm index bd5e29d52..a83083581 100644 --- a/engine/gfx/load_font.asm +++ b/engine/gfx/load_font.asm @@ -1,22 +1,19 @@ INCLUDE "gfx/font.asm" -; This and the following two functions are unreferenced. -; Debug, perhaps? -Unreferenced_fb434: - db 0 +Unused_EnableHDMA: + db FALSE -Unreferenced_Functionfb435: - ld a, [Unreferenced_fb434] +Unreferenced_Get1bppOptionalHDMA: + ld a, [Unused_EnableHDMA] and a jp nz, Get1bppViaHDMA jp Get1bpp -Unreferenced_Functionfb43f: - ld a, [Unreferenced_fb434] +Unreferenced_Get2bppOptionalHDMA: + ld a, [Unused_EnableHDMA] and a jp nz, Get2bppViaHDMA jp Get2bpp -; End unreferenced block _LoadStandardFont:: ld de, Font diff --git a/engine/gfx/load_pics.asm b/engine/gfx/load_pics.asm index a784d20e9..bf656b48d 100644 --- a/engine/gfx/load_pics.asm +++ b/engine/gfx/load_pics.asm @@ -344,12 +344,12 @@ GetTrainerPic: pop af ldh [rSVBK], a call WaitBGMap - ld a, $1 + ld a, 1 ldh [hBGMapMode], a ret DecompressGet2bpp: -; Decompress lz data from b:hl to scratch space at 6:d000, then copy it to address de. +; Decompress lz data from b:hl to wDecompressScratch, then copy it to address de. ldh a, [rSVBK] push af diff --git a/engine/gfx/mon_icons.asm b/engine/gfx/mon_icons.asm index 68e9b1b84..6c7f14e3a 100644 --- a/engine/gfx/mon_icons.asm +++ b/engine/gfx/mon_icons.asm @@ -41,9 +41,9 @@ LoadMenuMonIcon: dw Trade_LoadMonIconGFX ; MONICON_TRADE dw Mobile_InitAnimatedMonIcon ; MONICON_MOBILE1 dw Mobile_InitPartyMenuBGPal71 ; MONICON_MOBILE2 - dw .GetPartyMenuMonIcon ; MONICON_UNUSED + dw Unused_GetPartyMenuMonIcon ; MONICON_UNUSED -.GetPartyMenuMonIcon: +Unused_GetPartyMenuMonIcon: call InitPartyMenuIcon call .GetPartyMonItemGFX call SetPartyMonIconAnimSpeed diff --git a/engine/gfx/sprite_anims.asm b/engine/gfx/sprite_anims.asm index 54752029c..bb6aecf26 100644 --- a/engine/gfx/sprite_anims.asm +++ b/engine/gfx/sprite_anims.asm @@ -66,7 +66,7 @@ DoAnimFrame: ld hl, SPRITEANIMSTRUCT_YOFFSET add hl, bc - ld [hl], $0 + ld [hl], 0 ret .PartyMonSwitch @@ -269,8 +269,8 @@ DoAnimFrame: ret .asm_8d3ba - ld a, $1 - ld [wcf64], a + ld a, 1 + ld [wIntroSceneFrameCounter], a call DeinitializeSprite ret @@ -844,7 +844,7 @@ DoAnimFrame: ret .AnonymousJumptable: - ld hl, sp+$0 + ld hl, sp+0 ld e, [hl] inc hl ld d, [hl] @@ -853,7 +853,7 @@ DoAnimFrame: ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX add hl, bc ld l, [hl] - ld h, $0 + ld h, 0 add hl, hl add hl, de ld a, [hli] diff --git a/engine/gfx/sprites.asm b/engine/gfx/sprites.asm index 81a8da5e7..e070cb9f0 100644 --- a/engine/gfx/sprites.asm +++ b/engine/gfx/sprites.asm @@ -2,7 +2,7 @@ ClearSpriteAnims: ld hl, wSpriteAnimDict ld bc, wSpriteAnimsEnd - wSpriteAnimDict .loop - ld [hl], $0 + ld [hl], 0 inc hl dec bc ld a, c @@ -209,7 +209,7 @@ DeinitializeSprite: ; Clear the index field of the struct in bc. ld hl, SPRITEANIMSTRUCT_INDEX add hl, bc - ld [hl], $0 + ld [hl], 0 ret DeinitializeAllSprites: @@ -319,7 +319,7 @@ AddOrSubtractY: bit OAM_Y_FLIP, [hl] jr z, .ok ; -8 - a - add $8 + add 8 xor $ff inc a @@ -334,7 +334,7 @@ AddOrSubtractX: bit OAM_X_FLIP, [hl] jr z, .ok ; -8 - a - add $8 + add 8 xor $ff inc a |