Merge pull request #449 from xCrystal/master

Misc labeling and cleaning up
This commit is contained in:
yenatch 2017-12-30 21:12:53 -05:00 committed by GitHub
commit 93916b5536
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
55 changed files with 319 additions and 341 deletions

View File

@ -829,7 +829,7 @@ LoadNote: ; e83d1
ld hl, Channel1PitchWheelAmountFraction - Channel1 ld hl, Channel1PitchWheelAmountFraction - Channel1
add hl, bc add hl, bc
ld [hl], a ; remainder ld [hl], a ; remainder
ld hl, Channel1Field0x25 - Channel1 ld hl, Channel1Field25 - Channel1
add hl, bc add hl, bc
xor a xor a
ld [hl], a ld [hl], a
@ -981,12 +981,12 @@ ApplyPitchWheel: ; e84f9
add hl, de add hl, de
ld d, h ld d, h
ld e, l ld e, l
; [Channel*Field0x25] += [Channel*PitchWheelAmountFraction] ; [Channel*Field25] += [Channel*PitchWheelAmountFraction]
; if rollover: Frequency += 1 ; if rollover: Frequency += 1
ld hl, Channel1PitchWheelAmountFraction - Channel1 ld hl, Channel1PitchWheelAmountFraction - Channel1
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
ld hl, Channel1Field0x25 - Channel1 ld hl, Channel1Field25 - Channel1
add hl, bc add hl, bc
add [hl] add [hl]
ld [hl], a ld [hl], a
@ -1023,7 +1023,7 @@ ApplyPitchWheel: ; e84f9
ld a, d ld a, d
sbc 0 sbc 0
ld d, a ld d, a
; [Channel*Field0x25] *= 2 ; [Channel*Field25] *= 2
; if rollover: Frequency -= 1 ; if rollover: Frequency -= 1
ld hl, Channel1PitchWheelAmountFraction - Channel1 ld hl, Channel1PitchWheelAmountFraction - Channel1
add hl, bc add hl, bc
@ -1726,7 +1726,7 @@ MusicE2: ; e8873
; seems to have been dummied out ; seems to have been dummied out
; params: 1 ; params: 1
call GetMusicByte call GetMusicByte
ld hl, Channel1Field0x2c - Channel1 ld hl, Channel1Field2c - Channel1
add hl, bc add hl, bc
ld [hl], a ld [hl], a
ld hl, Channel1Flags2 - Channel1 ld hl, Channel1Flags2 - Channel1
@ -1849,7 +1849,7 @@ MusicE7: ; e88f7
add hl, bc add hl, bc
set SOUND_UNKN_0E, [hl] set SOUND_UNKN_0E, [hl]
call GetMusicByte call GetMusicByte
ld hl, Channel1Field0x29 - Channel1 ld hl, Channel1Field29 - Channel1
add hl, bc add hl, bc
ld [hl], a ld [hl], a
ret ret
@ -1885,7 +1885,7 @@ MusicE8: ; e891e
add hl, bc add hl, bc
set SOUND_UNKN_0D, [hl] set SOUND_UNKN_0D, [hl]
call GetMusicByte call GetMusicByte
ld hl, Channel1Field0x2a - Channel1 ld hl, Channel1Field2a - Channel1
add hl, bc add hl, bc
ld [hl], a ld [hl], a
ret ret
@ -2307,7 +2307,7 @@ SetNoteDuration: ; e8a8d
inc hl inc hl
ld d, [hl] ld d, [hl]
; add ???? to the next result ; add ???? to the next result
ld hl, Channel1Field0x16 - Channel1 ld hl, Channel1Field16 - Channel1
add hl, bc add hl, bc
ld l, [hl] ld l, [hl]
; multiply Tempo by last result (NoteLength * LOW(delay)) ; multiply Tempo by last result (NoteLength * LOW(delay))
@ -2316,7 +2316,7 @@ SetNoteDuration: ; e8a8d
ld e, l ld e, l
ld d, h ld d, h
; store result in ???? ; store result in ????
ld hl, Channel1Field0x16 - Channel1 ld hl, Channel1Field16 - Channel1
add hl, bc add hl, bc
ld [hl], e ld [hl], e
; store result in NoteDuration ; store result in NoteDuration
@ -2392,7 +2392,7 @@ Tempo: ; e8b03
ld [hl], d ld [hl], d
; clear ???? ; clear ????
xor a xor a
ld hl, Channel1Field0x16 - Channel1 ld hl, Channel1Field16 - Channel1
add hl, bc add hl, bc
ld [hl], a ld [hl], a
ret ret
@ -2749,7 +2749,7 @@ PlayStereoSFX:: ; e8ca6
add hl, bc add hl, bc
ld [hl], a ld [hl], a
ld hl, Channel1Field0x30 - Channel1 ; $c131 - Channel1 ld hl, Channel1Field30 - Channel1 ; $c131 - Channel1
add hl, bc add hl, bc
ld [hl], a ld [hl], a
@ -2760,11 +2760,11 @@ PlayStereoSFX:: ; e8ca6
; ch3-4 ; ch3-4
ld a, [wSFXDuration] ld a, [wSFXDuration]
ld hl, Channel1Field0x2e - Channel1 ; $c12f - Channel1 ld hl, Channel1Field2e - Channel1 ; $c12f - Channel1
add hl, bc add hl, bc
ld [hl], a ld [hl], a
ld hl, Channel1Field0x2f - Channel1 ; $c130 - Channel1 ld hl, Channel1Field2f - Channel1 ; $c130 - Channel1
add hl, bc add hl, bc
ld [hl], a ld [hl], a

View File

@ -708,7 +708,7 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
const BATTLEANIMOAMSET_D7 const BATTLEANIMOAMSET_D7
; BattleBGEffects indexes (see engine/battle_anims/bg_effects.asm) ; BattleBGEffects indexes (see engine/battle_anims/bg_effects.asm)
const_value SET 1 const_value set 1
const ANIM_BG_FLASH_INVERTED const ANIM_BG_FLASH_INVERTED
const ANIM_BG_FLASH_WHITE const ANIM_BG_FLASH_WHITE
const ANIM_BG_WHITE_HUES const ANIM_BG_WHITE_HUES
@ -764,7 +764,7 @@ const_value SET 1
const ANIM_BG_35 const ANIM_BG_35
; AnimObjGFX indexes (see data/battle_anims/object_gfx.asm) ; AnimObjGFX indexes (see data/battle_anims/object_gfx.asm)
const_value SET 1 const_value set 1
const ANIM_GFX_HIT const ANIM_GFX_HIT
const ANIM_GFX_CUT const ANIM_GFX_CUT
const ANIM_GFX_FIRE const ANIM_GFX_FIRE

View File

@ -45,7 +45,7 @@ MOVE_LENGTH EQU const_value
; indexes for: ; indexes for:
; - PlayerStats and EnemyStats (see wram.asm) ; - PlayerStats and EnemyStats (see wram.asm)
; - party_struct and battle_struct members (see macros/wram.asm) ; - party_struct and battle_struct members (see macros/wram.asm)
const_value SET 1 const_value set 1
const STAT_HP const STAT_HP
const STAT_ATK const STAT_ATK
const STAT_DEF const STAT_DEF
@ -65,7 +65,7 @@ ATKDEFDV_SHINY EQU $EA
SPDSPCDV_SHINY EQU $AA SPDSPCDV_SHINY EQU $AA
; battle classes (wBattleMode values) ; battle classes (wBattleMode values)
const_value SET 1 const_value set 1
const WILD_BATTLE const WILD_BATTLE
const TRAINER_BATTLE const TRAINER_BATTLE
@ -140,7 +140,7 @@ const_value SET 1
; status condition bit flags ; status condition bit flags
SLP EQU %111 ; 0-7 turns SLP EQU %111 ; 0-7 turns
const_value SET 3 const_value set 3
const PSN const PSN
const BRN const BRN
const FRZ const FRZ

View File

@ -105,7 +105,7 @@
const PAAD_TESTING const PAAD_TESTING
; CreditsScript indexes (see data/credits_script.asm) ; CreditsScript indexes (see data/credits_script.asm)
const_value SET -7 const_value set -7
const CREDITS_THEEND const CREDITS_THEEND
const CREDITS_WAIT2 const CREDITS_WAIT2
const CREDITS_MUSIC const CREDITS_MUSIC

View File

@ -50,6 +50,7 @@ OAM_X_FLIP EQU 5
OAM_Y_FLIP EQU 6 OAM_Y_FLIP EQU 6
OAM_PRIORITY EQU 7 ; 0: OBJ above BG, 1: OBJ behind BG (colors 1-3) OAM_PRIORITY EQU 7 ; 0: OBJ above BG, 1: OBJ behind BG (colors 1-3)
; BP Map attribute flags
PALETTE_MASK EQU %111 PALETTE_MASK EQU %111
VRAM_BANK_1 EQU 1 << OAM_TILE_BANK ; $08 VRAM_BANK_1 EQU 1 << OAM_TILE_BANK ; $08
OBP_NUM EQU 1 << OAM_OBP_NUM ; $10 OBP_NUM EQU 1 << OAM_OBP_NUM ; $10
@ -57,6 +58,10 @@ X_FLIP EQU 1 << OAM_X_FLIP ; $20
Y_FLIP EQU 1 << OAM_Y_FLIP ; $40 Y_FLIP EQU 1 << OAM_Y_FLIP ; $40
BEHIND_BG EQU 1 << OAM_PRIORITY ; $80 BEHIND_BG EQU 1 << OAM_PRIORITY ; $80
; Other useful constants
LCDC_DEFAULT EQU %11100011
LY_VBLANK EQU 144
; Hardware registers ; Hardware registers
rJOYP EQU $ff00 ; Joypad (R/W) rJOYP EQU $ff00 ; Joypad (R/W)
rSB EQU $ff01 ; Serial transfer data (R/W) rSB EQU $ff01 ; Serial transfer data (R/W)
@ -114,6 +119,10 @@ rWave_d EQU $ff3d
rWave_e EQU $ff3e rWave_e EQU $ff3e
rWave_f EQU $ff3f rWave_f EQU $ff3f
rLCDC EQU $ff40 ; LCD Control (R/W) rLCDC EQU $ff40 ; LCD Control (R/W)
rLCDC_SPRITES_ENABLE EQU 1 ; 0=Off, 1=On
rLCDC_SPRITE_SIZE EQU 2 ; 0=8x8, 1=8x16
rLCDC_WINDOW_TILEMAP EQU 6 ; 0=9800-9BFF, 1=9C00-9FFF
rLCDC_ENABLE EQU 7 ; 0=Off, 1=On
rSTAT EQU $ff41 ; LCDC Status (R/W) rSTAT EQU $ff41 ; LCDC Status (R/W)
rSCY EQU $ff42 ; Scroll Y (R/W) rSCY EQU $ff42 ; Scroll Y (R/W)
rSCX EQU $ff43 ; Scroll X (R/W) rSCX EQU $ff43 ; Scroll X (R/W)

View File

@ -52,7 +52,7 @@ MAIL_STRUCT_LENGTH EQU $2f ; mailmsg struct
const HELD_7 const HELD_7
const HELD_CLEANSE_TAG const HELD_CLEANSE_TAG
const_value SET 10 const_value set 10
const HELD_HEAL_POISON const HELD_HEAL_POISON
const HELD_HEAL_FREEZE const HELD_HEAL_FREEZE
const HELD_HEAL_BURN const HELD_HEAL_BURN
@ -61,7 +61,7 @@ const_value SET 10
const HELD_HEAL_STATUS const HELD_HEAL_STATUS
const HELD_HEAL_CONFUSION const HELD_HEAL_CONFUSION
const_value SET 20 const_value set 20
const HELD_PREVENT_POISON const HELD_PREVENT_POISON
const HELD_PREVENT_BURN const HELD_PREVENT_BURN
const HELD_PREVENT_FREEZE const HELD_PREVENT_FREEZE
@ -69,7 +69,7 @@ const_value SET 20
const HELD_PREVENT_PARALYZE const HELD_PREVENT_PARALYZE
const HELD_PREVENT_CONFUSE const HELD_PREVENT_CONFUSE
const_value SET 30 const_value set 30
const HELD_30 const HELD_30
const HELD_ATTACK_UP const HELD_ATTACK_UP
const HELD_DEFENSE_UP const HELD_DEFENSE_UP
@ -80,12 +80,12 @@ const_value SET 30
const HELD_EVASION_UP const HELD_EVASION_UP
const HELD_38 const HELD_38
const_value SET 40 const_value set 40
const HELD_40 const HELD_40
const HELD_41 const HELD_41
const HELD_METAL_POWDER const HELD_METAL_POWDER
const_value SET 50 const_value set 50
const HELD_NORMAL_BOOST const HELD_NORMAL_BOOST
const HELD_FIGHTING_BOOST const HELD_FIGHTING_BOOST
const HELD_FLYING_BOOST const HELD_FLYING_BOOST
@ -104,7 +104,7 @@ const_value SET 50
const HELD_DARK_BOOST const HELD_DARK_BOOST
const HELD_STEEL_BOOST const HELD_STEEL_BOOST
const_value SET 70 const_value set 70
const HELD_CATCH_CHANCE const HELD_CATCH_CHANCE
const HELD_71 const HELD_71
const HELD_ESCAPE const HELD_ESCAPE

View File

