You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
jumptable macro repurposed
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
INCLUDE "battle/objects/engine.asm"
|
||||
INCLUDE "battle/objects/data.asm"
|
||||
INCLUDE "battle/objects/functions.asm"
|
||||
INCLUDE "battle/objects/library.asm"
|
||||
INCLUDE "battle/objects/helpers.asm"
|
||||
INCLUDE "battle/objects/framesets.asm"
|
||||
INCLUDE "battle/objects/oam.asm"
|
||||
INCLUDE "battle/objects/gfx_headers.asm"
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1849,9 +1849,8 @@ HandleWeather: ; 3cb9e
|
||||
dec a
|
||||
ld c, a
|
||||
ld b, 0
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@@ -2575,9 +2574,8 @@ Function3d02b: ; 3d02b
|
||||
dec a
|
||||
ld c, a
|
||||
ld b, 0
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@@ -2615,9 +2613,8 @@ endr
|
||||
rl [hl]
|
||||
ret nc
|
||||
ld a, $ff
|
||||
rept 2
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hli], a
|
||||
ld [hl], a
|
||||
ret
|
||||
; 3d0ab
|
||||
@@ -4747,18 +4744,16 @@ HandleStatBoostingHeldItems: ; 3de97
|
||||
ld a, [hli]
|
||||
cp $ff
|
||||
jr z, .finish
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
cp b
|
||||
jr nz, .loop
|
||||
pop bc
|
||||
ld a, [bc]
|
||||
ld [wd265], a
|
||||
push bc
|
||||
rept 2
|
||||
dec hl
|
||||
endr
|
||||
dec hl
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@@ -5822,9 +5817,8 @@ MoveSelectionScreen: ; 3e4bc
|
||||
ld a, [wMenuCursorY]
|
||||
ld b, a
|
||||
ld a, [wNumMoves]
|
||||
rept 2
|
||||
inc a
|
||||
endr
|
||||
inc a
|
||||
cp b
|
||||
jp nz, .menu_loop
|
||||
ld a, $1
|
||||
@@ -6008,9 +6002,8 @@ MoveInfoBox: ; 3e6c8
|
||||
lb bc, 1, 2
|
||||
call PrintNum
|
||||
pop hl
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
ld [hl], "/"
|
||||
inc hl
|
||||
ld de, wNamedObjectIndexBuffer
|
||||
@@ -6818,9 +6811,8 @@ CheckUnownLetter: ; 3eb75
|
||||
|
||||
.next
|
||||
; Make sure we haven't gone past the end of the table
|
||||
rept 2
|
||||
inc e
|
||||
endr
|
||||
inc e
|
||||
ld a, e
|
||||
cp a, .Set1 - .LetterSets
|
||||
jr c, .loop
|
||||
@@ -7176,9 +7168,8 @@ BadgeStatBoosts: ; 3ed45
|
||||
; Swap badges 3 (PlainBadge) and 5 (MineralBadge).
|
||||
ld d, a
|
||||
and (1 << PLAINBADGE)
|
||||
rept 2
|
||||
add a
|
||||
endr
|
||||
add a
|
||||
ld b, a
|
||||
ld a, d
|
||||
and (1 << MINERALBADGE)
|
||||
@@ -7197,9 +7188,8 @@ endr
|
||||
ld a, b
|
||||
srl b
|
||||
call c, BoostStat
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
; Check every other badge.
|
||||
srl b
|
||||
dec c
|
||||
@@ -7328,9 +7318,8 @@ _BattleRandom:: ; 3edd8
|
||||
|
||||
; a * 5 + 1
|
||||
ld c, a
|
||||
rept 2
|
||||
add a
|
||||
endr
|
||||
add a
|
||||
add c
|
||||
inc a
|
||||
|
||||
@@ -7467,9 +7456,8 @@ GiveExperiencePoints: ; 3ee3b
|
||||
ld [de], a
|
||||
|
||||
.skip
|
||||
rept 2
|
||||
inc de
|
||||
endr
|
||||
inc de
|
||||
dec c
|
||||
jr nz, .loop1
|
||||
xor a
|
||||
@@ -7544,9 +7532,8 @@ endr
|
||||
inc [hl]
|
||||
jr nz, .skip2
|
||||
ld a, $ff
|
||||
rept 2
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hli], a
|
||||
ld [hl], a
|
||||
|
||||
.skip2
|
||||
@@ -7881,9 +7868,8 @@ Function3f136: ; 3f136
|
||||
inc [hl]
|
||||
jr nz, .asm_3f186
|
||||
ld a, $ff
|
||||
rept 2
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hli], a
|
||||
ld [hl], a
|
||||
|
||||
.asm_3f186
|
||||
@@ -8800,9 +8786,8 @@ CheckPayDay: ; 3f71d
|
||||
rl [hl]
|
||||
jr nc, .okay
|
||||
ld a, $ff
|
||||
rept 2
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hli], a
|
||||
ld [hl], a
|
||||
|
||||
.okay
|
||||
@@ -9202,13 +9187,11 @@ Function3fa42: ; 3fa42
|
||||
ld d, 5
|
||||
.loop
|
||||
push hl
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
ld a, [hl]
|
||||
rept 2
|
||||
dec hl
|
||||
endr
|
||||
dec hl
|
||||
and a
|
||||
jr z, .copy
|
||||
push de
|
||||
@@ -9308,18 +9291,16 @@ Function3fac8: ; 3fac8
|
||||
ld c, $1
|
||||
.loop2
|
||||
ld a, b
|
||||
rept 2
|
||||
add b
|
||||
endr
|
||||
add b
|
||||
ld e, a
|
||||
ld d, $0
|
||||
ld hl, wd002
|
||||
add hl, de
|
||||
push hl
|
||||
ld a, c
|
||||
rept 2
|
||||
add c
|
||||
endr
|
||||
add c
|
||||
ld e, a
|
||||
ld d, $0
|
||||
ld hl, wd002
|
||||
|
@@ -51,9 +51,8 @@ DoMove: ; 3402c
|
||||
ld c, a
|
||||
ld b, 0
|
||||
ld hl, MoveEffectsPointers
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
ld a, BANK(MoveEffectsPointers)
|
||||
call GetFarHalfword
|
||||
|
||||
@@ -102,9 +101,8 @@ endr
|
||||
ld c, a
|
||||
ld b, 0
|
||||
ld hl, BattleCommandPointers
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
pop bc
|
||||
|
||||
ld a, BANK(BattleCommandPointers)
|
||||
@@ -1076,9 +1074,8 @@ BattleCommand_DoTurn: ; 34555
|
||||
jp nz, EndMoveEffect
|
||||
|
||||
; SubStatus5
|
||||
rept 2
|
||||
inc de
|
||||
endr
|
||||
inc de
|
||||
|
||||
ld a, [de]
|
||||
bit SUBSTATUS_TRANSFORMED, a
|
||||
@@ -1276,9 +1273,8 @@ BattleCommand_Critical: ; 34631
|
||||
jr nc, .ScopeLens
|
||||
|
||||
; +2 critical level
|
||||
rept 2
|
||||
inc c
|
||||
endr
|
||||
inc c
|
||||
|
||||
.ScopeLens
|
||||
push bc
|
||||
@@ -1522,9 +1518,8 @@ BattleCommand_Stab: ; 346d2
|
||||
pop hl
|
||||
|
||||
.SkipType
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
jr .TypesLoop
|
||||
|
||||
.end
|
||||
@@ -2741,9 +2736,8 @@ EndMoveEffect: ; 352a3
|
||||
ld a, [BattleScriptBufferLoc + 1]
|
||||
ld h, a
|
||||
ld a, $ff
|
||||
rept 2
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hli], a
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
@@ -3457,9 +3451,8 @@ BattleCommand_DamageCalc: ; 35612
|
||||
|
||||
xor a
|
||||
ld hl, hDividend
|
||||
rept 2
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hli], a
|
||||
ld [hl], a
|
||||
|
||||
; Level * 2
|
||||
@@ -3480,9 +3473,8 @@ endr
|
||||
pop bc
|
||||
|
||||
; + 2
|
||||
rept 2
|
||||
inc [hl]
|
||||
endr
|
||||
inc [hl]
|
||||
|
||||
; * bp
|
||||
inc hl
|
||||
@@ -4075,9 +4067,8 @@ BattleCommand_PainSplit: ; 35926
|
||||
ld [Buffer3], a
|
||||
ld a, [hl]
|
||||
ld [Buffer4], a
|
||||
rept 2
|
||||
dec de
|
||||
endr
|
||||
dec de
|
||||
ld a, [de]
|
||||
dec de
|
||||
add b
|
||||
@@ -4587,9 +4578,8 @@ BattleCommand_Spite: ; 35c0f
|
||||
call GetMoveName
|
||||
call BattleRandom
|
||||
and 3
|
||||
rept 2
|
||||
inc a
|
||||
endr
|
||||
inc a
|
||||
ld b, a
|
||||
ld a, [hl]
|
||||
and $3f
|
||||
@@ -6380,9 +6370,8 @@ CalcStats: ; 3661d
|
||||
dec c
|
||||
ld b, 0
|
||||
ld hl, StatLevelMultipliers
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
|
||||
xor a
|
||||
ld [hMultiplicand + 0], a
|
||||
@@ -6538,9 +6527,8 @@ BattleCommand_UnleashEnergy: ; 366e5
|
||||
ld [wEnemyMoveStruct + MOVE_EFFECT], a
|
||||
call BattleRandom
|
||||
and 1
|
||||
rept 2
|
||||
inc a
|
||||
endr
|
||||
inc a
|
||||
ld [bc], a
|
||||
ld a, 1
|
||||
ld [wKickCounter], a
|
||||
@@ -6579,9 +6567,8 @@ BattleCommand_CheckRampage: ; 3671a
|
||||
set SUBSTATUS_CONFUSED, [hl]
|
||||
call BattleRandom
|
||||
and %00000001
|
||||
rept 2
|
||||
inc a
|
||||
endr
|
||||
inc a
|
||||
inc de ; ConfuseCount
|
||||
ld [de], a
|
||||
.continue_rampage
|
||||
@@ -7464,9 +7451,8 @@ endr
|
||||
ld a, [hli]
|
||||
cp b
|
||||
jr z, .found_trap_text
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
jr .find_trap_text
|
||||
|
||||
.found_trap_text
|
||||
@@ -7552,9 +7538,8 @@ BattleCommand_Recoil: ; 36cb2
|
||||
ld [Buffer2], a
|
||||
ld a, [hl]
|
||||
ld [Buffer1], a
|
||||
rept 2
|
||||
dec hl
|
||||
endr
|
||||
dec hl
|
||||
ld a, [hl]
|
||||
ld [Buffer3], a
|
||||
sub c
|
||||
@@ -7651,9 +7636,8 @@ BattleCommand_FinishConfusingTarget: ; 36d70
|
||||
set SUBSTATUS_CONFUSED, [hl]
|
||||
call BattleRandom
|
||||
and 3
|
||||
rept 2
|
||||
inc a
|
||||
endr
|
||||
inc a
|
||||
ld [bc], a
|
||||
|
||||
ld a, BATTLE_VARS_MOVE_EFFECT
|
||||
@@ -7844,9 +7828,8 @@ BattleCommand_Substitute: ; 36e7c
|
||||
rr b
|
||||
srl a
|
||||
rr b
|
||||
rept 2
|
||||
dec hl
|
||||
endr
|
||||
dec hl
|
||||
ld a, b
|
||||
ld [de], a
|
||||
ld a, [hld]
|
||||
@@ -8457,9 +8440,8 @@ BattleCommand_Transform: ; 371cd
|
||||
ld a, [hli]
|
||||
ld [de], a
|
||||
inc hl
|
||||
rept 2
|
||||
inc de
|
||||
endr
|
||||
inc de
|
||||
ld bc, NUM_MOVES
|
||||
call CopyBytes
|
||||
ld a, [hBattleTurn]
|
||||
@@ -9125,9 +9107,8 @@ BattleCommand_GetMagnitude: ; 37991
|
||||
ld a, [hli]
|
||||
cp b
|
||||
jr nc, .ok
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
jr .loop
|
||||
|
||||
.ok
|
||||
@@ -9528,16 +9509,14 @@ BattleCommand_TimeBasedHealContinue: ; 37b7e
|
||||
inc c
|
||||
cp WEATHER_SUN
|
||||
jr z, .Heal
|
||||
rept 2
|
||||
dec c
|
||||
endr
|
||||
dec c
|
||||
|
||||
.Heal
|
||||
ld b, 0
|
||||
ld hl, .Multipliers
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
|
@@ -558,10 +558,10 @@ endm
|
||||
; ANIM_OBJ_COTTON
|
||||
battleanimobj $01, $ff, BATTLEANIMFRAMESET_89, BATTLEANIMFUNC_4F, $04, $1f
|
||||
|
||||
; ANIM_OBJ_B8
|
||||
; ANIM_OBJ_PLAYERFEETFOLLOW
|
||||
battleanimobj $00, $00, BATTLEANIMFRAMESET_B5, BATTLEANIMFUNC_00, $00, $28
|
||||
|
||||
; ANIM_OBJ_B9
|
||||
; ANIM_OBJ_ENEMYFEETFOLLOW
|
||||
battleanimobj $00, $00, BATTLEANIMFRAMESET_B6, BATTLEANIMFUNC_00, $01, $29
|
||||
|
||||
; ANIM_OBJ_BA
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -5,10 +5,10 @@ BattleIntroSlidingPics: ; 4e980
|
||||
ld [rSVBK], a
|
||||
call .subfunction1
|
||||
ld a, rSCX - $ff00
|
||||
ld [hLCDStatCustom], a
|
||||
ld [hFFC6], a
|
||||
call .subfunction2
|
||||
xor a
|
||||
ld [hLCDStatCustom], a
|
||||
ld [hFFC6], a
|
||||
pop af
|
||||
ld [rSVBK], a
|
||||
ret
|
||||
|
@@ -210,8 +210,8 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
|
||||
const ANIM_OBJ_B5
|
||||
const ANIM_OBJ_FLOWER
|
||||
const ANIM_OBJ_COTTON
|
||||
const ANIM_OBJ_B8
|
||||
const ANIM_OBJ_B9
|
||||
const ANIM_OBJ_PLAYERFEETFOLLOW
|
||||
const ANIM_OBJ_ENEMYFEETFOLLOW
|
||||
const ANIM_OBJ_BA
|
||||
const ANIM_OBJ_BB
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
const BATTLETOWERACTION_0D ; more time stuff in SRAM bank 5
|
||||
const BATTLETOWERACTION_EGGTICKET ; egg ticket
|
||||
const BATTLETOWERACTION_0F ; check w3_d090
|
||||
const BATTLETOWERACTION_10 ; jumptable based on 5:a800
|
||||
const BATTLETOWERACTION_10 ; dw based on 5:a800
|
||||
const BATTLETOWERACTION_11 ; store 0 in 5:aa8d
|
||||
const BATTLETOWERACTION_12 ; store 1 in 5:aa8d
|
||||
const BATTLETOWERACTION_13 ; check 5:aa8d
|
||||
|
@@ -39,9 +39,9 @@ Predef_StartBattle: ; 8c20f
|
||||
call DmgToCgbBGPals
|
||||
call DelayFrame
|
||||
xor a
|
||||
ld [hLCDStatCustom], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld [hFFC6], a
|
||||
ld [hFFC7], a
|
||||
ld [hFFC8], a
|
||||
ld [hSCY], a
|
||||
|
||||
ld a, $1
|
||||
@@ -74,9 +74,8 @@ Function8c26d: ; 8c26d
|
||||
ld [hBGMapMode], a
|
||||
ld hl, wJumptableIndex
|
||||
xor a
|
||||
rept 2
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hli], a
|
||||
ld [hl], a
|
||||
call WipeLYOverrides
|
||||
ret
|
||||
@@ -146,20 +145,10 @@ INCBIN "gfx/overworld/trainer_battle_pokeball_tiles.2bpp"
|
||||
|
||||
|
||||
FlashyTransitionToBattle: ; 8c314
|
||||
ld a, [wJumptableIndex]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .jumptable
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp [hl]
|
||||
jumptable .dw, wJumptableIndex
|
||||
; 8c323
|
||||
|
||||
.jumptable: ; 8c323 (23:4323)
|
||||
.dw: ; 8c323 (23:4323)
|
||||
dw StartTrainerBattle_DetermineWhichAnimation ; 00
|
||||
|
||||
; Animation 1: cave
|
||||
@@ -314,11 +303,11 @@ StartTrainerBattle_SetUpForWavyOutro: ; 8c3e8 (23:43e8)
|
||||
call StartTrainerBattle_NextScene
|
||||
|
||||
ld a, $43
|
||||
ld [hLCDStatCustom], a
|
||||
ld [hFFC6], a
|
||||
xor a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ld [hFFC7], a
|
||||
ld a, $90
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld [hFFC8], a
|
||||
xor a
|
||||
ld [wcf64], a
|
||||
ld [wcf65], a
|
||||
@@ -784,9 +773,8 @@ StartTrainerBattle_DrawSineWave: ; 8c6f7 (23:46f7)
|
||||
ld a, d
|
||||
ld d, 0
|
||||
ld hl, .sinewave
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld e, [hl]
|
||||
inc hl
|
||||
ld d, [hl]
|
||||
|
@@ -42,12 +42,12 @@ _DepositPKMN: ; e2391 (38:6391)
|
||||
jp [hl]
|
||||
|
||||
.Jumptable: ; e23df (38:63df)
|
||||
jumptable_start
|
||||
jumptable .Init
|
||||
jumptable .HandleJoypad
|
||||
jumptable .WhatsUp
|
||||
jumptable .Submenu
|
||||
jumptable BillsPC_EndJumptableLoop
|
||||
|
||||
dw .Init
|
||||
dw .HandleJoypad
|
||||
dw .WhatsUp
|
||||
dw .Submenu
|
||||
dw BillsPC_EndJumptableLoop
|
||||
|
||||
|
||||
.Init: ; e23e9 (38:63e9)
|
||||
@@ -151,11 +151,11 @@ endr
|
||||
jp [hl]
|
||||
|
||||
BillsPCDepositJumptable: ; e24a1 (38:64a1)
|
||||
jumptable_start
|
||||
jumptable BillsPCDepositFuncDeposit ; Deposit Pokemon
|
||||
jumptable BillsPCDepositFuncStats ; Pokemon Stats
|
||||
jumptable BillsPCDepositFuncRelease ; Release Pokemon
|
||||
jumptable BillsPCDepositFuncCancel ; Cancel
|
||||
|
||||
dw BillsPCDepositFuncDeposit ; Deposit Pokemon
|
||||
dw BillsPCDepositFuncStats ; Pokemon Stats
|
||||
dw BillsPCDepositFuncRelease ; Release Pokemon
|
||||
dw BillsPCDepositFuncCancel ; Cancel
|
||||
|
||||
|
||||
BillsPCDepositFuncDeposit: ; e24a9 (38:64a9)
|
||||
@@ -310,12 +310,12 @@ _WithdrawPKMN: ; e2583 (38:6583)
|
||||
jp [hl]
|
||||
|
||||
.Jumptable: ; e25d2 (38:65d2)
|
||||
jumptable_start
|
||||
jumptable .Init
|
||||
jumptable .Joypad
|
||||
jumptable .PrepSubmenu
|
||||
jumptable BillsPC_Withdraw
|
||||
jumptable BillsPC_EndJumptableLoop
|
||||
|
||||
dw .Init
|
||||
dw .Joypad
|
||||
dw .PrepSubmenu
|
||||
dw BillsPC_Withdraw
|
||||
dw BillsPC_EndJumptableLoop
|
||||
|
||||
|
||||
.Init: ; e25dc (38:65dc)
|
||||
@@ -410,7 +410,7 @@ BillsPC_Withdraw: ; e2675 (38:6675)
|
||||
and 3
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .jumptable
|
||||
ld hl, .dw
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
@@ -419,7 +419,7 @@ endr
|
||||
ld l, a
|
||||
jp [hl]
|
||||
|
||||
.jumptable: ; e2699 (38:6699) #mark
|
||||
.dw: ; e2699 (38:6699) #mark
|
||||
dw .withdraw ; Withdraw
|
||||
dw .stats ; Stats
|
||||
dw .release ; Release
|
||||
@@ -562,14 +562,14 @@ _MovePKMNWithoutMail: ; e2759
|
||||
; e27ac
|
||||
|
||||
.Jumptable: ; e27ac
|
||||
jumptable_start
|
||||
jumptable .Init
|
||||
jumptable .Joypad
|
||||
jumptable .PrepSubmenu
|
||||
jumptable .MoveMonWOMailSubmenu
|
||||
jumptable .PrepInsertCursor
|
||||
jumptable .Joypad2
|
||||
jumptable BillsPC_EndJumptableLoop
|
||||
|
||||
dw .Init
|
||||
dw .Joypad
|
||||
dw .PrepSubmenu
|
||||
dw .MoveMonWOMailSubmenu
|
||||
dw .PrepInsertCursor
|
||||
dw .Joypad2
|
||||
dw BillsPC_EndJumptableLoop
|
||||
; e27ba
|
||||
|
||||
.Init: ; e27ba
|
||||
@@ -2016,12 +2016,12 @@ endr
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
ld de, .jumptable_return
|
||||
ld de, .dw_return
|
||||
push de
|
||||
jp [hl]
|
||||
; e322a
|
||||
|
||||
.jumptable_return: ; e322a
|
||||
.dw_return: ; e322a
|
||||
pop af
|
||||
ld e, a
|
||||
callba Function14ad5
|
||||
@@ -2033,11 +2033,11 @@ endr
|
||||
; e3245
|
||||
|
||||
.Jumptable: ; e3245
|
||||
jumptable_start
|
||||
jumptable .BoxToBox
|
||||
jumptable .PartyToBox
|
||||
jumptable .BoxToParty
|
||||
jumptable .PartyToParty
|
||||
|
||||
dw .BoxToBox
|
||||
dw .PartyToBox
|
||||
dw .BoxToParty
|
||||
dw .PartyToParty
|
||||
; e324d
|
||||
|
||||
.BoxToBox: ; e324d
|
||||
|
@@ -81,15 +81,15 @@ endr
|
||||
; e01a0 (38:41a0)
|
||||
|
||||
.Jumptable: ; e01a0
|
||||
jumptable_start
|
||||
jumptable .AskPlayWithThree
|
||||
jumptable .DeductCoins
|
||||
jumptable .ChooseACard
|
||||
jumptable .PlaceYourBet
|
||||
jumptable .CheckTheCard
|
||||
jumptable .TabulateTheResult
|
||||
jumptable .PlayAgain
|
||||
jumptable .Quit
|
||||
|
||||
dw .AskPlayWithThree
|
||||
dw .DeductCoins
|
||||
dw .ChooseACard
|
||||
dw .PlaceYourBet
|
||||
dw .CheckTheCard
|
||||
dw .TabulateTheResult
|
||||
dw .PlayAgain
|
||||
dw .Quit
|
||||
; e01b0
|
||||
|
||||
.Increment: ; e01b0
|
||||
@@ -108,7 +108,7 @@ endr
|
||||
ret
|
||||
|
||||
.SaidNo
|
||||
ld a, 7 ; .QuitTableIndex
|
||||
ld a, 7
|
||||
ld [wJumptableIndex], a
|
||||
ret
|
||||
; e01cd
|
||||
@@ -132,7 +132,7 @@ endr
|
||||
jr nc, .deduct ; You have at least 3 coins.
|
||||
ld hl, .NotEnoughCoinsText
|
||||
call CardFlip_UpdateCoinBalanceDisplay
|
||||
ld a, 7 ; .QuitTableIndex
|
||||
ld a, 7
|
||||
ld [wJumptableIndex], a
|
||||
ret
|
||||
|
||||
@@ -329,7 +329,7 @@ endr
|
||||
call CardFlip_BlankDiscardedCardSlot
|
||||
|
||||
.LoopAround
|
||||
ld a, 1 ; .DeductCoinsTableIndex
|
||||
ld a, 1
|
||||
ld [wJumptableIndex], a
|
||||
ret
|
||||
; e0356
|
||||
@@ -659,13 +659,13 @@ CardFlip_BlankDiscardedCardSlot: ; e0534
|
||||
; e0553
|
||||
|
||||
.Jumptable: ; e0553
|
||||
jumptable_start
|
||||
jumptable .Level1
|
||||
jumptable .Level2
|
||||
jumptable .Level3
|
||||
jumptable .Level4
|
||||
jumptable .Level5
|
||||
jumptable .Level6
|
||||
|
||||
dw .Level1
|
||||
dw .Level2
|
||||
dw .Level3
|
||||
dw .Level4
|
||||
dw .Level5
|
||||
dw .Level6
|
||||
; e055f
|
||||
|
||||
.Level1: ; e055f
|
||||
@@ -848,62 +848,62 @@ CardFlip_CheckWinCondition: ; e0637
|
||||
; e0643
|
||||
|
||||
.Jumptable: ; e0643
|
||||
jumptable_start
|
||||
jumptable .Impossible
|
||||
jumptable .Impossible
|
||||
jumptable .PikaJiggly
|
||||
jumptable .PikaJiggly
|
||||
jumptable .PoliOddish
|
||||
jumptable .PoliOddish
|
||||
|
||||
dw .Impossible
|
||||
dw .Impossible
|
||||
dw .PikaJiggly
|
||||
dw .PikaJiggly
|
||||
dw .PoliOddish
|
||||
dw .PoliOddish
|
||||
|
||||
jumptable .Impossible
|
||||
jumptable .Impossible
|
||||
jumptable .Pikachu
|
||||
jumptable .Jigglypuff
|
||||
jumptable .Poliwag
|
||||
jumptable .Oddish
|
||||
dw .Impossible
|
||||
dw .Impossible
|
||||
dw .Pikachu
|
||||
dw .Jigglypuff
|
||||
dw .Poliwag
|
||||
dw .Oddish
|
||||
|
||||
jumptable .OneTwo
|
||||
jumptable .One
|
||||
jumptable .PikaOne
|
||||
jumptable .JigglyOne
|
||||
jumptable .PoliOne
|
||||
jumptable .OddOne
|
||||
dw .OneTwo
|
||||
dw .One
|
||||
dw .PikaOne
|
||||
dw .JigglyOne
|
||||
dw .PoliOne
|
||||
dw .OddOne
|
||||
|
||||
jumptable .OneTwo
|
||||
jumptable .Two
|
||||
jumptable .PikaTwo
|
||||
jumptable .JigglyTwo
|
||||
jumptable .PoliTwo
|
||||
jumptable .OddTwo
|
||||
dw .OneTwo
|
||||
dw .Two
|
||||
dw .PikaTwo
|
||||
dw .JigglyTwo
|
||||
dw .PoliTwo
|
||||
dw .OddTwo
|
||||
|
||||
jumptable .ThreeFour
|
||||
jumptable .Three
|
||||
jumptable .PikaThree
|
||||
jumptable .JigglyThree
|
||||
jumptable .PoliThree
|
||||
jumptable .OddThree
|
||||
dw .ThreeFour
|
||||
dw .Three
|
||||
dw .PikaThree
|
||||
dw .JigglyThree
|
||||
dw .PoliThree
|
||||
dw .OddThree
|
||||
|
||||
jumptable .ThreeFour
|
||||
jumptable .Four
|
||||
jumptable .PikaFour
|
||||
jumptable .JigglyFour
|
||||
jumptable .PoliFour
|
||||
jumptable .OddFour
|
||||
dw .ThreeFour
|
||||
dw .Four
|
||||
dw .PikaFour
|
||||
dw .JigglyFour
|
||||
dw .PoliFour
|
||||
dw .OddFour
|
||||
|
||||
jumptable .FiveSix
|
||||
jumptable .Five
|
||||
jumptable .PikaFive
|
||||
jumptable .JigglyFive
|
||||
jumptable .PoliFive
|
||||
jumptable .OddFive
|
||||
dw .FiveSix
|
||||
dw .Five
|
||||
dw .PikaFive
|
||||
dw .JigglyFive
|
||||
dw .PoliFive
|
||||
dw .OddFive
|
||||
|
||||
jumptable .FiveSix
|
||||
jumptable .Six
|
||||
jumptable .PikaSix
|
||||
jumptable .JigglySix
|
||||
jumptable .PoliSix
|
||||
jumptable .OddSix
|
||||
dw .FiveSix
|
||||
dw .Six
|
||||
dw .PikaSix
|
||||
dw .JigglySix
|
||||
dw .PoliSix
|
||||
dw .OddSix
|
||||
; e06a3
|
||||
|
||||
.Impossible: ; e06a3
|
||||
|
@@ -367,9 +367,8 @@ ApplyHPBarPals: ; 8c43
|
||||
.okay
|
||||
ld l, c
|
||||
ld h, $0
|
||||
rept 2
|
||||
add hl, hl
|
||||
endr
|
||||
add hl, hl
|
||||
ld bc, Palettes_a8be
|
||||
add hl, bc
|
||||
ld bc, 4
|
||||
@@ -405,9 +404,8 @@ LoadStatsScreenPals: ; 8c8a
|
||||
ld hl, StatsScreenPals
|
||||
ld b, 0
|
||||
dec c
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
ld a, $5
|
||||
@@ -441,9 +439,8 @@ endr
|
||||
ld bc, PALPACKET_LENGTH
|
||||
call CopyBytes
|
||||
pop hl
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
ld a, [hli]
|
||||
ld [wSGBPals + 3], a
|
||||
ld a, [hli]
|
||||
@@ -818,9 +815,8 @@ GetFrontpicPalettePointer: ; 9764
|
||||
GetTrainerPalettePointer: ; 976b
|
||||
ld l, a
|
||||
ld h, 0
|
||||
rept 2
|
||||
add hl,hl
|
||||
endr
|
||||
add hl,hl
|
||||
ld bc, TrainerPalettes
|
||||
add hl, bc
|
||||
ret
|
||||
@@ -1152,9 +1148,8 @@ Function994a: ; 994a
|
||||
jr nz, .asm_99a6
|
||||
ld a, $20
|
||||
ld [rJOYP], a
|
||||
rept 2
|
||||
ld a, [rJOYP]
|
||||
endr
|
||||
ld a, [rJOYP]
|
||||
call SGBDelayCycles
|
||||
call SGBDelayCycles
|
||||
ld a, $30
|
||||
@@ -1962,9 +1957,8 @@ LoadMapPals: ; b1de
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .TilesetColorsPointers
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
|
@@ -183,7 +183,7 @@ Credits:: ; 109847
|
||||
call ByteFill
|
||||
|
||||
ld a, rSCX - $ff00
|
||||
ld [hLCDStatCustom], a
|
||||
ld [hFFC6], a
|
||||
|
||||
call GetCreditsPalette
|
||||
call SetPalettes
|
||||
@@ -211,7 +211,7 @@ Credits:: ; 109847
|
||||
.exit_credits
|
||||
call ClearBGPalettes
|
||||
xor a
|
||||
ld [hLCDStatCustom], a
|
||||
ld [hFFC6], a
|
||||
ld [hBGMapAddress], a
|
||||
pop af
|
||||
ld [hVBlank], a
|
||||
@@ -269,20 +269,20 @@ endr
|
||||
|
||||
|
||||
.Jumptable: ; 109937 (42:5937)
|
||||
jumptable_start
|
||||
jumptable ParseCredits
|
||||
jumptable Credits_Next
|
||||
jumptable Credits_Next
|
||||
jumptable Credits_PrepBGMapUpdate
|
||||
jumptable Credits_UpdateGFXRequestPath
|
||||
jumptable Credits_RequestGFX
|
||||
jumptable Credits_LYOverride
|
||||
jumptable Credits_Next
|
||||
jumptable Credits_Next
|
||||
jumptable Credits_Next
|
||||
jumptable Credits_UpdateGFXRequestPath
|
||||
jumptable Credits_RequestGFX
|
||||
jumptable Credits_LoopBack
|
||||
|
||||
dw ParseCredits
|
||||
dw Credits_Next
|
||||
dw Credits_Next
|
||||
dw Credits_PrepBGMapUpdate
|
||||
dw Credits_UpdateGFXRequestPath
|
||||
dw Credits_RequestGFX
|
||||
dw Credits_LYOverride
|
||||
dw Credits_Next
|
||||
dw Credits_Next
|
||||
dw Credits_Next
|
||||
dw Credits_UpdateGFXRequestPath
|
||||
dw Credits_RequestGFX
|
||||
dw Credits_LoopBack
|
||||
|
||||
|
||||
Credits_Next: ; 109951 (42:5951)
|
||||
|
@@ -119,7 +119,7 @@ PlaceGameFreakPresents: ; e4670
|
||||
ld a, [wJumptableIndex]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .jumptable
|
||||
ld hl, .dw
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
@@ -129,7 +129,7 @@ endr
|
||||
jp [hl]
|
||||
; e467f
|
||||
|
||||
.jumptable: ; e467f
|
||||
.dw: ; e467f
|
||||
dw PlaceGameFreakPresents_0
|
||||
dw PlaceGameFreakPresents_1
|
||||
dw PlaceGameFreakPresents_2
|
||||
@@ -625,7 +625,7 @@ IntroScene5: ; e4a7a (39:4a7a)
|
||||
call ClearTileMap
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
ld [hLCDStatCustom], a
|
||||
ld [hFFC6], a
|
||||
ld a, $1
|
||||
ld [rVBK], a
|
||||
ld hl, IntroTilemap005
|
||||
@@ -819,7 +819,7 @@ IntroScene8: ; e4bd3 (39:4bd3)
|
||||
IntroScene9: ; e4c04 (39:4c04)
|
||||
; Set up the next scene (same bg).
|
||||
xor a
|
||||
ld [hLCDStatCustom], a
|
||||
ld [hFFC6], a
|
||||
call ClearSprites
|
||||
hlcoord 0, 0, AttrMap
|
||||
; first 12 rows have palette 1
|
||||
@@ -893,7 +893,7 @@ IntroScene11: ; e4c86 (39:4c86)
|
||||
call ClearTileMap
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
ld [hLCDStatCustom], a
|
||||
ld [hFFC6], a
|
||||
ld a, $1
|
||||
ld [rVBK], a
|
||||
ld hl, IntroTilemap007
|
||||
@@ -2103,7 +2103,7 @@ Intro_ResetLYOverrides: ; e5516 (39:5516)
|
||||
pop af
|
||||
ld [rSVBK], a
|
||||
ld a, $43
|
||||
ld [hLCDStatCustom], a
|
||||
ld [hFFC6], a
|
||||
ret
|
||||
|
||||
Intro_PerspectiveScrollBG: ; e552f (39:552f)
|
||||
|
@@ -1355,7 +1355,7 @@ Function822f0: ; 822f0
|
||||
and 3
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .jumptable
|
||||
ld hl, .dw
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
@@ -1365,7 +1365,7 @@ endr
|
||||
jp [hl]
|
||||
; 82301
|
||||
|
||||
.jumptable: ; 82301
|
||||
.dw: ; 82301
|
||||
dw Function82309
|
||||
dw Function82339
|
||||
dw Function8234b
|
||||
|
@@ -104,7 +104,7 @@ _KrisDecorationMenu: ; 0x2675c
|
||||
ret
|
||||
|
||||
.FindOwndDecos: ; 2683a (9:683a)
|
||||
ld hl, .jumptable
|
||||
ld hl, .dw
|
||||
.loop
|
||||
ld a, [hli]
|
||||
ld e, a
|
||||
@@ -127,7 +127,7 @@ _KrisDecorationMenu: ; 0x2675c
|
||||
ret
|
||||
; 26855 (9:6855)
|
||||
|
||||
.jumptable: ; 26855
|
||||
.dw: ; 26855
|
||||
dwb FindOwnedBeds, 0 ; bed
|
||||
dwb FindOwnedCarpets, 1 ; carpet
|
||||
dwb FindOwnedPlants, 2 ; plant
|
||||
|
@@ -37,9 +37,8 @@ EngineFlagAction:: ; 80430
|
||||
.read
|
||||
ld hl, EngineFlags
|
||||
; location
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
; bit
|
||||
add hl, de
|
||||
|
||||
|
@@ -771,9 +771,8 @@ TryReadSign: ; 96a38
|
||||
push hl
|
||||
call PlayTalkObject
|
||||
pop hl
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
call GetMapScriptHeaderBank
|
||||
call GetFarHalfword
|
||||
call GetMapScriptHeaderBank
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user