jumptable macro repurposed

This commit is contained in:
PikalaxALT 2015-12-26 21:59:03 -05:00
parent 2bd45ca574
commit f030315b1f
66 changed files with 1241 additions and 1759 deletions

View File

@ -3,7 +3,7 @@
INCLUDE "battle/objects/engine.asm" INCLUDE "battle/objects/engine.asm"
INCLUDE "battle/objects/data.asm" INCLUDE "battle/objects/data.asm"
INCLUDE "battle/objects/functions.asm" INCLUDE "battle/objects/functions.asm"
INCLUDE "battle/objects/library.asm" INCLUDE "battle/objects/helpers.asm"
INCLUDE "battle/objects/framesets.asm" INCLUDE "battle/objects/framesets.asm"
INCLUDE "battle/objects/oam.asm" INCLUDE "battle/objects/oam.asm"
INCLUDE "battle/objects/gfx_headers.asm" INCLUDE "battle/objects/gfx_headers.asm"

File diff suppressed because it is too large Load Diff

View File

@ -1849,9 +1849,8 @@ HandleWeather: ; 3cb9e
dec a dec a
ld c, a ld c, a
ld b, 0 ld b, 0
rept 2
add hl, bc add hl, bc
endr add hl, bc
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
@ -2575,9 +2574,8 @@ Function3d02b: ; 3d02b
dec a dec a
ld c, a ld c, a
ld b, 0 ld b, 0
rept 2
add hl, bc add hl, bc
endr add hl, bc
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
@ -2615,9 +2613,8 @@ endr
rl [hl] rl [hl]
ret nc ret nc
ld a, $ff ld a, $ff
rept 2
ld [hli], a ld [hli], a
endr ld [hli], a
ld [hl], a ld [hl], a
ret ret
; 3d0ab ; 3d0ab
@ -4747,18 +4744,16 @@ HandleStatBoostingHeldItems: ; 3de97
ld a, [hli] ld a, [hli]
cp $ff cp $ff
jr z, .finish jr z, .finish
rept 2
inc hl inc hl
endr inc hl
cp b cp b
jr nz, .loop jr nz, .loop
pop bc pop bc
ld a, [bc] ld a, [bc]
ld [wd265], a ld [wd265], a
push bc push bc
rept 2
dec hl dec hl
endr dec hl
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
@ -5822,9 +5817,8 @@ MoveSelectionScreen: ; 3e4bc
ld a, [wMenuCursorY] ld a, [wMenuCursorY]
ld b, a ld b, a
ld a, [wNumMoves] ld a, [wNumMoves]
rept 2
inc a inc a
endr inc a
cp b cp b
jp nz, .menu_loop jp nz, .menu_loop
ld a, $1 ld a, $1
@ -6008,9 +6002,8 @@ MoveInfoBox: ; 3e6c8
lb bc, 1, 2 lb bc, 1, 2
call PrintNum call PrintNum
pop hl pop hl
rept 2
inc hl inc hl
endr inc hl
ld [hl], "/" ld [hl], "/"
inc hl inc hl
ld de, wNamedObjectIndexBuffer ld de, wNamedObjectIndexBuffer
@ -6818,9 +6811,8 @@ CheckUnownLetter: ; 3eb75
.next .next
; Make sure we haven't gone past the end of the table ; Make sure we haven't gone past the end of the table
rept 2
inc e inc e
endr inc e
ld a, e ld a, e
cp a, .Set1 - .LetterSets cp a, .Set1 - .LetterSets
jr c, .loop jr c, .loop
@ -7176,9 +7168,8 @@ BadgeStatBoosts: ; 3ed45
; Swap badges 3 (PlainBadge) and 5 (MineralBadge). ; Swap badges 3 (PlainBadge) and 5 (MineralBadge).
ld d, a ld d, a
and (1 << PLAINBADGE) and (1 << PLAINBADGE)
rept 2
add a add a
endr add a
ld b, a ld b, a
ld a, d ld a, d
and (1 << MINERALBADGE) and (1 << MINERALBADGE)
@ -7197,9 +7188,8 @@ endr
ld a, b ld a, b
srl b srl b
call c, BoostStat call c, BoostStat
rept 2
inc hl inc hl
endr inc hl
; Check every other badge. ; Check every other badge.
srl b srl b
dec c dec c
@ -7328,9 +7318,8 @@ _BattleRandom:: ; 3edd8
; a * 5 + 1 ; a * 5 + 1
ld c, a ld c, a
rept 2
add a add a
endr add a
add c add c
inc a inc a
@ -7467,9 +7456,8 @@ GiveExperiencePoints: ; 3ee3b
ld [de], a ld [de], a
.skip .skip
rept 2
inc de inc de
endr inc de
dec c dec c
jr nz, .loop1 jr nz, .loop1
xor a xor a
@ -7544,9 +7532,8 @@ endr
inc [hl] inc [hl]
jr nz, .skip2 jr nz, .skip2
ld a, $ff ld a, $ff
rept 2
ld [hli], a ld [hli], a
endr ld [hli], a
ld [hl], a ld [hl], a
.skip2 .skip2
@ -7881,9 +7868,8 @@ Function3f136: ; 3f136
inc [hl] inc [hl]
jr nz, .asm_3f186 jr nz, .asm_3f186
ld a, $ff ld a, $ff
rept 2
ld [hli], a ld [hli], a
endr ld [hli], a
ld [hl], a ld [hl], a
.asm_3f186 .asm_3f186
@ -8800,9 +8786,8 @@ CheckPayDay: ; 3f71d
rl [hl] rl [hl]
jr nc, .okay jr nc, .okay
ld a, $ff ld a, $ff
rept 2
ld [hli], a ld [hli], a
endr ld [hli], a
ld [hl], a ld [hl], a
.okay .okay
@ -9202,13 +9187,11 @@ Function3fa42: ; 3fa42
ld d, 5 ld d, 5
.loop .loop
push hl push hl
rept 2
inc hl inc hl
endr inc hl
ld a, [hl] ld a, [hl]
rept 2
dec hl dec hl
endr dec hl
and a and a
jr z, .copy jr z, .copy
push de push de
@ -9308,18 +9291,16 @@ Function3fac8: ; 3fac8
ld c, $1 ld c, $1
.loop2 .loop2
ld a, b ld a, b
rept 2
add b add b
endr add b
ld e, a ld e, a
ld d, $0 ld d, $0
ld hl, wd002 ld hl, wd002
add hl, de add hl, de
push hl push hl
ld a, c ld a, c
rept 2
add c add c
endr add c
ld e, a ld e, a
ld d, $0 ld d, $0
ld hl, wd002 ld hl, wd002

View File

@ -51,9 +51,8 @@ DoMove: ; 3402c
ld c, a ld c, a
ld b, 0 ld b, 0
ld hl, MoveEffectsPointers ld hl, MoveEffectsPointers
rept 2
add hl, bc add hl, bc
endr add hl, bc
ld a, BANK(MoveEffectsPointers) ld a, BANK(MoveEffectsPointers)
call GetFarHalfword call GetFarHalfword
@ -102,9 +101,8 @@ endr
ld c, a ld c, a
ld b, 0 ld b, 0
ld hl, BattleCommandPointers ld hl, BattleCommandPointers
rept 2
add hl, bc add hl, bc
endr add hl, bc
pop bc pop bc
ld a, BANK(BattleCommandPointers) ld a, BANK(BattleCommandPointers)
@ -1076,9 +1074,8 @@ BattleCommand_DoTurn: ; 34555
jp nz, EndMoveEffect jp nz, EndMoveEffect
; SubStatus5 ; SubStatus5
rept 2
inc de inc de
endr inc de
ld a, [de] ld a, [de]
bit SUBSTATUS_TRANSFORMED, a bit SUBSTATUS_TRANSFORMED, a
@ -1276,9 +1273,8 @@ BattleCommand_Critical: ; 34631
jr nc, .ScopeLens jr nc, .ScopeLens
; +2 critical level ; +2 critical level
rept 2
inc c inc c
endr inc c
.ScopeLens .ScopeLens
push bc push bc
@ -1522,9 +1518,8 @@ BattleCommand_Stab: ; 346d2
pop hl pop hl
.SkipType .SkipType
rept 2
inc hl inc hl
endr inc hl
jr .TypesLoop jr .TypesLoop
.end .end
@ -2741,9 +2736,8 @@ EndMoveEffect: ; 352a3
ld a, [BattleScriptBufferLoc + 1] ld a, [BattleScriptBufferLoc + 1]
ld h, a ld h, a
ld a, $ff ld a, $ff
rept 2
ld [hli], a ld [hli], a
endr ld [hli], a
ld [hl], a ld [hl], a
ret ret
@ -3457,9 +3451,8 @@ BattleCommand_DamageCalc: ; 35612
xor a xor a
ld hl, hDividend ld hl, hDividend
rept 2
ld [hli], a ld [hli], a
endr ld [hli], a
ld [hl], a ld [hl], a
; Level * 2 ; Level * 2
@ -3480,9 +3473,8 @@ endr
pop bc pop bc
; + 2 ; + 2
rept 2
inc [hl] inc [hl]
endr inc [hl]
; * bp ; * bp
inc hl inc hl
@ -4075,9 +4067,8 @@ BattleCommand_PainSplit: ; 35926
ld [Buffer3], a ld [Buffer3], a
ld a, [hl] ld a, [hl]
ld [Buffer4], a ld [Buffer4], a
rept 2
dec de dec de
endr dec de
ld a, [de] ld a, [de]
dec de dec de
add b add b
@ -4587,9 +4578,8 @@ BattleCommand_Spite: ; 35c0f
call GetMoveName call GetMoveName
call BattleRandom call BattleRandom
and 3 and 3
rept 2
inc a inc a
endr inc a
ld b, a ld b, a
ld a, [hl] ld a, [hl]
and $3f and $3f
@ -6380,9 +6370,8 @@ CalcStats: ; 3661d
dec c dec c
ld b, 0 ld b, 0
ld hl, StatLevelMultipliers ld hl, StatLevelMultipliers
rept 2
add hl, bc add hl, bc
endr add hl, bc
xor a xor a
ld [hMultiplicand + 0], a ld [hMultiplicand + 0], a
@ -6538,9 +6527,8 @@ BattleCommand_UnleashEnergy: ; 366e5
ld [wEnemyMoveStruct + MOVE_EFFECT], a ld [wEnemyMoveStruct + MOVE_EFFECT], a
call BattleRandom call BattleRandom
and 1 and 1
rept 2
inc a inc a
endr inc a
ld [bc], a ld [bc], a
ld a, 1 ld a, 1
ld [wKickCounter], a ld [wKickCounter], a
@ -6579,9 +6567,8 @@ BattleCommand_CheckRampage: ; 3671a
set SUBSTATUS_CONFUSED, [hl] set SUBSTATUS_CONFUSED, [hl]
call BattleRandom call BattleRandom
and %00000001 and %00000001
rept 2
inc a inc a
endr inc a
inc de ; ConfuseCount inc de ; ConfuseCount
ld [de], a ld [de], a
.continue_rampage .continue_rampage
@ -7464,9 +7451,8 @@ endr
ld a, [hli] ld a, [hli]
cp b cp b
jr z, .found_trap_text jr z, .found_trap_text
rept 2
inc hl inc hl
endr inc hl
jr .find_trap_text jr .find_trap_text
.found_trap_text .found_trap_text
@ -7552,9 +7538,8 @@ BattleCommand_Recoil: ; 36cb2
ld [Buffer2], a ld [Buffer2], a
ld a, [hl] ld a, [hl]
ld [Buffer1], a ld [Buffer1], a
rept 2
dec hl dec hl
endr dec hl
ld a, [hl] ld a, [hl]
ld [Buffer3], a ld [Buffer3], a
sub c sub c
@ -7651,9 +7636,8 @@ BattleCommand_FinishConfusingTarget: ; 36d70
set SUBSTATUS_CONFUSED, [hl] set SUBSTATUS_CONFUSED, [hl]
call BattleRandom call BattleRandom
and 3 and 3
rept 2
inc a inc a
endr inc a
ld [bc], a ld [bc], a
ld a, BATTLE_VARS_MOVE_EFFECT ld a, BATTLE_VARS_MOVE_EFFECT
@ -7844,9 +7828,8 @@ BattleCommand_Substitute: ; 36e7c
rr b rr b
srl a srl a
rr b rr b
rept 2
dec hl dec hl
endr dec hl
ld a, b ld a, b
ld [de], a ld [de], a
ld a, [hld] ld a, [hld]
@ -8457,9 +8440,8 @@ BattleCommand_Transform: ; 371cd
ld a, [hli] ld a, [hli]
ld [de], a ld [de], a
inc hl inc hl
rept 2
inc de inc de
endr inc de
ld bc, NUM_MOVES ld bc, NUM_MOVES
call CopyBytes call CopyBytes
ld a, [hBattleTurn] ld a, [hBattleTurn]
@ -9125,9 +9107,8 @@ BattleCommand_GetMagnitude: ; 37991
ld a, [hli] ld a, [hli]
cp b cp b
jr nc, .ok jr nc, .ok
rept 2
inc hl inc hl
endr inc hl
jr .loop jr .loop
.ok .ok
@ -9528,16 +9509,14 @@ BattleCommand_TimeBasedHealContinue: ; 37b7e
inc c inc c
cp WEATHER_SUN cp WEATHER_SUN
jr z, .Heal jr z, .Heal
rept 2
dec c dec c
endr dec c
.Heal .Heal
ld b, 0 ld b, 0
ld hl, .Multipliers ld hl, .Multipliers
rept 2
add hl, bc add hl, bc
endr add hl, bc
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]

View File

@ -558,10 +558,10 @@ endm
; ANIM_OBJ_COTTON ; ANIM_OBJ_COTTON
battleanimobj $01, $ff, BATTLEANIMFRAMESET_89, BATTLEANIMFUNC_4F, $04, $1f battleanimobj $01, $ff, BATTLEANIMFRAMESET_89, BATTLEANIMFUNC_4F, $04, $1f
; ANIM_OBJ_B8 ; ANIM_OBJ_PLAYERFEETFOLLOW
battleanimobj $00, $00, BATTLEANIMFRAMESET_B5, BATTLEANIMFUNC_00, $00, $28 battleanimobj $00, $00, BATTLEANIMFRAMESET_B5, BATTLEANIMFUNC_00, $00, $28
; ANIM_OBJ_B9 ; ANIM_OBJ_ENEMYFEETFOLLOW
battleanimobj $00, $00, BATTLEANIMFRAMESET_B6, BATTLEANIMFUNC_00, $01, $29 battleanimobj $00, $00, BATTLEANIMFRAMESET_B6, BATTLEANIMFUNC_00, $01, $29
; ANIM_OBJ_BA ; ANIM_OBJ_BA

File diff suppressed because it is too large Load Diff

View File

@ -5,10 +5,10 @@ BattleIntroSlidingPics: ; 4e980
ld [rSVBK], a ld [rSVBK], a
call .subfunction1 call .subfunction1
ld a, rSCX - $ff00 ld a, rSCX - $ff00
ld [hLCDStatCustom], a ld [hFFC6], a
call .subfunction2 call .subfunction2
xor a xor a
ld [hLCDStatCustom], a ld [hFFC6], a
pop af pop af
ld [rSVBK], a ld [rSVBK], a
ret ret

View File

@ -210,8 +210,8 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
const ANIM_OBJ_B5 const ANIM_OBJ_B5
const ANIM_OBJ_FLOWER const ANIM_OBJ_FLOWER
const ANIM_OBJ_COTTON const ANIM_OBJ_COTTON
const ANIM_OBJ_B8 const ANIM_OBJ_PLAYERFEETFOLLOW
const ANIM_OBJ_B9 const ANIM_OBJ_ENEMYFEETFOLLOW
const ANIM_OBJ_BA const ANIM_OBJ_BA
const ANIM_OBJ_BB const ANIM_OBJ_BB

View File

@ -15,7 +15,7 @@
const BATTLETOWERACTION_0D ; more time stuff in SRAM bank 5 const BATTLETOWERACTION_0D ; more time stuff in SRAM bank 5
const BATTLETOWERACTION_EGGTICKET ; egg ticket const BATTLETOWERACTION_EGGTICKET ; egg ticket
const BATTLETOWERACTION_0F ; check w3_d090 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_11 ; store 0 in 5:aa8d
const BATTLETOWERACTION_12 ; store 1 in 5:aa8d const BATTLETOWERACTION_12 ; store 1 in 5:aa8d
const BATTLETOWERACTION_13 ; check 5:aa8d const BATTLETOWERACTION_13 ; check 5:aa8d

View File

@ -39,9 +39,9 @@ Predef_StartBattle: ; 8c20f
call DmgToCgbBGPals call DmgToCgbBGPals
call DelayFrame call DelayFrame
xor a xor a
ld [hLCDStatCustom], a ld [hFFC6], a
ld [hLCDStatCustom + 1], a ld [hFFC7], a
ld [hLCDStatCustom + 2], a ld [hFFC8], a
ld [hSCY], a ld [hSCY], a
ld a, $1 ld a, $1
@ -74,9 +74,8 @@ Function8c26d: ; 8c26d
ld [hBGMapMode], a ld [hBGMapMode], a
ld hl, wJumptableIndex ld hl, wJumptableIndex
xor a xor a
rept 2
ld [hli], a ld [hli], a
endr ld [hli], a
ld [hl], a ld [hl], a
call WipeLYOverrides call WipeLYOverrides
ret ret
@ -146,20 +145,10 @@ INCBIN "gfx/overworld/trainer_battle_pokeball_tiles.2bpp"
FlashyTransitionToBattle: ; 8c314 FlashyTransitionToBattle: ; 8c314
ld a, [wJumptableIndex] jumptable .dw, 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]
; 8c323 ; 8c323
.jumptable: ; 8c323 (23:4323) .dw: ; 8c323 (23:4323)
dw StartTrainerBattle_DetermineWhichAnimation ; 00 dw StartTrainerBattle_DetermineWhichAnimation ; 00
; Animation 1: cave ; Animation 1: cave
@ -314,11 +303,11 @@ StartTrainerBattle_SetUpForWavyOutro: ; 8c3e8 (23:43e8)
call StartTrainerBattle_NextScene call StartTrainerBattle_NextScene
ld a, $43 ld a, $43
ld [hLCDStatCustom], a ld [hFFC6], a
xor a xor a
ld [hLCDStatCustom + 1], a ld [hFFC7], a
ld a, $90 ld a, $90
ld [hLCDStatCustom + 2], a ld [hFFC8], a
xor a xor a
ld [wcf64], a ld [wcf64], a
ld [wcf65], a ld [wcf65], a
@ -784,9 +773,8 @@ StartTrainerBattle_DrawSineWave: ; 8c6f7 (23:46f7)
ld a, d ld a, d
ld d, 0 ld d, 0
ld hl, .sinewave ld hl, .sinewave
rept 2
add hl, de add hl, de
endr add hl, de
ld e, [hl] ld e, [hl]
inc hl inc hl
ld d, [hl] ld d, [hl]

View File

@ -42,12 +42,12 @@ _DepositPKMN: ; e2391 (38:6391)
jp [hl] jp [hl]
.Jumptable: ; e23df (38:63df) .Jumptable: ; e23df (38:63df)
jumptable_start
jumptable .Init dw .Init
jumptable .HandleJoypad dw .HandleJoypad
jumptable .WhatsUp dw .WhatsUp
jumptable .Submenu dw .Submenu
jumptable BillsPC_EndJumptableLoop dw BillsPC_EndJumptableLoop
.Init: ; e23e9 (38:63e9) .Init: ; e23e9 (38:63e9)
@ -151,11 +151,11 @@ endr
jp [hl] jp [hl]
BillsPCDepositJumptable: ; e24a1 (38:64a1) BillsPCDepositJumptable: ; e24a1 (38:64a1)
jumptable_start
jumptable BillsPCDepositFuncDeposit ; Deposit Pokemon dw BillsPCDepositFuncDeposit ; Deposit Pokemon
jumptable BillsPCDepositFuncStats ; Pokemon Stats dw BillsPCDepositFuncStats ; Pokemon Stats
jumptable BillsPCDepositFuncRelease ; Release Pokemon dw BillsPCDepositFuncRelease ; Release Pokemon
jumptable BillsPCDepositFuncCancel ; Cancel dw BillsPCDepositFuncCancel ; Cancel
BillsPCDepositFuncDeposit: ; e24a9 (38:64a9) BillsPCDepositFuncDeposit: ; e24a9 (38:64a9)
@ -310,12 +310,12 @@ _WithdrawPKMN: ; e2583 (38:6583)
jp [hl] jp [hl]
.Jumptable: ; e25d2 (38:65d2) .Jumptable: ; e25d2 (38:65d2)
jumptable_start
jumptable .Init dw .Init
jumptable .Joypad dw .Joypad
jumptable .PrepSubmenu dw .PrepSubmenu
jumptable BillsPC_Withdraw dw BillsPC_Withdraw
jumptable BillsPC_EndJumptableLoop dw BillsPC_EndJumptableLoop
.Init: ; e25dc (38:65dc) .Init: ; e25dc (38:65dc)
@ -410,7 +410,7 @@ BillsPC_Withdraw: ; e2675 (38:6675)
and 3 and 3
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, .jumptable ld hl, .dw
rept 2 rept 2
add hl, de add hl, de
endr endr
@ -419,7 +419,7 @@ endr
ld l, a ld l, a
jp [hl] jp [hl]
.jumptable: ; e2699 (38:6699) #mark .dw: ; e2699 (38:6699) #mark
dw .withdraw ; Withdraw dw .withdraw ; Withdraw
dw .stats ; Stats dw .stats ; Stats
dw .release ; Release dw .release ; Release
@ -562,14 +562,14 @@ _MovePKMNWithoutMail: ; e2759
; e27ac ; e27ac
.Jumptable: ; e27ac .Jumptable: ; e27ac
jumptable_start
jumptable .Init dw .Init
jumptable .Joypad dw .Joypad
jumptable .PrepSubmenu dw .PrepSubmenu
jumptable .MoveMonWOMailSubmenu dw .MoveMonWOMailSubmenu
jumptable .PrepInsertCursor dw .PrepInsertCursor
jumptable .Joypad2 dw .Joypad2
jumptable BillsPC_EndJumptableLoop dw BillsPC_EndJumptableLoop
; e27ba ; e27ba
.Init: ; e27ba .Init: ; e27ba
@ -2016,12 +2016,12 @@ endr
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
ld de, .jumptable_return ld de, .dw_return
push de push de
jp [hl] jp [hl]
; e322a ; e322a
.jumptable_return: ; e322a .dw_return: ; e322a
pop af pop af
ld e, a ld e, a
callba Function14ad5 callba Function14ad5
@ -2033,11 +2033,11 @@ endr
; e3245 ; e3245
.Jumptable: ; e3245 .Jumptable: ; e3245
jumptable_start
jumptable .BoxToBox dw .BoxToBox
jumptable .PartyToBox dw .PartyToBox
jumptable .BoxToParty dw .BoxToParty
jumptable .PartyToParty dw .PartyToParty
; e324d ; e324d
.BoxToBox: ; e324d .BoxToBox: ; e324d