@ -17,7 +17,7 @@ MAP_NONE EQU 0
NUM_MAPHEADER_ATTRIBUTES EQU const_value NUM_MAPHEADER_ATTRIBUTES EQU const_value
; map environments (wEnvironment) ; map environments (wEnvironment)
const_value SET 1 const_value set 1
const TOWN const TOWN
const ROUTE const ROUTE
const INDOOR const INDOOR
@ -34,7 +34,7 @@ const_value SET 1
const PALETTE_MORN const PALETTE_MORN
const PALETTE_DARK const PALETTE_DARK
; fish groups ; fish groups
const_def const_def
const FISHGROUP_NONE const FISHGROUP_NONE
const FISHGROUP_SHORE const FISHGROUP_SHORE
@ -97,10 +97,10 @@ const_value SET 1
const OBJECT_SPRITE_X_OFFSET ; 19 const OBJECT_SPRITE_X_OFFSET ; 19
const OBJECT_SPRITE_Y_OFFSET ; 1a const OBJECT_SPRITE_Y_OFFSET ; 1a
const OBJECT_MOVEMENT_BYTE_INDEX ; 1b const OBJECT_MOVEMENT_BYTE_INDEX ; 1b
const OBJECT_28 ; 1c const OBJECT_1C ; 1c
const OBJECT_29 ; 1d const OBJECT_1D ; 1d
const OBJECT_30 ; 1e const OBJECT_1E ; 1e
const OBJECT_31 ; 1f const OBJECT_1F ; 1f
const OBJECT_RANGE ; 20 const OBJECT_RANGE ; 20
; 33-39 are not used ; 33-39 are not used
@ -217,7 +217,7 @@ NUM_SPAWNS EQU const_value
EMOTE_MEM EQU -1 EMOTE_MEM EQU -1
; FruitTreeItems indexes (see data/items/fruit_trees.asm) ; FruitTreeItems indexes (see data/items/fruit_trees.asm)
const_value SET 1 const_value set 1
const FRUITTREE_ROUTE_29 ; 01 const FRUITTREE_ROUTE_29 ; 01
const FRUITTREE_ROUTE_30_1 ; 02 const FRUITTREE_ROUTE_30_1 ; 02
const FRUITTREE_ROUTE_38 ; 03 const FRUITTREE_ROUTE_38 ; 03

View File

@ -1,6 +1,6 @@
; hMapEntryMethod values ; hMapEntryMethod values
; MapSetupScripts indexes (see data/maps/setup_scripts.asm) ; MapSetupScripts indexes (see data/maps/setup_scripts.asm)
const_value SET $f1 const_value set $f1
const MAPSETUP_WARP ; f1 const MAPSETUP_WARP ; f1
const MAPSETUP_CONTINUE ; f2 const MAPSETUP_CONTINUE ; f2
const MAPSETUP_RELOADMAP ; f3 const MAPSETUP_RELOADMAP ; f3
@ -67,7 +67,7 @@ const_value SET $f1
map_end EQU -1 map_end EQU -1
; callback types ; callback types
const_value SET 1 const_value set 1
const MAPCALLBACK_TILES const MAPCALLBACK_TILES
const MAPCALLBACK_OBJECTS const MAPCALLBACK_OBJECTS
const MAPCALLBACK_CMDQUEUE const MAPCALLBACK_CMDQUEUE

View File

@ -45,7 +45,7 @@ GENDERLESS EQU 255
const SLOW const SLOW
; BaseEggGroups values ; BaseEggGroups values
const_value SET 1 const_value set 1
const MONSTER ; 1 const MONSTER ; 1
const AMPHIBIAN ; 2 const AMPHIBIAN ; 2
const INSECT ; 3 const INSECT ; 3
@ -103,7 +103,7 @@ PARTY_LENGTH EQU 6
; evolution types (used in data/pokemon/evos_attacks.asm) ; evolution types (used in data/pokemon/evos_attacks.asm)
const_value SET 1 const_value set 1
const EVOLVE_LEVEL const EVOLVE_LEVEL
const EVOLVE_ITEM const EVOLVE_ITEM
const EVOLVE_TRADE const EVOLVE_TRADE
@ -111,13 +111,13 @@ const_value SET 1
const EVOLVE_STAT const EVOLVE_STAT
; EVOLVE_HAPPINESS triggers ; EVOLVE_HAPPINESS triggers
const_value SET 1 const_value set 1
const TR_ANYTIME const TR_ANYTIME
const TR_MORNDAY const TR_MORNDAY
const TR_NITE const TR_NITE
; EVOLVE_STAT triggers ; EVOLVE_STAT triggers
const_value SET 1 const_value set 1
const ATK_GT_DEF const ATK_GT_DEF
const ATK_LT_DEF const ATK_LT_DEF
const ATK_EQ_DEF const ATK_EQ_DEF
@ -162,7 +162,7 @@ FISHSWARM_REMORAID EQU 2
const ANIM_MON_EGG2 const ANIM_MON_EGG2
; MonMenuOptions indexes (see engine/mon_menu.asm) ; MonMenuOptions indexes (see engine/mon_menu.asm)
const_value SET 1 const_value set 1
; moves ; moves
const MONMENU_CUT ; 1 const MONMENU_CUT ; 1
const MONMENU_FLY ; 2 const MONMENU_FLY ; 2

View File

@ -1,5 +1,5 @@
; wPrinterStatus ; wPrinterStatus
const_value SET 1 const_value set 1
const PRINTER_STATUS_CHECKING const PRINTER_STATUS_CHECKING
const PRINTER_STATUS_TRANSMITTING const PRINTER_STATUS_TRANSMITTING
const PRINTER_STATUS_PRINTING const PRINTER_STATUS_PRINTING

View File

@ -39,7 +39,7 @@ RETVAR_ADDR_DE EQU (1 << 6)
RETVAR_EXECUTE EQU (2 << 6) RETVAR_EXECUTE EQU (2 << 6)
; PlayerEventScriptPointers indexes (see engine/events.asm) ; PlayerEventScriptPointers indexes (see engine/events.asm)
const_value SET -1 const_value set -1
const PLAYEREVENT_MAPSCRIPT const PLAYEREVENT_MAPSCRIPT
const PLAYEREVENT_NONE const PLAYEREVENT_NONE
const PLAYEREVENT_SEENBYTRAINER const PLAYEREVENT_SEENBYTRAINER

View File

@ -106,7 +106,7 @@
const SPRITE_STANDING_YOUNGSTER ; 66 const SPRITE_STANDING_YOUNGSTER ; 66
; SpriteMons indexes (see data/sprite_mons.asm) ; SpriteMons indexes (see data/sprite_mons.asm)
const_value SET $80 const_value set $80
SPRITE_POKEMON EQU const_value SPRITE_POKEMON EQU const_value
const SPRITE_UNOWN ; 80 const SPRITE_UNOWN ; 80
const SPRITE_GEODUDE ; 81 const SPRITE_GEODUDE ; 81
@ -145,12 +145,12 @@ SPRITE_POKEMON EQU const_value
const SPRITE_HO_OH ; a2 const SPRITE_HO_OH ; a2
; special GetMonSprite values (see engine/overworld.asm) ; special GetMonSprite values (see engine/overworld.asm)
const_value SET $e0 const_value set $e0
const SPRITE_DAY_CARE_MON_1 ; e0 const SPRITE_DAY_CARE_MON_1 ; e0
const SPRITE_DAY_CARE_MON_2 ; e1 const SPRITE_DAY_CARE_MON_2 ; e1
; VariableSprites indexes (see wram.asm) ; VariableSprites indexes (see wram.asm)
const_value SET $f0 const_value set $f0
SPRITE_VARS EQU const_value SPRITE_VARS EQU const_value
const SPRITE_CONSOLE ; f0 const SPRITE_CONSOLE ; f0
const SPRITE_DOLL_1 ; f1 const SPRITE_DOLL_1 ; f1

View File

@ -9,7 +9,7 @@
NUM_SPRITEDATA_FIELDS EQU const_value NUM_SPRITEDATA_FIELDS EQU const_value
; sprite types ; sprite types
const_value SET 1 const_value set 1
const WALKING_SPRITE ; 1 const WALKING_SPRITE ; 1
const STANDING_SPRITE ; 2 const STANDING_SPRITE ; 2
const STILL_SPRITE ; 3 const STILL_SPRITE ; 3

View File

@ -1,5 +1,5 @@
; Tilesets indexes (see tilesets/tilesets.asm) ; Tilesets indexes (see tilesets/tilesets.asm)
const_value SET 1 const_value set 1
const TILESET_JOHTO_1 ; 01 const TILESET_JOHTO_1 ; 01
const TILESET_JOHTO_2 ; 02 const TILESET_JOHTO_2 ; 02
const TILESET_KANTO ; 03 const TILESET_KANTO ; 03

View File

@ -7,7 +7,7 @@
const WILDMON ; 4 const WILDMON ; 4
; Options: (bits) ; cfcc ; Options: (bits) ; cfcc
const_value SET 4 const_value set 4
const NO_TEXT_SCROLL ; 4 const NO_TEXT_SCROLL ; 4
const STEREO ; 5 const STEREO ; 5
const BATTLE_SHIFT ; 6 const BATTLE_SHIFT ; 6
@ -41,7 +41,7 @@ GBPRINTER_DARKER EQU $60
GBPRINTER_DARKEST EQU $7f GBPRINTER_DARKEST EQU $7f
; WalkingDirection: ; d043 ; WalkingDirection: ; d043
const_value SET -1 const_value set -1
const STANDING ; -1 const STANDING ; -1
const DOWN ; 0 const DOWN ; 0
const UP ; 1 const UP ; 1

View File

@ -8395,11 +8395,11 @@ BattleIntro: ; 3f4dd
ld b, SCGB_BATTLE_GRAYSCALE ld b, SCGB_BATTLE_GRAYSCALE
call GetSGBLayout call GetSGBLayout
ld hl, rLCDC ld hl, rLCDC
res 6, [hl] res rLCDC_WINDOW_TILEMAP, [hl] ; select 9800-9BFF
call InitBattleDisplay call InitBattleDisplay
call BattleStartMessage call BattleStartMessage
ld hl, rLCDC ld hl, rLCDC
set 6, [hl] set rLCDC_WINDOW_TILEMAP, [hl] ; select 9C00-9FFF
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
call EmptyBattleTextBox call EmptyBattleTextBox

View File

@ -2066,6 +2066,7 @@ BattleBGEffect_1c: ; c8b00 (32:4b00)
dw .cgb_zero dw .cgb_zero
dw .cgb_one dw .cgb_one
dw .cgb_two dw .cgb_two
.cgb_zero .cgb_zero
call BattleBGEffects_IncrementJumptable call BattleBGEffects_IncrementJumptable
ld hl, BG_EFFECT_STRUCT_03 ld hl, BG_EFFECT_STRUCT_03
@ -2313,7 +2314,7 @@ BattleBGEffect_2e: ; c8ce1 (32:4ce1)
ld [hSCY], a ld [hSCY], a
xor $ff xor $ff
inc a inc a
ld [AnimObject01_YOffset], a ld [AnimObject01YOffset], a
ret ret
BattleBGEffect_1f: ; c8cf9 (32:4cf9) BattleBGEffect_1f: ; c8cf9 (32:4cf9)

View File

@ -42,14 +42,12 @@ _DepositPKMN: ; e2391 (38:6391)
jp hl jp hl
.Jumptable: ; e23df (38:63df) .Jumptable: ; e23df (38:63df)
dw .Init dw .Init
dw .HandleJoypad dw .HandleJoypad
dw .WhatsUp dw .WhatsUp
dw .Submenu dw .Submenu
dw BillsPC_EndJumptableLoop dw BillsPC_EndJumptableLoop
.Init: ; e23e9 (38:63e9) .Init: ; e23e9 (38:63e9)
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
@ -150,7 +148,6 @@ _DepositPKMN: ; e2391 (38:6391)
jp hl jp hl
BillsPCDepositJumptable: ; e24a1 (38:64a1) BillsPCDepositJumptable: ; e24a1 (38:64a1)
dw BillsPCDepositFuncDeposit ; Deposit Pokemon dw BillsPCDepositFuncDeposit ; Deposit Pokemon
dw BillsPCDepositFuncStats ; Pokemon Stats dw BillsPCDepositFuncStats ; Pokemon Stats
dw BillsPCDepositFuncRelease ; Release Pokemon dw BillsPCDepositFuncRelease ; Release Pokemon
@ -309,14 +306,12 @@ _WithdrawPKMN: ; e2583 (38:6583)
jp hl jp hl
.Jumptable: ; e25d2 (38:65d2) .Jumptable: ; e25d2 (38:65d2)
dw .Init dw .Init
dw .Joypad dw .Joypad
dw .PrepSubmenu dw .PrepSubmenu
dw BillsPC_Withdraw dw BillsPC_Withdraw
dw BillsPC_EndJumptableLoop dw BillsPC_EndJumptableLoop
.Init: ; e25dc (38:65dc) .Init: ; e25dc (38:65dc)
ld a, NUM_BOXES + 1 ld a, NUM_BOXES + 1
ld [wBillsPC_LoadedBox], a ld [wBillsPC_LoadedBox], a
@ -560,7 +555,6 @@ _MovePKMNWithoutMail: ; e2759
; e27ac ; e27ac
.Jumptable: ; e27ac .Jumptable: ; e27ac
dw .Init dw .Init
dw .Joypad dw .Joypad
dw .PrepSubmenu dw .PrepSubmenu
@ -2029,7 +2023,6 @@ MovePKMNWitoutMail_InsertMon: ; e31e7
; e3245 ; e3245
.Jumptable: ; e3245 .Jumptable: ; e3245
dw .BoxToBox dw .BoxToBox
dw .PartyToBox dw .PartyToBox
dw .BoxToParty dw .BoxToParty

View File

@ -80,7 +80,6 @@ _CardFlip: ; e00ee (38:40ee)
; e01a0 (38:41a0) ; e01a0 (38:41a0)
.Jumptable: ; e01a0 .Jumptable: ; e01a0
dw .AskPlayWithThree dw .AskPlayWithThree
dw .DeductCoins dw .DeductCoins
dw .ChooseACard dw .ChooseACard
@ -656,7 +655,6 @@ CardFlip_BlankDiscardedCardSlot: ; e0534
; e0553 ; e0553
.Jumptable: ; e0553 .Jumptable: ; e0553
dw .Level1 dw .Level1
dw .Level2 dw .Level2
dw .Level3 dw .Level3
@ -833,7 +831,6 @@ CardFlip_CheckWinCondition: ; e0637
; e0643 ; e0643
.Jumptable: ; e0643 .Jumptable: ; e0643
dw .Impossible dw .Impossible
dw .Impossible dw .Impossible
dw .PikaJiggly dw .PikaJiggly

