Identify more sprite graphics and map object labels, and have consistent anonymous jumptable labels

This commit is contained in:
Rangi 2020-10-22 10:54:53 -04:00
parent ae4fe08084
commit b9a74ff777
6 changed files with 419 additions and 407 deletions

View File

@ -163,7 +163,7 @@ BattleBGEffects_AnonJumptable:
ld l, a
jp hl
BattleBGEffects_IncrementJumptable:
BattleBGEffects_IncAnonJumptableIndex:
ld hl, BG_EFFECT_STRUCT_JT_INDEX
add hl, bc
inc [hl]
@ -342,13 +342,13 @@ BattleBGEffect_HideMon:
call BattleBGEffects_AnonJumptable
.anon_dw
dw .zero
dw BattleBGEffects_IncrementJumptable
dw BattleBGEffects_IncrementJumptable
dw BattleBGEffects_IncrementJumptable
dw BattleBGEffects_IncAnonJumptableIndex
dw BattleBGEffects_IncAnonJumptableIndex
dw BattleBGEffects_IncAnonJumptableIndex
dw .four
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
push bc
call BGEffect_CheckBattleTurn
jr nz, .player_side
@ -408,9 +408,9 @@ BattleBGEffect_BattlerObj_1Row:
.anon_dw
dw .zero
dw .one
dw BattleBGEffects_IncrementJumptable
dw BattleBGEffects_IncrementJumptable
dw BattleBGEffects_IncrementJumptable
dw BattleBGEffects_IncAnonJumptableIndex
dw BattleBGEffects_IncAnonJumptableIndex
dw BattleBGEffects_IncAnonJumptableIndex
dw .five
.zero
@ -422,7 +422,7 @@ BattleBGEffect_BattlerObj_1Row:
ret
.not_flying_digging
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
push bc
call BGEffect_CheckBattleTurn
jr nz, .player_side
@ -446,7 +446,7 @@ BattleBGEffect_BattlerObj_1Row:
ret
.one
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
push bc
call BGEffect_CheckBattleTurn
jr nz, .player_side_2
@ -475,9 +475,9 @@ BattleBGEffect_BattlerObj_2Row:
.anon_dw
dw .zero
dw .one
dw BattleBGEffects_IncrementJumptable
dw BattleBGEffects_IncrementJumptable
dw BattleBGEffects_IncrementJumptable
dw BattleBGEffects_IncAnonJumptableIndex
dw BattleBGEffects_IncAnonJumptableIndex
dw BattleBGEffects_IncAnonJumptableIndex
dw .five
.zero
@ -489,7 +489,7 @@ BattleBGEffect_BattlerObj_2Row:
ret
.not_flying_digging
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
push bc
call BGEffect_CheckBattleTurn
jr nz, .player_side
@ -513,7 +513,7 @@ BattleBGEffect_BattlerObj_2Row:
ret
.one
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
push bc
call BGEffect_CheckBattleTurn
jr nz, .player_side_2
@ -547,12 +547,12 @@ BattleBGEffect_RemoveMon:
.anon_dw
dw .zero
dw .one
dw BattleBGEffects_IncrementJumptable
dw BattleBGEffects_IncrementJumptable
dw BattleBGEffects_IncAnonJumptableIndex
dw BattleBGEffects_IncAnonJumptableIndex
dw .four
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
call BGEffect_CheckBattleTurn
ld [hl], a
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
@ -619,7 +619,7 @@ BattleBGEffect_RemoveMon:
ldh [hBGMapThird], a
ld a, $1
ldh [hBGMapMode], a
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
ld hl, BG_EFFECT_STRUCT_03
add hl, bc
dec [hl]
@ -708,8 +708,8 @@ BattleBGEffect_RunPicResizeScript:
call BattleBGEffects_AnonJumptable
.anon_dw
dw .zero
dw BattleBGEffects_IncrementJumptable
dw BattleBGEffects_IncrementJumptable
dw BattleBGEffects_IncAnonJumptableIndex
dw BattleBGEffects_IncAnonJumptableIndex
dw .restart
dw .end
@ -735,7 +735,7 @@ BattleBGEffect_RunPicResizeScript:
jr z, .skip
call .PlaceGraphic
.skip
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
ld a, $1
ldh [hBGMapMode], a
ret
@ -911,7 +911,7 @@ BattleBGEffect_Surf:
dw .two
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
lb de, 2, 2
call InitSurfWaves
@ -977,7 +977,7 @@ BattleBGEffect_Whirlpool:
dw .two
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
call BattleBGEffects_ClearLYOverrides
ld a, LOW(rSCY)
ldh [hLCDCPointer], a
@ -1052,7 +1052,7 @@ BattleBGEffect_Psychic:
dw .two
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
call BattleBGEffects_ClearLYOverrides
ld a, LOW(rSCX)
ldh [hLCDCPointer], a
@ -1089,7 +1089,7 @@ BattleBGEffect_Teleport:
dw .two
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
call BattleBGEffects_ClearLYOverrides
ld a, LOW(rSCX)
call BattleBGEffect_SetLCDStatCustoms1
@ -1113,7 +1113,7 @@ BattleBGEffect_NightShade:
dw .two
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
call BattleBGEffects_ClearLYOverrides
ld a, LOW(rSCY)
call BattleBGEffect_SetLCDStatCustoms1
@ -1143,7 +1143,7 @@ BattleBGEffect_DoubleTeam:
dw .five
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
call BattleBGEffects_ClearLYOverrides
ld a, LOW(rSCX)
call BattleBGEffect_SetLCDStatCustoms1
@ -1176,7 +1176,7 @@ BattleBGEffect_DoubleTeam:
ret
.next
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
ret
.two
@ -1234,7 +1234,7 @@ BattleBGEffect_AcidArmor:
dw .two
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
call BattleBGEffects_ClearLYOverrides
ld a, LOW(rSCY)
call BattleBGEffect_SetLCDStatCustoms1
@ -1296,7 +1296,7 @@ BattleBGEffect_Withdraw:
dw .two
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
call BattleBGEffects_ClearLYOverrides
ld a, LOW(rSCY)
call BattleBGEffect_SetLCDStatCustoms1
@ -1345,7 +1345,7 @@ BattleBGEffect_Dig:
dw .three
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
call BattleBGEffects_ClearLYOverrides
ld a, LOW(rSCY)
call BattleBGEffect_SetLCDStatCustoms1
@ -1371,7 +1371,7 @@ BattleBGEffect_Dig:
.next
ld [hl], $10
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
.two
ldh a, [hLYOverrideStart]
ld l, a
@ -1414,7 +1414,7 @@ BattleBGEffect_Tackle:
; Prepares mon to move forward (player moves right, enemy moves left)
; BG_EFFECT_STRUCT_03 will keep track of distance moved, so it's reset to 0 here
; BG_EFFECT_STRUCT_BATTLE_TURN is set to 2 or -2 depending on target
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
call BattleBGEffects_ClearLYOverrides
ld a, LOW(rSCX)
call BattleBGEffect_SetLCDStatCustoms1
@ -1451,7 +1451,7 @@ BattleBGEffect_BodySlam:
; Prepares mon to move forward (player moves right, enemy moves left)
; BG_EFFECT_STRUCT_03 will keep track of distance moved, so it's reset to 0 here
; BG_EFFECT_STRUCT_BATTLE_TURN is set to 2 or -2 depending on target
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
call BattleBGEffects_ClearLYOverrides
ld a, LOW(rSCX)
call BattleBGEffect_SetLCDStatCustoms2
@ -1488,7 +1488,7 @@ Tackle_MoveForward:
cp 8
jr nz, .finish
.reached_limit
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
.finish
call Rollout_FillLYOverridesBackup
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
@ -1509,7 +1509,7 @@ Tackle_ReturnMove:
ld a, [hl]
and a
jr nz, .move_back
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
.move_back
call Rollout_FillLYOverridesBackup
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
@ -1590,7 +1590,7 @@ BattleBGEffect_BetaPursuit: ; unused
VitalThrow_MoveBackwards:
; Prepares mon to move back back (player moves left, enemy moves right)
; BG_EFFECT_STRUCT_03: keeps track of distance moved, so it's reset to 0 here
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
call BattleBGEffects_ClearLYOverrides
ld a, LOW(rSCX)
call BattleBGEffect_SetLCDStatCustoms1
@ -1634,7 +1634,7 @@ BattleBGEffect_WobbleMon:
dw .two
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
call BattleBGEffects_ClearLYOverrides
ld a, LOW(rSCX)
call BattleBGEffect_SetLCDStatCustoms1
@ -1672,7 +1672,7 @@ BattleBGEffect_Flail:
dw .two
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
call BattleBGEffects_ClearLYOverrides
ld a, LOW(rSCX)
call BattleBGEffect_SetLCDStatCustoms1
@ -1726,7 +1726,7 @@ BattleBGEffect_WaveDeformMon:
dw .two
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
call BattleBGEffects_ClearLYOverrides
ld a, LOW(rSCX)
call BattleBGEffect_SetLCDStatCustoms1
@ -1768,7 +1768,7 @@ BattleBGEffect_BounceDown:
dw .two
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
call BattleBGEffects_ClearLYOverrides
ld a, LOW(rSCY)
call BattleBGEffect_SetLCDStatCustoms2
@ -1821,7 +1821,7 @@ BattleBGEffect_BetaSendOutMon1: ; unused
dw .five
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
ld a, $e4
call BattleBGEffects_SetLYOverrides
ld a, $47
@ -1861,7 +1861,7 @@ BattleBGEffect_BetaSendOutMon1: ; unused
ldh a, [hLYOverrideStart]
inc a
ldh [hLYOverrideStart], a
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
ret
.three
@ -1875,7 +1875,7 @@ BattleBGEffect_BetaSendOutMon1: ; unused
ret
.finish
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
ret
.SetLYOverridesBackup:
@ -1925,7 +1925,7 @@ BattleBGEffect_BetaSendOutMon2: ; unused
dw .one
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
call BattleBGEffects_ClearLYOverrides
ld a, LOW(rSCX)
call BattleBGEffect_SetLCDStatCustoms1
@ -1965,7 +1965,7 @@ BattleBGEffect_FadeMonsToBlackRepeating:
dw .two
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
ld a, $e4
call BattleBGEffects_SetLYOverrides
ld a, LOW(rBGP)
@ -2049,7 +2049,7 @@ BattleBGEffect_FadeMonsToBlackRepeating:
dw .cgb_two
.cgb_zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
ld hl, BG_EFFECT_STRUCT_03
add hl, bc
ld [hl], $0
@ -2201,7 +2201,7 @@ BattleBGEffect_VibrateMon:
dw .one
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
call BattleBGEffects_ClearLYOverrides
ld a, LOW(rSCX)
call BattleBGEffect_SetLCDStatCustoms1
@ -2247,7 +2247,7 @@ BattleBGEffect_WobblePlayer:
dw .two
.zero
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
call BattleBGEffects_ClearLYOverrides
ld a, LOW(rSCX)
ldh [hLCDCPointer], a
@ -2412,7 +2412,7 @@ BGEffect_RapidCyclePals:
dw .two_dmg
.zero_dmg
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
ld a, $e4
call BattleBGEffects_SetLYOverrides
ld a, $47
@ -2478,10 +2478,10 @@ BGEffect_RapidCyclePals:
.zero_cgb
call BGEffect_CheckBattleTurn
jr nz, .player_turn_cgb
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
call BattleBGEffects_IncAnonJumptableIndex
.player_turn_cgb
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_IncAnonJumptableIndex
ld hl, BG_EFFECT_STRUCT_03
add hl, bc
ld a, [hl]