View File

@ -81,15 +81,15 @@ endr
; e01a0 (38:41a0) ; e01a0 (38:41a0)
.Jumptable: ; e01a0 .Jumptable: ; e01a0
jumptable_start
jumptable .AskPlayWithThree dw .AskPlayWithThree
jumptable .DeductCoins dw .DeductCoins
jumptable .ChooseACard dw .ChooseACard
jumptable .PlaceYourBet dw .PlaceYourBet
jumptable .CheckTheCard dw .CheckTheCard
jumptable .TabulateTheResult dw .TabulateTheResult
jumptable .PlayAgain dw .PlayAgain
jumptable .Quit dw .Quit
; e01b0 ; e01b0
.Increment: ; e01b0 .Increment: ; e01b0
@ -108,7 +108,7 @@ endr
ret ret
.SaidNo .SaidNo
ld a, 7 ; .QuitTableIndex ld a, 7
ld [wJumptableIndex], a ld [wJumptableIndex], a
ret ret
; e01cd ; e01cd
@ -132,7 +132,7 @@ endr
jr nc, .deduct ; You have at least 3 coins. jr nc, .deduct ; You have at least 3 coins.
ld hl, .NotEnoughCoinsText ld hl, .NotEnoughCoinsText
call CardFlip_UpdateCoinBalanceDisplay call CardFlip_UpdateCoinBalanceDisplay
ld a, 7 ; .QuitTableIndex ld a, 7
ld [wJumptableIndex], a ld [wJumptableIndex], a
ret ret
@ -329,7 +329,7 @@ endr
call CardFlip_BlankDiscardedCardSlot call CardFlip_BlankDiscardedCardSlot
.LoopAround .LoopAround
ld a, 1 ; .DeductCoinsTableIndex ld a, 1
ld [wJumptableIndex], a ld [wJumptableIndex], a
ret ret
; e0356 ; e0356
@ -659,13 +659,13 @@ CardFlip_BlankDiscardedCardSlot: ; e0534
; e0553 ; e0553
.Jumptable: ; e0553 .Jumptable: ; e0553
jumptable_start
jumptable .Level1 dw .Level1
jumptable .Level2 dw .Level2
jumptable .Level3 dw .Level3
jumptable .Level4 dw .Level4
jumptable .Level5 dw .Level5
jumptable .Level6 dw .Level6
; e055f ; e055f
.Level1: ; e055f .Level1: ; e055f
@ -848,62 +848,62 @@ CardFlip_CheckWinCondition: ; e0637
; e0643 ; e0643
.Jumptable: ; e0643 .Jumptable: ; e0643
jumptable_start
jumptable .Impossible
jumptable .Impossible
jumptable .PikaJiggly
jumptable .PikaJiggly
jumptable .PoliOddish
jumptable .PoliOddish
jumptable .Impossible dw .Impossible
jumptable .Impossible dw .Impossible
jumptable .Pikachu dw .PikaJiggly
jumptable .Jigglypuff dw .PikaJiggly
jumptable .Poliwag dw .PoliOddish
jumptable .Oddish dw .PoliOddish
jumptable .OneTwo dw .Impossible
jumptable .One dw .Impossible
jumptable .PikaOne dw .Pikachu
jumptable .JigglyOne dw .Jigglypuff
jumptable .PoliOne dw .Poliwag
jumptable .OddOne dw .Oddish
jumptable .OneTwo dw .OneTwo
jumptable .Two dw .One
jumptable .PikaTwo dw .PikaOne
jumptable .JigglyTwo dw .JigglyOne
jumptable .PoliTwo dw .PoliOne
jumptable .OddTwo dw .OddOne
jumptable .ThreeFour dw .OneTwo
jumptable .Three dw .Two
jumptable .PikaThree dw .PikaTwo
jumptable .JigglyThree dw .JigglyTwo
jumptable .PoliThree dw .PoliTwo
jumptable .OddThree dw .OddTwo
jumptable .ThreeFour dw .ThreeFour
jumptable .Four dw .Three
jumptable .PikaFour dw .PikaThree
jumptable .JigglyFour dw .JigglyThree
jumptable .PoliFour dw .PoliThree
jumptable .OddFour dw .OddThree
jumptable .FiveSix dw .ThreeFour
jumptable .Five dw .Four
jumptable .PikaFive dw .PikaFour
jumptable .JigglyFive dw .JigglyFour
jumptable .PoliFive dw .PoliFour
jumptable .OddFive dw .OddFour
jumptable .FiveSix dw .FiveSix
jumptable .Six dw .Five
jumptable .PikaSix dw .PikaFive
jumptable .JigglySix dw .JigglyFive
jumptable .PoliSix dw .PoliFive
jumptable .OddSix dw .OddFive
dw .FiveSix
dw .Six
dw .PikaSix
dw .JigglySix
dw .PoliSix
dw .OddSix
; e06a3 ; e06a3
.Impossible: ; e06a3 .Impossible: ; e06a3

View File

@ -367,9 +367,8 @@ ApplyHPBarPals: ; 8c43
.okay .okay
ld l, c ld l, c
ld h, $0 ld h, $0
rept 2
add hl, hl add hl, hl
endr add hl, hl
ld bc, Palettes_a8be ld bc, Palettes_a8be
add hl, bc add hl, bc
ld bc, 4 ld bc, 4
@ -405,9 +404,8 @@ LoadStatsScreenPals: ; 8c8a
ld hl, StatsScreenPals ld hl, StatsScreenPals
ld b, 0 ld b, 0
dec c dec c
rept 2
add hl, bc add hl, bc
endr add hl, bc
ld a, [rSVBK] ld a, [rSVBK]
push af push af
ld a, $5 ld a, $5
@ -441,9 +439,8 @@ endr
ld bc, PALPACKET_LENGTH ld bc, PALPACKET_LENGTH
call CopyBytes call CopyBytes
pop hl pop hl
rept 2
inc hl inc hl
endr inc hl
ld a, [hli] ld a, [hli]
ld [wSGBPals + 3], a ld [wSGBPals + 3], a
ld a, [hli] ld a, [hli]
@ -818,9 +815,8 @@ GetFrontpicPalettePointer: ; 9764
GetTrainerPalettePointer: ; 976b GetTrainerPalettePointer: ; 976b
ld l, a ld l, a
ld h, 0 ld h, 0
rept 2
add hl,hl add hl,hl
endr add hl,hl
ld bc, TrainerPalettes ld bc, TrainerPalettes
add hl, bc add hl, bc
ret ret
@ -1152,9 +1148,8 @@ Function994a: ; 994a
jr nz, .asm_99a6 jr nz, .asm_99a6
ld a, $20 ld a, $20
ld [rJOYP], a ld [rJOYP], a
rept 2
ld a, [rJOYP] ld a, [rJOYP]
endr ld a, [rJOYP]
call SGBDelayCycles call SGBDelayCycles
call SGBDelayCycles call SGBDelayCycles
ld a, $30 ld a, $30
@ -1962,9 +1957,8 @@ LoadMapPals: ; b1de
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, .TilesetColorsPointers ld hl, .TilesetColorsPointers
rept 2
add hl, de add hl, de
endr add hl, de
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a

View File

@ -183,7 +183,7 @@ Credits:: ; 109847
call ByteFill call ByteFill
ld a, rSCX - $ff00 ld a, rSCX - $ff00
ld [hLCDStatCustom], a ld [hFFC6], a
call GetCreditsPalette call GetCreditsPalette
call SetPalettes call SetPalettes
@ -211,7 +211,7 @@ Credits:: ; 109847
.exit_credits .exit_credits
call ClearBGPalettes call ClearBGPalettes
xor a xor a
ld [hLCDStatCustom], a ld [hFFC6], a
ld [hBGMapAddress], a ld [hBGMapAddress], a
pop af pop af
ld [hVBlank], a ld [hVBlank], a
@ -269,20 +269,20 @@ endr
.Jumptable: ; 109937 (42:5937) .Jumptable: ; 109937 (42:5937)
jumptable_start
jumptable ParseCredits dw ParseCredits
jumptable Credits_Next dw Credits_Next
jumptable Credits_Next dw Credits_Next
jumptable Credits_PrepBGMapUpdate dw Credits_PrepBGMapUpdate
jumptable Credits_UpdateGFXRequestPath dw Credits_UpdateGFXRequestPath
jumptable Credits_RequestGFX dw Credits_RequestGFX
jumptable Credits_LYOverride dw Credits_LYOverride
jumptable Credits_Next dw Credits_Next
jumptable Credits_Next dw Credits_Next
jumptable Credits_Next dw Credits_Next
jumptable Credits_UpdateGFXRequestPath dw Credits_UpdateGFXRequestPath
jumptable Credits_RequestGFX dw Credits_RequestGFX
jumptable Credits_LoopBack dw Credits_LoopBack
Credits_Next: ; 109951 (42:5951) Credits_Next: ; 109951 (42:5951)

View File

@ -119,7 +119,7 @@ PlaceGameFreakPresents: ; e4670
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, .jumptable ld hl, .dw
rept 2 rept 2
add hl, de add hl, de
endr endr
@ -129,7 +129,7 @@ endr
jp [hl] jp [hl]
; e467f ; e467f
.jumptable: ; e467f .dw: ; e467f
dw PlaceGameFreakPresents_0 dw PlaceGameFreakPresents_0
dw PlaceGameFreakPresents_1 dw PlaceGameFreakPresents_1
dw PlaceGameFreakPresents_2 dw PlaceGameFreakPresents_2
@ -625,7 +625,7 @@ IntroScene5: ; e4a7a (39:4a7a)
call ClearTileMap call ClearTileMap
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
ld [hLCDStatCustom], a ld [hFFC6], a
ld a, $1 ld a, $1
ld [rVBK], a ld [rVBK], a
ld hl, IntroTilemap005 ld hl, IntroTilemap005
@ -819,7 +819,7 @@ IntroScene8: ; e4bd3 (39:4bd3)
IntroScene9: ; e4c04 (39:4c04) IntroScene9: ; e4c04 (39:4c04)
; Set up the next scene (same bg). ; Set up the next scene (same bg).
xor a xor a
ld [hLCDStatCustom], a ld [hFFC6], a
call ClearSprites call ClearSprites
hlcoord 0, 0, AttrMap hlcoord 0, 0, AttrMap
; first 12 rows have palette 1 ; first 12 rows have palette 1
@ -893,7 +893,7 @@ IntroScene11: ; e4c86 (39:4c86)
call ClearTileMap call ClearTileMap
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
ld [hLCDStatCustom], a ld [hFFC6], a
ld a, $1 ld a, $1
ld [rVBK], a ld [rVBK], a
ld hl, IntroTilemap007 ld hl, IntroTilemap007
@ -2103,7 +2103,7 @@ Intro_ResetLYOverrides: ; e5516 (39:5516)
pop af pop af
ld [rSVBK], a ld [rSVBK], a
ld a, $43 ld a, $43
ld [hLCDStatCustom], a ld [hFFC6], a
ret ret
Intro_PerspectiveScrollBG: ; e552f (39:552f) Intro_PerspectiveScrollBG: ; e552f (39:552f)

View File

@ -1355,7 +1355,7 @@ Function822f0: ; 822f0
and 3 and 3
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, .jumptable ld hl, .dw
rept 2 rept 2
add hl, de add hl, de
endr endr
@ -1365,7 +1365,7 @@ endr
jp [hl] jp [hl]
; 82301 ; 82301
.jumptable: ; 82301 .dw: ; 82301
dw Function82309 dw Function82309
dw Function82339 dw Function82339
dw Function8234b dw Function8234b

View File

@ -104,7 +104,7 @@ _KrisDecorationMenu: ; 0x2675c
ret ret
.FindOwndDecos: ; 2683a (9:683a) .FindOwndDecos: ; 2683a (9:683a)
ld hl, .jumptable ld hl, .dw
.loop .loop
ld a, [hli] ld a, [hli]
ld e, a ld e, a
@ -127,7 +127,7 @@ _KrisDecorationMenu: ; 0x2675c
ret ret
; 26855 (9:6855) ; 26855 (9:6855)
.jumptable: ; 26855 .dw: ; 26855
dwb FindOwnedBeds, 0 ; bed dwb FindOwnedBeds, 0 ; bed
dwb FindOwnedCarpets, 1 ; carpet dwb FindOwnedCarpets, 1 ; carpet
dwb FindOwnedPlants, 2 ; plant dwb FindOwnedPlants, 2 ; plant

View File

@ -37,9 +37,8 @@ EngineFlagAction:: ; 80430
.read .read
ld hl, EngineFlags ld hl, EngineFlags
; location ; location
rept 2
add hl, de add hl, de
endr add hl, de
; bit ; bit
add hl, de add hl, de

View File

@ -771,9 +771,8 @@ TryReadSign: ; 96a38
push hl push hl
call PlayTalkObject call PlayTalkObject
pop hl pop hl
rept 2
inc hl inc hl
endr inc hl
call GetMapScriptHeaderBank call GetMapScriptHeaderBank
call GetFarHalfword call GetFarHalfword
call GetMapScriptHeaderBank call GetMapScriptHeaderBank

View File

@ -514,7 +514,7 @@ CmdQueue_Null2: ; 97eb8
CmdQueue_Type4: ; 97ebc CmdQueue_Type4: ; 97ebc
call CmdQueueAnonymousJumptable call CmdQueueAnonymousJumptable
; anonymous jumptable ; anonymous dw
dw .zero dw .zero
dw .one dw .one
; 97ec3 ; 97ec3
@ -560,7 +560,7 @@ CmdQueue_Type4: ; 97ebc
CmdQueue_Type3: ; 97ef9 CmdQueue_Type3: ; 97ef9
call CmdQueueAnonymousJumptable call CmdQueueAnonymousJumptable
; anonymous jumptable ; anonymous dw
dw .zero dw .zero
dw .one dw .one
dw .two dw .two

View File

@ -55,7 +55,7 @@ ReturnFromMapSetupScript:: ; b8000
ld [rWY], a ld [rWY], a
ld [hWY], a ld [hWY], a
xor a xor a
ld [hLCDStatCustom], a ld [hFFC6], a
ret ret
; b8064 ; b8064
@ -126,7 +126,7 @@ PlaceMapNameSign:: ; b8098 (2e:4098)
ld [rWY], a ld [rWY], a
ld [hWY], a ld [hWY], a
xor a xor a
ld [hLCDStatCustom], a ld [hFFC6], a
ret ret

View File

@ -1041,7 +1041,7 @@ StartTitleScreen: ; 6219
call ClearScreen call ClearScreen
call WaitBGMap2 call WaitBGMap2
xor a xor a
ld [hLCDStatCustom], a ld [hFFC6], a
ld [hSCX], a ld [hSCX], a
ld [hSCY], a ld [hSCY], a
ld a, $7 ld a, $7
@ -1058,17 +1058,16 @@ StartTitleScreen: ; 6219
.ok .ok
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, .jumptable ld hl, .dw
rept 2 add hl, de
add hl, de add hl, de
endr
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp [hl]
; 626a ; 626a
.jumptable .dw
dw _MainMenu dw _MainMenu
dw DeleteSaveData dw DeleteSaveData
dw CrystalIntroSequence dw CrystalIntroSequence
@ -1113,9 +1112,8 @@ TitleScreenScene: ; 62a3
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, .scenes ld hl, .scenes
rept 2
add hl, de add hl, de
endr add hl, de
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
@ -1174,7 +1172,7 @@ TitleScreenEntrance: ; 62bc
ld hl, wJumptableIndex ld hl, wJumptableIndex
inc [hl] inc [hl]
xor a xor a
ld [hLCDStatCustom], a ld [hFFC6], a
; Play the title screen music. ; Play the title screen music.
ld de, MUSIC_TITLE ld de, MUSIC_TITLE
@ -1343,22 +1341,19 @@ Function639b: ; unreferenced
add hl, bc ; over-the-top compicated way to load wc3ae into hl add hl, bc ; over-the-top compicated way to load wc3ae into hl
ld l, [hl] ld l, [hl]
ld h, 0 ld h, 0
rept 2
add hl, hl add hl, hl
endr add hl, hl
ld de, Data63ca ld de, Data63ca
add hl, de add hl, de
; If bit 2 of [wcf65] is set, get the second dw; else, get the first dw ; If bit 2 of [wcf65] is set, get the second dw; else, get the first dw
ld a, [wcf65] ld a, [wcf65]
and %00000100 and %00000100
rept 2
srl a srl a
endr srl a
ld e, a ld e, a
ld d, 0 ld d, 0
rept 2
add hl, de add hl, de
endr add hl, de
ld a, [hli] ld a, [hli]
and a and a
ret z ret z

View File

@ -54,13 +54,13 @@ MainMenu: ; 49cdc
db "MOBILE STUDIUM@" db "MOBILE STUDIUM@"
.Jumptable: ; 0x49d60 .Jumptable: ; 0x49d60
jumptable_start
jumptable MainMenu_Continue dw MainMenu_Continue
jumptable MainMenu_NewGame dw MainMenu_NewGame
jumptable MainMenu_Options dw MainMenu_Options
jumptable MainMenu_MysteryGift dw MainMenu_MysteryGift
jumptable MainMenu_Mobile dw MainMenu_Mobile
jumptable MainMenu_MobileStudium dw MainMenu_MobileStudium
; 0x49d6c ; 0x49d6c
CONTINUE EQU 0 CONTINUE EQU 0

View File