View File

@ -617,7 +617,7 @@ ApplyPals:
ApplyAttrMap: ApplyAttrMap:
ld a, [rLCDC] ld a, [rLCDC]
bit 7, a bit rLCDC_ENABLE, a
jr z, .UpdateVBank1 jr z, .UpdateVBank1
ld a, [hBGMapMode] ld a, [hBGMapMode]
push af push af
@ -1073,7 +1073,7 @@ SGBBorder_PushBGPals:
ld bc, $100 tiles ld bc, $100 tiles
call CopyData call CopyData
call DrawDefaultTiles call DrawDefaultTiles
ld a, $e3 ld a, LCDC_DEFAULT
ld [rLCDC], a ld [rLCDC], a
ld hl, PalPacket_9d06 ld hl, PalPacket_9d06
call PushSGBPals call PushSGBPals
@ -1107,7 +1107,7 @@ SGBBorder_MorePalPushing:
ld bc, 16 palettes ld bc, 16 palettes
call CopyData call CopyData
call DrawDefaultTiles call DrawDefaultTiles
ld a, $e3 ld a, LCDC_DEFAULT
ld [rLCDC], a ld [rLCDC], a
ld hl, PalPacket_9d46 ld hl, PalPacket_9d46
call PushSGBPals call PushSGBPals
@ -1131,7 +1131,7 @@ SGBBorder_YetMorePalPushing:
dec b dec b
jr nz, .loop jr nz, .loop
call DrawDefaultTiles call DrawDefaultTiles
ld a, $e3 ld a, LCDC_DEFAULT
ld [rLCDC], a ld [rLCDC], a
ld hl, PalPacket_9d36 ld hl, PalPacket_9d36
call PushSGBPals call PushSGBPals

View File

@ -152,9 +152,7 @@ Credits_Jumptable: ; 109926
jp hl jp hl
; 109937 ; 109937
.Jumptable: ; 109937 (42:5937) .Jumptable: ; 109937 (42:5937)
dw ParseCredits dw ParseCredits
dw Credits_Next dw Credits_Next
dw Credits_Next dw Credits_Next
@ -169,7 +167,6 @@ Credits_Jumptable: ; 109926
dw Credits_RequestGFX dw Credits_RequestGFX
dw Credits_LoopBack dw Credits_LoopBack
Credits_Next: ; 109951 (42:5951) Credits_Next: ; 109951 (42:5951)
ld hl, wJumptableIndex ld hl, wJumptableIndex
inc [hl] inc [hl]

View File

@ -34,7 +34,7 @@ _DummyGame: ; e1e5b (38:5e5b)
ld [wJumptableIndex], a ld [wJumptableIndex], a
ld a, $1 ld a, $1
ld [hBGMapMode], a ld [hBGMapMode], a
ld a, $e3 ld a, LCDC_DEFAULT
ld [rLCDC], a ld [rLCDC], a
ld a, $e4 ld a, $e4
call DmgToCgbBGPals call DmgToCgbBGPals

View File

@ -303,7 +303,6 @@ MagnetTrain_Jumptable: ; 8cdf7
; 8ce06 ; 8ce06
.Jumptable: ; 8ce06 .Jumptable: ; 8ce06
dw .InitPlayerSpriteAnim dw .InitPlayerSpriteAnim
dw .WaitScene dw .WaitScene
dw .MoveTrain1 dw .MoveTrain1

View File

@ -128,7 +128,6 @@ CutFunction: ; c785
ret ret
.Jumptable: ; c796 (3:4796) .Jumptable: ; c796 (3:4796)
dw .CheckAble dw .CheckAble
dw .DoCut dw .DoCut
dw .FailCut dw .FailCut

View File

@ -1035,7 +1035,7 @@ StartTitleScreen: ; 6219
ld [rSVBK], a ld [rSVBK], a
ld hl, rLCDC ld hl, rLCDC
res 2, [hl] res rLCDC_SPRITE_SIZE, [hl] ; 8x8
call ClearScreen call ClearScreen
call WaitBGMap2 call WaitBGMap2
xor a xor a

View File

@ -54,7 +54,6 @@ MainMenu: ; 49cdc
db "MOBILE STUDIUM@" db "MOBILE STUDIUM@"
.Jumptable: ; 0x49d60 .Jumptable: ; 0x49d60
dw MainMenu_Continue dw MainMenu_Continue
dw MainMenu_NewGame dw MainMenu_NewGame
dw MainMenu_Options dw MainMenu_Options

View File