View File

@ -3,11 +3,11 @@ CARDFLIP_LIGHT_ON EQU "♀" ; $f5
CARDFLIP_DECK_SIZE EQU 4 * 6
; two labels below called from inside ./dummy_game.asm
Unknown_e00ed:
DummyGameGFX:
; Graphics for an unused Game Corner
; game were meant to be here.
ret_e00ed:
UnusedCursor_InterpretJoypad_AnimateCursor:
ret
_CardFlip:

View File

@ -14,10 +14,10 @@ _DummyGame:
ld hl, DummyGameLZ
ld de, vTiles2 tile $00
call Decompress
ld hl, Unknown_e00ed
ld hl, DummyGameGFX
ld de, vTiles0 tile $00
ld bc, 4 tiles
ld a, BANK(Unknown_e00ed)
ld a, BANK(DummyGameGFX)
call FarCopyBytes
ld a, $8
ld hl, wc300
@ -77,7 +77,7 @@ _DummyGame:
ret
.ResetBoard:
call ret_e00ed
call UnusedCursor_InterpretJoypad_AnimateCursor
jr nc, .proceed
ld hl, wJumptableIndex
set 7, [hl]
@ -232,7 +232,7 @@ endr
ld hl, wJumptableIndex
inc [hl]
.AskPlayAgain:
call ret_e00ed
call UnusedCursor_InterpretJoypad_AnimateCursor
jr nc, .restart
ld hl, wJumptableIndex
set 7, [hl]