@ -233,9 +233,8 @@ Function444d: ; 444d
ld a, [hl] ld a, [hl]
ld l, a ld l, a
ld h, 0 ld h, 0
rept 2
add hl,hl add hl,hl
endr add hl,hl
add hl, de add hl, de
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
@ -676,9 +675,8 @@ InitStep: ; 4690
add hl, bc add hl, bc
bit FIXED_FACING, [hl] bit FIXED_FACING, [hl]
jr nz, GetNextTile jr nz, GetNextTile
rept 2
add a add a
endr add a
and %00001100 and %00001100
ld hl, OBJECT_FACING ld hl, OBJECT_FACING
add hl, bc add hl, bc
@ -746,9 +744,8 @@ GetStepVector: ; 46e9
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
and %00001111 and %00001111
rept 2
add a add a
endr add a
ld l, a ld l, a
ld h, 0 ld h, 0
ld de, StepVectors ld de, StepVectors
@ -888,7 +885,7 @@ IncrementObjectStructField28: ; 47a2
; 47a8 ; 47a8
Object28AnonymousJumptable: ; 47a8 Object28AnonymousJumptable: ; 47a8
; anonymous jumptable ; anonymous dw
ld hl, OBJECT_28 ld hl, OBJECT_28
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
@ -942,35 +939,35 @@ MapObjectMovementPattern: ; 47dd
; 47e9 ; 47e9
.Pointers ; 47e9 .Pointers ; 47e9
jumptable_start
jumptable .Null_00 ; 00 dw .Null_00 ; 00
jumptable .RandomWalkY ; 01 dw .RandomWalkY ; 01
jumptable .RandomWalkX ; 02 dw .RandomWalkX ; 02
jumptable .RandomWalkXY ; 03 dw .RandomWalkXY ; 03
jumptable .RandomSpin1 ; 04 dw .RandomSpin1 ; 04
jumptable .RandomSpin2 ; 05 dw .RandomSpin2 ; 05
jumptable .Standing ; 06 dw .Standing ; 06
jumptable .ObeyDPad ; 07 dw .ObeyDPad ; 07
jumptable .Movement08 ; 08 dw .Movement08 ; 08
jumptable .Movement09 ; 09 dw .Movement09 ; 09
jumptable .Movement0a ; 0a dw .Movement0a ; 0a
jumptable .Movement0b ; 0b dw .Movement0b ; 0b
jumptable .Movement0c ; 0c dw .Movement0c ; 0c
jumptable .Movement0d ; 0d dw .Movement0d ; 0d
jumptable .Movement0e ; 0e dw .Movement0e ; 0e
jumptable .Follow ; 0f dw .Follow ; 0f
jumptable .Script ; 10 dw .Script ; 10
jumptable .Strength ; 11 dw .Strength ; 11
jumptable .FollowNotExact ; 12 dw .FollowNotExact ; 12
jumptable .MovementShadow ; 13 dw .MovementShadow ; 13
jumptable .MovementEmote ; 14 dw .MovementEmote ; 14
jumptable .MovementBigStanding ; 15 dw .MovementBigStanding ; 15
jumptable .MovementBouncing ; 16 dw .MovementBouncing ; 16
jumptable .MovementScreenShake ; 17 dw .MovementScreenShake ; 17
jumptable .MovementSpinClockwise ; 18 dw .MovementSpinClockwise ; 18
jumptable .MovementSpinCounterclockwise ; 19 dw .MovementSpinCounterclockwise ; 19
jumptable .MovementBoulderDust ; 1a dw .MovementBoulderDust ; 1a
jumptable .MovementShakingGrass ; 1b dw .MovementShakingGrass ; 1b
; 4821 ; 4821
.Null_00: ; 4821 .Null_00: ; 4821
@ -1390,9 +1387,8 @@ MapObjectMovementPattern: ; 47dd
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, .data_4a81 ld hl, .data_4a81
rept 2
add hl,de add hl,de
endr add hl,de
ld d, [hl] ld d, [hl]
inc hl inc hl
ld e, [hl] ld e, [hl]
@ -1549,33 +1545,33 @@ SetRandomStepDuration: ; 4b2d
Pointers4b45: ; 4b45 Pointers4b45: ; 4b45
; These pointers use OBJECT_STEP_TYPE. See constants/sprite_constants.asm ; These pointers use OBJECT_STEP_TYPE. See constants/sprite_constants.asm
jumptable_start
jumptable ObjectMovementReset ; 00 dw ObjectMovementReset ; 00
jumptable MapObjectMovementPattern ; 01 dw MapObjectMovementPattern ; 01
jumptable NPCStep ; 02 npc walk dw NPCStep ; 02 npc walk
jumptable Function4ddd ; 03 dw Function4ddd ; 03
jumptable Function4e21 ; 04 dw Function4e21 ; 04
jumptable Function4e0c ; 05 dw Function4e0c ; 05
jumptable PlayerStep ; 06 player walk dw PlayerStep ; 06 player walk
jumptable Function4e47 ; 07 dw Function4e47 ; 07
jumptable NPCJump ; 08 npc jump step dw NPCJump ; 08 npc jump step
jumptable PlayerJump ; 09 player jump step dw PlayerJump ; 09 player jump step
jumptable PlayerOrNPCHalfStep ; 0a half step dw PlayerOrNPCHalfStep ; 0a half step
jumptable Function4dff ; 0b dw Function4dff ; 0b
jumptable TeleportFrom ; 0c teleport from dw TeleportFrom ; 0c teleport from
jumptable TeleportTo ; 0d teleport to dw TeleportTo ; 0d teleport to
jumptable Skyfall ; 0e skyfall dw Skyfall ; 0e skyfall
jumptable Function4ecd ; 0f dw Function4ecd ; 0f
jumptable GotBiteStep ; 10 dw GotBiteStep ; 10
jumptable RockSmashStep ; 11 dw RockSmashStep ; 11
jumptable ReturnDigStep ; 12 dw ReturnDigStep ; 12
jumptable Function4f04 ; 13 dw Function4f04 ; 13
jumptable Function4f33 ; 14 dw Function4f33 ; 14
jumptable Function4f33 ; 15 dw Function4f33 ; 15
jumptable Function4f77 ; 16 dw Function4f77 ; 16
jumptable Function4f7a ; 17 dw Function4f7a ; 17
jumptable Function4df0 ; 18 dw Function4df0 ; 18
jumptable SkyfallTop ; 19 dw SkyfallTop ; 19
; 4b79 ; 4b79
Function4b79: ; 4b79 Function4b79: ; 4b79
@ -1591,7 +1587,7 @@ Function4b79: ; 4b79
NPCJump: ; 4b86 NPCJump: ; 4b86
call Object28AnonymousJumptable call Object28AnonymousJumptable
; anonymous jumptable ; anonymous dw
dw Function4b8d dw Function4b8d
dw Function4ba9 dw Function4ba9
; 4b8d ; 4b8d
@ -1628,7 +1624,7 @@ Function4ba9: ; 4ba9
PlayerJump: ; 4bbf PlayerJump: ; 4bbf
call Object28AnonymousJumptable call Object28AnonymousJumptable
; anonymous jumptable ; anonymous dw
dw .initjump dw .initjump
dw .stepjump dw .stepjump
dw .initland dw .initland
@ -1680,7 +1676,7 @@ PlayerJump: ; 4bbf
TeleportFrom: ; 4c18 TeleportFrom: ; 4c18
call Object28AnonymousJumptable call Object28AnonymousJumptable
; anonymous jumptable ; anonymous dw
dw Function4c23 dw Function4c23
dw Function4c32 dw Function4c32
dw Function4c42 dw Function4c42
@ -1751,7 +1747,7 @@ Function4c5d: ; 4c5d
TeleportTo: ; 4c89 TeleportTo: ; 4c89
call Object28AnonymousJumptable call Object28AnonymousJumptable
; anonymous jumptable ; anonymous dw
dw Function4c9a dw Function4c9a
dw Function4caa dw Function4caa
dw Function4cb3 dw Function4cb3
@ -1843,7 +1839,7 @@ Function4d01: ; 4d01
Skyfall: ; 4d14 Skyfall: ; 4d14
call Object28AnonymousJumptable call Object28AnonymousJumptable
; anonymous jumptable ; anonymous dw
dw Function4d1f dw Function4d1f
dw Function4d2e dw Function4d2e
dw Function4d4f dw Function4d4f
@ -1908,7 +1904,7 @@ Function4d6b: ; 4d6b
GotBiteStep: ; 4d7e GotBiteStep: ; 4d7e
call Object28AnonymousJumptable call Object28AnonymousJumptable
; anonymous jumptable ; anonymous dw
dw Function4d85 dw Function4d85
dw Function4d94 dw Function4d94
; 4d85 ; 4d85
@ -2015,7 +2011,7 @@ Function4dff: ; 4dff
Function4e0c: ; 4e0c Function4e0c: ; 4e0c
call Object28AnonymousJumptable call Object28AnonymousJumptable
; anonymous jumptable ; anonymous dw
dw Function4e13 dw Function4e13
dw Function4e21 dw Function4e21
; 4e13 ; 4e13
@ -2065,7 +2061,7 @@ Function4e47: ; 4e47
PlayerStep: ; 4e56 PlayerStep: ; 4e56
; AnimateStep? ; AnimateStep?
call Object28AnonymousJumptable call Object28AnonymousJumptable
; anonymous jumptable ; anonymous dw
dw .init dw .init
dw .step dw .step
; 4e5d ; 4e5d
@ -2095,7 +2091,7 @@ PlayerStep: ; 4e56
PlayerOrNPCHalfStep: ; 4e83 PlayerOrNPCHalfStep: ; 4e83
call Object28AnonymousJumptable call Object28AnonymousJumptable
; anonymous jumptable ; anonymous dw
dw .init1 dw .init1
dw .step1 dw .step1
dw .init2 dw .init2
@ -2211,7 +2207,7 @@ Function4f04: ; 4f04
Function4f33: ; 4f33 Function4f33: ; 4f33
call Object28AnonymousJumptable call Object28AnonymousJumptable
; anonymous jumptable ; anonymous dw
dw Function4f3a dw Function4f3a
dw Function4f43 dw Function4f43
; 4f3a ; 4f3a
@ -2266,7 +2262,7 @@ Function4f77: ; 4f77
Function4f7a: ; 4f7a Function4f7a: ; 4f7a
call Object28AnonymousJumptable call Object28AnonymousJumptable
; anonymous jumptable ; anonymous dw
dw SkyfallTop dw SkyfallTop
dw SkyfallTop dw SkyfallTop
dw SkyfallTop dw SkyfallTop
@ -2274,7 +2270,7 @@ Function4f7a: ; 4f7a
SkyfallTop: ; 4f83 SkyfallTop: ; 4f83
call Object28AnonymousJumptable call Object28AnonymousJumptable
; anonymous jumptable ; anonymous dw
dw Function4f8a dw Function4f8a
dw Function4f99 dw Function4f99
; 4f8a ; 4f8a
@ -3060,9 +3056,8 @@ SpawnInCustomFacing: ; 57ca
ret z ret z
ld a, [wPlayerSpriteSetupFlags] ld a, [wPlayerSpriteSetupFlags]
and 3 and 3
rept 2
add a add a
endr add a
jr ContinueSpawnFacing jr ContinueSpawnFacing
; 57d9 ; 57d9
@ -3650,9 +3645,8 @@ PRIORITY_HIGH EQU $30
ld c, a ld c, a
ld b, 0 ld b, 0
ld hl, .Addresses ld hl, .Addresses
rept 2
add hl,bc add hl,bc
endr add hl,bc
ld c, [hl] ld c, [hl]
inc hl inc hl
ld b, [hl] ld b, [hl]

View File

@ -6,9 +6,8 @@ RunMapSetupScript:: ; 15363
ld c, a ld c, a
ld b, 0 ld b, 0
ld hl, MapSetupScripts ld hl, MapSetupScripts
rept 2
add hl, bc add hl, bc
endr add hl, bc
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a

View File

@ -841,12 +841,12 @@ SellMenu: ; 15eb3
.TryToSellItem: ; 15ee0 .TryToSellItem: ; 15ee0
callba CheckItemMenu callba CheckItemMenu
ld a, [wItemAttributeParamBuffer] ld a, [wItemAttributeParamBuffer]
ld hl, .jumptable ld hl, .dw
rst JumpTable rst JumpTable
ret ret
; 15eee ; 15eee
.jumptable: ; 15eee .dw: ; 15eee
dw .try_sell dw .try_sell
dw .cant_buy dw .cant_buy
dw .cant_buy dw .cant_buy

View File

@ -27,7 +27,7 @@ Function8e83f: ; 8e83f
Function8e849: ; 8e849 Function8e849: ; 8e849
ld d, 0 ld d, 0
ld hl, .jumptable ld hl, .dw
rept 2 rept 2
add hl, de add hl, de
endr endr
@ -38,7 +38,7 @@ endr
; 8e854 ; 8e854
.jumptable: ; 8e854 (23:6854) .dw: ; 8e854 (23:6854)
dw Function8e8d5 ; init dw Function8e8d5 ; init
dw Function8e961 dw Function8e961
dw Function8e97d dw Function8e97d

View File

@ -193,9 +193,8 @@ endr
inc de inc de
push hl push hl
push de push de
rept 2
inc hl inc hl
endr inc hl
call FillPP call FillPP
pop de pop de
pop hl pop hl
@ -636,9 +635,8 @@ SentGetPkmnIntoFromBox: ; db3f
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
cp EGG cp EGG
jr z, .egg jr z, .egg
rept 2
inc hl inc hl
endr inc hl
ld a, [hli] ld a, [hli]
ld [de], a ld [de], a
ld a, [hl] ld a, [hl]
@ -1423,9 +1421,8 @@ CalcPkmnStatC: ; e17b
ld a, c ld a, c
cp STAT_SDEF cp STAT_SDEF
jr nz, .not_spdef jr nz, .not_spdef
rept 2
dec hl dec hl
endr dec hl
.not_spdef .not_spdef
sla c sla c
@ -1469,9 +1466,8 @@ endr
ld b, a ld b, a
ld a, [hli] ld a, [hli]
and $1 and $1
rept 2
add a add a
endr add a
add b add b
ld b, a ld b, a
ld a, [hl] ld a, [hl]
@ -1673,9 +1669,8 @@ GivePoke:: ; e277
ld a, [ScriptBank] ld a, [ScriptBank]
call FarCopyBytes call FarCopyBytes
pop hl pop hl
rept 2
inc hl inc hl
endr inc hl
ld a, [ScriptBank] ld a, [ScriptBank]
call GetFarHalfword call GetFarHalfword
pop bc pop bc

View File

@ -211,9 +211,8 @@ DoMysteryGift: ; 1048ba (41:48ba)
ld hl, sDailyMysteryGiftPartnerIDs ; inc hl ld hl, sDailyMysteryGiftPartnerIDs ; inc hl
ld e, a ld e, a
ld d, $0 ld d, $0
rept 2
add hl, de add hl, de
endr add hl, de
ld a, [wMysteryGiftPartnerID] ld a, [wMysteryGiftPartnerID]
ld [hli], a ld [hli], a
ld a, [wMysteryGiftPartnerID + 1] ld a, [wMysteryGiftPartnerID + 1]
@ -1062,9 +1061,8 @@ Function105033: ; 105033 (41:5033)
Function105038: ; 105038 (41:5038) Function105038: ; 105038 (41:5038)
ld a, $20 ld a, $20
ld [rJOYP], a ld [rJOYP], a
rept 2
ld a, [rJOYP] ld a, [rJOYP]
endr ld a, [rJOYP]
cpl cpl
and $f and $f
swap a swap a

View File

@ -28,18 +28,18 @@ Pack: ; 10000
; 10030 ; 10030
.Jumptable: ; 10030 (4:4030) .Jumptable: ; 10030 (4:4030)
jumptable_start
jumptable .InitGFX ; 0 dw .InitGFX ; 0
jumptable .InitItemsPocket ; 1 dw .InitItemsPocket ; 1
jumptable .ItemsPocketMenu ; 2 dw .ItemsPocketMenu ; 2
jumptable .InitBallsPocket ; 3 dw .InitBallsPocket ; 3
jumptable .BallsPocketMenu ; 4 dw .BallsPocketMenu ; 4
jumptable .InitKeyItemsPocket ; 5 dw .InitKeyItemsPocket ; 5
jumptable .KeyItemsPocketMenu ; 6 dw .KeyItemsPocketMenu ; 6
jumptable .InitTMHMPocket ; 7 dw .InitTMHMPocket ; 7
jumptable .TMHMPocketMenu ; 8 dw .TMHMPocketMenu ; 8
jumptable Pack_QuitNoScript ; 9 dw Pack_QuitNoScript ; 9
jumptable Pack_QuitRunScript ; 10 dw Pack_QuitRunScript ; 10
.InitGFX: ; 10046 (4:4046) .InitGFX: ; 10046 (4:4046)
xor a xor a
@ -163,9 +163,9 @@ Pack: ; 10000
; 0x10137 ; 0x10137
.Jumptable1: ; 10137 .Jumptable1: ; 10137
jumptable_start
jumptable .UseItem dw .UseItem
jumptable QuitItemSubmenu dw QuitItemSubmenu
; 1013b ; 1013b
@ -328,12 +328,12 @@ MenuDataHeader_UsableKeyItem: ; 0x10249
; 0x1026a ; 0x1026a
Jumptable_UseGiveTossRegisterQuit: ; 1026a Jumptable_UseGiveTossRegisterQuit: ; 1026a
jumptable_start
jumptable UseItem dw UseItem
jumptable GiveItem dw GiveItem
jumptable TossMenu dw TossMenu
jumptable RegisterItem dw RegisterItem
jumptable QuitItemSubmenu dw QuitItemSubmenu
; 10274 ; 10274
MenuDataHeader_UsableItem: ; 0x10274 MenuDataHeader_UsableItem: ; 0x10274
@ -354,11 +354,11 @@ MenuDataHeader_UsableItem: ; 0x10274
; 0x10291 ; 0x10291
Jumptable_UseGiveTossQuit: ; 10291 Jumptable_UseGiveTossQuit: ; 10291
jumptable_start
jumptable UseItem dw UseItem
jumptable GiveItem dw GiveItem
jumptable TossMenu dw TossMenu
jumptable QuitItemSubmenu dw QuitItemSubmenu
; 10299 ; 10299
MenuDataHeader_UnusableItem: ; 0x10299 MenuDataHeader_UnusableItem: ; 0x10299
@ -377,9 +377,9 @@ MenuDataHeader_UnusableItem: ; 0x10299
; 0x102ac ; 0x102ac
Jumptable_UseQuit: ; 102ac Jumptable_UseQuit: ; 102ac
jumptable_start
jumptable UseItem dw UseItem
jumptable QuitItemSubmenu dw QuitItemSubmenu
; 102b0 ; 102b0
MenuDataHeader_UnusableKeyItem: ; 0x102b0 MenuDataHeader_UnusableKeyItem: ; 0x102b0
@ -399,10 +399,10 @@ MenuDataHeader_UnusableKeyItem: ; 0x102b0
; 0x102c7 ; 0x102c7
Jumptable_UseRegisterQuit: ; 102c7 Jumptable_UseRegisterQuit: ; 102c7
jumptable_start
jumptable UseItem dw UseItem
jumptable RegisterItem dw RegisterItem
jumptable QuitItemSubmenu dw QuitItemSubmenu
; 102cd ; 102cd
MenuDataHeader_HoldableKeyItem: ; 0x102cd MenuDataHeader_HoldableKeyItem: ; 0x102cd
@ -423,11 +423,11 @@ MenuDataHeader_HoldableKeyItem: ; 0x102cd
; 0x102ea ; 0x102ea
Jumptable_GiveTossRegisterQuit: ; 102ea Jumptable_GiveTossRegisterQuit: ; 102ea
jumptable_start
jumptable GiveItem dw GiveItem
jumptable TossMenu dw TossMenu
jumptable RegisterItem dw RegisterItem
jumptable QuitItemSubmenu dw QuitItemSubmenu
; 102f2 ; 102f2
MenuDataHeader_HoldableItem: ; 0x102f2 MenuDataHeader_HoldableItem: ; 0x102f2
@ -447,30 +447,30 @@ MenuDataHeader_HoldableItem: ; 0x102f2
; 0x1030b ; 0x1030b
Jumptable_GiveTossQuit: ; 1030b Jumptable_GiveTossQuit: ; 1030b
jumptable_start
jumptable GiveItem dw GiveItem
jumptable TossMenu dw TossMenu
jumptable QuitItemSubmenu dw QuitItemSubmenu
; 10311 ; 10311
UseItem: ; 10311 UseItem: ; 10311
callba CheckItemMenu callba CheckItemMenu
ld a, [wItemAttributeParamBuffer] ld a, [wItemAttributeParamBuffer]
ld hl, .jumptable ld hl, .dw
rst JumpTable rst JumpTable
ret ret
; 1031f ; 1031f
.jumptable: ; 1031f (4:431f) .dw: ; 1031f (4:431f)
jumptable_start
jumptable .Oak dw .Oak
jumptable .Oak dw .Oak
jumptable .Oak dw .Oak
jumptable .Oak dw .Oak
jumptable .Current dw .Current
jumptable .Party dw .Party
jumptable .Field dw .Field
; 1035c ; 1035c
.Oak: ; 1032d (4:432d) .Oak: ; 1032d (4:432d)
@ -694,18 +694,18 @@ BattlePack: ; 10493
; 104c3 ; 104c3
.Jumptable: ; 104c3 (4:44c3) .Jumptable: ; 104c3 (4:44c3)
jumptable_start
jumptable .InitGFX ; 0 dw .InitGFX ; 0
jumptable .InitItemsPocket ; 1 dw .InitItemsPocket ; 1
jumptable .ItemsPocketMenu ; 2 dw .ItemsPocketMenu ; 2
jumptable .InitBallsPocket ; 3 dw .InitBallsPocket ; 3
jumptable .BallsPocketMenu ; 4 dw .BallsPocketMenu ; 4
jumptable .InitKeyItemsPocket ; 5 dw .InitKeyItemsPocket ; 5
jumptable .KeyItemsPocketMenu ; 6 dw .KeyItemsPocketMenu ; 6
jumptable .InitTMHMPocket ; 7 dw .InitTMHMPocket ; 7
jumptable .TMHMPocketMenu ; 8 dw .TMHMPocketMenu ; 8
jumptable Pack_QuitNoScript ; 9 dw Pack_QuitNoScript ; 9
jumptable Pack_QuitRunScript ; 10 dw Pack_QuitRunScript ; 10
.InitGFX: ; 104d9 (4:44d9) .InitGFX: ; 104d9 (4:44d9)
xor a xor a
@ -865,9 +865,9 @@ TMHMSubmenu: ; 105dc (4:45dc)
; 0x10614 ; 0x10614
.UsableJumptable: ; 10614 .UsableJumptable: ; 10614
jumptable_start
jumptable .Use dw .Use
jumptable .Quit dw .Quit
; 10618 ; 10618
.UnusableMenuDataHeader: ; 0x10618 .UnusableMenuDataHeader: ; 0x10618
@ -885,8 +885,8 @@ TMHMSubmenu: ; 105dc (4:45dc)
; 0x10627 ; 0x10627
.UnusableJumptable: ; 10627 .UnusableJumptable: ; 10627
jumptable_start
jumptable .Quit dw .Quit
; 10629 ; 10629
.Use: ; 10629 .Use: ; 10629
@ -897,14 +897,14 @@ TMHMSubmenu: ; 105dc (4:45dc)
ret ret
.ItemFunctionJumptable: ; 10637 (4:4637) .ItemFunctionJumptable: ; 10637 (4:4637)
jumptable_start
jumptable .Oak dw .Oak
jumptable .Oak dw .Oak
jumptable .Oak dw .Oak
jumptable .Oak dw .Oak
jumptable .Unused dw .Unused
jumptable .BattleField dw .BattleField
jumptable .BattleOnly dw .BattleOnly
.Oak: ; 10645 (4:4645) .Oak: ; 10645 (4:4645)
ld hl, Text_ThisIsntTheTime ld hl, Text_ThisIsntTheTime
@ -942,7 +942,7 @@ TMHMSubmenu: ; 105dc (4:45dc)
cp $2 cp $2
jr z, .didnt_use_item jr z, .didnt_use_item
.quit_run_script: ; 1067e (4:467e) .quit_run_script: ; 1067e (4:467e)
ld a, Pack_QuitRunScriptTableIndex ld a, 10
ld [wJumptableIndex], a ld [wJumptableIndex], a
ret ret
@ -1002,11 +1002,11 @@ DepositSellPack: ; 106be
; 106d1 ; 106d1
.Jumptable: ; 106d1 (4:46d1) .Jumptable: ; 106d1 (4:46d1)
jumptable_start
jumptable .ItemsPocket dw .ItemsPocket
jumptable .BallsPocket dw .BallsPocket
jumptable .KeyItemsPocket dw .KeyItemsPocket
jumptable .TMHMPocket dw .TMHMPocket
.ItemsPocket: ; 106d9 (4:46d9) .ItemsPocket: ; 106d9 (4:46d9)
xor a xor a
call InitPocket call InitPocket
@ -1142,18 +1142,18 @@ TutorialPack: ; 107bb
.RunJumptable: ; 107d7 .RunJumptable: ; 107d7
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
ld hl, .jumptable ld hl, .dw
call Pack_GetJumptablePointer call Pack_GetJumptablePointer
jp [hl] jp [hl]
; 107e1 ; 107e1
.jumptable: ; 107e1 (4:47e1) .dw: ; 107e1 (4:47e1)
jumptable_start
jumptable .Items dw .Items
jumptable .Balls dw .Balls
jumptable .KeyItems dw .KeyItems
jumptable .TMHM dw .TMHM
.Items: ; 107e9 (4:47e9) .Items: ; 107e9 (4:47e9)
xor a xor a
@ -1351,7 +1351,7 @@ Pack_InterpretJoypad: ; 108d4 (4:48d4)
ret ret
.b_button .b_button
ld a, Pack_QuitNoScriptTableIndex ld a, 9
ld [wJumptableIndex], a ld [wJumptableIndex], a
scf scf
ret ret