@ -285,7 +285,7 @@ EndSpriteMovement: ; 467b
ld [hli], a ld [hli], a
ld [hli], a ld [hli], a
ld [hli], a ld [hli], a
ld [hl], a ; OBJECT_30 ld [hl], a ; OBJECT_1E
ld hl, OBJECT_DIRECTION_WALKING ld hl, OBJECT_DIRECTION_WALKING
add hl, bc add hl, bc
ld [hl], STANDING ld [hl], STANDING
@ -482,22 +482,22 @@ MovementAnonymousJumptable: ; 4793
ret ret
; 479b ; 479b
ClearObjectStructField28: ; 479b ClearObjectStructField1c: ; 479b
ld hl, OBJECT_28 ld hl, OBJECT_1C
add hl, bc add hl, bc
ld [hl], 0 ld [hl], 0
ret ret
; 47a2 ; 47a2
IncrementObjectStructField28: ; 47a2 IncrementObjectStructField1c: ; 47a2
ld hl, OBJECT_28 ld hl, OBJECT_1C
add hl, bc add hl, bc
inc [hl] inc [hl]
ret ret
; 47a8 ; 47a8
Object28AnonymousJumptable: ; 47a8 Field1cAnonymousJumptable: ; 47a8
ld hl, OBJECT_28 ld hl, OBJECT_1C
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
pop hl pop hl
@ -505,15 +505,15 @@ Object28AnonymousJumptable: ; 47a8
ret ret
; 47b0 ; 47b0
GetValueObjectStructField28: ; 47b0 GetValueObjectStructField1c: ; 47b0
ld hl, OBJECT_28 ld hl, OBJECT_1C
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
ret ret
; 47b6 ; 47b6
SetValueObjectStructField28: ; 47b6 SetValueObjectStructField1c: ; 47b6
ld hl, OBJECT_28 ld hl, OBJECT_1C
add hl, bc add hl, bc
ld [hl], a ld [hl], a
ret ret
@ -541,7 +541,7 @@ ObjectMovementReset: ; 47bc
; 47dd ; 47dd
MapObjectMovementPattern: ; 47dd MapObjectMovementPattern: ; 47dd
call ClearObjectStructField28 call ClearObjectStructField1c
call GetSpriteMovementFunction call GetSpriteMovementFunction
ld a, [hl] ld a, [hl]
ld hl, .Pointers ld hl, .Pointers
@ -1002,7 +1002,7 @@ MapObjectMovementPattern: ; 47dd
ld d, b ld d, b
ld e, c ld e, c
pop bc pop bc
ld hl, OBJECT_29 ld hl, OBJECT_1D
add hl, bc add hl, bc
ld [hl], e ld [hl], e
inc hl inc hl
@ -1021,7 +1021,7 @@ MapObjectMovementPattern: ; 47dd
ld hl, OBJECT_STEP_DURATION ld hl, OBJECT_STEP_DURATION
add hl, bc add hl, bc
ld [hl], e ld [hl], e
ld hl, OBJECT_30 ld hl, OBJECT_1E
add hl, bc add hl, bc
ld [hl], a ld [hl], a
ld hl, OBJECT_STEP_TYPE ld hl, OBJECT_STEP_TYPE
@ -1141,7 +1141,7 @@ WaitStep_InPlace: ; 4b79
; 4b86 ; 4b86
NPCJump: ; 4b86 NPCJump: ; 4b86
call Object28AnonymousJumptable call Field1cAnonymousJumptable
; anonymous dw ; anonymous dw
dw .Jump dw .Jump
dw .Land dw .Land
@ -1158,7 +1158,7 @@ NPCJump: ; 4b86
ld hl, OBJECT_FLAGS2 ld hl, OBJECT_FLAGS2
add hl, bc add hl, bc
res 3, [hl] res 3, [hl]
call IncrementObjectStructField28 call IncrementObjectStructField1c
ret ret
.Land: .Land:
@ -1176,7 +1176,7 @@ NPCJump: ; 4b86
; 4bbf ; 4bbf
PlayerJump: ; 4bbf PlayerJump: ; 4bbf
call Object28AnonymousJumptable call Field1cAnonymousJumptable
; anonymous dw ; anonymous dw
dw .initjump dw .initjump
dw .stepjump dw .stepjump
@ -1186,7 +1186,7 @@ PlayerJump: ; 4bbf
.initjump .initjump
ld hl, wPlayerStepFlags ld hl, wPlayerStepFlags
set 7, [hl] set 7, [hl]
call IncrementObjectStructField28 call IncrementObjectStructField1c
.stepjump .stepjump
call UpdateJumpPosition call UpdateJumpPosition
call UpdatePlayerStep call UpdatePlayerStep
@ -1201,14 +1201,14 @@ PlayerJump: ; 4bbf
ld hl, wPlayerStepFlags ld hl, wPlayerStepFlags
set 6, [hl] set 6, [hl]
set 4, [hl] set 4, [hl]
call IncrementObjectStructField28 call IncrementObjectStructField1c
ret ret
.initland .initland
call GetNextTile call GetNextTile
ld hl, wPlayerStepFlags ld hl, wPlayerStepFlags
set 7, [hl] set 7, [hl]
call IncrementObjectStructField28 call IncrementObjectStructField1c
.stepland .stepland
call UpdateJumpPosition call UpdateJumpPosition
call UpdatePlayerStep call UpdatePlayerStep
@ -1226,7 +1226,7 @@ PlayerJump: ; 4bbf
; 4c18 ; 4c18
TeleportFrom: ; 4c18 TeleportFrom: ; 4c18
call Object28AnonymousJumptable call Field1cAnonymousJumptable
; anonymous dw ; anonymous dw
dw .InitSpin dw .InitSpin
dw .DoSpin dw .DoSpin
@ -1241,7 +1241,7 @@ TeleportFrom: ; 4c18
ld hl, OBJECT_STEP_DURATION ld hl, OBJECT_STEP_DURATION
add hl, bc add hl, bc
ld [hl], 16 ld [hl], 16
call IncrementObjectStructField28 call IncrementObjectStructField1c
.DoSpin: .DoSpin:
ld hl, OBJECT_ACTION ld hl, OBJECT_ACTION
add hl, bc add hl, bc
@ -1250,14 +1250,14 @@ TeleportFrom: ; 4c18
add hl, bc add hl, bc
dec [hl] dec [hl]
ret nz ret nz
call IncrementObjectStructField28 call IncrementObjectStructField1c
ret ret
.InitSpinRise: .InitSpinRise:
ld hl, OBJECT_STEP_FRAME ld hl, OBJECT_STEP_FRAME
add hl, bc add hl, bc
ld [hl], 0 ld [hl], 0
ld hl, OBJECT_31 ld hl, OBJECT_1F
add hl, bc add hl, bc
ld [hl], $10 ld [hl], $10
ld hl, OBJECT_STEP_DURATION ld hl, OBJECT_STEP_DURATION
@ -1266,12 +1266,12 @@ TeleportFrom: ; 4c18
ld hl, OBJECT_FLAGS2 ld hl, OBJECT_FLAGS2
add hl, bc add hl, bc
res 3, [hl] res 3, [hl]
call IncrementObjectStructField28 call IncrementObjectStructField1c
.DoSpinRise: .DoSpinRise:
ld hl, OBJECT_ACTION ld hl, OBJECT_ACTION
add hl, bc add hl, bc
ld [hl], OBJECT_ACTION_SPIN ld [hl], OBJECT_ACTION_SPIN
ld hl, OBJECT_31 ld hl, OBJECT_1F
add hl, bc add hl, bc
inc [hl] inc [hl]
ld a, [hl] ld a, [hl]
@ -1296,7 +1296,7 @@ TeleportFrom: ; 4c18
; 4c89 ; 4c89
TeleportTo: ; 4c89 TeleportTo: ; 4c89
call Object28AnonymousJumptable call Field1cAnonymousJumptable
; anonymous dw ; anonymous dw
dw .InitWait dw .InitWait
dw .DoWait dw .DoWait
@ -1314,7 +1314,7 @@ TeleportTo: ; 4c89
ld hl, OBJECT_STEP_DURATION ld hl, OBJECT_STEP_DURATION
add hl, bc add hl, bc
ld [hl], 16 ld [hl], 16
call IncrementObjectStructField28 call IncrementObjectStructField1c
ret ret
; 4caa ; 4caa
@ -1323,18 +1323,18 @@ TeleportTo: ; 4c89
add hl, bc add hl, bc
dec [hl] dec [hl]
ret nz ret nz
call IncrementObjectStructField28 call IncrementObjectStructField1c
.InitDescent: .InitDescent:
ld hl, OBJECT_STEP_FRAME ld hl, OBJECT_STEP_FRAME
add hl, bc add hl, bc
ld [hl], 0 ld [hl], 0
ld hl, OBJECT_31 ld hl, OBJECT_1F
add hl, bc add hl, bc
ld [hl], 0 ld [hl], 0
ld hl, OBJECT_STEP_DURATION ld hl, OBJECT_STEP_DURATION
add hl, bc add hl, bc
ld [hl], 16 ld [hl], 16
call IncrementObjectStructField28 call IncrementObjectStructField1c
ret ret
; 4cc9 ; 4cc9
@ -1342,7 +1342,7 @@ TeleportTo: ; 4c89
ld hl, OBJECT_ACTION ld hl, OBJECT_ACTION
add hl, bc add hl, bc
ld [hl], OBJECT_ACTION_SPIN ld [hl], OBJECT_ACTION_SPIN
ld hl, OBJECT_31 ld hl, OBJECT_1F
add hl, bc add hl, bc
inc [hl] inc [hl]
ld a, [hl] ld a, [hl]
@ -1357,12 +1357,12 @@ TeleportTo: ; 4c89
add hl, bc add hl, bc
dec [hl] dec [hl]
ret nz ret nz
call IncrementObjectStructField28 call IncrementObjectStructField1c
.InitFinalSpin: .InitFinalSpin:
ld hl, OBJECT_STEP_DURATION ld hl, OBJECT_STEP_DURATION
add hl, bc add hl, bc
ld [hl], 16 ld [hl], 16
call IncrementObjectStructField28 call IncrementObjectStructField1c
ret ret
; 4cf5 ; 4cf5
@ -1388,7 +1388,7 @@ TeleportTo: ; 4c89
; 4d14 ; 4d14
Skyfall: ; 4d14 Skyfall: ; 4d14
call Object28AnonymousJumptable call Field1cAnonymousJumptable
; anonymous dw ; anonymous dw
dw .Init dw .Init
dw .Step dw .Step
@ -1403,7 +1403,7 @@ Skyfall: ; 4d14
ld hl, OBJECT_STEP_DURATION ld hl, OBJECT_STEP_DURATION
add hl, bc add hl, bc
ld [hl], 16 ld [hl], 16
call IncrementObjectStructField28 call IncrementObjectStructField1c
.Step: .Step:
ld hl, OBJECT_STEP_DURATION ld hl, OBJECT_STEP_DURATION
add hl, bc add hl, bc
@ -1415,15 +1415,15 @@ Skyfall: ; 4d14
ld hl, OBJECT_STEP_FRAME ld hl, OBJECT_STEP_FRAME
add hl, bc add hl, bc
ld [hl], 0 ld [hl], 0
ld hl, OBJECT_31 ld hl, OBJECT_1F
add hl, bc add hl, bc
ld [hl], 0 ld [hl], 0
ld hl, OBJECT_STEP_DURATION ld hl, OBJECT_STEP_DURATION
add hl, bc add hl, bc
ld [hl], 16 ld [hl], 16
call IncrementObjectStructField28 call IncrementObjectStructField1c
.Fall: .Fall:
ld hl, OBJECT_31 ld hl, OBJECT_1F
add hl, bc add hl, bc
inc [hl] inc [hl]
ld a, [hl] ld a, [hl]
@ -1438,7 +1438,7 @@ Skyfall: ; 4d14
add hl, bc add hl, bc
dec [hl] dec [hl]
ret nz ret nz
call IncrementObjectStructField28 call IncrementObjectStructField1c
.Finish: .Finish:
ld hl, OBJECT_STEP_FRAME ld hl, OBJECT_STEP_FRAME
add hl, bc add hl, bc
@ -1453,7 +1453,7 @@ Skyfall: ; 4d14
; 4d7e ; 4d7e
GotBiteStep: ; 4d7e GotBiteStep: ; 4d7e
call Object28AnonymousJumptable call Field1cAnonymousJumptable
; anonymous dw ; anonymous dw
dw .Init dw .Init
dw .Run dw .Run
@ -1466,7 +1466,7 @@ GotBiteStep: ; 4d7e
ld hl, OBJECT_SPRITE_Y_OFFSET ld hl, OBJECT_SPRITE_Y_OFFSET
add hl, bc add hl, bc
ld [hl], 0 ld [hl], 0
call IncrementObjectStructField28 call IncrementObjectStructField1c
.Run: .Run:
ld hl, OBJECT_SPRITE_Y_OFFSET ld hl, OBJECT_SPRITE_Y_OFFSET
add hl, bc add hl, bc
@ -1558,7 +1558,7 @@ StepTypeBump: ; 4dff
; 4e0c ; 4e0c
StepType05: ; 4e0c StepType05: ; 4e0c
call Object28AnonymousJumptable call Field1cAnonymousJumptable
; anonymous dw ; anonymous dw
dw .Reset dw .Reset
dw StepType04 dw StepType04
@ -1569,7 +1569,7 @@ StepType05: ; 4e0c
ld hl, OBJECT_FACING ld hl, OBJECT_FACING
add hl, bc add hl, bc
ld [hl], a ld [hl], a
call IncrementObjectStructField28 call IncrementObjectStructField1c
StepType04: ; 4e21 StepType04: ; 4e21
call MobileFn_4fb2 call MobileFn_4fb2
ld hl, OBJECT_DIRECTION_WALKING ld hl, OBJECT_DIRECTION_WALKING
@ -1607,7 +1607,7 @@ StepType07: ; 4e47
PlayerStep: ; 4e56 PlayerStep: ; 4e56
; AnimateStep? ; AnimateStep?
call Object28AnonymousJumptable call Field1cAnonymousJumptable
; anonymous dw ; anonymous dw
dw .init dw .init
dw .step dw .step
@ -1615,7 +1615,7 @@ PlayerStep: ; 4e56
.init .init
ld hl, wPlayerStepFlags ld hl, wPlayerStepFlags
set 7, [hl] set 7, [hl]
call IncrementObjectStructField28 call IncrementObjectStructField1c
.step .step
call UpdatePlayerStep call UpdatePlayerStep
ld hl, OBJECT_STEP_DURATION ld hl, OBJECT_STEP_DURATION
@ -1635,7 +1635,7 @@ PlayerStep: ; 4e56
; 4e83 ; 4e83
PlayerOrNPCTurnStep: ; 4e83 PlayerOrNPCTurnStep: ; 4e83
call Object28AnonymousJumptable call Field1cAnonymousJumptable
; anonymous dw ; anonymous dw
dw .init1 dw .init1
dw .step1 dw .step1
@ -1653,15 +1653,15 @@ PlayerOrNPCTurnStep: ; 4e83
ld hl, OBJECT_STEP_DURATION ld hl, OBJECT_STEP_DURATION
add hl, bc add hl, bc
ld [hl], 2 ld [hl], 2
call IncrementObjectStructField28 call IncrementObjectStructField1c
.step1 .step1
ld hl, OBJECT_STEP_DURATION ld hl, OBJECT_STEP_DURATION
add hl, bc add hl, bc
dec [hl] dec [hl]
ret nz ret nz
call IncrementObjectStructField28 call IncrementObjectStructField1c
.init2 .init2
ld hl, OBJECT_29 ; new facing ld hl, OBJECT_1D ; new facing
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
ld hl, OBJECT_FACING ld hl, OBJECT_FACING
@ -1670,7 +1670,7 @@ PlayerOrNPCTurnStep: ; 4e83
ld hl, OBJECT_STEP_DURATION ld hl, OBJECT_STEP_DURATION
add hl, bc add hl, bc
ld [hl], 2 ld [hl], 2
call IncrementObjectStructField28 call IncrementObjectStructField1c
.step2 .step2
ld hl, OBJECT_STEP_DURATION ld hl, OBJECT_STEP_DURATION
add hl, bc add hl, bc
@ -1715,7 +1715,7 @@ StepType0f: ; 4ecd
; 4f04 ; 4f04
StepTypeTrackingObject: ; 4f04 StepTypeTrackingObject: ; 4f04
ld hl, OBJECT_29 ld hl, OBJECT_1D
add hl, bc add hl, bc
ld e, [hl] ld e, [hl]
inc hl inc hl
@ -1750,19 +1750,19 @@ StepTypeTrackingObject: ; 4f04
StepType14: ; 4f33 StepType14: ; 4f33
StepType15: ; 4f33 StepType15: ; 4f33
call Object28AnonymousJumptable call Field1cAnonymousJumptable
; anonymous dw ; anonymous dw
dw .Init dw .Init
dw .Run dw .Run
.Init: .Init:
xor a xor a
ld hl, OBJECT_29 ld hl, OBJECT_1D
add hl, bc add hl, bc
ld [hl], a ld [hl], a
call IncrementObjectStructField28 call IncrementObjectStructField1c
.Run: .Run:
ld hl, OBJECT_29 ld hl, OBJECT_1D
add hl, bc add hl, bc
ld d, [hl] ld d, [hl]
ld a, [wPlayerStepVectorY] ld a, [wPlayerStepVectorY]
@ -1774,7 +1774,7 @@ StepType15: ; 4f33
jr z, .ok jr z, .ok
ld a, [hl] ld a, [hl]
call .GetSign call .GetSign
ld hl, OBJECT_29 ld hl, OBJECT_1D
add hl, bc add hl, bc
ld [hl], a ld [hl], a
ld d, a ld d, a
@ -1788,7 +1788,7 @@ StepType15: ; 4f33
ret ret
.GetSign: .GetSign:
ld hl, OBJECT_30 ld hl, OBJECT_1E
add hl, bc add hl, bc
and 1 and 1
ld a, [hl] ld a, [hl]
@ -1799,10 +1799,10 @@ StepType15: ; 4f33
; 4f77 ; 4f77
StepType16: ; 4f77 StepType16: ; 4f77
call Object28AnonymousJumptable ; ???? call Field1cAnonymousJumptable ; ????
; 4f7a ; 4f7a
StepType17: ; 4f7a StepType17: ; 4f7a
call Object28AnonymousJumptable call Field1cAnonymousJumptable
; anonymous dw ; anonymous dw
dw .null dw .null
dw .null dw .null
@ -1811,7 +1811,7 @@ StepType17: ; 4f7a
; 4f83 ; 4f83
SkyfallTop: ; 4f83 SkyfallTop: ; 4f83
call Object28AnonymousJumptable call Field1cAnonymousJumptable
; anonymous dw ; anonymous dw
dw .Init dw .Init
dw .Run dw .Run
@ -1823,7 +1823,7 @@ SkyfallTop: ; 4f83
ld hl, OBJECT_STEP_DURATION ld hl, OBJECT_STEP_DURATION
add hl, bc add hl, bc
ld [hl], 16 ld [hl], 16
call IncrementObjectStructField28 call IncrementObjectStructField1c
.Run: .Run:
ld hl, OBJECT_STEP_DURATION ld hl, OBJECT_STEP_DURATION
@ -1843,7 +1843,7 @@ SkyfallTop: ; 4f83
; 4fb2 ; 4fb2
MobileFn_4fb2: mobile MobileFn_4fb2: mobile
ld hl, OBJECT_29 ld hl, OBJECT_1D
add hl, bc add hl, bc
inc [hl] inc [hl]
ld a, [hl] ld a, [hl]
@ -1866,7 +1866,7 @@ MobileFn_4fb2: mobile
UpdateJumpPosition: ; 4fd5 UpdateJumpPosition: ; 4fd5
call GetStepVector call GetStepVector
ld a, h ld a, h
ld hl, OBJECT_31 ld hl, OBJECT_1F
add hl, bc add hl, bc
ld e, [hl] ld e, [hl]
add e add e

View File

@ -46,7 +46,6 @@ LoadMenuMonIcon: ; 8e83f
dw Mobile_InitPartyMenuBGPal71 ; mobile dw Mobile_InitPartyMenuBGPal71 ; mobile
dw .GetPartyMenuMonIcon ; unused dw .GetPartyMenuMonIcon ; unused
.GetPartyMenuMonIcon: ; 8e862 (23:6862) .GetPartyMenuMonIcon: ; 8e862 (23:6862)
call InitPartyMenuIcon call InitPartyMenuIcon
call .GetPartyMonItemGFX call .GetPartyMonItemGFX

View File

@ -727,7 +727,7 @@ Movement_turn_step_right: ; 53fc
jr TurnStep jr TurnStep
TurnStep: ; 5400 TurnStep: ; 5400
ld hl, OBJECT_29 ; new facing ld hl, OBJECT_1D ; new facing
add hl, bc add hl, bc
ld [hl], a ld [hl], a
@ -832,7 +832,7 @@ SlideStep: ; 5468
JumpStep: ; 548a JumpStep: ; 548a
call InitStep call InitStep
ld hl, OBJECT_31 ld hl, OBJECT_1F
add hl, bc add hl, bc
ld [hl], $0 ld [hl], $0

View File

@ -116,7 +116,7 @@ DoMysteryGift: ; 1048ba (41:48ba)
.PrintTextAndExit: ; 1049c5 (41:49c5) .PrintTextAndExit: ; 1049c5 (41:49c5)
call PrintText call PrintText
ld a, $e3 ld a, LCDC_DEFAULT
ld [rLCDC], a ld [rLCDC], a
ret ret
; 1049cd (41:49cd) ; 1049cd (41:49cd)
@ -262,7 +262,7 @@ Function104a95: ; 104a95 (41:4a95)
; Delay frame ; Delay frame
.ly_loop .ly_loop
ld a, [rLY] ld a, [rLY]
cp $90 cp LY_VBLANK
jr c, .ly_loop jr c, .ly_loop
ld c, LOW(rRP) ld c, LOW(rRP)
ld a, $c0 ld a, $c0
@ -281,14 +281,14 @@ Function104a95: ; 104a95 (41:4a95)
and b and b
ld b, a ld b, a
ld a, [rLY] ld a, [rLY]
cp $90 cp LY_VBLANK
jr nc, .ly_loop2 jr nc, .ly_loop2
.ly_loop3 .ly_loop3
ld a, [$ff00+c] ld a, [$ff00+c]
and b and b
ld b, a ld b, a
ld a, [rLY] ld a, [rLY]
cp $90 cp LY_VBLANK
jr c, .ly_loop3 jr c, .ly_loop3
ld a, b ld a, b
@ -1497,7 +1497,7 @@ Function10571a: ; 10571a (41:571a)
asm_105726: ; 105726 (41:5726) asm_105726: ; 105726 (41:5726)
call PrintText call PrintText
ld a, $e3 ld a, LCDC_DEFAULT
ld [rLCDC], a ld [rLCDC], a
ret ret
; 10572e (41:572e) ; 10572e (41:572e)

View File

