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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

Some files were not shown because too many files have changed in this diff Show More