View File

@ -59,19 +59,19 @@ HandlePlayerStep: ; d4e5 (3:54e5)
ret ret
.Jumptable: ; d4f2 (3:54f2) .Jumptable: ; d4f2 (3:54f2)
jumptable_start
jumptable GetMovementPermissions dw GetMovementPermissions
jumptable BufferScreen dw BufferScreen
jumptable .mobile dw .mobile
jumptable .fail2 dw .fail2
; The rest are never used. Ever. ; The rest are never used. Ever.
jumptable .fail1 dw .fail1
jumptable .fail1 dw .fail1
jumptable .fail1 dw .fail1
jumptable .fail1 dw .fail1
jumptable .fail1 dw .fail1
jumptable .fail1 dw .fail1
jumptable .fail1 dw .fail1
.fail1: ; d508 (3:5508) .fail1: ; d508 (3:5508)
ret ret

View File

@ -472,14 +472,14 @@ Function158cc: ; 0x158cc
ld [wSpriteUpdatesEnabled], a ld [wSpriteUpdatesEnabled], a
callba CheckItemMenu callba CheckItemMenu
ld a, [wItemAttributeParamBuffer] ld a, [wItemAttributeParamBuffer]
ld hl, .jumptable ld hl, .dw
rst JumpTable rst JumpTable
pop af pop af
ld [wSpriteUpdatesEnabled], a ld [wSpriteUpdatesEnabled], a
ret ret
; 0x158e7 ; 0x158e7
.jumptable: ; 0x158e7 .dw: ; 0x158e7
dw .tossable dw .tossable
dw .no_toss dw .no_toss
dw .no_toss dw .no_toss

View File

@ -32,27 +32,27 @@ endr
.Jumptable: ; 84031 (21:4031) .Jumptable: ; 84031 (21:4031)
jumptable_start
jumptable Function84077 dw Function84077
jumptable Function84143 dw Function84143
jumptable Function84120 dw Function84120
jumptable Function84099 dw Function84099
jumptable Function84180 dw Function84180
jumptable Function8412e dw Function8412e
jumptable Function840c5 dw Function840c5
jumptable Function84180 dw Function84180
jumptable Function84120 dw Function84120
jumptable Function840de dw Function840de
jumptable Function84180 dw Function84180
jumptable Function84120 dw Function84120
jumptable Function841a1 dw Function841a1
jumptable Function84063 dw Function84063
jumptable Function8406d dw Function8406d
jumptable Function84120 dw Function84120
jumptable Function84103 dw Function84103
jumptable Function84071 dw Function84071
jumptable Function841b0 dw Function841b0
jumptable Function841b3 dw Function841b3
Function84059: ; 84059 (21:4059) Function84059: ; 84059 (21:4059)
@ -443,39 +443,39 @@ _PrinterReceive:: ; 842db
.Jumptable: ; 842ea (21:42ea) .Jumptable: ; 842ea (21:42ea)
jumptable_start
jumptable Function8432f dw Function8432f
jumptable Function84330 dw Function84330
jumptable Function84339 dw Function84339
jumptable Function84343 dw Function84343
jumptable Function8434d dw Function8434d
jumptable Function84357 dw Function84357
jumptable Function84361 dw Function84361
jumptable Function8438b dw Function8438b
jumptable Function84395 dw Function84395
jumptable Function8439f dw Function8439f
jumptable Function843a8 dw Function843a8
jumptable Function843b6 dw Function843b6
jumptable Function84330 dw Function84330
jumptable Function843c0 dw Function843c0
jumptable Function843c9 dw Function843c9
jumptable Function843c9 dw Function843c9
jumptable Function843c9 dw Function843c9
jumptable Function843c0 dw Function843c0
jumptable Function843c9 dw Function843c9
jumptable Function8439f dw Function8439f
jumptable Function843a8 dw Function843a8
jumptable Function843e6 dw Function843e6
jumptable Function84330 dw Function84330
jumptable Function843d2 dw Function843d2
jumptable Function843c9 dw Function843c9
jumptable Function843c9 dw Function843c9
jumptable Function843c9 dw Function843c9
jumptable Function843d2 dw Function843d2
jumptable Function843c9 dw Function843c9
jumptable Function8439f dw Function8439f
jumptable Function843a8 dw Function843a8
jumptable Function843b6 dw Function843b6
Function8432a: ; 8432a (21:432a) Function8432a: ; 8432a (21:432a)

View File

@ -862,9 +862,8 @@ Script_trainertext: ; 9710f
ld c, a ld c, a
ld b, 0 ld b, 0
ld hl, WalkingX ld hl, WalkingX
rept 2
add hl, bc add hl, bc
endr add hl, bc
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
@ -1127,9 +1126,8 @@ Script_faceplayer: ; 9722e
ld e, a ld e, a
callba GetRelativeFacing callba GetRelativeFacing
ld a, d ld a, d
rept 2
add a add a
endr add a
ld e, a ld e, a
ld a, [hLastTalked] ld a, [hLastTalked]
ld d, a ld d, a
@ -1162,9 +1160,8 @@ Script_faceperson: ; 97248
pop bc pop bc
ret c ret c
ld a, d ld a, d
rept 2
add a add a
endr add a
ld e, a ld e, a
ld d, c ld d, c
call ApplyPersonFacing call ApplyPersonFacing
@ -1185,9 +1182,8 @@ Script_spriteface: ; 97274
.ok .ok
ld d, a ld d, a
call GetScriptByte call GetScriptByte
rept 2
add a add a
endr add a
ld e, a ld e, a
call ApplyPersonFacing call ApplyPersonFacing
ret ret

View File

@ -211,42 +211,28 @@ endr
; 92844 ; 92844
SlotsJumptable: ; 92844 (24:6844) SlotsJumptable: ; 92844 (24:6844)
ld a, [wJumptableIndex] jumptable .Jumptable, 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]
; 92853 (24:6853) .Jumptable
dw Slots_Init ; 00
dw Slots_BetAndStart ; 01
.Jumptable: ; 92853 (24:6853) dw Slots_WaitStart ; 02
jumptable_start dw Slots_WaitReel1 ; 03
jumptable Slots_Init ; 00 dw Slots_WaitStopReel1 ; 04
jumptable Slots_BetAndStart ; 01 dw Slots_WaitReel2 ; 05
jumptable Slots_WaitStart ; 02 dw Slots_WaitStopReel2 ; 06
jumptable Slots_WaitReel1 ; 03 dw Slots_WaitReel3 ; 07
jumptable Slots_WaitStopReel1 ; 04 dw Slots_WaitStopReel3 ; 08
jumptable Slots_WaitReel2 ; 05 dw Slots_Next ; 09
jumptable Slots_WaitStopReel2 ; 06 dw Slots_Next ; 0a
jumptable Slots_WaitReel3 ; 07 dw Slots_Next ; 0b
jumptable Slots_WaitStopReel3 ; 08 dw Slots_FlashIfWin ; 0c
jumptable Slots_Next ; 09 dw Slots_FlashScreen ; 0d
jumptable Slots_Next ; 0a dw Slots_GiveEarnedCoins ; 0e
jumptable Slots_Next ; 0b dw Slots_PayoutTextAndAnim ; 0f
jumptable Slots_FlashIfWin ; 0c dw Slots_PayoutAnim ; 10
jumptable Slots_FlashScreen ; 0d dw Slots_RestartOrQuit ; 11
jumptable Slots_GiveEarnedCoins ; 0e dw Slots_Quit ; 12
jumptable Slots_PayoutTextAndAnim ; 0f
jumptable Slots_PayoutAnim ; 10
jumptable Slots_RestartOrQuit ; 11
jumptable Slots_Quit ; 12
Slots_Next: ; 92879 (24:6879) Slots_Next: ; 92879 (24:6879)
ld hl, wJumptableIndex ld hl, wJumptableIndex
@ -265,7 +251,7 @@ Slots_Init: ; 9287e (24:687e)
Slots_BetAndStart: ; 9288e (24:688e) Slots_BetAndStart: ; 9288e (24:688e)
call Slots_AskBet call Slots_AskBet
jr nc, .proceed jr nc, .proceed
ld a, Slots_QuitTableIndex ld a, 18
ld [wJumptableIndex], a ld [wJumptableIndex], a
ret ret
@ -275,7 +261,7 @@ Slots_BetAndStart: ; 9288e (24:688e)
call Slots_InitBias call Slots_InitBias
ld a, 32 ld a, 32
ld [wcf64], a ld [wcf64], a
ld a, 4 ; ReelAction_NormalRateTableIndex ld a, 4
ld [wReel1ReelAction], a ld [wReel1ReelAction], a
ld [wReel2ReelAction], a ld [wReel2ReelAction], a
ld [wReel3ReelAction], a ld [wReel3ReelAction], a
@ -455,12 +441,12 @@ Slots_RestartOrQuit: ; 929d9 (24:69d9)
call WaitPressAorB_BlinkCursor call WaitPressAorB_BlinkCursor
call Slots_AskPlayAgain call Slots_AskPlayAgain
jr c, .exit_slots jr c, .exit_slots
ld a, Slots_InitTableIndex ld a, 0
ld [wJumptableIndex], a ld [wJumptableIndex], a
ret ret
.exit_slots .exit_slots
ld a, Slots_QuitTableIndex ld a, 18
ld [wJumptableIndex], a ld [wJumptableIndex], a
ret ret
@ -804,10 +790,9 @@ Function92bd4: ; 92bd4 (24:6bd4)
add hl, bc add hl, bc
ld e, [hl] ld e, [hl]
ld d, 0 ld d, 0
ld hl, .jumptable ld hl, .dw
rept 2 add hl, de
add hl, de add hl, de
endr
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
@ -815,40 +800,33 @@ endr
; 92be4 (24:6be4) ; 92be4 (24:6be4)
.jumptable: ; 92be4 .dw: ; 92be4
jumptable_start
jumptable ReelAction_DoNothing ; 00
jumptable Slots_StopReelIgnoreJoypad ; 01
jumptable ReelAction_QuadrupleRate ; 02 dw ReelAction_DoNothing ; 00
jumptable ReelAction_DoubleRate ; 03 dw Slots_StopReelIgnoreJoypad ; 01
jumptable ReelAction_NormalRate ; 04 dw ReelAction_QuadrupleRate ; 02
jumptable ReelAction_HalfRate ; 05 dw ReelAction_DoubleRate ; 03
jumptable ReelAction_QuarterRate ; 06 dw ReelAction_NormalRate ; 04
dw ReelAction_HalfRate ; 05
jumptable ReelAction_StopReel1 ; 07 dw ReelAction_QuarterRate ; 06
jumptable ReelAction_StopReel2 ; 08 dw ReelAction_StopReel1 ; 07
jumptable ReelAction_StopReel3 ; 09 dw ReelAction_StopReel2 ; 08
dw ReelAction_StopReel3 ; 09
jumptable ReelAction_SetUpReel2SkipTo7 ; 0a dw ReelAction_SetUpReel2SkipTo7 ; 0a
jumptable ReelAction_WaitReel2SkipTo7 ; 0b dw ReelAction_WaitReel2SkipTo7 ; 0b
jumptable ReelAction_FastSpinReel2UntilLinedUp7s ; 0c dw ReelAction_FastSpinReel2UntilLinedUp7s ; 0c
dw ReelAction_BoringReelDrops ; 0d
jumptable ReelAction_BoringReelDrops ; 0d dw ReelAction_CheckDropReel ; 0e
jumptable ReelAction_CheckDropReel ; 0e dw ReelAction_WaitDropReel ; 0f
jumptable ReelAction_WaitDropReel ; 0f dw ReelAction_StartSlowAdvanceReel3 ; 10
dw ReelAction_WaitSlowAdvanceReel3 ; 11
jumptable ReelAction_StartSlowAdvanceReel3 ; 10 dw ReelAction_InitGolem ; 12
jumptable ReelAction_WaitSlowAdvanceReel3 ; 11 dw ReelAction_WaitGolem ; 13
dw ReelAction_EndGolem ; 14
jumptable ReelAction_InitGolem ; 12 dw Slots_InitChansey ; 15
jumptable ReelAction_WaitGolem ; 13 dw ReelAction_WaitChansey ; 16
jumptable ReelAction_EndGolem ; 14 dw ReelAction_WaitEgg ; 17
dw ReelAction_DropReel ; 18
jumptable Slots_InitChansey ; 15
jumptable ReelAction_WaitChansey ; 16
jumptable ReelAction_WaitEgg ; 17
jumptable ReelAction_DropReel ; 18
; 92c16 ; 92c16
ReelAction_DoNothing: ; 92c16 ReelAction_DoNothing: ; 92c16
@ -1205,9 +1183,8 @@ ReelAction_DropReel: ; 92dca
ld [hl], $0 ld [hl], $0
ld hl, wReel1ReelAction - wReel1 ld hl, wReel1ReelAction - wReel1
add hl, bc add hl, bc
rept 2
dec [hl] dec [hl]
endr dec [hl]
ld a, $1 ld a, $1
ld [wcf64], a ld [wcf64], a
ret ret
@ -1327,9 +1304,8 @@ Slots_CheckMatchedFirstTwoReels: ; 92e94
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, .Jumptable ld hl, .Jumptable
rept 2
add hl, de add hl, de
endr add hl, de
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
@ -1347,11 +1323,11 @@ endr
; 92ebd ; 92ebd
.Jumptable: ; 92ebd .Jumptable: ; 92ebd
jumptable_start
jumptable .zero dw .zero
jumptable .one dw .one
jumptable .two dw .two
jumptable .three dw .three
; 92ec5 ; 92ec5
.three: ; 92ec5 .three: ; 92ec5
@ -1439,9 +1415,8 @@ Slots_CheckMatchedAllThreeReels: ; 92f1d
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, .Jumptable ld hl, .Jumptable
rept 2
add hl, de add hl, de
endr add hl, de
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
@ -1463,11 +1438,11 @@ endr
; 92f48 ; 92f48
.Jumptable: ; 92f48 .Jumptable: ; 92f48
jumptable_start
jumptable .zero dw .zero
jumptable .one dw .one
jumptable .two dw .two
jumptable .three dw .three
; 92f50 ; 92f50
.three: ; 92f50 .three: ; 92f50
@ -1978,19 +1953,18 @@ SlotMachine_AnimateGolem: ; 9321d (24:721d)
ld e, [hl] ld e, [hl]
ld d, 0 ld d, 0
ld hl, .Jumptable ld hl, .Jumptable
rept 2
add hl, de add hl, de
endr add hl, de
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp [hl]
.Jumptable: ; 9322d (24:722d) .Jumptable: ; 9322d (24:722d)
jumptable_start
jumptable .init dw .init
jumptable .fall dw .fall
jumptable .roll dw .roll
.init: ; 93233 (24:7233) .init: ; 93233 (24:7233)
@ -2051,9 +2025,8 @@ endr
ld hl, SPRITEANIMSTRUCT_XOFFSET ld hl, SPRITEANIMSTRUCT_XOFFSET
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
rept 2
inc [hl] inc [hl]
endr inc [hl]
cp 9 * 8 cp 9 * 8
jr nc, .restart jr nc, .restart
and $3 and $3
@ -2081,19 +2054,18 @@ Slots_AnimateChansey: ; 932ac (24:72ac)
ld e, [hl] ld e, [hl]
ld d, 0 ld d, 0
ld hl, .Jumptable ld hl, .Jumptable
rept 2
add hl, de add hl, de
endr add hl, de
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp [hl]
.Jumptable: ; 932bc (24:72bc) .Jumptable: ; 932bc (24:72bc)
jumptable_start
jumptable .walk dw .walk
jumptable .one dw .one
jumptable .two dw .two
.walk: ; 932c2 (24:72c2) .walk: ; 932c2 (24:72c2)

View File

@ -4,53 +4,51 @@ DoAnimFrame: ; 8d24b
ld e, [hl] ld e, [hl]
ld d, 0 ld d, 0
ld hl, .Jumptable ld hl, .Jumptable
rept 2
add hl, de add hl, de
endr add hl, de
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp [hl]
; 8d25b ; 8d25b
.Jumptable: ; 8d25b (23:525b) .Jumptable: ; 8d25b (23:525b)
jumptable_start
jumptable .Null ; null dw .Null ; null
jumptable .one ; bouncing mon icon dw .one ; bouncing mon icon
jumptable .two ; bouncing mon icon, selected dw .two ; bouncing mon icon, selected
jumptable .three ; bouncing mon icon, menu open dw .three ; bouncing mon icon, menu open
jumptable .four dw .four
jumptable .five dw .five
jumptable .GameFreakLogo ; Game Freak logo dw .GameFreakLogo ; Game Freak logo
jumptable .seven dw .seven
jumptable .eight dw .eight
jumptable .SlotsGolem ; Something to do with slots dw .SlotsGolem ; Something to do with slots
jumptable .SlotsChansey ; Something to do with slots dw .SlotsChansey ; Something to do with slots
jumptable .SlotsChanseyEgg ; Something to do with slots dw .SlotsChanseyEgg ; Something to do with slots
jumptable .twelve ; blinking cursor dw .twelve ; blinking cursor
jumptable .thirteen dw .thirteen
jumptable .fourteen dw .fourteen
jumptable .fifteen dw .fifteen
jumptable .sixteen dw .sixteen
jumptable .seventeen dw .seventeen
jumptable .eighteen dw .eighteen
jumptable .EggShell ; finish egg hatching animation dw .EggShell ; finish egg hatching animation
jumptable .RadioTuningKnob ; radio tuning knob dw .RadioTuningKnob ; radio tuning knob
jumptable .twentyone ; cut grass leaves dw .twentyone ; cut grass leaves
jumptable .FlyFrom ; flying sprite dw .FlyFrom ; flying sprite
jumptable .FlyLeaf ; flying leaves dw .FlyLeaf ; flying leaves
jumptable .FlyTo ; fly to dw .FlyTo ; fly to
jumptable .twentyfive dw .twentyfive
jumptable .twentysix dw .twentysix
jumptable .twentyseven dw .twentyseven
jumptable .twentyeight dw .twentyeight
jumptable .twentynine ; intro suicune dw .twentynine ; intro suicune
jumptable .thirty ; intro pichu wooper dw .thirty ; intro pichu wooper
jumptable .thirtyone ; celebi dw .thirtyone ; celebi
jumptable .thirtytwo ; intro unown dw .thirtytwo ; intro unown
jumptable .thirtythree ; intro unown F with suicune leaping up dw .thirtythree ; intro unown F with suicune leaping up
jumptable .thirtyfour ; intro suicune facing away from us dw .thirtyfour ; intro suicune facing away from us
.Null: ; 8d2a1 (23:52a1) .Null: ; 8d2a1 (23:52a1)
@ -135,11 +133,11 @@ endr
ret ret
.four: ; 8d302 (23:5302) .four: ; 8d302 (23:5302)
call .anonymous_jumptable call .anonymous_dw
jp [hl] jp [hl]
; 8d306 (23:5306) ; 8d306 (23:5306)
; Anonymous jumptable (see .anonymous_jumptable) ; Anonymous dw (see .anonymous_dw)
dw .four_zero dw .four_zero
dw .four_one dw .four_one
; 8d30a ; 8d30a
@ -237,9 +235,8 @@ endr
ld a, [hl] ld a, [hl]
and a and a
jr z, .asm_8d3ba jr z, .asm_8d3ba
rept 2
dec [hl] dec [hl]
endr dec [hl]
ld d, a ld d, a
and $1f and $1f
jr nz, .asm_8d395 jr nz, .asm_8d395
@ -420,11 +417,11 @@ endr
ret ret
.sixteen: ; 8d483 (23:5483) .sixteen: ; 8d483 (23:5483)
call .anonymous_jumptable call .anonymous_dw
jp [hl] jp [hl]
; 8d487 (23:5487) ; 8d487 (23:5487)
; Anonymous jumptable (see .anonymous_jumptable) ; Anonymous dw (see .anonymous_dw)
dw .sixteen_zero dw .sixteen_zero
dw .sixteen_one dw .sixteen_one
dw .sixteen_two dw .sixteen_two
@ -554,9 +551,8 @@ endr
ld hl, SPRITEANIMSTRUCT_XCOORD ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
rept 2
inc [hl] inc [hl]
endr inc [hl]
cp $b0 cp $b0
jr nc, .asm_8d53f jr nc, .asm_8d53f
and $3 and $3
@ -669,9 +665,8 @@ endr
ld hl, SPRITEANIMSTRUCT_YCOORD ld hl, SPRITEANIMSTRUCT_YCOORD
add hl, bc add hl, bc
rept 2
dec [hl] dec [hl]
endr dec [hl]
ld hl, SPRITEANIMSTRUCT_0F ld hl, SPRITEANIMSTRUCT_0F
add hl, bc add hl, bc
@ -699,9 +694,8 @@ endr
ld a, [hl] ld a, [hl]
cp -9 * 8 cp -9 * 8
jr nc, .delete_leaf jr nc, .delete_leaf
rept 2
inc [hl] inc [hl]
endr inc [hl]
ld hl, SPRITEANIMSTRUCT_YCOORD ld hl, SPRITEANIMSTRUCT_YCOORD
add hl, bc add hl, bc
@ -732,9 +726,8 @@ endr
ld hl, SPRITEANIMSTRUCT_YCOORD ld hl, SPRITEANIMSTRUCT_YCOORD
add hl, bc add hl, bc
rept 2
inc [hl] inc [hl]
endr inc [hl]
ld hl, SPRITEANIMSTRUCT_0F ld hl, SPRITEANIMSTRUCT_0F
add hl, bc add hl, bc
@ -861,7 +854,7 @@ endr
callba UpdateCelebiPosition callba UpdateCelebiPosition
ret ret
.anonymous_jumptable: ; 8d6c5 (23:56c5) .anonymous_dw: ; 8d6c5 (23:56c5)
ld hl, [sp+$0] ld hl, [sp+$0]
ld e, [hl] ld e, [hl]
inc hl inc hl