@ -48,7 +48,7 @@ NamingScreen: ; 116c1
call DisableLCD call DisableLCD
call LoadNamingScreenGFX call LoadNamingScreenGFX
call NamingScreen_InitText call NamingScreen_InitText
ld a, $e3 ld a, LCDC_DEFAULT
ld [rLCDC], a ld [rLCDC], a
call .GetNamingScreenSetup call .GetNamingScreenSetup
call WaitBGMap call WaitBGMap
@ -1017,7 +1017,7 @@ _ComposeMailMessage: ; 11e75 (mail?)
add hl, bc add hl, bc
ld [hl], $0 ld [hl], $0
call .InitCharset call .InitCharset
ld a, $e3 ld a, LCDC_DEFAULT
ld [rLCDC], a ld [rLCDC], a
call .initwNamingScreenMaxNameLength call .initwNamingScreenMaxNameLength
ld b, SCGB_DIPLOMA ld b, SCGB_DIPLOMA

View File

@ -28,7 +28,6 @@ Pack: ; 10000
; 10030 ; 10030
.Jumptable: ; 10030 (4:4030) .Jumptable: ; 10030 (4:4030)
dw .InitGFX ; 0 dw .InitGFX ; 0
dw .InitItemsPocket ; 1 dw .InitItemsPocket ; 1
dw .ItemsPocketMenu ; 2 dw .ItemsPocketMenu ; 2
@ -694,7 +693,6 @@ BattlePack: ; 10493
; 104c3 ; 104c3
.Jumptable: ; 104c3 (4:44c3) .Jumptable: ; 104c3 (4:44c3)
dw .InitGFX ; 0 dw .InitGFX ; 0
dw .InitItemsPocket ; 1 dw .InitItemsPocket ; 1
dw .ItemsPocketMenu ; 2 dw .ItemsPocketMenu ; 2
@ -865,7 +863,6 @@ TMHMSubmenu: ; 105dc (4:45dc)
; 0x10614 ; 0x10614
.UsableJumptable: ; 10614 .UsableJumptable: ; 10614
dw .Use dw .Use
dw .Quit dw .Quit
; 10618 ; 10618
@ -885,7 +882,6 @@ TMHMSubmenu: ; 105dc (4:45dc)
; 0x10627 ; 0x10627
.UnusableJumptable: ; 10627 .UnusableJumptable: ; 10627
dw .Quit dw .Quit
; 10629 ; 10629
@ -897,7 +893,6 @@ TMHMSubmenu: ; 105dc (4:45dc)
ret ret
.ItemFunctionJumptable: ; 10637 (4:4637) .ItemFunctionJumptable: ; 10637 (4:4637)
dw .Oak dw .Oak
dw .Oak dw .Oak
dw .Oak dw .Oak
@ -1002,11 +997,11 @@ DepositSellPack: ; 106be
; 106d1 ; 106d1
.Jumptable: ; 106d1 (4:46d1) .Jumptable: ; 106d1 (4:46d1)
dw .ItemsPocket dw .ItemsPocket
dw .BallsPocket dw .BallsPocket
dw .KeyItemsPocket dw .KeyItemsPocket
dw .TMHMPocket dw .TMHMPocket
.ItemsPocket: ; 106d9 (4:46d9) .ItemsPocket: ; 106d9 (4:46d9)
xor a xor a
call InitPocket call InitPocket

View File

@ -59,7 +59,6 @@ HandlePlayerStep: ; d4e5 (3:54e5)
ret ret
.Jumptable: ; d4f2 (3:54f2) .Jumptable: ; d4f2 (3:54f2)
dw GetMovementPermissions dw GetMovementPermissions
dw BufferScreen dw BufferScreen
dw .mobile dw .mobile

View File

@ -184,7 +184,6 @@ Pokedex_RunJumptable: ; 4010b
call Pokedex_LoadPointer call Pokedex_LoadPointer
jp hl jp hl
.Jumptable: ; 40115 (10:4115) .Jumptable: ; 40115 (10:4115)
dw Pokedex_InitMainScreen dw Pokedex_InitMainScreen
dw Pokedex_UpdateMainScreen dw Pokedex_UpdateMainScreen
@ -201,7 +200,6 @@ Pokedex_RunJumptable: ; 4010b
dw Pokedex_UpdateUnownMode dw Pokedex_UpdateUnownMode
dw Pokedex_Exit dw Pokedex_Exit
Pokedex_IncrementDexPointer: ; 40131 (10:4131) Pokedex_IncrementDexPointer: ; 40131 (10:4131)
ld hl, wJumptableIndex ld hl, wJumptableIndex
inc [hl] inc [hl]
@ -1623,13 +1621,11 @@ Pokedex_OrderMonsByMode: ; 40bdc
call Pokedex_LoadPointer call Pokedex_LoadPointer
jp hl jp hl
.Jumptable: ; 40bf0 (10:4bf0) .Jumptable: ; 40bf0 (10:4bf0)
dw .NewMode dw .NewMode
dw .OldMode dw .OldMode
dw Pokedex_ABCMode dw Pokedex_ABCMode
.NewMode: ; 40bf6 (10:4bf6) .NewMode: ; 40bf6 (10:4bf6)
ld de, NewPokedexOrder ld de, NewPokedexOrder
ld hl, wPokedexOrder ld hl, wPokedexOrder

View File

@ -59,7 +59,7 @@ PokeGear: ; 90b8d (24:4b8d)
call InitPokegearModeIndicatorArrow call InitPokegearModeIndicatorArrow
ld a, 8 ld a, 8
call SkipMusic call SkipMusic
ld a, $e3 ld a, LCDC_DEFAULT
ld [rLCDC], a ld [rLCDC], a
call TownMap_InitCursorAndPlayerIconPositions call TownMap_InitCursorAndPlayerIconPositions
xor a xor a
@ -285,7 +285,6 @@ InitPokegearTilemap: ; 90da8 (24:4da8)
dw .Map dw .Map
dw .Phone dw .Phone
dw .Radio dw .Radio
; 90e1a ; 90e1a
.Clock: ; 90e1a .Clock: ; 90e1a
@ -1852,7 +1851,7 @@ _TownMap: ; 9191c
farcall ClearSpriteAnims farcall ClearSpriteAnims
ld a, 8 ld a, 8
call SkipMusic call SkipMusic
ld a, $e3 ld a, LCDC_DEFAULT
ld [rLCDC], a ld [rLCDC], a
call TownMap_GetCurrentLandmark call TownMap_GetCurrentLandmark
ld [wTownMapPlayerIconLandmark], a ld [wTownMapPlayerIconLandmark], a

View File

@ -29,9 +29,7 @@ PrinterJumptableIteration: ; 84022
jp hl jp hl
; 84031 ; 84031
.Jumptable: ; 84031 (21:4031) .Jumptable: ; 84031 (21:4031)
dw Print_InitPrinterHandshake ; 00 dw Print_InitPrinterHandshake ; 00
dw Printer_CheckConnectionStatus ; 01 dw Printer_CheckConnectionStatus ; 01
dw Printer_WaitSerial ; 02 dw Printer_WaitSerial ; 02
@ -55,7 +53,6 @@ PrinterJumptableIteration: ; 84022
dw Printer_WaitLoopBack ; 12 dw Printer_WaitLoopBack ; 12
dw Printer_WaitLoopBack_ ; 13 dw Printer_WaitLoopBack_ ; 13
Printer_NextSection: ; 84059 (21:4059) Printer_NextSection: ; 84059 (21:4059)
ld hl, wJumptableIndex ld hl, wJumptableIndex
inc [hl] inc [hl]
@ -471,7 +468,6 @@ _PrinterReceive:: ; 842db
jp hl jp hl
; 842ea ; 842ea
.Jumptable: ; 842ea (21:42ea) .Jumptable: ; 842ea (21:42ea)
dw Printer_DoNothing ; 00 dw Printer_DoNothing ; 00
@ -509,7 +505,6 @@ _PrinterReceive:: ; 842db
dw Printer_ReceiveTowPrinterHandshakeAndSend0x00 ; 1e dw Printer_ReceiveTowPrinterHandshakeAndSend0x00 ; 1e
dw Printer_ReceiveTowPrinterStatusFlagsAndExitSendLoop ; 1f dw Printer_ReceiveTowPrinterStatusFlagsAndExitSendLoop ; 1f
Printer_NextInstruction: ; 8432a (21:432a) Printer_NextInstruction: ; 8432a (21:432a)
ld hl, wPrinterOpcode ld hl, wPrinterOpcode
inc [hl] inc [hl]

View File

@ -23,8 +23,8 @@ GetSquareRoot: ; 13b87
ret ret
.Squares: ; 13b98 .Squares: ; 13b98
root set 1 root = 1
rept $ff rept $ff
dw root*root dw root * root
root set root+1 root = root + 1
endr endr

View File

@ -17,7 +17,7 @@ PhoneRing_CopyTilemapAtOnce: ; 4d188
ld [hMapAnims], a ld [hMapAnims], a
.wait .wait
ld a, [rLY] ld a, [rLY]
cp $8f cp LY_VBLANK - 1
jr c, .wait jr c, .wait
di di
@ -31,7 +31,7 @@ PhoneRing_CopyTilemapAtOnce: ; 4d188
call .CopyTilemapAtOnce call .CopyTilemapAtOnce
.wait2 .wait2
ld a, [rLY] ld a, [rLY]
cp $8f cp LY_VBLANK - 1
jr c, .wait2 jr c, .wait2
ei ei

View File

