mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
More work on slots; WRAM cleanup, Move Deleter
This commit is contained in:
parent
3d36f1a837
commit
987ed1fafb
@ -5308,7 +5308,7 @@ BattleMenu_Pack: ; 3e1c7
|
|||||||
call UpdateBattleHUDs
|
call UpdateBattleHUDs
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
call LoadTileMapToTempTileMap
|
call LoadTileMapToTempTileMap
|
||||||
call ResetTextRelatedRAM
|
call ClearWindowData
|
||||||
call FinishBattleAnim
|
call FinishBattleAnim
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
@ -5319,7 +5319,7 @@ BattleMenu_Pack: ; 3e1c7
|
|||||||
ld a, [wBattleResult]
|
ld a, [wBattleResult]
|
||||||
and $c0
|
and $c0
|
||||||
ld [wBattleResult], a
|
ld [wBattleResult], a
|
||||||
call ResetTextRelatedRAM
|
call ClearWindowData
|
||||||
call SetPalettes
|
call SetPalettes
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
@ -5661,9 +5661,9 @@ MoveSelectionScreen: ; 3e4bc
|
|||||||
ld a, 17 - NUM_MOVES - 4
|
ld a, 17 - NUM_MOVES - 4
|
||||||
|
|
||||||
.got_default_coord
|
.got_default_coord
|
||||||
ld [wcfa1], a
|
ld [w2DMenuCursorInitY], a
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [wcfa2], a
|
ld [w2DMenuCursorInitX], a
|
||||||
ld a, [wMoveSelectionMenuType]
|
ld a, [wMoveSelectionMenuType]
|
||||||
cp $1
|
cp $1
|
||||||
jr z, .skip_inc
|
jr z, .skip_inc
|
||||||
@ -5676,9 +5676,9 @@ MoveSelectionScreen: ; 3e4bc
|
|||||||
ld [wMenuCursorX], a
|
ld [wMenuCursorX], a
|
||||||
ld a, [wNumMoves]
|
ld a, [wNumMoves]
|
||||||
inc a
|
inc a
|
||||||
ld [wcfa3], a
|
ld [w2DMenuNumRows], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wcfa4], a
|
ld [w2DMenuNumCols], a
|
||||||
ld c, $2c
|
ld c, $2c
|
||||||
ld a, [wMoveSelectionMenuType]
|
ld a, [wMoveSelectionMenuType]
|
||||||
dec a
|
dec a
|
||||||
@ -5694,13 +5694,13 @@ MoveSelectionScreen: ; 3e4bc
|
|||||||
|
|
||||||
.okay
|
.okay
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [wcfa8], a
|
ld [w2DMenuFlags4], a
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wcfa5], a
|
ld [w2DMenuFlags1], a
|
||||||
xor a
|
xor a
|
||||||
ld [wcfa6], a
|
ld [w2DMenuFlags2], a
|
||||||
ld a, $10
|
ld a, $10
|
||||||
ld [wcfa7], a
|
ld [w2DMenuFlags3], a
|
||||||
.menu_loop
|
.menu_loop
|
||||||
ld a, [wMoveSelectionMenuType]
|
ld a, [wMoveSelectionMenuType]
|
||||||
and a
|
and a
|
||||||
@ -8557,9 +8557,9 @@ InitEnemy: ; 3f55e
|
|||||||
BackUpVBGMap2: ; 3f568
|
BackUpVBGMap2: ; 3f568
|
||||||
ld a, [rSVBK]
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $6 ; BANK(wBackupTilemap)
|
ld a, $6 ; BANK(wDecompressScratch)
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
ld bc, $40 tiles ; VBGMap3 - VBGMap2
|
ld bc, $40 tiles ; VBGMap3 - VBGMap2
|
||||||
ld a, $2
|
ld a, $2
|
||||||
call ByteFill
|
call ByteFill
|
||||||
@ -8567,7 +8567,7 @@ BackUpVBGMap2: ; 3f568
|
|||||||
push af
|
push af
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
hlbgcoord 0, 0 ; VBGMap2
|
hlbgcoord 0, 0 ; VBGMap2
|
||||||
lb bc, BANK(BackUpVBGMap2), $40
|
lb bc, BANK(BackUpVBGMap2), $40
|
||||||
call Request2bpp
|
call Request2bpp
|
||||||
@ -9453,12 +9453,12 @@ InitBattleDisplay: ; 3fb6c
|
|||||||
ld a, $6
|
ld a, $6
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
|
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
ld bc, wBackupAttrMap - wBackupTilemap
|
ld bc, wBackupAttrMap - wDecompressScratch
|
||||||
ld a, " "
|
ld a, " "
|
||||||
call ByteFill
|
call ByteFill
|
||||||
|
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
hlbgcoord 0, 0
|
hlbgcoord 0, 0
|
||||||
lb bc, BANK(.BlankBGMap), $40
|
lb bc, BANK(.BlankBGMap), $40
|
||||||
call Request2bpp
|
call Request2bpp
|
||||||
|
@ -912,7 +912,7 @@ BattleCommand_CheckObedience: ; 343db
|
|||||||
ld a, 1
|
ld a, 1
|
||||||
ld [AlreadyDisobeyed], a
|
ld [AlreadyDisobeyed], a
|
||||||
|
|
||||||
ld a, [wcfa3]
|
ld a, [w2DMenuNumRows]
|
||||||
ld b, a
|
ld b, a
|
||||||
|
|
||||||
; Save the move we originally picked for afterward.
|
; Save the move we originally picked for afterward.
|
||||||
|
@ -120,7 +120,7 @@ Function8c2cf: ; 8c2cf
|
|||||||
ld a, $6
|
ld a, $6
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
push hl
|
push hl
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
ld bc, $28 * $10
|
ld bc, $28 * $10
|
||||||
|
|
||||||
.loop
|
.loop
|
||||||
@ -132,7 +132,7 @@ Function8c2cf: ; 8c2cf
|
|||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
|
|
||||||
pop hl
|
pop hl
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
ld b, BANK(Function8c2cf) ; BANK(@)
|
ld b, BANK(Function8c2cf) ; BANK(@)
|
||||||
ld c, $28
|
ld c, $28
|
||||||
call Request2bpp
|
call Request2bpp
|
||||||
|
@ -61,17 +61,17 @@ Copyright_GFPresents: ; e4579
|
|||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
|
|
||||||
ld hl, IntroLogoGFX
|
ld hl, IntroLogoGFX
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
ld a, BANK(IntroLogoGFX)
|
ld a, BANK(IntroLogoGFX)
|
||||||
call FarDecompress
|
call FarDecompress
|
||||||
|
|
||||||
ld hl, VTiles0
|
ld hl, VTiles0
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
lb bc, 1, 8 tiles
|
lb bc, 1, 8 tiles
|
||||||
call Request2bpp
|
call Request2bpp
|
||||||
|
|
||||||
ld hl, VTiles1
|
ld hl, VTiles1
|
||||||
ld de, wBackupTilemap + $80 tiles
|
ld de, wDecompressScratch + $80 tiles
|
||||||
lb bc, 1, 8 tiles
|
lb bc, 1, 8 tiles
|
||||||
call Request2bpp
|
call Request2bpp
|
||||||
|
|
||||||
@ -1919,7 +1919,7 @@ Intro_LoadTilemap: ; e541b (39:541b)
|
|||||||
ld a, $6
|
ld a, $6
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
|
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
decoord 0, 0
|
decoord 0, 0
|
||||||
ld b, SCREEN_HEIGHT
|
ld b, SCREEN_HEIGHT
|
||||||
.row
|
.row
|
||||||
@ -2039,11 +2039,11 @@ Intro_DecompressRequest2bpp_128Tiles: ; e54c2 (39:54c2)
|
|||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
|
|
||||||
push de
|
push de
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
call Decompress
|
call Decompress
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
lb bc, $01, $80
|
lb bc, $01, $80
|
||||||
call Request2bpp
|
call Request2bpp
|
||||||
|
|
||||||
@ -2058,11 +2058,11 @@ Intro_DecompressRequest2bpp_255Tiles: ; e54de (39:54de)
|
|||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
|
|
||||||
push de
|
push de
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
call Decompress
|
call Decompress
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
lb bc, $01, $ff
|
lb bc, $01, $ff
|
||||||
call Request2bpp
|
call Request2bpp
|
||||||
|
|
||||||
@ -2077,11 +2077,11 @@ Intro_DecompressRequest2bpp_64Tiles: ; e54fa (39:54fa)
|
|||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
|
|
||||||
push de
|
push de
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
call Decompress
|
call Decompress
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
lb bc, $01, $40
|
lb bc, $01, $40
|
||||||
call Request2bpp
|
call Request2bpp
|
||||||
|
|
||||||
|
@ -395,7 +395,7 @@ Function81adb: ; 81adb
|
|||||||
hlcoord 4, 1
|
hlcoord 4, 1
|
||||||
call PlaceString
|
call PlaceString
|
||||||
xor a
|
xor a
|
||||||
ld [wc2c6], a
|
ld [wBoxAlignment], a
|
||||||
hlcoord 12, 3
|
hlcoord 12, 3
|
||||||
call _PrepMonFrontpic
|
call _PrepMonFrontpic
|
||||||
ld de, VTiles2 tile $31
|
ld de, VTiles2 tile $31
|
||||||
|
@ -111,10 +111,10 @@ EvolutionAnimation: ; 4e5e1
|
|||||||
call .check_statused
|
call .check_statused
|
||||||
jr c, .no_anim
|
jr c, .no_anim
|
||||||
|
|
||||||
ld a, [wc2c6]
|
ld a, [wBoxAlignment]
|
||||||
push af
|
push af
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wc2c6], a
|
ld [wBoxAlignment], a
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
push af
|
push af
|
||||||
|
|
||||||
@ -128,7 +128,7 @@ EvolutionAnimation: ; 4e5e1
|
|||||||
pop af
|
pop af
|
||||||
ld [CurPartySpecies], a
|
ld [CurPartySpecies], a
|
||||||
pop af
|
pop af
|
||||||
ld [wc2c6], a
|
ld [wBoxAlignment], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.no_anim
|
.no_anim
|
||||||
@ -167,11 +167,11 @@ EvolutionAnimation: ; 4e5e1
|
|||||||
.LoadFrontpic: ; 4e711
|
.LoadFrontpic: ; 4e711
|
||||||
call GetBaseData
|
call GetBaseData
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wc2c6], a
|
ld [wBoxAlignment], a
|
||||||
ld de, VTiles2
|
ld de, VTiles2
|
||||||
predef FrontpicPredef
|
predef FrontpicPredef
|
||||||
xor a
|
xor a
|
||||||
ld [wc2c6], a
|
ld [wBoxAlignment], a
|
||||||
ret
|
ret
|
||||||
; 4e726
|
; 4e726
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ NewGame_ClearTileMapEtc: ; 5b44
|
|||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
call LoadFontsExtra
|
call LoadFontsExtra
|
||||||
call LoadStandardFont
|
call LoadStandardFont
|
||||||
call ResetTextRelatedRAM
|
call ClearWindowData
|
||||||
ret
|
ret
|
||||||
; 5b54
|
; 5b54
|
||||||
|
|
||||||
@ -1410,7 +1410,7 @@ CopyrightString: ; 63fd
|
|||||||
|
|
||||||
GameInit:: ; 642e
|
GameInit:: ; 642e
|
||||||
callba TryLoadSaveData
|
callba TryLoadSaveData
|
||||||
call ResetTextRelatedRAM
|
call ClearWindowData
|
||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
ld a, VBGMap0 / $100
|
ld a, VBGMap0 / $100
|
||||||
|
@ -147,24 +147,24 @@ ForgetMove: ; 65d3
|
|||||||
predef ListMoves
|
predef ListMoves
|
||||||
; wMenuData3
|
; wMenuData3
|
||||||
ld a, $4
|
ld a, $4
|
||||||
ld [wcfa1], a
|
ld [w2DMenuCursorInitY], a
|
||||||
ld a, $6
|
ld a, $6
|
||||||
ld [wcfa2], a
|
ld [w2DMenuCursorInitX], a
|
||||||
ld a, [wNumMoves]
|
ld a, [wNumMoves]
|
||||||
inc a
|
inc a
|
||||||
ld [wcfa3], a
|
ld [w2DMenuNumRows], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wcfa4], a
|
ld [w2DMenuNumCols], a
|
||||||
ld [wMenuCursorY], a
|
ld [wMenuCursorY], a
|
||||||
ld [wMenuCursorX], a
|
ld [wMenuCursorX], a
|
||||||
ld a, $3
|
ld a, $3
|
||||||
ld [wcfa8], a
|
ld [w2DMenuFlags4], a
|
||||||
ld a, $20
|
ld a, $20
|
||||||
ld [wcfa5], a
|
ld [w2DMenuFlags1], a
|
||||||
xor a
|
xor a
|
||||||
ld [wcfa6], a
|
ld [w2DMenuFlags2], a
|
||||||
ld a, $20
|
ld a, $20
|
||||||
ld [wcfa7], a
|
ld [w2DMenuFlags3], a
|
||||||
call StaticMenuJoypad
|
call StaticMenuJoypad
|
||||||
push af
|
push af
|
||||||
call Call_LoadTempTileMapToTileMap
|
call Call_LoadTempTileMapToTileMap
|
||||||
|
@ -1229,23 +1229,23 @@ Function28803: ; 28803
|
|||||||
ld a, $1
|
ld a, $1
|
||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
ld a, $c1
|
ld a, $c1
|
||||||
ld [wcfa8], a
|
ld [w2DMenuFlags4], a
|
||||||
ld a, [OTPartyCount]
|
ld a, [OTPartyCount]
|
||||||
ld [wcfa3], a
|
ld [w2DMenuNumRows], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wcfa4], a
|
ld [w2DMenuNumCols], a
|
||||||
ld a, $9
|
ld a, $9
|
||||||
ld [wcfa1], a
|
ld [w2DMenuCursorInitY], a
|
||||||
ld a, $6
|
ld a, $6
|
||||||
ld [wcfa2], a
|
ld [w2DMenuCursorInitX], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wMenuCursorX], a
|
ld [wMenuCursorX], a
|
||||||
ld a, $10
|
ld a, $10
|
||||||
ld [wcfa7], a
|
ld [w2DMenuFlags3], a
|
||||||
ld a, $20
|
ld a, $20
|
||||||
ld [wcfa5], a
|
ld [w2DMenuFlags1], a
|
||||||
xor a
|
xor a
|
||||||
ld [wcfa6], a
|
ld [w2DMenuFlags2], a
|
||||||
|
|
||||||
Function28835: ; 28835
|
Function28835: ; 28835
|
||||||
callba Function16d70c
|
callba Function16d70c
|
||||||
@ -1294,23 +1294,23 @@ Function2888b: ; 2888b
|
|||||||
xor a
|
xor a
|
||||||
ld [MonType], a
|
ld [MonType], a
|
||||||
ld a, $c1
|
ld a, $c1
|
||||||
ld [wcfa8], a
|
ld [w2DMenuFlags4], a
|
||||||
ld a, [PartyCount]
|
ld a, [PartyCount]
|
||||||
ld [wcfa3], a
|
ld [w2DMenuNumRows], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wcfa4], a
|
ld [w2DMenuNumCols], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wcfa1], a
|
ld [w2DMenuCursorInitY], a
|
||||||
ld a, $6
|
ld a, $6
|
||||||
ld [wcfa2], a
|
ld [w2DMenuCursorInitX], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wMenuCursorX], a
|
ld [wMenuCursorX], a
|
||||||
ld a, $10
|
ld a, $10
|
||||||
ld [wcfa7], a
|
ld [w2DMenuFlags3], a
|
||||||
ld a, $20
|
ld a, $20
|
||||||
ld [wcfa5], a
|
ld [w2DMenuFlags1], a
|
||||||
xor a
|
xor a
|
||||||
ld [wcfa6], a
|
ld [w2DMenuFlags2], a
|
||||||
call WaitBGMap2
|
call WaitBGMap2
|
||||||
|
|
||||||
Function288c5: ; 288c5
|
Function288c5: ; 288c5
|
||||||
@ -1388,23 +1388,23 @@ Function28926: ; 28926
|
|||||||
ld a, $7f
|
ld a, $7f
|
||||||
ldcoord_a 11, 16
|
ldcoord_a 11, 16
|
||||||
ld a, $13
|
ld a, $13
|
||||||
ld [wcfa8], a
|
ld [w2DMenuFlags4], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wcfa3], a
|
ld [w2DMenuNumRows], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wcfa4], a
|
ld [w2DMenuNumCols], a
|
||||||
ld a, $10
|
ld a, $10
|
||||||
ld [wcfa1], a
|
ld [w2DMenuCursorInitY], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wcfa2], a
|
ld [w2DMenuCursorInitX], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wMenuCursorY], a
|
ld [wMenuCursorY], a
|
||||||
ld [wMenuCursorX], a
|
ld [wMenuCursorX], a
|
||||||
ld a, $20
|
ld a, $20
|
||||||
ld [wcfa7], a
|
ld [w2DMenuFlags3], a
|
||||||
xor a
|
xor a
|
||||||
ld [wcfa5], a
|
ld [w2DMenuFlags1], a
|
||||||
ld [wcfa6], a
|
ld [w2DMenuFlags2], a
|
||||||
call ScrollingMenuJoypad
|
call ScrollingMenuJoypad
|
||||||
bit 4, a
|
bit 4, a
|
||||||
jr nz, .asm_2898d
|
jr nz, .asm_2898d
|
||||||
@ -1420,23 +1420,23 @@ Function28926: ; 28926
|
|||||||
ld a, $7f
|
ld a, $7f
|
||||||
ldcoord_a 1, 16
|
ldcoord_a 1, 16
|
||||||
ld a, $23
|
ld a, $23
|
||||||
ld [wcfa8], a
|
ld [w2DMenuFlags4], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wcfa3], a
|
ld [w2DMenuNumRows], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wcfa4], a
|
ld [w2DMenuNumCols], a
|
||||||
ld a, $10
|
ld a, $10
|
||||||
ld [wcfa1], a
|
ld [w2DMenuCursorInitY], a
|
||||||
ld a, $b
|
ld a, $b
|
||||||
ld [wcfa2], a
|
ld [w2DMenuCursorInitX], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wMenuCursorY], a
|
ld [wMenuCursorY], a
|
||||||
ld [wMenuCursorX], a
|
ld [wMenuCursorX], a
|
||||||
ld a, $20
|
ld a, $20
|
||||||
ld [wcfa7], a
|
ld [w2DMenuFlags3], a
|
||||||
xor a
|
xor a
|
||||||
ld [wcfa5], a
|
ld [w2DMenuFlags1], a
|
||||||
ld [wcfa6], a
|
ld [w2DMenuFlags2], a
|
||||||
call ScrollingMenuJoypad
|
call ScrollingMenuJoypad
|
||||||
bit 5, a
|
bit 5, a
|
||||||
jp nz, .asm_28946
|
jp nz, .asm_28946
|
||||||
@ -1700,20 +1700,20 @@ Function28b87: ; 28b87
|
|||||||
hlcoord 12, 8
|
hlcoord 12, 8
|
||||||
call PlaceString
|
call PlaceString
|
||||||
ld a, $8
|
ld a, $8
|
||||||
ld [wcfa1], a
|
ld [w2DMenuCursorInitY], a
|
||||||
ld a, $b
|
ld a, $b
|
||||||
ld [wcfa2], a
|
ld [w2DMenuCursorInitX], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wcfa4], a
|
ld [w2DMenuNumCols], a
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ld [wcfa3], a
|
ld [w2DMenuNumRows], a
|
||||||
xor a
|
xor a
|
||||||
ld [wcfa5], a
|
ld [w2DMenuFlags1], a
|
||||||
ld [wcfa6], a
|
ld [w2DMenuFlags2], a
|
||||||
ld a, $20
|
ld a, $20
|
||||||
ld [wcfa7], a
|
ld [w2DMenuFlags3], a
|
||||||
ld a, $3
|
ld a, $3
|
||||||
ld [wcfa8], a
|
ld [w2DMenuFlags4], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wMenuCursorY], a
|
ld [wMenuCursorY], a
|
||||||
ld [wMenuCursorX], a
|
ld [wMenuCursorX], a
|
||||||
|
@ -75,14 +75,14 @@ NewGameMenu: ; 0x49d6c
|
|||||||
db 2
|
db 2
|
||||||
db NEW_GAME
|
db NEW_GAME
|
||||||
db OPTION
|
db OPTION
|
||||||
db $ff
|
db -1
|
||||||
|
|
||||||
ContinueMenu: ; 0x49d70
|
ContinueMenu: ; 0x49d70
|
||||||
db 3
|
db 3
|
||||||
db CONTINUE
|
db CONTINUE
|
||||||
db NEW_GAME
|
db NEW_GAME
|
||||||
db OPTION
|
db OPTION
|
||||||
db $ff
|
db -1
|
||||||
|
|
||||||
MobileMysteryMenu: ; 0x49d75
|
MobileMysteryMenu: ; 0x49d75
|
||||||
db 5
|
db 5
|
||||||
@ -91,7 +91,7 @@ MobileMysteryMenu: ; 0x49d75
|
|||||||
db OPTION
|
db OPTION
|
||||||
db MYSTERY_GIFT
|
db MYSTERY_GIFT
|
||||||
db MOBILE
|
db MOBILE
|
||||||
db $ff
|
db -1
|
||||||
|
|
||||||
MobileMenu: ; 0x49d7c
|
MobileMenu: ; 0x49d7c
|
||||||
db 4
|
db 4
|
||||||
@ -99,7 +99,7 @@ MobileMenu: ; 0x49d7c
|
|||||||
db NEW_GAME
|
db NEW_GAME
|
||||||
db OPTION
|
db OPTION
|
||||||
db MOBILE
|
db MOBILE
|
||||||
db $ff
|
db -1
|
||||||
|
|
||||||
MobileStudiumMenu: ; 0x49d82
|
MobileStudiumMenu: ; 0x49d82
|
||||||
db 5
|
db 5
|
||||||
@ -108,7 +108,7 @@ MobileStudiumMenu: ; 0x49d82
|
|||||||
db OPTION
|
db OPTION
|
||||||
db MOBILE
|
db MOBILE
|
||||||
db MOBILE_STUDIUM
|
db MOBILE_STUDIUM
|
||||||
db $ff
|
db -1
|
||||||
|
|
||||||
MysteryMobileStudiumMenu: ; 0x49d89
|
MysteryMobileStudiumMenu: ; 0x49d89
|
||||||
db 6
|
db 6
|
||||||
@ -118,7 +118,7 @@ MysteryMobileStudiumMenu: ; 0x49d89
|
|||||||
db MYSTERY_GIFT
|
db MYSTERY_GIFT
|
||||||
db MOBILE
|
db MOBILE
|
||||||
db MOBILE_STUDIUM
|
db MOBILE_STUDIUM
|
||||||
db $ff
|
db -1
|
||||||
|
|
||||||
MysteryMenu: ; 0x49d91
|
MysteryMenu: ; 0x49d91
|
||||||
db 4
|
db 4
|
||||||
@ -126,7 +126,7 @@ MysteryMenu: ; 0x49d91
|
|||||||
db NEW_GAME
|
db NEW_GAME
|
||||||
db OPTION
|
db OPTION
|
||||||
db MYSTERY_GIFT
|
db MYSTERY_GIFT
|
||||||
db $ff
|
db -1
|
||||||
|
|
||||||
MysteryStudiumMenu: ; 0x49d97
|
MysteryStudiumMenu: ; 0x49d97
|
||||||
db 5
|
db 5
|
||||||
@ -135,7 +135,7 @@ MysteryStudiumMenu: ; 0x49d97
|
|||||||
db OPTION
|
db OPTION
|
||||||
db MYSTERY_GIFT
|
db MYSTERY_GIFT
|
||||||
db MOBILE_STUDIUM
|
db MOBILE_STUDIUM
|
||||||
db $ff
|
db -1
|
||||||
|
|
||||||
StudiumMenu: ; 0x49d9e
|
StudiumMenu: ; 0x49d9e
|
||||||
db 4
|
db 4
|
||||||
@ -143,7 +143,7 @@ StudiumMenu: ; 0x49d9e
|
|||||||
db NEW_GAME
|
db NEW_GAME
|
||||||
db OPTION
|
db OPTION
|
||||||
db MOBILE_STUDIUM
|
db MOBILE_STUDIUM
|
||||||
db $ff
|
db -1
|
||||||
|
|
||||||
|
|
||||||
Function49da4: ; 49da4
|
Function49da4: ; 49da4
|
||||||
@ -198,9 +198,9 @@ Function49de4: ; 49de4
|
|||||||
call SetUpMenu
|
call SetUpMenu
|
||||||
.asm_49de7
|
.asm_49de7
|
||||||
call Function49e09
|
call Function49e09
|
||||||
ld a, [wcfa5]
|
ld a, [w2DMenuFlags1]
|
||||||
set 5, a
|
set 5, a
|
||||||
ld [wcfa5], a
|
ld [w2DMenuFlags1], a
|
||||||
call Function1f1a
|
call Function1f1a
|
||||||
ld a, [wMenuJoypad]
|
ld a, [wMenuJoypad]
|
||||||
cp $2
|
cp $2
|
||||||
@ -333,7 +333,7 @@ Function49ed0: ; 49ed0
|
|||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
call LoadFontsExtra
|
call LoadFontsExtra
|
||||||
call LoadStandardFont
|
call LoadStandardFont
|
||||||
call ResetTextRelatedRAM
|
call ClearWindowData
|
||||||
ret
|
ret
|
||||||
; 49ee0
|
; 49ee0
|
||||||
|
|
||||||
@ -370,19 +370,19 @@ Function49f0a: ; 49f0a
|
|||||||
call Function4a492
|
call Function4a492
|
||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
Function49f16: ; 49f16
|
Function49f16: ; 49f16
|
||||||
call Function4a071
|
call MobileMenu_InitMenuBuffers
|
||||||
ld c, 12
|
ld c, 12
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
hlcoord 4, 0
|
hlcoord 4, 0
|
||||||
ld b, $a
|
ld b, 10
|
||||||
ld c, $a
|
ld c, 10
|
||||||
call Function48cdc
|
call Function48cdc
|
||||||
hlcoord 6, 2
|
hlcoord 6, 2
|
||||||
ld de, MobileString1
|
ld de, MobileString1
|
||||||
call PlaceString
|
call PlaceString
|
||||||
hlcoord 0, 12
|
hlcoord 0, 12
|
||||||
ld b, $4
|
ld b, 4
|
||||||
ld c, $12
|
ld c, SCREEN_HEIGHT
|
||||||
call TextBox
|
call TextBox
|
||||||
xor a
|
xor a
|
||||||
ld de, String_0x49fe9
|
ld de, String_0x49fe9
|
||||||
@ -394,36 +394,35 @@ Function49f16: ; 49f16
|
|||||||
ld hl, wMenuCursorY
|
ld hl, wMenuCursorY
|
||||||
ld b, [hl]
|
ld b, [hl]
|
||||||
push bc
|
push bc
|
||||||
jr .asm_49f5d
|
jr .check_buttons
|
||||||
|
|
||||||
.asm_49f55
|
.joy_loop
|
||||||
call ScrollingMenuJoypad
|
call ScrollingMenuJoypad
|
||||||
ld hl, wMenuCursorY
|
ld hl, wMenuCursorY
|
||||||
ld b, [hl]
|
ld b, [hl]
|
||||||
push bc
|
push bc
|
||||||
|
|
||||||
.asm_49f5d
|
.check_buttons
|
||||||
bit 0, a
|
bit A_BUTTON_F, a
|
||||||
jr nz, .asm_49f67
|
jr nz, .a_button
|
||||||
bit 1, a
|
bit B_BUTTON_F, a
|
||||||
jr nz, .asm_49f84
|
jr nz, .b_button
|
||||||
jr .asm_49f97
|
jr .next
|
||||||
|
|
||||||
.asm_49f67
|
.a_button
|
||||||
ld hl, wMenuCursorY
|
ld hl, wMenuCursorY
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp $1
|
cp 1
|
||||||
jp z, Function4a098
|
jp z, Function4a098
|
||||||
cp $2
|
cp 2
|
||||||
jp z, Function4a0b9
|
jp z, Function4a0b9
|
||||||
cp $3
|
cp 3
|
||||||
jp z, Function4a0c2
|
jp z, Function4a0c2
|
||||||
cp $4
|
cp 4
|
||||||
jp z, Function4a100
|
jp z, Function4a100
|
||||||
ld a, $1
|
ld a, 1
|
||||||
call MenuClickSound
|
call MenuClickSound
|
||||||
|
.b_button
|
||||||
.asm_49f84
|
|
||||||
pop bc
|
pop bc
|
||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
@ -433,7 +432,7 @@ Function49f16: ; 49f16
|
|||||||
call Function4a6c5
|
call Function4a6c5
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_49f97
|
.next
|
||||||
ld hl, wMenuCursorY
|
ld hl, wMenuCursorY
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
dec a
|
dec a
|
||||||
@ -442,15 +441,15 @@ Function49f16: ; 49f16
|
|||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
hlcoord 1, 13
|
hlcoord 1, 13
|
||||||
ld b, $4
|
ld b, 4
|
||||||
ld c, $12
|
ld c, SCREEN_HEIGHT
|
||||||
call ClearBox
|
call ClearBox
|
||||||
hlcoord 1, 14
|
hlcoord 1, 14
|
||||||
call PlaceString
|
call PlaceString
|
||||||
jp .asm_49fb7
|
jp .useless_jump
|
||||||
|
|
||||||
.asm_49fb7
|
.useless_jump
|
||||||
call Function4a071
|
call MobileMenu_InitMenuBuffers
|
||||||
pop bc
|
pop bc
|
||||||
ld hl, wMenuCursorY
|
ld hl, wMenuCursorY
|
||||||
ld [hl], b
|
ld [hl], b
|
||||||
@ -458,7 +457,7 @@ Function49f16: ; 49f16
|
|||||||
ld c, $1
|
ld c, $1
|
||||||
hlcoord 5, 1
|
hlcoord 5, 1
|
||||||
call ClearBox
|
call ClearBox
|
||||||
jp .asm_49f55
|
jp .joy_loop
|
||||||
; 49fcc
|
; 49fcc
|
||||||
|
|
||||||
|
|
||||||
@ -499,36 +498,37 @@ String_0x4a062: ; 4a062
|
|||||||
next "@"
|
next "@"
|
||||||
; 4a071
|
; 4a071
|
||||||
|
|
||||||
Function4a071: ; 4a071 (12:6071)
|
MobileMenu_InitMenuBuffers: ; 4a071 (12:6071)
|
||||||
ld hl, wcfa1
|
ld hl, w2DMenuCursorInitY
|
||||||
ld a, $2
|
ld a, 2
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $5
|
ld a, 5 ; w2DMenuCursorInitX
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $5
|
ld a, 5 ; w2DMenuNumRows
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $1
|
ld a, 1 ; w2DMenuNumCols
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [hl], $0
|
ld [hl], $0 ; w2DMenuFlags1
|
||||||
set 5, [hl]
|
set 5, [hl]
|
||||||
inc hl
|
inc hl
|
||||||
xor a
|
xor a ; w2DMenuFlags2
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $20
|
ld a, $20 ; w2DMenuFlags3
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
|
; this is a stupid way to load $c3
|
||||||
ld a, $1
|
ld a, $1
|
||||||
add $40
|
add $40
|
||||||
add $80
|
add $80
|
||||||
add $2
|
add $2
|
||||||
ld [hli], a
|
ld [hli], a ; w2DMenuFlags4
|
||||||
ld a, $1
|
ld a, 1
|
||||||
rept 2
|
rept 2
|
||||||
ld [hli], a
|
ld [hli], a ; wMenuCursorY, wMenuCursorX
|
||||||
endr
|
endr
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function4a098: ; 4a098 (12:6098)
|
Function4a098: ; 4a098 (12:6098)
|
||||||
ld a, $2
|
ld a, 2
|
||||||
call MenuClickSound
|
call MenuClickSound
|
||||||
call PlaceHollowCursor
|
call PlaceHollowCursor
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
@ -541,19 +541,19 @@ Function4a098: ; 4a098 (12:6098)
|
|||||||
jp Function49f16
|
jp Function49f16
|
||||||
|
|
||||||
Function4a0b9: ; 4a0b9 (12:60b9)
|
Function4a0b9: ; 4a0b9 (12:60b9)
|
||||||
ld a, $2
|
ld a, 2
|
||||||
call MenuClickSound
|
call MenuClickSound
|
||||||
pop bc
|
pop bc
|
||||||
jp Function4a4c4
|
jp Function4a4c4
|
||||||
|
|
||||||
Function4a0c2: ; 4a0c2 (12:60c2)
|
Function4a0c2: ; 4a0c2 (12:60c2)
|
||||||
ld a, $2
|
ld a, 2
|
||||||
call MenuClickSound
|
call MenuClickSound
|
||||||
ld a, BANK(sPlayerData)
|
ld a, BANK(sPlayerData)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld hl, sPlayerData + PlayerName - wPlayerData
|
ld hl, sPlayerData + PlayerName - wPlayerData
|
||||||
ld de, PlayerName
|
ld de, PlayerName
|
||||||
ld bc, $6
|
ld bc, 6 ; japanese name length
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
callba _LoadData
|
callba _LoadData
|
||||||
@ -565,15 +565,15 @@ Function4a0c2: ; 4a0c2 (12:60c2)
|
|||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
pop af
|
pop af
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_4a0f9
|
jr nz, .skip_save
|
||||||
callba _SaveData
|
callba _SaveData
|
||||||
.asm_4a0f9
|
.skip_save
|
||||||
ld c, 5
|
ld c, 5
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
jr asm_4a111
|
jr asm_4a111
|
||||||
|
|
||||||
Function4a100: ; 4a100 (12:6100)
|
Function4a100: ; 4a100 (12:6100)
|
||||||
ld a, $2
|
ld a, 2
|
||||||
call MenuClickSound
|
call MenuClickSound
|
||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
call Function4a13b
|
call Function4a13b
|
||||||
@ -586,7 +586,7 @@ asm_4a111: ; 4a111 (12:6111)
|
|||||||
jp Function49f0a
|
jp Function49f0a
|
||||||
|
|
||||||
Function4a118: ; 4a118 (12:6118)
|
Function4a118: ; 4a118 (12:6118)
|
||||||
ld hl, wcfa1
|
ld hl, w2DMenuCursorInitY
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $d
|
ld a, $d
|
||||||
@ -860,7 +860,7 @@ MenuData2_0x4a36a: ; 0x4a36a
|
|||||||
; 0x4a373
|
; 0x4a373
|
||||||
|
|
||||||
Function4a373: ; 4a373 (12:6373)
|
Function4a373: ; 4a373 (12:6373)
|
||||||
ld hl, wcfa1
|
ld hl, w2DMenuCursorInitY
|
||||||
ld a, $4
|
ld a, $4
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $2
|
ld a, $2
|
||||||
@ -991,7 +991,7 @@ Function4a449: ; 4a449
|
|||||||
Function4a485: ; 4a485 (12:6485)
|
Function4a485: ; 4a485 (12:6485)
|
||||||
ld de, GFX_49c0c
|
ld de, GFX_49c0c
|
||||||
ld hl, VTiles2 tile $00
|
ld hl, VTiles2 tile $00
|
||||||
lb bc, BANK(GFX_49c0c), $d
|
lb bc, BANK(GFX_49c0c), 13
|
||||||
call Get2bpp
|
call Get2bpp
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -1173,7 +1173,7 @@ Strings_4a5f6: ; 4a5f6
|
|||||||
; 4a680
|
; 4a680
|
||||||
|
|
||||||
Function4a680: ; 4a680 (12:6680)
|
Function4a680: ; 4a680 (12:6680)
|
||||||
ld hl, wcfa1
|
ld hl, w2DMenuCursorInitY
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $3
|
ld a, $3
|
||||||
|
@ -86,7 +86,7 @@ MonMenuLoop: ; 24d59
|
|||||||
ld a, [Buffer1] ; items
|
ld a, [Buffer1] ; items
|
||||||
ld [wMenuData2Items], a
|
ld [wMenuData2Items], a
|
||||||
call InitVerticalMenuCursor
|
call InitVerticalMenuCursor
|
||||||
ld hl, wcfa5
|
ld hl, w2DMenuFlags1
|
||||||
set 6, [hl]
|
set 6, [hl]
|
||||||
call StaticMenuJoypad
|
call StaticMenuJoypad
|
||||||
ld de, SFX_READ_TEXT_2
|
ld de, SFX_READ_TEXT_2
|
||||||
@ -308,7 +308,7 @@ BattleMonMenu: ; 24e99
|
|||||||
bit 7, a
|
bit 7, a
|
||||||
jr z, .set_carry
|
jr z, .set_carry
|
||||||
call InitVerticalMenuCursor
|
call InitVerticalMenuCursor
|
||||||
ld hl, wcfa5
|
ld hl, w2DMenuFlags1
|
||||||
set 6, [hl]
|
set 6, [hl]
|
||||||
call StaticMenuJoypad
|
call StaticMenuJoypad
|
||||||
ld de, SFX_READ_TEXT_2
|
ld de, SFX_READ_TEXT_2
|
||||||
|
@ -682,7 +682,7 @@ InitPartyMenuWithCancel: ; 50405
|
|||||||
call InitMenu3
|
call InitMenu3
|
||||||
ld a, [PartyCount]
|
ld a, [PartyCount]
|
||||||
inc a
|
inc a
|
||||||
ld [wcfa3], a ; list length
|
ld [w2DMenuNumRows], a ; list length
|
||||||
dec a
|
dec a
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wPartyMenuCursor]
|
ld a, [wPartyMenuCursor]
|
||||||
@ -698,7 +698,7 @@ InitPartyMenuWithCancel: ; 50405
|
|||||||
.done
|
.done
|
||||||
ld [wMenuCursorY], a
|
ld [wMenuCursorY], a
|
||||||
ld a, A_BUTTON | B_BUTTON
|
ld a, A_BUTTON | B_BUTTON
|
||||||
ld [wcfa8], a
|
ld [w2DMenuFlags4], a
|
||||||
ret
|
ret
|
||||||
; 5042d
|
; 5042d
|
||||||
|
|
||||||
@ -707,7 +707,7 @@ InitPartyMenuNoCancel: ; 0x5042d
|
|||||||
ld de, PartyMenuAttributes
|
ld de, PartyMenuAttributes
|
||||||
call InitMenu3
|
call InitMenu3
|
||||||
ld a, [PartyCount]
|
ld a, [PartyCount]
|
||||||
ld [wcfa3], a ; list length
|
ld [w2DMenuNumRows], a ; list length
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wPartyMenuCursor]
|
ld a, [wPartyMenuCursor]
|
||||||
and a
|
and a
|
||||||
@ -720,7 +720,7 @@ InitPartyMenuNoCancel: ; 0x5042d
|
|||||||
.done
|
.done
|
||||||
ld [wMenuCursorY], a
|
ld [wMenuCursorY], a
|
||||||
ld a, A_BUTTON | B_BUTTON
|
ld a, A_BUTTON | B_BUTTON
|
||||||
ld [wcfa8], a
|
ld [w2DMenuFlags4], a
|
||||||
ret
|
ret
|
||||||
; 5044f (14:444f)
|
; 5044f (14:444f)
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ _SlotMachine:
|
|||||||
call DelayFrame
|
call DelayFrame
|
||||||
call DisableLCD
|
call DisableLCD
|
||||||
hlbgcoord 0, 0
|
hlbgcoord 0, 0
|
||||||
lb bc, 4, 0
|
ld bc, VBGMap1 - VBGMap0
|
||||||
ld a, " "
|
ld a, " "
|
||||||
call ByteFill
|
call ByteFill
|
||||||
ld b, SCGB_05
|
ld b, SCGB_05
|
||||||
@ -97,13 +97,13 @@ _SlotMachine:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Slots_GetPals: ; 9279b (24:679b)
|
Slots_GetPals: ; 9279b (24:679b)
|
||||||
ld a, $e4
|
ld a, %11100100
|
||||||
call DmgToCgbBGPals
|
call DmgToCgbBGPals
|
||||||
lb de, $e4, $e4
|
lb de, %11100100, %11100100
|
||||||
ld a, [hCGB]
|
ld a, [hCGB]
|
||||||
and a
|
and a
|
||||||
jr nz, .cgb
|
jr nz, .cgb
|
||||||
lb de, $c0, $e4
|
lb de, %11000000, %11100100
|
||||||
.cgb
|
.cgb
|
||||||
call DmgToCgbObjPals
|
call DmgToCgbObjPals
|
||||||
ret
|
ret
|
||||||
@ -139,7 +139,7 @@ SlotsLoop: ; 927af (24:67af)
|
|||||||
ld a, [wFirstTwoReelsMatchingSevens]
|
ld a, [wFirstTwoReelsMatchingSevens]
|
||||||
and a
|
and a
|
||||||
jr nz, .matching_sevens
|
jr nz, .matching_sevens
|
||||||
ld a, $e4
|
ld a, %11100100
|
||||||
call DmgToCgbBGPals
|
call DmgToCgbBGPals
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ SlotsLoop: ; 927af (24:67af)
|
|||||||
and $7
|
and $7
|
||||||
ret nz
|
ret nz
|
||||||
ld a, [rBGP]
|
ld a, [rBGP]
|
||||||
xor %1100
|
xor %00001100
|
||||||
call DmgToCgbBGPals
|
call DmgToCgbBGPals
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -280,9 +280,9 @@ Slots_BetAndStart: ; 9288e (24:688e)
|
|||||||
ld [wReel2ReelAction], a
|
ld [wReel2ReelAction], a
|
||||||
ld [wReel3ReelAction], a
|
ld [wReel3ReelAction], a
|
||||||
ld a, $4
|
ld a, $4
|
||||||
ld [wReel1 + 9], a
|
ld [wReel1Slot09], a
|
||||||
ld [wReel2 + 9], a
|
ld [wReel2Slot09], a
|
||||||
ld [wReel3 + 9], a
|
ld [wReel3Slot09], a
|
||||||
call WaitSFX
|
call WaitSFX
|
||||||
ld a, SFX_SLOT_MACHINE_START
|
ld a, SFX_SLOT_MACHINE_START
|
||||||
call Slots_PlaySFX
|
call Slots_PlaySFX
|
||||||
@ -401,7 +401,7 @@ Slots_GiveEarnedCoins: ; 92987 (24:6987)
|
|||||||
xor a
|
xor a
|
||||||
ld [wFirstTwoReelsMatching], a
|
ld [wFirstTwoReelsMatching], a
|
||||||
ld [wFirstTwoReelsMatchingSevens], a
|
ld [wFirstTwoReelsMatchingSevens], a
|
||||||
ld a, $e4
|
ld a, %11100100
|
||||||
call DmgToCgbBGPals
|
call DmgToCgbBGPals
|
||||||
call SlotGetPayout
|
call SlotGetPayout
|
||||||
xor a
|
xor a
|
||||||
@ -524,22 +524,22 @@ Slots_StopReel1: ; 92a2b (24:6a2b)
|
|||||||
Slots_StopReel2: ; 92a2e (24:6a2e)
|
Slots_StopReel2: ; 92a2e (24:6a2e)
|
||||||
ld a, [wSlotBet]
|
ld a, [wSlotBet]
|
||||||
cp $2
|
cp $2
|
||||||
jr c, .eight
|
jr c, .dont_jump
|
||||||
ld a, [wSlotBias]
|
ld a, [wSlotBias]
|
||||||
and a
|
and a
|
||||||
jr z, .skip
|
jr z, .skip
|
||||||
cp SLOTS_NOMATCH
|
cp SLOTS_NOMATCH
|
||||||
jr nz, .eight
|
jr nz, .dont_jump
|
||||||
.skip
|
.skip
|
||||||
call .CheckReel1ForASeven
|
call .CheckReel1ForASeven
|
||||||
jr nz, .eight
|
jr nz, .dont_jump
|
||||||
call Random
|
call Random
|
||||||
cp $50 ; 32%
|
cp $50 ; 32%
|
||||||
jr nc, .eight
|
jr nc, .dont_jump
|
||||||
ld a, $a
|
ld a, $a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.eight
|
.dont_jump
|
||||||
ld a, $8
|
ld a, $8
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -557,38 +557,38 @@ Slots_StopReel2: ; 92a2e (24:6a2e)
|
|||||||
Slots_StopReel3: ; 92a60 (24:6a60)
|
Slots_StopReel3: ; 92a60 (24:6a60)
|
||||||
ld a, [wFirstTwoReelsMatching]
|
ld a, [wFirstTwoReelsMatching]
|
||||||
and a
|
and a
|
||||||
jr z, .not_matching_sevens
|
jr z, .stop
|
||||||
ld a, [wFirstTwoReelsMatchingSevens]
|
ld a, [wFirstTwoReelsMatchingSevens]
|
||||||
and a
|
and a
|
||||||
jr z, .not_matching_sevens
|
jr z, .stop
|
||||||
ld a, [wSlotBias]
|
ld a, [wSlotBias]
|
||||||
and a
|
and a
|
||||||
jr nz, .biased
|
jr nz, .biased
|
||||||
call Random
|
call Random
|
||||||
cp 180
|
cp 180
|
||||||
jr nc, .not_matching_sevens
|
jr nc, .stop
|
||||||
cp 120
|
cp 120
|
||||||
jr nc, .sixteen
|
jr nc, .slow_advance
|
||||||
cp 60
|
cp 60
|
||||||
jr nc, .eighteen
|
jr nc, .golem
|
||||||
ld a, $15
|
ld a, $15
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.biased
|
.biased
|
||||||
call Random
|
call Random
|
||||||
cp 160
|
cp 160
|
||||||
jr nc, .not_matching_sevens
|
jr nc, .stop
|
||||||
cp 80
|
cp 80
|
||||||
jr nc, .sixteen
|
jr nc, .slow_advance
|
||||||
.eighteen
|
.golem
|
||||||
ld a, $12
|
ld a, $12
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.sixteen
|
.slow_advance
|
||||||
ld a, $10
|
ld a, $10
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.not_matching_sevens
|
.stop
|
||||||
ld a, $9
|
ld a, $9
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -830,24 +830,25 @@ endr
|
|||||||
jumptable ReelAction_StopReel2 ; 08
|
jumptable ReelAction_StopReel2 ; 08
|
||||||
jumptable ReelAction_StopReel3 ; 09
|
jumptable ReelAction_StopReel3 ; 09
|
||||||
|
|
||||||
jumptable Function92cd2 ; 0a
|
jumptable ReelAction_SetUpReel2SkipTo7 ; 0a
|
||||||
jumptable Function92cf8 ; 0b
|
jumptable ReelAction_WaitReel2SkipTo7 ; 0b
|
||||||
jumptable Function92d13 ; 0c
|
jumptable ReelAction_FastSpinReel2UntilLinedUp7s ; 0c
|
||||||
jumptable Function92df7 ; 0d
|
|
||||||
jumptable Function92e10 ; 0e
|
|
||||||
jumptable Function92e31 ; 0f
|
|
||||||
|
|
||||||
jumptable Function92e47 ; 10
|
jumptable ReelAction_BoringReelDrops ; 0d
|
||||||
jumptable Function92e64 ; 11
|
jumptable ReelAction_CheckDropReel ; 0e
|
||||||
|
jumptable ReelAction_WaitDropReel ; 0f
|
||||||
|
|
||||||
jumptable Function92d20 ; 12
|
jumptable ReelAction_StartSlowAdvanceReel3 ; 10
|
||||||
jumptable Function92d4f ; 13
|
jumptable ReelAction_WaitSlowAdvanceReel3 ; 11
|
||||||
jumptable Function92d6e ; 14
|
|
||||||
|
jumptable ReelAction_InitGolem ; 12
|
||||||
|
jumptable ReelAction_WaitGolem ; 13
|
||||||
|
jumptable ReelAction_EndGolem ; 14
|
||||||
|
|
||||||
jumptable Slots_InitChansey ; 15
|
jumptable Slots_InitChansey ; 15
|
||||||
jumptable Function92da4 ; 16
|
jumptable ReelAction_WaitChansey ; 16
|
||||||
jumptable Function92db3 ; 17
|
jumptable ReelAction_WaitEgg ; 17
|
||||||
jumptable Function92dca ; 18
|
jumptable ReelAction_DropReel ; 18
|
||||||
; 92c16
|
; 92c16
|
||||||
|
|
||||||
ReelAction_DoNothing: ; 92c16
|
ReelAction_DoNothing: ; 92c16
|
||||||
@ -963,20 +964,20 @@ ReelAction_StopReel2: ; 92c86
|
|||||||
ld a, [wSlotBuildingMatch]
|
ld a, [wSlotBuildingMatch]
|
||||||
ld hl, wSlotBias
|
ld hl, wSlotBias
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr z, .biased_match
|
jr z, .NoBias
|
||||||
.nope
|
.nope
|
||||||
ld a, [wSlotBias]
|
ld a, [wSlotBias]
|
||||||
cp $ff
|
cp SLOTS_NOMATCH
|
||||||
jr z, .biased_match
|
jr z, .NoBias
|
||||||
ld hl, wReel1Slot09 - wReel1
|
ld hl, wReel1Slot09 - wReel1
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
jr z, .biased_match
|
jr z, .NoBias
|
||||||
dec [hl]
|
dec [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.biased_match
|
.NoBias
|
||||||
call Slots_StopReel
|
call Slots_StopReel
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -987,7 +988,7 @@ ReelAction_StopReel3: ; 92ca9
|
|||||||
jr nc, .NoMatch
|
jr nc, .NoMatch
|
||||||
ld hl, wSlotBias
|
ld hl, wSlotBias
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr z, .bias
|
jr z, .NoBias
|
||||||
ld hl, wReel1Slot09 - wReel1
|
ld hl, wReel1Slot09 - wReel1
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -999,22 +1000,22 @@ ReelAction_StopReel3: ; 92ca9
|
|||||||
.NoMatch
|
.NoMatch
|
||||||
ld a, [wSlotBias]
|
ld a, [wSlotBias]
|
||||||
cp SLOTS_NOMATCH
|
cp SLOTS_NOMATCH
|
||||||
jr z, .bias
|
jr z, .NoBias
|
||||||
ld hl, wReel1Slot09 - wReel1
|
ld hl, wReel1Slot09 - wReel1
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
jr z, .bias
|
jr z, .NoBias
|
||||||
dec [hl]
|
dec [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.bias
|
.NoBias
|
||||||
call Slots_StopReel
|
call Slots_StopReel
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; 92cd2
|
; 92cd2
|
||||||
|
|
||||||
Function92cd2: ; 92cd2
|
ReelAction_SetUpReel2SkipTo7: ; 92cd2
|
||||||
call Slots_CheckMatchedFirstTwoReels
|
call Slots_CheckMatchedFirstTwoReels
|
||||||
jr nc, .no_match
|
jr nc, .no_match
|
||||||
ld a, [wFirstTwoReelsMatchingSevens]
|
ld a, [wFirstTwoReelsMatchingSevens]
|
||||||
@ -1039,7 +1040,7 @@ Function92cd2: ; 92cd2
|
|||||||
|
|
||||||
; 92cf8
|
; 92cf8
|
||||||
|
|
||||||
Function92cf8: ; 92cf8
|
ReelAction_WaitReel2SkipTo7: ; 92cf8
|
||||||
ld hl, wReel1Slot0a - wReel1
|
ld hl, wReel1Slot0a - wReel1
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -1061,7 +1062,7 @@ Function92cf8: ; 92cf8
|
|||||||
|
|
||||||
; 92d13
|
; 92d13
|
||||||
|
|
||||||
Function92d13: ; 92d13
|
ReelAction_FastSpinReel2UntilLinedUp7s: ; 92d13
|
||||||
call Slots_CheckMatchedFirstTwoReels
|
call Slots_CheckMatchedFirstTwoReels
|
||||||
ret nc
|
ret nc
|
||||||
ld a, [wFirstTwoReelsMatchingSevens]
|
ld a, [wFirstTwoReelsMatchingSevens]
|
||||||
@ -1072,7 +1073,7 @@ Function92d13: ; 92d13
|
|||||||
|
|
||||||
; 92d20
|
; 92d20
|
||||||
|
|
||||||
Function92d20: ; 92d20
|
ReelAction_InitGolem: ; 92d20
|
||||||
call Slots_CheckMatchedAllThreeReels
|
call Slots_CheckMatchedAllThreeReels
|
||||||
ret c
|
ret c
|
||||||
ld a, SFX_STOP_SLOT
|
ld a, SFX_STOP_SLOT
|
||||||
@ -1097,21 +1098,20 @@ Function92d20: ; 92d20
|
|||||||
pop bc
|
pop bc
|
||||||
xor a
|
xor a
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
|
ReelAction_WaitGolem: ; 92d4f
|
||||||
Function92d4f: ; 92d4f
|
|
||||||
ld a, [wcf64]
|
ld a, [wcf64]
|
||||||
cp $2
|
cp 2
|
||||||
jr z, .asm_92d5b
|
jr z, .two
|
||||||
cp $1
|
cp 1
|
||||||
jr z, .asm_92d62
|
jr z, .one
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_92d5b
|
.two
|
||||||
call Slots_CheckMatchedAllThreeReels
|
call Slots_CheckMatchedAllThreeReels
|
||||||
call Slots_StopReel
|
call Slots_StopReel
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_92d62
|
.one
|
||||||
ld hl, wReel1ReelAction - wReel1
|
ld hl, wReel1ReelAction - wReel1
|
||||||
add hl, bc
|
add hl, bc
|
||||||
inc [hl]
|
inc [hl]
|
||||||
@ -1122,7 +1122,7 @@ Function92d4f: ; 92d4f
|
|||||||
|
|
||||||
; 92d6e
|
; 92d6e
|
||||||
|
|
||||||
Function92d6e: ; 92d6e
|
ReelAction_EndGolem: ; 92d6e
|
||||||
xor a
|
xor a
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
ld hl, wReel1ReelAction - wReel1
|
ld hl, wReel1ReelAction - wReel1
|
||||||
@ -1158,7 +1158,7 @@ Slots_InitChansey: ; 92d7e
|
|||||||
|
|
||||||
; 92da4
|
; 92da4
|
||||||
|
|
||||||
Function92da4: ; 92da4
|
ReelAction_WaitChansey: ; 92da4
|
||||||
ld a, [wcf64]
|
ld a, [wcf64]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
@ -1167,8 +1167,7 @@ Function92da4: ; 92da4
|
|||||||
inc [hl]
|
inc [hl]
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
|
ReelAction_WaitEgg: ; 92db3
|
||||||
Function92db3: ; 92db3
|
|
||||||
ld a, [wcf64]
|
ld a, [wcf64]
|
||||||
cp $4
|
cp $4
|
||||||
ret c
|
ret c
|
||||||
@ -1181,27 +1180,26 @@ Function92db3: ; 92db3
|
|||||||
ld hl, wReel1Slot0a - wReel1
|
ld hl, wReel1Slot0a - wReel1
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $11
|
ld [hl], $11
|
||||||
|
ReelAction_DropReel: ; 92dca
|
||||||
Function92dca: ; 92dca
|
|
||||||
ld hl, wReel1Slot0a - wReel1
|
ld hl, wReel1Slot0a - wReel1
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_92dd4
|
jr z, .check_match
|
||||||
dec [hl]
|
dec [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_92dd4
|
.check_match
|
||||||
call Slots_CheckMatchedAllThreeReels
|
call Slots_CheckMatchedAllThreeReels
|
||||||
jr nc, .asm_92de5
|
jr nc, .EggAgain
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_92de5
|
jr nz, .EggAgain
|
||||||
ld a, $5
|
ld a, $5
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
call Slots_StopReel
|
call Slots_StopReel
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_92de5
|
.EggAgain
|
||||||
ld hl, wReel1SpinRate - wReel1
|
ld hl, wReel1SpinRate - wReel1
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $0
|
ld [hl], $0
|
||||||
@ -1216,7 +1214,7 @@ endr
|
|||||||
|
|
||||||
; 92df7
|
; 92df7
|
||||||
|
|
||||||
Function92df7: ; 92df7
|
ReelAction_BoringReelDrops: ; 92df7
|
||||||
call Slots_CheckMatchedAllThreeReels
|
call Slots_CheckMatchedAllThreeReels
|
||||||
ret c
|
ret c
|
||||||
ld a, SFX_STOP_SLOT
|
ld a, SFX_STOP_SLOT
|
||||||
@ -1229,7 +1227,7 @@ Function92df7: ; 92df7
|
|||||||
ld hl, wReel1Slot0a - wReel1
|
ld hl, wReel1Slot0a - wReel1
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
Function92e10: ; 92e10
|
ReelAction_CheckDropReel: ; 92e10
|
||||||
ld hl, wReel1Slot0a - wReel1
|
ld hl, wReel1Slot0a - wReel1
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -1250,16 +1248,16 @@ Function92e10: ; 92e10
|
|||||||
ld hl, wReel1SpinRate - wReel1
|
ld hl, wReel1SpinRate - wReel1
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $0
|
ld [hl], $0
|
||||||
Function92e31: ; 92e31
|
ReelAction_WaitDropReel: ; 92e31
|
||||||
ld hl, wReel1Slot0b - wReel1
|
ld hl, wReel1Slot0b - wReel1
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_92e3b
|
jr z, .DropReel
|
||||||
dec [hl]
|
dec [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_92e3b
|
.DropReel
|
||||||
ld hl, wReel1ReelAction - wReel1
|
ld hl, wReel1ReelAction - wReel1
|
||||||
add hl, bc
|
add hl, bc
|
||||||
dec [hl]
|
dec [hl]
|
||||||
@ -1270,7 +1268,7 @@ Function92e31: ; 92e31
|
|||||||
|
|
||||||
; 92e47
|
; 92e47
|
||||||
|
|
||||||
Function92e47: ; 92e47
|
ReelAction_StartSlowAdvanceReel3: ; 92e47
|
||||||
call Slots_CheckMatchedAllThreeReels
|
call Slots_CheckMatchedAllThreeReels
|
||||||
ret c
|
ret c
|
||||||
ld a, SFX_STOP_SLOT
|
ld a, SFX_STOP_SLOT
|
||||||
@ -1285,34 +1283,33 @@ Function92e47: ; 92e47
|
|||||||
ld hl, wReel1Slot0a - wReel1
|
ld hl, wReel1Slot0a - wReel1
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $10
|
ld [hl], $10
|
||||||
|
ReelAction_WaitSlowAdvanceReel3: ; 92e64
|
||||||
Function92e64: ; 92e64
|
|
||||||
ld hl, wReel1Slot0a - wReel1
|
ld hl, wReel1Slot0a - wReel1
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_92e73
|
jr z, .check1
|
||||||
dec [hl]
|
dec [hl]
|
||||||
.asm_92e6d
|
.play_sfx
|
||||||
ld a, SFX_GOT_SAFARI_BALLS
|
ld a, SFX_GOT_SAFARI_BALLS
|
||||||
call Slots_PlaySFX
|
call Slots_PlaySFX
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_92e73
|
.check1
|
||||||
ld a, [wSlotBias]
|
ld a, [wSlotBias]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_92e88
|
jr nz, .check2
|
||||||
call Slots_CheckMatchedAllThreeReels
|
call Slots_CheckMatchedAllThreeReels
|
||||||
jr nc, .asm_92e6d
|
jr nc, .play_sfx
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_92e6d
|
jr nz, .play_sfx
|
||||||
call Slots_StopReel
|
call Slots_StopReel
|
||||||
call WaitSFX
|
call WaitSFX
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_92e88
|
.check2
|
||||||
call Slots_CheckMatchedAllThreeReels
|
call Slots_CheckMatchedAllThreeReels
|
||||||
jr c, .asm_92e6d
|
jr c, .play_sfx
|
||||||
call Slots_StopReel
|
call Slots_StopReel
|
||||||
call WaitSFX
|
call WaitSFX
|
||||||
ret
|
ret
|
||||||
@ -1575,7 +1572,7 @@ Function92fc0: ; 92fc0
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
push af
|
push af
|
||||||
push hl
|
push hl
|
||||||
call Function92fcf
|
call .Check7Bias
|
||||||
pop hl
|
pop hl
|
||||||
pop af
|
pop af
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
@ -1584,7 +1581,7 @@ Function92fc0: ; 92fc0
|
|||||||
|
|
||||||
; 92fcf
|
; 92fcf
|
||||||
|
|
||||||
Function92fcf: ; 92fcf
|
.Check7Bias: ; 92fcf
|
||||||
ld a, [wSlotBias]
|
ld a, [wSlotBias]
|
||||||
and a
|
and a
|
||||||
jr nz, .not_biased_to_seven
|
jr nz, .not_biased_to_seven
|
||||||
@ -1605,7 +1602,7 @@ Function92fcf: ; 92fcf
|
|||||||
.not_biased_to_seven
|
.not_biased_to_seven
|
||||||
call Random
|
call Random
|
||||||
and $7
|
and $7
|
||||||
cp $4
|
cp $4 ; ((50 percent) & 7) + 1
|
||||||
jr c, .not_biased_to_seven
|
jr c, .not_biased_to_seven
|
||||||
ld e, a
|
ld e, a
|
||||||
.loop2
|
.loop2
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
StartMenu:: ; 125cd
|
StartMenu:: ; 125cd
|
||||||
|
|
||||||
call ResetTextRelatedRAM
|
call ClearWindowData
|
||||||
|
|
||||||
ld de, SFX_MENU
|
ld de, SFX_MENU
|
||||||
call PlaySFX
|
call PlaySFX
|
||||||
@ -1478,7 +1478,7 @@ ChooseMoveToDelete: ; 12f5b
|
|||||||
ld de, Unknown_12fb2
|
ld de, Unknown_12fb2
|
||||||
call InitMenu3
|
call InitMenu3
|
||||||
call SetUpMoveList
|
call SetUpMoveList
|
||||||
ld hl, wcfa5
|
ld hl, w2DMenuFlags1
|
||||||
set 6, [hl]
|
set 6, [hl]
|
||||||
jr .asm_12f93
|
jr .asm_12f93
|
||||||
|
|
||||||
@ -1506,7 +1506,7 @@ ChooseMoveToDelete: ; 12f5b
|
|||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
ld [wSwitchMon], a
|
ld [wSwitchMon], a
|
||||||
ld hl, wcfa5
|
ld hl, w2DMenuFlags1
|
||||||
res 6, [hl]
|
res 6, [hl]
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
@ -1546,7 +1546,7 @@ MoveScreenLoop: ; 12fd5
|
|||||||
call InitMenu3
|
call InitMenu3
|
||||||
.loop
|
.loop
|
||||||
call SetUpMoveList
|
call SetUpMoveList
|
||||||
ld hl, wcfa5
|
ld hl, w2DMenuFlags1
|
||||||
set 6, [hl]
|
set 6, [hl]
|
||||||
jr .skip_joy
|
jr .skip_joy
|
||||||
|
|
||||||
@ -1740,7 +1740,7 @@ MoveScreenLoop: ; 12fd5
|
|||||||
.exit: ; 13154
|
.exit: ; 13154
|
||||||
xor a
|
xor a
|
||||||
ld [wMoveSwapBuffer], a
|
ld [wMoveSwapBuffer], a
|
||||||
ld hl, wcfa5
|
ld hl, w2DMenuFlags1
|
||||||
res 6, [hl]
|
res 6, [hl]
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
jp ClearTileMap
|
jp ClearTileMap
|
||||||
@ -1822,7 +1822,7 @@ SetUpMoveList: ; 131ef
|
|||||||
call SetPalettes
|
call SetPalettes
|
||||||
ld a, [wNumMoves]
|
ld a, [wNumMoves]
|
||||||
inc a
|
inc a
|
||||||
ld [wcfa3], a
|
ld [w2DMenuNumRows], a
|
||||||
hlcoord 0, 11
|
hlcoord 0, 11
|
||||||
ld b, 5
|
ld b, 5
|
||||||
ld c, 18
|
ld c, 18
|
||||||
|
@ -21,7 +21,7 @@ StatsScreenInit_gotaddress: ; 4dc94
|
|||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
ld [hMapAnims], a ; disable overworld tile animations
|
ld [hMapAnims], a ; disable overworld tile animations
|
||||||
ld a, [wc2c6] ; whether sprite is to be mirrorred
|
ld a, [wBoxAlignment] ; whether sprite is to be mirrorred
|
||||||
push af
|
push af
|
||||||
ld a, [wJumptableIndex]
|
ld a, [wJumptableIndex]
|
||||||
ld b, a
|
ld b, a
|
||||||
@ -46,7 +46,7 @@ StatsScreenInit_gotaddress: ; 4dc94
|
|||||||
ld a, c
|
ld a, c
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
pop af
|
pop af
|
||||||
ld [wc2c6], a
|
ld [wBoxAlignment], a
|
||||||
pop af
|
pop af
|
||||||
ld [hMapAnims], a
|
ld [hMapAnims], a
|
||||||
ret
|
ret
|
||||||
@ -823,7 +823,7 @@ Function4e253: ; 4e253 (13:6253)
|
|||||||
ret
|
ret
|
||||||
.asm_4e266
|
.asm_4e266
|
||||||
xor a
|
xor a
|
||||||
ld [wc2c6], a
|
ld [wBoxAlignment], a
|
||||||
hlcoord 0, 0
|
hlcoord 0, 0
|
||||||
call _PrepMonFrontpic
|
call _PrepMonFrontpic
|
||||||
ret
|
ret
|
||||||
@ -833,12 +833,12 @@ Function4e271: ; 4e271 (13:6271)
|
|||||||
cp UNOWN
|
cp UNOWN
|
||||||
jr z, .asm_4e281
|
jr z, .asm_4e281
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wc2c6], a
|
ld [wBoxAlignment], a
|
||||||
call Function4e289
|
call Function4e289
|
||||||
ret
|
ret
|
||||||
.asm_4e281
|
.asm_4e281
|
||||||
xor a
|
xor a
|
||||||
ld [wc2c6], a
|
ld [wBoxAlignment], a
|
||||||
call Function4e289
|
call Function4e289
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -1048,7 +1048,7 @@ Function4e497: ; 4e497 (13:6497)
|
|||||||
.asm_4e4ab
|
.asm_4e4ab
|
||||||
push de
|
push de
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wc2c6], a
|
ld [wBoxAlignment], a
|
||||||
call Function4e307
|
call Function4e307
|
||||||
ld de, VTiles2 tile $00
|
ld de, VTiles2 tile $00
|
||||||
predef FrontpicPredef
|
predef FrontpicPredef
|
||||||
|
@ -80,7 +80,7 @@ ChooseMonToLearnTMHM_NoRefresh: ; 2c80a
|
|||||||
callba LoadPartyMenuGFX
|
callba LoadPartyMenuGFX
|
||||||
callba InitPartyMenuWithCancel
|
callba InitPartyMenuWithCancel
|
||||||
callba InitPartyMenuGFX
|
callba InitPartyMenuGFX
|
||||||
ld a, $3
|
ld a, $3 ; TeachWhichPKMNString
|
||||||
ld [PartyMenuActionText], a
|
ld [PartyMenuActionText], a
|
||||||
.loopback
|
.loopback
|
||||||
callba WritePartyMenuTilemap
|
callba WritePartyMenuTilemap
|
||||||
@ -197,11 +197,11 @@ TMHM_PocketLoop: ; 2c8d3 (b:48d3)
|
|||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
call TMHM_DisplayPocketItems
|
call TMHM_DisplayPocketItems
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ld [wcfa1], a
|
ld [w2DMenuCursorInitY], a
|
||||||
ld a, $7
|
ld a, $7
|
||||||
ld [wcfa2], a
|
ld [w2DMenuCursorInitX], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wcfa4], a
|
ld [w2DMenuNumCols], a
|
||||||
ld a, $5
|
ld a, $5
|
||||||
sub d
|
sub d
|
||||||
inc a
|
inc a
|
||||||
@ -209,15 +209,15 @@ TMHM_PocketLoop: ; 2c8d3 (b:48d3)
|
|||||||
jr nz, .okay
|
jr nz, .okay
|
||||||
dec a
|
dec a
|
||||||
.okay
|
.okay
|
||||||
ld [wcfa3], a
|
ld [w2DMenuNumRows], a
|
||||||
ld a, $c
|
ld a, $c
|
||||||
ld [wcfa5], a
|
ld [w2DMenuFlags1], a
|
||||||
xor a
|
xor a
|
||||||
ld [wcfa6], a
|
ld [w2DMenuFlags2], a
|
||||||
ld a, $20
|
ld a, $20
|
||||||
ld [wcfa7], a
|
ld [w2DMenuFlags3], a
|
||||||
ld a, $f3
|
ld a, $f3
|
||||||
ld [wcfa8], a
|
ld [w2DMenuFlags4], a
|
||||||
ld a, [wTMHMPocketCursor]
|
ld a, [wTMHMPocketCursor]
|
||||||
inc a
|
inc a
|
||||||
ld [wMenuCursorY], a
|
ld [wMenuCursorY], a
|
||||||
@ -234,7 +234,7 @@ TMHM_JoypadLoop: ; 2c915 (b:4915)
|
|||||||
ld [wTMHMPocketCursor], a
|
ld [wTMHMPocketCursor], a
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
ld a, [wcfa6]
|
ld a, [w2DMenuFlags2]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jp nz, TMHM_ScrollPocket
|
jp nz, TMHM_ScrollPocket
|
||||||
ld a, b
|
ld a, b
|
||||||
|
@ -256,13 +256,13 @@ Function104770: ; 104770 (41:4770)
|
|||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
xor a
|
xor a
|
||||||
lb bc, 4, 0
|
ld bc, VBGMap1 - VBGMap0
|
||||||
hlbgcoord 0, 0
|
hlbgcoord 0, 0
|
||||||
call ByteFill
|
call ByteFill
|
||||||
pop af
|
pop af
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld a, $60
|
ld a, $60
|
||||||
lb bc, 4, 0
|
ld bc, VBGMap1 - VBGMap0
|
||||||
hlbgcoord 0, 0
|
hlbgcoord 0, 0
|
||||||
call ByteFill
|
call ByteFill
|
||||||
ret
|
ret
|
||||||
|
@ -267,7 +267,7 @@ endr
|
|||||||
call SetPalettes
|
call SetPalettes
|
||||||
call HOF_SlideBackpic
|
call HOF_SlideBackpic
|
||||||
xor a
|
xor a
|
||||||
ld [wc2c6], a
|
ld [wBoxAlignment], a
|
||||||
hlcoord 0, 0
|
hlcoord 0, 0
|
||||||
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
||||||
ld a, " "
|
ld a, " "
|
||||||
@ -486,7 +486,7 @@ DisplayHOFMon: ; 86748
|
|||||||
ld hl, TempMonDVs
|
ld hl, TempMonDVs
|
||||||
predef GetUnownLetter
|
predef GetUnownLetter
|
||||||
xor a
|
xor a
|
||||||
ld [wc2c6], a
|
ld [wBoxAlignment], a
|
||||||
hlcoord 6, 5
|
hlcoord 6, 5
|
||||||
call _PrepMonFrontpic
|
call _PrepMonFrontpic
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
@ -566,7 +566,7 @@ Function86810: ; 86810
|
|||||||
call SetPalettes
|
call SetPalettes
|
||||||
call HOF_SlideBackpic
|
call HOF_SlideBackpic
|
||||||
xor a
|
xor a
|
||||||
ld [wc2c6], a
|
ld [wBoxAlignment], a
|
||||||
hlcoord 0, 0
|
hlcoord 0, 0
|
||||||
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
||||||
ld a, " "
|
ld a, " "
|
||||||
|
@ -1,113 +1,113 @@
|
|||||||
MoveDeletion:
|
MoveDeletion:
|
||||||
ld hl, UnknownText_0x2c5ef
|
ld hl, .IntroText
|
||||||
call PrintText
|
call PrintText
|
||||||
call YesNoBox
|
call YesNoBox
|
||||||
jr c, .asm_2c5c3
|
jr c, .declined
|
||||||
ld hl, UnknownText_0x2c5f4
|
ld hl, .AskWhichMonText
|
||||||
call PrintText
|
call PrintText
|
||||||
callba SelectMonFromParty
|
callba SelectMonFromParty
|
||||||
jr c, .asm_2c5c3
|
jr c, .declined
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
cp EGG
|
cp EGG
|
||||||
jr z, .asm_2c5bc
|
jr z, .egg
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
ld hl, PartyMon1Moves + 1
|
ld hl, PartyMon1Moves + 1
|
||||||
ld bc, PARTYMON_STRUCT_LENGTH
|
ld bc, PARTYMON_STRUCT_LENGTH
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_2c5ca
|
jr z, .onlyonemove
|
||||||
ld hl, UnknownText_0x2c5ea
|
ld hl, .AskWhichMoveText
|
||||||
call PrintText
|
call PrintText
|
||||||
call LoadStandardMenuDataHeader
|
call LoadStandardMenuDataHeader
|
||||||
callba ChooseMoveToDelete
|
callba ChooseMoveToDelete
|
||||||
push af
|
push af
|
||||||
call ReturnToMapWithSpeechTextbox
|
call ReturnToMapWithSpeechTextbox
|
||||||
pop af
|
pop af
|
||||||
jr c, .asm_2c5c3
|
jr c, .declined
|
||||||
ld a, [wMenuCursorY]
|
ld a, [wMenuCursorY]
|
||||||
push af
|
push af
|
||||||
ld a, [CurSpecies]
|
ld a, [CurSpecies]
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
call GetMoveName
|
call GetMoveName
|
||||||
ld hl, UnknownText_0x2c5d6
|
ld hl, .ConfirmDeleteText
|
||||||
call PrintText
|
call PrintText
|
||||||
call YesNoBox
|
call YesNoBox
|
||||||
pop bc
|
pop bc
|
||||||
jr c, .asm_2c5c3
|
jr c, .declined
|
||||||
call Function2c5f9
|
call .DeleteMove
|
||||||
call WaitSFX
|
call WaitSFX
|
||||||
ld de, SFX_MOVE_DELETED
|
ld de, SFX_MOVE_DELETED
|
||||||
call PlaySFX
|
call PlaySFX
|
||||||
call WaitSFX
|
call WaitSFX
|
||||||
ld hl, UnknownText_0x2c5db
|
ld hl, .MoveDeletedText
|
||||||
call PrintText
|
call PrintText
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_2c5bc
|
.egg
|
||||||
ld hl, UnknownText_0x2c5e0
|
ld hl, .EggText
|
||||||
call PrintText
|
call PrintText
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_2c5c3
|
.declined
|
||||||
ld hl, UnknownText_0x2c5e5
|
ld hl, .DeclinedDeletionText
|
||||||
call PrintText
|
call PrintText
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_2c5ca
|
.onlyonemove
|
||||||
ld hl, UnknownText_0x2c5d1
|
ld hl, .OnlyOneMoveText
|
||||||
call PrintText
|
call PrintText
|
||||||
ret
|
ret
|
||||||
|
|
||||||
UnknownText_0x2c5d1: ; 0x2c5d1
|
.OnlyOneMoveText: ; 0x2c5d1
|
||||||
; That #MON knows only one move.
|
; That #MON knows only one move.
|
||||||
text_jump UnknownText_0x1c5eba
|
text_jump UnknownText_0x1c5eba
|
||||||
db "@"
|
db "@"
|
||||||
; 0x2c5d6
|
; 0x2c5d6
|
||||||
|
|
||||||
UnknownText_0x2c5d6: ; 0x2c5d6
|
.ConfirmDeleteText: ; 0x2c5d6
|
||||||
; Oh, make it forget @ ?
|
; Oh, make it forget @ ?
|
||||||
text_jump UnknownText_0x1c5eda
|
text_jump UnknownText_0x1c5eda
|
||||||
db "@"
|
db "@"
|
||||||
; 0x2c5db
|
; 0x2c5db
|
||||||
|
|
||||||
UnknownText_0x2c5db: ; 0x2c5db
|
.MoveDeletedText: ; 0x2c5db
|
||||||
; Done! Your #MON forgot the move.
|
; Done! Your #MON forgot the move.
|
||||||
text_jump UnknownText_0x1c5ef5
|
text_jump UnknownText_0x1c5ef5
|
||||||
db "@"
|
db "@"
|
||||||
; 0x2c5e0
|
; 0x2c5e0
|
||||||
|
|
||||||
UnknownText_0x2c5e0: ; 0x2c5e0
|
.EggText: ; 0x2c5e0
|
||||||
; An EGG doesn't know any moves!
|
; An EGG doesn't know any moves!
|
||||||
text_jump UnknownText_0x1c5f17
|
text_jump UnknownText_0x1c5f17
|
||||||
db "@"
|
db "@"
|
||||||
; 0x2c5e5
|
; 0x2c5e5
|
||||||
|
|
||||||
UnknownText_0x2c5e5: ; 0x2c5e5
|
.DeclinedDeletionText: ; 0x2c5e5
|
||||||
; No? Come visit me again.
|
; No? Come visit me again.
|
||||||
text_jump UnknownText_0x1c5f36
|
text_jump UnknownText_0x1c5f36
|
||||||
db "@"
|
db "@"
|
||||||
; 0x2c5ea
|
; 0x2c5ea
|
||||||
|
|
||||||
UnknownText_0x2c5ea: ; 0x2c5ea
|
.AskWhichMoveText: ; 0x2c5ea
|
||||||
; Which move should it forget, then?
|
; Which move should it forget, then?
|
||||||
text_jump UnknownText_0x1c5f50
|
text_jump UnknownText_0x1c5f50
|
||||||
db "@"
|
db "@"
|
||||||
; 0x2c5ef
|
; 0x2c5ef
|
||||||
|
|
||||||
UnknownText_0x2c5ef: ; 0x2c5ef
|
.IntroText: ; 0x2c5ef
|
||||||
; Um… Oh, yes, I'm the MOVE DELETER. I can make #MON forget moves. Shall I make a #MON forget?
|
; Um… Oh, yes, I'm the MOVE DELETER. I can make #MON forget moves. Shall I make a #MON forget?
|
||||||
text_jump UnknownText_0x1c5f74
|
text_jump UnknownText_0x1c5f74
|
||||||
db "@"
|
db "@"
|
||||||
; 0x2c5f4
|
; 0x2c5f4
|
||||||
|
|
||||||
UnknownText_0x2c5f4: ; 0x2c5f4
|
.AskWhichMonText: ; 0x2c5f4
|
||||||
; Which #MON?
|
; Which #MON?
|
||||||
text_jump UnknownText_0x1c5fd1
|
text_jump UnknownText_0x1c5fd1
|
||||||
db "@"
|
db "@"
|
||||||
; 0x2c5f9
|
; 0x2c5f9
|
||||||
|
|
||||||
Function2c5f9: ; 2c5f9
|
.DeleteMove: ; 2c5f9
|
||||||
ld a, b
|
ld a, b
|
||||||
push bc
|
push bc
|
||||||
dec a
|
dec a
|
||||||
@ -121,18 +121,18 @@ Function2c5f9: ; 2c5f9
|
|||||||
pop bc
|
pop bc
|
||||||
push bc
|
push bc
|
||||||
inc b
|
inc b
|
||||||
.asm_2c60f
|
.loop
|
||||||
ld a, b
|
ld a, b
|
||||||
cp NUM_MOVES + 1
|
cp NUM_MOVES + 1
|
||||||
jr z, .asm_2c61b
|
jr z, .okay
|
||||||
inc hl
|
inc hl
|
||||||
ld a, [hld]
|
ld a, [hld]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
inc hl
|
inc hl
|
||||||
inc b
|
inc b
|
||||||
jr .asm_2c60f
|
jr .loop
|
||||||
|
|
||||||
.asm_2c61b
|
.okay
|
||||||
xor a
|
xor a
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
pop bc
|
pop bc
|
||||||
@ -149,18 +149,18 @@ Function2c5f9: ; 2c5f9
|
|||||||
call AddNTimes
|
call AddNTimes
|
||||||
pop bc
|
pop bc
|
||||||
inc b
|
inc b
|
||||||
.asm_2c633
|
.loop2
|
||||||
ld a, b
|
ld a, b
|
||||||
cp NUM_MOVES + 1
|
cp NUM_MOVES + 1
|
||||||
jr z, .asm_2c63f
|
jr z, .done
|
||||||
inc hl
|
inc hl
|
||||||
ld a, [hld]
|
ld a, [hld]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
inc hl
|
inc hl
|
||||||
inc b
|
inc b
|
||||||
jr .asm_2c633
|
jr .loop2
|
||||||
|
|
||||||
.asm_2c63f
|
.done
|
||||||
xor a
|
xor a
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ret
|
ret
|
||||||
|
@ -50,7 +50,7 @@ UnownPrinter: ; 16be4
|
|||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [wJumptableIndex], a
|
ld [wJumptableIndex], a
|
||||||
call Function16cc8
|
call .UpdateUnownFrontpic
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
|
|
||||||
ld a, UNOWN
|
ld a, UNOWN
|
||||||
@ -74,7 +74,7 @@ UnownPrinter: ; 16be4
|
|||||||
and A_BUTTON
|
and A_BUTTON
|
||||||
jr nz, .pressed_a
|
jr nz, .pressed_a
|
||||||
|
|
||||||
call Function16ca0
|
call .LeftRight
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
jr .joy_loop
|
jr .joy_loop
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ UnownPrinter: ; 16be4
|
|||||||
ret
|
ret
|
||||||
; 16ca0
|
; 16ca0
|
||||||
|
|
||||||
Function16ca0: ; 16ca0
|
.LeftRight: ; 16ca0
|
||||||
ld a, [hJoyLast]
|
ld a, [hJoyLast]
|
||||||
and D_RIGHT
|
and D_RIGHT
|
||||||
jr nz, .press_right
|
jr nz, .press_right
|
||||||
@ -110,8 +110,7 @@ Function16ca0: ; 16ca0
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
jr nz, .wrap_around_left
|
jr nz, .wrap_around_left
|
||||||
ld [hl], $1b
|
ld [hl], 26 + 1
|
||||||
|
|
||||||
.wrap_around_left
|
.wrap_around_left
|
||||||
dec [hl]
|
dec [hl]
|
||||||
jr .return
|
jr .return
|
||||||
@ -119,19 +118,18 @@ Function16ca0: ; 16ca0
|
|||||||
.press_right
|
.press_right
|
||||||
ld hl, wJumptableIndex
|
ld hl, wJumptableIndex
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp $1a
|
cp 26
|
||||||
jr c, .wrap_around_right
|
jr c, .wrap_around_right
|
||||||
ld [hl], $ff
|
ld [hl], -1
|
||||||
|
|
||||||
.wrap_around_right
|
.wrap_around_right
|
||||||
inc [hl]
|
inc [hl]
|
||||||
|
|
||||||
.return
|
.return
|
||||||
call Function16cc8
|
call .UpdateUnownFrontpic
|
||||||
ret
|
ret
|
||||||
; 16cc8
|
; 16cc8
|
||||||
|
|
||||||
Function16cc8: ; 16cc8
|
.UpdateUnownFrontpic: ; 16cc8
|
||||||
ld a, [wJumptableIndex]
|
ld a, [wJumptableIndex]
|
||||||
cp 26
|
cp 26
|
||||||
jr z, Function16d20
|
jr z, Function16d20
|
||||||
@ -140,7 +138,7 @@ Function16cc8: ; 16cc8
|
|||||||
ld a, UNOWN
|
ld a, UNOWN
|
||||||
ld [CurPartySpecies], a
|
ld [CurPartySpecies], a
|
||||||
xor a
|
xor a
|
||||||
ld [wc2c6], a
|
ld [wBoxAlignment], a
|
||||||
ld de, VTiles2
|
ld de, VTiles2
|
||||||
predef GetFrontpic
|
predef GetFrontpic
|
||||||
call Function16cff
|
call Function16cff
|
||||||
@ -162,7 +160,7 @@ Function16cff: ; 16cff
|
|||||||
|
|
||||||
ld a, BANK(sScratch)
|
ld a, BANK(sScratch)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
ld hl, sScratch
|
ld hl, sScratch
|
||||||
ld a, [hROMBank]
|
ld a, [hROMBank]
|
||||||
ld b, a
|
ld b, a
|
||||||
|
@ -663,7 +663,7 @@ Functiond03cd: ; d03cd
|
|||||||
ld a, [w2_d186]
|
ld a, [w2_d186]
|
||||||
ld bc, SCREEN_WIDTH
|
ld bc, SCREEN_WIDTH
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld a, [wc2c6]
|
ld a, [wBoxAlignment]
|
||||||
and a
|
and a
|
||||||
jr nz, .go
|
jr nz, .go
|
||||||
ld a, [w2_d185]
|
ld a, [w2_d185]
|
||||||
@ -786,7 +786,7 @@ Functiond046c: ; d046c
|
|||||||
ld bc, 45
|
ld bc, 45
|
||||||
.okay
|
.okay
|
||||||
|
|
||||||
ld a, [wc2c6]
|
ld a, [wBoxAlignment]
|
||||||
and a
|
and a
|
||||||
jr nz, .add_bc
|
jr nz, .add_bc
|
||||||
add hl, de
|
add hl, de
|
||||||
@ -824,7 +824,7 @@ Functiond0499: ; d0499
|
|||||||
|
|
||||||
Functiond04bd: ; d04bd
|
Functiond04bd: ; d04bd
|
||||||
call Functiond04f6
|
call Functiond04f6
|
||||||
ld a, [wc2c6]
|
ld a, [wBoxAlignment]
|
||||||
and a
|
and a
|
||||||
jr nz, .minus_one_and_six
|
jr nz, .minus_one_and_six
|
||||||
ld de, 1
|
ld de, 1
|
||||||
@ -1117,7 +1117,7 @@ PokeAnim_GetSpeciesOrUnown: ; d065c
|
|||||||
|
|
||||||
Functiond0669: ; d0669
|
Functiond0669: ; d0669
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wc2c6], a
|
ld [wBoxAlignment], a
|
||||||
|
|
||||||
Functiond066e: ; d066e
|
Functiond066e: ; d066e
|
||||||
call AnimateMon_CheckIfPokemon
|
call AnimateMon_CheckIfPokemon
|
||||||
@ -1134,12 +1134,12 @@ Functiond066e: ; d066e
|
|||||||
ld e, c
|
ld e, c
|
||||||
call AnimateFrontpic
|
call AnimateFrontpic
|
||||||
xor a
|
xor a
|
||||||
ld [wc2c6], a
|
ld [wBoxAlignment], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_d068c
|
.asm_d068c
|
||||||
xor a
|
xor a
|
||||||
ld [wc2c6], a
|
ld [wBoxAlignment], a
|
||||||
inc a
|
inc a
|
||||||
ld [CurPartySpecies], a
|
ld [CurPartySpecies], a
|
||||||
ret
|
ret
|
||||||
|
10
home.asm
10
home.asm
@ -1714,7 +1714,7 @@ DrawBattleHPBar:: ; 3750
|
|||||||
|
|
||||||
PrepMonFrontpic:: ; 3786
|
PrepMonFrontpic:: ; 3786
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wc2c6], a
|
ld [wBoxAlignment], a
|
||||||
|
|
||||||
_PrepMonFrontpic:: ; 378b
|
_PrepMonFrontpic:: ; 378b
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
@ -1730,12 +1730,12 @@ _PrepMonFrontpic:: ; 378b
|
|||||||
lb bc, 7, 7
|
lb bc, 7, 7
|
||||||
predef FillBox
|
predef FillBox
|
||||||
xor a
|
xor a
|
||||||
ld [wc2c6], a
|
ld [wBoxAlignment], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.not_pokemon
|
.not_pokemon
|
||||||
xor a
|
xor a
|
||||||
ld [wc2c6], a
|
ld [wBoxAlignment], a
|
||||||
inc a
|
inc a
|
||||||
ld [CurPartySpecies], a
|
ld [CurPartySpecies], a
|
||||||
ret
|
ret
|
||||||
@ -2192,7 +2192,7 @@ Function3f7c:: ; 3f7c
|
|||||||
; 3f88
|
; 3f88
|
||||||
|
|
||||||
Function3f88:: ; 3f88
|
Function3f88:: ; 3f88
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
ld b, $0
|
ld b, $0
|
||||||
.asm_3f8d
|
.asm_3f8d
|
||||||
push bc
|
push bc
|
||||||
@ -2213,7 +2213,7 @@ Function3f88:: ; 3f88
|
|||||||
; 3f9f
|
; 3f9f
|
||||||
|
|
||||||
Function3f9f:: ; 3f9f
|
Function3f9f:: ; 3f9f
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
.asm_3fa2
|
.asm_3fa2
|
||||||
push bc
|
push bc
|
||||||
ld c, $8
|
ld c, $8
|
||||||
|
@ -1405,10 +1405,10 @@ LoadTileset:: ; 2821
|
|||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
|
|
||||||
ld a, e
|
ld a, e
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
call FarDecompress
|
call FarDecompress
|
||||||
|
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
ld de, VTiles2
|
ld de, VTiles2
|
||||||
ld bc, $60 tiles
|
ld bc, $60 tiles
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
@ -489,14 +489,14 @@ endr
|
|||||||
ret
|
ret
|
||||||
; 1fbf
|
; 1fbf
|
||||||
|
|
||||||
ResetTextRelatedRAM:: ; 1fbf
|
ClearWindowData:: ; 1fbf
|
||||||
ld hl, wWindowStackPointer
|
ld hl, wWindowStackPointer
|
||||||
call .bytefill
|
call .bytefill
|
||||||
ld hl, wMenuDataHeader
|
ld hl, wMenuDataHeader
|
||||||
call .bytefill
|
call .bytefill
|
||||||
ld hl, wMenuData2Flags
|
ld hl, wMenuData2Flags
|
||||||
call .bytefill
|
call .bytefill
|
||||||
ld hl, wcfa1
|
ld hl, w2DMenuCursorInitY
|
||||||
call .bytefill
|
call .bytefill
|
||||||
|
|
||||||
ld a, [rSVBK]
|
ld a, [rSVBK]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
ResetWindow:: ; 2dba
|
ResetWindow:: ; 2dba
|
||||||
|
|
||||||
call ResetTextRelatedRAM
|
call ClearWindowData
|
||||||
ld a, [hROMBank]
|
ld a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
ld a, BANK(Function6454) ; and BANK(Function64bf)
|
ld a, BANK(Function6454) ; and BANK(Function64bf)
|
||||||
@ -32,7 +32,7 @@ CloseText:: ; 2dcf
|
|||||||
; 2de2
|
; 2de2
|
||||||
|
|
||||||
.CloseText ; 2de2
|
.CloseText ; 2de2
|
||||||
call ResetTextRelatedRAM
|
call ClearWindowData
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
call OverworldTextModeSwitch
|
call OverworldTextModeSwitch
|
||||||
@ -49,7 +49,7 @@ CloseText:: ; 2dcf
|
|||||||
; 2e08
|
; 2e08
|
||||||
|
|
||||||
OpenText:: ; 2e08
|
OpenText:: ; 2e08
|
||||||
call ResetTextRelatedRAM
|
call ClearWindowData
|
||||||
ld a, [hROMBank]
|
ld a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
ld a, BANK(Function6454) ; and BANK(Function64bf)
|
ld a, BANK(Function6454) ; and BANK(Function64bf)
|
||||||
|
106
main.asm
106
main.asm
@ -146,12 +146,12 @@ Function64db: ; 64db
|
|||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
|
|
||||||
ld a, $60
|
ld a, $60
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
lb bc, 4, 0
|
ld bc, wBackupAttrMap - wDecompressScratch
|
||||||
call ByteFill
|
call ByteFill
|
||||||
ld a, wBackupTilemap / $100
|
ld a, wDecompressScratch / $100
|
||||||
ld [rHDMA1], a
|
ld [rHDMA1], a
|
||||||
ld a, wBackupTilemap % $100
|
ld a, wDecompressScratch % $100
|
||||||
ld [rHDMA2], a
|
ld [rHDMA2], a
|
||||||
ld a, (VBGMap0 % $8000) / $100
|
ld a, (VBGMap0 % $8000) / $100
|
||||||
ld [rHDMA3], a
|
ld [rHDMA3], a
|
||||||
@ -9173,7 +9173,7 @@ endr
|
|||||||
|
|
||||||
callab ResetEnemyStatLevels
|
callab ResetEnemyStatLevels
|
||||||
|
|
||||||
call ResetTextRelatedRAM
|
call ClearWindowData
|
||||||
|
|
||||||
ld hl, hBGMapAddress
|
ld hl, hBGMapAddress
|
||||||
xor a
|
xor a
|
||||||
@ -9183,13 +9183,13 @@ endr
|
|||||||
; 2ef6e
|
; 2ef6e
|
||||||
|
|
||||||
FillBox: ; 2ef6e
|
FillBox: ; 2ef6e
|
||||||
; Fill wc2c6-aligned box width b height c
|
; Fill wBoxAlignment-aligned box width b height c
|
||||||
; with iterating tile starting from hFillBox at hl.
|
; with iterating tile starting from hFillBox at hl.
|
||||||
; Predef $13
|
; Predef $13
|
||||||
|
|
||||||
ld de, SCREEN_WIDTH
|
ld de, SCREEN_WIDTH
|
||||||
|
|
||||||
ld a, [wc2c6]
|
ld a, [wBoxAlignment]
|
||||||
and a
|
and a
|
||||||
jr nz, .right
|
jr nz, .right
|
||||||
|
|
||||||
@ -11616,12 +11616,12 @@ Function4e906: ; 4e906
|
|||||||
push af
|
push af
|
||||||
ld a, $6
|
ld a, $6
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
ld bc, wBackupAttrMap - wBackupTilemap
|
ld bc, wBackupAttrMap - wDecompressScratch
|
||||||
ld a, " "
|
ld a, " "
|
||||||
call ByteFill
|
call ByteFill
|
||||||
hlbgcoord 0, 0
|
hlbgcoord 0, 0
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
ld b, $0
|
ld b, $0
|
||||||
ld c, $40
|
ld c, $40
|
||||||
call Request2bpp
|
call Request2bpp
|
||||||
@ -13028,15 +13028,15 @@ _GetFrontpic: ; 510a5
|
|||||||
ld a, $6
|
ld a, $6
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
ld a, b
|
ld a, b
|
||||||
ld de, wBackupTilemap + $800
|
ld de, wDecompressScratch + $800
|
||||||
call FarDecompress
|
call FarDecompress
|
||||||
pop bc
|
pop bc
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
ld de, wBackupTilemap + $800
|
ld de, wDecompressScratch + $800
|
||||||
call Function512ab
|
call Function512ab
|
||||||
pop hl
|
pop hl
|
||||||
push hl
|
push hl
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
ld c, 7 * 7
|
ld c, 7 * 7
|
||||||
ld a, [hROMBank]
|
ld a, [hROMBank]
|
||||||
ld b, a
|
ld b, a
|
||||||
@ -13079,7 +13079,7 @@ Function51103: ; 51103
|
|||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
push hl
|
push hl
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
ld c, 7 * 7
|
ld c, 7 * 7
|
||||||
ld a, [hROMBank]
|
ld a, [hROMBank]
|
||||||
ld b, a
|
ld b, a
|
||||||
@ -13110,7 +13110,7 @@ Function51103: ; 51103
|
|||||||
call Function5114f
|
call Function5114f
|
||||||
pop bc
|
pop bc
|
||||||
pop hl
|
pop hl
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
ld a, [hROMBank]
|
ld a, [hROMBank]
|
||||||
ld b, a
|
ld b, a
|
||||||
call Get2bpp
|
call Get2bpp
|
||||||
@ -13120,7 +13120,7 @@ Function51103: ; 51103
|
|||||||
; 5114f
|
; 5114f
|
||||||
|
|
||||||
Function5114f: ; 5114f
|
Function5114f: ; 5114f
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
swap c
|
swap c
|
||||||
ld a, c
|
ld a, c
|
||||||
and $f
|
and $f
|
||||||
@ -13129,12 +13129,12 @@ Function5114f: ; 5114f
|
|||||||
and $f0
|
and $f0
|
||||||
ld c, a
|
ld c, a
|
||||||
push bc
|
push bc
|
||||||
call Function512f2
|
call LoadFrontpic
|
||||||
pop bc
|
pop bc
|
||||||
.asm_51161
|
.asm_51161
|
||||||
push bc
|
push bc
|
||||||
ld c, $0
|
ld c, $0
|
||||||
call Function512f2
|
call LoadFrontpic
|
||||||
pop bc
|
pop bc
|
||||||
dec b
|
dec b
|
||||||
jr nz, .asm_51161
|
jr nz, .asm_51161
|
||||||
@ -13179,14 +13179,14 @@ GetBackpic: ; 5116c
|
|||||||
inc hl
|
inc hl
|
||||||
ld a, d
|
ld a, d
|
||||||
call GetFarHalfword
|
call GetFarHalfword
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
pop af
|
pop af
|
||||||
call FarDecompress
|
call FarDecompress
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
ld c, 6 * 6
|
ld c, 6 * 6
|
||||||
call Function5127c
|
call FixBackpicAlignment
|
||||||
pop hl
|
pop hl
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
ld a, [hROMBank]
|
ld a, [hROMBank]
|
||||||
ld b, a
|
ld b, a
|
||||||
call Get2bpp
|
call Get2bpp
|
||||||
@ -13283,10 +13283,10 @@ GetTrainerPic: ; 5120d
|
|||||||
ld a, BANK(TrainerPicPointers)
|
ld a, BANK(TrainerPicPointers)
|
||||||
call GetFarHalfword
|
call GetFarHalfword
|
||||||
pop af
|
pop af
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
call FarDecompress
|
call FarDecompress
|
||||||
pop hl
|
pop hl
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
ld c, 7 * 7
|
ld c, 7 * 7
|
||||||
ld a, [hROMBank]
|
ld a, [hROMBank]
|
||||||
ld b, a
|
ld b, a
|
||||||
@ -13310,10 +13310,10 @@ DecompressPredef: ; 5125d
|
|||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
ld a, b
|
ld a, b
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
call FarDecompress
|
call FarDecompress
|
||||||
pop bc
|
pop bc
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
pop hl
|
pop hl
|
||||||
ld a, [hROMBank]
|
ld a, [hROMBank]
|
||||||
ld b, a
|
ld b, a
|
||||||
@ -13324,12 +13324,12 @@ DecompressPredef: ; 5125d
|
|||||||
ret
|
ret
|
||||||
; 5127c
|
; 5127c
|
||||||
|
|
||||||
Function5127c: ; 5127c
|
FixBackpicAlignment: ; 5127c
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
ld a, [wc2c6]
|
ld a, [wBoxAlignment]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_512a8
|
jr z, .keep_dims
|
||||||
ld a, c
|
ld a, c
|
||||||
cp 7 * 7
|
cp 7 * 7
|
||||||
ld de, 7 * 7 tiles
|
ld de, 7 * 7 tiles
|
||||||
@ -13355,7 +13355,7 @@ Function5127c: ; 5127c
|
|||||||
or d
|
or d
|
||||||
jr nz, .got_dims
|
jr nz, .got_dims
|
||||||
|
|
||||||
.asm_512a8
|
.keep_dims
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
ret
|
ret
|
||||||
@ -13368,39 +13368,39 @@ Function512ab: ; 512ab
|
|||||||
cp 5
|
cp 5
|
||||||
jr z, .five
|
jr z, .five
|
||||||
|
|
||||||
.seven
|
.seven_loop
|
||||||
ld c, $70
|
ld c, $70
|
||||||
call Function512f2
|
call LoadFrontpic
|
||||||
dec b
|
dec b
|
||||||
jr nz, .seven
|
jr nz, .seven_loop
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.six
|
.six
|
||||||
ld c, $70
|
ld c, $70
|
||||||
xor a
|
xor a
|
||||||
call .Fill
|
call .Fill
|
||||||
.asm_512c3
|
.six_loop
|
||||||
ld c, $10
|
ld c, $10
|
||||||
xor a
|
xor a
|
||||||
call .Fill
|
call .Fill
|
||||||
ld c, $60
|
ld c, $60
|
||||||
call Function512f2
|
call LoadFrontpic
|
||||||
dec b
|
dec b
|
||||||
jr nz, .asm_512c3
|
jr nz, .six_loop
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.five
|
.five
|
||||||
ld c, $70
|
ld c, $70
|
||||||
xor a
|
xor a
|
||||||
call .Fill
|
call .Fill
|
||||||
.asm_512d8
|
.five_loop
|
||||||
ld c, $20
|
ld c, $20
|
||||||
xor a
|
xor a
|
||||||
call .Fill
|
call .Fill
|
||||||
ld c, $50
|
ld c, $50
|
||||||
call Function512f2
|
call LoadFrontpic
|
||||||
dec b
|
dec b
|
||||||
jr nz, .asm_512d8
|
jr nz, .five_loop
|
||||||
ld c, $70
|
ld c, $70
|
||||||
xor a
|
xor a
|
||||||
call .Fill
|
call .Fill
|
||||||
@ -13413,21 +13413,21 @@ Function512ab: ; 512ab
|
|||||||
ret
|
ret
|
||||||
; 512f2
|
; 512f2
|
||||||
|
|
||||||
Function512f2: ; 512f2
|
LoadFrontpic: ; 512f2
|
||||||
ld a, [wc2c6]
|
ld a, [wBoxAlignment]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_512ff
|
jr nz, .x_flip
|
||||||
.asm_512f8
|
.left_loop
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
inc de
|
inc de
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
dec c
|
dec c
|
||||||
jr nz, .asm_512f8
|
jr nz, .left_loop
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_512ff
|
.x_flip
|
||||||
push bc
|
push bc
|
||||||
.asm_51300
|
.right_loop
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
inc de
|
inc de
|
||||||
ld b, a
|
ld b, a
|
||||||
@ -13438,7 +13438,7 @@ Function512f2: ; 512f2
|
|||||||
endr
|
endr
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
dec c
|
dec c
|
||||||
jr nz, .asm_51300
|
jr nz, .right_loop
|
||||||
pop bc
|
pop bc
|
||||||
ret
|
ret
|
||||||
; 51322
|
; 51322
|
||||||
@ -13453,14 +13453,14 @@ Function51322: ; 51322
|
|||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
ld hl, sBoxMonNicknames
|
ld hl, sBoxMonNicknames
|
||||||
ld bc, PKMN_NAME_LENGTH
|
ld bc, PKMN_NAME_LENGTH
|
||||||
ld de, wd002
|
ld de, wBufferMonNick
|
||||||
call Function513e0
|
call Function513e0
|
||||||
ld a, [sBoxCount]
|
ld a, [sBoxCount]
|
||||||
dec a
|
dec a
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
ld hl, sBoxMonOT
|
ld hl, sBoxMonOT
|
||||||
ld bc, NAME_LENGTH
|
ld bc, NAME_LENGTH
|
||||||
ld de, wd00d
|
ld de, wBufferMonOT
|
||||||
call Function513e0
|
call Function513e0
|
||||||
ld a, [sBoxCount]
|
ld a, [sBoxCount]
|
||||||
dec a
|
dec a
|
||||||
@ -13491,14 +13491,14 @@ Function5138b: ; 5138b
|
|||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
ld hl, PartyMonNicknames
|
ld hl, PartyMonNicknames
|
||||||
ld bc, PKMN_NAME_LENGTH
|
ld bc, PKMN_NAME_LENGTH
|
||||||
ld de, wd002
|
ld de, wBufferMonNick
|
||||||
call Function513e0
|
call Function513e0
|
||||||
ld a, [PartyCount]
|
ld a, [PartyCount]
|
||||||
dec a
|
dec a
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
ld hl, PartyMonOT
|
ld hl, PartyMonOT
|
||||||
ld bc, NAME_LENGTH
|
ld bc, NAME_LENGTH
|
||||||
ld de, wd00d
|
ld de, wBufferMonOT
|
||||||
call Function513e0
|
call Function513e0
|
||||||
ld a, [PartyCount]
|
ld a, [PartyCount]
|
||||||
dec a
|
dec a
|
||||||
@ -15208,7 +15208,7 @@ endr
|
|||||||
|
|
||||||
.Decompress: ; e0057
|
.Decompress: ; e0057
|
||||||
ld hl, wd012
|
ld hl, wd012
|
||||||
ld e, $80
|
ld e, %10000000
|
||||||
ld d, 8
|
ld d, 8
|
||||||
.loop_decompress
|
.loop_decompress
|
||||||
push hl
|
push hl
|
||||||
|
@ -8,11 +8,11 @@ Function104006: ; 104006
|
|||||||
ld hl, wBackupAttrMap
|
ld hl, wBackupAttrMap
|
||||||
call CutAndPasteAttrMap
|
call CutAndPasteAttrMap
|
||||||
decoord 0, 0
|
decoord 0, 0
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
call CutAndPasteTilemap
|
call CutAndPasteTilemap
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
call Function10419d
|
call Function10419d
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
@ -28,11 +28,11 @@ Function10402d:: ; 10402d
|
|||||||
|
|
||||||
Function104033: ; 104033
|
Function104033: ; 104033
|
||||||
decoord 0, 0
|
decoord 0, 0
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
call CutAndPasteTilemap
|
call CutAndPasteTilemap
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
call Function10419d
|
call Function10419d
|
||||||
ret
|
ret
|
||||||
; 104047
|
; 104047
|
||||||
@ -63,7 +63,7 @@ Function104067: ; 104067
|
|||||||
ld hl, wBackupAttrMap
|
ld hl, wBackupAttrMap
|
||||||
call CutAndPasteAttrMap
|
call CutAndPasteAttrMap
|
||||||
decoord 0, 0
|
decoord 0, 0
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
call CutAndPasteTilemap
|
call CutAndPasteTilemap
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
di
|
di
|
||||||
@ -75,7 +75,7 @@ Function104067: ; 104067
|
|||||||
call Function1041ad
|
call Function1041ad
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
call Function1041ad
|
call Function1041ad
|
||||||
pop af
|
pop af
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
@ -93,7 +93,7 @@ Function1040a2: ; 1040a2
|
|||||||
ld hl, wBackupAttrMap
|
ld hl, wBackupAttrMap
|
||||||
call CutAndPasteAttrMap
|
call CutAndPasteAttrMap
|
||||||
decoord 0, 0
|
decoord 0, 0
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
call CutAndPasteTilemap
|
call CutAndPasteTilemap
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
di
|
di
|
||||||
@ -105,7 +105,7 @@ Function1040a2: ; 1040a2
|
|||||||
call Function1041c1
|
call Function1041c1
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
call Function1041c1
|
call Function1041c1
|
||||||
pop af
|
pop af
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
@ -164,7 +164,7 @@ Function104116: ; 104116
|
|||||||
ld hl, wBackupAttrMap
|
ld hl, wBackupAttrMap
|
||||||
call CutAndPasteAttrMap
|
call CutAndPasteAttrMap
|
||||||
decoord 0, 0
|
decoord 0, 0
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
call CutAndPasteTilemap
|
call CutAndPasteTilemap
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
|
|
||||||
@ -177,7 +177,7 @@ Function104116: ; 104116
|
|||||||
call Function1041b7
|
call Function1041b7
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
call Function1041b7
|
call Function1041b7
|
||||||
pop af
|
pop af
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
@ -196,7 +196,7 @@ Function10414e: ; 10414e
|
|||||||
call CutAndPasteAttrMap
|
call CutAndPasteAttrMap
|
||||||
ld c, $ff
|
ld c, $ff
|
||||||
decoord 0, 0
|
decoord 0, 0
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
call CutAndPasteMap
|
call CutAndPasteMap
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
@ -204,7 +204,7 @@ Function10414e: ; 10414e
|
|||||||
call Function1041ad
|
call Function1041ad
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
call Function1041ad
|
call Function1041ad
|
||||||
ret
|
ret
|
||||||
; 104177
|
; 104177
|
||||||
@ -450,7 +450,7 @@ _Get2bpp:: ; 104284
|
|||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
|
|
||||||
; Copy c tiles of the 2bpp from b:de to wBackupTilemap
|
; Copy c tiles of the 2bpp from b:de to wDecompressScratch
|
||||||
ld a, b ; bank
|
ld a, b ; bank
|
||||||
ld l, c ; number of tiles
|
ld l, c ; number of tiles
|
||||||
ld h, $0
|
ld h, $0
|
||||||
@ -461,7 +461,7 @@ endr
|
|||||||
ld c, l
|
ld c, l
|
||||||
ld h, d ; address
|
ld h, d ; address
|
||||||
ld l, e
|
ld l, e
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
call FarCopyBytes
|
call FarCopyBytes
|
||||||
|
|
||||||
pop hl
|
pop hl
|
||||||
@ -473,7 +473,7 @@ endr
|
|||||||
|
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
call Function104209
|
call Function104209
|
||||||
|
|
||||||
; restore the previous bank
|
; restore the previous bank
|
||||||
@ -528,7 +528,7 @@ endr
|
|||||||
ld b, h
|
ld b, h
|
||||||
ld h, d
|
ld h, d
|
||||||
ld l, e
|
ld l, e
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
call FarCopyBytesDouble_DoubleBankSwitch
|
call FarCopyBytesDouble_DoubleBankSwitch
|
||||||
|
|
||||||
pop hl
|
pop hl
|
||||||
@ -540,7 +540,7 @@ endr
|
|||||||
|
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
call Function104209
|
call Function104209
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
@ -554,22 +554,22 @@ Function104303: ; 104303
|
|||||||
; 104309
|
; 104309
|
||||||
|
|
||||||
Function104309:
|
Function104309:
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
decoord 0, 0
|
decoord 0, 0
|
||||||
call Function10433a
|
call Function10433a
|
||||||
ld hl, wBackupTilemap + $80
|
ld hl, wDecompressScratch + $80
|
||||||
decoord 0, 0, AttrMap
|
decoord 0, 0, AttrMap
|
||||||
call Function10433a
|
call Function10433a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld c, $8
|
ld c, $8
|
||||||
ld hl, wBackupTilemap + $80
|
ld hl, wDecompressScratch + $80
|
||||||
debgcoord 0, 0, VBGMap1
|
debgcoord 0, 0, VBGMap1
|
||||||
call Function104209
|
call Function104209
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
ld c, $8
|
ld c, $8
|
||||||
ld hl, wBackupTilemap
|
ld hl, wDecompressScratch
|
||||||
debgcoord 0, 0, VBGMap1
|
debgcoord 0, 0, VBGMap1
|
||||||
call Function104209
|
call Function104209
|
||||||
ret
|
ret
|
||||||
|
@ -687,7 +687,7 @@ Function48689: ; 48689 (12:4689)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Function486bf: ; 486bf (12:46bf)
|
Function486bf: ; 486bf (12:46bf)
|
||||||
ld hl, wcfa1
|
ld hl, w2DMenuCursorInitY
|
||||||
ld a, [wd002]
|
ld a, [wd002]
|
||||||
bit 6, a
|
bit 6, a
|
||||||
jr nz, .asm_486ce
|
jr nz, .asm_486ce
|
||||||
@ -772,7 +772,7 @@ Function48725: ; 48725 (12:4725)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Function4873c: ; 4873c (12:473c)
|
Function4873c: ; 4873c (12:473c)
|
||||||
ld hl, wcfa1
|
ld hl, w2DMenuCursorInitY
|
||||||
ld a, $4
|
ld a, $4
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $c
|
ld a, $c
|
||||||
@ -1217,9 +1217,9 @@ Function48a3a: ; 48a3a (12:4a3a)
|
|||||||
call LoadMenuDataHeader
|
call LoadMenuDataHeader
|
||||||
call Function4873c
|
call Function4873c
|
||||||
ld a, $a
|
ld a, $a
|
||||||
ld [wcfa1], a
|
ld [w2DMenuCursorInitY], a
|
||||||
ld a, $b
|
ld a, $b
|
||||||
ld [wcfa2], a
|
ld [w2DMenuCursorInitX], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wMenuCursorY], a
|
ld [wMenuCursorY], a
|
||||||
hlcoord 10, 8
|
hlcoord 10, 8
|
||||||
@ -1605,7 +1605,8 @@ Function48c63: ; 48c63
|
|||||||
; 48c8e
|
; 48c8e
|
||||||
|
|
||||||
Function48c8e: ; 48c8e
|
Function48c8e: ; 48c8e
|
||||||
ld hl, wd02a
|
; unreferenced
|
||||||
|
ld hl, $d02a
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
callba Function48c63
|
callba Function48c63
|
||||||
|
@ -488,11 +488,11 @@ Function4ab06: ; 4ab06
|
|||||||
Function4ab1a: ; 4ab1a
|
Function4ab1a: ; 4ab1a
|
||||||
.asm_4ab1a
|
.asm_4ab1a
|
||||||
ld a, $fb
|
ld a, $fb
|
||||||
ld [wcfa8], a
|
ld [w2DMenuFlags4], a
|
||||||
ld a, $26
|
ld a, $26
|
||||||
ld [wcfa7], a
|
ld [w2DMenuFlags3], a
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ld [wcfa4], a
|
ld [w2DMenuNumCols], a
|
||||||
call Function4adf7
|
call Function4adf7
|
||||||
call StaticMenuJoypad
|
call StaticMenuJoypad
|
||||||
call Function4abc3
|
call Function4abc3
|
||||||
@ -748,7 +748,7 @@ Function4acaa: ; 4acaa
|
|||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorBuffer], a
|
||||||
call InitVerticalMenuCursor
|
call InitVerticalMenuCursor
|
||||||
ld hl, wcfa5
|
ld hl, w2DMenuFlags1
|
||||||
set 6, [hl]
|
set 6, [hl]
|
||||||
call StaticMenuJoypad
|
call StaticMenuJoypad
|
||||||
ld de, SFX_READ_TEXT_2
|
ld de, SFX_READ_TEXT_2
|
||||||
|
@ -2200,7 +2200,7 @@ Function89d5e: ; 89d5e (22:5d5e)
|
|||||||
call Function8923c
|
call Function8923c
|
||||||
call PlaceVerticalMenuItems
|
call PlaceVerticalMenuItems
|
||||||
call InitVerticalMenuCursor
|
call InitVerticalMenuCursor
|
||||||
ld hl, wcfa5
|
ld hl, w2DMenuFlags1
|
||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -2242,7 +2242,7 @@ Function89dab: ; 89dab (22:5dab)
|
|||||||
callba MobileMenuJoypad
|
callba MobileMenuJoypad
|
||||||
call Function8923c
|
call Function8923c
|
||||||
ld a, c
|
ld a, c
|
||||||
ld hl, wcfa8
|
ld hl, w2DMenuFlags4
|
||||||
and [hl]
|
and [hl]
|
||||||
ret z
|
ret z
|
||||||
bit 0, a
|
bit 0, a
|
||||||
@ -2253,7 +2253,7 @@ Function89dab: ; 89dab (22:5dab)
|
|||||||
ret
|
ret
|
||||||
.asm_89dc7
|
.asm_89dc7
|
||||||
call PlayClickSFX
|
call PlayClickSFX
|
||||||
ld a, [wcfa3]
|
ld a, [w2DMenuNumRows]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wMenuCursorY]
|
ld a, [wMenuCursorY]
|
||||||
cp c
|
cp c
|
||||||
@ -2384,8 +2384,8 @@ Function89e9a: ; 89e9a (22:5e9a)
|
|||||||
ld a, $5
|
ld a, $5
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
ld hl, Palette_89eb1
|
ld hl, Palette_89eb1
|
||||||
ld de, wd028
|
ld de, UnknBGPals + 5 palettes
|
||||||
ld bc, $8
|
ld bc, 1 palettes
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
@ -3056,7 +3056,7 @@ Function8a31c: ; 8a31c (22:631c)
|
|||||||
ld [MenuSelection], a
|
ld [MenuSelection], a
|
||||||
call PlaceVerticalMenuItems
|
call PlaceVerticalMenuItems
|
||||||
call InitVerticalMenuCursor
|
call InitVerticalMenuCursor
|
||||||
ld hl, wcfa5
|
ld hl, w2DMenuFlags1
|
||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
.asm_8a34e
|
.asm_8a34e
|
||||||
call Function8a3a2
|
call Function8a3a2
|
||||||
@ -3088,7 +3088,7 @@ Function8a31c: ; 8a31c (22:631c)
|
|||||||
Function8a383: ; 8a383 (22:6383)
|
Function8a383: ; 8a383 (22:6383)
|
||||||
callba MobileMenuJoypad
|
callba MobileMenuJoypad
|
||||||
ld a, c
|
ld a, c
|
||||||
ld hl, wcfa8
|
ld hl, w2DMenuFlags4
|
||||||
and [hl]
|
and [hl]
|
||||||
ret z
|
ret z
|
||||||
bit 0, a
|
bit 0, a
|
||||||
|
@ -820,7 +820,7 @@ Function100513: ; 100513
|
|||||||
call Function3f7c
|
call Function3f7c
|
||||||
call PlaceVerticalMenuItems
|
call PlaceVerticalMenuItems
|
||||||
call InitVerticalMenuCursor
|
call InitVerticalMenuCursor
|
||||||
ld hl, wcfa5
|
ld hl, w2DMenuFlags1
|
||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
ret
|
ret
|
||||||
; 100522
|
; 100522
|
||||||
@ -860,7 +860,7 @@ Function100545: ; 100545
|
|||||||
Function10054d: ; 10054d
|
Function10054d: ; 10054d
|
||||||
callba MobileMenuJoypad
|
callba MobileMenuJoypad
|
||||||
ld a, c
|
ld a, c
|
||||||
ld hl, wcfa8
|
ld hl, w2DMenuFlags4
|
||||||
and [hl]
|
and [hl]
|
||||||
ret z
|
ret z
|
||||||
call MenuClickSound
|
call MenuClickSound
|
||||||
@ -1829,16 +1829,16 @@ Function100b45: ; 100b45
|
|||||||
call Function100e2d
|
call Function100e2d
|
||||||
pop bc
|
pop bc
|
||||||
jr c, .asm_100b6b
|
jr c, .asm_100b6b
|
||||||
ld a, [wcfa8]
|
ld a, [w2DMenuFlags4]
|
||||||
and c
|
and c
|
||||||
jr z, .asm_100b48
|
jr z, .asm_100b48
|
||||||
callba Mobile_GetMenuSelection
|
callba Mobile_GetMenuSelection
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_100b6b
|
.asm_100b6b
|
||||||
ld a, [wcfa4]
|
ld a, [w2DMenuNumCols]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wcfa3]
|
ld a, [w2DMenuNumRows]
|
||||||
call SimpleMultiply
|
call SimpleMultiply
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorBuffer], a
|
||||||
and a
|
and a
|
||||||
@ -1854,7 +1854,7 @@ Function100b7a: ; 100b7a
|
|||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
call ApplyTilemap
|
call ApplyTilemap
|
||||||
callba Init2DMenuCursorPosition
|
callba Init2DMenuCursorPosition
|
||||||
ld hl, wcfa5
|
ld hl, w2DMenuFlags1
|
||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
ret
|
ret
|
||||||
; 100b9f
|
; 100b9f
|
||||||
@ -1890,7 +1890,7 @@ Function100bc2: ; 100bc2
|
|||||||
call Function100e2d
|
call Function100e2d
|
||||||
pop bc
|
pop bc
|
||||||
jr c, .asm_100c25
|
jr c, .asm_100c25
|
||||||
ld a, [wcfa8]
|
ld a, [w2DMenuFlags4]
|
||||||
and c
|
and c
|
||||||
bit 6, a
|
bit 6, a
|
||||||
jp nz, .asm_100bff
|
jp nz, .asm_100bff
|
||||||
@ -1996,7 +1996,7 @@ Function100c98: ; 100c98
|
|||||||
call InitMenu3
|
call InitMenu3
|
||||||
ld a, [wNumMoves]
|
ld a, [wNumMoves]
|
||||||
inc a
|
inc a
|
||||||
ld [wcfa3], a
|
ld [w2DMenuNumRows], a
|
||||||
ld a, [CurMoveNum]
|
ld a, [CurMoveNum]
|
||||||
inc a
|
inc a
|
||||||
ld [wMenuCursorY], a
|
ld [wMenuCursorY], a
|
||||||
@ -2009,7 +2009,7 @@ Unknown_100cad: ; 100cad
|
|||||||
Function100cb5: ; 100cb5
|
Function100cb5: ; 100cb5
|
||||||
call Function100dd8
|
call Function100dd8
|
||||||
ret c
|
ret c
|
||||||
ld hl, wcfa5
|
ld hl, w2DMenuFlags1
|
||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
res 6, [hl]
|
res 6, [hl]
|
||||||
.asm_100cc0
|
.asm_100cc0
|
||||||
@ -2021,7 +2021,7 @@ Function100cb5: ; 100cb5
|
|||||||
call Function100dfd
|
call Function100dfd
|
||||||
pop bc
|
pop bc
|
||||||
jr c, .asm_100d17
|
jr c, .asm_100d17
|
||||||
ld a, [wcfa8]
|
ld a, [w2DMenuFlags4]
|
||||||
and c
|
and c
|
||||||
jr z, .asm_100cc0
|
jr z, .asm_100cc0
|
||||||
call PlaceHollowCursor
|
call PlaceHollowCursor
|
||||||
@ -2063,7 +2063,7 @@ MobileBattleMonMenu: ; 100d22
|
|||||||
call Function100dd8
|
call Function100dd8
|
||||||
ret c
|
ret c
|
||||||
call Function100d67
|
call Function100d67
|
||||||
ld hl, wcfa5
|
ld hl, w2DMenuFlags1
|
||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
res 6, [hl]
|
res 6, [hl]
|
||||||
.asm_100d30
|
.asm_100d30
|
||||||
@ -2075,7 +2075,7 @@ MobileBattleMonMenu: ; 100d22
|
|||||||
call Function100dfd
|
call Function100dfd
|
||||||
pop bc
|
pop bc
|
||||||
jr c, .asm_100d54
|
jr c, .asm_100d54
|
||||||
ld a, [wcfa8]
|
ld a, [w2DMenuFlags4]
|
||||||
and c
|
and c
|
||||||
jr nz, .asm_100d56
|
jr nz, .asm_100d56
|
||||||
jr .asm_100d30
|
jr .asm_100d30
|
||||||
@ -2111,7 +2111,7 @@ Function100d67: ; 100d67
|
|||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
call CopyMenuData2
|
call CopyMenuData2
|
||||||
call InitVerticalMenuCursor
|
call InitVerticalMenuCursor
|
||||||
ld hl, wcfa5
|
ld hl, w2DMenuFlags1
|
||||||
set 6, [hl]
|
set 6, [hl]
|
||||||
ret
|
ret
|
||||||
; 100d88
|
; 100d88
|
||||||
@ -5722,7 +5722,7 @@ Function1025ff: ; 1025ff
|
|||||||
callba Function1009f3
|
callba Function1009f3
|
||||||
ret c
|
ret c
|
||||||
callba MobileMenuJoypad
|
callba MobileMenuJoypad
|
||||||
ld a, [wcfa8]
|
ld a, [w2DMenuFlags4]
|
||||||
and c
|
and c
|
||||||
ret z
|
ret z
|
||||||
bit 0, c
|
bit 0, c
|
||||||
@ -5784,7 +5784,7 @@ Function10266b: ; 10266b
|
|||||||
callba Function1009f3
|
callba Function1009f3
|
||||||
ret c
|
ret c
|
||||||
callba MobileMenuJoypad
|
callba MobileMenuJoypad
|
||||||
ld a, [wcfa8]
|
ld a, [w2DMenuFlags4]
|
||||||
and c
|
and c
|
||||||
ret z
|
ret z
|
||||||
bit 0, c
|
bit 0, c
|
||||||
@ -6494,7 +6494,7 @@ Function102b4e: ; 102b4e
|
|||||||
pop af
|
pop af
|
||||||
ld [wMenuCursorY], a
|
ld [wMenuCursorY], a
|
||||||
ld a, [OTPartyCount]
|
ld a, [OTPartyCount]
|
||||||
ld [wcfa3], a
|
ld [w2DMenuNumRows], a
|
||||||
ret
|
ret
|
||||||
; 102b68
|
; 102b68
|
||||||
|
|
||||||
@ -6519,7 +6519,7 @@ Function102b7b: ; 102b7b
|
|||||||
pop af
|
pop af
|
||||||
ld [wMenuCursorY], a
|
ld [wMenuCursorY], a
|
||||||
ld a, [PartyCount]
|
ld a, [PartyCount]
|
||||||
ld [wcfa3], a
|
ld [w2DMenuNumRows], a
|
||||||
ret
|
ret
|
||||||
; 102b94
|
; 102b94
|
||||||
|
|
||||||
|
@ -1054,7 +1054,7 @@ Function1064d8: ; 1064d8
|
|||||||
jr asm_1064ed
|
jr asm_1064ed
|
||||||
|
|
||||||
asm_1064ed
|
asm_1064ed
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
ld b, $0
|
ld b, $0
|
||||||
ld a, [rSVBK]
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
|
@ -5662,7 +5662,7 @@ Function1161d5: ; 1161d5
|
|||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
|
|
||||||
ld hl, Unknown_117356
|
ld hl, Unknown_117356
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
ld bc, $0300
|
ld bc, $0300
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
|
@ -1084,7 +1084,7 @@ Function16d713: ; 16d713
|
|||||||
; 16d725
|
; 16d725
|
||||||
|
|
||||||
Function16d725: ; 16d725
|
Function16d725: ; 16d725
|
||||||
ld hl, wcfa6
|
ld hl, w2DMenuFlags2
|
||||||
res 7, [hl]
|
res 7, [hl]
|
||||||
ld a, [hBGMapMode]
|
ld a, [hBGMapMode]
|
||||||
push af
|
push af
|
||||||
@ -1102,12 +1102,12 @@ Function16d734: ; 16d734
|
|||||||
jr nc, .asm_16d758
|
jr nc, .asm_16d758
|
||||||
callba _2DMenuInterpretJoypad
|
callba _2DMenuInterpretJoypad
|
||||||
jr c, .asm_16d758
|
jr c, .asm_16d758
|
||||||
ld a, [wcfa5]
|
ld a, [w2DMenuFlags1]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jr nz, .asm_16d758
|
jr nz, .asm_16d758
|
||||||
call Function16d713
|
call Function16d713
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wcfa8]
|
ld a, [w2DMenuFlags4]
|
||||||
and b
|
and b
|
||||||
jr z, .asm_16d734
|
jr z, .asm_16d734
|
||||||
|
|
||||||
@ -1133,7 +1133,7 @@ Function16d76a: ; 16d76a
|
|||||||
call RTC
|
call RTC
|
||||||
call Function16d7e7
|
call Function16d7e7
|
||||||
ret c
|
ret c
|
||||||
ld a, [wcfa5]
|
ld a, [w2DMenuFlags1]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jr z, .asm_16d76a
|
jr z, .asm_16d76a
|
||||||
and a
|
and a
|
||||||
@ -1159,12 +1159,12 @@ Function16d77a: ; 16d77a
|
|||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
.asm_16d792
|
.asm_16d792
|
||||||
ld a, [wcfa1]
|
ld a, [w2DMenuCursorInitY]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wcfa2]
|
ld a, [w2DMenuCursorInitX]
|
||||||
ld c, a
|
ld c, a
|
||||||
call Coord2Tile
|
call Coord2Tile
|
||||||
ld a, [wcfa7]
|
ld a, [w2DMenuFlags3]
|
||||||
swap a
|
swap a
|
||||||
and $f
|
and $f
|
||||||
ld c, a
|
ld c, a
|
||||||
@ -1181,7 +1181,7 @@ Function16d77a: ; 16d77a
|
|||||||
.asm_16d7b1
|
.asm_16d7b1
|
||||||
ld c, $14
|
ld c, $14
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld a, [wcfa7]
|
ld a, [w2DMenuFlags3]
|
||||||
and $f
|
and $f
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wMenuCursorX]
|
ld a, [wMenuCursorX]
|
||||||
@ -1219,7 +1219,7 @@ Function16d77a: ; 16d77a
|
|||||||
; 16d7e7
|
; 16d7e7
|
||||||
|
|
||||||
Function16d7e7: ; 16d7e7
|
Function16d7e7: ; 16d7e7
|
||||||
ld a, [wcfa5]
|
ld a, [w2DMenuFlags1]
|
||||||
bit 6, a
|
bit 6, a
|
||||||
jr z, .asm_16d7f4
|
jr z, .asm_16d7f4
|
||||||
callba PlaySpriteAnimationsAndDelayFrame
|
callba PlaySpriteAnimationsAndDelayFrame
|
||||||
|
@ -270,7 +270,7 @@ Function170cc6: ; 170cc6
|
|||||||
ld a, $6
|
ld a, $6
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
ld hl, LZ_170d16
|
ld hl, LZ_170d16
|
||||||
ld de, wBackupTilemap
|
ld de, wDecompressScratch
|
||||||
call Decompress
|
call Decompress
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
|
@ -214,7 +214,7 @@ Function1dc381: ; 1dc381
|
|||||||
call Function1dc52c
|
call Function1dc52c
|
||||||
ld hl, TempMonDVs
|
ld hl, TempMonDVs
|
||||||
predef GetUnownLetter
|
predef GetUnownLetter
|
||||||
ld hl, wc2c6
|
ld hl, wBoxAlignment
|
||||||
xor a
|
xor a
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
|
39
wram.asm
39
wram.asm
@ -320,7 +320,7 @@ wLZBank:: db ; c2c4
|
|||||||
|
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
wc2c6:: ds 1
|
wBoxAlignment:: ds 1
|
||||||
InputType:: ; c2c7
|
InputType:: ; c2c7
|
||||||
ds 1
|
ds 1
|
||||||
AutoInputAddress:: ; c2c8
|
AutoInputAddress:: ; c2c8
|
||||||
@ -1548,24 +1548,18 @@ wcf9b:: ds 3
|
|||||||
wMenuData2_ScrollingMenuFunction3::
|
wMenuData2_ScrollingMenuFunction3::
|
||||||
wcf9e:: ds 3
|
wcf9e:: ds 3
|
||||||
wMenuData2End::
|
wMenuData2End::
|
||||||
|
|
||||||
wMenuData3::
|
wMenuData3::
|
||||||
w2DMenuCursorInitY::
|
w2DMenuCursorInitY:: ds 1
|
||||||
wcfa1:: ds 1
|
w2DMenuCursorInitX:: ds 1
|
||||||
w2DMenuCursorInitX::
|
w2DMenuNumRows:: ds 1
|
||||||
wcfa2:: ds 1
|
w2DMenuNumCols:: ds 1
|
||||||
w2DMenuNumRows::
|
w2DMenuFlags1:: ds 1
|
||||||
wcfa3:: ds 1
|
w2DMenuFlags2:: ds 1
|
||||||
w2DMenuNumCols::
|
w2DMenuFlags3:: ds 1
|
||||||
wcfa4:: ds 1
|
w2DMenuFlags4:: ds 1
|
||||||
w2DMenuFlags1::
|
|
||||||
wcfa5:: ds 1
|
|
||||||
w2DMenuFlags2::
|
|
||||||
wcfa6:: ds 1
|
|
||||||
w2DMenuFlags3::
|
|
||||||
wcfa7:: ds 1
|
|
||||||
w2DMenuFlags4::
|
|
||||||
wcfa8:: ds 1
|
|
||||||
wMenuData3End::
|
wMenuData3End::
|
||||||
|
|
||||||
wMenuCursorY:: ds 1
|
wMenuCursorY:: ds 1
|
||||||
wMenuCursorX:: ds 1
|
wMenuCursorX:: ds 1
|
||||||
wCursorOffCharacter:: ds 1
|
wCursorOffCharacter:: ds 1
|
||||||
@ -1783,10 +1777,7 @@ wd01a:: ds 3
|
|||||||
wMartItem10BCD:: ds 2
|
wMartItem10BCD:: ds 2
|
||||||
wd01f:: ds 1
|
wd01f:: ds 1
|
||||||
wMartItemBCDEnd::
|
wMartItemBCDEnd::
|
||||||
wd020:: ds 3
|
ds 13
|
||||||
wd023:: ds 5
|
|
||||||
wd028:: ds 2
|
|
||||||
wd02a:: ds 3
|
|
||||||
wd02d:: ds 1
|
wd02d:: ds 1
|
||||||
wd02e:: ds 1
|
wd02e:: ds 1
|
||||||
wd02f:: ds 1
|
wd02f:: ds 1
|
||||||
@ -3270,10 +3261,8 @@ w5_dc3e:: ds $c
|
|||||||
|
|
||||||
SECTION "WRAM 6", WRAMX, BANK [6]
|
SECTION "WRAM 6", WRAMX, BANK [6]
|
||||||
|
|
||||||
wBackupTilemap:: ds $20 * SCREEN_HEIGHT
|
wDecompressScratch:: ds $400
|
||||||
ds $1c0
|
wBackupAttrMap:: ds $200
|
||||||
wBackupAttrMap:: ds $20 * SCREEN_HEIGHT
|
|
||||||
ds -$40
|
|
||||||
w6_d600:: ds $200
|
w6_d600:: ds $200
|
||||||
w6_d800::
|
w6_d800::
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user