View File

@ -46,7 +46,7 @@ DoNextFrameForAllSprites: ; 8cf7a
ld b, h ld b, h
push hl push hl
push de push de
call DoAnimFrame ; Uses a massive jumptable call DoAnimFrame ; Uses a massive dw
call UpdateAnimFrame call UpdateAnimFrame
pop de pop de
pop hl pop hl
@ -86,7 +86,7 @@ DoNextFrameForFirst16Sprites: ; 8cfa8 (23:4fa8)
ld b, h ld b, h
push hl push hl
push de push de
call DoAnimFrame ; Uses a massive jumptable call DoAnimFrame ; Uses a massive dw
call UpdateAnimFrame call UpdateAnimFrame
pop de pop de
pop hl pop hl
@ -188,13 +188,11 @@ endr
ld [hli], a ld [hli], a
; load 0 into the next four fields ; load 0 into the next four fields
xor a xor a
rept 2
ld [hli], a ld [hli], a
endr ld [hli], a
xor a xor a
rept 2
ld [hli], a ld [hli], a
endr ld [hli], a
; load -1 into the next field ; load -1 into the next field
dec a dec a
ld [hli], a ld [hli], a
@ -478,9 +476,8 @@ GetSpriteAnimFrame: ; 8d132
ld hl, SPRITEANIMSTRUCT_FRAME ld hl, SPRITEANIMSTRUCT_FRAME
add hl, bc add hl, bc
rept 2
dec [hl] dec [hl]
endr dec [hl]
jr .loop jr .loop
.restart .restart
@ -505,9 +502,8 @@ endr
ld e, [hl] ld e, [hl]
ld d, 0 ld d, 0
ld hl, SpriteAnimFrameData ld hl, SpriteAnimFrameData
rept 2
add hl, de add hl, de
endr add hl, de
ld e, [hl] ld e, [hl]
inc hl inc hl
ld d, [hl] ld d, [hl]
@ -536,9 +532,8 @@ BrokenGetStdGraphics: ; 8d1ac
push hl push hl
ld l, a ld l, a
ld h, 0 ld h, 0
rept 2
add hl, hl add hl, hl
endr add hl, hl
ld de, BrokenStdGFXPointers ; broken 2bpp pointers ld de, BrokenStdGFXPointers ; broken 2bpp pointers
add hl, de add hl, de
ld c, [hl] ld c, [hl]
@ -635,9 +630,8 @@ Sprites_Sine: ; 8e72c
ld a, d ld a, d
ld d, 0 ld d, 0
ld hl, .sinewave ld hl, .sinewave
rept 2
add hl, de add hl, de
endr add hl, de
ld e, [hl] ld e, [hl]
inc hl inc hl
ld d, [hl] ld d, [hl]
@ -677,9 +671,8 @@ AnimateEndOfExpBar: ; 8e79d
call .AnimateFrame call .AnimateFrame
call DelayFrame call DelayFrame
pop bc pop bc
rept 2
inc d inc d
endr inc d
dec c dec c
jr nz, .loop jr nz, .loop
call ClearSprites call ClearSprites

View File

@ -50,9 +50,8 @@ StartMenu:: ; 125cd
ld hl, .MenuReturns ld hl, .MenuReturns
ld e, a ld e, a
ld d, 0 ld d, 0
rept 2
add hl, de add hl, de
endr add hl, de
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
@ -235,9 +234,8 @@ endr
push de push de
ld a, [MenuSelection] ld a, [MenuSelection]
call .GetMenuAccountTextPointer call .GetMenuAccountTextPointer
rept 2
inc hl inc hl
endr inc hl
ld a, [hli] ld a, [hli]
ld d, [hl] ld d, [hl]
ld e, a ld e, a

View File

@ -100,15 +100,15 @@ StatsScreenBattle: ; 4dcf7
; 4dd2a ; 4dd2a
StatsScreenPointerTable: ; 4dd2a StatsScreenPointerTable: ; 4dd2a
jumptable_start
jumptable MonStatsInit ; regular pokémon dw MonStatsInit ; regular pokémon
jumptable EggStatsInit ; egg dw EggStatsInit ; egg
jumptable StatsScreenWaitCry dw StatsScreenWaitCry
jumptable EggStatsJoypad dw EggStatsJoypad
jumptable StatsScreen_LoadPage dw StatsScreen_LoadPage
jumptable StatsScreenWaitCry dw StatsScreenWaitCry
jumptable MonStatsJoypad dw MonStatsJoypad
jumptable StatsScreen_Exit dw StatsScreen_Exit
; 4dd3a ; 4dd3a
@ -157,12 +157,12 @@ MonStatsInit: ; 4dd72 (13:5d72)
call StatsScreen_InitUpperHalf call StatsScreen_InitUpperHalf
ld hl, wcf64 ld hl, wcf64
set 4, [hl] set 4, [hl]
ld h, StatsScreen_LoadPageTableIndex ld h, 4
call StatsScreen_SetJumptableIndex call StatsScreen_SetJumptableIndex
ret ret
.egg .egg
ld h, EggStatsInitTableIndex ld h, 1
call StatsScreen_SetJumptableIndex call StatsScreen_SetJumptableIndex
ret ret
@ -178,7 +178,7 @@ EggStatsInit: ; 4dda1
EggStatsJoypad: ; 4ddac (13:5dac) EggStatsJoypad: ; 4ddac (13:5dac)
call StatsScreen_GetJoypad call StatsScreen_GetJoypad
jr nc, .check jr nc, .check
ld h, MonStatsInitTableIndex ld h, 0
call StatsScreen_SetJumptableIndex call StatsScreen_SetJumptableIndex
ret ret
@ -189,7 +189,7 @@ EggStatsJoypad: ; 4ddac (13:5dac)
jp StatsScreen_JoypadAction jp StatsScreen_JoypadAction
.quit .quit
ld h, StatsScreen_ExitTableIndex ld h, 7
call StatsScreen_SetJumptableIndex call StatsScreen_SetJumptableIndex
ret ret
@ -205,7 +205,7 @@ StatsScreen_LoadPage: ; 4ddc6 (13:5dc6)
MonStatsJoypad: ; 4ddd6 (13:5dd6) MonStatsJoypad: ; 4ddd6 (13:5dd6)
call StatsScreen_GetJoypad call StatsScreen_GetJoypad
jr nc, .next jr nc, .next
ld h, MonStatsInitTableIndex ld h, 0
call StatsScreen_SetJumptableIndex call StatsScreen_SetJumptableIndex
ret ret
@ -360,17 +360,17 @@ StatsScreen_JoypadAction: ; 4de54 (13:5e54)
and %11111100 and %11111100
or c or c
ld [wcf64], a ld [wcf64], a
ld h, StatsScreen_LoadPageTableIndex ld h, 4
call StatsScreen_SetJumptableIndex call StatsScreen_SetJumptableIndex
ret ret
.load_mon .load_mon
ld h, MonStatsInitTableIndex ld h, 0
call StatsScreen_SetJumptableIndex call StatsScreen_SetJumptableIndex
ret ret
.b_button: ; 4dee4 (13:5ee4) .b_button: ; 4dee4 (13:5ee4)
ld h, StatsScreen_ExitTableIndex ld h, 7
call StatsScreen_SetJumptableIndex call StatsScreen_SetJumptableIndex
ret ret
@ -535,10 +535,10 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
ret ret
.Jumptable: ; 4e00d (13:600d) .Jumptable: ; 4e00d (13:600d)
jumptable_start
jumptable .PinkPage dw .PinkPage
jumptable .GreenPage dw .GreenPage
jumptable .BluePage dw .BluePage
.PinkPage: ; 4e013 (13:6013) .PinkPage: ; 4e013 (13:6013)

View File

@ -189,7 +189,7 @@ _TitleScreen: ; 10ed67
; Let LCD Stat know we're messing around with SCX ; Let LCD Stat know we're messing around with SCX
ld a, rSCX - rJOYP ld a, rSCX - rJOYP
ld [hLCDStatCustom], a ld [hFFC6], a
pop af pop af
ld [rSVBK], a ld [rSVBK], a

View File

@ -188,8 +188,8 @@ endr
; e12d9 ; e12d9
.Jumptable: ; e12d9 .Jumptable: ; e12d9
jumptable_start
jumptable .Function dw .Function
; e12db ; e12db
.Function: ; e12db .Function: ; e12db

View File

@ -273,9 +273,8 @@ PrintDayCareText: ; 1689b
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, .TextTable ld hl, .TextTable
rept 2
add hl, de add hl, de
endr add hl, de
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
@ -780,9 +779,8 @@ DayCare_InitBreeding: ; 16a3b
ld hl, wEggMonHappiness ld hl, wEggMonHappiness
ld [hli], a ld [hli], a
xor a xor a
rept 2
ld [hli], a ld [hli], a
endr ld [hli], a
ld [hl], a ld [hl], a
ld a, [CurPartyLevel] ld a, [CurPartyLevel]
ld [wEggMonLevel], a ld [wEggMonLevel], a

View File

@ -163,7 +163,7 @@ OWCutJumptable: ; 8ca0c
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, .jumptable ld hl, .dw
rept 2 rept 2
add hl, de add hl, de
endr endr
@ -174,7 +174,7 @@ endr
; 8ca1b ; 8ca1b
.jumptable: ; 8ca1b (23:4a1b) .dw: ; 8ca1b (23:4a1b)
dw Cut_SpawnAnimateTree dw Cut_SpawnAnimateTree
dw Cut_SpawnAnimateLeaves dw Cut_SpawnAnimateLeaves
dw Cut_StartWaiting dw Cut_StartWaiting

View File

@ -61,9 +61,9 @@ Special_MagnetTrain: ; 8cc04
ld [hVBlank], a ld [hVBlank], a
call ClearBGPalettes call ClearBGPalettes
xor a xor a
ld [hLCDStatCustom], a ld [hFFC6], a
ld [hLCDStatCustom + 1], a ld [hFFC7], a
ld [hLCDStatCustom + 2], a ld [hFFC8], a
ld [hSCX], a ld [hSCX], a
ld [Requested2bppSource], a ld [Requested2bppSource], a
ld [Requested2bppSource + 1], a ld [Requested2bppSource + 1], a
@ -254,7 +254,7 @@ MagnetTrain_InitLYOverrides: ; 8cda6
ld a, [wMagnetTrainInitPosition] ld a, [wMagnetTrainInitPosition]
call ByteFill call ByteFill
ld a, $43 ld a, $43
ld [hLCDStatCustom], a ld [hFFC6], a
ret ret
; 8cdc3 ; 8cdc3
@ -306,14 +306,14 @@ endr
; 8ce06 ; 8ce06
.Jumptable: ; 8ce06 .Jumptable: ; 8ce06
jumptable_start
jumptable .InitPlayerSpriteAnim dw .InitPlayerSpriteAnim
jumptable .WaitScene dw .WaitScene
jumptable .MoveTrain1 dw .MoveTrain1
jumptable .WaitScene dw .WaitScene
jumptable .MoveTrain2 dw .MoveTrain2
jumptable .WaitScene dw .WaitScene
jumptable .TrainArrived dw .TrainArrived
; 8ce14 ; 8ce14
.Next: ; 8ce14 .Next: ; 8ce14

View File

@ -22,7 +22,7 @@ Special_BankOfMom: ; 16218
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, .jumptable ld hl, .dw
rept 2 rept 2
add hl, de add hl, de
endr endr
@ -32,17 +32,17 @@ endr
jp [hl] jp [hl]
; 16242 ; 16242
.jumptable: ; 16242 .dw: ; 16242
jumptable_start
jumptable .CheckIfBankInitialized dw .CheckIfBankInitialized
jumptable .InitializeBank dw .InitializeBank
jumptable .IsThisAboutYourMoney dw .IsThisAboutYourMoney
jumptable .AccessBankOfMom dw .AccessBankOfMom
jumptable .StoreMoney dw .StoreMoney
jumptable .TakeMoney dw .TakeMoney
jumptable .StopOrStartSavingMoney dw .StopOrStartSavingMoney
jumptable .AskDST dw .AskDST
jumptable .JustDoWhatYouCan dw .JustDoWhatYouCan
; 16254 ; 16254
.CheckIfBankInitialized: ; 16254 .CheckIfBankInitialized: ; 16254

View File

@ -926,9 +926,8 @@ GetPokemonName:: ; 343b
ld e, a ld e, a
ld h, 0 ld h, 0
ld l, a ld l, a
rept 2
add hl, hl ; hl = hl * 4 add hl, hl ; hl = hl * 4
endr add hl, hl ; hl = hl * 4
add hl, de ; hl = (hl*4) + de add hl, de ; hl = (hl*4) + de
add hl, hl ; hl = (5*hl) + (5*hl) add hl, hl ; hl = (5*hl) + (5*hl)
ld de, PokemonNames ld de, PokemonNames
@ -1295,9 +1294,8 @@ HandleStoneQueue:: ; 3567
inc hl inc hl
.next_inc2 .next_inc2
rept 2
inc hl inc hl
endr inc hl
jr .loop2 jr .loop2
.nope3 .nope3
@ -1929,7 +1927,7 @@ INCLUDE "home/battle.asm"
Function3b0c:: ; 3b0c Function3b0c:: ; 3b0c
ld a, [hLCDStatCustom] ld a, [hFFC6]
and a and a
ret z ret z
@ -1992,12 +1990,10 @@ Function3eea:: ; 3eea
push bc push bc
ld de, AttrMap - TileMap ld de, AttrMap - TileMap
add hl, de add hl, de
rept 2
inc b inc b
endr inc b
rept 2 inc c
inc c inc c
endr
call Function3f35 call Function3f35
pop bc pop bc
pop hl pop hl
@ -2021,12 +2017,10 @@ Function3f0d:: ; 3f0d
push bc push bc
ld de, AttrMap - TileMap ld de, AttrMap - TileMap
add hl, de add hl, de
rept 2
inc b inc b
endr inc b
rept 2 inc c
inc c inc c
endr
call Function3f35 call Function3f35
pop bc pop bc
pop hl pop hl
@ -2147,9 +2141,8 @@ Function3f9f:: ; 3f9f
ld c, $8 ld c, $8
.asm_3fa5 .asm_3fa5
ld a, [de] ld a, [de]
rept 2
inc de inc de
endr inc de
cpl cpl
ld [hl], $0 ld [hl], $0
inc hl inc hl

View File

@ -3,7 +3,7 @@
Function547:: ; 547 Function547:: ; 547
; Unreferenced ; Unreferenced
ld a, [hLCDStatCustom] ld a, [hFFC6]
cp rSCX - $ff00 cp rSCX - $ff00
ret nz ret nz
ld c, a ld c, a
@ -15,7 +15,7 @@ Function547:: ; 547
LCD:: ; 552 LCD:: ; 552
push af push af
ld a, [hLCDStatCustom] ld a, [hFFC6]
and a and a
jr z, .done jr z, .done
@ -26,7 +26,7 @@ LCD:: ; 552
ld b, LYOverrides >> 8 ld b, LYOverrides >> 8
ld a, [bc] ld a, [bc]
ld b, a ld b, a
ld a, [hLCDStatCustom] ld a, [hFFC6]
ld c, a ld c, a
ld a, b ld a, b
ld [$ff00+c], a ld [$ff00+c], a

View File

@ -214,13 +214,11 @@ Coord2Tile:: ; 1d05
ld a, c ld a, c
ld b, h ld b, h
ld c, l ld c, l
rept 2
add hl, hl add hl, hl
endr add hl, hl
add hl, bc add hl, bc
rept 2
add hl, hl add hl, hl
endr add hl, hl
ld c, a ld c, a
xor a xor a
ld b, a ld b, a
@ -244,13 +242,11 @@ Coord2Attr:: ; 1d21
ld a, c ld a, c
ld b, h ld b, h
ld c, l ld c, l
rept 2
add hl, hl add hl, hl
endr add hl, hl
add hl, bc add hl, bc
rept 2
add hl, hl add hl, hl
endr add hl, hl
ld c, a ld c, a
xor a xor a
ld b, a ld b, a

View File

@ -77,9 +77,8 @@ endr
; We've done 2 16x8 blocks ; We've done 2 16x8 blocks
ld a, [hFFDC] ld a, [hFFDC]
rept 2
dec a dec a
endr dec a
ld [hFFDC], a ld [hFFDC], a
jr nz, .next jr nz, .next

View File

@ -76,8 +76,9 @@ hFFC1 EQU $ffc1
hFFC2 EQU $ffc2 hFFC2 EQU $ffc2
hMoneyTemp EQU $ffc3 hMoneyTemp EQU $ffc3
hLCDStatCustom EQU $ffc6 hFFC6 EQU $ffc6
hFFC7 EQU $ffc7
hFFC8 EQU $ffc8
hMobileReceive EQU $ffc9 hMobileReceive EQU $ffc9
hFFCA EQU $ffca hFFCA EQU $ffca
hLinkPlayerNumber EQU $ffcb hLinkPlayerNumber EQU $ffcb

View File

@ -1614,11 +1614,11 @@ GetItemHealingAction: ; f058 (3:7058)
; f09e ; f09e
StatusHealer_Jumptable: ; f09e (3:709e) StatusHealer_Jumptable: ; f09e (3:709e)
ld hl, .jumptable ld hl, .dw
rst JumpTable rst JumpTable
ret ret
.jumptable: ; f0a3 (3:70a3) .dw: ; f0a3 (3:70a3)
dw StatusHealer_ClearPalettes dw StatusHealer_ClearPalettes
dw StatusHealer_NoEffect dw StatusHealer_NoEffect
dw StatusHealer_ExitMenu dw StatusHealer_ExitMenu

View File

@ -74,7 +74,7 @@ Function110029: ; 110029 (44:4029)
Function110030:: ; 110030 (44:4030) Function110030:: ; 110030 (44:4030)
; Use the byte at $c988 as a parameter ; Use the byte at $c988 as a parameter
; for a jumptable. ; for a dw.
; If [$c988] in {12, 14, 16}, ; If [$c988] in {12, 14, 16},
; clear [$c835]. ; clear [$c835].
push de push de
@ -91,7 +91,7 @@ Function110030:: ; 110030 (44:4030)
.noreset .noreset
ld d, $0 ld d, $0
ld e, a ld e, a
ld hl, .jumptable ld hl, .dw
add hl, de add hl, de
ld a, [hli] ld a, [hli]
ld [$c988], a ld [$c988], a
@ -114,10 +114,10 @@ Function110030:: ; 110030 (44:4030)
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a 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) ; 110070 (44:4070)
.jumptable: ; 110070 .dw: ; 110070
dw Function110115 dw Function110115
dw Function110236 dw Function110236
dw Function110291 dw Function110291

View File

@ -257,25 +257,15 @@ else
endc endc
endm 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 jumptable: MACRO
if DEF(\1TableIndex) ld a, [\2]
__enum__ = __enum__ + 1 ld e, a
else ld d, 0
enum \1TableIndex ld hl, \1
endc add hl, de
__far \1 add hl, de
ld a, [hli]
ld h, [hl]
ld l, a
jp [hl]
endm endm

View File