@ -8,6 +8,19 @@ SLOTS_SQUIRTLE EQU $10
SLOTS_STARYU EQU $14 SLOTS_STARYU EQU $14
REEL_SIZE EQU 15 REEL_SIZE EQU 15
; Constants for slot_reel offsets (see macros/wram.asm)
REEL_ACTION EQUS "(wReel1ReelAction - wReel1)"
REEL_TILEMAP_ADDR EQUS "(wReel1TilemapAddr - wReel1)"
REEL_POSITION EQUS "(wReel1Position - wReel1)"
REEL_SPIN_DISTANCE EQUS "(wReel1SpinDistance - wReel1)"
REEL_SPIN_RATE EQUS "(wReel1SpinRate - wReel1)"
REEL_OAM_ADDR EQUS "(wReel1OAMAddr - wReel1)"
REEL_X_COORD EQUS "(wReel1XCoord - wReel1)"
REEL_MANIP_COUNTER EQUS "(wReel1ManipCounter - wReel1)"
REEL_MANIP_DELAY EQUS "(wReel1ManipDelay - wReel1)"
REEL_FIELD_0B EQUS "(wReel1Field0b - wReel1)"
REEL_STOP_DELAY EQUS "(wReel1StopDelay - wReel1)"
; SlotsJumptable constants ; SlotsJumptable constants
const_def const_def
const SLOTS_INIT const SLOTS_INIT
@ -20,8 +33,8 @@ REEL_SIZE EQU 15
const SLOTS_WAIT_REEL3 const SLOTS_WAIT_REEL3
const SLOTS_WAIT_STOP_REEL3 const SLOTS_WAIT_STOP_REEL3
const SLOTS_NEXT_09 const SLOTS_NEXT_09
const SLOTS_NEXT_0a const SLOTS_NEXT_0A
const SLOTS_NEXT_0b const SLOTS_NEXT_0B
const SLOTS_FLASH_IF_WIN const SLOTS_FLASH_IF_WIN
const SLOTS_FLASH_SCREEN const SLOTS_FLASH_SCREEN
const SLOTS_GIVE_EARNED_COINS const SLOTS_GIVE_EARNED_COINS
@ -76,7 +89,7 @@ _SlotMachine:
ld hl, Options ld hl, Options
res NO_TEXT_SCROLL, [hl] res NO_TEXT_SCROLL, [hl]
ld hl, rLCDC ld hl, rLCDC
res 2, [hl] res rLCDC_SPRITE_SIZE, [hl] ; 8x8
ret ret
.InitGFX: ; 926f7 (24:66f7) .InitGFX: ; 926f7 (24:66f7)
@ -121,7 +134,7 @@ _SlotMachine:
call CopyBytes call CopyBytes
ld hl, rLCDC ld hl, rLCDC
set 2, [hl] set rLCDC_SPRITE_SIZE, [hl] ; 8x16
call EnableLCD call EnableLCD
ld hl, wSlots ld hl, wSlots
ld bc, wSlotsEnd - wSlots ld bc, wSlotsEnd - wSlots
@ -536,7 +549,7 @@ Slots_CheckCoinCaseFull: ; 92a04 (24:6a04)
ret ret
Slots_GetCurrentReelState: ; 92a12 (24:6a12) Slots_GetCurrentReelState: ; 92a12 (24:6a12)
ld hl, wReel1Position - wReel1 ld hl, REEL_POSITION
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
and a and a
@ -547,7 +560,7 @@ Slots_GetCurrentReelState: ; 92a12 (24:6a12)
and $f and $f
ld e, a ld e, a
ld d, $0 ld d, $0
ld hl, wReel1TilemapAddr - wReel1 ld hl, REEL_TILEMAP_ADDR
add hl, bc add hl, bc
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
@ -655,68 +668,68 @@ Slots_StopReel3: ; 92a60 (24:6a60)
Slots_InitReelTiles: ; 92a98 (24:6a98) Slots_InitReelTiles: ; 92a98 (24:6a98)
ld bc, wReel1 ld bc, wReel1
ld hl, wReel1OAMAddr - wReel1 ld hl, REEL_OAM_ADDR
add hl, bc add hl, bc
ld de, Sprites + 16 * 4 ld de, Sprites + 16 * 4
ld [hl], e ld [hl], e
inc hl inc hl
ld [hl], d ld [hl], d
ld hl, wReel1TilemapAddr - wReel1 ld hl, REEL_TILEMAP_ADDR
add hl, bc add hl, bc
ld de, Reel1Tilemap ld de, Reel1Tilemap
ld [hl], e ld [hl], e
inc hl inc hl
ld [hl], d ld [hl], d
ld hl, wReel1XCoord - wReel1 ld hl, REEL_X_COORD
add hl, bc add hl, bc
ld [hl], 6 * 8 ld [hl], 6 * 8
call .OAM call .OAM
ld bc, wReel2 ld bc, wReel2
ld hl, wReel1OAMAddr - wReel1 ld hl, REEL_OAM_ADDR
add hl, bc add hl, bc
ld de, Sprites + 24 * 4 ld de, Sprites + 24 * 4
ld [hl], e ld [hl], e
inc hl inc hl
ld [hl], d ld [hl], d
ld hl, wReel1TilemapAddr - wReel1 ld hl, REEL_TILEMAP_ADDR
add hl, bc add hl, bc
ld de, Reel2Tilemap ld de, Reel2Tilemap
ld [hl], e ld [hl], e
inc hl inc hl
ld [hl], d ld [hl], d
ld hl, wReel1XCoord - wReel1 ld hl, REEL_X_COORD
add hl, bc add hl, bc
ld [hl], 10 * 8 ld [hl], 10 * 8
call .OAM call .OAM
ld bc, wReel3 ld bc, wReel3
ld hl, wReel1OAMAddr - wReel1 ld hl, REEL_OAM_ADDR
add hl, bc add hl, bc
ld de, Sprites + 32 * 4 ld de, Sprites + 32 * 4
ld [hl], e ld [hl], e
inc hl inc hl
ld [hl], d ld [hl], d
ld hl, wReel1TilemapAddr - wReel1 ld hl, REEL_TILEMAP_ADDR
add hl, bc add hl, bc
ld de, Reel3Tilemap ld de, Reel3Tilemap
ld [hl], e ld [hl], e
inc hl inc hl
ld [hl], d ld [hl], d
ld hl, wReel1XCoord - wReel1 ld hl, REEL_X_COORD
add hl, bc add hl, bc
ld [hl], 14 * 8 ld [hl], 14 * 8
call .OAM call .OAM
ret ret
.OAM: ; 92af9 (24:6af9) .OAM: ; 92af9 (24:6af9)
ld hl, wReel1ReelAction - wReel1 ld hl, REEL_ACTION
add hl, bc add hl, bc
ld [hl], REEL_ACTION_DO_NOTHING ld [hl], REEL_ACTION_DO_NOTHING
ld hl, wReel1Position - wReel1 ld hl, REEL_POSITION
add hl, bc add hl, bc
ld [hl], REEL_SIZE - 1 ld [hl], REEL_SIZE - 1
ld hl, wReel1SpinDistance - wReel1 ld hl, REEL_SPIN_DISTANCE
add hl, bc add hl, bc
ld [hl], REEL_ACTION_DO_NOTHING ld [hl], REEL_ACTION_DO_NOTHING
call Slots_UpdateReelPositionAndOAM call Slots_UpdateReelPositionAndOAM
@ -732,26 +745,26 @@ Slots_SpinReels: ; 92b0f (24:6b0f)
ret ret
.SpinReel: ; 92b22 (24:6b22) .SpinReel: ; 92b22 (24:6b22)
ld hl, wReel1SpinDistance - wReel1 ld hl, REEL_SPIN_DISTANCE
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
and $f and $f
jr nz, .skip jr nz, .skip
call ReelActionJumptable call ReelActionJumptable
.skip .skip
ld hl, wReel1SpinRate - wReel1 ld hl, REEL_SPIN_RATE
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
and a and a
ret z ret z
ld d, a ld d, a
ld hl, wReel1SpinDistance - wReel1 ld hl, REEL_SPIN_DISTANCE
add hl, bc add hl, bc
add [hl] add [hl]
ld [hl], a ld [hl], a
and $f and $f
jr z, Slots_UpdateReelPositionAndOAM jr z, Slots_UpdateReelPositionAndOAM
ld hl, wReel1OAMAddr - wReel1 ld hl, REEL_OAM_ADDR
add hl, bc add hl, bc
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
@ -769,17 +782,17 @@ Slots_SpinReels: ; 92b0f (24:6b0f)
ret ret
Slots_UpdateReelPositionAndOAM: ; 92b53 (24:6b53) Slots_UpdateReelPositionAndOAM: ; 92b53 (24:6b53)
ld hl, wReel1XCoord - wReel1 ld hl, REEL_X_COORD
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
ld [wCurrReelXCoord], a ld [wCurrReelXCoord], a
ld a, 10 * 8 ld a, 10 * 8
ld [wCurrReelYCoord], a ld [wCurrReelYCoord], a
ld hl, wReel1Position - wReel1 ld hl, REEL_POSITION
add hl, bc add hl, bc
ld e, [hl] ld e, [hl]
ld d, 0 ld d, 0
ld hl, wReel1TilemapAddr - wReel1 ld hl, REEL_TILEMAP_ADDR
add hl, bc add hl, bc
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
@ -788,7 +801,7 @@ Slots_UpdateReelPositionAndOAM: ; 92b53 (24:6b53)
ld e, l ld e, l
ld d, h ld d, h
call .LoadOAM call .LoadOAM
ld hl, wReel1Position - wReel1 ld hl, REEL_POSITION
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
inc a inc a
@ -801,7 +814,7 @@ Slots_UpdateReelPositionAndOAM: ; 92b53 (24:6b53)
ret ret
.LoadOAM: ; 92b83 (24:6b83) .LoadOAM: ; 92b83 (24:6b83)
ld hl, wReel1OAMAddr - wReel1 ld hl, REEL_OAM_ADDR
add hl, bc add hl, bc
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
@ -862,7 +875,7 @@ Function92bbe: ; 92bbe
; 92bd4 ; 92bd4
ReelActionJumptable: ; 92bd4 (24:6bd4) ReelActionJumptable: ; 92bd4 (24:6bd4)
ld hl, wReel1ReelAction - wReel1 ld hl, REEL_ACTION
add hl, bc add hl, bc
ld e, [hl] ld e, [hl]
ld d, 0 ld d, 0
@ -910,7 +923,7 @@ ReelAction_DoNothing: ; 92c16
; 92c17 ; 92c17
ReelAction_QuadrupleRate: ; 92c17 ReelAction_QuadrupleRate: ; 92c17
ld hl, wReel1SpinRate - wReel1 ld hl, REEL_SPIN_RATE
add hl, bc add hl, bc
ld [hl], 16 ld [hl], 16
ret ret
@ -918,7 +931,7 @@ ReelAction_QuadrupleRate: ; 92c17
; 92c1e ; 92c1e
ReelAction_DoubleRate: ; 92c1e ReelAction_DoubleRate: ; 92c1e
ld hl, wReel1SpinRate - wReel1 ld hl, REEL_SPIN_RATE
add hl, bc add hl, bc
ld [hl], 8 ld [hl], 8
ret ret
@ -926,7 +939,7 @@ ReelAction_DoubleRate: ; 92c1e
; 92c25 ; 92c25
ReelAction_NormalRate: ; 92c25 ReelAction_NormalRate: ; 92c25
ld hl, wReel1SpinRate - wReel1 ld hl, REEL_SPIN_RATE
add hl, bc add hl, bc
ld [hl], 4 ld [hl], 4
ret ret
@ -934,7 +947,7 @@ ReelAction_NormalRate: ; 92c25
; 92c2c ; 92c2c
ReelAction_HalfRate: ; 92c2c ReelAction_HalfRate: ; 92c2c
ld hl, wReel1SpinRate - wReel1 ld hl, REEL_SPIN_RATE
add hl, bc add hl, bc
ld [hl], 2 ld [hl], 2
ret ret
@ -942,7 +955,7 @@ ReelAction_HalfRate: ; 92c2c
; 92c33 ; 92c33
ReelAction_QuarterRate: ; 92c33 ReelAction_QuarterRate: ; 92c33
ld hl, wReel1SpinRate - wReel1 ld hl, REEL_SPIN_RATE
add hl, bc add hl, bc
ld [hl], 1 ld [hl], 1
ret ret
@ -950,17 +963,17 @@ ReelAction_QuarterRate: ; 92c33
; 92c3a ; 92c3a
Slots_StopReel: ; 92c3a Slots_StopReel: ; 92c3a
ld hl, wReel1SpinRate - wReel1 ld hl, REEL_SPIN_RATE
add hl, bc add hl, bc
ld [hl], 0 ld [hl], 0
ld hl, wReel1ReelAction - wReel1 ld hl, REEL_ACTION
add hl, bc add hl, bc
ld [hl], REEL_ACTION_STOP_REEL_IGNORE_JOYPAD ld [hl], REEL_ACTION_STOP_REEL_IGNORE_JOYPAD
ld hl, wReel1StopDelay - wReel1 ld hl, REEL_STOP_DELAY
add hl, bc add hl, bc
ld [hl], 3 ld [hl], 3
ReelAction_StopReelIgnoreJoypad: ; 92c4c ReelAction_StopReelIgnoreJoypad: ; 92c4c
ld hl, wReel1StopDelay - wReel1 ld hl, REEL_STOP_DELAY
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
and a and a
@ -969,7 +982,7 @@ ReelAction_StopReelIgnoreJoypad: ; 92c4c
ret ret
.EndReel: .EndReel:
ld hl, wReel1ReelAction - wReel1 ld hl, REEL_ACTION
add hl, bc add hl, bc
ld a, REEL_ACTION_DO_NOTHING ld a, REEL_ACTION_DO_NOTHING
ld [hl], a ld [hl], a
@ -979,14 +992,14 @@ ReelAction_StopReelIgnoreJoypad: ; 92c4c
ReelAction_StopReel1: ; 92c5e ReelAction_StopReel1: ; 92c5e
; If no bias: don't manipulate reel. ; If no bias: don't manipulate reel.
; If bias: manipulate reel up to wReel1ManipCounter (i.e. 4) times, ; If bias: manipulate reel up to wReel1ManipCounter (i.e. 4) slots,
; stoping early if the biased symbol shows up anywhere in reel #1, ; stoping early if the biased symbol shows up anywhere in reel #1,
; even if the current bet won't allow lining it up. ; even if the current bet won't allow lining it up.
ld a, [wSlotBias] ld a, [wSlotBias]
cp SLOTS_NOBIAS cp SLOTS_NOBIAS
jr z, .NoBias jr z, .NoBias
ld hl, wReel1ManipCounter - wReel1 ld hl, REEL_MANIP_COUNTER
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
and a and a
@ -1018,7 +1031,7 @@ ReelAction_StopReel1: ; 92c5e
ReelAction_StopReel2: ; 92c86 ReelAction_StopReel2: ; 92c86
; If no bias: don't manipulate reel. ; If no bias: don't manipulate reel.
; If bias: manipulate reel up to wReel2ManipCounter (i.e. 4) times, ; If bias: manipulate reel up to wReel2ManipCounter (i.e. 4) slots,
; stoping early if the biased symbol is lined up in the first two ; stoping early if the biased symbol is lined up in the first two
; reels, according to the lines that the current bet allows. ; reels, according to the lines that the current bet allows.
@ -1032,7 +1045,7 @@ ReelAction_StopReel2: ; 92c86
ld a, [wSlotBias] ld a, [wSlotBias]
cp SLOTS_NOBIAS cp SLOTS_NOBIAS
jr z, .NoBias jr z, .NoBias
ld hl, wReel1ManipCounter - wReel1 ld hl, REEL_MANIP_COUNTER
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
and a and a
@ -1047,7 +1060,7 @@ ReelAction_StopReel2: ; 92c86
; 92ca9 ; 92ca9
ReelAction_StopReel3: ; 92ca9 ReelAction_StopReel3: ; 92ca9
; Manipulate the reel up to wReel3ManipCounter (i.e. 4) times, ; Manipulate the reel up to wReel3ManipCounter (i.e. 4) slots,
; stopping early if the bias symbol is lined up for a win. ; stopping early if the bias symbol is lined up for a win.
; If not biased to any symbols, stop as soon as nothing is lined up. ; If not biased to any symbols, stop as soon as nothing is lined up.
@ -1056,7 +1069,7 @@ ReelAction_StopReel3: ; 92ca9
ld hl, wSlotBias ld hl, wSlotBias
cp [hl] cp [hl]
jr z, .NoBias jr z, .NoBias
ld hl, wReel1ManipCounter - wReel1 ld hl, REEL_MANIP_COUNTER
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
and a and a
@ -1068,7 +1081,7 @@ ReelAction_StopReel3: ; 92ca9
ld a, [wSlotBias] ld a, [wSlotBias]
cp SLOTS_NOBIAS cp SLOTS_NOBIAS
jr z, .NoBias jr z, .NoBias
ld hl, wReel1ManipCounter - wReel1 ld hl, REEL_MANIP_COUNTER
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
and a and a
@ -1099,13 +1112,13 @@ ReelAction_SetUpReel2SkipTo7: ; 92cd2
.no_match .no_match
ld a, SFX_STOP_SLOT ld a, SFX_STOP_SLOT
call Slots_PlaySFX call Slots_PlaySFX
ld hl, wReel1ReelAction - wReel1 ld hl, REEL_ACTION
add hl, bc add hl, bc
inc [hl] ; REEL_ACTION_WAIT_REEL2_SKIP_TO_7 inc [hl] ; REEL_ACTION_WAIT_REEL2_SKIP_TO_7
ld hl, wReel1ManipDelay - wReel1 ld hl, REEL_MANIP_DELAY
add hl, bc add hl, bc
ld [hl], 32 ld [hl], 32
ld hl, wReel1SpinRate - wReel1 ld hl, REEL_SPIN_RATE
add hl, bc add hl, bc
ld [hl], 0 ld [hl], 0
ret ret
@ -1113,7 +1126,7 @@ ReelAction_SetUpReel2SkipTo7: ; 92cd2
; 92cf8 ; 92cf8
ReelAction_WaitReel2SkipTo7: ; 92cf8 ReelAction_WaitReel2SkipTo7: ; 92cf8
ld hl, wReel1ManipDelay - wReel1 ld hl, REEL_MANIP_DELAY
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
and a and a
@ -1124,10 +1137,10 @@ ReelAction_WaitReel2SkipTo7: ; 92cf8
.asm_92d02 .asm_92d02
ld a, SFX_THROW_BALL ld a, SFX_THROW_BALL
call Slots_PlaySFX call Slots_PlaySFX
ld hl, wReel1ReelAction - wReel1 ld hl, REEL_ACTION
add hl, bc add hl, bc
inc [hl] ; REEL_ACTION_FAST_SPIN_REEL2_UNTIL_LINED_UP_7S inc [hl] ; REEL_ACTION_FAST_SPIN_REEL2_UNTIL_LINED_UP_7S
ld hl, wReel1SpinRate - wReel1 ld hl, REEL_SPIN_RATE
add hl, bc add hl, bc
ld [hl], 8 ld [hl], 8
ret ret
@ -1159,10 +1172,10 @@ ReelAction_InitGolem: ; 92d20
ld a, SFX_STOP_SLOT ld a, SFX_STOP_SLOT
call Slots_PlaySFX call Slots_PlaySFX
call Slots_WaitSFX call Slots_WaitSFX
ld hl, wReel1ReelAction - wReel1 ld hl, REEL_ACTION
add hl, bc add hl, bc
inc [hl] ; REEL_ACTION_WAIT_GOLEM inc [hl] ; REEL_ACTION_WAIT_GOLEM
ld hl, wReel1SpinRate - wReel1 ld hl, REEL_SPIN_RATE
add hl, bc add hl, bc
ld [hl], 0 ld [hl], 0
call Slots_GetNumberOfGolems call Slots_GetNumberOfGolems
@ -1192,10 +1205,10 @@ ReelAction_WaitGolem: ; 92d4f
ret ret
.one .one
ld hl, wReel1ReelAction - wReel1 ld hl, REEL_ACTION
add hl, bc add hl, bc
inc [hl] ; REEL_ACTION_END_GOLEM inc [hl] ; REEL_ACTION_END_GOLEM
ld hl, wReel1SpinRate - wReel1 ld hl, REEL_SPIN_RATE
add hl, bc add hl, bc
ld [hl], 8 ld [hl], 8
ret ret
@ -1205,10 +1218,10 @@ ReelAction_WaitGolem: ; 92d4f
ReelAction_EndGolem: ; 92d6e ReelAction_EndGolem: ; 92d6e
xor a xor a
ld [wSlotsDelay], a ld [wSlotsDelay], a
ld hl, wReel1ReelAction - wReel1 ld hl, REEL_ACTION
add hl, bc add hl, bc
dec [hl] ; REEL_ACTION_WAIT_GOLEM dec [hl] ; REEL_ACTION_WAIT_GOLEM
ld hl, wReel1SpinRate - wReel1 ld hl, REEL_SPIN_RATE
add hl, bc add hl, bc
ld [hl], 0 ld [hl], 0
ret ret
@ -1226,10 +1239,10 @@ ReelAction_InitChansey: ; 92d7e
ld a, SFX_STOP_SLOT ld a, SFX_STOP_SLOT
call Slots_PlaySFX call Slots_PlaySFX
call Slots_WaitSFX call Slots_WaitSFX
ld hl, wReel1ReelAction - wReel1 ld hl, REEL_ACTION
add hl, bc add hl, bc
inc [hl] ; REEL_ACTION_WAIT_CHANSEY inc [hl] ; REEL_ACTION_WAIT_CHANSEY
ld hl, wReel1SpinRate - wReel1 ld hl, REEL_SPIN_RATE
add hl, bc add hl, bc
ld [hl], 0 ld [hl], 0
push bc push bc
@ -1247,7 +1260,7 @@ ReelAction_WaitChansey: ; 92da4
ld a, [wSlotsDelay] ld a, [wSlotsDelay]
and a and a
ret z ret z
ld hl, wReel1ReelAction - wReel1 ld hl, REEL_ACTION
add hl, bc add hl, bc
inc [hl] ; REEL_ACTION_WAIT_EGG inc [hl] ; REEL_ACTION_WAIT_EGG
ld a, 2 ld a, 2
@ -1256,17 +1269,17 @@ ReelAction_WaitEgg: ; 92db3
ld a, [wSlotsDelay] ld a, [wSlotsDelay]
cp $4 cp $4
ret c ret c
ld hl, wReel1ReelAction - wReel1 ld hl, REEL_ACTION
add hl, bc add hl, bc
inc [hl] ; REEL_ACTION_DROP_REEL inc [hl] ; REEL_ACTION_DROP_REEL
ld hl, wReel1SpinRate - wReel1 ld hl, REEL_SPIN_RATE
add hl, bc add hl, bc
ld [hl], 16 ld [hl], 16
ld hl, wReel1ManipDelay - wReel1 ld hl, REEL_MANIP_DELAY
add hl, bc add hl, bc
ld [hl], 17 ld [hl], 17
ReelAction_DropReel: ; 92dca ReelAction_DropReel: ; 92dca
ld hl, wReel1ManipDelay - wReel1 ld hl, REEL_MANIP_DELAY
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
and a and a
@ -1285,10 +1298,10 @@ ReelAction_DropReel: ; 92dca
ret ret
.EggAgain: .EggAgain:
ld hl, wReel1SpinRate - wReel1 ld hl, REEL_SPIN_RATE
add hl, bc add hl, bc
ld [hl], 0 ld [hl], 0
ld hl, wReel1ReelAction - wReel1 ld hl, REEL_ACTION
add hl, bc add hl, bc
dec [hl] dec [hl]
dec [hl] ; REEL_ACTION_WAIT_CHANSEY dec [hl] ; REEL_ACTION_WAIT_CHANSEY
@ -1304,15 +1317,15 @@ ReelAction_Unused: ; 92df7
ld a, SFX_STOP_SLOT ld a, SFX_STOP_SLOT
call Slots_PlaySFX call Slots_PlaySFX
call Slots_WaitSFX call Slots_WaitSFX
ld hl, wReel1ReelAction - wReel1 ld hl, REEL_ACTION
add hl, bc add hl, bc
inc [hl] ; REEL_ACTION_CHECK_DROP_REEL inc [hl] ; REEL_ACTION_CHECK_DROP_REEL
call Slots_GetNumberOfGolems call Slots_GetNumberOfGolems
ld hl, wReel1ManipDelay - wReel1 ld hl, REEL_MANIP_DELAY
add hl, bc add hl, bc
ld [hl], a ld [hl], a
ReelAction_CheckDropReel: ; 92e10 ReelAction_CheckDropReel: ; 92e10
ld hl, wReel1ManipDelay - wReel1 ld hl, REEL_MANIP_DELAY
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
and a and a
@ -1323,17 +1336,17 @@ ReelAction_CheckDropReel: ; 92e10
.spin .spin
dec [hl] dec [hl]
ld hl, wReel1ReelAction - wReel1 ld hl, REEL_ACTION
add hl, bc add hl, bc
inc [hl] ; REEL_ACTION_WAIT_DROP_REEL inc [hl] ; REEL_ACTION_WAIT_DROP_REEL
ld hl, wReel1Slot0b - wReel1 ld hl, REEL_FIELD_0B
add hl, bc add hl, bc
ld [hl], 32 ld [hl], 32
ld hl, wReel1SpinRate - wReel1 ld hl, REEL_SPIN_RATE
add hl, bc add hl, bc
ld [hl], 0 ld [hl], 0
ReelAction_WaitDropReel: ; 92e31 ReelAction_WaitDropReel: ; 92e31
ld hl, wReel1Slot0b - wReel1 ld hl, REEL_FIELD_0B
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
and a and a
@ -1342,10 +1355,10 @@ ReelAction_WaitDropReel: ; 92e31
ret ret
.DropReel: .DropReel:
ld hl, wReel1ReelAction - wReel1 ld hl, REEL_ACTION
add hl, bc add hl, bc
dec [hl] dec [hl]
ld hl, wReel1SpinRate - wReel1 ld hl, REEL_SPIN_RATE
add hl, bc add hl, bc
ld [hl], 8 ld [hl], 8
ret ret
@ -1365,17 +1378,17 @@ ReelAction_StartSlowAdvanceReel3: ; 92e47
ld a, SFX_STOP_SLOT ld a, SFX_STOP_SLOT
call Slots_PlaySFX call Slots_PlaySFX
call Slots_WaitSFX call Slots_WaitSFX
ld hl, wReel1SpinRate - wReel1 ld hl, REEL_SPIN_RATE
add hl, bc add hl, bc
ld [hl], 1 ld [hl], 1
ld hl, wReel1ReelAction - wReel1 ld hl, REEL_ACTION
add hl, bc add hl, bc
inc [hl] ; REEL_ACTION_WAIT_SLOW_ADVANCE_REEL3 inc [hl] ; REEL_ACTION_WAIT_SLOW_ADVANCE_REEL3
ld hl, wReel1ManipDelay - wReel1 ld hl, REEL_MANIP_DELAY
add hl, bc add hl, bc
ld [hl], 16 ld [hl], 16
ReelAction_WaitSlowAdvanceReel3: ; 92e64 ReelAction_WaitSlowAdvanceReel3: ; 92e64
ld hl, wReel1ManipDelay - wReel1 ld hl, REEL_MANIP_DELAY
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
and a and a
@ -1437,7 +1450,6 @@ Slots_CheckMatchedFirstTwoReels: ; 92e94
; 92ebd ; 92ebd
.Jumptable: ; 92ebd .Jumptable: ; 92ebd
dw .zero dw .zero
dw .one dw .one
dw .two dw .two
@ -1552,7 +1564,6 @@ Slots_CheckMatchedAllThreeReels: ; 92f1d
; 92f48 ; 92f48
.Jumptable: ; 92f48 .Jumptable: ; 92f48
dw .zero dw .zero
dw .one dw .one
dw .two dw .two
@ -1656,7 +1667,7 @@ Slots_CopyReelState: ; 92fb4
; 92fc0 ; 92fc0
Slots_GetNumberOfGolems: ; 92fc0 Slots_GetNumberOfGolems: ; 92fc0
ld hl, wReel1Position - wReel1 ld hl, REEL_POSITION
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
push af push af
@ -1676,7 +1687,7 @@ Slots_GetNumberOfGolems: ; 92fc0
jr nz, .not_biased_to_seven jr nz, .not_biased_to_seven
ld e, $0 ld e, $0
.loop1 .loop1
ld hl, wReel1Position - wReel1 ld hl, REEL_POSITION
add hl, bc add hl, bc
inc [hl] inc [hl]
inc e inc e
@ -1697,7 +1708,7 @@ Slots_GetNumberOfGolems: ; 92fc0
.loop2 .loop2
ld a, e ld a, e
inc e inc e
ld hl, wReel1Position - wReel1 ld hl, REEL_POSITION
add hl, bc add hl, bc
add [hl] add [hl]
ld [hl], a ld [hl], a
@ -2032,7 +2043,7 @@ endr
; or this code was intended to lead to flipped percentages. ; or this code was intended to lead to flipped percentages.
ld a, [wKeepSevenBiasChance] ld a, [wKeepSevenBiasChance]
and a and a
jr nz, .lowerSevenStreakOdds jr nz, .lower_seven_streak_odds
call Random call Random
and %0010100 and %0010100
ret z ; 25% chance to stick with seven symbol bias ret z ; 25% chance to stick with seven symbol bias
@ -2040,7 +2051,7 @@ endr
ld [wSlotBias], a ld [wSlotBias], a
ret ret
.lowerSevenStreakOdds .lower_seven_streak_odds
call Random call Random
and %0011100 and %0011100
ret z ; 12.5% chance to stick with seven symbol bias ret z ; 12.5% chance to stick with seven symbol bias
@ -2080,12 +2091,10 @@ Slots_AnimateGolem: ; 9321d (24:721d)
jp hl jp hl
.Jumptable: ; 9322d (24:722d) .Jumptable: ; 9322d (24:722d)
dw .init dw .init
dw .fall dw .fall
dw .roll dw .roll
.init ; 93233 (24:7233) .init ; 93233 (24:7233)
ld hl, SPRITEANIMSTRUCT_0E ld hl, SPRITEANIMSTRUCT_0E
add hl, bc add hl, bc
@ -2181,12 +2190,10 @@ Slots_AnimateChansey: ; 932ac (24:72ac)
jp hl jp hl
.Jumptable: ; 932bc (24:72bc) .Jumptable: ; 932bc (24:72bc)
dw .walk dw .walk
dw .one dw .one
dw .two dw .two
.walk ; 932c2 (24:72c2) .walk ; 932c2 (24:72c2)
ld hl, SPRITEANIMSTRUCT_XCOORD ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc add hl, bc

