mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
jumptable macro repurposed
This commit is contained in:
parent
2bd45ca574
commit
f030315b1f
@ -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
|
||||
|
@ -514,7 +514,7 @@ CmdQueue_Null2: ; 97eb8
|
||||
|
||||
CmdQueue_Type4: ; 97ebc
|
||||
call CmdQueueAnonymousJumptable
|
||||
; anonymous jumptable
|
||||
; anonymous dw
|
||||
dw .zero
|
||||
dw .one
|
||||
; 97ec3
|
||||
@ -560,7 +560,7 @@ CmdQueue_Type4: ; 97ebc
|
||||
|
||||
CmdQueue_Type3: ; 97ef9
|
||||
call CmdQueueAnonymousJumptable
|
||||
; anonymous jumptable
|
||||
; anonymous dw
|
||||
dw .zero
|
||||
dw .one
|
||||
dw .two
|
||||
|
@ -55,7 +55,7 @@ ReturnFromMapSetupScript:: ; b8000
|
||||
ld [rWY], a
|
||||
ld [hWY], a
|
||||
xor a
|
||||
ld [hLCDStatCustom], a
|
||||
ld [hFFC6], a
|
||||
ret
|
||||
; b8064
|
||||
|
||||
@ -126,7 +126,7 @@ PlaceMapNameSign:: ; b8098 (2e:4098)
|
||||
ld [rWY], a
|
||||
ld [hWY], a
|
||||
xor a
|
||||
ld [hLCDStatCustom], a
|
||||
ld [hFFC6], a
|
||||
ret
|
||||
|
||||
|
||||
|
@ -1041,7 +1041,7 @@ StartTitleScreen: ; 6219
|
||||
call ClearScreen
|
||||
call WaitBGMap2
|
||||
xor a
|
||||
ld [hLCDStatCustom], a
|
||||
ld [hFFC6], a
|
||||
ld [hSCX], a
|
||||
ld [hSCY], a
|
||||
ld a, $7
|
||||
@ -1058,17 +1058,16 @@ StartTitleScreen: ; 6219
|
||||
.ok
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .jumptable
|
||||
rept 2
|
||||
ld hl, .dw
|
||||
add hl, de
|
||||
add hl, de
|
||||
endr
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp [hl]
|
||||
; 626a
|
||||
|
||||
.jumptable
|
||||
.dw
|
||||
dw _MainMenu
|
||||
dw DeleteSaveData
|
||||
dw CrystalIntroSequence
|
||||
@ -1113,9 +1112,8 @@ TitleScreenScene: ; 62a3
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .scenes
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@ -1174,7 +1172,7 @@ TitleScreenEntrance: ; 62bc
|
||||
ld hl, wJumptableIndex
|
||||
inc [hl]
|
||||
xor a
|
||||
ld [hLCDStatCustom], a
|
||||
ld [hFFC6], a
|
||||
|
||||
; Play the title screen music.
|
||||
ld de, MUSIC_TITLE
|
||||
@ -1343,22 +1341,19 @@ Function639b: ; unreferenced
|
||||
add hl, bc ; over-the-top compicated way to load wc3ae into hl
|
||||
ld l, [hl]
|
||||
ld h, 0
|
||||
rept 2
|
||||
add hl, hl
|
||||
endr
|
||||
add hl, hl
|
||||
ld de, Data63ca
|
||||
add hl, de
|
||||
; If bit 2 of [wcf65] is set, get the second dw; else, get the first dw
|
||||
ld a, [wcf65]
|
||||
and %00000100
|
||||
rept 2
|
||||
srl a
|
||||
endr
|
||||
srl a
|
||||
ld e, a
|
||||
ld d, 0
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
and a
|
||||
ret z
|
||||
|
@ -54,13 +54,13 @@ MainMenu: ; 49cdc
|
||||
db "MOBILE STUDIUM@"
|
||||
|
||||
.Jumptable: ; 0x49d60
|
||||
jumptable_start
|
||||
jumptable MainMenu_Continue
|
||||
jumptable MainMenu_NewGame
|
||||
jumptable MainMenu_Options
|
||||
jumptable MainMenu_MysteryGift
|
||||
jumptable MainMenu_Mobile
|
||||
jumptable MainMenu_MobileStudium
|
||||
|
||||
dw MainMenu_Continue
|
||||
dw MainMenu_NewGame
|
||||
dw MainMenu_Options
|
||||
dw MainMenu_MysteryGift
|
||||
dw MainMenu_Mobile
|
||||
dw MainMenu_MobileStudium
|
||||
; 0x49d6c
|
||||
|
||||
CONTINUE EQU 0
|
||||
|
@ -233,9 +233,8 @@ Function444d: ; 444d
|
||||
ld a, [hl]
|
||||
ld l, a
|
||||
ld h, 0
|
||||
rept 2
|
||||
add hl,hl
|
||||
endr
|
||||
add hl,hl
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
@ -676,9 +675,8 @@ InitStep: ; 4690
|
||||
add hl, bc
|
||||
bit FIXED_FACING, [hl]
|
||||
jr nz, GetNextTile
|
||||
rept 2
|
||||
add a
|
||||
endr
|
||||
add a
|
||||
and %00001100
|
||||
ld hl, OBJECT_FACING
|
||||
add hl, bc
|
||||
@ -746,9 +744,8 @@ GetStepVector: ; 46e9
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
and %00001111
|
||||
rept 2
|
||||
add a
|
||||
endr
|
||||
add a
|
||||
ld l, a
|
||||
ld h, 0
|
||||
ld de, StepVectors
|
||||
@ -888,7 +885,7 @@ IncrementObjectStructField28: ; 47a2
|
||||
; 47a8
|
||||
|
||||
Object28AnonymousJumptable: ; 47a8
|
||||
; anonymous jumptable
|
||||
; anonymous dw
|
||||
ld hl, OBJECT_28
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
@ -942,35 +939,35 @@ MapObjectMovementPattern: ; 47dd
|
||||
; 47e9
|
||||
|
||||
.Pointers ; 47e9
|
||||
jumptable_start
|
||||
jumptable .Null_00 ; 00
|
||||
jumptable .RandomWalkY ; 01
|
||||
jumptable .RandomWalkX ; 02
|
||||
jumptable .RandomWalkXY ; 03
|
||||
jumptable .RandomSpin1 ; 04
|
||||
jumptable .RandomSpin2 ; 05
|
||||
jumptable .Standing ; 06
|
||||
jumptable .ObeyDPad ; 07
|
||||
jumptable .Movement08 ; 08
|
||||
jumptable .Movement09 ; 09
|
||||
jumptable .Movement0a ; 0a
|
||||
jumptable .Movement0b ; 0b
|
||||
jumptable .Movement0c ; 0c
|
||||
jumptable .Movement0d ; 0d
|
||||
jumptable .Movement0e ; 0e
|
||||
jumptable .Follow ; 0f
|
||||
jumptable .Script ; 10
|
||||
jumptable .Strength ; 11
|
||||
jumptable .FollowNotExact ; 12
|
||||
jumptable .MovementShadow ; 13
|
||||
jumptable .MovementEmote ; 14
|
||||
jumptable .MovementBigStanding ; 15
|
||||
jumptable .MovementBouncing ; 16
|
||||
jumptable .MovementScreenShake ; 17
|
||||
jumptable .MovementSpinClockwise ; 18
|
||||
jumptable .MovementSpinCounterclockwise ; 19
|
||||
jumptable .MovementBoulderDust ; 1a
|
||||
jumptable .MovementShakingGrass ; 1b
|
||||
|
||||
dw .Null_00 ; 00
|
||||
dw .RandomWalkY ; 01
|
||||
dw .RandomWalkX ; 02
|
||||
dw .RandomWalkXY ; 03
|
||||
dw .RandomSpin1 ; 04
|
||||
dw .RandomSpin2 ; 05
|
||||
dw .Standing ; 06
|
||||
dw .ObeyDPad ; 07
|
||||
dw .Movement08 ; 08
|
||||
dw .Movement09 ; 09
|
||||
dw .Movement0a ; 0a
|
||||
dw .Movement0b ; 0b
|
||||
dw .Movement0c ; 0c
|
||||
dw .Movement0d ; 0d
|
||||
dw .Movement0e ; 0e
|
||||
dw .Follow ; 0f
|
||||
dw .Script ; 10
|
||||
dw .Strength ; 11
|
||||
dw .FollowNotExact ; 12
|
||||
dw .MovementShadow ; 13
|
||||
dw .MovementEmote ; 14
|
||||
dw .MovementBigStanding ; 15
|
||||
dw .MovementBouncing ; 16
|
||||
dw .MovementScreenShake ; 17
|
||||
dw .MovementSpinClockwise ; 18
|
||||
dw .MovementSpinCounterclockwise ; 19
|
||||
dw .MovementBoulderDust ; 1a
|
||||
dw .MovementShakingGrass ; 1b
|
||||
; 4821
|
||||
|
||||
.Null_00: ; 4821
|
||||
@ -1390,9 +1387,8 @@ MapObjectMovementPattern: ; 47dd
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .data_4a81
|
||||
rept 2
|
||||
add hl,de
|
||||
endr
|
||||
add hl,de
|
||||
ld d, [hl]
|
||||
inc hl
|
||||
ld e, [hl]
|
||||
@ -1549,33 +1545,33 @@ SetRandomStepDuration: ; 4b2d
|
||||
|
||||
Pointers4b45: ; 4b45
|
||||
; These pointers use OBJECT_STEP_TYPE. See constants/sprite_constants.asm
|
||||
jumptable_start
|
||||
jumptable ObjectMovementReset ; 00
|
||||
jumptable MapObjectMovementPattern ; 01
|
||||
jumptable NPCStep ; 02 npc walk
|
||||
jumptable Function4ddd ; 03
|
||||
jumptable Function4e21 ; 04
|
||||
jumptable Function4e0c ; 05
|
||||
jumptable PlayerStep ; 06 player walk
|
||||
jumptable Function4e47 ; 07
|
||||
jumptable NPCJump ; 08 npc jump step
|
||||
jumptable PlayerJump ; 09 player jump step
|
||||
jumptable PlayerOrNPCHalfStep ; 0a half step
|
||||
jumptable Function4dff ; 0b
|
||||
jumptable TeleportFrom ; 0c teleport from
|
||||
jumptable TeleportTo ; 0d teleport to
|
||||
jumptable Skyfall ; 0e skyfall
|
||||
jumptable Function4ecd ; 0f
|
||||
jumptable GotBiteStep ; 10
|
||||
jumptable RockSmashStep ; 11
|
||||
jumptable ReturnDigStep ; 12
|
||||
jumptable Function4f04 ; 13
|
||||
jumptable Function4f33 ; 14
|
||||
jumptable Function4f33 ; 15
|
||||
jumptable Function4f77 ; 16
|
||||
jumptable Function4f7a ; 17
|
||||
jumptable Function4df0 ; 18
|
||||
jumptable SkyfallTop ; 19
|
||||
|
||||
dw ObjectMovementReset ; 00
|
||||
dw MapObjectMovementPattern ; 01
|
||||
dw NPCStep ; 02 npc walk
|
||||
dw Function4ddd ; 03
|
||||
dw Function4e21 ; 04
|
||||
dw Function4e0c ; 05
|
||||
dw PlayerStep ; 06 player walk
|
||||
dw Function4e47 ; 07
|
||||
dw NPCJump ; 08 npc jump step
|
||||
dw PlayerJump ; 09 player jump step
|
||||
dw PlayerOrNPCHalfStep ; 0a half step
|
||||
dw Function4dff ; 0b
|
||||
dw TeleportFrom ; 0c teleport from
|
||||
dw TeleportTo ; 0d teleport to
|
||||
dw Skyfall ; 0e skyfall
|
||||
dw Function4ecd ; 0f
|
||||
dw GotBiteStep ; 10
|
||||
dw RockSmashStep ; 11
|
||||
dw ReturnDigStep ; 12
|
||||
dw Function4f04 ; 13
|
||||
dw Function4f33 ; 14
|
||||
dw Function4f33 ; 15
|
||||
dw Function4f77 ; 16
|
||||
dw Function4f7a ; 17
|
||||
dw Function4df0 ; 18
|
||||
dw SkyfallTop ; 19
|
||||
; 4b79
|
||||
|
||||
Function4b79: ; 4b79
|
||||
@ -1591,7 +1587,7 @@ Function4b79: ; 4b79
|
||||
|
||||
NPCJump: ; 4b86
|
||||
call Object28AnonymousJumptable
|
||||
; anonymous jumptable
|
||||
; anonymous dw
|
||||
dw Function4b8d
|
||||
dw Function4ba9
|
||||
; 4b8d
|
||||
@ -1628,7 +1624,7 @@ Function4ba9: ; 4ba9
|
||||
|
||||
PlayerJump: ; 4bbf
|
||||
call Object28AnonymousJumptable
|
||||
; anonymous jumptable
|
||||
; anonymous dw
|
||||
dw .initjump
|
||||
dw .stepjump
|
||||
dw .initland
|
||||
@ -1680,7 +1676,7 @@ PlayerJump: ; 4bbf
|
||||
|
||||
TeleportFrom: ; 4c18
|
||||
call Object28AnonymousJumptable
|
||||
; anonymous jumptable
|
||||
; anonymous dw
|
||||
dw Function4c23
|
||||
dw Function4c32
|
||||
dw Function4c42
|
||||
@ -1751,7 +1747,7 @@ Function4c5d: ; 4c5d
|
||||
|
||||
TeleportTo: ; 4c89
|
||||
call Object28AnonymousJumptable
|
||||
; anonymous jumptable
|
||||
; anonymous dw
|
||||
dw Function4c9a
|
||||
dw Function4caa
|
||||
dw Function4cb3
|
||||
@ -1843,7 +1839,7 @@ Function4d01: ; 4d01
|
||||
|
||||
Skyfall: ; 4d14
|
||||
call Object28AnonymousJumptable
|
||||
; anonymous jumptable
|
||||
; anonymous dw
|
||||
dw Function4d1f
|
||||
dw Function4d2e
|
||||
dw Function4d4f
|
||||
@ -1908,7 +1904,7 @@ Function4d6b: ; 4d6b
|
||||
|
||||
GotBiteStep: ; 4d7e
|
||||
call Object28AnonymousJumptable
|
||||
; anonymous jumptable
|
||||
; anonymous dw
|
||||
dw Function4d85
|
||||
dw Function4d94
|
||||
; 4d85
|
||||
@ -2015,7 +2011,7 @@ Function4dff: ; 4dff
|
||||
|
||||
Function4e0c: ; 4e0c
|
||||
call Object28AnonymousJumptable
|
||||
; anonymous jumptable
|
||||
; anonymous dw
|
||||
dw Function4e13
|
||||
dw Function4e21
|
||||
; 4e13
|
||||
@ -2065,7 +2061,7 @@ Function4e47: ; 4e47
|
||||
PlayerStep: ; 4e56
|
||||
; AnimateStep?
|
||||
call Object28AnonymousJumptable
|
||||
; anonymous jumptable
|
||||
; anonymous dw
|
||||
dw .init
|
||||
dw .step
|
||||
; 4e5d
|
||||
@ -2095,7 +2091,7 @@ PlayerStep: ; 4e56
|
||||
|
||||
PlayerOrNPCHalfStep: ; 4e83
|
||||
call Object28AnonymousJumptable
|
||||
; anonymous jumptable
|
||||
; anonymous dw
|
||||
dw .init1
|
||||
dw .step1
|
||||
dw .init2
|
||||
@ -2211,7 +2207,7 @@ Function4f04: ; 4f04
|
||||
|
||||
Function4f33: ; 4f33
|
||||
call Object28AnonymousJumptable
|
||||
; anonymous jumptable
|
||||
; anonymous dw
|
||||
dw Function4f3a
|
||||
dw Function4f43
|
||||
; 4f3a
|
||||
@ -2266,7 +2262,7 @@ Function4f77: ; 4f77
|
||||
|
||||
Function4f7a: ; 4f7a
|
||||
call Object28AnonymousJumptable
|
||||
; anonymous jumptable
|
||||
; anonymous dw
|
||||
dw SkyfallTop
|
||||
dw SkyfallTop
|
||||
dw SkyfallTop
|
||||
@ -2274,7 +2270,7 @@ Function4f7a: ; 4f7a
|
||||
|
||||
SkyfallTop: ; 4f83
|
||||
call Object28AnonymousJumptable
|
||||
; anonymous jumptable
|
||||
; anonymous dw
|
||||
dw Function4f8a
|
||||
dw Function4f99
|
||||
; 4f8a
|
||||
@ -3060,9 +3056,8 @@ SpawnInCustomFacing: ; 57ca
|
||||
ret z
|
||||
ld a, [wPlayerSpriteSetupFlags]
|
||||
and 3
|
||||
rept 2
|
||||
add a
|
||||
endr
|
||||
add a
|
||||
jr ContinueSpawnFacing
|
||||
; 57d9
|
||||
|
||||
@ -3650,9 +3645,8 @@ PRIORITY_HIGH EQU $30
|
||||
ld c, a
|
||||
ld b, 0
|
||||
ld hl, .Addresses
|
||||
rept 2
|
||||
add hl,bc
|
||||
endr
|
||||
add hl,bc
|
||||
ld c, [hl]
|
||||
inc hl
|
||||
ld b, [hl]
|
||||
|
@ -6,9 +6,8 @@ RunMapSetupScript:: ; 15363
|
||||
ld c, a
|
||||
ld b, 0
|
||||
ld hl, MapSetupScripts
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
|
@ -841,12 +841,12 @@ SellMenu: ; 15eb3
|
||||
.TryToSellItem: ; 15ee0
|
||||
callba CheckItemMenu
|
||||
ld a, [wItemAttributeParamBuffer]
|
||||
ld hl, .jumptable
|
||||
ld hl, .dw
|
||||
rst JumpTable
|
||||
ret
|
||||
; 15eee
|
||||
|
||||
.jumptable: ; 15eee
|
||||
.dw: ; 15eee
|
||||
dw .try_sell
|
||||
dw .cant_buy
|
||||
dw .cant_buy
|
||||
|
@ -27,7 +27,7 @@ Function8e83f: ; 8e83f
|
||||
|
||||
Function8e849: ; 8e849
|
||||
ld d, 0
|
||||
ld hl, .jumptable
|
||||
ld hl, .dw
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
@ -38,7 +38,7 @@ endr
|
||||
; 8e854
|
||||
|
||||
|
||||
.jumptable: ; 8e854 (23:6854)
|
||||
.dw: ; 8e854 (23:6854)
|
||||
dw Function8e8d5 ; init
|
||||
dw Function8e961
|
||||
dw Function8e97d
|
||||
|
@ -193,9 +193,8 @@ endr
|
||||
inc de
|
||||
push hl
|
||||
push de
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
call FillPP
|
||||
pop de
|
||||
pop hl
|
||||
@ -636,9 +635,8 @@ SentGetPkmnIntoFromBox: ; db3f
|
||||
ld a, [CurPartySpecies]
|
||||
cp EGG
|
||||
jr z, .egg
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
ld a, [hli]
|
||||
ld [de], a
|
||||
ld a, [hl]
|
||||
@ -1423,9 +1421,8 @@ CalcPkmnStatC: ; e17b
|
||||
ld a, c
|
||||
cp STAT_SDEF
|
||||
jr nz, .not_spdef
|
||||
rept 2
|
||||
dec hl
|
||||
endr
|
||||
dec hl
|
||||
|
||||
.not_spdef
|
||||
sla c
|
||||
@ -1469,9 +1466,8 @@ endr
|
||||
ld b, a
|
||||
ld a, [hli]
|
||||
and $1
|
||||
rept 2
|
||||
add a
|
||||
endr
|
||||
add a
|
||||
add b
|
||||
ld b, a
|
||||
ld a, [hl]
|
||||
@ -1673,9 +1669,8 @@ GivePoke:: ; e277
|
||||
ld a, [ScriptBank]
|
||||
call FarCopyBytes
|
||||
pop hl
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
ld a, [ScriptBank]
|
||||
call GetFarHalfword
|
||||
pop bc
|
||||
|
@ -211,9 +211,8 @@ DoMysteryGift: ; 1048ba (41:48ba)
|
||||
ld hl, sDailyMysteryGiftPartnerIDs ; inc hl
|
||||
ld e, a
|
||||
ld d, $0
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, [wMysteryGiftPartnerID]
|
||||
ld [hli], a
|
||||
ld a, [wMysteryGiftPartnerID + 1]
|
||||
@ -1062,9 +1061,8 @@ Function105033: ; 105033 (41:5033)
|
||||
Function105038: ; 105038 (41:5038)
|
||||
ld a, $20
|
||||
ld [rJOYP], a
|
||||
rept 2
|
||||
ld a, [rJOYP]
|
||||
endr
|
||||
ld a, [rJOYP]
|
||||
cpl
|
||||
and $f
|
||||
swap a
|
||||
|
182
engine/pack.asm
182
engine/pack.asm
@ -28,18 +28,18 @@ Pack: ; 10000
|
||||
; 10030
|
||||
|
||||
.Jumptable: ; 10030 (4:4030)
|
||||
jumptable_start
|
||||
jumptable .InitGFX ; 0
|
||||
jumptable .InitItemsPocket ; 1
|
||||
jumptable .ItemsPocketMenu ; 2
|
||||
jumptable .InitBallsPocket ; 3
|
||||
jumptable .BallsPocketMenu ; 4
|
||||
jumptable .InitKeyItemsPocket ; 5
|
||||
jumptable .KeyItemsPocketMenu ; 6
|
||||
jumptable .InitTMHMPocket ; 7
|
||||
jumptable .TMHMPocketMenu ; 8
|
||||
jumptable Pack_QuitNoScript ; 9
|
||||
jumptable Pack_QuitRunScript ; 10
|
||||
|
||||
dw .InitGFX ; 0
|
||||
dw .InitItemsPocket ; 1
|
||||
dw .ItemsPocketMenu ; 2
|
||||
dw .InitBallsPocket ; 3
|
||||
dw .BallsPocketMenu ; 4
|
||||
dw .InitKeyItemsPocket ; 5
|
||||
dw .KeyItemsPocketMenu ; 6
|
||||
dw .InitTMHMPocket ; 7
|
||||
dw .TMHMPocketMenu ; 8
|
||||
dw Pack_QuitNoScript ; 9
|
||||
dw Pack_QuitRunScript ; 10
|
||||
|
||||
.InitGFX: ; 10046 (4:4046)
|
||||
xor a
|
||||
@ -163,9 +163,9 @@ Pack: ; 10000
|
||||
; 0x10137
|
||||
|
||||
.Jumptable1: ; 10137
|
||||
jumptable_start
|
||||
jumptable .UseItem
|
||||
jumptable QuitItemSubmenu
|
||||
|
||||
dw .UseItem
|
||||
dw QuitItemSubmenu
|
||||
|
||||
; 1013b
|
||||
|
||||
@ -328,12 +328,12 @@ MenuDataHeader_UsableKeyItem: ; 0x10249
|
||||
; 0x1026a
|
||||
|
||||
Jumptable_UseGiveTossRegisterQuit: ; 1026a
|
||||
jumptable_start
|
||||
jumptable UseItem
|
||||
jumptable GiveItem
|
||||
jumptable TossMenu
|
||||
jumptable RegisterItem
|
||||
jumptable QuitItemSubmenu
|
||||
|
||||
dw UseItem
|
||||
dw GiveItem
|
||||
dw TossMenu
|
||||
dw RegisterItem
|
||||
dw QuitItemSubmenu
|
||||
; 10274
|
||||
|
||||
MenuDataHeader_UsableItem: ; 0x10274
|
||||
@ -354,11 +354,11 @@ MenuDataHeader_UsableItem: ; 0x10274
|
||||
; 0x10291
|
||||
|
||||
Jumptable_UseGiveTossQuit: ; 10291
|
||||
jumptable_start
|
||||
jumptable UseItem
|
||||
jumptable GiveItem
|
||||
jumptable TossMenu
|
||||
jumptable QuitItemSubmenu
|
||||
|
||||
dw UseItem
|
||||
dw GiveItem
|
||||
dw TossMenu
|
||||
dw QuitItemSubmenu
|
||||
; 10299
|
||||
|
||||
MenuDataHeader_UnusableItem: ; 0x10299
|
||||
@ -377,9 +377,9 @@ MenuDataHeader_UnusableItem: ; 0x10299
|
||||
; 0x102ac
|
||||
|
||||
Jumptable_UseQuit: ; 102ac
|
||||
jumptable_start
|
||||
jumptable UseItem
|
||||
jumptable QuitItemSubmenu
|
||||
|
||||
dw UseItem
|
||||
dw QuitItemSubmenu
|
||||
; 102b0
|
||||
|
||||
MenuDataHeader_UnusableKeyItem: ; 0x102b0
|
||||
@ -399,10 +399,10 @@ MenuDataHeader_UnusableKeyItem: ; 0x102b0
|
||||
; 0x102c7
|
||||
|
||||
Jumptable_UseRegisterQuit: ; 102c7
|
||||
jumptable_start
|
||||
jumptable UseItem
|
||||
jumptable RegisterItem
|
||||
jumptable QuitItemSubmenu
|
||||
|
||||
dw UseItem
|
||||
dw RegisterItem
|
||||
dw QuitItemSubmenu
|
||||
; 102cd
|
||||
|
||||
MenuDataHeader_HoldableKeyItem: ; 0x102cd
|
||||
@ -423,11 +423,11 @@ MenuDataHeader_HoldableKeyItem: ; 0x102cd
|
||||
; 0x102ea
|
||||
|
||||
Jumptable_GiveTossRegisterQuit: ; 102ea
|
||||
jumptable_start
|
||||
jumptable GiveItem
|
||||
jumptable TossMenu
|
||||
jumptable RegisterItem
|
||||
jumptable QuitItemSubmenu
|
||||
|
||||
dw GiveItem
|
||||
dw TossMenu
|
||||
dw RegisterItem
|
||||
dw QuitItemSubmenu
|
||||
; 102f2
|
||||
|
||||
MenuDataHeader_HoldableItem: ; 0x102f2
|
||||
@ -447,30 +447,30 @@ MenuDataHeader_HoldableItem: ; 0x102f2
|
||||
; 0x1030b
|
||||
|
||||
Jumptable_GiveTossQuit: ; 1030b
|
||||
jumptable_start
|
||||
jumptable GiveItem
|
||||
jumptable TossMenu
|
||||
jumptable QuitItemSubmenu
|
||||
|
||||
dw GiveItem
|
||||
dw TossMenu
|
||||
dw QuitItemSubmenu
|
||||
|
||||
; 10311
|
||||
|
||||
UseItem: ; 10311
|
||||
callba CheckItemMenu
|
||||
ld a, [wItemAttributeParamBuffer]
|
||||
ld hl, .jumptable
|
||||
ld hl, .dw
|
||||
rst JumpTable
|
||||
ret
|
||||
; 1031f
|
||||
|
||||
.jumptable: ; 1031f (4:431f)
|
||||
jumptable_start
|
||||
jumptable .Oak
|
||||
jumptable .Oak
|
||||
jumptable .Oak
|
||||
jumptable .Oak
|
||||
jumptable .Current
|
||||
jumptable .Party
|
||||
jumptable .Field
|
||||
.dw: ; 1031f (4:431f)
|
||||
|
||||
dw .Oak
|
||||
dw .Oak
|
||||
dw .Oak
|
||||
dw .Oak
|
||||
dw .Current
|
||||
dw .Party
|
||||
dw .Field
|
||||
; 1035c
|
||||
|
||||
.Oak: ; 1032d (4:432d)
|
||||
@ -694,18 +694,18 @@ BattlePack: ; 10493
|
||||
; 104c3
|
||||
|
||||
.Jumptable: ; 104c3 (4:44c3)
|
||||
jumptable_start
|
||||
jumptable .InitGFX ; 0
|
||||
jumptable .InitItemsPocket ; 1
|
||||
jumptable .ItemsPocketMenu ; 2
|
||||
jumptable .InitBallsPocket ; 3
|
||||
jumptable .BallsPocketMenu ; 4
|
||||
jumptable .InitKeyItemsPocket ; 5
|
||||
jumptable .KeyItemsPocketMenu ; 6
|
||||
jumptable .InitTMHMPocket ; 7
|
||||
jumptable .TMHMPocketMenu ; 8
|
||||
jumptable Pack_QuitNoScript ; 9
|
||||
jumptable Pack_QuitRunScript ; 10
|
||||
|
||||
dw .InitGFX ; 0
|
||||
dw .InitItemsPocket ; 1
|
||||
dw .ItemsPocketMenu ; 2
|
||||
dw .InitBallsPocket ; 3
|
||||
dw .BallsPocketMenu ; 4
|
||||
dw .InitKeyItemsPocket ; 5
|
||||
dw .KeyItemsPocketMenu ; 6
|
||||
dw .InitTMHMPocket ; 7
|
||||
dw .TMHMPocketMenu ; 8
|
||||
dw Pack_QuitNoScript ; 9
|
||||
dw Pack_QuitRunScript ; 10
|
||||
|
||||
.InitGFX: ; 104d9 (4:44d9)
|
||||
xor a
|
||||
@ -865,9 +865,9 @@ TMHMSubmenu: ; 105dc (4:45dc)
|
||||
; 0x10614
|
||||
|
||||
.UsableJumptable: ; 10614
|
||||
jumptable_start
|
||||
jumptable .Use
|
||||
jumptable .Quit
|
||||
|
||||
dw .Use
|
||||
dw .Quit
|
||||
; 10618
|
||||
|
||||
.UnusableMenuDataHeader: ; 0x10618
|
||||
@ -885,8 +885,8 @@ TMHMSubmenu: ; 105dc (4:45dc)
|
||||
; 0x10627
|
||||
|
||||
.UnusableJumptable: ; 10627
|
||||
jumptable_start
|
||||
jumptable .Quit
|
||||
|
||||
dw .Quit
|
||||
; 10629
|
||||
|
||||
.Use: ; 10629
|
||||
@ -897,14 +897,14 @@ TMHMSubmenu: ; 105dc (4:45dc)
|
||||
ret
|
||||
|
||||
.ItemFunctionJumptable: ; 10637 (4:4637)
|
||||
jumptable_start
|
||||
jumptable .Oak
|
||||
jumptable .Oak
|
||||
jumptable .Oak
|
||||
jumptable .Oak
|
||||
jumptable .Unused
|
||||
jumptable .BattleField
|
||||
jumptable .BattleOnly
|
||||
|
||||
dw .Oak
|
||||
dw .Oak
|
||||
dw .Oak
|
||||
dw .Oak
|
||||
dw .Unused
|
||||
dw .BattleField
|
||||
dw .BattleOnly
|
||||
|
||||
.Oak: ; 10645 (4:4645)
|
||||
ld hl, Text_ThisIsntTheTime
|
||||
@ -942,7 +942,7 @@ TMHMSubmenu: ; 105dc (4:45dc)
|
||||
cp $2
|
||||
jr z, .didnt_use_item
|
||||
.quit_run_script: ; 1067e (4:467e)
|
||||
ld a, Pack_QuitRunScriptTableIndex
|
||||
ld a, 10
|
||||
ld [wJumptableIndex], a
|
||||
ret
|
||||
|
||||
@ -1002,11 +1002,11 @@ DepositSellPack: ; 106be
|
||||
; 106d1
|
||||
|
||||
.Jumptable: ; 106d1 (4:46d1)
|
||||
jumptable_start
|
||||
jumptable .ItemsPocket
|
||||
jumptable .BallsPocket
|
||||
jumptable .KeyItemsPocket
|
||||
jumptable .TMHMPocket
|
||||
|
||||
dw .ItemsPocket
|
||||
dw .BallsPocket
|
||||
dw .KeyItemsPocket
|
||||
dw .TMHMPocket
|
||||
.ItemsPocket: ; 106d9 (4:46d9)
|
||||
xor a
|
||||
call InitPocket
|
||||
@ -1142,18 +1142,18 @@ TutorialPack: ; 107bb
|
||||
|
||||
.RunJumptable: ; 107d7
|
||||
ld a, [wJumptableIndex]
|
||||
ld hl, .jumptable
|
||||
ld hl, .dw
|
||||
call Pack_GetJumptablePointer
|
||||
jp [hl]
|
||||
|
||||
; 107e1
|
||||
|
||||
.jumptable: ; 107e1 (4:47e1)
|
||||
jumptable_start
|
||||
jumptable .Items
|
||||
jumptable .Balls
|
||||
jumptable .KeyItems
|
||||
jumptable .TMHM
|
||||
.dw: ; 107e1 (4:47e1)
|
||||
|
||||
dw .Items
|
||||
dw .Balls
|
||||
dw .KeyItems
|
||||
dw .TMHM
|
||||
|
||||
.Items: ; 107e9 (4:47e9)
|
||||
xor a
|
||||
@ -1351,7 +1351,7 @@ Pack_InterpretJoypad: ; 108d4 (4:48d4)
|
||||
ret
|
||||
|
||||
.b_button
|
||||
ld a, Pack_QuitNoScriptTableIndex
|
||||
ld a, 9
|
||||
ld [wJumptableIndex], a
|
||||
scf
|
||||
ret
|
||||
|
@ -59,19 +59,19 @@ HandlePlayerStep: ; d4e5 (3:54e5)
|
||||
ret
|
||||
|
||||
.Jumptable: ; d4f2 (3:54f2)
|
||||
jumptable_start
|
||||
jumptable GetMovementPermissions
|
||||
jumptable BufferScreen
|
||||
jumptable .mobile
|
||||
jumptable .fail2
|
||||
|
||||
dw GetMovementPermissions
|
||||
dw BufferScreen
|
||||
dw .mobile
|
||||
dw .fail2
|
||||
; The rest are never used. Ever.
|
||||
jumptable .fail1
|
||||
jumptable .fail1
|
||||
jumptable .fail1
|
||||
jumptable .fail1
|
||||
jumptable .fail1
|
||||
jumptable .fail1
|
||||
jumptable .fail1
|
||||
dw .fail1
|
||||
dw .fail1
|
||||
dw .fail1
|
||||
dw .fail1
|
||||
dw .fail1
|
||||
dw .fail1
|
||||
dw .fail1
|
||||
|
||||
.fail1: ; d508 (3:5508)
|
||||
ret
|
||||
|
@ -472,14 +472,14 @@ Function158cc: ; 0x158cc
|
||||
ld [wSpriteUpdatesEnabled], a
|
||||
callba CheckItemMenu
|
||||
ld a, [wItemAttributeParamBuffer]
|
||||
ld hl, .jumptable
|
||||
ld hl, .dw
|
||||
rst JumpTable
|
||||
pop af
|
||||
ld [wSpriteUpdatesEnabled], a
|
||||
ret
|
||||
; 0x158e7
|
||||
|
||||
.jumptable: ; 0x158e7
|
||||
.dw: ; 0x158e7
|
||||
dw .tossable
|
||||
dw .no_toss
|
||||
dw .no_toss
|
||||
|
@ -32,27 +32,27 @@ endr
|
||||
|
||||
|
||||
.Jumptable: ; 84031 (21:4031)
|
||||
jumptable_start
|
||||
jumptable Function84077
|
||||
jumptable Function84143
|
||||
jumptable Function84120
|
||||
jumptable Function84099
|
||||
jumptable Function84180
|
||||
jumptable Function8412e
|
||||
jumptable Function840c5
|
||||
jumptable Function84180
|
||||
jumptable Function84120
|
||||
jumptable Function840de
|
||||
jumptable Function84180
|
||||
jumptable Function84120
|
||||
jumptable Function841a1
|
||||
jumptable Function84063
|
||||
jumptable Function8406d
|
||||
jumptable Function84120
|
||||
jumptable Function84103
|
||||
jumptable Function84071
|
||||
jumptable Function841b0
|
||||
jumptable Function841b3
|
||||
|
||||
dw Function84077
|
||||
dw Function84143
|
||||
dw Function84120
|
||||
dw Function84099
|
||||
dw Function84180
|
||||
dw Function8412e
|
||||
dw Function840c5
|
||||
dw Function84180
|
||||
dw Function84120
|
||||
dw Function840de
|
||||
dw Function84180
|
||||
dw Function84120
|
||||
dw Function841a1
|
||||
dw Function84063
|
||||
dw Function8406d
|
||||
dw Function84120
|
||||
dw Function84103
|
||||
dw Function84071
|
||||
dw Function841b0
|
||||
dw Function841b3
|
||||
|
||||
|
||||
Function84059: ; 84059 (21:4059)
|
||||
@ -443,39 +443,39 @@ _PrinterReceive:: ; 842db
|
||||
|
||||
|
||||
.Jumptable: ; 842ea (21:42ea)
|
||||
jumptable_start
|
||||
jumptable Function8432f
|
||||
jumptable Function84330
|
||||
jumptable Function84339
|
||||
jumptable Function84343
|
||||
jumptable Function8434d
|
||||
jumptable Function84357
|
||||
jumptable Function84361
|
||||
jumptable Function8438b
|
||||
jumptable Function84395
|
||||
jumptable Function8439f
|
||||
jumptable Function843a8
|
||||
jumptable Function843b6
|
||||
jumptable Function84330
|
||||
jumptable Function843c0
|
||||
jumptable Function843c9
|
||||
jumptable Function843c9
|
||||
jumptable Function843c9
|
||||
jumptable Function843c0
|
||||
jumptable Function843c9
|
||||
jumptable Function8439f
|
||||
jumptable Function843a8
|
||||
jumptable Function843e6
|
||||
jumptable Function84330
|
||||
jumptable Function843d2
|
||||
jumptable Function843c9
|
||||
jumptable Function843c9
|
||||
jumptable Function843c9
|
||||
jumptable Function843d2
|
||||
jumptable Function843c9
|
||||
jumptable Function8439f
|
||||
jumptable Function843a8
|
||||
jumptable Function843b6
|
||||
|
||||
dw Function8432f
|
||||
dw Function84330
|
||||
dw Function84339
|
||||
dw Function84343
|
||||
dw Function8434d
|
||||
dw Function84357
|
||||
dw Function84361
|
||||
dw Function8438b
|
||||
dw Function84395
|
||||
dw Function8439f
|
||||
dw Function843a8
|
||||
dw Function843b6
|
||||
dw Function84330
|
||||
dw Function843c0
|
||||
dw Function843c9
|
||||
dw Function843c9
|
||||
dw Function843c9
|
||||
dw Function843c0
|
||||
dw Function843c9
|
||||
dw Function8439f
|
||||
dw Function843a8
|
||||
dw Function843e6
|
||||
dw Function84330
|
||||
dw Function843d2
|
||||
dw Function843c9
|
||||
dw Function843c9
|
||||
dw Function843c9
|
||||
dw Function843d2
|
||||
dw Function843c9
|
||||
dw Function8439f
|
||||
dw Function843a8
|
||||
dw Function843b6
|
||||
|
||||
|
||||
Function8432a: ; 8432a (21:432a)
|
||||
|
@ -862,9 +862,8 @@ Script_trainertext: ; 9710f
|
||||
ld c, a
|
||||
ld b, 0
|
||||
ld hl, WalkingX
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@ -1127,9 +1126,8 @@ Script_faceplayer: ; 9722e
|
||||
ld e, a
|
||||
callba GetRelativeFacing
|
||||
ld a, d
|
||||
rept 2
|
||||
add a
|
||||
endr
|
||||
add a
|
||||
ld e, a
|
||||
ld a, [hLastTalked]
|
||||
ld d, a
|
||||
@ -1162,9 +1160,8 @@ Script_faceperson: ; 97248
|
||||
pop bc
|
||||
ret c
|
||||
ld a, d
|
||||
rept 2
|
||||
add a
|
||||
endr
|
||||
add a
|
||||
ld e, a
|
||||
ld d, c
|
||||
call ApplyPersonFacing
|
||||
@ -1185,9 +1182,8 @@ Script_spriteface: ; 97274
|
||||
.ok
|
||||
ld d, a
|
||||
call GetScriptByte
|
||||
rept 2
|
||||
add a
|
||||
endr
|
||||
add a
|
||||
ld e, a
|
||||
call ApplyPersonFacing
|
||||
ret
|
||||
|
@ -211,42 +211,28 @@ endr
|
||||
; 92844
|
||||
|
||||
SlotsJumptable: ; 92844 (24:6844)
|
||||
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 .Jumptable, wJumptableIndex
|
||||
|
||||
; 92853 (24:6853)
|
||||
|
||||
|
||||
.Jumptable: ; 92853 (24:6853)
|
||||
jumptable_start
|
||||
jumptable Slots_Init ; 00
|
||||
jumptable Slots_BetAndStart ; 01
|
||||
jumptable Slots_WaitStart ; 02
|
||||
jumptable Slots_WaitReel1 ; 03
|
||||
jumptable Slots_WaitStopReel1 ; 04
|
||||
jumptable Slots_WaitReel2 ; 05
|
||||
jumptable Slots_WaitStopReel2 ; 06
|
||||
jumptable Slots_WaitReel3 ; 07
|
||||
jumptable Slots_WaitStopReel3 ; 08
|
||||
jumptable Slots_Next ; 09
|
||||
jumptable Slots_Next ; 0a
|
||||
jumptable Slots_Next ; 0b
|
||||
jumptable Slots_FlashIfWin ; 0c
|
||||
jumptable Slots_FlashScreen ; 0d
|
||||
jumptable Slots_GiveEarnedCoins ; 0e
|
||||
jumptable Slots_PayoutTextAndAnim ; 0f
|
||||
jumptable Slots_PayoutAnim ; 10
|
||||
jumptable Slots_RestartOrQuit ; 11
|
||||
jumptable Slots_Quit ; 12
|
||||
.Jumptable
|
||||
dw Slots_Init ; 00
|
||||
dw Slots_BetAndStart ; 01
|
||||
dw Slots_WaitStart ; 02
|
||||
dw Slots_WaitReel1 ; 03
|
||||
dw Slots_WaitStopReel1 ; 04
|
||||
dw Slots_WaitReel2 ; 05
|
||||
dw Slots_WaitStopReel2 ; 06
|
||||
dw Slots_WaitReel3 ; 07
|
||||
dw Slots_WaitStopReel3 ; 08
|
||||
dw Slots_Next ; 09
|
||||
dw Slots_Next ; 0a
|
||||
dw Slots_Next ; 0b
|
||||
dw Slots_FlashIfWin ; 0c
|
||||
dw Slots_FlashScreen ; 0d
|
||||
dw Slots_GiveEarnedCoins ; 0e
|
||||
dw Slots_PayoutTextAndAnim ; 0f
|
||||
dw Slots_PayoutAnim ; 10
|
||||
dw Slots_RestartOrQuit ; 11
|
||||
dw Slots_Quit ; 12
|
||||
|
||||
Slots_Next: ; 92879 (24:6879)
|
||||
ld hl, wJumptableIndex
|
||||
@ -265,7 +251,7 @@ Slots_Init: ; 9287e (24:687e)
|
||||
Slots_BetAndStart: ; 9288e (24:688e)
|
||||
call Slots_AskBet
|
||||
jr nc, .proceed
|
||||
ld a, Slots_QuitTableIndex
|
||||
ld a, 18
|
||||
ld [wJumptableIndex], a
|
||||
ret
|
||||
|
||||
@ -275,7 +261,7 @@ Slots_BetAndStart: ; 9288e (24:688e)
|
||||
call Slots_InitBias
|
||||
ld a, 32
|
||||
ld [wcf64], a
|
||||
ld a, 4 ; ReelAction_NormalRateTableIndex
|
||||
ld a, 4
|
||||
ld [wReel1ReelAction], a
|
||||
ld [wReel2ReelAction], a
|
||||
ld [wReel3ReelAction], a
|
||||
@ -455,12 +441,12 @@ Slots_RestartOrQuit: ; 929d9 (24:69d9)
|
||||
call WaitPressAorB_BlinkCursor
|
||||
call Slots_AskPlayAgain
|
||||
jr c, .exit_slots
|
||||
ld a, Slots_InitTableIndex
|
||||
ld a, 0
|
||||
ld [wJumptableIndex], a
|
||||
ret
|
||||
|
||||
.exit_slots
|
||||
ld a, Slots_QuitTableIndex
|
||||
ld a, 18
|
||||
ld [wJumptableIndex], a
|
||||
ret
|
||||
|
||||
@ -804,10 +790,9 @@ Function92bd4: ; 92bd4 (24:6bd4)
|
||||
add hl, bc
|
||||
ld e, [hl]
|
||||
ld d, 0
|
||||
ld hl, .jumptable
|
||||
rept 2
|
||||
ld hl, .dw
|
||||
add hl, de
|
||||
add hl, de
|
||||
endr
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@ -815,40 +800,33 @@ endr
|
||||
|
||||
; 92be4 (24:6be4)
|
||||
|
||||
.jumptable: ; 92be4
|
||||
jumptable_start
|
||||
jumptable ReelAction_DoNothing ; 00
|
||||
jumptable Slots_StopReelIgnoreJoypad ; 01
|
||||
|
||||
jumptable ReelAction_QuadrupleRate ; 02
|
||||
jumptable ReelAction_DoubleRate ; 03
|
||||
jumptable ReelAction_NormalRate ; 04
|
||||
jumptable ReelAction_HalfRate ; 05
|
||||
jumptable ReelAction_QuarterRate ; 06
|
||||
|
||||
jumptable ReelAction_StopReel1 ; 07
|
||||
jumptable ReelAction_StopReel2 ; 08
|
||||
jumptable ReelAction_StopReel3 ; 09
|
||||
|
||||
jumptable ReelAction_SetUpReel2SkipTo7 ; 0a
|
||||
jumptable ReelAction_WaitReel2SkipTo7 ; 0b
|
||||
jumptable ReelAction_FastSpinReel2UntilLinedUp7s ; 0c
|
||||
|
||||
jumptable ReelAction_BoringReelDrops ; 0d
|
||||
jumptable ReelAction_CheckDropReel ; 0e
|
||||
jumptable ReelAction_WaitDropReel ; 0f
|
||||
|
||||
jumptable ReelAction_StartSlowAdvanceReel3 ; 10
|
||||
jumptable ReelAction_WaitSlowAdvanceReel3 ; 11
|
||||
|
||||
jumptable ReelAction_InitGolem ; 12
|
||||
jumptable ReelAction_WaitGolem ; 13
|
||||
jumptable ReelAction_EndGolem ; 14
|
||||
|
||||
jumptable Slots_InitChansey ; 15
|
||||
jumptable ReelAction_WaitChansey ; 16
|
||||
jumptable ReelAction_WaitEgg ; 17
|
||||
jumptable ReelAction_DropReel ; 18
|
||||
.dw: ; 92be4
|
||||
|
||||
dw ReelAction_DoNothing ; 00
|
||||
dw Slots_StopReelIgnoreJoypad ; 01
|
||||
dw ReelAction_QuadrupleRate ; 02
|
||||
dw ReelAction_DoubleRate ; 03
|
||||
dw ReelAction_NormalRate ; 04
|
||||
dw ReelAction_HalfRate ; 05
|
||||
dw ReelAction_QuarterRate ; 06
|
||||
dw ReelAction_StopReel1 ; 07
|
||||
dw ReelAction_StopReel2 ; 08
|
||||
dw ReelAction_StopReel3 ; 09
|
||||
dw ReelAction_SetUpReel2SkipTo7 ; 0a
|
||||
dw ReelAction_WaitReel2SkipTo7 ; 0b
|
||||
dw ReelAction_FastSpinReel2UntilLinedUp7s ; 0c
|
||||
dw ReelAction_BoringReelDrops ; 0d
|
||||
dw ReelAction_CheckDropReel ; 0e
|
||||
dw ReelAction_WaitDropReel ; 0f
|
||||
dw ReelAction_StartSlowAdvanceReel3 ; 10
|
||||
dw ReelAction_WaitSlowAdvanceReel3 ; 11
|
||||
dw ReelAction_InitGolem ; 12
|
||||
dw ReelAction_WaitGolem ; 13
|
||||
dw ReelAction_EndGolem ; 14
|
||||
dw Slots_InitChansey ; 15
|
||||
dw ReelAction_WaitChansey ; 16
|
||||
dw ReelAction_WaitEgg ; 17
|
||||
dw ReelAction_DropReel ; 18
|
||||
; 92c16
|
||||
|
||||
ReelAction_DoNothing: ; 92c16
|
||||
@ -1205,9 +1183,8 @@ ReelAction_DropReel: ; 92dca
|
||||
ld [hl], $0
|
||||
ld hl, wReel1ReelAction - wReel1
|
||||
add hl, bc
|
||||
rept 2
|
||||
dec [hl]
|
||||
endr
|
||||
dec [hl]
|
||||
ld a, $1
|
||||
ld [wcf64], a
|
||||
ret
|
||||
@ -1327,9 +1304,8 @@ Slots_CheckMatchedFirstTwoReels: ; 92e94
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .Jumptable
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@ -1347,11 +1323,11 @@ endr
|
||||
; 92ebd
|
||||
|
||||
.Jumptable: ; 92ebd
|
||||
jumptable_start
|
||||
jumptable .zero
|
||||
jumptable .one
|
||||
jumptable .two
|
||||
jumptable .three
|
||||
|
||||
dw .zero
|
||||
dw .one
|
||||
dw .two
|
||||
dw .three
|
||||
; 92ec5
|
||||
|
||||
.three: ; 92ec5
|
||||
@ -1439,9 +1415,8 @@ Slots_CheckMatchedAllThreeReels: ; 92f1d
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .Jumptable
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@ -1463,11 +1438,11 @@ endr
|
||||
; 92f48
|
||||
|
||||
.Jumptable: ; 92f48
|
||||
jumptable_start
|
||||
jumptable .zero
|
||||
jumptable .one
|
||||
jumptable .two
|
||||
jumptable .three
|
||||
|
||||
dw .zero
|
||||
dw .one
|
||||
dw .two
|
||||
dw .three
|
||||
; 92f50
|
||||
|
||||
.three: ; 92f50
|
||||
@ -1978,19 +1953,18 @@ SlotMachine_AnimateGolem: ; 9321d (24:721d)
|
||||
ld e, [hl]
|
||||
ld d, 0
|
||||
ld hl, .Jumptable
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp [hl]
|
||||
|
||||
.Jumptable: ; 9322d (24:722d)
|
||||
jumptable_start
|
||||
jumptable .init
|
||||
jumptable .fall
|
||||
jumptable .roll
|
||||
|
||||
dw .init
|
||||
dw .fall
|
||||
dw .roll
|
||||
|
||||
|
||||
.init: ; 93233 (24:7233)
|
||||
@ -2051,9 +2025,8 @@ endr
|
||||
ld hl, SPRITEANIMSTRUCT_XOFFSET
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
rept 2
|
||||
inc [hl]
|
||||
endr
|
||||
inc [hl]
|
||||
cp 9 * 8
|
||||
jr nc, .restart
|
||||
and $3
|
||||
@ -2081,19 +2054,18 @@ Slots_AnimateChansey: ; 932ac (24:72ac)
|
||||
ld e, [hl]
|
||||
ld d, 0
|
||||
ld hl, .Jumptable
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp [hl]
|
||||
|
||||
.Jumptable: ; 932bc (24:72bc)
|
||||
jumptable_start
|
||||
jumptable .walk
|
||||
jumptable .one
|
||||
jumptable .two
|
||||
|
||||
dw .walk
|
||||
dw .one
|
||||
dw .two
|
||||
|
||||
|
||||
.walk: ; 932c2 (24:72c2)
|
||||
|
@ -4,53 +4,51 @@ DoAnimFrame: ; 8d24b
|
||||
ld e, [hl]
|
||||
ld d, 0
|
||||
ld hl, .Jumptable
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp [hl]
|
||||
; 8d25b
|
||||
|
||||
|
||||
.Jumptable: ; 8d25b (23:525b)
|
||||
jumptable_start
|
||||
jumptable .Null ; null
|
||||
jumptable .one ; bouncing mon icon
|
||||
jumptable .two ; bouncing mon icon, selected
|
||||
jumptable .three ; bouncing mon icon, menu open
|
||||
jumptable .four
|
||||
jumptable .five
|
||||
jumptable .GameFreakLogo ; Game Freak logo
|
||||
jumptable .seven
|
||||
jumptable .eight
|
||||
jumptable .SlotsGolem ; Something to do with slots
|
||||
jumptable .SlotsChansey ; Something to do with slots
|
||||
jumptable .SlotsChanseyEgg ; Something to do with slots
|
||||
jumptable .twelve ; blinking cursor
|
||||
jumptable .thirteen
|
||||
jumptable .fourteen
|
||||
jumptable .fifteen
|
||||
jumptable .sixteen
|
||||
jumptable .seventeen
|
||||
jumptable .eighteen
|
||||
jumptable .EggShell ; finish egg hatching animation
|
||||
jumptable .RadioTuningKnob ; radio tuning knob
|
||||
jumptable .twentyone ; cut grass leaves
|
||||
jumptable .FlyFrom ; flying sprite
|
||||
jumptable .FlyLeaf ; flying leaves
|
||||
jumptable .FlyTo ; fly to
|
||||
jumptable .twentyfive
|
||||
jumptable .twentysix
|
||||
jumptable .twentyseven
|
||||
jumptable .twentyeight
|
||||
jumptable .twentynine ; intro suicune
|
||||
jumptable .thirty ; intro pichu wooper
|
||||
jumptable .thirtyone ; celebi
|
||||
jumptable .thirtytwo ; intro unown
|
||||
jumptable .thirtythree ; intro unown F with suicune leaping up
|
||||
jumptable .thirtyfour ; intro suicune facing away from us
|
||||
|
||||
dw .Null ; null
|
||||
dw .one ; bouncing mon icon
|
||||
dw .two ; bouncing mon icon, selected
|
||||
dw .three ; bouncing mon icon, menu open
|
||||
dw .four
|
||||
dw .five
|
||||
dw .GameFreakLogo ; Game Freak logo
|
||||
dw .seven
|
||||
dw .eight
|
||||
dw .SlotsGolem ; Something to do with slots
|
||||
dw .SlotsChansey ; Something to do with slots
|
||||
dw .SlotsChanseyEgg ; Something to do with slots
|
||||
dw .twelve ; blinking cursor
|
||||
dw .thirteen
|
||||
dw .fourteen
|
||||
dw .fifteen
|
||||
dw .sixteen
|
||||
dw .seventeen
|
||||
dw .eighteen
|
||||
dw .EggShell ; finish egg hatching animation
|
||||
dw .RadioTuningKnob ; radio tuning knob
|
||||
dw .twentyone ; cut grass leaves
|
||||
dw .FlyFrom ; flying sprite
|
||||
dw .FlyLeaf ; flying leaves
|
||||
dw .FlyTo ; fly to
|
||||
dw .twentyfive
|
||||
dw .twentysix
|
||||
dw .twentyseven
|
||||
dw .twentyeight
|
||||
dw .twentynine ; intro suicune
|
||||
dw .thirty ; intro pichu wooper
|
||||
dw .thirtyone ; celebi
|
||||
dw .thirtytwo ; intro unown
|
||||
dw .thirtythree ; intro unown F with suicune leaping up
|
||||
dw .thirtyfour ; intro suicune facing away from us
|
||||
|
||||
|
||||
.Null: ; 8d2a1 (23:52a1)
|
||||
@ -135,11 +133,11 @@ endr
|
||||
ret
|
||||
|
||||
.four: ; 8d302 (23:5302)
|
||||
call .anonymous_jumptable
|
||||
call .anonymous_dw
|
||||
jp [hl]
|
||||
; 8d306 (23:5306)
|
||||
|
||||
; Anonymous jumptable (see .anonymous_jumptable)
|
||||
; Anonymous dw (see .anonymous_dw)
|
||||
dw .four_zero
|
||||
dw .four_one
|
||||
; 8d30a
|
||||
@ -237,9 +235,8 @@ endr
|
||||
ld a, [hl]
|
||||
and a
|
||||
jr z, .asm_8d3ba
|
||||
rept 2
|
||||
dec [hl]
|
||||
endr
|
||||
dec [hl]
|
||||
ld d, a
|
||||
and $1f
|
||||
jr nz, .asm_8d395
|
||||
@ -420,11 +417,11 @@ endr
|
||||
ret
|
||||
|
||||
.sixteen: ; 8d483 (23:5483)
|
||||
call .anonymous_jumptable
|
||||
call .anonymous_dw
|
||||
jp [hl]
|
||||
; 8d487 (23:5487)
|
||||
|
||||
; Anonymous jumptable (see .anonymous_jumptable)
|
||||
; Anonymous dw (see .anonymous_dw)
|
||||
dw .sixteen_zero
|
||||
dw .sixteen_one
|
||||
dw .sixteen_two
|
||||
@ -554,9 +551,8 @@ endr
|
||||
ld hl, SPRITEANIMSTRUCT_XCOORD
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
rept 2
|
||||
inc [hl]
|
||||
endr
|
||||
inc [hl]
|
||||
cp $b0
|
||||
jr nc, .asm_8d53f
|
||||
and $3
|
||||
@ -669,9 +665,8 @@ endr
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_YCOORD
|
||||
add hl, bc
|
||||
rept 2
|
||||
dec [hl]
|
||||
endr
|
||||
dec [hl]
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0F
|
||||
add hl, bc
|
||||
@ -699,9 +694,8 @@ endr
|
||||
ld a, [hl]
|
||||
cp -9 * 8
|
||||
jr nc, .delete_leaf
|
||||
rept 2
|
||||
inc [hl]
|
||||
endr
|
||||
inc [hl]
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_YCOORD
|
||||
add hl, bc
|
||||
@ -732,9 +726,8 @@ endr
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_YCOORD
|
||||
add hl, bc
|
||||
rept 2
|
||||
inc [hl]
|
||||
endr
|
||||
inc [hl]
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0F
|
||||
add hl, bc
|
||||
@ -861,7 +854,7 @@ endr
|
||||
callba UpdateCelebiPosition
|
||||
ret
|
||||
|
||||
.anonymous_jumptable: ; 8d6c5 (23:56c5)
|
||||
.anonymous_dw: ; 8d6c5 (23:56c5)
|
||||
ld hl, [sp+$0]
|
||||
ld e, [hl]
|
||||
inc hl
|
||||
|
@ -46,7 +46,7 @@ DoNextFrameForAllSprites: ; 8cf7a
|
||||
ld b, h
|
||||
push hl
|
||||
push de
|
||||
call DoAnimFrame ; Uses a massive jumptable
|
||||
call DoAnimFrame ; Uses a massive dw
|
||||
call UpdateAnimFrame
|
||||
pop de
|
||||
pop hl
|
||||
@ -86,7 +86,7 @@ DoNextFrameForFirst16Sprites: ; 8cfa8 (23:4fa8)
|
||||
ld b, h
|
||||
push hl
|
||||
push de
|
||||
call DoAnimFrame ; Uses a massive jumptable
|
||||
call DoAnimFrame ; Uses a massive dw
|
||||
call UpdateAnimFrame
|
||||
pop de
|
||||
pop hl
|
||||
@ -188,13 +188,11 @@ endr
|
||||
ld [hli], a
|
||||
; load 0 into the next four fields
|
||||
xor a
|
||||
rept 2
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hli], a
|
||||
xor a
|
||||
rept 2
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hli], a
|
||||
; load -1 into the next field
|
||||
dec a
|
||||
ld [hli], a
|
||||
@ -478,9 +476,8 @@ GetSpriteAnimFrame: ; 8d132
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_FRAME
|
||||
add hl, bc
|
||||
rept 2
|
||||
dec [hl]
|
||||
endr
|
||||
dec [hl]
|
||||
jr .loop
|
||||
|
||||
.restart
|
||||
@ -505,9 +502,8 @@ endr
|
||||
ld e, [hl]
|
||||
ld d, 0
|
||||
ld hl, SpriteAnimFrameData
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld e, [hl]
|
||||
inc hl
|
||||
ld d, [hl]
|
||||
@ -536,9 +532,8 @@ BrokenGetStdGraphics: ; 8d1ac
|
||||
push hl
|
||||
ld l, a
|
||||
ld h, 0
|
||||
rept 2
|
||||
add hl, hl
|
||||
endr
|
||||
add hl, hl
|
||||
ld de, BrokenStdGFXPointers ; broken 2bpp pointers
|
||||
add hl, de
|
||||
ld c, [hl]
|
||||
@ -635,9 +630,8 @@ Sprites_Sine: ; 8e72c
|
||||
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]
|
||||
@ -677,9 +671,8 @@ AnimateEndOfExpBar: ; 8e79d
|
||||
call .AnimateFrame
|
||||
call DelayFrame
|
||||
pop bc
|
||||
rept 2
|
||||
inc d
|
||||
endr
|
||||
inc d
|
||||
dec c
|
||||
jr nz, .loop
|
||||
call ClearSprites
|
||||
|
@ -50,9 +50,8 @@ StartMenu:: ; 125cd
|
||||
ld hl, .MenuReturns
|
||||
ld e, a
|
||||
ld d, 0
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@ -235,9 +234,8 @@ endr
|
||||
push de
|
||||
ld a, [MenuSelection]
|
||||
call .GetMenuAccountTextPointer
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
ld a, [hli]
|
||||
ld d, [hl]
|
||||
ld e, a
|
||||
|
@ -100,15 +100,15 @@ StatsScreenBattle: ; 4dcf7
|
||||
; 4dd2a
|
||||
|
||||
StatsScreenPointerTable: ; 4dd2a
|
||||
jumptable_start
|
||||
jumptable MonStatsInit ; regular pokémon
|
||||
jumptable EggStatsInit ; egg
|
||||
jumptable StatsScreenWaitCry
|
||||
jumptable EggStatsJoypad
|
||||
jumptable StatsScreen_LoadPage
|
||||
jumptable StatsScreenWaitCry
|
||||
jumptable MonStatsJoypad
|
||||
jumptable StatsScreen_Exit
|
||||
|
||||
dw MonStatsInit ; regular pokémon
|
||||
dw EggStatsInit ; egg
|
||||
dw StatsScreenWaitCry
|
||||
dw EggStatsJoypad
|
||||
dw StatsScreen_LoadPage
|
||||
dw StatsScreenWaitCry
|
||||
dw MonStatsJoypad
|
||||
dw StatsScreen_Exit
|
||||
; 4dd3a
|
||||
|
||||
|
||||
@ -157,12 +157,12 @@ MonStatsInit: ; 4dd72 (13:5d72)
|
||||
call StatsScreen_InitUpperHalf
|
||||
ld hl, wcf64
|
||||
set 4, [hl]
|
||||
ld h, StatsScreen_LoadPageTableIndex
|
||||
ld h, 4
|
||||
call StatsScreen_SetJumptableIndex
|
||||
ret
|
||||
|
||||
.egg
|
||||
ld h, EggStatsInitTableIndex
|
||||
ld h, 1
|
||||
call StatsScreen_SetJumptableIndex
|
||||
ret
|
||||
|
||||
@ -178,7 +178,7 @@ EggStatsInit: ; 4dda1
|
||||
EggStatsJoypad: ; 4ddac (13:5dac)
|
||||
call StatsScreen_GetJoypad
|
||||
jr nc, .check
|
||||
ld h, MonStatsInitTableIndex
|
||||
ld h, 0
|
||||
call StatsScreen_SetJumptableIndex
|
||||
ret
|
||||
|
||||
@ -189,7 +189,7 @@ EggStatsJoypad: ; 4ddac (13:5dac)
|
||||
jp StatsScreen_JoypadAction
|
||||
|
||||
.quit
|
||||
ld h, StatsScreen_ExitTableIndex
|
||||
ld h, 7
|
||||
call StatsScreen_SetJumptableIndex
|
||||
ret
|
||||
|
||||
@ -205,7 +205,7 @@ StatsScreen_LoadPage: ; 4ddc6 (13:5dc6)
|
||||
MonStatsJoypad: ; 4ddd6 (13:5dd6)
|
||||
call StatsScreen_GetJoypad
|
||||
jr nc, .next
|
||||
ld h, MonStatsInitTableIndex
|
||||
ld h, 0
|
||||
call StatsScreen_SetJumptableIndex
|
||||
ret
|
||||
|
||||
@ -360,17 +360,17 @@ StatsScreen_JoypadAction: ; 4de54 (13:5e54)
|
||||
and %11111100
|
||||
or c
|
||||
ld [wcf64], a
|
||||
ld h, StatsScreen_LoadPageTableIndex
|
||||
ld h, 4
|
||||
call StatsScreen_SetJumptableIndex
|
||||
ret
|
||||
|
||||
.load_mon
|
||||
ld h, MonStatsInitTableIndex
|
||||
ld h, 0
|
||||
call StatsScreen_SetJumptableIndex
|
||||
ret
|
||||
|
||||
.b_button: ; 4dee4 (13:5ee4)
|
||||
ld h, StatsScreen_ExitTableIndex
|
||||
ld h, 7
|
||||
call StatsScreen_SetJumptableIndex
|
||||
ret
|
||||
|
||||
@ -535,10 +535,10 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
|
||||
ret
|
||||
|
||||
.Jumptable: ; 4e00d (13:600d)
|
||||
jumptable_start
|
||||
jumptable .PinkPage
|
||||
jumptable .GreenPage
|
||||
jumptable .BluePage
|
||||
|
||||
dw .PinkPage
|
||||
dw .GreenPage
|
||||
dw .BluePage
|
||||
|
||||
|
||||
.PinkPage: ; 4e013 (13:6013)
|
||||
|
@ -189,7 +189,7 @@ _TitleScreen: ; 10ed67
|
||||
|
||||
; Let LCD Stat know we're messing around with SCX
|
||||
ld a, rSCX - rJOYP
|
||||
ld [hLCDStatCustom], a
|
||||
ld [hFFC6], a
|
||||
|
||||
pop af
|
||||
ld [rSVBK], a
|
||||
|
@ -188,8 +188,8 @@ endr
|
||||
; e12d9
|
||||
|
||||
.Jumptable: ; e12d9
|
||||
jumptable_start
|
||||
jumptable .Function
|
||||
|
||||
dw .Function
|
||||
; e12db
|
||||
|
||||
.Function: ; e12db
|
||||
|
@ -273,9 +273,8 @@ PrintDayCareText: ; 1689b
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .TextTable
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@ -780,9 +779,8 @@ DayCare_InitBreeding: ; 16a3b
|
||||
ld hl, wEggMonHappiness
|
||||
ld [hli], a
|
||||
xor a
|
||||
rept 2
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hli], a
|
||||
ld [hl], a
|
||||
ld a, [CurPartyLevel]
|
||||
ld [wEggMonLevel], a
|
||||
|
@ -163,7 +163,7 @@ OWCutJumptable: ; 8ca0c
|
||||
ld a, [wJumptableIndex]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .jumptable
|
||||
ld hl, .dw
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
@ -174,7 +174,7 @@ endr
|
||||
; 8ca1b
|
||||
|
||||
|
||||
.jumptable: ; 8ca1b (23:4a1b)
|
||||
.dw: ; 8ca1b (23:4a1b)
|
||||
dw Cut_SpawnAnimateTree
|
||||
dw Cut_SpawnAnimateLeaves
|
||||
dw Cut_StartWaiting
|
||||
|
@ -61,9 +61,9 @@ Special_MagnetTrain: ; 8cc04
|
||||
ld [hVBlank], a
|
||||
call ClearBGPalettes
|
||||
xor a
|
||||
ld [hLCDStatCustom], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld [hFFC6], a
|
||||
ld [hFFC7], a
|
||||
ld [hFFC8], a
|
||||
ld [hSCX], a
|
||||
ld [Requested2bppSource], a
|
||||
ld [Requested2bppSource + 1], a
|
||||
@ -254,7 +254,7 @@ MagnetTrain_InitLYOverrides: ; 8cda6
|
||||
ld a, [wMagnetTrainInitPosition]
|
||||
call ByteFill
|
||||
ld a, $43
|
||||
ld [hLCDStatCustom], a
|
||||
ld [hFFC6], a
|
||||
ret
|
||||
; 8cdc3
|
||||
|
||||
@ -306,14 +306,14 @@ endr
|
||||
; 8ce06
|
||||
|
||||
.Jumptable: ; 8ce06
|
||||
jumptable_start
|
||||
jumptable .InitPlayerSpriteAnim
|
||||
jumptable .WaitScene
|
||||
jumptable .MoveTrain1
|
||||
jumptable .WaitScene
|
||||
jumptable .MoveTrain2
|
||||
jumptable .WaitScene
|
||||
jumptable .TrainArrived
|
||||
|
||||
dw .InitPlayerSpriteAnim
|
||||
dw .WaitScene
|
||||
dw .MoveTrain1
|
||||
dw .WaitScene
|
||||
dw .MoveTrain2
|
||||
dw .WaitScene
|
||||
dw .TrainArrived
|
||||
; 8ce14
|
||||
|
||||
.Next: ; 8ce14
|
||||
|
@ -22,7 +22,7 @@ Special_BankOfMom: ; 16218
|
||||
ld a, [wJumptableIndex]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .jumptable
|
||||
ld hl, .dw
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
@ -32,17 +32,17 @@ endr
|
||||
jp [hl]
|
||||
; 16242
|
||||
|
||||
.jumptable: ; 16242
|
||||
jumptable_start
|
||||
jumptable .CheckIfBankInitialized
|
||||
jumptable .InitializeBank
|
||||
jumptable .IsThisAboutYourMoney
|
||||
jumptable .AccessBankOfMom
|
||||
jumptable .StoreMoney
|
||||
jumptable .TakeMoney
|
||||
jumptable .StopOrStartSavingMoney
|
||||
jumptable .AskDST
|
||||
jumptable .JustDoWhatYouCan
|
||||
.dw: ; 16242
|
||||
|
||||
dw .CheckIfBankInitialized
|
||||
dw .InitializeBank
|
||||
dw .IsThisAboutYourMoney
|
||||
dw .AccessBankOfMom
|
||||
dw .StoreMoney
|
||||
dw .TakeMoney
|
||||
dw .StopOrStartSavingMoney
|
||||
dw .AskDST
|
||||
dw .JustDoWhatYouCan
|
||||
; 16254
|
||||
|
||||
.CheckIfBankInitialized: ; 16254
|
||||
|
23
home.asm
23
home.asm
@ -926,9 +926,8 @@ GetPokemonName:: ; 343b
|
||||
ld e, a
|
||||
ld h, 0
|
||||
ld l, a
|
||||
rept 2
|
||||
add hl, hl ; hl = hl * 4
|
||||
endr
|
||||
add hl, hl ; hl = hl * 4
|
||||
add hl, de ; hl = (hl*4) + de
|
||||
add hl, hl ; hl = (5*hl) + (5*hl)
|
||||
ld de, PokemonNames
|
||||
@ -1295,9 +1294,8 @@ HandleStoneQueue:: ; 3567
|
||||
inc hl
|
||||
|
||||
.next_inc2
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
jr .loop2
|
||||
|
||||
.nope3
|
||||
@ -1929,7 +1927,7 @@ INCLUDE "home/battle.asm"
|
||||
|
||||
Function3b0c:: ; 3b0c
|
||||
|
||||
ld a, [hLCDStatCustom]
|
||||
ld a, [hFFC6]
|
||||
and a
|
||||
ret z
|
||||
|
||||
@ -1992,12 +1990,10 @@ Function3eea:: ; 3eea
|
||||
push bc
|
||||
ld de, AttrMap - TileMap
|
||||
add hl, de
|
||||
rept 2
|
||||
inc b
|
||||
endr
|
||||
rept 2
|
||||
inc b
|
||||
inc c
|
||||
inc c
|
||||
endr
|
||||
call Function3f35
|
||||
pop bc
|
||||
pop hl
|
||||
@ -2021,12 +2017,10 @@ Function3f0d:: ; 3f0d
|
||||
push bc
|
||||
ld de, AttrMap - TileMap
|
||||
add hl, de
|
||||
rept 2
|
||||
inc b
|
||||
endr
|
||||
rept 2
|
||||
inc b
|
||||
inc c
|
||||
inc c
|
||||
endr
|
||||
call Function3f35
|
||||
pop bc
|
||||
pop hl
|
||||
@ -2147,9 +2141,8 @@ Function3f9f:: ; 3f9f
|
||||
ld c, $8
|
||||
.asm_3fa5
|
||||
ld a, [de]
|
||||
rept 2
|
||||
inc de
|
||||
endr
|
||||
inc de
|
||||
cpl
|
||||
ld [hl], $0
|
||||
inc hl
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
Function547:: ; 547
|
||||
; Unreferenced
|
||||
ld a, [hLCDStatCustom]
|
||||
ld a, [hFFC6]
|
||||
cp rSCX - $ff00
|
||||
ret nz
|
||||
ld c, a
|
||||
@ -15,7 +15,7 @@ Function547:: ; 547
|
||||
|
||||
LCD:: ; 552
|
||||
push af
|
||||
ld a, [hLCDStatCustom]
|
||||
ld a, [hFFC6]
|
||||
and a
|
||||
jr z, .done
|
||||
|
||||
@ -26,7 +26,7 @@ LCD:: ; 552
|
||||
ld b, LYOverrides >> 8
|
||||
ld a, [bc]
|
||||
ld b, a
|
||||
ld a, [hLCDStatCustom]
|
||||
ld a, [hFFC6]
|
||||
ld c, a
|
||||
ld a, b
|
||||
ld [$ff00+c], a
|
||||
|
@ -214,13 +214,11 @@ Coord2Tile:: ; 1d05
|
||||
ld a, c
|
||||
ld b, h
|
||||
ld c, l
|
||||
rept 2
|
||||
add hl, hl
|
||||
endr
|
||||
add hl, hl
|
||||
add hl, bc
|
||||
rept 2
|
||||
add hl, hl
|
||||
endr
|
||||
add hl, hl
|
||||
ld c, a
|
||||
xor a
|
||||
ld b, a
|
||||
@ -244,13 +242,11 @@ Coord2Attr:: ; 1d21
|
||||
ld a, c
|
||||
ld b, h
|
||||
ld c, l
|
||||
rept 2
|
||||
add hl, hl
|
||||
endr
|
||||
add hl, hl
|
||||
add hl, bc
|
||||
rept 2
|
||||
add hl, hl
|
||||
endr
|
||||
add hl, hl
|
||||
ld c, a
|
||||
xor a
|
||||
ld b, a
|
||||
|
@ -77,9 +77,8 @@ endr
|
||||
|
||||
; We've done 2 16x8 blocks
|
||||
ld a, [hFFDC]
|
||||
rept 2
|
||||
dec a
|
||||
endr
|
||||
dec a
|
||||
ld [hFFDC], a
|
||||
|
||||
jr nz, .next
|
||||
|
5
hram.asm
5
hram.asm
@ -76,8 +76,9 @@ hFFC1 EQU $ffc1
|
||||
hFFC2 EQU $ffc2
|
||||
hMoneyTemp EQU $ffc3
|
||||
|
||||
hLCDStatCustom EQU $ffc6
|
||||
|
||||
hFFC6 EQU $ffc6
|
||||
hFFC7 EQU $ffc7
|
||||
hFFC8 EQU $ffc8
|
||||
hMobileReceive EQU $ffc9
|
||||
hFFCA EQU $ffca
|
||||
hLinkPlayerNumber EQU $ffcb
|
||||
|
@ -1614,11 +1614,11 @@ GetItemHealingAction: ; f058 (3:7058)
|
||||
; f09e
|
||||
|
||||
StatusHealer_Jumptable: ; f09e (3:709e)
|
||||
ld hl, .jumptable
|
||||
ld hl, .dw
|
||||
rst JumpTable
|
||||
ret
|
||||
|
||||
.jumptable: ; f0a3 (3:70a3)
|
||||
.dw: ; f0a3 (3:70a3)
|
||||
dw StatusHealer_ClearPalettes
|
||||
dw StatusHealer_NoEffect
|
||||
dw StatusHealer_ExitMenu
|
||||
|
@ -74,7 +74,7 @@ Function110029: ; 110029 (44:4029)
|
||||
|
||||
Function110030:: ; 110030 (44:4030)
|
||||
; Use the byte at $c988 as a parameter
|
||||
; for a jumptable.
|
||||
; for a dw.
|
||||
; If [$c988] in {12, 14, 16},
|
||||
; clear [$c835].
|
||||
push de
|
||||
@ -91,7 +91,7 @@ Function110030:: ; 110030 (44:4030)
|
||||
.noreset
|
||||
ld d, $0
|
||||
ld e, a
|
||||
ld hl, .jumptable
|
||||
ld hl, .dw
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld [$c988], a
|
||||
@ -114,10 +114,10 @@ Function110030:: ; 110030 (44:4030)
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
ret ; indirectly jump to the function loaded from the jumptable, which returns to Function3e60.
|
||||
ret ; indirectly jump to the function loaded from the dw, which returns to Function3e60.
|
||||
; 110070 (44:4070)
|
||||
|
||||
.jumptable: ; 110070
|
||||
.dw: ; 110070
|
||||
dw Function110115
|
||||
dw Function110236
|
||||
dw Function110291
|
||||
|
30
macros.asm
30
macros.asm
@ -257,25 +257,15 @@ else
|
||||
endc
|
||||
endm
|
||||
|
||||
jumptable_start: MACRO
|
||||
; Use the declare opname you want to use,
|
||||
; either "dw", "dba", or "dab".
|
||||
if def(__far)
|
||||
purge __far
|
||||
endc
|
||||
if _NARG == 0
|
||||
__far EQUS "dw"
|
||||
else
|
||||
__far EQUS "\1"
|
||||
endc
|
||||
enum_start
|
||||
endm
|
||||
|
||||
jumptable: MACRO
|
||||
if DEF(\1TableIndex)
|
||||
__enum__ = __enum__ + 1
|
||||
else
|
||||
enum \1TableIndex
|
||||
endc
|
||||
__far \1
|
||||
ld a, [\2]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, \1
|
||||
add hl, de
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp [hl]
|
||||
endm
|
||||
|
73
main.asm
73
main.asm
@ -81,7 +81,7 @@ Function6454:: ; 6454
|
||||
|
||||
.Function6473
|
||||
xor a
|
||||
ld [hLCDStatCustom], a
|
||||
ld [hFFC6], a
|
||||
ld [hBGMapMode], a
|
||||
ld a, $90
|
||||
ld [hWY], a
|
||||
@ -1045,12 +1045,12 @@ CheckObjectEnteringVisibleRange:: ; 81ca
|
||||
ld a, [wPlayerStepDirection]
|
||||
cp STANDING
|
||||
ret z
|
||||
ld hl, .jumptable
|
||||
ld hl, .dw
|
||||
rst JumpTable
|
||||
ret
|
||||
; 81d6
|
||||
|
||||
.jumptable: ; 81d6
|
||||
.dw: ; 81d6
|
||||
dw .Down
|
||||
dw .Up
|
||||
dw .Left
|
||||
@ -1657,9 +1657,8 @@ _Sine:: ; 84d9
|
||||
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]
|
||||
@ -2061,9 +2060,8 @@ HealPartyMon: ; c677
|
||||
; bc = MON_HP
|
||||
ld b, h
|
||||
ld c, l
|
||||
rept 2
|
||||
dec bc
|
||||
endr
|
||||
dec bc
|
||||
|
||||
ld a, [hli]
|
||||
ld [bc], a
|
||||
@ -2274,10 +2272,10 @@ CutFunction: ; c785
|
||||
; c796
|
||||
|
||||
.Jumptable: ; c796 (3:4796)
|
||||
jumptable_start
|
||||
jumptable .CheckAble
|
||||
jumptable .DoCut
|
||||
jumptable .FailCut
|
||||
|
||||
dw .CheckAble
|
||||
dw .DoCut
|
||||
dw .FailCut
|
||||
|
||||
.CheckAble: ; c79c (3:479c)
|
||||
ld de, ENGINE_HIVEBADGE
|
||||
@ -4457,9 +4455,8 @@ RemoveItemFromPocket: ; d2ff
|
||||
jr nc, .ok ; memory
|
||||
ld c, a
|
||||
ld b, $0
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
ld a, [CurItem]
|
||||
cp [hl]
|
||||
inc hl
|
||||
@ -4493,9 +4490,8 @@ endr
|
||||
dec hl
|
||||
ld b, h
|
||||
ld c, l
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
.loop2
|
||||
ld a, [hli]
|
||||
ld [bc], a
|
||||
@ -6115,9 +6111,8 @@ FindApricornsInBag: ; 24c64
|
||||
ld a, [hl]
|
||||
call .addtobuffer
|
||||
.nope
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
jr .loop
|
||||
|
||||
.done
|
||||
@ -7397,9 +7392,8 @@ DisplayDexEntry: ; 4424d
|
||||
ld d, l
|
||||
ld e, h
|
||||
pop hl
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
ld a, d
|
||||
or e
|
||||
jr z, .skip_height
|
||||
@ -7505,9 +7499,8 @@ GetDexEntryPointer: ; 44333
|
||||
dec a
|
||||
ld d, 0
|
||||
ld e, a
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld e, [hl]
|
||||
inc hl
|
||||
ld d, [hl]
|
||||
@ -7583,9 +7576,8 @@ INCLUDE "engine/init_gender.asm"
|
||||
|
||||
DrawKrisPackGFX: ; 48e81
|
||||
ld hl, PackFGFXPointers
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld e, a
|
||||
ld d, [hl]
|
||||
@ -8068,9 +8060,8 @@ _LoadMapPart:: ; 4d15b
|
||||
ld a, [wMetatileStandingX]
|
||||
and a
|
||||
jr z, .left_column
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
|
||||
.left_column
|
||||
decoord 0, 0
|
||||
@ -8221,12 +8212,10 @@ LinkTextbox2: ; 4d35b
|
||||
pop bc
|
||||
ld de, AttrMap - TileMap
|
||||
add hl, de
|
||||
rept 2
|
||||
inc b
|
||||
endr
|
||||
rept 2
|
||||
inc b
|
||||
inc c
|
||||
inc c
|
||||
endr
|
||||
ld a, $7
|
||||
.row
|
||||
push bc
|
||||
@ -9384,18 +9373,17 @@ CatchTutorial:: ; 4e554
|
||||
ld a, [BattleType]
|
||||
dec a
|
||||
ld c, a
|
||||
ld hl, .jumptable
|
||||
ld hl, .dw
|
||||
ld b, 0
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp [hl]
|
||||
; 4e564
|
||||
|
||||
.jumptable: ; 4e564 (13:6564)
|
||||
.dw: ; 4e564 (13:6564)
|
||||
dw .DudeTutorial
|
||||
dw .DudeTutorial
|
||||
dw .DudeTutorial
|
||||
@ -9453,9 +9441,8 @@ endr
|
||||
ld a, 1
|
||||
ld [hli], a
|
||||
ld a, POKE_BALL ; 5
|
||||
rept 2
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hli], a
|
||||
ld [hl], -1
|
||||
ret
|
||||
; 4e5da (13:65da)
|
||||
@ -9881,9 +9868,8 @@ Function50a28: ; 50a28
|
||||
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
|
||||
@ -9899,7 +9885,6 @@ endr
|
||||
|
||||
Strings50a42: ; 50a42
|
||||
; Untranslated trainer class names from Red.
|
||||
|
||||
dw .Youngster
|
||||
dw .BugCatcher
|
||||
dw .Lass
|
||||
@ -10346,9 +10331,8 @@ Function50cdb: ; unreferenced predef
|
||||
|
||||
PlaceStatusString: ; 50d0a
|
||||
push de
|
||||
rept 2
|
||||
inc de
|
||||
endr
|
||||
inc de
|
||||
ld a, [de]
|
||||
ld b, a
|
||||
inc de
|
||||
@ -10565,9 +10549,8 @@ CalcLevel: ; 50e1b
|
||||
CalcExpAtLevel: ; 50e47
|
||||
; (a/b)*n**3 + c*n**2 + d*n - e
|
||||
ld a, [BaseGrowthRate]
|
||||
rept 2
|
||||
add a
|
||||
endr
|
||||
add a
|
||||
ld c, a
|
||||
ld b, 0
|
||||
ld hl, GrowthRates
|
||||
@ -11991,9 +11974,8 @@ DoStep: ; 8025f
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .Steps
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@ -13088,9 +13070,8 @@ Functione0000: ; e0000
|
||||
call .Decompress
|
||||
ld hl, Unknown_e008b
|
||||
pop bc
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
ld a, [hli]
|
||||
ld e, a
|
||||
ld d, [hl]
|
||||
|
@ -203,7 +203,7 @@ InitBattleTowerChallengeRAM: ; 17021e
|
||||
|
||||
_BattleTowerBattle: ; 17022c
|
||||
.loop
|
||||
call .do_jumptable
|
||||
call .do_dw
|
||||
call DelayFrame
|
||||
ld a, [wBattleTowerBattleEnded]
|
||||
cp $1
|
||||
@ -211,11 +211,11 @@ _BattleTowerBattle: ; 17022c
|
||||
ret
|
||||
; 17023a
|
||||
|
||||
.do_jumptable: ; 17023a
|
||||
.do_dw: ; 17023a
|
||||
ld a, [wBattleTowerBattleEnded]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .jumptable
|
||||
ld hl, .dw
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
@ -225,7 +225,7 @@ endr
|
||||
jp [hl]
|
||||
; 170249
|
||||
|
||||
.jumptable: ; 170249
|
||||
.dw: ; 170249
|
||||
dw RunBattleTowerTrainer
|
||||
dw SkipBattleTowerTrainer
|
||||
; 17024d
|
||||
@ -688,7 +688,7 @@ Function1704e1: ; 1704e1
|
||||
ld a, [wJumptableIndex]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .jumptable
|
||||
ld hl, .dw
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
@ -698,7 +698,7 @@ endr
|
||||
jp [hl]
|
||||
; 17051f
|
||||
|
||||
.jumptable: ; 17051f
|
||||
.dw: ; 17051f
|
||||
dw .Jumptable_0
|
||||
dw .Jumptable_1
|
||||
dw .Jumptable_2
|
||||
@ -945,7 +945,7 @@ BattleTowerAction: ; 170687
|
||||
ld a, [ScriptVar]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .jumptable
|
||||
ld hl, .dw
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
@ -956,7 +956,7 @@ endr
|
||||
; 170696
|
||||
|
||||
|
||||
.jumptable: ; 170696 (5c:4696)
|
||||
.dw: ; 170696 (5c:4696)
|
||||
dw Function17075f ; 0x00
|
||||
dw Function170788 ; 0x01
|
||||
dw Function170778 ; 0x02
|
||||
|
@ -281,9 +281,9 @@ Function11c1ca: ; 11c1ca
|
||||
ld [wcf65], a
|
||||
ld [wcf66], a
|
||||
ld [wcd23], a
|
||||
ld [BGMapBuffer], a
|
||||
ld [wcd20], a
|
||||
ld [wcd21], a
|
||||
ld [CreditsTimer], a
|
||||
ld [wcd22], a
|
||||
ld [wcd35], a
|
||||
ld [wcd2b], a
|
||||
ld a, $ff
|
||||
@ -373,17 +373,7 @@ Function11c283: ; 11c283
|
||||
; 11c2ac
|
||||
|
||||
.DoJumptableFunction: ; 11c2ac
|
||||
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 .Jumptable, wJumptableIndex
|
||||
; 11c2bb
|
||||
|
||||
|
||||
@ -470,12 +460,10 @@ Function11c346: ; 11c346 (47:4346)
|
||||
|
||||
Function11c35f: ; 11c35f (47:435f)
|
||||
ld hl, wcd2f
|
||||
rept 2
|
||||
inc [hl]
|
||||
endr
|
||||
rept 2
|
||||
inc [hl]
|
||||
dec hl
|
||||
dec hl
|
||||
endr
|
||||
dec [hl]
|
||||
push af
|
||||
ld de, wcd2d
|
||||
@ -486,12 +474,10 @@ endr
|
||||
|
||||
Function11c373: ; 11c373 (47:4373)
|
||||
ld hl, wcd30
|
||||
rept 2
|
||||
inc [hl]
|
||||
endr
|
||||
rept 2
|
||||
inc [hl]
|
||||
dec hl
|
||||
dec hl
|
||||
endr
|
||||
dec [hl]
|
||||
push af
|
||||
ld de, wcd2d
|
||||
@ -563,7 +549,7 @@ Function11c3c2: ; 11c3c2 (47:43c2)
|
||||
call Function11cfb5
|
||||
|
||||
Function11c3ed: ; 11c3ed (47:43ed)
|
||||
ld hl, BGMapBuffer ; wcd20 (aliases: CreditsPos)
|
||||
ld hl, wcd20 ; wcd20 (aliases: CreditsPos)
|
||||
ld de, hJoypadPressed ; $ffa3
|
||||
ld a, [de]
|
||||
and $8
|
||||
@ -597,10 +583,10 @@ Function11c3ed: ; 11c3ed (47:43ed)
|
||||
jr .asm_11c475
|
||||
.asm_11c426
|
||||
ld a, $8
|
||||
ld [BGMapBuffer], a ; wcd20 (aliases: CreditsPos)
|
||||
ld [wcd20], a ; wcd20 (aliases: CreditsPos)
|
||||
ret
|
||||
.asm_11c42c
|
||||
ld a, [BGMapBuffer] ; wcd20 (aliases: CreditsPos)
|
||||
ld a, [wcd20] ; wcd20 (aliases: CreditsPos)
|
||||
cp $6
|
||||
jr c, .asm_11c472
|
||||
sub $6
|
||||
@ -689,7 +675,7 @@ Function11c4a5: ; 11c4a5 (47:44a5)
|
||||
ret
|
||||
.asm_11c4b7
|
||||
xor a
|
||||
ld [CreditsTimer], a
|
||||
ld [wcd22], a
|
||||
ld a, $15
|
||||
ret
|
||||
|
||||
@ -780,7 +766,7 @@ Function11c53d: ; 11c53d (47:453d)
|
||||
ld hl, wcd24
|
||||
set 0, [hl]
|
||||
ld a, $8
|
||||
ld [BGMapBuffer], a ; wcd20 (aliases: CreditsPos)
|
||||
ld [wcd20], a ; wcd20 (aliases: CreditsPos)
|
||||
|
||||
.b
|
||||
ld a, $4
|
||||
@ -808,7 +794,7 @@ Function11c53d: ; 11c53d (47:453d)
|
||||
ret
|
||||
|
||||
.asm_11c5ab
|
||||
ld a, [BGMapBuffer] ; wcd20 (aliases: CreditsPos)
|
||||
ld a, [wcd20] ; wcd20 (aliases: CreditsPos)
|
||||
call Function11ca6a
|
||||
call PlayClickSFX
|
||||
ret
|
||||
@ -1131,12 +1117,11 @@ Function11c770: ; 11c770 (47:4770)
|
||||
jr .asm_11c795
|
||||
.asm_11c7ab
|
||||
ld hl, $c68a + 30
|
||||
ld a, [CreditsTimer]
|
||||
ld a, [wcd22]
|
||||
ld c, a
|
||||
ld b, 0
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
ld [wcd28], a
|
||||
jr .asm_11c79f
|
||||
@ -1211,9 +1196,8 @@ Function11c7bc: ; 11c7bc (47:47bc)
|
||||
ld a, [wcd22]
|
||||
ld e, a
|
||||
ld d, $0
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld e, a
|
||||
ld a, [hl]
|
||||
@ -1223,9 +1207,8 @@ endr
|
||||
ld a, [wcd26]
|
||||
ld e, a
|
||||
ld d, $0
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, [wcd26]
|
||||
ld e, a
|
||||
.asm_11c831
|
||||
@ -1368,7 +1351,7 @@ MobileString_Next: ; 11c8f3
|
||||
; 11c8f6
|
||||
|
||||
Function11c8f6: ; 11c8f6 (47:48f6)
|
||||
ld a, [BGMapBuffer] ; wcd20 (aliases: CreditsPos)
|
||||
ld a, [wcd20] ; wcd20 (aliases: CreditsPos)
|
||||
call Function11c95d
|
||||
push hl
|
||||
ld a, [wcd2b]
|
||||
@ -1388,13 +1371,12 @@ Function11c8f6: ; 11c8f6 (47:48f6)
|
||||
push de
|
||||
call Function11c05d
|
||||
pop de
|
||||
ld a, [BGMapBuffer] ; wcd20 (aliases: CreditsPos)
|
||||
ld a, [wcd20] ; wcd20 (aliases: CreditsPos)
|
||||
ld c, a
|
||||
ld b, $0
|
||||
ld hl, wcd36
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
ld [hl], e
|
||||
inc hl
|
||||
ld [hl], d
|
||||
@ -1414,9 +1396,8 @@ endr
|
||||
ld a, [wcd22]
|
||||
ld e, a
|
||||
ld d, $0
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld e, a
|
||||
ld a, [hl]
|
||||
@ -1426,14 +1407,12 @@ endr
|
||||
ld a, [wcd26]
|
||||
ld e, a
|
||||
ld d, $0
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, [wcd25]
|
||||
ld e, a
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld e, a
|
||||
ld a, [hl]
|
||||
@ -1534,7 +1513,7 @@ Function11c9c3: ; 11c9c3 (47:49c3)
|
||||
jr nz, .asm_11c9e9
|
||||
call Function11ca5e
|
||||
xor a
|
||||
ld [BGMapBuffer], a ; wcd20 (aliases: CreditsPos)
|
||||
ld [wcd20], a ; wcd20 (aliases: CreditsPos)
|
||||
.asm_11c9e9
|
||||
ld hl, wcd24
|
||||
set 4, [hl]
|
||||
@ -1621,9 +1600,8 @@ Function11ca6a: ; 11ca6a (47:4a6a)
|
||||
ld hl, wcd36
|
||||
ld c, a
|
||||
ld b, $0
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
ld [hl], b
|
||||
inc hl
|
||||
ld [hl], b
|
||||
@ -1737,9 +1715,8 @@ Function11cb52: ; 11cb52 (47:4b52)
|
||||
.asm_11cb58
|
||||
dec a
|
||||
jr z, .asm_11cb5f
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
jr .asm_11cb58
|
||||
.asm_11cb5f
|
||||
ld a, [hli]
|
||||
@ -1798,9 +1775,8 @@ Function11cb66: ; 11cb66 (47:4b66)
|
||||
.asm_11cbba
|
||||
dec a
|
||||
jr z, .asm_11cbc1
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
jr .asm_11cbba
|
||||
.asm_11cbc1
|
||||
ld a, [hli]
|
||||
@ -2044,7 +2020,7 @@ Function11ce0b: ; 11ce0b (47:4e0b)
|
||||
call Function11cfb5
|
||||
|
||||
Function11ce2b: ; 11ce2b (47:4e2b)
|
||||
ld a, [CreditsTimer]
|
||||
ld a, [wcd22]
|
||||
sla a
|
||||
sla a
|
||||
ld c, a
|
||||
@ -2083,7 +2059,7 @@ Function11ce2b: ; 11ce2b (47:4e2b)
|
||||
ret
|
||||
|
||||
.a
|
||||
ld a, [CreditsTimer]
|
||||
ld a, [wcd22]
|
||||
cp NUM_KANA
|
||||
jr c, .place
|
||||
sub NUM_KANA
|
||||
@ -2096,7 +2072,7 @@ Function11ce2b: ; 11ce2b (47:4e2b)
|
||||
ld hl, wcd24
|
||||
set 0, [hl]
|
||||
ld a, $8
|
||||
ld [BGMapBuffer], a ; wcd20 (aliases: CreditsPos)
|
||||
ld [wcd20], a ; wcd20 (aliases: CreditsPos)
|
||||
.b
|
||||
ld a, $4
|
||||
jr .load
|
||||
@ -2122,7 +2098,7 @@ Function11ce2b: ; 11ce2b (47:4e2b)
|
||||
ret
|
||||
|
||||
.asm_11cea4
|
||||
ld a, [BGMapBuffer] ; wcd20 (aliases: CreditsPos)
|
||||
ld a, [wcd20] ; wcd20 (aliases: CreditsPos)
|
||||
call Function11ca6a
|
||||
call PlayClickSFX
|
||||
ret
|
||||
@ -2137,7 +2113,7 @@ Function11ce2b: ; 11ce2b (47:4e2b)
|
||||
ld a, [hl]
|
||||
cp $ff
|
||||
ret z
|
||||
ld [CreditsTimer], a
|
||||
ld [wcd22], a
|
||||
ret
|
||||
; 11ceb9 (47:4eb9)
|
||||
|
||||
@ -2253,9 +2229,8 @@ Function11cfce: ; 11cfce (47:4fce)
|
||||
ld [hli], a
|
||||
ld a, [de]
|
||||
inc de
|
||||
rept 2
|
||||
dec a
|
||||
endr
|
||||
dec a
|
||||
jr z, .asm_11cff6
|
||||
ld c, a
|
||||
ld a, $7a
|
||||
@ -2271,9 +2246,8 @@ endr
|
||||
add hl, bc
|
||||
ld a, [de]
|
||||
dec de
|
||||
rept 2
|
||||
dec a
|
||||
endr
|
||||
dec a
|
||||
jr z, .asm_11d022
|
||||
ld b, a
|
||||
.asm_11d005
|
||||
@ -2281,9 +2255,8 @@ endr
|
||||
ld a, $7c
|
||||
ld [hli], a
|
||||
ld a, [de]
|
||||
rept 2
|
||||
dec a
|
||||
endr
|
||||
dec a
|
||||
jr z, .asm_11d015
|
||||
ld c, a
|
||||
ld a, $7f
|
||||
@ -2305,9 +2278,8 @@ endr
|
||||
ld a, $7d
|
||||
ld [hli], a
|
||||
ld a, [de]
|
||||
rept 2
|
||||
dec a
|
||||
endr
|
||||
dec a
|
||||
jr z, .asm_11d031
|
||||
ld c, a
|
||||
ld a, $7a
|
||||
@ -2369,9 +2341,8 @@ Function11d035: ; 11d035 (47:5035)
|
||||
ld a, [de]
|
||||
cp $2
|
||||
jr z, .asm_11d082
|
||||
rept 2
|
||||
dec a
|
||||
endr
|
||||
dec a
|
||||
.asm_11d078
|
||||
push af
|
||||
ld a, $7a
|
||||
@ -2397,9 +2368,8 @@ endr
|
||||
cp $2
|
||||
ret z
|
||||
push bc
|
||||
rept 2
|
||||
dec a
|
||||
endr
|
||||
dec a
|
||||
ld c, a
|
||||
ld b, a
|
||||
ld de, $14
|
||||
@ -2429,78 +2399,76 @@ Function11d0ac: ; 11d0ac (47:50ac)
|
||||
ret
|
||||
|
||||
Function11d0b6: ; 11d0b6 (47:50b6)
|
||||
ld hl, $c
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, Jumptable_11d0c7
|
||||
rept 2
|
||||
ld hl, .Jumptable
|
||||
add hl, de
|
||||
add hl, de
|
||||
endr
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp [hl]
|
||||
|
||||
Jumptable_11d0c7: ; 11d0c7 (47:50c7)
|
||||
dw Function11d0dd
|
||||
dw Function11d0e9
|
||||
dw Function11d0f5
|
||||
dw Function11d10f
|
||||
dw Function11d134
|
||||
dw Function11d145
|
||||
dw Function11d156
|
||||
dw Function11d175
|
||||
dw Function11d1d7
|
||||
dw Function11d1d1
|
||||
dw Function11d1fc
|
||||
.Jumptable
|
||||
dw .zero
|
||||
dw .one
|
||||
dw .two
|
||||
dw .three
|
||||
dw .four
|
||||
dw .five
|
||||
dw .six
|
||||
dw .seven
|
||||
dw .eight
|
||||
dw .nine
|
||||
dw .ten
|
||||
|
||||
|
||||
Function11d0dd: ; 11d0dd (47:50dd)
|
||||
ld a, [BGMapBuffer] ; wcd20 (aliases: CreditsPos)
|
||||
.zero: ; 11d0dd (47:50dd)
|
||||
ld a, [wcd20] ; wcd20 (aliases: CreditsPos)
|
||||
sla a
|
||||
ld hl, Unknown_11d208
|
||||
ld e, $1
|
||||
jr asm_11d11e
|
||||
jr .load
|
||||
|
||||
Function11d0e9: ; 11d0e9 (47:50e9)
|
||||
.one: ; 11d0e9 (47:50e9)
|
||||
ld a, [wcd21]
|
||||
sla a
|
||||
ld hl, Unknown_11d21a
|
||||
ld e, $2
|
||||
jr asm_11d11e
|
||||
jr .load
|
||||
|
||||
Function11d0f5: ; 11d0f5 (47:50f5)
|
||||
.two: ; 11d0f5 (47:50f5)
|
||||
ld hl, Unknown_11d2be
|
||||
ld a, [CreditsTimer]
|
||||
ld a, [wcd22]
|
||||
ld e, a
|
||||
ld d, $0
|
||||
add hl, de
|
||||
ld a, [hl]
|
||||
call ReinitSpriteAnimFrame
|
||||
ld a, [CreditsTimer]
|
||||
ld a, [wcd22]
|
||||
sla a
|
||||
ld hl, Unknown_11d23e
|
||||
ld e, $4
|
||||
jr asm_11d11e
|
||||
jr .load
|
||||
|
||||
Function11d10f: ; 11d10f (47:510f)
|
||||
ld a, $27
|
||||
.three: ; 11d10f (47:510f)
|
||||
ld a, SPRITE_ANIM_FRAMESET_27
|
||||
call ReinitSpriteAnimFrame
|
||||
ld a, [wcd25]
|
||||
sla a
|
||||
ld hl, Unknown_11d29e
|
||||
ld e, $8
|
||||
|
||||
asm_11d11e: ; 11d11e (47:511e)
|
||||
.load: ; 11d11e (47:511e)
|
||||
push de
|
||||
ld e, a
|
||||
ld d, $0
|
||||
add hl, de
|
||||
push hl
|
||||
pop de
|
||||
ld hl, $4
|
||||
ld hl, SPRITEANIMSTRUCT_XCOORD
|
||||
add hl, bc
|
||||
ld a, [de]
|
||||
inc de
|
||||
@ -2512,26 +2480,26 @@ asm_11d11e: ; 11d11e (47:511e)
|
||||
call Function11d2ee
|
||||
ret
|
||||
|
||||
Function11d134: ; 11d134 (47:5134)
|
||||
ld a, $27
|
||||
.four: ; 11d134 (47:5134)
|
||||
ld a, SPRITE_ANIM_FRAMESET_27
|
||||
call ReinitSpriteAnimFrame
|
||||
ld a, [wcd2a]
|
||||
sla a
|
||||
ld hl, Unknown_11d2b6
|
||||
ld e, $10
|
||||
jr asm_11d11e
|
||||
jr .load
|
||||
|
||||
Function11d145: ; 11d145 (47:5145)
|
||||
ld a, $27
|
||||
.five: ; 11d145 (47:5145)
|
||||
ld a, SPRITE_ANIM_FRAMESET_27
|
||||
call ReinitSpriteAnimFrame
|
||||
ld a, [wcd2c]
|
||||
sla a
|
||||
ld hl, Unknown_11d2ba
|
||||
ld e, $20
|
||||
jr asm_11d11e
|
||||
jr .load
|
||||
|
||||
Function11d156: ; 11d156 (47:5156)
|
||||
ld a, $2a
|
||||
.six: ; 11d156 (47:5156)
|
||||
ld a, SPRITE_ANIM_FRAMESET_2A
|
||||
call ReinitSpriteAnimFrame
|
||||
ld a, [wcd4a]
|
||||
sla a
|
||||
@ -2548,14 +2516,14 @@ Function11d156: ; 11d156 (47:5156)
|
||||
call Function11d2ee
|
||||
ret
|
||||
|
||||
Function11d175: ; 11d175 (47:5175)
|
||||
.seven: ; 11d175 (47:5175)
|
||||
ld a, [wcd4d]
|
||||
cp $4
|
||||
jr z, .asm_11d180
|
||||
ld a, $28
|
||||
ld a, SPRITE_ANIM_FRAMESET_28
|
||||
jr .asm_11d182
|
||||
.asm_11d180
|
||||
ld a, $26
|
||||
ld a, SPRITE_ANIM_FRAMESET_26
|
||||
.asm_11d182
|
||||
call ReinitSpriteAnimFrame
|
||||
ld a, [wcd4d]
|
||||
@ -2566,7 +2534,7 @@ Function11d175: ; 11d175 (47:5175)
|
||||
sla a
|
||||
sla a
|
||||
add $20
|
||||
ld hl, $4
|
||||
ld hl, SPRITEANIMSTRUCT_XCOORD
|
||||
add hl, bc
|
||||
ld [hli], a
|
||||
ld a, [wcd4d]
|
||||
@ -2590,7 +2558,7 @@ Function11d175: ; 11d175 (47:5175)
|
||||
sla a
|
||||
add e
|
||||
add $18
|
||||
ld hl, $4
|
||||
ld hl, SPRITEANIMSTRUCT_XCOORD
|
||||
add hl, bc
|
||||
ld [hli], a
|
||||
ld a, $8a
|
||||
@ -2600,16 +2568,15 @@ Function11d175: ; 11d175 (47:5175)
|
||||
call Function11d2ee
|
||||
ret
|
||||
|
||||
Function11d1d1: ; 11d1d1 (47:51d1)
|
||||
ld d, $98
|
||||
ld a, $2c
|
||||
jr asm_11d1db
|
||||
.nine: ; 11d1d1 (47:51d1)
|
||||
ld d, -13 * 8
|
||||
ld a, SPRITE_ANIM_FRAMESET_2C
|
||||
jr .eight_nine_load
|
||||
|
||||
Function11d1d7: ; 11d1d7 (47:51d7)
|
||||
ld d, $10
|
||||
ld a, $2b
|
||||
|
||||
asm_11d1db: ; 11d1db (47:51db)
|
||||
.eight: ; 11d1d7 (47:51d7)
|
||||
ld d, 2 * 8
|
||||
ld a, SPRITE_ANIM_FRAMESET_2B
|
||||
.eight_nine_load: ; 11d1db (47:51db)
|
||||
push de
|
||||
call ReinitSpriteAnimFrame
|
||||
ld a, [wcd4a]
|
||||
@ -2619,8 +2586,8 @@ asm_11d1db: ; 11d1db (47:51db)
|
||||
ld e, a
|
||||
sla a
|
||||
add e
|
||||
add $40
|
||||
ld hl, $5
|
||||
add 8 * 8
|
||||
ld hl, SPRITEANIMSTRUCT_YCOORD
|
||||
add hl, bc
|
||||
ld [hld], a
|
||||
pop af
|
||||
@ -2630,8 +2597,8 @@ asm_11d1db: ; 11d1db (47:51db)
|
||||
call Function11d2ee
|
||||
ret
|
||||
|
||||
Function11d1fc: ; 11d1fc (47:51fc)
|
||||
ld a, $26
|
||||
.ten: ; 11d1fc (47:51fc)
|
||||
ld a, SPRITE_ANIM_FRAMESET_26
|
||||
call ReinitSpriteAnimFrame
|
||||
ld a, $8
|
||||
ld e, a
|
||||
@ -3119,9 +3086,8 @@ Function11d4aa: ; 11d4aa
|
||||
ld hl, $0005
|
||||
add hl, de
|
||||
ld a, [bc]
|
||||
rept 2
|
||||
inc bc
|
||||
endr
|
||||
inc bc
|
||||
push bc
|
||||
.asm_11d4cf
|
||||
push af
|
||||
@ -3162,7 +3128,6 @@ endr
|
||||
SortedPokemon:
|
||||
; Pokemon sorted by kana.
|
||||
; Notably, Rhydon is missing.
|
||||
|
||||
dw .a
|
||||
dw .i
|
||||
dw .u
|
||||
|
@ -519,9 +519,8 @@ Mobile12_Bin2Dec: ; 48444 (12:4444)
|
||||
.loop
|
||||
and a
|
||||
jr z, .got_string
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
dec a
|
||||
jr .loop
|
||||
.got_string
|
||||
@ -746,9 +745,8 @@ Function486bf: ; 486bf (12:46bf)
|
||||
pop af
|
||||
ld [hli], a
|
||||
ld a, $1
|
||||
rept 2
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hli], a
|
||||
xor a
|
||||
rept 3
|
||||
ld [hli], a
|
||||
@ -1673,12 +1671,10 @@ Function48cdc: ; 48cdc (12:4cdc)
|
||||
pop bc
|
||||
ld de, AttrMap - TileMap
|
||||
add hl, de
|
||||
rept 2
|
||||
inc b
|
||||
endr
|
||||
rept 2
|
||||
inc b
|
||||
inc c
|
||||
inc c
|
||||
endr
|
||||
ld a, $0
|
||||
.asm_48ced
|
||||
push bc
|
||||
|
@ -1,6 +1,6 @@
|
||||
Function8b342:: ; 8b342
|
||||
; Loads the secondary map header pointer, then runs through a
|
||||
; jumptable with three dummy functions. Spends a lot of energy
|
||||
; dw with three dummy functions. Spends a lot of energy
|
||||
; doing pretty much nothing.
|
||||
call GetSecondaryMapHeaderPointer
|
||||
ld d, h
|
||||
@ -10,7 +10,7 @@ Function8b342:: ; 8b342
|
||||
xor a
|
||||
.loop
|
||||
push af
|
||||
ld hl, .jumptable
|
||||
ld hl, .dw
|
||||
rst JumpTable
|
||||
pop af
|
||||
inc a
|
||||
@ -19,7 +19,7 @@ Function8b342:: ; 8b342
|
||||
ret
|
||||
; 8b354
|
||||
|
||||
.jumptable: ; 8b354
|
||||
.dw: ; 8b354
|
||||
dw .zero
|
||||
dw .one
|
||||
dw .two
|
||||
|
@ -67,7 +67,7 @@ Function100063: ; 100063
|
||||
ld [BGMapBuffer], a
|
||||
xor a
|
||||
ld [hMapAnims], a
|
||||
ld [hLCDStatCustom], a
|
||||
ld [hFFC6], a
|
||||
ret
|
||||
; 100082
|
||||
|
||||
@ -84,7 +84,7 @@ Function100082: ; 100082
|
||||
ld [rIE], a
|
||||
xor a
|
||||
ld [hMapAnims], a
|
||||
ld [hLCDStatCustom], a
|
||||
ld [hFFC6], a
|
||||
ld a, $1
|
||||
ld [hMobileReceive], a
|
||||
ld [hMobile], a
|
||||
@ -118,9 +118,8 @@ Function1000ba: ; 1000ba
|
||||
ld a, [wcd25]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, [wcd22]
|
||||
call GetFarHalfword
|
||||
ld a, [wcd22]
|
||||
@ -1912,9 +1911,8 @@ Function100bc2: ; 100bc2
|
||||
ld a, [wMenuCursorY]
|
||||
ld b, a
|
||||
ld a, [wNumMoves]
|
||||
rept 2
|
||||
inc a
|
||||
endr
|
||||
inc a
|
||||
cp b
|
||||
jp nz, .asm_100bcb
|
||||
ld a, $1
|
||||
@ -4746,9 +4744,8 @@ Function101ee2: ; 101ee2
|
||||
Function101ee4: ; 101ee4
|
||||
ld d, 0
|
||||
ld hl, Unknown_101ef5
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld d, [hl]
|
||||
ld e, a
|
||||
@ -7228,9 +7225,8 @@ endr
|
||||
inc hl
|
||||
push hl
|
||||
|
||||
rept 2
|
||||
add a
|
||||
endr
|
||||
add a
|
||||
|
||||
add Unknown_10327a % $100
|
||||
ld l, a
|
||||
@ -7693,9 +7689,8 @@ Function1035c6: ; 1035c6
|
||||
callba Function10138b
|
||||
ld b, 0
|
||||
ld hl, Unknown_1035d7
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@ -7708,7 +7703,6 @@ Unknown_1035d7: ; 1035d7
|
||||
dw Unknown_103608
|
||||
dw Unknown_103608
|
||||
dw Unknown_1035fe
|
||||
|
||||
dw AskMobileOrCable
|
||||
dw AskMobileOrCable
|
||||
dw AskMobileOrCable
|
||||
@ -8096,9 +8090,8 @@ Function10383c: ; 10383c
|
||||
ld [wdc60], a
|
||||
xor a
|
||||
ld hl, wdc5c
|
||||
rept 2
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hli], a
|
||||
ld [hl], a
|
||||
ld hl, UnknownText_0x103876
|
||||
call PrintText
|
||||
|
@ -382,27 +382,27 @@ endr
|
||||
; 10828a
|
||||
|
||||
.Jumptable: ; 10828a
|
||||
jumptable_start
|
||||
jumptable GetMobileTradeAnimByte ; 00
|
||||
jumptable MobileTradeAnim_ShowPlayerMonToBeSent ; 01
|
||||
jumptable MobileTradeAnim_02 ; 02
|
||||
jumptable MobileTradeAnim_GiveTrademon1 ; 03
|
||||
jumptable MobileTradeAnim_GiveTrademon2 ; 04
|
||||
jumptable MobileTradeAnim_05 ; 05
|
||||
jumptable MobileTradeAnim_06 ; 06
|
||||
jumptable MobileTradeAnim_07 ; 07
|
||||
jumptable MobileTradeAnim_GetTrademon1 ; 08
|
||||
jumptable MobileTradeAnim_GetTrademon2 ; 09
|
||||
jumptable MobileTradeAnim_GetTrademon3 ; 0a
|
||||
jumptable MobileTradeAnim_ShowOTMonFromTrade ; 0b
|
||||
jumptable EndMobileTradeAnim ; 0c
|
||||
jumptable MobileTradeAnim_ShowPlayerMonForGTS ; 0d
|
||||
jumptable MobileTradeAnim_ShowOTMonFromGTS ; 0e
|
||||
jumptable MobileTradeAnim_0f ; 0f
|
||||
jumptable MobileTradeAnim_10 ; 10
|
||||
jumptable MobileTradeAnim_11 ; 11
|
||||
jumptable MobileTradeAnim_FadeToBlack ; 12
|
||||
jumptable MobileTradeAnim_GetOddEgg ; 13 get odd egg
|
||||
|
||||
dw GetMobileTradeAnimByte ; 00
|
||||
dw MobileTradeAnim_ShowPlayerMonToBeSent ; 01
|
||||
dw MobileTradeAnim_02 ; 02
|
||||
dw MobileTradeAnim_GiveTrademon1 ; 03
|
||||
dw MobileTradeAnim_GiveTrademon2 ; 04
|
||||
dw MobileTradeAnim_05 ; 05
|
||||
dw MobileTradeAnim_06 ; 06
|
||||
dw MobileTradeAnim_07 ; 07
|
||||
dw MobileTradeAnim_GetTrademon1 ; 08
|
||||
dw MobileTradeAnim_GetTrademon2 ; 09
|
||||
dw MobileTradeAnim_GetTrademon3 ; 0a
|
||||
dw MobileTradeAnim_ShowOTMonFromTrade ; 0b
|
||||
dw EndMobileTradeAnim ; 0c
|
||||
dw MobileTradeAnim_ShowPlayerMonForGTS ; 0d
|
||||
dw MobileTradeAnim_ShowOTMonFromGTS ; 0e
|
||||
dw MobileTradeAnim_0f ; 0f
|
||||
dw MobileTradeAnim_10 ; 10
|
||||
dw MobileTradeAnim_11 ; 11
|
||||
dw MobileTradeAnim_FadeToBlack ; 12
|
||||
dw MobileTradeAnim_GetOddEgg ; 13 get odd egg
|
||||
; 1082b2
|
||||
|
||||
MobileTradeAnim_Next: ; 1082b2
|
||||
|
@ -564,17 +564,7 @@ Function118473: ; 118473
|
||||
; 1184a5
|
||||
|
||||
Function1184a5: ; 1184a5
|
||||
ld a, [wcf66]
|
||||
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 .Jumptable, wcf66
|
||||
; 1184b4
|
||||
|
||||
.Jumptable: ; 1184b4
|
||||
@ -609,17 +599,7 @@ endr
|
||||
; 1184ec
|
||||
|
||||
Function1184ec: ; 1184ec
|
||||
ld a, [wcf66]
|
||||
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 .Jumptable, wcf66
|
||||
; 1184fb
|
||||
|
||||
.Jumptable: ; 1184fb
|
||||
@ -667,17 +647,7 @@ endr
|
||||
; 11854d
|
||||
|
||||
Function11854d: ; 11854d
|
||||
ld a, [wcf66]
|
||||
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 .Jumptable, wcf66
|
||||
; 11855c
|
||||
|
||||
.Jumptable: ; 11855c
|
||||
@ -700,17 +670,7 @@ endr
|
||||
; 11857c
|
||||
|
||||
Function11857c: ; 11857c
|
||||
ld a, [wcf66]
|
||||
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 .Jumptable, wcf66
|
||||
; 11858b
|
||||
|
||||
.Jumptable: ; 11858b
|
||||
@ -745,17 +705,7 @@ endr
|
||||
; 1185c3
|
||||
|
||||
Function1185c3: ; 1185c3
|
||||
ld a, [wcf66]
|
||||
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 .Jumptable, wcf66
|
||||
; 1185d2
|
||||
|
||||
.Jumptable: ; 1185d2
|
||||
@ -803,17 +753,7 @@ endr
|
||||
; 118624
|
||||
|
||||
Function118624: ; 118624
|
||||
ld a, [wcf66]
|
||||
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 .Jumptable, wcf66
|
||||
; 118633
|
||||
|
||||
.Jumptable: ; 118633
|
||||
@ -851,17 +791,7 @@ endr
|
||||
; 118671
|
||||
|
||||
Function118671: ; 118671
|
||||
ld a, [wcf66]
|
||||
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 .Jumptable, wcf66
|
||||
; 118680
|
||||
|
||||
.Jumptable: ; 118680
|
||||
@ -893,17 +823,7 @@ endr
|
||||
; 1186b2
|
||||
|
||||
Function1186b2: ; 1186b2
|
||||
ld a, [wcf66]
|
||||
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 .Jumptable, wcf66
|
||||
; 1186c1
|
||||
|
||||
.Jumptable: ; 1186c1
|
||||
@ -936,17 +856,7 @@ endr
|
||||
; 1186f5
|
||||
|
||||
Function1186f5: ; 1186f5 (46:46f5)
|
||||
ld a, [wcf66]
|
||||
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 .Jumptable, wcf66
|
||||
; 118704 (46:4704)
|
||||
|
||||
.Jumptable: ; 118704 (46:4704)
|
||||
@ -986,17 +896,7 @@ endr
|
||||
; 118746 (46:4746)
|
||||
|
||||
Function118746: ; 118746
|
||||
ld a, [wcf66]
|
||||
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 .Jumptable, wcf66
|
||||
; 118755
|
||||
|
||||
.Jumptable: ; 118755
|
||||
@ -1627,9 +1527,8 @@ Function118b8c: ; 118b8c
|
||||
jr nz, .asm_118b8c
|
||||
dec hl
|
||||
xor a
|
||||
rept 2
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hli], a
|
||||
ret
|
||||
; 118b9a
|
||||
|
||||
@ -1830,9 +1729,8 @@ asm_118e3e
|
||||
ld a, [hld]
|
||||
cp $2f
|
||||
jr nz, .asm_118e3e
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
ld de, wcd85
|
||||
ld c, $4
|
||||
.asm_118e4a
|
||||
@ -2691,9 +2589,8 @@ Function119413: ; 119413
|
||||
ld c, a
|
||||
ld a, [w3_d000 + 1]
|
||||
ld b, a
|
||||
rept 2
|
||||
dec bc
|
||||
endr
|
||||
dec bc
|
||||
ld hl, wd002
|
||||
ld a, [hli]
|
||||
ld e, a
|
||||
@ -2883,9 +2780,8 @@ endr
|
||||
.asm_119552
|
||||
inc hl
|
||||
.asm_119553
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
jr .asm_11955b
|
||||
.asm_119557
|
||||
ld de, $14
|
||||
@ -3230,9 +3126,8 @@ Function1196f2: ; 1196f2
|
||||
ld a, [hld]
|
||||
cp $58
|
||||
jr z, .asm_11975b
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
ld a, d
|
||||
dec a
|
||||
jr z, .asm_11978e
|
||||
@ -3815,9 +3710,8 @@ Function119b6b: ; 119b6b
|
||||
ld a, [de]
|
||||
cp $d
|
||||
jr nz, .asm_119b85
|
||||
rept 2
|
||||
inc de
|
||||
endr
|
||||
inc de
|
||||
.asm_119b93
|
||||
ld a, [de]
|
||||
inc de
|
||||
@ -4349,28 +4243,19 @@ Function119ed8: ; 119ed8 (46:5ed8)
|
||||
ld [wcd8c], a
|
||||
ld a, $1
|
||||
ld [rSVBK], a
|
||||
call Function119eee
|
||||
|
||||
call .RunJumptable
|
||||
|
||||
ld a, [wcd8c]
|
||||
ld [rSVBK], a
|
||||
ld a, $1
|
||||
ld [hBGMapMode], a
|
||||
ret
|
||||
|
||||
Function119eee: ; 119eee (46:5eee)
|
||||
ld a, [wcd3c]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, Jumptable_119efd
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp [hl]
|
||||
; 119efd (46:5efd)
|
||||
.RunJumptable
|
||||
jumptable .Jumptable, wcd3c
|
||||
|
||||
Jumptable_119efd: ; 119efd
|
||||
.Jumptable
|
||||
dw Function119f3f
|
||||
dw Function119f45
|
||||
dw Function119f56
|
||||
@ -5553,17 +5438,7 @@ endr
|
||||
; 11a8fa
|
||||
|
||||
Function11a8fa: ; 11a8fa
|
||||
ld a, [$c31a]
|
||||
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 .Jumptable, $c31a
|
||||
; 11a909
|
||||
|
||||
.Jumptable: ; 11a909
|
||||
@ -6328,9 +6203,8 @@ asm_11afbd:
|
||||
dec a
|
||||
ld c, a
|
||||
ld b, 0
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
ld a, e
|
||||
ld e, [hl]
|
||||
inc hl
|
||||
@ -6803,9 +6677,8 @@ Function11b236: ; 11b236
|
||||
Function11b239: ; 11b239
|
||||
ld e, a
|
||||
ld d, 0
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@ -7210,20 +7083,9 @@ Function11b45c: ; 11b45c
|
||||
; 11b46a
|
||||
|
||||
Function11b46a: ; 11b46a
|
||||
ld a, [wJumptableIndex]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, Jumptable_11b479
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp [hl]
|
||||
; 11b479
|
||||
jumptable .Jumptable, wJumptableIndex
|
||||
|
||||
Jumptable_11b479: ; 11b479
|
||||
.Jumptable
|
||||
dw Function11b483
|
||||
dw Function11b570
|
||||
dw Function11b5c0
|
||||
@ -7232,7 +7094,7 @@ Jumptable_11b479: ; 11b479
|
||||
; 11b483
|
||||
|
||||
Function11b483: ; 11b483
|
||||
call Function11b538
|
||||
call .InitRAM
|
||||
ld hl, PlayerName
|
||||
ld a, $5 ; Japanese Name Length
|
||||
.loop1
|
||||
@ -7291,9 +7153,8 @@ Function11b483: ; 11b483
|
||||
pop de
|
||||
ld h, d
|
||||
ld l, e
|
||||
rept 2
|
||||
dec hl
|
||||
endr
|
||||
dec hl
|
||||
ld a, [de]
|
||||
ld [hli], a
|
||||
inc de
|
||||
@ -7369,9 +7230,8 @@ endr
|
||||
jr nz, .loop9
|
||||
call CloseSRAM
|
||||
jp Function11ad8a
|
||||
; 11b538
|
||||
|
||||
Function11b538: ; 11b538
|
||||
.InitRAM
|
||||
ld bc, wc626
|
||||
ld a, [PlayerID]
|
||||
ld [wcd2a], a
|
||||
@ -7416,26 +7276,28 @@ Function11b570: ; 11b570
|
||||
ld a, [ScriptVar]
|
||||
and a
|
||||
jr nz, .exit
|
||||
call Function11b585
|
||||
call .SaveData
|
||||
jp Function11ad8a
|
||||
|
||||
.exit
|
||||
ld a, $4
|
||||
ld [wJumptableIndex], a
|
||||
ret
|
||||
; 11b585
|
||||
|
||||
Function11b585: ; 11b585
|
||||
.SaveData
|
||||
ld a, $3
|
||||
ld [rSVBK], a
|
||||
|
||||
ld hl, w3_d800
|
||||
ld de, $c608
|
||||
ld bc, w3_d88f - w3_d800
|
||||
call CopyBytes
|
||||
|
||||
ld a, $1
|
||||
ld [rSVBK], a
|
||||
ld a, $5
|
||||
call GetSRAMBank
|
||||
|
||||
ld de, $a800
|
||||
ld a, $1
|
||||
ld [de], a
|
||||
@ -7443,8 +7305,10 @@ Function11b585: ; 11b585
|
||||
ld hl, $c608
|
||||
ld bc, w3_d88f - w3_d800
|
||||
call CopyBytes
|
||||
|
||||
push de
|
||||
pop hl
|
||||
|
||||
ld a, [hRTCMinutes]
|
||||
ld [hli], a
|
||||
ld a, [hRTCHours]
|
||||
@ -7453,6 +7317,7 @@ Function11b585: ; 11b585
|
||||
ld [hli], a
|
||||
ld a, [hRTCDayHi]
|
||||
ld [hl], a
|
||||
|
||||
call CloseSRAM
|
||||
ret
|
||||
; 11b5c0
|
||||
@ -7484,14 +7349,14 @@ Function11b5e8: ; 11b5e8
|
||||
call GetSRAMBank
|
||||
ld hl, wRTC
|
||||
ld de, $c608
|
||||
ld bc, $0004
|
||||
ld bc, 4
|
||||
call CopyBytes
|
||||
call CloseSRAM
|
||||
ld a, $5
|
||||
call GetSRAMBank
|
||||
ld hl, $c608
|
||||
ld de, $b08c
|
||||
ld bc, $0004
|
||||
ld bc, 4
|
||||
call CopyBytes
|
||||
ld a, $2
|
||||
ld [$a800], a
|
||||
@ -7513,35 +7378,20 @@ Function11b5e8: ; 11b5e8
|
||||
ld [wcd31], a
|
||||
call CloseSRAM
|
||||
call Function11b44b
|
||||
call Function11b64c
|
||||
call .loop
|
||||
ret
|
||||
; 11b64c
|
||||
|
||||
Function11b64c: ; 11b64c
|
||||
.asm_11b64c
|
||||
call Function11b65a
|
||||
.loop
|
||||
call .RunJumptable
|
||||
call DelayFrame
|
||||
ld a, [wJumptableIndex]
|
||||
cp $1
|
||||
jr nz, .asm_11b64c
|
||||
jr nz, .loop
|
||||
ret
|
||||
; 11b65a
|
||||
|
||||
Function11b65a: ; 11b65a
|
||||
ld a, [wJumptableIndex]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, Jumptable_11b669
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp [hl]
|
||||
; 11b669
|
||||
|
||||
Jumptable_11b669: ; 11b669
|
||||
.RunJumptable
|
||||
jumptable .Jumptable, wJumptableIndex
|
||||
.Jumptable
|
||||
dw Function11b66d
|
||||
dw Function11b6b3
|
||||
; 11b66d
|
||||
|
@ -733,17 +733,7 @@ Function17d45a: ; 17d45a
|
||||
; 17d474
|
||||
|
||||
Function17d474: ; 17d474
|
||||
ld a, [wcd77]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, Jumptable_17d483
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp [hl]
|
||||
jumptable Jumptable_17d483, wcd77
|
||||
; 17d483
|
||||
|
||||
Jumptable_17d483: ; 17d483
|
||||
@ -920,16 +910,14 @@ Function17d48d: ; 17d48d
|
||||
ld a, [wcd42]
|
||||
ld c, a
|
||||
ld b, $0
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
ld a, l
|
||||
ld [wcd4b], a
|
||||
ld a, h
|
||||
ld [wcd4c], a
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
ld a, l
|
||||
ld [wcd4d], a
|
||||
ld a, h
|
||||
@ -955,9 +943,8 @@ Function17d5c4:
|
||||
.loop
|
||||
srl a
|
||||
jr c, .got_button
|
||||
rept 2
|
||||
inc c
|
||||
endr
|
||||
inc c
|
||||
jr .loop
|
||||
|
||||
.got_button
|
||||
@ -1044,12 +1031,10 @@ Function17d60b: ; 17d60b
|
||||
ld [wcd4c], a
|
||||
pop de
|
||||
pop hl
|
||||
rept 2
|
||||
inc b
|
||||
endr
|
||||
rept 2
|
||||
inc b
|
||||
dec c
|
||||
dec c
|
||||
endr
|
||||
jr z, .asm_17d684
|
||||
push bc
|
||||
push de
|
||||
@ -1095,17 +1080,15 @@ Function17d6a1: ; 17d6a1
|
||||
ld a, $5
|
||||
call GetSRAMBank
|
||||
ld hl, $b1d3
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
ld a, [hli]
|
||||
ld [wcd47], a
|
||||
ld a, [hl]
|
||||
ld [BGMapPalBuffer], a
|
||||
ld hl, $b1b3
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
ld a, [hli]
|
||||
ld c, a
|
||||
ld a, [hl]
|
||||
@ -1121,9 +1104,8 @@ endr
|
||||
ld de, wcd60
|
||||
ld bc, $0004
|
||||
call CopyBytes
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
ld de, wcd64
|
||||
ld bc, $0004
|
||||
call CopyBytes
|
||||
@ -1159,9 +1141,8 @@ Function17d711:
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, Jumptable17d72a
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@ -2015,9 +1996,8 @@ Function17dccf: ; 17dccf
|
||||
ld a, [wcd2e]
|
||||
ld c, a
|
||||
ld b, $0
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
ld a, [hli]
|
||||
ld c, a
|
||||
ld a, [hl]
|
||||
@ -2432,9 +2412,8 @@ Function17ded9: ; 17ded9
|
||||
jr .asm_17df7b
|
||||
|
||||
.asm_17df79
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
|
||||
.asm_17df7b
|
||||
bit 4, b
|
||||
@ -2487,9 +2466,8 @@ endr
|
||||
jr .asm_17dfd2
|
||||
|
||||
.asm_17dfd0
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
|
||||
.asm_17dfd2
|
||||
bit 5, b
|
||||
@ -2614,9 +2592,8 @@ Function17e026: ; 17e026
|
||||
jr .asm_17e0a4
|
||||
|
||||
.asm_17e0a2
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
|
||||
.asm_17e0a4
|
||||
bit 4, b
|
||||
@ -2632,9 +2609,8 @@ endr
|
||||
jr .asm_17e0b6
|
||||
|
||||
.asm_17e0b4
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
|
||||
.asm_17e0b6
|
||||
bit 5, b
|
||||
@ -2656,9 +2632,8 @@ endr
|
||||
call CloseSRAM
|
||||
pop hl
|
||||
pop bc
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
jr asm_17e0ee
|
||||
|
||||
.asm_17e0e1
|
||||
@ -2703,9 +2678,8 @@ Function17e0fd: ; 17e0fd
|
||||
call ReceiveItem
|
||||
pop hl
|
||||
jr c, .asm_17e127
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
|
||||
.asm_17e127
|
||||
ld a, [hli]
|
||||
@ -2735,9 +2709,8 @@ Function17e133: ; 17e133
|
||||
callba MobileCheckOwnMonAnywhere
|
||||
pop hl
|
||||
jr c, .asm_17e159
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
|
||||
.asm_17e159
|
||||
ld a, [hli]
|
||||
@ -2773,9 +2746,8 @@ Function17e165: ; 17e165
|
||||
call CheckItem
|
||||
pop hl
|
||||
jr c, .asm_17e195
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
|
||||
.asm_17e195
|
||||
ld a, [hli]
|
||||
@ -3240,9 +3212,8 @@ Function17e451: ; 17e451
|
||||
ld [wcd2e], a
|
||||
ld c, a
|
||||
ld b, $0
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
push hl
|
||||
hlcoord 0, 0
|
||||
ld bc, $0014
|
||||
@ -3467,9 +3438,8 @@ Function17e5af: ; 17e5af
|
||||
ld l, a
|
||||
ld a, [wcd4e]
|
||||
ld h, a
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
ld a, [hli]
|
||||
ld e, a
|
||||
ld a, [hli]
|
||||
@ -3534,9 +3504,8 @@ Function17e613: ; 17e613
|
||||
ld [hli], a
|
||||
ld a, [de]
|
||||
inc de
|
||||
rept 2
|
||||
dec a
|
||||
endr
|
||||
dec a
|
||||
jr z, .asm_17e63f
|
||||
ld c, a
|
||||
ld a, [wcd53]
|
||||
@ -3555,9 +3524,8 @@ endr
|
||||
add hl, bc
|
||||
ld a, [de]
|
||||
dec de
|
||||
rept 2
|
||||
dec a
|
||||
endr
|
||||
dec a
|
||||
jr z, .asm_17e674
|
||||
ld b, a
|
||||
.asm_17e651
|
||||
@ -3566,9 +3534,8 @@ endr
|
||||
add $3
|
||||
ld [hli], a
|
||||
ld a, [de]
|
||||
rept 2
|
||||
dec a
|
||||
endr
|
||||
dec a
|
||||
jr z, .asm_17e664
|
||||
ld c, a
|
||||
ld a, $7f
|
||||
@ -3594,9 +3561,8 @@ endr
|
||||
add $5
|
||||
ld [hli], a
|
||||
ld a, [de]
|
||||
rept 2
|
||||
dec a
|
||||
endr
|
||||
dec a
|
||||
jr z, .asm_17e689
|
||||
ld c, a
|
||||
ld a, [wcd53]
|
||||
@ -3622,9 +3588,8 @@ Function17e691: ; 17e691
|
||||
inc de
|
||||
push af
|
||||
ld a, [de]
|
||||
rept 2
|
||||
inc de
|
||||
endr
|
||||
inc de
|
||||
and a
|
||||
.asm_17e69f
|
||||
jr z, .asm_17e6a5
|
||||
@ -3776,9 +3741,8 @@ Function17f047: ; 17f047
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, Jumptable_17f061
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@ -3815,9 +3779,8 @@ Function17f081: ; 17f081
|
||||
ld de, $0004
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
ld e, l
|
||||
ld d, h
|
||||
ld l, c
|
||||
@ -3960,9 +3923,8 @@ Function17f154: ; 17f154
|
||||
pop hl
|
||||
call Function17f524
|
||||
jr c, .asm_17f167
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
ld e, l
|
||||
ld d, h
|
||||
ld a, [de]
|
||||
@ -4150,9 +4112,8 @@ Function17f220: ; 17f220
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .Genders
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld e, a
|
||||
ld a, [hl]
|
||||
@ -4414,9 +4375,8 @@ Function17f3f0: ; 17f3f0
|
||||
ld a, [de]
|
||||
ld c, a
|
||||
ld b, $0
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
ld a, [hli]
|
||||
ld e, a
|
||||
ld a, [hli]
|
||||
@ -4431,9 +4391,8 @@ endr
|
||||
ld e, a
|
||||
ld d, $0
|
||||
pop hl
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
rept 3
|
||||
inc hl
|
||||
endr
|
||||
@ -4497,9 +4456,8 @@ Function17f44f: ; 17f44f
|
||||
ld de, $0005
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
ld e, l
|
||||
ld d, h
|
||||
ld l, c
|
||||
@ -4738,17 +4696,7 @@ Function17f56e: ; 17f56e
|
||||
; 17f5ae
|
||||
|
||||
Function17f5ae: ; 17f5ae
|
||||
ld a, [wc303]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, Table17f5bd
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp [hl]
|
||||
jumptable Table17f5bd, wc303
|
||||
; 17f5bd
|
||||
|
||||
Table17f5bd: ; 17f5bd
|
||||
@ -4818,9 +4766,8 @@ Function17f5e4: ; 17f5e4
|
||||
ld e, a
|
||||
ld d, $0
|
||||
ld hl, Table_17f706
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, [wc301]
|
||||
ld e, a
|
||||
ld a, [wc302]
|
||||
@ -4858,9 +4805,8 @@ endr
|
||||
jr .asm_17f67d
|
||||
|
||||
.asm_17f674
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
dec c
|
||||
jr nz, .asm_17f65d
|
||||
|
||||
@ -4878,9 +4824,8 @@ endr
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, Table_17f699
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld e, a
|
||||
ld a, [hl]
|
||||
|
@ -162,9 +162,8 @@ MobileMenu_InitMenuBuffers: ; 4a071 (12:6071)
|
||||
add B_BUTTON
|
||||
ld [hli], a ; wMenuJoypadFilter
|
||||
ld a, 1
|
||||
rept 2
|
||||
ld [hli], a ; wMenuCursorY, wMenuCursorX
|
||||
endr
|
||||
ld [hli], a ; wMenuCursorY, wMenuCursorX
|
||||
ret
|
||||
|
||||
Function4a098: ; 4a098 (12:6098)
|
||||
@ -246,9 +245,8 @@ Function4a118: ; 4a118 (12:6118)
|
||||
add $2
|
||||
ld [hli], a
|
||||
ld a, $1
|
||||
rept 2
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hli], a
|
||||
ret
|
||||
|
||||
Function4a13b: ; 4a13b (12:613b)
|
||||
@ -523,9 +521,8 @@ Function4a373: ; 4a373 (12:6373)
|
||||
add $2
|
||||
ld [hli], a
|
||||
ld a, $1
|
||||
rept 2
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hli], a
|
||||
ret
|
||||
; 4a39a (12:639a)
|
||||
|
||||
@ -836,9 +833,8 @@ Function4a680: ; 4a680 (12:6680)
|
||||
add $2
|
||||
ld [hli], a
|
||||
ld a, $1
|
||||
rept 2
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hli], a
|
||||
xor a
|
||||
rept 3
|
||||
ld [hli], a
|
||||
|
@ -18,7 +18,7 @@ Predef_LoadSGBLayoutCGB: ; 8d59
|
||||
ld l, a
|
||||
ld h, 0
|
||||
add hl, hl
|
||||
ld de, .jumptable
|
||||
ld de, .dw
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
@ -32,7 +32,7 @@ Predef_LoadSGBLayoutCGB: ; 8d59
|
||||
ret
|
||||
; 8d7a
|
||||
|
||||
.jumptable: ; 8d7a
|
||||
.dw: ; 8d7a
|
||||
dw _CGB00
|
||||
dw _CGB01
|
||||
dw _CGB02
|
||||
@ -92,18 +92,16 @@ _CGB01: ; 8ddb
|
||||
ld a, [EnemyHPPal]
|
||||
ld l, a
|
||||
ld h, $0
|
||||
rept 2
|
||||
add hl, hl
|
||||
endr
|
||||
add hl, hl
|
||||
ld bc, Palettes_a8be
|
||||
add hl, bc
|
||||
call LoadPalette_White_Col1_Col2_Black
|
||||
ld a, [PlayerHPPal]
|
||||
ld l, a
|
||||
ld h, $0
|
||||
rept 2
|
||||
add hl, hl
|
||||
endr
|
||||
add hl, hl
|
||||
ld bc, Palettes_a8be
|
||||
add hl, bc
|
||||
call LoadPalette_White_Col1_Col2_Black
|
||||
@ -209,9 +207,8 @@ _CGB03: ; 8edb
|
||||
ld a, [wcda1]
|
||||
ld l, a
|
||||
ld h, $0
|
||||
rept 2
|
||||
add hl, hl
|
||||
endr
|
||||
add hl, hl
|
||||
ld bc, Palettes_a8be
|
||||
add hl, bc
|
||||
call LoadPalette_White_Col1_Col2_Black
|
||||
@ -489,9 +486,8 @@ _CGB06: ; 90f8
|
||||
_CGB07: ; 9122
|
||||
ld b, 0
|
||||
ld hl, Jumptable_912d
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@ -797,9 +793,8 @@ _CGB0e: ; 9373
|
||||
ld a, [PlayerHPPal]
|
||||
ld l, a
|
||||
ld h, 0
|
||||
rept 2
|
||||
add hl, hl
|
||||
endr
|
||||
add hl, hl
|
||||
ld bc, Palettes_a8be
|
||||
add hl, bc
|
||||
call LoadPalette_White_Col1_Col2_Black
|
||||
|
@ -10,7 +10,7 @@ GetMysteryGift_MobileAdapterLayout: ; 4930f (mobile)
|
||||
ld l, a
|
||||
ld h, 0
|
||||
add hl, hl
|
||||
ld de, .jumptable
|
||||
ld de, .dw
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
@ -22,11 +22,11 @@ GetMysteryGift_MobileAdapterLayout: ; 4930f (mobile)
|
||||
ret
|
||||
; 49330 (12:5330)
|
||||
|
||||
.jumptable: ; 49330
|
||||
jumptable_start
|
||||
jumptable MG_Mobile_Layout00
|
||||
jumptable MG_Mobile_Layout01
|
||||
jumptable MG_Mobile_Layout02
|
||||
.dw: ; 49330
|
||||
|
||||
dw MG_Mobile_Layout00
|
||||
dw MG_Mobile_Layout01
|
||||
dw MG_Mobile_Layout02
|
||||
; 49336
|
||||
|
||||
MG_Mobile_Layout_FillBox: ; 49336
|
||||
|
Loading…
Reference in New Issue
Block a user