@ -81,7 +81,7 @@ Function6454:: ; 6454
.Function6473 .Function6473
xor a xor a
ld [hLCDStatCustom], a ld [hFFC6], a
ld [hBGMapMode], a ld [hBGMapMode], a
ld a, $90 ld a, $90
ld [hWY], a ld [hWY], a
@ -1045,12 +1045,12 @@ CheckObjectEnteringVisibleRange:: ; 81ca
ld a, [wPlayerStepDirection] ld a, [wPlayerStepDirection]
cp STANDING cp STANDING
ret z ret z
ld hl, .jumptable ld hl, .dw
rst JumpTable rst JumpTable
ret ret
; 81d6 ; 81d6
.jumptable: ; 81d6 .dw: ; 81d6
dw .Down dw .Down
dw .Up dw .Up
dw .Left dw .Left
@ -1657,9 +1657,8 @@ _Sine:: ; 84d9
ld a, d ld a, d
ld d, 0 ld d, 0
ld hl, .sinewave ld hl, .sinewave
rept 2
add hl, de add hl, de
endr add hl, de
ld e, [hl] ld e, [hl]
inc hl inc hl
ld d, [hl] ld d, [hl]
@ -2061,9 +2060,8 @@ HealPartyMon: ; c677
; bc = MON_HP ; bc = MON_HP
ld b, h ld b, h
ld c, l ld c, l
rept 2
dec bc dec bc
endr dec bc
ld a, [hli] ld a, [hli]
ld [bc], a ld [bc], a
@ -2274,10 +2272,10 @@ CutFunction: ; c785
; c796 ; c796
.Jumptable: ; c796 (3:4796) .Jumptable: ; c796 (3:4796)
jumptable_start
jumptable .CheckAble dw .CheckAble
jumptable .DoCut dw .DoCut
jumptable .FailCut dw .FailCut
.CheckAble: ; c79c (3:479c) .CheckAble: ; c79c (3:479c)
ld de, ENGINE_HIVEBADGE ld de, ENGINE_HIVEBADGE
@ -4457,9 +4455,8 @@ RemoveItemFromPocket: ; d2ff
jr nc, .ok ; memory jr nc, .ok ; memory
ld c, a ld c, a
ld b, $0 ld b, $0
rept 2
add hl, bc add hl, bc
endr add hl, bc
ld a, [CurItem] ld a, [CurItem]
cp [hl] cp [hl]
inc hl inc hl
@ -4493,9 +4490,8 @@ endr
dec hl dec hl
ld b, h ld b, h
ld c, l ld c, l
rept 2
inc hl inc hl
endr inc hl
.loop2 .loop2
ld a, [hli] ld a, [hli]
ld [bc], a ld [bc], a
@ -6115,9 +6111,8 @@ FindApricornsInBag: ; 24c64
ld a, [hl] ld a, [hl]
call .addtobuffer call .addtobuffer
.nope .nope
rept 2
inc hl inc hl
endr inc hl
jr .loop jr .loop
.done .done
@ -7397,9 +7392,8 @@ DisplayDexEntry: ; 4424d
ld d, l ld d, l
ld e, h ld e, h
pop hl pop hl
rept 2
inc hl inc hl
endr inc hl
ld a, d ld a, d
or e or e
jr z, .skip_height jr z, .skip_height
@ -7505,9 +7499,8 @@ GetDexEntryPointer: ; 44333
dec a dec a
ld d, 0 ld d, 0
ld e, a ld e, a
rept 2
add hl, de add hl, de
endr add hl, de
ld e, [hl] ld e, [hl]
inc hl inc hl
ld d, [hl] ld d, [hl]
@ -7583,9 +7576,8 @@ INCLUDE "engine/init_gender.asm"
DrawKrisPackGFX: ; 48e81 DrawKrisPackGFX: ; 48e81
ld hl, PackFGFXPointers ld hl, PackFGFXPointers
rept 2
add hl, de add hl, de
endr add hl, de
ld a, [hli] ld a, [hli]
ld e, a ld e, a
ld d, [hl] ld d, [hl]
@ -8068,9 +8060,8 @@ _LoadMapPart:: ; 4d15b
ld a, [wMetatileStandingX] ld a, [wMetatileStandingX]
and a and a
jr z, .left_column jr z, .left_column
rept 2
inc hl inc hl
endr inc hl
.left_column .left_column
decoord 0, 0 decoord 0, 0
@ -8221,12 +8212,10 @@ LinkTextbox2: ; 4d35b
pop bc pop bc
ld de, AttrMap - TileMap ld de, AttrMap - TileMap
add hl, de add hl, de
rept 2
inc b inc b
endr inc b
rept 2 inc c
inc c inc c
endr
ld a, $7 ld a, $7
.row .row
push bc push bc
@ -9384,18 +9373,17 @@ CatchTutorial:: ; 4e554
ld a, [BattleType] ld a, [BattleType]
dec a dec a
ld c, a ld c, a
ld hl, .jumptable ld hl, .dw
ld b, 0 ld b, 0
rept 2
add hl, bc add hl, bc
endr add hl, bc
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp [hl]
; 4e564 ; 4e564
.jumptable: ; 4e564 (13:6564) .dw: ; 4e564 (13:6564)
dw .DudeTutorial dw .DudeTutorial
dw .DudeTutorial dw .DudeTutorial
dw .DudeTutorial dw .DudeTutorial
@ -9453,9 +9441,8 @@ endr
ld a, 1 ld a, 1
ld [hli], a ld [hli], a
ld a, POKE_BALL ; 5 ld a, POKE_BALL ; 5
rept 2
ld [hli], a ld [hli], a
endr ld [hli], a
ld [hl], -1 ld [hl], -1
ret ret
; 4e5da (13:65da) ; 4e5da (13:65da)
@ -9881,9 +9868,8 @@ Function50a28: ; 50a28
dec a dec a
ld c, a ld c, a
ld b, 0 ld b, 0
rept 2
add hl, bc add hl, bc
endr add hl, bc
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
@ -9899,7 +9885,6 @@ endr
Strings50a42: ; 50a42 Strings50a42: ; 50a42
; Untranslated trainer class names from Red. ; Untranslated trainer class names from Red.
dw .Youngster dw .Youngster
dw .BugCatcher dw .BugCatcher
dw .Lass dw .Lass
@ -10346,9 +10331,8 @@ Function50cdb: ; unreferenced predef
PlaceStatusString: ; 50d0a PlaceStatusString: ; 50d0a
push de push de
rept 2
inc de inc de
endr inc de
ld a, [de] ld a, [de]
ld b, a ld b, a
inc de inc de
@ -10565,9 +10549,8 @@ CalcLevel: ; 50e1b
CalcExpAtLevel: ; 50e47 CalcExpAtLevel: ; 50e47
; (a/b)*n**3 + c*n**2 + d*n - e ; (a/b)*n**3 + c*n**2 + d*n - e
ld a, [BaseGrowthRate] ld a, [BaseGrowthRate]
rept 2
add a add a
endr add a
ld c, a ld c, a
ld b, 0 ld b, 0
ld hl, GrowthRates ld hl, GrowthRates
@ -11991,9 +11974,8 @@ DoStep: ; 8025f
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, .Steps ld hl, .Steps
rept 2
add hl, de add hl, de
endr add hl, de
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
@ -13088,9 +13070,8 @@ Functione0000: ; e0000
call .Decompress call .Decompress
ld hl, Unknown_e008b ld hl, Unknown_e008b
pop bc pop bc
rept 2
add hl, bc add hl, bc
endr add hl, bc
ld a, [hli] ld a, [hli]
ld e, a ld e, a
ld d, [hl] ld d, [hl]

View File

@ -203,7 +203,7 @@ InitBattleTowerChallengeRAM: ; 17021e
_BattleTowerBattle: ; 17022c _BattleTowerBattle: ; 17022c
.loop .loop
call .do_jumptable call .do_dw
call DelayFrame call DelayFrame
ld a, [wBattleTowerBattleEnded] ld a, [wBattleTowerBattleEnded]
cp $1 cp $1
@ -211,11 +211,11 @@ _BattleTowerBattle: ; 17022c
ret ret
; 17023a ; 17023a
.do_jumptable: ; 17023a .do_dw: ; 17023a
ld a, [wBattleTowerBattleEnded] ld a, [wBattleTowerBattleEnded]
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, .jumptable ld hl, .dw
rept 2 rept 2
add hl, de add hl, de
endr endr
@ -225,7 +225,7 @@ endr
jp [hl] jp [hl]
; 170249 ; 170249
.jumptable: ; 170249 .dw: ; 170249
dw RunBattleTowerTrainer dw RunBattleTowerTrainer
dw SkipBattleTowerTrainer dw SkipBattleTowerTrainer
; 17024d ; 17024d
@ -688,7 +688,7 @@ Function1704e1: ; 1704e1
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, .jumptable ld hl, .dw
rept 2 rept 2
add hl, de add hl, de
endr endr
@ -698,7 +698,7 @@ endr
jp [hl] jp [hl]
; 17051f ; 17051f
.jumptable: ; 17051f .dw: ; 17051f
dw .Jumptable_0 dw .Jumptable_0
dw .Jumptable_1 dw .Jumptable_1
dw .Jumptable_2 dw .Jumptable_2
@ -945,7 +945,7 @@ BattleTowerAction: ; 170687
ld a, [ScriptVar] ld a, [ScriptVar]
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, .jumptable ld hl, .dw
rept 2 rept 2
add hl, de add hl, de
endr endr
@ -956,7 +956,7 @@ endr
; 170696 ; 170696
.jumptable: ; 170696 (5c:4696) .dw: ; 170696 (5c:4696)
dw Function17075f ; 0x00 dw Function17075f ; 0x00
dw Function170788 ; 0x01 dw Function170788 ; 0x01
dw Function170778 ; 0x02 dw Function170778 ; 0x02

View File

@ -281,9 +281,9 @@ Function11c1ca: ; 11c1ca
ld [wcf65], a ld [wcf65], a
ld [wcf66], a ld [wcf66], a
ld [wcd23], a ld [wcd23], a
ld [BGMapBuffer], a ld [wcd20], a
ld [wcd21], a ld [wcd21], a
ld [CreditsTimer], a ld [wcd22], a
ld [wcd35], a ld [wcd35], a
ld [wcd2b], a ld [wcd2b], a
ld a, $ff ld a, $ff
@ -373,17 +373,7 @@ Function11c283: ; 11c283
; 11c2ac ; 11c2ac
.DoJumptableFunction: ; 11c2ac .DoJumptableFunction: ; 11c2ac
ld a, [wJumptableIndex] jumptable .Jumptable, 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]
; 11c2bb ; 11c2bb
@ -470,12 +460,10 @@ Function11c346: ; 11c346 (47:4346)
Function11c35f: ; 11c35f (47:435f) Function11c35f: ; 11c35f (47:435f)
ld hl, wcd2f ld hl, wcd2f
rept 2
inc [hl] inc [hl]
endr inc [hl]
rept 2 dec hl
dec hl dec hl
endr
dec [hl] dec [hl]
push af push af
ld de, wcd2d ld de, wcd2d
@ -486,12 +474,10 @@ endr
Function11c373: ; 11c373 (47:4373) Function11c373: ; 11c373 (47:4373)
ld hl, wcd30 ld hl, wcd30
rept 2
inc [hl] inc [hl]
endr inc [hl]
rept 2 dec hl
dec hl dec hl
endr
dec [hl] dec [hl]
push af push af
ld de, wcd2d ld de, wcd2d
@ -563,7 +549,7 @@ Function11c3c2: ; 11c3c2 (47:43c2)
call Function11cfb5 call Function11cfb5
Function11c3ed: ; 11c3ed (47:43ed) Function11c3ed: ; 11c3ed (47:43ed)
ld hl, BGMapBuffer ; wcd20 (aliases: CreditsPos) ld hl, wcd20 ; wcd20 (aliases: CreditsPos)
ld de, hJoypadPressed ; $ffa3 ld de, hJoypadPressed ; $ffa3
ld a, [de] ld a, [de]
and $8 and $8
@ -597,10 +583,10 @@ Function11c3ed: ; 11c3ed (47:43ed)
jr .asm_11c475 jr .asm_11c475
.asm_11c426 .asm_11c426
ld a, $8 ld a, $8
ld [BGMapBuffer], a ; wcd20 (aliases: CreditsPos) ld [wcd20], a ; wcd20 (aliases: CreditsPos)
ret ret
.asm_11c42c .asm_11c42c
ld a, [BGMapBuffer] ; wcd20 (aliases: CreditsPos) ld a, [wcd20] ; wcd20 (aliases: CreditsPos)
cp $6 cp $6
jr c, .asm_11c472 jr c, .asm_11c472
sub $6 sub $6
@ -689,7 +675,7 @@ Function11c4a5: ; 11c4a5 (47:44a5)
ret ret
.asm_11c4b7 .asm_11c4b7
xor a xor a
ld [CreditsTimer], a ld [wcd22], a
ld a, $15 ld a, $15
ret ret
@ -780,7 +766,7 @@ Function11c53d: ; 11c53d (47:453d)
ld hl, wcd24 ld hl, wcd24
set 0, [hl] set 0, [hl]
ld a, $8 ld a, $8
ld [BGMapBuffer], a ; wcd20 (aliases: CreditsPos) ld [wcd20], a ; wcd20 (aliases: CreditsPos)
.b .b
ld a, $4 ld a, $4
@ -808,7 +794,7 @@ Function11c53d: ; 11c53d (47:453d)
ret ret
.asm_11c5ab .asm_11c5ab
ld a, [BGMapBuffer] ; wcd20 (aliases: CreditsPos) ld a, [wcd20] ; wcd20 (aliases: CreditsPos)
call Function11ca6a call Function11ca6a
call PlayClickSFX call PlayClickSFX
ret ret
@ -1131,12 +1117,11 @@ Function11c770: ; 11c770 (47:4770)
jr .asm_11c795 jr .asm_11c795
.asm_11c7ab .asm_11c7ab
ld hl, $c68a + 30 ld hl, $c68a + 30
ld a, [CreditsTimer] ld a, [wcd22]
ld c, a ld c, a
ld b, 0 ld b, 0
rept 2
add hl, bc add hl, bc
endr add hl, bc
ld a, [hl] ld a, [hl]
ld [wcd28], a ld [wcd28], a
jr .asm_11c79f jr .asm_11c79f
@ -1211,9 +1196,8 @@ Function11c7bc: ; 11c7bc (47:47bc)
ld a, [wcd22] ld a, [wcd22]
ld e, a ld e, a
ld d, $0 ld d, $0
rept 2
add hl, de add hl, de
endr add hl, de
ld a, [hli] ld a, [hli]
ld e, a ld e, a
ld a, [hl] ld a, [hl]
@ -1223,9 +1207,8 @@ endr
ld a, [wcd26] ld a, [wcd26]
ld e, a ld e, a
ld d, $0 ld d, $0
rept 2
add hl, de add hl, de
endr add hl, de
ld a, [wcd26] ld a, [wcd26]
ld e, a ld e, a
.asm_11c831 .asm_11c831
@ -1368,7 +1351,7 @@ MobileString_Next: ; 11c8f3
; 11c8f6 ; 11c8f6
Function11c8f6: ; 11c8f6 (47:48f6) Function11c8f6: ; 11c8f6 (47:48f6)
ld a, [BGMapBuffer] ; wcd20 (aliases: CreditsPos) ld a, [wcd20] ; wcd20 (aliases: CreditsPos)
call Function11c95d call Function11c95d
push hl push hl
ld a, [wcd2b] ld a, [wcd2b]
@ -1388,13 +1371,12 @@ Function11c8f6: ; 11c8f6 (47:48f6)
push de push de
call Function11c05d call Function11c05d
pop de pop de
ld a, [BGMapBuffer] ; wcd20 (aliases: CreditsPos) ld a, [wcd20] ; wcd20 (aliases: CreditsPos)
ld c, a ld c, a
ld b, $0 ld b, $0
ld hl, wcd36 ld hl, wcd36
rept 2
add hl, bc add hl, bc
endr add hl, bc
ld [hl], e ld [hl], e
inc hl inc hl
ld [hl], d ld [hl], d
@ -1414,9 +1396,8 @@ endr
ld a, [wcd22] ld a, [wcd22]
ld e, a ld e, a
ld d, $0 ld d, $0
rept 2
add hl, de add hl, de
endr add hl, de
ld a, [hli] ld a, [hli]
ld e, a ld e, a
ld a, [hl] ld a, [hl]
@ -1426,14 +1407,12 @@ endr
ld a, [wcd26] ld a, [wcd26]
ld e, a ld e, a
ld d, $0 ld d, $0
rept 2
add hl, de add hl, de
endr add hl, de
ld a, [wcd25] ld a, [wcd25]
ld e, a ld e, a
rept 2
add hl, de add hl, de
endr add hl, de
ld a, [hli] ld a, [hli]
ld e, a ld e, a
ld a, [hl] ld a, [hl]
@ -1534,7 +1513,7 @@ Function11c9c3: ; 11c9c3 (47:49c3)
jr nz, .asm_11c9e9 jr nz, .asm_11c9e9
call Function11ca5e call Function11ca5e
xor a xor a
ld [BGMapBuffer], a ; wcd20 (aliases: CreditsPos) ld [wcd20], a ; wcd20 (aliases: CreditsPos)
.asm_11c9e9 .asm_11c9e9
ld hl, wcd24 ld hl, wcd24
set 4, [hl] set 4, [hl]
@ -1621,9 +1600,8 @@ Function11ca6a: ; 11ca6a (47:4a6a)
ld hl, wcd36 ld hl, wcd36
ld c, a ld c, a
ld b, $0 ld b, $0
rept 2
add hl, bc add hl, bc
endr add hl, bc
ld [hl], b ld [hl], b
inc hl inc hl
ld [hl], b ld [hl], b
@ -1737,9 +1715,8 @@ Function11cb52: ; 11cb52 (47:4b52)
.asm_11cb58 .asm_11cb58
dec a dec a
jr z, .asm_11cb5f jr z, .asm_11cb5f
rept 2
inc hl inc hl
endr inc hl
jr .asm_11cb58 jr .asm_11cb58
.asm_11cb5f .asm_11cb5f
ld a, [hli] ld a, [hli]
@ -1798,9 +1775,8 @@ Function11cb66: ; 11cb66 (47:4b66)
.asm_11cbba .asm_11cbba
dec a dec a
jr z, .asm_11cbc1 jr z, .asm_11cbc1
rept 2
inc hl inc hl
endr inc hl
jr .asm_11cbba jr .asm_11cbba
.asm_11cbc1 .asm_11cbc1
ld a, [hli] ld a, [hli]
@ -2044,7 +2020,7 @@ Function11ce0b: ; 11ce0b (47:4e0b)
call Function11cfb5 call Function11cfb5
Function11ce2b: ; 11ce2b (47:4e2b) Function11ce2b: ; 11ce2b (47:4e2b)
ld a, [CreditsTimer] ld a, [wcd22]
sla a sla a
sla a sla a
ld c, a ld c, a
@ -2083,7 +2059,7 @@ Function11ce2b: ; 11ce2b (47:4e2b)
ret ret
.a .a
ld a, [CreditsTimer] ld a, [wcd22]
cp NUM_KANA cp NUM_KANA
jr c, .place jr c, .place
sub NUM_KANA sub NUM_KANA
@ -2096,7 +2072,7 @@ Function11ce2b: ; 11ce2b (47:4e2b)
ld hl, wcd24 ld hl, wcd24
set 0, [hl] set 0, [hl]
ld a, $8 ld a, $8
ld [BGMapBuffer], a ; wcd20 (aliases: CreditsPos) ld [wcd20], a ; wcd20 (aliases: CreditsPos)
.b .b
ld a, $4 ld a, $4
jr .load jr .load
@ -2122,7 +2098,7 @@ Function11ce2b: ; 11ce2b (47:4e2b)
ret ret
.asm_11cea4 .asm_11cea4
ld a, [BGMapBuffer] ; wcd20 (aliases: CreditsPos) ld a, [wcd20] ; wcd20 (aliases: CreditsPos)
call Function11ca6a call Function11ca6a
call PlayClickSFX call PlayClickSFX
ret ret
@ -2137,7 +2113,7 @@ Function11ce2b: ; 11ce2b (47:4e2b)
ld a, [hl] ld a, [hl]
cp $ff cp $ff
ret z ret z
ld [CreditsTimer], a ld [wcd22], a
ret ret
; 11ceb9 (47:4eb9) ; 11ceb9 (47:4eb9)
@ -2253,9 +2229,8 @@ Function11cfce: ; 11cfce (47:4fce)
ld [hli], a ld [hli], a
ld a, [de] ld a, [de]
inc de inc de
rept 2
dec a dec a
endr dec a
jr z, .asm_11cff6 jr z, .asm_11cff6
ld c, a ld c, a
ld a, $7a ld a, $7a
@ -2271,9 +2246,8 @@ endr
add hl, bc add hl, bc
ld a, [de] ld a, [de]
dec de dec de
rept 2
dec a dec a
endr dec a
jr z, .asm_11d022 jr z, .asm_11d022
ld b, a ld b, a
.asm_11d005 .asm_11d005
@ -2281,9 +2255,8 @@ endr
ld a, $7c ld a, $7c
ld [hli], a ld [hli], a
ld a, [de] ld a, [de]
rept 2
dec a dec a
endr dec a
jr z, .asm_11d015 jr z, .asm_11d015
ld c, a ld c, a
ld a, $7f ld a, $7f
@ -2305,9 +2278,8 @@ endr
ld a, $7d ld a, $7d
ld [hli], a ld [hli], a
ld a, [de] ld a, [de]
rept 2
dec a dec a
endr dec a
jr z, .asm_11d031 jr z, .asm_11d031
ld c, a ld c, a
ld a, $7a ld a, $7a
@ -2369,9 +2341,8 @@ Function11d035: ; 11d035 (47:5035)
ld a, [de] ld a, [de]
cp $2 cp $2
jr z, .asm_11d082 jr z, .asm_11d082
rept 2
dec a dec a
endr dec a
.asm_11d078 .asm_11d078
push af push af
ld a, $7a ld a, $7a
@ -2397,9 +2368,8 @@ endr
cp $2 cp $2
ret z ret z
push bc push bc
rept 2
dec a dec a
endr dec a
ld c, a ld c, a
ld b, a ld b, a
ld de, $14 ld de, $14
@ -2429,78 +2399,76 @@ Function11d0ac: ; 11d0ac (47:50ac)
ret ret
Function11d0b6: ; 11d0b6 (47:50b6) Function11d0b6: ; 11d0b6 (47:50b6)
ld hl, $c ld hl, SPRITEANIMSTRUCT_0C
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, Jumptable_11d0c7 ld hl, .Jumptable
rept 2 add hl, de
add hl, de add hl, de
endr
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
jp [hl] jp [hl]
Jumptable_11d0c7: ; 11d0c7 (47:50c7) .Jumptable
dw Function11d0dd dw .zero
dw Function11d0e9 dw .one
dw Function11d0f5 dw .two
dw Function11d10f dw .three
dw Function11d134 dw .four
dw Function11d145 dw .five
dw Function11d156 dw .six
dw Function11d175 dw .seven
dw Function11d1d7 dw .eight
dw Function11d1d1 dw .nine
dw Function11d1fc dw .ten
Function11d0dd: ; 11d0dd (47:50dd) .zero: ; 11d0dd (47:50dd)
ld a, [BGMapBuffer] ; wcd20 (aliases: CreditsPos) ld a, [wcd20] ; wcd20 (aliases: CreditsPos)
sla a sla a
ld hl, Unknown_11d208 ld hl, Unknown_11d208
ld e, $1 ld e, $1
jr asm_11d11e jr .load
Function11d0e9: ; 11d0e9 (47:50e9) .one: ; 11d0e9 (47:50e9)
ld a, [wcd21] ld a, [wcd21]
sla a sla a
ld hl, Unknown_11d21a ld hl, Unknown_11d21a
ld e, $2 ld e, $2
jr asm_11d11e jr .load
Function11d0f5: ; 11d0f5 (47:50f5) .two: ; 11d0f5 (47:50f5)
ld hl, Unknown_11d2be ld hl, Unknown_11d2be
ld a, [CreditsTimer] ld a, [wcd22]
ld e, a ld e, a
ld d, $0 ld d, $0
add hl, de add hl, de
ld a, [hl] ld a, [hl]
call ReinitSpriteAnimFrame call ReinitSpriteAnimFrame
ld a, [CreditsTimer] ld a, [wcd22]
sla a sla a
ld hl, Unknown_11d23e ld hl, Unknown_11d23e
ld e, $4 ld e, $4
jr asm_11d11e jr .load
Function11d10f: ; 11d10f (47:510f) .three: ; 11d10f (47:510f)
ld a, $27 ld a, SPRITE_ANIM_FRAMESET_27
call ReinitSpriteAnimFrame call ReinitSpriteAnimFrame
ld a, [wcd25] ld a, [wcd25]
sla a sla a
ld hl, Unknown_11d29e ld hl, Unknown_11d29e
ld e, $8 ld e, $8
.load: ; 11d11e (47:511e)
asm_11d11e: ; 11d11e (47:511e)
push de push de
ld e, a ld e, a
ld d, $0 ld d, $0
add hl, de add hl, de
push hl push hl
pop de pop de
ld hl, $4 ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc add hl, bc
ld a, [de] ld a, [de]
inc de inc de
@ -2512,26 +2480,26 @@ asm_11d11e: ; 11d11e (47:511e)
call Function11d2ee call Function11d2ee
ret ret
Function11d134: ; 11d134 (47:5134) .four: ; 11d134 (47:5134)
ld a, $27 ld a, SPRITE_ANIM_FRAMESET_27
call ReinitSpriteAnimFrame call ReinitSpriteAnimFrame
ld a, [wcd2a] ld a, [wcd2a]
sla a sla a
ld hl, Unknown_11d2b6 ld hl, Unknown_11d2b6
ld e, $10 ld e, $10
jr asm_11d11e jr .load
Function11d145: ; 11d145 (47:5145) .five: ; 11d145 (47:5145)
ld a, $27 ld a, SPRITE_ANIM_FRAMESET_27
call ReinitSpriteAnimFrame call ReinitSpriteAnimFrame
ld a, [wcd2c] ld a, [wcd2c]
sla a sla a
ld hl, Unknown_11d2ba ld hl, Unknown_11d2ba
ld e, $20 ld e, $20
jr asm_11d11e jr .load
Function11d156: ; 11d156 (47:5156) .six: ; 11d156 (47:5156)
ld a, $2a ld a, SPRITE_ANIM_FRAMESET_2A
call ReinitSpriteAnimFrame call ReinitSpriteAnimFrame
ld a, [wcd4a] ld a, [wcd4a]
sla a sla a
@ -2548,14 +2516,14 @@ Function11d156: ; 11d156 (47:5156)
call Function11d2ee call Function11d2ee
ret ret
Function11d175: ; 11d175 (47:5175) .seven: ; 11d175 (47:5175)
ld a, [wcd4d] ld a, [wcd4d]
cp $4 cp $4
jr z, .asm_11d180 jr z, .asm_11d180
ld a, $28 ld a, SPRITE_ANIM_FRAMESET_28
jr .asm_11d182 jr .asm_11d182
.asm_11d180 .asm_11d180
ld a, $26 ld a, SPRITE_ANIM_FRAMESET_26
.asm_11d182 .asm_11d182
call ReinitSpriteAnimFrame call ReinitSpriteAnimFrame
ld a, [wcd4d] ld a, [wcd4d]
@ -2566,7 +2534,7 @@ Function11d175: ; 11d175 (47:5175)
sla a sla a
sla a sla a
add $20 add $20
ld hl, $4 ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc add hl, bc
ld [hli], a ld [hli], a
ld a, [wcd4d] ld a, [wcd4d]
@ -2590,7 +2558,7 @@ Function11d175: ; 11d175 (47:5175)
sla a sla a
add e add e
add $18 add $18
ld hl, $4 ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc add hl, bc
ld [hli], a ld [hli], a
ld a, $8a ld a, $8a
@ -2600,16 +2568,15 @@ Function11d175: ; 11d175 (47:5175)
call Function11d2ee call Function11d2ee
ret ret
Function11d1d1: ; 11d1d1 (47:51d1) .nine: ; 11d1d1 (47:51d1)
ld d, $98 ld d, -13 * 8
ld a, $2c ld a, SPRITE_ANIM_FRAMESET_2C
jr asm_11d1db jr .eight_nine_load
Function11d1d7: ; 11d1d7 (47:51d7) .eight: ; 11d1d7 (47:51d7)
ld d, $10 ld d, 2 * 8
ld a, $2b ld a, SPRITE_ANIM_FRAMESET_2B
.eight_nine_load: ; 11d1db (47:51db)
asm_11d1db: ; 11d1db (47:51db)
push de push de
call ReinitSpriteAnimFrame call ReinitSpriteAnimFrame
ld a, [wcd4a] ld a, [wcd4a]
@ -2619,8 +2586,8 @@ asm_11d1db: ; 11d1db (47:51db)
ld e, a ld e, a
sla a sla a
add e add e
add $40 add 8 * 8
ld hl, $5 ld hl, SPRITEANIMSTRUCT_YCOORD
add hl, bc add hl, bc
ld [hld], a ld [hld], a
pop af pop af
@ -2630,8 +2597,8 @@ asm_11d1db: ; 11d1db (47:51db)
call Function11d2ee call Function11d2ee
ret ret
Function11d1fc: ; 11d1fc (47:51fc) .ten: ; 11d1fc (47:51fc)
ld a, $26 ld a, SPRITE_ANIM_FRAMESET_26
call ReinitSpriteAnimFrame call ReinitSpriteAnimFrame
ld a, $8 ld a, $8
ld e, a ld e, a
@ -3119,9 +3086,8 @@ Function11d4aa: ; 11d4aa
ld hl, $0005 ld hl, $0005
add hl, de add hl, de
ld a, [bc] ld a, [bc]
rept 2
inc bc inc bc
endr inc bc
push bc push bc
.asm_11d4cf .asm_11d4cf
push af push af
@ -3162,7 +3128,6 @@ endr
SortedPokemon: SortedPokemon:
; Pokemon sorted by kana. ; Pokemon sorted by kana.
; Notably, Rhydon is missing. ; Notably, Rhydon is missing.
dw .a dw .a
dw .i dw .i
dw .u dw .u