View File

@ -50,7 +50,6 @@ DoAnimFrame: ; 8d24b
dw .IntroUnownF dw .IntroUnownF
dw .IntroSuicuneAway dw .IntroSuicuneAway
.Null: ; 8d2a1 (23:52a1) .Null: ; 8d2a1 (23:52a1)
ret ret

View File

@ -534,12 +534,10 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
ret ret
.Jumptable: ; 4e00d (13:600d) .Jumptable: ; 4e00d (13:600d)
dw .PinkPage dw .PinkPage
dw .GreenPage dw .GreenPage
dw .BluePage dw .BluePage
.PinkPage: ; 4e013 (13:6013) .PinkPage: ; 4e013 (13:6013)
hlcoord 0, 9 hlcoord 0, 9
ld b, $0 ld b, $0
@ -888,7 +886,6 @@ StatsScreen_GetAnimationParam: ; 4e2ad (13:62ad)
dw .Tempmon dw .Tempmon
dw .Wildmon dw .Wildmon
.PartyMon: ; 4e2bf (13:62bf) .PartyMon: ; 4e2bf (13:62bf)
ld a, [CurPartyMon] ld a, [CurPartyMon]
ld hl, PartyMon1 ld hl, PartyMon1

View File

@ -201,7 +201,7 @@ _TitleScreen: ; 10ed67
; Set sprite size to 8x16 ; Set sprite size to 8x16
ld a, [rLCDC] ld a, [rLCDC]
set 2, a set rLCDC_SPRITE_SIZE, a
ld [rLCDC], a ld [rLCDC], a
ld a, +112 ld a, +112

View File

