ref: f59f1bdb88297678d48bcbd01c143994cb307036
parent: 7a03fecc38ab4fe2e44525b56dabc5a05a6d8633
author: Rangi <[email protected]>
date: Sat Jun 19 15:52:05 EDT 2021
Standardize capitalization of ".Jumptable"
--- a/constants/radio_constants.asm
+++ b/constants/radio_constants.asm
@@ -129,3 +129,4 @@
const BUENA_ITEM
const BUENA_MOVE
const BUENA_STRING
+NUM_BUENA_FUNCTIONS EQU const_value
--- a/data/events/odd_eggs.asm
+++ b/data/events/odd_eggs.asm
@@ -6,6 +6,7 @@
ENDM
OddEggProbabilities:
+; entries correspond to OddEggs (below)
table_width 2, OddEggProbabilities
prob_total = 0
; Pichu
@@ -30,6 +31,7 @@
prob 10
prob 1
assert_table_length NUM_ODD_EGGS
+ assert prob_total == 100, "OddEggProbabilities do not sum to 100%!"
OddEggs:
table_width NICKNAMED_MON_STRUCT_LENGTH, OddEggs
--- a/engine/events/battle_tower/battle_tower.asm
+++ b/engine/events/battle_tower/battle_tower.asm
@@ -1331,7 +1331,7 @@
jr nc, .invalid
ld e, a
ld d, 0
- ld hl, .jumptable
+ ld hl, .Jumptable
add hl, de
add hl, de
ld a, [hli]
@@ -1347,7 +1347,7 @@
call CloseSRAM
ret
-.jumptable:
+.Jumptable:
dw .NoAction
dw .NoAction
dw .DoAction1
--- a/engine/events/pokecenter_pc.asm
+++ b/engine/events/pokecenter_pc.asm
@@ -4,7 +4,7 @@
const PCPC_BEFORE_HOF ; 1
const PCPC_POSTGAME ; 2
- ; PokemonCenterPC.JumpTable indexes
+ ; PokemonCenterPC.Jumptable indexes
const_def
const PCPCITEM_PLAYERS_PC ; 0
const PCPCITEM_BILLS_PC ; 1
@@ -30,7 +30,7 @@
call DoNthMenu
jr c, .shutdown
ld a, [wMenuSelection]
- ld hl, .JumpTable
+ ld hl, .Jumptable
call MenuJumptable
jr nc, .loop
@@ -51,9 +51,9 @@
db 0 ; items
dw .WhichPC
dw PlaceNthMenuStrings
- dw .JumpTable
+ dw .Jumptable
-.JumpTable:
+.Jumptable:
; entries correspond to PCPCITEM_* constants
dw PlayersPC, .String_PlayersPC
dw BillsPC, .String_BillsPC
--- a/engine/gfx/sgb_layouts.asm
+++ b/engine/gfx/sgb_layouts.asm
@@ -17,7 +17,7 @@
ld a, [hli]
ld h, [hl]
ld l, a
- ld de, _LoadSGBLayout_ReturnFromJumpTable
+ ld de, _LoadSGBLayout_ReturnFromJumptable
push de
jp hl
@@ -566,7 +566,7 @@
INCLUDE "data/maps/sgb_roof_pal_inds.asm"
-_LoadSGBLayout_ReturnFromJumpTable:
+_LoadSGBLayout_ReturnFromJumptable:
push de
call PushSGBPals
pop hl
--- a/engine/movie/trade_animation.asm
+++ b/engine/movie/trade_animation.asm
@@ -15,7 +15,7 @@
ENDM
tradeanim: MACRO
- db (\1_TradeCmd - DoTradeAnimation.JumpTable) / 2
+ db (\1_TradeCmd - DoTradeAnimation.Jumptable) / 2
ENDM
TradeAnimation:
@@ -237,9 +237,9 @@
ret
.DoTradeAnimCommand:
- jumptable .JumpTable, wJumptableIndex
+ jumptable .Jumptable, wJumptableIndex
-.JumpTable:
+.Jumptable:
add_tradeanim TradeAnim_AdvanceScriptPointer ; 00
add_tradeanim TradeAnim_ShowGivemonData ; 01
add_tradeanim TradeAnim_ShowGetmonData ; 02
--- a/engine/overworld/decorations.asm
+++ b/engine/overworld/decorations.asm
@@ -970,13 +970,13 @@
DescribeDecoration::
ld a, b
- ld hl, .JumpTable
+ ld hl, .Jumptable
rst JumpTable
ret
-.JumpTable:
+.Jumptable:
; entries correspond to DECODESC_* constants
- table_width 2, DescribeDecoration.JumpTable
+ table_width 2, DescribeDecoration.Jumptable
dw DecorationDesc_Poster
dw DecorationDesc_LeftOrnament
dw DecorationDesc_RightOrnament
--- a/engine/pokegear/radio.asm
+++ b/engine/pokegear/radio.asm
@@ -1518,7 +1518,7 @@
and $f
ld c, a
push hl
- ld hl, .StringFunctionJumpTable
+ ld hl, .StringFunctionJumptable
ld e, b
add hl, de
add hl, de
@@ -1531,12 +1531,14 @@
ld c, [hl]
ret
-.StringFunctionJumpTable:
+.StringFunctionJumptable:
; entries correspond to BUENA_* constants
+ table_width 2, GetBuenasPassword.StringFunctionJumptable
dw .Mon ; BUENA_MON
dw .Item ; BUENA_ITEM
dw .Move ; BUENA_MOVE
dw .RawString ; BUENA_STRING
+ assert_table_length NUM_BUENA_FUNCTIONS
.Mon:
call .GetTheIndex
--- a/engine/pokemon/mail.asm
+++ b/engine/pokemon/mail.asm
@@ -409,13 +409,13 @@
jr c, .subexit
ld a, [wMenuCursorY]
dec a
- ld hl, .JumpTable
+ ld hl, .Jumptable
rst JumpTable
.subexit
ret
-.JumpTable:
+.Jumptable:
dw .ReadMail
dw .PutInPack
dw .AttachMail