View File

@ -519,9 +519,8 @@ Mobile12_Bin2Dec: ; 48444 (12:4444)
.loop .loop
and a and a
jr z, .got_string jr z, .got_string
rept 2
inc hl inc hl
endr inc hl
dec a dec a
jr .loop jr .loop
.got_string .got_string
@ -746,9 +745,8 @@ Function486bf: ; 486bf (12:46bf)
pop af pop af
ld [hli], a ld [hli], a
ld a, $1 ld a, $1
rept 2
ld [hli], a ld [hli], a
endr ld [hli], a
xor a xor a
rept 3 rept 3
ld [hli], a ld [hli], a
@ -1673,12 +1671,10 @@ Function48cdc: ; 48cdc (12:4cdc)
pop bc pop bc
ld de, AttrMap - TileMap ld de, AttrMap - TileMap
add hl, de add hl, de
rept 2
inc b inc b
endr inc b
rept 2 inc c
inc c inc c
endr
ld a, $0 ld a, $0
.asm_48ced .asm_48ced
push bc push bc

View File

@ -1,6 +1,6 @@
Function8b342:: ; 8b342 Function8b342:: ; 8b342
; Loads the secondary map header pointer, then runs through a ; 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. ; doing pretty much nothing.
call GetSecondaryMapHeaderPointer call GetSecondaryMapHeaderPointer
ld d, h ld d, h
@ -10,7 +10,7 @@ Function8b342:: ; 8b342
xor a xor a
.loop .loop
push af push af
ld hl, .jumptable ld hl, .dw
rst JumpTable rst JumpTable
pop af pop af
inc a inc a
@ -19,7 +19,7 @@ Function8b342:: ; 8b342
ret ret
; 8b354 ; 8b354
.jumptable: ; 8b354 .dw: ; 8b354
dw .zero dw .zero
dw .one dw .one
dw .two dw .two

View File

@ -67,7 +67,7 @@ Function100063: ; 100063
ld [BGMapBuffer], a ld [BGMapBuffer], a
xor a xor a
ld [hMapAnims], a ld [hMapAnims], a
ld [hLCDStatCustom], a ld [hFFC6], a
ret ret
; 100082 ; 100082
@ -84,7 +84,7 @@ Function100082: ; 100082
ld [rIE], a ld [rIE], a
xor a xor a
ld [hMapAnims], a ld [hMapAnims], a
ld [hLCDStatCustom], a ld [hFFC6], a
ld a, $1 ld a, $1
ld [hMobileReceive], a ld [hMobileReceive], a
ld [hMobile], a ld [hMobile], a
@ -118,9 +118,8 @@ Function1000ba: ; 1000ba
ld a, [wcd25] ld a, [wcd25]
ld e, a ld e, a
ld d, 0 ld d, 0
rept 2
add hl, de add hl, de
endr add hl, de
ld a, [wcd22] ld a, [wcd22]
call GetFarHalfword call GetFarHalfword
ld a, [wcd22] ld a, [wcd22]
@ -1912,9 +1911,8 @@ Function100bc2: ; 100bc2
ld a, [wMenuCursorY] ld a, [wMenuCursorY]
ld b, a ld b, a
ld a, [wNumMoves] ld a, [wNumMoves]
rept 2
inc a inc a
endr inc a
cp b cp b
jp nz, .asm_100bcb jp nz, .asm_100bcb
ld a, $1 ld a, $1
@ -4746,9 +4744,8 @@ Function101ee2: ; 101ee2
Function101ee4: ; 101ee4 Function101ee4: ; 101ee4
ld d, 0 ld d, 0
ld hl, Unknown_101ef5 ld hl, Unknown_101ef5
rept 2
add hl, de add hl, de
endr add hl, de
ld a, [hli] ld a, [hli]
ld d, [hl] ld d, [hl]
ld e, a ld e, a
@ -7228,9 +7225,8 @@ endr
inc hl inc hl
push hl push hl
rept 2
add a add a
endr add a
add Unknown_10327a % $100 add Unknown_10327a % $100
ld l, a ld l, a
@ -7693,9 +7689,8 @@ Function1035c6: ; 1035c6
callba Function10138b callba Function10138b
ld b, 0 ld b, 0
ld hl, Unknown_1035d7 ld hl, Unknown_1035d7
rept 2
add hl, bc add hl, bc
endr add hl, bc
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
@ -7708,7 +7703,6 @@ Unknown_1035d7: ; 1035d7
dw Unknown_103608 dw Unknown_103608
dw Unknown_103608 dw Unknown_103608
dw Unknown_1035fe dw Unknown_1035fe
dw AskMobileOrCable dw AskMobileOrCable
dw AskMobileOrCable dw AskMobileOrCable
dw AskMobileOrCable dw AskMobileOrCable
@ -8096,9 +8090,8 @@ Function10383c: ; 10383c
ld [wdc60], a ld [wdc60], a
xor a xor a
ld hl, wdc5c ld hl, wdc5c
rept 2
ld [hli], a ld [hli], a
endr ld [hli], a
ld [hl], a ld [hl], a
ld hl, UnknownText_0x103876 ld hl, UnknownText_0x103876
call PrintText call PrintText

View File

@ -382,27 +382,27 @@ endr
; 10828a ; 10828a
.Jumptable: ; 10828a .Jumptable: ; 10828a
jumptable_start
jumptable GetMobileTradeAnimByte ; 00 dw GetMobileTradeAnimByte ; 00
jumptable MobileTradeAnim_ShowPlayerMonToBeSent ; 01 dw MobileTradeAnim_ShowPlayerMonToBeSent ; 01
jumptable MobileTradeAnim_02 ; 02 dw MobileTradeAnim_02 ; 02
jumptable MobileTradeAnim_GiveTrademon1 ; 03 dw MobileTradeAnim_GiveTrademon1 ; 03
jumptable MobileTradeAnim_GiveTrademon2 ; 04 dw MobileTradeAnim_GiveTrademon2 ; 04
jumptable MobileTradeAnim_05 ; 05 dw MobileTradeAnim_05 ; 05
jumptable MobileTradeAnim_06 ; 06 dw MobileTradeAnim_06 ; 06
jumptable MobileTradeAnim_07 ; 07 dw MobileTradeAnim_07 ; 07
jumptable MobileTradeAnim_GetTrademon1 ; 08 dw MobileTradeAnim_GetTrademon1 ; 08
jumptable MobileTradeAnim_GetTrademon2 ; 09 dw MobileTradeAnim_GetTrademon2 ; 09
jumptable MobileTradeAnim_GetTrademon3 ; 0a dw MobileTradeAnim_GetTrademon3 ; 0a
jumptable MobileTradeAnim_ShowOTMonFromTrade ; 0b dw MobileTradeAnim_ShowOTMonFromTrade ; 0b
jumptable EndMobileTradeAnim ; 0c dw EndMobileTradeAnim ; 0c
jumptable MobileTradeAnim_ShowPlayerMonForGTS ; 0d dw MobileTradeAnim_ShowPlayerMonForGTS ; 0d
jumptable MobileTradeAnim_ShowOTMonFromGTS ; 0e dw MobileTradeAnim_ShowOTMonFromGTS ; 0e
jumptable MobileTradeAnim_0f ; 0f dw MobileTradeAnim_0f ; 0f
jumptable MobileTradeAnim_10 ; 10 dw MobileTradeAnim_10 ; 10
jumptable MobileTradeAnim_11 ; 11 dw MobileTradeAnim_11 ; 11
jumptable MobileTradeAnim_FadeToBlack ; 12 dw MobileTradeAnim_FadeToBlack ; 12
jumptable MobileTradeAnim_GetOddEgg ; 13 get odd egg dw MobileTradeAnim_GetOddEgg ; 13 get odd egg
; 1082b2 ; 1082b2
MobileTradeAnim_Next: ; 1082b2 MobileTradeAnim_Next: ; 1082b2

View File

@ -564,17 +564,7 @@ Function118473: ; 118473
; 1184a5 ; 1184a5
Function1184a5: ; 1184a5 Function1184a5: ; 1184a5
ld a, [wcf66] jumptable .Jumptable, 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]
; 1184b4 ; 1184b4
.Jumptable: ; 1184b4 .Jumptable: ; 1184b4
@ -609,17 +599,7 @@ endr
; 1184ec ; 1184ec
Function1184ec: ; 1184ec Function1184ec: ; 1184ec
ld a, [wcf66] jumptable .Jumptable, 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]
; 1184fb ; 1184fb
.Jumptable: ; 1184fb .Jumptable: ; 1184fb
@ -667,17 +647,7 @@ endr
; 11854d ; 11854d
Function11854d: ; 11854d Function11854d: ; 11854d
ld a, [wcf66] jumptable .Jumptable, 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]
; 11855c ; 11855c
.Jumptable: ; 11855c .Jumptable: ; 11855c
@ -700,17 +670,7 @@ endr
; 11857c ; 11857c
Function11857c: ; 11857c Function11857c: ; 11857c
ld a, [wcf66] jumptable .Jumptable, 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]
; 11858b ; 11858b
.Jumptable: ; 11858b .Jumptable: ; 11858b
@ -745,17 +705,7 @@ endr
; 1185c3 ; 1185c3
Function1185c3: ; 1185c3 Function1185c3: ; 1185c3
ld a, [wcf66] jumptable .Jumptable, 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]
; 1185d2 ; 1185d2
.Jumptable: ; 1185d2 .Jumptable: ; 1185d2
@ -803,17 +753,7 @@ endr
; 118624 ; 118624
Function118624: ; 118624 Function118624: ; 118624
ld a, [wcf66] jumptable .Jumptable, 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]
; 118633 ; 118633
.Jumptable: ; 118633 .Jumptable: ; 118633
@ -851,17 +791,7 @@ endr
; 118671 ; 118671
Function118671: ; 118671 Function118671: ; 118671
ld a, [wcf66] jumptable .Jumptable, 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]
; 118680 ; 118680
.Jumptable: ; 118680 .Jumptable: ; 118680
@ -893,17 +823,7 @@ endr
; 1186b2 ; 1186b2
Function1186b2: ; 1186b2 Function1186b2: ; 1186b2
ld a, [wcf66] jumptable .Jumptable, 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]
; 1186c1 ; 1186c1
.Jumptable: ; 1186c1 .Jumptable: ; 1186c1
@ -936,17 +856,7 @@ endr
; 1186f5 ; 1186f5
Function1186f5: ; 1186f5 (46:46f5) Function1186f5: ; 1186f5 (46:46f5)
ld a, [wcf66] jumptable .Jumptable, 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]
; 118704 (46:4704) ; 118704 (46:4704)
.Jumptable: ; 118704 (46:4704) .Jumptable: ; 118704 (46:4704)
@ -986,17 +896,7 @@ endr
; 118746 (46:4746) ; 118746 (46:4746)
Function118746: ; 118746 Function118746: ; 118746
ld a, [wcf66] jumptable .Jumptable, 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]
; 118755 ; 118755
.Jumptable: ; 118755 .Jumptable: ; 118755
@ -1627,9 +1527,8 @@ Function118b8c: ; 118b8c
jr nz, .asm_118b8c jr nz, .asm_118b8c
dec hl dec hl
xor a xor a
rept 2
ld [hli], a ld [hli], a
endr ld [hli], a
ret ret
; 118b9a ; 118b9a
@ -1830,9 +1729,8 @@ asm_118e3e
ld a, [hld] ld a, [hld]
cp $2f cp $2f
jr nz, .asm_118e3e jr nz, .asm_118e3e
rept 2
inc hl inc hl
endr inc hl
ld de, wcd85 ld de, wcd85
ld c, $4 ld c, $4
.asm_118e4a .asm_118e4a
@ -2691,9 +2589,8 @@ Function119413: ; 119413
ld c, a ld c, a
ld a, [w3_d000 + 1] ld a, [w3_d000 + 1]
ld b, a ld b, a
rept 2
dec bc dec bc
endr dec bc
ld hl, wd002 ld hl, wd002
ld a, [hli] ld a, [hli]
ld e, a ld e, a
@ -2883,9 +2780,8 @@ endr
.asm_119552 .asm_119552
inc hl inc hl
.asm_119553 .asm_119553
rept 2
inc hl inc hl
endr inc hl
jr .asm_11955b jr .asm_11955b
.asm_119557 .asm_119557
ld de, $14 ld de, $14
@ -3230,9 +3126,8 @@ Function1196f2: ; 1196f2
ld a, [hld] ld a, [hld]
cp $58 cp $58
jr z, .asm_11975b jr z, .asm_11975b
rept 2
inc hl inc hl
endr inc hl
ld a, d ld a, d
dec a dec a
jr z, .asm_11978e jr z, .asm_11978e
@ -3815,9 +3710,8 @@ Function119b6b: ; 119b6b
ld a, [de] ld a, [de]
cp $d cp $d
jr nz, .asm_119b85 jr nz, .asm_119b85
rept 2
inc de inc de
endr inc de
.asm_119b93 .asm_119b93
ld a, [de] ld a, [de]
inc de inc de
@ -4349,28 +4243,19 @@ Function119ed8: ; 119ed8 (46:5ed8)
ld [wcd8c], a ld [wcd8c], a
ld a, $1 ld a, $1
ld [rSVBK], a ld [rSVBK], a
call Function119eee
call .RunJumptable
ld a, [wcd8c] ld a, [wcd8c]
ld [rSVBK], a ld [rSVBK], a
ld a, $1 ld a, $1
ld [hBGMapMode], a ld [hBGMapMode], a
ret ret
Function119eee: ; 119eee (46:5eee) .RunJumptable
ld a, [wcd3c] jumptable .Jumptable, 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)
Jumptable_119efd: ; 119efd .Jumptable
dw Function119f3f dw Function119f3f
dw Function119f45 dw Function119f45
dw Function119f56 dw Function119f56
@ -5553,17 +5438,7 @@ endr
; 11a8fa ; 11a8fa
Function11a8fa: ; 11a8fa Function11a8fa: ; 11a8fa
ld a, [$c31a] jumptable .Jumptable, $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]
; 11a909 ; 11a909
.Jumptable: ; 11a909 .Jumptable: ; 11a909
@ -6328,9 +6203,8 @@ asm_11afbd:
dec a dec a
ld c, a ld c, a
ld b, 0 ld b, 0
rept 2
add hl, bc add hl, bc
endr add hl, bc
ld a, e ld a, e
ld e, [hl] ld e, [hl]
inc hl inc hl
@ -6803,9 +6677,8 @@ Function11b236: ; 11b236
Function11b239: ; 11b239 Function11b239: ; 11b239
ld e, a ld e, a
ld d, 0 ld d, 0
rept 2
add hl, de add hl, de
endr add hl, de
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
@ -7210,20 +7083,9 @@ Function11b45c: ; 11b45c
; 11b46a ; 11b46a
Function11b46a: ; 11b46a Function11b46a: ; 11b46a
ld a, [wJumptableIndex] jumptable .Jumptable, 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_11b479: ; 11b479 .Jumptable
dw Function11b483 dw Function11b483
dw Function11b570 dw Function11b570
dw Function11b5c0 dw Function11b5c0
@ -7232,7 +7094,7 @@ Jumptable_11b479: ; 11b479
; 11b483 ; 11b483
Function11b483: ; 11b483 Function11b483: ; 11b483
call Function11b538 call .InitRAM
ld hl, PlayerName ld hl, PlayerName
ld a, $5 ; Japanese Name Length ld a, $5 ; Japanese Name Length
.loop1 .loop1
@ -7291,9 +7153,8 @@ Function11b483: ; 11b483
pop de pop de
ld h, d ld h, d
ld l, e ld l, e
rept 2
dec hl dec hl
endr dec hl
ld a, [de] ld a, [de]
ld [hli], a ld [hli], a
inc de inc de
@ -7369,9 +7230,8 @@ endr
jr nz, .loop9 jr nz, .loop9
call CloseSRAM call CloseSRAM
jp Function11ad8a jp Function11ad8a
; 11b538
Function11b538: ; 11b538 .InitRAM
ld bc, wc626 ld bc, wc626
ld a, [PlayerID] ld a, [PlayerID]
ld [wcd2a], a ld [wcd2a], a
@ -7416,26 +7276,28 @@ Function11b570: ; 11b570
ld a, [ScriptVar] ld a, [ScriptVar]
and a and a
jr nz, .exit jr nz, .exit
call Function11b585 call .SaveData
jp Function11ad8a jp Function11ad8a
.exit .exit
ld a, $4 ld a, $4
ld [wJumptableIndex], a ld [wJumptableIndex], a
ret ret
; 11b585
Function11b585: ; 11b585 .SaveData
ld a, $3 ld a, $3
ld [rSVBK], a ld [rSVBK], a
ld hl, w3_d800 ld hl, w3_d800
ld de, $c608 ld de, $c608
ld bc, w3_d88f - w3_d800 ld bc, w3_d88f - w3_d800
call CopyBytes call CopyBytes
ld a, $1 ld a, $1
ld [rSVBK], a ld [rSVBK], a
ld a, $5 ld a, $5
call GetSRAMBank call GetSRAMBank
ld de, $a800 ld de, $a800
ld a, $1 ld a, $1
ld [de], a ld [de], a
@ -7443,8 +7305,10 @@ Function11b585: ; 11b585
ld hl, $c608 ld hl, $c608
ld bc, w3_d88f - w3_d800 ld bc, w3_d88f - w3_d800
call CopyBytes call CopyBytes
push de push de
pop hl pop hl
ld a, [hRTCMinutes] ld a, [hRTCMinutes]
ld [hli], a ld [hli], a
ld a, [hRTCHours] ld a, [hRTCHours]
@ -7453,6 +7317,7 @@ Function11b585: ; 11b585
ld [hli], a ld [hli], a
ld a, [hRTCDayHi] ld a, [hRTCDayHi]
ld [hl], a ld [hl], a
call CloseSRAM call CloseSRAM
ret ret
; 11b5c0 ; 11b5c0
@ -7484,14 +7349,14 @@ Function11b5e8: ; 11b5e8
call GetSRAMBank call GetSRAMBank
ld hl, wRTC ld hl, wRTC
ld de, $c608 ld de, $c608
ld bc, $0004 ld bc, 4
call CopyBytes call CopyBytes
call CloseSRAM call CloseSRAM
ld a, $5 ld a, $5
call GetSRAMBank call GetSRAMBank
ld hl, $c608 ld hl, $c608
ld de, $b08c ld de, $b08c
ld bc, $0004 ld bc, 4
call CopyBytes call CopyBytes
ld a, $2 ld a, $2
ld [$a800], a ld [$a800], a
@ -7513,35 +7378,20 @@ Function11b5e8: ; 11b5e8
ld [wcd31], a ld [wcd31], a
call CloseSRAM call CloseSRAM
call Function11b44b call Function11b44b
call Function11b64c call .loop
ret ret
; 11b64c
Function11b64c: ; 11b64c .loop
.asm_11b64c call .RunJumptable
call Function11b65a
call DelayFrame call DelayFrame
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
cp $1 cp $1
jr nz, .asm_11b64c jr nz, .loop
ret ret
; 11b65a
Function11b65a: ; 11b65a .RunJumptable
ld a, [wJumptableIndex] jumptable .Jumptable, wJumptableIndex
ld e, a .Jumptable
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
dw Function11b66d dw Function11b66d
dw Function11b6b3 dw Function11b6b3
; 11b66d ; 11b66d