File diff suppressed because it is too large Load Diff

View File

@ -134,7 +134,7 @@ HandleQueuedCommand:
dba CmdQueue_Type3
dba CmdQueue_Type4
CmdQueueAnonymousJumptable:
CmdQueues_AnonJumptable:
ld hl, CMDQUEUE_05
add hl, bc
ld a, [hl]
@ -142,13 +142,13 @@ CmdQueueAnonymousJumptable:
rst JumpTable
ret
CmdQueueAnonJT_Increment:
CmdQueues_IncAnonJumptableIndex:
ld hl, CMDQUEUE_05
add hl, bc
inc [hl]
ret
CmdQueueAnonJT_Decrement:
CmdQueues_DecAnonJumptableIndex:
ld hl, CMDQUEUE_05
add hl, bc
dec [hl]
@ -162,7 +162,7 @@ CmdQueue_Type1:
ret
CmdQueue_Type4:
call CmdQueueAnonymousJumptable
call CmdQueues_AnonJumptable
; anonymous dw
dw .zero
dw .one
@ -172,7 +172,7 @@ CmdQueue_Type4:
ld hl, CMDQUEUE_04
add hl, bc
ld [hl], a
call CmdQueueAnonJT_Increment
call CmdQueues_IncAnonJumptableIndex
.one
ld hl, CMDQUEUE_ADDR
add hl, bc
@ -206,7 +206,7 @@ CmdQueue_Type4:
ret
CmdQueue_Type3:
call CmdQueueAnonymousJumptable
call CmdQueues_AnonJumptable
; anonymous dw
dw .zero
dw .one
@ -215,11 +215,11 @@ CmdQueue_Type3:
.zero
call .IsPlayerFacingDown
jr z, .PlayerNotFacingDown
call CmdQueueAnonJT_Increment
call CmdQueues_IncAnonJumptableIndex
.one
call .IsPlayerFacingDown
jr z, .PlayerNotFacingDown
call CmdQueueAnonJT_Increment
call CmdQueues_IncAnonJumptableIndex
ld hl, CMDQUEUE_02
add hl, bc
@ -230,7 +230,7 @@ CmdQueue_Type3:
.two
call .IsPlayerFacingDown
jr z, .PlayerNotFacingDown
call CmdQueueAnonJT_Decrement
call CmdQueues_DecAnonJumptableIndex
ld hl, CMDQUEUE_03
add hl, bc

File diff suppressed because it is too large Load Diff