@ -80,7 +80,6 @@ TrainerCard: ; 25105
dw TrainerCard_Page3_Joypad dw TrainerCard_Page3_Joypad
dw TrainerCard_Quit dw TrainerCard_Quit
TrainerCard_IncrementJumptable: ; 251ab (9:51ab) TrainerCard_IncrementJumptable: ; 251ab (9:51ab)
ld hl, wJumptableIndex ld hl, wJumptableIndex
inc [hl] inc [hl]

View File

@ -45,7 +45,7 @@ UnownPuzzle: ; e1190
ld [wHoldingUnownPuzzlePiece], a ld [wHoldingUnownPuzzlePiece], a
ld [wUnownPuzzleCursorPosition], a ld [wUnownPuzzleCursorPosition], a
ld [wUnownPuzzleHeldPiece], a ld [wUnownPuzzleHeldPiece], a
ld a, $93 ld a, %10010011
ld [rLCDC], a ld [rLCDC], a
call WaitBGMap call WaitBGMap
ld b, SCGB_UNOWN_PUZZLE ld b, SCGB_UNOWN_PUZZLE
@ -85,7 +85,7 @@ UnownPuzzle: ; e1190
call ClearBGPalettes call ClearBGPalettes
call ClearTileMap call ClearTileMap
call ClearSprites call ClearSprites
ld a, $e3 ld a, LCDC_DEFAULT
ld [rLCDC], a ld [rLCDC], a
ret ret
; e124e ; e124e
@ -188,7 +188,6 @@ UnownPuzzleJumptable: ; e12ca
; e12d9 ; e12d9
.Jumptable: ; e12d9 .Jumptable: ; e12d9
dw .Function dw .Function
; e12db ; e12db

View File

@ -55,8 +55,8 @@ UnusedTitleScreen: ; 10c000
call EnableLCD call EnableLCD
ld a, [rLCDC] ld a, [rLCDC]
set 1, a set rLCDC_SPRITES_ENABLE, a
set 2, a set rLCDC_SPRITE_SIZE, a
ld [rLCDC], a ld [rLCDC], a
call DelayFrame call DelayFrame

View File

@ -107,7 +107,7 @@ _LoadStandardFont:: ; fb449
ld hl, vTiles1 ld hl, vTiles1
lb bc, BANK(Font), $80 lb bc, BANK(Font), $80
ld a, [rLCDC] ld a, [rLCDC]
bit 7, a bit rLCDC_ENABLE, a
jp z, Copy1bpp jp z, Copy1bpp
ld de, Font ld de, Font

View File

@ -3,7 +3,7 @@
Get2bpp_2:: ; dc9 Get2bpp_2:: ; dc9
ld a, [rLCDC] ld a, [rLCDC]
bit 7, a bit rLCDC_ENABLE, a
jp z, Copy2bpp jp z, Copy2bpp
homecall _Get2bpp homecall _Get2bpp
@ -13,7 +13,7 @@ Get2bpp_2:: ; dc9
Get1bpp_2:: ; ddc Get1bpp_2:: ; ddc
ld a, [rLCDC] ld a, [rLCDC]
bit 7, a bit rLCDC_ENABLE, a
jp z, Copy1bpp jp z, Copy1bpp
homecall _Get1bpp homecall _Get1bpp
@ -361,7 +361,7 @@ Request1bpp:: ; f1e
Get2bpp:: ; f82 Get2bpp:: ; f82
ld a, [rLCDC] ld a, [rLCDC]
bit 7, a bit rLCDC_ENABLE, a
jp nz, Request2bpp jp nz, Request2bpp
Copy2bpp:: ; f89 Copy2bpp:: ; f89
@ -392,7 +392,7 @@ Copy2bpp:: ; f89
Get1bpp:: ; f9d Get1bpp:: ; f9d
ld a, [rLCDC] ld a, [rLCDC]
bit 7, a bit rLCDC_ENABLE, a
jp nz, Request1bpp jp nz, Request1bpp
Copy1bpp:: ; fa4 Copy1bpp:: ; fa4

View File

@ -62,7 +62,7 @@ Init:: ; 17d
.wait .wait
ld a, [rLY] ld a, [rLY]
cp 145 cp LY_VBLANK + 1
jr nz, .wait jr nz, .wait
xor a xor a
@ -125,7 +125,7 @@ Init:: ; 17d
ld [hWX], a ld [hWX], a
ld [rWX], a ld [rWX], a
ld a, %11100011 ld a, LCDC_DEFAULT ; %11100011
; LCD on ; LCD on
; Win tilemap 1 ; Win tilemap 1
; Win on ; Win on

View File

@ -43,7 +43,7 @@ DisableLCD:: ; 568
; Don't need to do anything if the LCD is already off ; Don't need to do anything if the LCD is already off
ld a, [rLCDC] ld a, [rLCDC]
bit 7, a ; lcd enable bit rLCDC_ENABLE, a
ret z ret z
xor a xor a
@ -58,11 +58,11 @@ DisableLCD:: ; 568
.wait .wait
; Wait until VBlank would normally happen ; Wait until VBlank would normally happen
ld a, [rLY] ld a, [rLY]
cp 145 cp LY_VBLANK + 1
jr nz, .wait jr nz, .wait
ld a, [rLCDC] ld a, [rLCDC]
and %01111111 ; lcd enable off and $ff ^ (1 << rLCDC_ENABLE)
ld [rLCDC], a ld [rLCDC], a
xor a xor a
@ -75,7 +75,7 @@ DisableLCD:: ; 568
EnableLCD:: ; 58a EnableLCD:: ; 58a
ld a, [rLCDC] ld a, [rLCDC]
set 7, a ; lcd enable set rLCDC_ENABLE, a
ld [rLCDC], a ld [rLCDC], a
ret ret
; 591 ; 591

View File

@ -31,7 +31,7 @@ ClearTileMap:: ; fc8
; Update the BG Map. ; Update the BG Map.
ld a, [rLCDC] ld a, [rLCDC]
bit 7, a bit rLCDC_ENABLE, a
ret z ret z
jp WaitBGMap jp WaitBGMap
; fdb ; fdb

View File

@ -291,9 +291,9 @@ Serve1bppRequest:: ; 170a
; Back out if we're too far into VBlank ; Back out if we're too far into VBlank
ld a, [rLY] ld a, [rLY]
cp 144 cp LY_VBLANK
ret c ret c
cp 146 cp LY_VBLANK + 2
ret nc ret nc
; Copy [Requested1bpp] 1bpp tiles from [Requested1bppSource] to [Requested1bppDest] ; Copy [Requested1bpp] 1bpp tiles from [Requested1bppSource] to [Requested1bppDest]
@ -372,9 +372,9 @@ Serve2bppRequest:: ; 1769
; Back out if we're too far into VBlank ; Back out if we're too far into VBlank
ld a, [rLY] ld a, [rLY]
cp 144 cp LY_VBLANK
ret c ret c
cp 146 cp LY_VBLANK + 2
ret nc ret nc
jr _Serve2bppRequest jr _Serve2bppRequest
@ -454,9 +454,9 @@ AnimateTileset:: ; 17d3
; Back out if we're too far into VBlank ; Back out if we're too far into VBlank
ld a, [rLY] ld a, [rLY]
cp 144 cp LY_VBLANK
ret c ret c
cp 151 cp LY_VBLANK + 7
ret nc ret nc
ld a, [hROMBank] ld a, [hROMBank]

View File

@ -149,7 +149,7 @@ channel_struct: MACRO
\1Octave:: db ; 7-0 (0 is highest) \1Octave:: db ; 7-0 (0 is highest)
\1PitchOffset:: db ; raises existing octaves (to repeat phrases) \1PitchOffset:: db ; raises existing octaves (to repeat phrases)
\1NoteDuration:: db ; frames remaining for the current note \1NoteDuration:: db ; frames remaining for the current note
\1Field0x16:: ds 1 ; c117 \1Field16:: ds 1 ; c117
ds 1 ; c118 ds 1 ; c118
\1LoopCount:: db \1LoopCount:: db
\1Tempo:: dw \1Tempo:: dw
@ -162,16 +162,16 @@ channel_struct: MACRO
\1PitchWheelTarget:: dw ; frequency endpoint for pitch wheel \1PitchWheelTarget:: dw ; frequency endpoint for pitch wheel
\1PitchWheelAmount:: db ; c124 \1PitchWheelAmount:: db ; c124
\1PitchWheelAmountFraction:: db ; c125 \1PitchWheelAmountFraction:: db ; c125
\1Field0x25:: db ; c126 \1Field25:: db ; c126
ds 1 ; c127 ds 1 ; c127
\1CryPitch:: dw \1CryPitch:: dw
\1Field0x29:: ds 1 \1Field29:: ds 1
\1Field0x2a:: ds 2 \1Field2a:: ds 2
\1Field0x2c:: ds 1 \1Field2c:: ds 1
\1NoteLength:: db ; frames per 16th note \1NoteLength:: db ; frames per 16th note
\1Field0x2e:: ds 1 ; c12f \1Field2e:: ds 1 ; c12f
\1Field0x2f:: ds 1 ; c130 \1Field2f:: ds 1 ; c130
\1Field0x30:: ds 1 ; c131 \1Field30:: ds 1 ; c131
ds 1 ; c132 ds 1 ; c132
ENDM ENDM
@ -277,10 +277,10 @@ slot_reel: MACRO
\1XCoord:: db \1XCoord:: db
\1ManipCounter:: db \1ManipCounter:: db
\1ManipDelay:: db \1ManipDelay:: db
\1Slot0b:: ds 1 \1Field0b:: ds 1
\1Slot0c:: ds 1 \1Field0c:: ds 1
\1Slot0d:: ds 1 \1Field0d:: ds 1
\1Slot0e:: ds 1 \1Field0e:: ds 1
\1StopDelay:: db \1StopDelay:: db
ENDM ENDM
@ -313,10 +313,10 @@ object_struct: MACRO
\1SpriteXOffset:: db \1SpriteXOffset:: db
\1SpriteYOffset:: db \1SpriteYOffset:: db
\1MovementByteIndex:: db \1MovementByteIndex:: db
\1Object28:: ds 1 \1Field1c:: ds 1
\1Object29:: ds 1 \1Field1d:: ds 1
\1Object30:: ds 1 \1Field1e:: ds 1
\1Object31:: ds 1 \1Field1f:: ds 1
\1Range:: db \1Range:: db
ds 7 ds 7
\1StructEnd:: \1StructEnd::
@ -351,44 +351,44 @@ sprite_anim_struct: MACRO
\1Duration:: db \1Duration:: db
\1DurationOffset:: db \1DurationOffset:: db
\1FrameIndex:: db \1FrameIndex:: db
\1Sprite0b:: ds 1 \1JumptableIndex:: db
\1Sprite0c:: ds 1 \1Field0c:: ds 1
\1Sprite0d:: ds 1 \1Field0d:: ds 1
\1Sprite0e:: ds 1 \1Field0e:: ds 1
\1Sprite0f:: ds 1 \1Field0f:: ds 1
ENDM ENDM
battle_anim_struct: MACRO battle_anim_struct: MACRO
; Placeholder until we can figure out what it all means ; Placeholder until we can figure out what it all means
\1_Index:: db \1Index:: db
\1_Anim01:: ds 1 \1Field01:: ds 1
\1_Anim02:: ds 1 \1Field02:: ds 1
\1_FramesetIndex:: db \1FramesetID:: db
\1_FunctionIndex:: db \1Function:: db
\1_Anim05:: ds 1 \1Palette:: db
\1_TileID:: db \1TileID:: db
\1_XCoord:: db \1XCoord:: db
\1_YCoord:: db \1YCoord:: db
\1_XOffset:: db \1XOffset:: db
\1_YOffset:: db \1YOffset:: db
\1_Anim0b:: ds 1 \1Field0b:: ds 1
\1_Anim0c:: ds 1 \1Duration:: db
\1_Anim0d:: ds 1 \1Frame:: db
\1_AnonJumptableIndex:: db \1AnonJumptableIndex:: db
\1_Anim0f:: ds 1 \1Field0f:: ds 1
\1_Anim10:: ds 1 \1Field10:: ds 1
\1_Anim11:: ds 1 \1Field11:: ds 1
\1_Anim12:: ds 1 \1Field12:: ds 1
\1_Anim13:: ds 1 \1Field13:: ds 1
\1_Anim14:: ds 1 \1Field14:: ds 1
\1_Anim15:: ds 1 \1Field15:: ds 1
\1_Anim16:: ds 1 \1Field16:: ds 1
\1_Anim17:: ds 1 \1Field17:: ds 1
ENDM ENDM
battle_bg_effect: MACRO battle_bg_effect: MACRO
\1_Function:: db \1Function:: db
\1_01:: ds 1 \1Field01:: ds 1
\1_02:: ds 1 \1Field02:: ds 1
\1_03:: ds 1 \1Field03:: ds 1
ENDM ENDM

View File

@ -381,7 +381,6 @@ MobileTradeAnim_JumptableLoop: ; 10824b
; 10828a ; 10828a
.Jumptable: ; 10828a .Jumptable: ; 10828a
dw GetMobileTradeAnimByte ; 00 dw GetMobileTradeAnimByte ; 00
dw MobileTradeAnim_ShowPlayerMonToBeSent ; 01 dw MobileTradeAnim_ShowPlayerMonToBeSent ; 01
dw MobileTradeAnim_02 ; 02 dw MobileTradeAnim_02 ; 02

View File

@ -411,7 +411,7 @@ Function1161d5: ; 1161d5
.wait_for_vblank .wait_for_vblank
; Wait until a vblank would occur had interrupts not just been disabled. ; Wait until a vblank would occur had interrupts not just been disabled.
ld a, [rLY] ld a, [rLY]
cp $91 cp LY_VBLANK + 1
jr nz, .wait_for_vblank jr nz, .wait_for_vblank
ld a, $d0 ld a, $d0

View File

@ -7398,6 +7398,7 @@ Function11b5e8: ; 11b5e8
.RunJumptable: .RunJumptable:
jumptable .Jumptable, wJumptableIndex jumptable .Jumptable, wJumptableIndex
.Jumptable: .Jumptable:
dw Function11b66d dw Function11b66d
dw Function11b6b3 dw Function11b6b3