View File

@ -733,17 +733,7 @@ Function17d45a: ; 17d45a
; 17d474 ; 17d474
Function17d474: ; 17d474 Function17d474: ; 17d474
ld a, [wcd77] jumptable Jumptable_17d483, 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]
; 17d483 ; 17d483
Jumptable_17d483: ; 17d483 Jumptable_17d483: ; 17d483
@ -920,16 +910,14 @@ Function17d48d: ; 17d48d
ld a, [wcd42] ld a, [wcd42]
ld c, a ld c, a
ld b, $0 ld b, $0
rept 2
add hl, bc add hl, bc
endr add hl, bc
ld a, l ld a, l
ld [wcd4b], a ld [wcd4b], a
ld a, h ld a, h
ld [wcd4c], a ld [wcd4c], a
rept 2
add hl, bc add hl, bc
endr add hl, bc
ld a, l ld a, l
ld [wcd4d], a ld [wcd4d], a
ld a, h ld a, h
@ -955,9 +943,8 @@ Function17d5c4:
.loop .loop
srl a srl a
jr c, .got_button jr c, .got_button
rept 2
inc c inc c
endr inc c
jr .loop jr .loop
.got_button .got_button
@ -1044,12 +1031,10 @@ Function17d60b: ; 17d60b
ld [wcd4c], a ld [wcd4c], a
pop de pop de
pop hl pop hl
rept 2
inc b inc b
endr inc b
rept 2 dec c
dec c dec c
endr
jr z, .asm_17d684 jr z, .asm_17d684
push bc push bc
push de push de
@ -1095,17 +1080,15 @@ Function17d6a1: ; 17d6a1
ld a, $5 ld a, $5
call GetSRAMBank call GetSRAMBank
ld hl, $b1d3 ld hl, $b1d3
rept 2
add hl, bc add hl, bc
endr add hl, bc
ld a, [hli] ld a, [hli]
ld [wcd47], a ld [wcd47], a
ld a, [hl] ld a, [hl]
ld [BGMapPalBuffer], a ld [BGMapPalBuffer], a
ld hl, $b1b3 ld hl, $b1b3
rept 2
add hl, bc add hl, bc
endr add hl, bc
ld a, [hli] ld a, [hli]
ld c, a ld c, a
ld a, [hl] ld a, [hl]
@ -1121,9 +1104,8 @@ endr
ld de, wcd60 ld de, wcd60
ld bc, $0004 ld bc, $0004
call CopyBytes call CopyBytes
rept 2
inc hl inc hl
endr inc hl
ld de, wcd64 ld de, wcd64
ld bc, $0004 ld bc, $0004
call CopyBytes call CopyBytes
@ -1159,9 +1141,8 @@ Function17d711:
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, Jumptable17d72a ld hl, Jumptable17d72a
rept 2
add hl, de add hl, de
endr add hl, de
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
@ -2015,9 +1996,8 @@ Function17dccf: ; 17dccf
ld a, [wcd2e] ld a, [wcd2e]
ld c, a ld c, a
ld b, $0 ld b, $0
rept 2
add hl, bc add hl, bc
endr add hl, bc
ld a, [hli] ld a, [hli]
ld c, a ld c, a
ld a, [hl] ld a, [hl]
@ -2432,9 +2412,8 @@ Function17ded9: ; 17ded9
jr .asm_17df7b jr .asm_17df7b
.asm_17df79 .asm_17df79
rept 2
inc hl inc hl
endr inc hl
.asm_17df7b .asm_17df7b
bit 4, b bit 4, b
@ -2487,9 +2466,8 @@ endr
jr .asm_17dfd2 jr .asm_17dfd2
.asm_17dfd0 .asm_17dfd0
rept 2
inc hl inc hl
endr inc hl
.asm_17dfd2 .asm_17dfd2
bit 5, b bit 5, b
@ -2614,9 +2592,8 @@ Function17e026: ; 17e026
jr .asm_17e0a4 jr .asm_17e0a4
.asm_17e0a2 .asm_17e0a2
rept 2
inc hl inc hl
endr inc hl
.asm_17e0a4 .asm_17e0a4
bit 4, b bit 4, b
@ -2632,9 +2609,8 @@ endr
jr .asm_17e0b6 jr .asm_17e0b6
.asm_17e0b4 .asm_17e0b4
rept 2
inc hl inc hl
endr inc hl
.asm_17e0b6 .asm_17e0b6
bit 5, b bit 5, b
@ -2656,9 +2632,8 @@ endr
call CloseSRAM call CloseSRAM
pop hl pop hl
pop bc pop bc
rept 2
inc hl inc hl
endr inc hl
jr asm_17e0ee jr asm_17e0ee
.asm_17e0e1 .asm_17e0e1
@ -2703,9 +2678,8 @@ Function17e0fd: ; 17e0fd
call ReceiveItem call ReceiveItem
pop hl pop hl
jr c, .asm_17e127 jr c, .asm_17e127
rept 2
inc hl inc hl
endr inc hl
.asm_17e127 .asm_17e127
ld a, [hli] ld a, [hli]
@ -2735,9 +2709,8 @@ Function17e133: ; 17e133
callba MobileCheckOwnMonAnywhere callba MobileCheckOwnMonAnywhere
pop hl pop hl
jr c, .asm_17e159 jr c, .asm_17e159
rept 2
inc hl inc hl
endr inc hl
.asm_17e159 .asm_17e159
ld a, [hli] ld a, [hli]
@ -2773,9 +2746,8 @@ Function17e165: ; 17e165
call CheckItem call CheckItem
pop hl pop hl
jr c, .asm_17e195 jr c, .asm_17e195
rept 2
inc hl inc hl
endr inc hl
.asm_17e195 .asm_17e195
ld a, [hli] ld a, [hli]
@ -3240,9 +3212,8 @@ Function17e451: ; 17e451
ld [wcd2e], a ld [wcd2e], a
ld c, a ld c, a
ld b, $0 ld b, $0
rept 2
add hl, bc add hl, bc
endr add hl, bc
push hl push hl
hlcoord 0, 0 hlcoord 0, 0
ld bc, $0014 ld bc, $0014
@ -3467,9 +3438,8 @@ Function17e5af: ; 17e5af
ld l, a ld l, a
ld a, [wcd4e] ld a, [wcd4e]
ld h, a ld h, a
rept 2
add hl, bc add hl, bc
endr add hl, bc
ld a, [hli] ld a, [hli]
ld e, a ld e, a
ld a, [hli] ld a, [hli]
@ -3534,9 +3504,8 @@ Function17e613: ; 17e613
ld [hli], a ld [hli], a
ld a, [de] ld a, [de]
inc de inc de
rept 2
dec a dec a
endr dec a
jr z, .asm_17e63f jr z, .asm_17e63f
ld c, a ld c, a
ld a, [wcd53] ld a, [wcd53]
@ -3555,9 +3524,8 @@ endr
add hl, bc add hl, bc
ld a, [de] ld a, [de]
dec de dec de
rept 2
dec a dec a
endr dec a
jr z, .asm_17e674 jr z, .asm_17e674
ld b, a ld b, a
.asm_17e651 .asm_17e651
@ -3566,9 +3534,8 @@ endr
add $3 add $3
ld [hli], a ld [hli], a
ld a, [de] ld a, [de]
rept 2
dec a dec a
endr dec a
jr z, .asm_17e664 jr z, .asm_17e664
ld c, a ld c, a
ld a, $7f ld a, $7f
@ -3594,9 +3561,8 @@ endr
add $5 add $5
ld [hli], a ld [hli], a
ld a, [de] ld a, [de]
rept 2
dec a dec a
endr dec a
jr z, .asm_17e689 jr z, .asm_17e689
ld c, a ld c, a
ld a, [wcd53] ld a, [wcd53]
@ -3622,9 +3588,8 @@ Function17e691: ; 17e691
inc de inc de
push af push af
ld a, [de] ld a, [de]
rept 2
inc de inc de
endr inc de
and a and a
.asm_17e69f .asm_17e69f
jr z, .asm_17e6a5 jr z, .asm_17e6a5
@ -3776,9 +3741,8 @@ Function17f047: ; 17f047
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, Jumptable_17f061 ld hl, Jumptable_17f061
rept 2
add hl, de add hl, de
endr add hl, de
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
@ -3815,9 +3779,8 @@ Function17f081: ; 17f081
ld de, $0004 ld de, $0004
add hl, de add hl, de
ld a, [hli] ld a, [hli]
rept 2
inc hl inc hl
endr inc hl
ld e, l ld e, l
ld d, h ld d, h
ld l, c ld l, c
@ -3960,9 +3923,8 @@ Function17f154: ; 17f154
pop hl pop hl
call Function17f524 call Function17f524
jr c, .asm_17f167 jr c, .asm_17f167
rept 2
inc hl inc hl
endr inc hl
ld e, l ld e, l
ld d, h ld d, h
ld a, [de] ld a, [de]
@ -4150,9 +4112,8 @@ Function17f220: ; 17f220
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, .Genders ld hl, .Genders
rept 2
add hl, de add hl, de
endr add hl, de
ld a, [hli] ld a, [hli]
ld e, a ld e, a
ld a, [hl] ld a, [hl]
@ -4414,9 +4375,8 @@ Function17f3f0: ; 17f3f0
ld a, [de] ld a, [de]
ld c, a ld c, a
ld b, $0 ld b, $0
rept 2
add hl, bc add hl, bc
endr add hl, bc
ld a, [hli] ld a, [hli]
ld e, a ld e, a
ld a, [hli] ld a, [hli]
@ -4431,9 +4391,8 @@ endr
ld e, a ld e, a
ld d, $0 ld d, $0
pop hl pop hl
rept 2
add hl, de add hl, de
endr add hl, de
rept 3 rept 3
inc hl inc hl
endr endr
@ -4497,9 +4456,8 @@ Function17f44f: ; 17f44f
ld de, $0005 ld de, $0005
add hl, de add hl, de
ld a, [hli] ld a, [hli]
rept 2
inc hl inc hl
endr inc hl
ld e, l ld e, l
ld d, h ld d, h
ld l, c ld l, c
@ -4738,17 +4696,7 @@ Function17f56e: ; 17f56e
; 17f5ae ; 17f5ae
Function17f5ae: ; 17f5ae Function17f5ae: ; 17f5ae
ld a, [wc303] jumptable Table17f5bd, 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]
; 17f5bd ; 17f5bd
Table17f5bd: ; 17f5bd Table17f5bd: ; 17f5bd
@ -4818,9 +4766,8 @@ Function17f5e4: ; 17f5e4
ld e, a ld e, a
ld d, $0 ld d, $0
ld hl, Table_17f706 ld hl, Table_17f706
rept 2
add hl, de add hl, de
endr add hl, de
ld a, [wc301] ld a, [wc301]
ld e, a ld e, a
ld a, [wc302] ld a, [wc302]
@ -4858,9 +4805,8 @@ endr
jr .asm_17f67d jr .asm_17f67d
.asm_17f674 .asm_17f674
rept 2
inc hl inc hl
endr inc hl
dec c dec c
jr nz, .asm_17f65d jr nz, .asm_17f65d
@ -4878,9 +4824,8 @@ endr
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, Table_17f699 ld hl, Table_17f699
rept 2
add hl, de add hl, de
endr add hl, de
ld a, [hli] ld a, [hli]
ld e, a ld e, a
ld a, [hl] ld a, [hl]

View File

@ -162,9 +162,8 @@ MobileMenu_InitMenuBuffers: ; 4a071 (12:6071)
add B_BUTTON add B_BUTTON
ld [hli], a ; wMenuJoypadFilter ld [hli], a ; wMenuJoypadFilter
ld a, 1 ld a, 1
rept 2
ld [hli], a ; wMenuCursorY, wMenuCursorX ld [hli], a ; wMenuCursorY, wMenuCursorX
endr ld [hli], a ; wMenuCursorY, wMenuCursorX
ret ret
Function4a098: ; 4a098 (12:6098) Function4a098: ; 4a098 (12:6098)
@ -246,9 +245,8 @@ Function4a118: ; 4a118 (12:6118)
add $2 add $2
ld [hli], a ld [hli], a
ld a, $1 ld a, $1
rept 2
ld [hli], a ld [hli], a
endr ld [hli], a
ret ret
Function4a13b: ; 4a13b (12:613b) Function4a13b: ; 4a13b (12:613b)
@ -523,9 +521,8 @@ Function4a373: ; 4a373 (12:6373)
add $2 add $2
ld [hli], a ld [hli], a
ld a, $1 ld a, $1
rept 2
ld [hli], a ld [hli], a
endr ld [hli], a
ret ret
; 4a39a (12:639a) ; 4a39a (12:639a)
@ -836,9 +833,8 @@ Function4a680: ; 4a680 (12:6680)
add $2 add $2
ld [hli], a ld [hli], a
ld a, $1 ld a, $1
rept 2
ld [hli], a ld [hli], a
endr ld [hli], a
xor a xor a
rept 3 rept 3
ld [hli], a ld [hli], a

View File

@ -18,7 +18,7 @@ Predef_LoadSGBLayoutCGB: ; 8d59
ld l, a ld l, a
ld h, 0 ld h, 0
add hl, hl add hl, hl
ld de, .jumptable ld de, .dw
add hl, de add hl, de
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
@ -32,7 +32,7 @@ Predef_LoadSGBLayoutCGB: ; 8d59
ret ret
; 8d7a ; 8d7a
.jumptable: ; 8d7a .dw: ; 8d7a
dw _CGB00 dw _CGB00
dw _CGB01 dw _CGB01
dw _CGB02 dw _CGB02
@ -92,18 +92,16 @@ _CGB01: ; 8ddb
ld a, [EnemyHPPal] ld a, [EnemyHPPal]
ld l, a ld l, a
ld h, $0 ld h, $0
rept 2
add hl, hl add hl, hl
endr add hl, hl
ld bc, Palettes_a8be ld bc, Palettes_a8be
add hl, bc add hl, bc
call LoadPalette_White_Col1_Col2_Black call LoadPalette_White_Col1_Col2_Black
ld a, [PlayerHPPal] ld a, [PlayerHPPal]
ld l, a ld l, a
ld h, $0 ld h, $0
rept 2
add hl, hl add hl, hl
endr add hl, hl
ld bc, Palettes_a8be ld bc, Palettes_a8be
add hl, bc add hl, bc
call LoadPalette_White_Col1_Col2_Black call LoadPalette_White_Col1_Col2_Black
@ -209,9 +207,8 @@ _CGB03: ; 8edb
ld a, [wcda1] ld a, [wcda1]
ld l, a ld l, a
ld h, $0 ld h, $0
rept 2
add hl, hl add hl, hl
endr add hl, hl
ld bc, Palettes_a8be ld bc, Palettes_a8be
add hl, bc add hl, bc
call LoadPalette_White_Col1_Col2_Black call LoadPalette_White_Col1_Col2_Black
@ -489,9 +486,8 @@ _CGB06: ; 90f8
_CGB07: ; 9122 _CGB07: ; 9122
ld b, 0 ld b, 0
ld hl, Jumptable_912d ld hl, Jumptable_912d
rept 2
add hl, bc add hl, bc
endr add hl, bc
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
@ -797,9 +793,8 @@ _CGB0e: ; 9373
ld a, [PlayerHPPal] ld a, [PlayerHPPal]
ld l, a ld l, a
ld h, 0 ld h, 0
rept 2
add hl, hl add hl, hl
endr add hl, hl
ld bc, Palettes_a8be ld bc, Palettes_a8be
add hl, bc add hl, bc
call LoadPalette_White_Col1_Col2_Black call LoadPalette_White_Col1_Col2_Black

View File

@ -10,7 +10,7 @@ GetMysteryGift_MobileAdapterLayout: ; 4930f (mobile)
ld l, a ld l, a
ld h, 0 ld h, 0
add hl, hl add hl, hl
ld de, .jumptable ld de, .dw
add hl, de add hl, de
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
@ -22,11 +22,11 @@ GetMysteryGift_MobileAdapterLayout: ; 4930f (mobile)
ret ret
; 49330 (12:5330) ; 49330 (12:5330)
.jumptable: ; 49330 .dw: ; 49330
jumptable_start
jumptable MG_Mobile_Layout00 dw MG_Mobile_Layout00
jumptable MG_Mobile_Layout01 dw MG_Mobile_Layout01
jumptable MG_Mobile_Layout02 dw MG_Mobile_Layout02
; 49336 ; 49336
MG_Mobile_Layout_FillBox: ; 49336 MG_Mobile_Layout_FillBox: ; 49336