From def3b6049387a6d2afab66780f7f09dbb61d6166 Mon Sep 17 00:00:00 2001 From: xCrystal Date: Fri, 29 Dec 2017 13:52:42 +0100 Subject: [PATCH] Clean up .Jumptable: spaces --- engine/battle_anims/bg_effects.asm | 1 + engine/billspc.asm | 7 ------- engine/card_flip.asm | 3 --- engine/credits.asm | 3 --- engine/events/magnet_train.asm | 1 - engine/events/overworld.asm | 1 - engine/main_menu.asm | 1 - engine/mon_icons.asm | 1 - engine/pack.asm | 7 +------ engine/player_step.asm | 1 - engine/pokedex.asm | 4 ---- engine/pokegear.asm | 1 - engine/printer_serial.asm | 5 ----- engine/slot_machine.asm | 14 ++++---------- engine/sprite_anims.asm | 1 - engine/stats_screen.asm | 3 --- engine/trainer_card.asm | 1 - engine/unown_puzzle.asm | 1 - mobile/mobile_42.asm | 1 - mobile/mobile_46.asm | 1 + 20 files changed, 7 insertions(+), 51 deletions(-) diff --git a/engine/battle_anims/bg_effects.asm b/engine/battle_anims/bg_effects.asm index c1a2bef4b..df792165b 100644 --- a/engine/battle_anims/bg_effects.asm +++ b/engine/battle_anims/bg_effects.asm @@ -2066,6 +2066,7 @@ BattleBGEffect_1c: ; c8b00 (32:4b00) dw .cgb_zero dw .cgb_one dw .cgb_two + .cgb_zero call BattleBGEffects_IncrementJumptable ld hl, BG_EFFECT_STRUCT_03 diff --git a/engine/billspc.asm b/engine/billspc.asm index 8fe578a07..f94f495c6 100755 --- a/engine/billspc.asm +++ b/engine/billspc.asm @@ -42,14 +42,12 @@ _DepositPKMN: ; e2391 (38:6391) jp hl .Jumptable: ; e23df (38:63df) - dw .Init dw .HandleJoypad dw .WhatsUp dw .Submenu dw BillsPC_EndJumptableLoop - .Init: ; e23e9 (38:63e9) xor a ld [hBGMapMode], a @@ -150,7 +148,6 @@ _DepositPKMN: ; e2391 (38:6391) jp hl BillsPCDepositJumptable: ; e24a1 (38:64a1) - dw BillsPCDepositFuncDeposit ; Deposit Pokemon dw BillsPCDepositFuncStats ; Pokemon Stats dw BillsPCDepositFuncRelease ; Release Pokemon @@ -309,14 +306,12 @@ _WithdrawPKMN: ; e2583 (38:6583) jp hl .Jumptable: ; e25d2 (38:65d2) - dw .Init dw .Joypad dw .PrepSubmenu dw BillsPC_Withdraw dw BillsPC_EndJumptableLoop - .Init: ; e25dc (38:65dc) ld a, NUM_BOXES + 1 ld [wBillsPC_LoadedBox], a @@ -560,7 +555,6 @@ _MovePKMNWithoutMail: ; e2759 ; e27ac .Jumptable: ; e27ac - dw .Init dw .Joypad dw .PrepSubmenu @@ -2029,7 +2023,6 @@ MovePKMNWitoutMail_InsertMon: ; e31e7 ; e3245 .Jumptable: ; e3245 - dw .BoxToBox dw .PartyToBox dw .BoxToParty diff --git a/engine/card_flip.asm b/engine/card_flip.asm index f03db190d..515f0ce79 100755 --- a/engine/card_flip.asm +++ b/engine/card_flip.asm @@ -80,7 +80,6 @@ _CardFlip: ; e00ee (38:40ee) ; e01a0 (38:41a0) .Jumptable: ; e01a0 - dw .AskPlayWithThree dw .DeductCoins dw .ChooseACard @@ -656,7 +655,6 @@ CardFlip_BlankDiscardedCardSlot: ; e0534 ; e0553 .Jumptable: ; e0553 - dw .Level1 dw .Level2 dw .Level3 @@ -833,7 +831,6 @@ CardFlip_CheckWinCondition: ; e0637 ; e0643 .Jumptable: ; e0643 - dw .Impossible dw .Impossible dw .PikaJiggly diff --git a/engine/credits.asm b/engine/credits.asm index e38ba8dc5..051729531 100644 --- a/engine/credits.asm +++ b/engine/credits.asm @@ -152,9 +152,7 @@ Credits_Jumptable: ; 109926 jp hl ; 109937 - .Jumptable: ; 109937 (42:5937) - dw ParseCredits dw Credits_Next dw Credits_Next @@ -169,7 +167,6 @@ Credits_Jumptable: ; 109926 dw Credits_RequestGFX dw Credits_LoopBack - Credits_Next: ; 109951 (42:5951) ld hl, wJumptableIndex inc [hl] diff --git a/engine/events/magnet_train.asm b/engine/events/magnet_train.asm index 585912391..cf010fb1d 100755 --- a/engine/events/magnet_train.asm +++ b/engine/events/magnet_train.asm @@ -303,7 +303,6 @@ MagnetTrain_Jumptable: ; 8cdf7 ; 8ce06 .Jumptable: ; 8ce06 - dw .InitPlayerSpriteAnim dw .WaitScene dw .MoveTrain1 diff --git a/engine/events/overworld.asm b/engine/events/overworld.asm index 8c238cb9c..17ec54bb1 100755 --- a/engine/events/overworld.asm +++ b/engine/events/overworld.asm @@ -128,7 +128,6 @@ CutFunction: ; c785 ret .Jumptable: ; c796 (3:4796) - dw .CheckAble dw .DoCut dw .FailCut diff --git a/engine/main_menu.asm b/engine/main_menu.asm index a88f60bbf..cbd516cd7 100755 --- a/engine/main_menu.asm +++ b/engine/main_menu.asm @@ -54,7 +54,6 @@ MainMenu: ; 49cdc db "MOBILE STUDIUM@" .Jumptable: ; 0x49d60 - dw MainMenu_Continue dw MainMenu_NewGame dw MainMenu_Options diff --git a/engine/mon_icons.asm b/engine/mon_icons.asm index 695e28770..316ff3bac 100755 --- a/engine/mon_icons.asm +++ b/engine/mon_icons.asm @@ -46,7 +46,6 @@ LoadMenuMonIcon: ; 8e83f dw Mobile_InitPartyMenuBGPal71 ; mobile dw .GetPartyMenuMonIcon ; unused - .GetPartyMenuMonIcon: ; 8e862 (23:6862) call InitPartyMenuIcon call .GetPartyMonItemGFX diff --git a/engine/pack.asm b/engine/pack.asm index b4f6d4ef1..047924cb0 100644 --- a/engine/pack.asm +++ b/engine/pack.asm @@ -28,7 +28,6 @@ Pack: ; 10000 ; 10030 .Jumptable: ; 10030 (4:4030) - dw .InitGFX ; 0 dw .InitItemsPocket ; 1 dw .ItemsPocketMenu ; 2 @@ -694,7 +693,6 @@ BattlePack: ; 10493 ; 104c3 .Jumptable: ; 104c3 (4:44c3) - dw .InitGFX ; 0 dw .InitItemsPocket ; 1 dw .ItemsPocketMenu ; 2 @@ -865,7 +863,6 @@ TMHMSubmenu: ; 105dc (4:45dc) ; 0x10614 .UsableJumptable: ; 10614 - dw .Use dw .Quit ; 10618 @@ -885,7 +882,6 @@ TMHMSubmenu: ; 105dc (4:45dc) ; 0x10627 .UnusableJumptable: ; 10627 - dw .Quit ; 10629 @@ -897,7 +893,6 @@ TMHMSubmenu: ; 105dc (4:45dc) ret .ItemFunctionJumptable: ; 10637 (4:4637) - dw .Oak dw .Oak dw .Oak @@ -1002,11 +997,11 @@ DepositSellPack: ; 106be ; 106d1 .Jumptable: ; 106d1 (4:46d1) - dw .ItemsPocket dw .BallsPocket dw .KeyItemsPocket dw .TMHMPocket + .ItemsPocket: ; 106d9 (4:46d9) xor a call InitPocket diff --git a/engine/player_step.asm b/engine/player_step.asm index c20bc09e9..996a9b422 100755 --- a/engine/player_step.asm +++ b/engine/player_step.asm @@ -59,7 +59,6 @@ HandlePlayerStep: ; d4e5 (3:54e5) ret .Jumptable: ; d4f2 (3:54f2) - dw GetMovementPermissions dw BufferScreen dw .mobile diff --git a/engine/pokedex.asm b/engine/pokedex.asm index 95f9404f9..0297cf840 100644 --- a/engine/pokedex.asm +++ b/engine/pokedex.asm @@ -184,7 +184,6 @@ Pokedex_RunJumptable: ; 4010b call Pokedex_LoadPointer jp hl - .Jumptable: ; 40115 (10:4115) dw Pokedex_InitMainScreen dw Pokedex_UpdateMainScreen @@ -201,7 +200,6 @@ Pokedex_RunJumptable: ; 4010b dw Pokedex_UpdateUnownMode dw Pokedex_Exit - Pokedex_IncrementDexPointer: ; 40131 (10:4131) ld hl, wJumptableIndex inc [hl] @@ -1623,13 +1621,11 @@ Pokedex_OrderMonsByMode: ; 40bdc call Pokedex_LoadPointer jp hl - .Jumptable: ; 40bf0 (10:4bf0) dw .NewMode dw .OldMode dw Pokedex_ABCMode - .NewMode: ; 40bf6 (10:4bf6) ld de, NewPokedexOrder ld hl, wPokedexOrder diff --git a/engine/pokegear.asm b/engine/pokegear.asm index aff64ef6c..e4227aa0c 100755 --- a/engine/pokegear.asm +++ b/engine/pokegear.asm @@ -285,7 +285,6 @@ InitPokegearTilemap: ; 90da8 (24:4da8) dw .Map dw .Phone dw .Radio - ; 90e1a .Clock: ; 90e1a diff --git a/engine/printer_serial.asm b/engine/printer_serial.asm index 06891db5b..02d0595fa 100755 --- a/engine/printer_serial.asm +++ b/engine/printer_serial.asm @@ -29,9 +29,7 @@ PrinterJumptableIteration: ; 84022 jp hl ; 84031 - .Jumptable: ; 84031 (21:4031) - dw Print_InitPrinterHandshake ; 00 dw Printer_CheckConnectionStatus ; 01 dw Printer_WaitSerial ; 02 @@ -55,7 +53,6 @@ PrinterJumptableIteration: ; 84022 dw Printer_WaitLoopBack ; 12 dw Printer_WaitLoopBack_ ; 13 - Printer_NextSection: ; 84059 (21:4059) ld hl, wJumptableIndex inc [hl] @@ -471,7 +468,6 @@ _PrinterReceive:: ; 842db jp hl ; 842ea - .Jumptable: ; 842ea (21:42ea) dw Printer_DoNothing ; 00 @@ -509,7 +505,6 @@ _PrinterReceive:: ; 842db dw Printer_ReceiveTowPrinterHandshakeAndSend0x00 ; 1e dw Printer_ReceiveTowPrinterStatusFlagsAndExitSendLoop ; 1f - Printer_NextInstruction: ; 8432a (21:432a) ld hl, wPrinterOpcode inc [hl] diff --git a/engine/slot_machine.asm b/engine/slot_machine.asm index d77eb6a1a..aaf65c83a 100755 --- a/engine/slot_machine.asm +++ b/engine/slot_machine.asm @@ -20,8 +20,8 @@ REEL_SIZE EQU 15 const SLOTS_WAIT_REEL3 const SLOTS_WAIT_STOP_REEL3 const SLOTS_NEXT_09 - const SLOTS_NEXT_0a - const SLOTS_NEXT_0b + const SLOTS_NEXT_0A + const SLOTS_NEXT_0B const SLOTS_FLASH_IF_WIN const SLOTS_FLASH_SCREEN const SLOTS_GIVE_EARNED_COINS @@ -1437,7 +1437,6 @@ Slots_CheckMatchedFirstTwoReels: ; 92e94 ; 92ebd .Jumptable: ; 92ebd - dw .zero dw .one dw .two @@ -1552,7 +1551,6 @@ Slots_CheckMatchedAllThreeReels: ; 92f1d ; 92f48 .Jumptable: ; 92f48 - dw .zero dw .one dw .two @@ -2032,7 +2030,7 @@ endr ; or this code was intended to lead to flipped percentages. ld a, [wKeepSevenBiasChance] and a - jr nz, .lowerSevenStreakOdds + jr nz, .lower_seven_streak_odds call Random and %0010100 ret z ; 25% chance to stick with seven symbol bias @@ -2040,7 +2038,7 @@ endr ld [wSlotBias], a ret -.lowerSevenStreakOdds +.lower_seven_streak_odds call Random and %0011100 ret z ; 12.5% chance to stick with seven symbol bias @@ -2080,12 +2078,10 @@ Slots_AnimateGolem: ; 9321d (24:721d) jp hl .Jumptable: ; 9322d (24:722d) - dw .init dw .fall dw .roll - .init ; 93233 (24:7233) ld hl, SPRITEANIMSTRUCT_0E add hl, bc @@ -2181,12 +2177,10 @@ Slots_AnimateChansey: ; 932ac (24:72ac) jp hl .Jumptable: ; 932bc (24:72bc) - dw .walk dw .one dw .two - .walk ; 932c2 (24:72c2) ld hl, SPRITEANIMSTRUCT_XCOORD add hl, bc diff --git a/engine/sprite_anims.asm b/engine/sprite_anims.asm index edd1daf32..9fb78a5d7 100755 --- a/engine/sprite_anims.asm +++ b/engine/sprite_anims.asm @@ -50,7 +50,6 @@ DoAnimFrame: ; 8d24b dw .IntroUnownF dw .IntroSuicuneAway - .Null: ; 8d2a1 (23:52a1) ret diff --git a/engine/stats_screen.asm b/engine/stats_screen.asm index fa124e1b3..9f632f388 100755 --- a/engine/stats_screen.asm +++ b/engine/stats_screen.asm @@ -534,12 +534,10 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6) ret .Jumptable: ; 4e00d (13:600d) - dw .PinkPage dw .GreenPage dw .BluePage - .PinkPage: ; 4e013 (13:6013) hlcoord 0, 9 ld b, $0 @@ -888,7 +886,6 @@ StatsScreen_GetAnimationParam: ; 4e2ad (13:62ad) dw .Tempmon dw .Wildmon - .PartyMon: ; 4e2bf (13:62bf) ld a, [CurPartyMon] ld hl, PartyMon1 diff --git a/engine/trainer_card.asm b/engine/trainer_card.asm index 2905e8eb3..87cab0103 100755 --- a/engine/trainer_card.asm +++ b/engine/trainer_card.asm @@ -80,7 +80,6 @@ TrainerCard: ; 25105 dw TrainerCard_Page3_Joypad dw TrainerCard_Quit - TrainerCard_IncrementJumptable: ; 251ab (9:51ab) ld hl, wJumptableIndex inc [hl] diff --git a/engine/unown_puzzle.asm b/engine/unown_puzzle.asm index 525345e68..fd2b25c84 100755 --- a/engine/unown_puzzle.asm +++ b/engine/unown_puzzle.asm @@ -188,7 +188,6 @@ UnownPuzzleJumptable: ; e12ca ; e12d9 .Jumptable: ; e12d9 - dw .Function ; e12db diff --git a/mobile/mobile_42.asm b/mobile/mobile_42.asm index 313d8c1f8..82158c1c7 100644 --- a/mobile/mobile_42.asm +++ b/mobile/mobile_42.asm @@ -381,7 +381,6 @@ MobileTradeAnim_JumptableLoop: ; 10824b ; 10828a .Jumptable: ; 10828a - dw GetMobileTradeAnimByte ; 00 dw MobileTradeAnim_ShowPlayerMonToBeSent ; 01 dw MobileTradeAnim_02 ; 02 diff --git a/mobile/mobile_46.asm b/mobile/mobile_46.asm index bdf85464c..e3503a00c 100755 --- a/mobile/mobile_46.asm +++ b/mobile/mobile_46.asm @@ -7398,6 +7398,7 @@ Function11b5e8: ; 11b5e8 .RunJumptable: jumptable .Jumptable, wJumptableIndex + .Jumptable: dw Function11b66d dw Function11b6b3