summaryrefslogtreecommitdiff
path: root/engine/gfx
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-10-28 13:35:39 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-10-28 14:34:38 -0400
commitea426a88794b1d216a278b54d18cefafbf7d8771 (patch)
tree732c7a81c528251b651b6441d0f4a974548beb2c /engine/gfx
parent6d333bed5fde0c2da0a6a9df2ccae83933400e42 (diff)
Identify more WRAM labels, and start a <X>_DummyFunction label convention
Diffstat (limited to 'engine/gfx')
-rw-r--r--engine/gfx/cgb_layouts.asm10
-rw-r--r--engine/gfx/color.asm20
-rw-r--r--engine/gfx/crystal_layouts.asm17
-rw-r--r--engine/gfx/sgb_layouts.asm10
-rw-r--r--engine/gfx/sprite_anims.asm6
5 files changed, 33 insertions, 30 deletions
diff --git a/engine/gfx/cgb_layouts.asm b/engine/gfx/cgb_layouts.asm
index ab4805dcf..9988b1935 100644
--- a/engine/gfx/cgb_layouts.asm
+++ b/engine/gfx/cgb_layouts.asm
@@ -43,7 +43,7 @@ LoadSGBLayoutCGB:
dw _CGB_PartyMenu
dw _CGB_Evolution
dw _CGB_GSTitleScreen
- dw _CGB0d
+ dw _CGB_Unused0D
dw _CGB_MoveList
dw _CGB_BetaPikachuMinigame
dw _CGB_PokedexSearchOption
@@ -60,7 +60,7 @@ LoadSGBLayoutCGB:
dw _CGB_TradeTube
dw _CGB_TrainerOrMonFrontpicPals
dw _CGB_MysteryGift
- dw _CGB1e
+ dw _CGB_Unused1E
_CGB_BattleGrayscale:
ld hl, PalPacket_BattleGrayscale + 1
@@ -321,7 +321,7 @@ _CGB_BillsPC:
ldh [hCGBPalUpdate], a
ret
-Function9009: ; unreferenced
+_CGB_Unknown: ; unreferenced
ld hl, BillsPCOrangePalette
call LoadHLPaletteIntoDE
jr .GotPalette
@@ -595,7 +595,7 @@ _CGB_GSTitleScreen:
ldh [hCGBPalUpdate], a
ret
-_CGB0d:
+_CGB_Unused0D:
ld hl, PalPacket_Diploma + 1
call CopyFourPalettes
call WipeAttrmap
@@ -911,7 +911,7 @@ _CGB_PlayerOrMonFrontpicPals:
call ApplyPals
ret
-_CGB1e:
+_CGB_Unused1E:
ld de, wBGPals1
ld a, [wCurPartySpecies]
call GetMonPalettePointer
diff --git a/engine/gfx/color.asm b/engine/gfx/color.asm
index d84bfdf3b..9f42d24f6 100644
--- a/engine/gfx/color.asm
+++ b/engine/gfx/color.asm
@@ -136,6 +136,7 @@ SGB_ApplyPartyMenuHPPals:
Intro_LoadMagikarpPalettes: ; unreferenced
call CheckCGB
ret z
+
; CGB only
ld hl, .BGPal
ld de, wBGPals1
@@ -789,13 +790,13 @@ endr
ret
PushSGBPals:
- ld a, [wcfbe]
+ ld a, [wJoypadDisable]
push af
- set 7, a
- ld [wcfbe], a
+ set JOYPAD_DISABLE_SGB_TRANSFER_F, a
+ ld [wJoypadDisable], a
call _PushSGBPals
pop af
- ld [wcfbe], a
+ ld [wJoypadDisable], a
ret
_PushSGBPals:
@@ -841,12 +842,14 @@ _PushSGBPals:
InitSGBBorder:
call CheckCGB
ret nz
+
; SGB/DMG only
di
- ld a, [wcfbe]
+ ld a, [wJoypadDisable]
push af
- set 7, a
- ld [wcfbe], a
+ set JOYPAD_DISABLE_SGB_TRANSFER_F, a
+ ld [wJoypadDisable], a
+
xor a
ldh [rJOYP], a
ldh [hSGB], a
@@ -866,13 +869,14 @@ InitSGBBorder:
.skip
pop af
- ld [wcfbe], a
+ ld [wJoypadDisable], a
ei
ret
InitCGBPals::
call CheckCGB
ret z
+
; CGB only
ld a, BANK(vTiles3)
ldh [rVBK], a
diff --git a/engine/gfx/crystal_layouts.asm b/engine/gfx/crystal_layouts.asm
index 9c47797d1..7c15d35c1 100644
--- a/engine/gfx/crystal_layouts.asm
+++ b/engine/gfx/crystal_layouts.asm
@@ -132,7 +132,7 @@ Function49420::
MG_Mobile_Layout01:
call MG_Mobile_Layout_LoadPals
ld de, wBGPals1 palette PAL_BG_TEXT
- ld hl, .Palette_49478
+ ld hl, .TextPalette
ld bc, 1 palettes
ld a, BANK(wBGPals1)
call FarCopyWRAM
@@ -149,19 +149,18 @@ MG_Mobile_Layout01:
bit 6, a
jr z, .asm_49464
call Function49480
- jr .asm_49467
+ jr .done
.asm_49464
call Function49496
-
-.asm_49467
+.done
farcall ApplyAttrmap
farcall ApplyPals
ld a, TRUE
ldh [hCGBPalUpdate], a
ret
-.Palette_49478:
+.TextPalette:
RGB 31, 31, 31
RGB 26, 31, 00
RGB 20, 16, 03
@@ -194,7 +193,7 @@ Function49496:
INCLUDE "engine/tilesets/tileset_palettes.asm"
MG_Mobile_Layout02:
- ld hl, .Palette_49732
+ ld hl, .BGPalette
ld de, wBGPals1
ld bc, 1 palettes
ld a, BANK(wBGPals1)
@@ -202,20 +201,20 @@ MG_Mobile_Layout02:
farcall ApplyPals
call MG_Mobile_Layout_WipeAttrmap
farcall ApplyAttrmap
- ld hl, .Palette_4973a
+ ld hl, .OBPalette
ld de, wOBPals1
ld bc, 1 palettes
ld a, BANK(wOBPals1)
call FarCopyWRAM
ret
-.Palette_49732:
+.BGPalette:
RGB 31, 31, 31
RGB 23, 16, 07
RGB 23, 07, 07
RGB 03, 07, 20
-.Palette_4973a:
+.OBPalette:
RGB 00, 00, 00
RGB 07, 05, 31
RGB 14, 18, 31
diff --git a/engine/gfx/sgb_layouts.asm b/engine/gfx/sgb_layouts.asm
index bfdaeb098..1e5055f26 100644
--- a/engine/gfx/sgb_layouts.asm
+++ b/engine/gfx/sgb_layouts.asm
@@ -35,7 +35,7 @@ LoadSGBLayout:
dw .SGB_PartyMenu
dw .SGB_Evolution
dw .SGB_GSTitleScreen
- dw .SGB0d
+ dw .SGB_Unused0D
dw .SGB_MoveList
dw .SGB_BetaPikachuMinigame
dw .SGB_PokedexSearchOption
@@ -52,7 +52,7 @@ LoadSGBLayout:
dw .SGB_TradeTube
dw .SGB_TrainerOrMonFrontpicPals
dw .SGB_MysteryGift
- dw .SGB1e
+ dw .SGB_Unused1E
.SGB_BattleGrayscale:
ld hl, PalPacket_BattleGrayscale
@@ -397,7 +397,7 @@ endr
ld de, BlkPacket_AllPal0
ret
-.SGB0d:
+.SGB_Unused0D:
.SGB_TrainerCard:
ld hl, PalPacket_Diploma
ld de, BlkPacket_AllPal0
@@ -437,7 +437,7 @@ endr
ld de, wSGBPals + PALPACKET_LENGTH
ret
-.SGB1e:
+.SGB_Unused1E:
ld hl, PalPacket_Pal01
ld de, wSGBPals
ld bc, PALPACKET_LENGTH
@@ -450,7 +450,7 @@ endr
add hl, hl
ld de, PokemonPalettes
add hl, de
- ld a, [wcf65]
+ ld a, [wUnusedSGB1eColorOffset]
and 3
sla a
sla a
diff --git a/engine/gfx/sprite_anims.asm b/engine/gfx/sprite_anims.asm
index 53fe6b882..0c2c42bcb 100644
--- a/engine/gfx/sprite_anims.asm
+++ b/engine/gfx/sprite_anims.asm
@@ -357,7 +357,7 @@ AnimSeq_SlotsGolem:
AnimSeq_SlotsChansey:
callfar Slots_AnimateChansey
- ld hl, wcf64
+ ld hl, wSlotsDelay
ld a, [hl]
cp $2
ret nz
@@ -382,7 +382,7 @@ AnimSeq_SlotsChanseyEgg:
jr c, .move_right
call DeinitializeSprite
ld a, $4
- ld [wcf64], a
+ ld [wSlotsDelay], a
ld de, SFX_PLACE_PUZZLE_PIECE_DOWN
call PlaySFX
ret
@@ -819,7 +819,7 @@ AnimSeq_IntroUnown:
ret
AnimSeq_IntroUnownF:
- ld a, [wcf64]
+ ld a, [wSlotsDelay]
cp $40
ret nz
ld a, SPRITE_ANIM_FRAMESET_INTRO_UNOWN_F_2