mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
More splits; map setup labels
This commit is contained in:
parent
91068077f0
commit
2ffcb4b490
@ -6,7 +6,7 @@
|
||||
; FadeMusic
|
||||
; PlayStereoSFX
|
||||
|
||||
_SoundRestart:: ; e8000
|
||||
_MapSetup_Sound_Off:: ; e8000
|
||||
; restart sound operation
|
||||
; clear all relevant hardware registers & wram
|
||||
push hl
|
||||
@ -63,7 +63,7 @@ MusicFadeRestart: ; e803d
|
||||
push af
|
||||
ld a, [MusicFadeIDLo]
|
||||
push af
|
||||
call _SoundRestart
|
||||
call _MapSetup_Sound_Off
|
||||
pop af
|
||||
ld [MusicFadeIDLo], a
|
||||
pop af
|
||||
@ -3161,7 +3161,7 @@ ChannelPointers: ; e8fd9
|
||||
|
||||
ClearChannels:: ; e8fe9
|
||||
; runs ClearChannel for all 4 channels
|
||||
; doesn't seem to be used, but functionally identical to SoundRestart
|
||||
; doesn't seem to be used, but functionally identical to MapSetup_Sound_Off
|
||||
ld hl, rNR50
|
||||
xor a
|
||||
rept 2
|
||||
|
@ -2527,7 +2527,7 @@ WinTrainerBattle: ; 3cfa4
|
||||
or [hl]
|
||||
ret nz
|
||||
call ClearTileMap
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
ret
|
||||
; 3d02b
|
||||
|
||||
@ -2911,7 +2911,7 @@ ForcePlayerMonChoice: ; 3d227
|
||||
|
||||
.enemy_fainted_mobile_error
|
||||
call ClearSprites
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call _LoadHPBar
|
||||
call ExitMenu
|
||||
call LoadTileMapToTempTileMap
|
||||
@ -2995,7 +2995,7 @@ IsMobileBattle: ; 3d2f1
|
||||
; 3d2f7
|
||||
|
||||
Function3d2f7: ; 3d2f7
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
Function3d2fa: ; switch to fullscreen menu?
|
||||
callba Function5004f
|
||||
callba Function50405
|
||||
@ -3137,7 +3137,7 @@ LostBattle: ; 3d38e
|
||||
callba BattleTowerText
|
||||
call WaitPressAorB_BlinkCursor
|
||||
call ClearTileMap
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
ret
|
||||
|
||||
.not_canlose
|
||||
@ -5290,7 +5290,7 @@ Function3e234: ; 3e234
|
||||
ld a, [wItemAttributeParamBuffer]
|
||||
cp $3
|
||||
jr z, .asm_3e24a
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
|
||||
.asm_3e24a
|
||||
xor a
|
||||
@ -5332,7 +5332,7 @@ BattleMenu_PKMN: ; 3e28d
|
||||
Function3e290:
|
||||
call ExitMenu
|
||||
call LoadStandardMenuDataHeader
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
Function3e299:
|
||||
call Function3d2fa
|
||||
xor a
|
||||
@ -8816,7 +8816,7 @@ endr
|
||||
bit 0, a
|
||||
ret z
|
||||
call ClearTileMap
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
ret
|
||||
; 3f759
|
||||
|
||||
|
@ -540,7 +540,7 @@ const_value SET 1
|
||||
const OBJECT_SPRITE_Y
|
||||
const OBJECT_SPRITE_X_OFFSET
|
||||
const OBJECT_SPRITE_Y_OFFSET
|
||||
const OBJECT_27
|
||||
const OBJECT_MOVEMENT_BYTE_INDEX
|
||||
const OBJECT_28
|
||||
const OBJECT_29
|
||||
const OBJECT_30
|
||||
|
@ -1,16 +1,16 @@
|
||||
const_value SET $f1
|
||||
const MAPSETUP_WARP
|
||||
const MAPSETUP_02
|
||||
const MAPSETUP_CONTINUE
|
||||
const MAPSETUP_RELOADMAP
|
||||
const MAPSETUP_04
|
||||
const MAPSETUP_05
|
||||
const MAPSETUP_06
|
||||
const MAPSETUP_07
|
||||
const MAPSETUP_08
|
||||
const MAPSETUP_09
|
||||
const MAPSETUP_10
|
||||
const MAPSETUP_TELEPORT
|
||||
const MAPSETUP_DOOR
|
||||
const MAPSETUP_FALL
|
||||
const MAPSETUP_CONNECTION
|
||||
const MAPSETUP_LINKRETURN
|
||||
const MAPSETUP_TRAIN
|
||||
const MAPSETUP_SUBMENU
|
||||
const MAPSETUP_BADWARP
|
||||
const MAPSETUP_12
|
||||
const MAPSETUP_FLY
|
||||
|
||||
; Command descriptions from Condensation water's scripting compendium. const_def
|
||||
const_def
|
||||
|
@ -42,10 +42,10 @@ const_value SET -1
|
||||
const PLAYEREVENT_SEENBYTRAINER
|
||||
const PLAYEREVENT_TALKTOTRAINER
|
||||
const PLAYEREVENT_ITEMBALL
|
||||
const PLAYEREVENT_4
|
||||
const PLAYEREVENT_CONNECTION
|
||||
const PLAYEREVENT_WARP
|
||||
const PLAYEREVENT_FALL
|
||||
const PLAYEREVENT_WHITEOUT
|
||||
const PLAYEREVENT_HATCH
|
||||
const PLAYEREVENT_9
|
||||
const PLAYEREVENT_JOYCHANGEFACING
|
||||
NUM_PLAYER_EVENTS EQU const_value
|
||||
|
2667
engine/billspc.asm
Executable file
2667
engine/billspc.asm
Executable file
File diff suppressed because it is too large
Load Diff
2560
engine/card_flip.asm
Executable file
2560
engine/card_flip.asm
Executable file
File diff suppressed because it is too large
Load Diff
@ -131,7 +131,7 @@ Function109847:: ; 109847
|
||||
ld a, $5
|
||||
ld [rSVBK], a
|
||||
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearTileMap
|
||||
call ClearSprites
|
||||
|
||||
@ -210,7 +210,7 @@ Function109847:: ; 109847
|
||||
jr .asm_1098de
|
||||
|
||||
.asm_1098ee
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
xor a
|
||||
ld [hLCDStatCustom], a
|
||||
ld [hBGMapAddress], a
|
||||
|
@ -6,7 +6,7 @@ Function1dd702: ; 1dd702
|
||||
; 1dd709
|
||||
|
||||
Function1dd709: ; 1dd709
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearTileMap
|
||||
call ClearSprites
|
||||
call DisableLCD
|
||||
|
615
engine/dummy_game.asm
Executable file
615
engine/dummy_game.asm
Executable file
@ -0,0 +1,615 @@
|
||||
_DummyGame: ; e1e5b (38:5e5b)
|
||||
call Functione1e67
|
||||
call DelayFrame
|
||||
.asm_e1e61
|
||||
call Functione1ebb
|
||||
jr nc, .asm_e1e61
|
||||
ret
|
||||
|
||||
Functione1e67: ; e1e67 (38:5e67)
|
||||
call DisableLCD
|
||||
ld b, $8
|
||||
call GetSGBLayout
|
||||
callab Function8cf53
|
||||
ld hl, LZ_e2221
|
||||
ld de, VTiles2 tile $00
|
||||
call Decompress
|
||||
ld hl, Unknown_e00ed
|
||||
ld de, VTiles0 tile $00
|
||||
ld bc, $40
|
||||
ld a, BANK(Unknown_e00ed)
|
||||
call FarCopyBytes
|
||||
ld a, $8
|
||||
ld hl, wc300
|
||||
ld [hli], a
|
||||
ld [hl], $0
|
||||
hlcoord 0, 0
|
||||
ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
|
||||
xor a
|
||||
call ByteFill
|
||||
xor a
|
||||
ld [hSCY], a
|
||||
ld [hSCX], a
|
||||
ld [rWY], a
|
||||
ld [wJumptableIndex], a
|
||||
ld a, $1
|
||||
ld [hBGMapMode], a
|
||||
ld a, $e3
|
||||
ld [rLCDC], a
|
||||
ld a, $e4
|
||||
call DmgToCgbBGPals
|
||||
ld a, $e0
|
||||
call Functioncf8
|
||||
ret
|
||||
|
||||
Functione1ebb: ; e1ebb (38:5ebb)
|
||||
ld a, [wJumptableIndex]
|
||||
bit 7, a
|
||||
jr nz, .asm_e1ed0
|
||||
call Functione1ed2
|
||||
callab Function8cf69
|
||||
call DelayFrame
|
||||
and a
|
||||
ret
|
||||
.asm_e1ed0
|
||||
scf
|
||||
ret
|
||||
|
||||
Functione1ed2: ; e1ed2 (38:5ed2)
|
||||
ld a, [wJumptableIndex]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, Jumptable_e1ee1
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp [hl]
|
||||
; e1ee1 (38:5ee1)
|
||||
|
||||
Jumptable_e1ee1: ; e1ee1
|
||||
dw Functione1ef3
|
||||
dw Functione1efb
|
||||
dw Functione1f1c
|
||||
dw Functione1f42
|
||||
dw Functione1f61
|
||||
dw Functione1f8b
|
||||
dw Functione1fba
|
||||
dw Functione1fcc
|
||||
dw Functione2000
|
||||
; e1ef3
|
||||
|
||||
Functione1ef3: ; e1ef3
|
||||
call Functione2152
|
||||
ld hl, wJumptableIndex
|
||||
inc [hl]
|
||||
ret
|
||||
; e1efb
|
||||
|
||||
Functione1efb: ; e1efb
|
||||
call Functione00ed
|
||||
jr nc, .asm_e1f06
|
||||
ld hl, wJumptableIndex
|
||||
set 7, [hl]
|
||||
ret
|
||||
|
||||
.asm_e1f06
|
||||
call Functione209d
|
||||
ld hl, wJumptableIndex
|
||||
inc [hl]
|
||||
xor a
|
||||
ld [wc708], a
|
||||
ld hl, wc703
|
||||
rept 4
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hl], a
|
||||
ld [wc709], a
|
||||
|
||||
Functione1f1c: ; e1f1c
|
||||
ld hl, wc708
|
||||
ld a, [hl]
|
||||
cp $2d
|
||||
jr nc, .asm_e1f30
|
||||
inc [hl]
|
||||
call Functione2183
|
||||
xor a
|
||||
ld [wc6fd], a
|
||||
call Functione2128
|
||||
ret
|
||||
|
||||
.asm_e1f30
|
||||
ld de, $341c
|
||||
ld a, $c
|
||||
call Function3b2a
|
||||
ld a, $5
|
||||
ld [wc702], a
|
||||
ld hl, wJumptableIndex
|
||||
inc [hl]
|
||||
ret
|
||||
; e1f42
|
||||
|
||||
Functione1f42: ; e1f42
|
||||
ld a, [wc702]
|
||||
hlcoord 17, 0
|
||||
add $f6
|
||||
ld [hl], a
|
||||
ld hl, wc702
|
||||
ld a, [hl]
|
||||
and a
|
||||
jr nz, .asm_e1f58
|
||||
ld a, $7
|
||||
ld [wJumptableIndex], a
|
||||
ret
|
||||
|
||||
.asm_e1f58
|
||||
dec [hl]
|
||||
xor a
|
||||
ld [wcf64], a
|
||||
ld hl, wJumptableIndex
|
||||
inc [hl]
|
||||
|
||||
Functione1f61: ; e1f61
|
||||
ld a, [wcf64]
|
||||
and a
|
||||
ret z
|
||||
dec a
|
||||
ld e, a
|
||||
ld d, $0
|
||||
ld hl, wc6d0
|
||||
add hl, de
|
||||
ld a, [hl]
|
||||
cp $ff
|
||||
ret z
|
||||
ld [wc6fd], a
|
||||
ld [wPlayerMinimized], a
|
||||
ld a, e
|
||||
ld [EnemyScreens], a
|
||||
call Functione2183
|
||||
call Functione2128
|
||||
xor a
|
||||
ld [wcf64], a
|
||||
ld hl, wJumptableIndex
|
||||
inc [hl]
|
||||
ret
|
||||
; e1f8b
|
||||
|
||||
Functione1f8b: ; e1f8b
|
||||
ld a, [wcf64]
|
||||
and a
|
||||
ret z
|
||||
dec a
|
||||
ld hl, EnemyScreens
|
||||
cp [hl]
|
||||
ret z
|
||||
ld e, a
|
||||
ld d, $0
|
||||
ld hl, wc6d0
|
||||
add hl, de
|
||||
ld a, [hl]
|
||||
cp $ff
|
||||
ret z
|
||||
ld [wc6fd], a
|
||||
ld [PlayerScreens], a
|
||||
ld a, e
|
||||
ld [wc701], a
|
||||
call Functione2183
|
||||
call Functione2128
|
||||
ld a, $40
|
||||
ld [wc708], a
|
||||
ld hl, wJumptableIndex
|
||||
inc [hl]
|
||||
|
||||
Functione1fba: ; e1fba
|
||||
ld hl, wc708
|
||||
ld a, [hl]
|
||||
and a
|
||||
jr z, .asm_e1fc3
|
||||
dec [hl]
|
||||
ret
|
||||
|
||||
.asm_e1fc3
|
||||
call Functione2010
|
||||
ld a, $3
|
||||
ld [wJumptableIndex], a
|
||||
ret
|
||||
; e1fcc
|
||||
|
||||
Functione1fcc: ; e1fcc
|
||||
ld a, [hJoypadPressed]
|
||||
and A_BUTTON
|
||||
ret z
|
||||
xor a
|
||||
ld [wc708], a
|
||||
.asm_e1fd5
|
||||
ld hl, wc708
|
||||
ld a, [hl]
|
||||
cp $2d
|
||||
jr nc, .asm_e1ff9
|
||||
inc [hl]
|
||||
push af
|
||||
call Functione2183
|
||||
pop af
|
||||
push hl
|
||||
ld e, a
|
||||
ld d, $0
|
||||
ld hl, wc6d0
|
||||
add hl, de
|
||||
ld a, [hl]
|
||||
pop hl
|
||||
cp $ff
|
||||
jr z, .asm_e1fd5
|
||||
ld [wc6fd], a
|
||||
call Functione2128
|
||||
jr .asm_e1fd5
|
||||
|
||||
.asm_e1ff9
|
||||
call WaitPressAorB_BlinkCursor
|
||||
ld hl, wJumptableIndex
|
||||
inc [hl]
|
||||
|
||||
Functione2000: ; e2000
|
||||
call Functione00ed
|
||||
jr nc, .asm_e200b
|
||||
ld hl, wJumptableIndex
|
||||
set 7, [hl]
|
||||
ret
|
||||
|
||||
.asm_e200b
|
||||
xor a
|
||||
ld [wJumptableIndex], a
|
||||
ret
|
||||
; e2010
|
||||
|
||||
Functione2010: ; e2010
|
||||
ld hl, wPlayerMinimized
|
||||
ld a, [hli]
|
||||
cp [hl]
|
||||
jr nz, .asm_e2066
|
||||
ld a, [EnemyScreens]
|
||||
call Functione2183
|
||||
call Functione2142
|
||||
ld a, [wc701]
|
||||
call Functione2183
|
||||
call Functione2142
|
||||
ld a, [EnemyScreens]
|
||||
ld e, a
|
||||
ld d, $0
|
||||
ld hl, wc6d0
|
||||
add hl, de
|
||||
ld [hl], $ff
|
||||
ld a, [wc701]
|
||||
ld e, a
|
||||
ld d, $0
|
||||
ld hl, wc6d0
|
||||
add hl, de
|
||||
ld [hl], $ff
|
||||
ld hl, wc703
|
||||
.asm_e2044
|
||||
ld a, [hli]
|
||||
and a
|
||||
jr nz, .asm_e2044
|
||||
dec hl
|
||||
ld a, [wPlayerMinimized]
|
||||
ld [hl], a
|
||||
ld [wc6fd], a
|
||||
ld hl, wc709
|
||||
ld e, [hl]
|
||||
rept 2
|
||||
inc [hl]
|
||||
endr
|
||||
ld d, $0
|
||||
hlcoord 5, 0
|
||||
add hl, de
|
||||
call Functione2128
|
||||
ld hl, UnknownText_0xe2083
|
||||
call PrintText
|
||||
ret
|
||||
|
||||
.asm_e2066
|
||||
xor a
|
||||
ld [wc6fd], a
|
||||
ld a, [EnemyScreens]
|
||||
call Functione2183
|
||||
call Functione2128
|
||||
ld a, [wc701]
|
||||
call Functione2183
|
||||
call Functione2128
|
||||
ld hl, UnknownText_0xe2098
|
||||
call PrintText
|
||||
ret
|
||||
; e2083
|
||||
|
||||
UnknownText_0xe2083: ; 0xe2083
|
||||
start_asm
|
||||
; 0xe2084
|
||||
|
||||
Functione2084: ; e2084
|
||||
push bc
|
||||
hlcoord 2, 13
|
||||
call Functione2128
|
||||
ld hl, UnknownText_0xe2093
|
||||
pop bc
|
||||
rept 3
|
||||
inc bc
|
||||
endr
|
||||
ret
|
||||
; e2093
|
||||
|
||||
UnknownText_0xe2093: ; 0xe2093
|
||||
; , yeah!
|
||||
text_jump UnknownText_0x1c1a5b
|
||||
db "@"
|
||||
; 0xe2098
|
||||
|
||||
UnknownText_0xe2098: ; 0xe2098
|
||||
; Darn…
|
||||
text_jump UnknownText_0x1c1a65
|
||||
db "@"
|
||||
; 0xe209d
|
||||
|
||||
Functione209d: ; e209d
|
||||
ld hl, wc6d0
|
||||
ld bc, $2d
|
||||
xor a
|
||||
call ByteFill
|
||||
call Functione2101
|
||||
ld c, $2
|
||||
ld b, [hl]
|
||||
call Functione20e5
|
||||
ld c, $8
|
||||
ld b, [hl]
|
||||
call Functione20e5
|
||||
ld c, $4
|
||||
ld b, [hl]
|
||||
call Functione20e5
|
||||
ld c, $7
|
||||
ld b, [hl]
|
||||
call Functione20e5
|
||||
ld c, $3
|
||||
ld b, [hl]
|
||||
call Functione20e5
|
||||
ld c, $6
|
||||
ld b, [hl]
|
||||
call Functione20e5
|
||||
ld c, $1
|
||||
ld b, [hl]
|
||||
call Functione20e5
|
||||
ld c, $5
|
||||
ld hl, wc6d0
|
||||
ld b, $2d
|
||||
.asm_e20db
|
||||
ld a, [hl]
|
||||
and a
|
||||
jr nz, .asm_e20e0
|
||||
ld [hl], c
|
||||
|
||||
.asm_e20e0
|
||||
inc hl
|
||||
dec b
|
||||
jr nz, .asm_e20db
|
||||
ret
|
||||
; e20e5
|
||||
|
||||
Functione20e5: ; e20e5
|
||||
push hl
|
||||
ld de, wc6d0
|
||||
.asm_e20e9
|
||||
call Random
|
||||
and $3f
|
||||
cp $2d
|
||||
jr nc, .asm_e20e9
|
||||
ld l, a
|
||||
ld h, $0
|
||||
add hl, de
|
||||
ld a, [hl]
|
||||
and a
|
||||
jr nz, .asm_e20e9
|
||||
ld [hl], c
|
||||
dec b
|
||||
jr nz, .asm_e20e9
|
||||
pop hl
|
||||
inc hl
|
||||
ret
|
||||
; e2101
|
||||
|
||||
Functione2101: ; e2101
|
||||
ld a, [MenuSelection2]
|
||||
dec a
|
||||
ld l, a
|
||||
ld h, 0
|
||||
rept 3
|
||||
add hl, hl
|
||||
endr
|
||||
ld de, Unknown_e2110
|
||||
add hl, de
|
||||
ret
|
||||
; e2110
|
||||
|
||||
Unknown_e2110: ; e2110
|
||||
db $02, $03, $06, $06, $06, $08, $08, $06
|
||||
db $02, $02, $04, $06, $06, $08, $08, $09
|
||||
db $02, $02, $02, $04, $07, $08, $08, $0c
|
||||
; e2128
|
||||
|
||||
Functione2128: ; e2128
|
||||
ld a, [wc6fd]
|
||||
sla a
|
||||
sla a
|
||||
add $4
|
||||
ld [hli], a
|
||||
inc a
|
||||
ld [hld], a
|
||||
inc a
|
||||
ld bc, SCREEN_WIDTH
|
||||
add hl, bc
|
||||
ld [hli], a
|
||||
inc a
|
||||
ld [hl], a
|
||||
ld c, 3
|
||||
call DelayFrames
|
||||
ret
|
||||
; e2142
|
||||
|
||||
Functione2142: ; e2142
|
||||
ld a, $1
|
||||
ld [hli], a
|
||||
ld [hld], a
|
||||
ld bc, SCREEN_WIDTH
|
||||
add hl, bc
|
||||
ld [hli], a
|
||||
ld [hl], a
|
||||
ld c, 3
|
||||
call DelayFrames
|
||||
ret
|
||||
; e2152
|
||||
|
||||
Functione2152: ; e2152
|
||||
hlcoord 0, 0
|
||||
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
||||
ld a, $1
|
||||
call ByteFill
|
||||
hlcoord 0, 0
|
||||
ld de, String_e2177
|
||||
call PlaceString
|
||||
hlcoord 15, 0
|
||||
ld de, String_e217d
|
||||
call PlaceString
|
||||
ld hl, UnknownText_0xe2176
|
||||
call PrintText
|
||||
ret
|
||||
; e2176
|
||||
|
||||
UnknownText_0xe2176: ; 0xe2176
|
||||
db "@"
|
||||
; 0xe2177
|
||||
|
||||
String_e2177: db "とったもの@"
|
||||
String_e217d: db "あと かい@"
|
||||
; e2183
|
||||
|
||||
Functione2183: ; e2183
|
||||
ld d, $0
|
||||
.asm_e2185
|
||||
sub $9
|
||||
jr c, .asm_e218c
|
||||
inc d
|
||||
jr .asm_e2185
|
||||
|
||||
.asm_e218c
|
||||
add $9
|
||||
ld e, a
|
||||
hlcoord 1, 2
|
||||
ld bc, $28
|
||||
.asm_e2195
|
||||
ld a, d
|
||||
and a
|
||||
jr z, .asm_e219d
|
||||
add hl, bc
|
||||
dec d
|
||||
jr .asm_e2195
|
||||
|
||||
.asm_e219d
|
||||
sla e
|
||||
add hl, de
|
||||
ret
|
||||
; e21a1
|
||||
|
||||
Functione21a1: ; e21a1 (38:61a1)
|
||||
ld a, [wJumptableIndex]
|
||||
cp $7
|
||||
jr nc, .quit
|
||||
call JoyTextDelay
|
||||
ld hl, hJoypadPressed ; $ffa3
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
jr nz, .pressed_a
|
||||
ld a, [hl]
|
||||
and D_LEFT
|
||||
jr nz, .pressed_left
|
||||
ld a, [hl]
|
||||
and D_RIGHT
|
||||
jr nz, .pressed_right
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
jr nz, .pressed_up
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
jr nz, .pressed_down
|
||||
ret
|
||||
|
||||
.quit
|
||||
ld hl, 0
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
ret
|
||||
|
||||
.pressed_a
|
||||
ld hl, $c
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
inc a
|
||||
ld [wcf64], a
|
||||
ret
|
||||
|
||||
.pressed_left
|
||||
ld hl, $6
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
and a
|
||||
ret z
|
||||
sub $10
|
||||
ld [hl], a
|
||||
ld hl, $c
|
||||
add hl, bc
|
||||
dec [hl]
|
||||
ret
|
||||
|
||||
.pressed_right
|
||||
ld hl, $6
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
cp $80
|
||||
ret z
|
||||
add $10
|
||||
ld [hl], a
|
||||
ld hl, $c
|
||||
add hl, bc
|
||||
inc [hl]
|
||||
ret
|
||||
|
||||
.pressed_up
|
||||
ld hl, $7
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
and a
|
||||
ret z
|
||||
sub $10
|
||||
ld [hl], a
|
||||
ld hl, $c
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
sub $9
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
.pressed_down
|
||||
ld hl, $7
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
cp $40
|
||||
ret z
|
||||
add $10
|
||||
ld [hl], a
|
||||
ld hl, $c
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
add $9
|
||||
ld [hl], a
|
||||
ret
|
||||
; e2221 (38:6221)
|
||||
|
||||
LZ_e2221: ; e2221
|
||||
INCBIN "gfx/unknown/0e2221.2bpp.lz"
|
@ -138,7 +138,7 @@ EnterMap: ; 9673e
|
||||
call ClearAllScriptFlags3
|
||||
|
||||
ld a, [hMapEntryMethod]
|
||||
cp MAPSETUP_07
|
||||
cp MAPSETUP_CONNECTION
|
||||
jr nz, .dontset
|
||||
call SetAll_ScriptFlags3
|
||||
.dontset
|
||||
@ -322,9 +322,9 @@ PlayerEvents: ; 9681f
|
||||
ld [ScriptRunning], a
|
||||
call DoPlayerEvent
|
||||
ld a, [ScriptRunning]
|
||||
cp PLAYEREVENT_4
|
||||
cp PLAYEREVENT_CONNECTION
|
||||
jr z, .ok2
|
||||
cp PLAYEREVENT_9
|
||||
cp PLAYEREVENT_JOYCHANGEFACING
|
||||
jr z, .ok2
|
||||
|
||||
xor a
|
||||
@ -1050,8 +1050,10 @@ DoPlayerEvent: ; 96beb
|
||||
ld a, [ScriptRunning]
|
||||
and a
|
||||
ret z
|
||||
|
||||
cp PLAYEREVENT_MAPSCRIPT ; run script
|
||||
ret z
|
||||
|
||||
cp NUM_PLAYER_EVENTS
|
||||
ret nc
|
||||
|
||||
@ -1088,7 +1090,7 @@ Invalid_0x96c2d: ; 96c2d
|
||||
end
|
||||
; 96c2e
|
||||
|
||||
UnknownScript_0x96c2e: ; 96c2e
|
||||
; unreferenced
|
||||
end
|
||||
; 96c2f
|
||||
|
||||
@ -1099,12 +1101,12 @@ HatchEggScript: ; 96c2f
|
||||
|
||||
WarpToNewMapScript: ; 96c34
|
||||
warpsound
|
||||
newloadmap MAPSETUP_05
|
||||
newloadmap MAPSETUP_DOOR
|
||||
end
|
||||
; 96c38
|
||||
|
||||
FallIntoMapScript: ; 96c38
|
||||
newloadmap MAPSETUP_06
|
||||
newloadmap MAPSETUP_FALL
|
||||
playsound SFX_KINESIS
|
||||
applymovement PLAYER, MovementData_0x96c48
|
||||
playsound SFX_STRENGTH
|
||||
@ -1123,7 +1125,7 @@ LandAfterPitfallScript: ; 96c4a
|
||||
; 96c4d
|
||||
|
||||
UnknownScript_0x96c4d: ; 4
|
||||
reloadandreturn MAPSETUP_07
|
||||
reloadandreturn MAPSETUP_CONNECTION
|
||||
; 96c4f
|
||||
|
||||
UnknownScript_0x96c4f: ; 9
|
||||
|
863
engine/events_3.asm
Executable file
863
engine/events_3.asm
Executable file
@ -0,0 +1,863 @@
|
||||
ReturnFromMapSetupScript:: ; b8000
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
; For some reson, GameFreak chose to use a callba here instead of just falling through.
|
||||
; No other function in the game references the function at 2E:400A, here labeled
|
||||
; ReturnFromMapSetupScript.inefficientcallba.
|
||||
callba .inefficientcallba ; this is a waste of 6 ROM bytes and 2 stack bytes
|
||||
ret
|
||||
; b800a
|
||||
|
||||
.inefficientcallba: ; b800a
|
||||
ld a, [MapGroup]
|
||||
ld b, a
|
||||
ld a, [MapNumber]
|
||||
ld c, a
|
||||
call GetWorldMapLocation
|
||||
ld [wCurrentLandmark], a
|
||||
call .CheckNationalParkGate
|
||||
jr z, .nationalparkgate
|
||||
|
||||
call GetMapPermission
|
||||
cp GATE
|
||||
jr nz, .not_gate
|
||||
|
||||
.nationalparkgate
|
||||
ld a, -1
|
||||
ld [wCurrentLandmark], a
|
||||
|
||||
.not_gate
|
||||
ld hl, wEnteredMapFromContinue
|
||||
bit 1, [hl]
|
||||
res 1, [hl]
|
||||
jr nz, .dont_do_map_sign
|
||||
|
||||
call .CheckMovingWithinLandmark
|
||||
jr z, .dont_do_map_sign
|
||||
ld a, [wCurrentLandmark]
|
||||
ld [wPreviousLandmark], a
|
||||
|
||||
call .CheckSpecialMap
|
||||
jr z, .dont_do_map_sign
|
||||
|
||||
; Display for 60 frames
|
||||
ld a, 60
|
||||
ld [wLandmarkSignTimer], a
|
||||
call LoadMapNameSignGFX
|
||||
call InitMapNameFrame
|
||||
callba Function104303
|
||||
ret
|
||||
|
||||
.dont_do_map_sign
|
||||
ld a, [wCurrentLandmark]
|
||||
ld [wPreviousLandmark], a
|
||||
ld a, $90
|
||||
ld [rWY], a
|
||||
ld [hWY], a
|
||||
xor a
|
||||
ld [hLCDStatCustom], a
|
||||
ret
|
||||
; b8064
|
||||
|
||||
.CheckMovingWithinLandmark: ; b8064
|
||||
ld a, [wCurrentLandmark]
|
||||
ld c, a
|
||||
ld a, [wPreviousLandmark]
|
||||
cp c
|
||||
ret z
|
||||
cp $0
|
||||
ret
|
||||
; b8070
|
||||
|
||||
.CheckSpecialMap: ; b8070
|
||||
cp -1
|
||||
ret z
|
||||
cp SPECIAL_MAP
|
||||
ret z
|
||||
cp RADIO_TOWER
|
||||
ret z
|
||||
cp LAV_RADIO_TOWER
|
||||
ret z
|
||||
cp UNDERGROUND
|
||||
ret z
|
||||
cp INDIGO_PLATEAU
|
||||
ret z
|
||||
cp POWER_PLANT
|
||||
ret z
|
||||
ld a, $1
|
||||
and a
|
||||
ret
|
||||
; b8089
|
||||
|
||||
.CheckNationalParkGate: ; b8089
|
||||
ld a, [MapGroup]
|
||||
cp GROUP_ROUTE_35_NATIONAL_PARK_GATE
|
||||
ret nz
|
||||
ld a, [MapNumber]
|
||||
cp MAP_ROUTE_35_NATIONAL_PARK_GATE
|
||||
ret z
|
||||
cp MAP_ROUTE_36_NATIONAL_PARK_GATE
|
||||
ret
|
||||
; b8098
|
||||
|
||||
|
||||
PlaceMapNameSign:: ; b8098 (2e:4098)
|
||||
ld hl, wLandmarkSignTimer
|
||||
ld a, [hl]
|
||||
and a
|
||||
jr z, .disappear
|
||||
dec [hl]
|
||||
cp 60
|
||||
ret z
|
||||
cp 59
|
||||
jr nz, .skip2
|
||||
call InitMapNameFrame
|
||||
call PlaceMapNameCenterAlign
|
||||
callba Function104303
|
||||
.skip2
|
||||
ld a, $80
|
||||
ld a, $70
|
||||
ld [rWY], a
|
||||
ld [hWY], a
|
||||
ret
|
||||
|
||||
.disappear
|
||||
ld a, $90
|
||||
ld [rWY], a
|
||||
ld [hWY], a
|
||||
xor a
|
||||
ld [hLCDStatCustom], a
|
||||
ret
|
||||
|
||||
|
||||
LoadMapNameSignGFX: ; b80c6
|
||||
ld de, MapEntryFrameGFX
|
||||
ld hl, VTiles2 tile $60
|
||||
lb bc, BANK(MapEntryFrameGFX), $e
|
||||
call Get2bpp
|
||||
ret
|
||||
; b80d3
|
||||
|
||||
InitMapNameFrame: ; b80d3
|
||||
hlcoord 0, 0
|
||||
ld b, 2
|
||||
ld c, 18
|
||||
call InitMapSignAttrMap
|
||||
call PlaceMapNameFrame
|
||||
ret
|
||||
; b80e1
|
||||
|
||||
|
||||
PlaceMapNameCenterAlign: ; b80e1 (2e:40e1)
|
||||
ld a, [wCurrentLandmark]
|
||||
ld e, a
|
||||
callba GetLandmarkName
|
||||
call .GetNameLength
|
||||
ld a, SCREEN_WIDTH
|
||||
sub c
|
||||
srl a
|
||||
ld b, $0
|
||||
ld c, a
|
||||
hlcoord 0, 2
|
||||
add hl, bc
|
||||
ld de, StringBuffer1
|
||||
call PlaceString
|
||||
ret
|
||||
|
||||
.GetNameLength: ; b8101 (2e:4101)
|
||||
ld c, 0
|
||||
push hl
|
||||
ld hl, StringBuffer1
|
||||
.loop
|
||||
ld a, [hli]
|
||||
cp "@"
|
||||
jr z, .stop
|
||||
cp "%"
|
||||
jr z, .loop
|
||||
inc c
|
||||
jr .loop
|
||||
.stop
|
||||
pop hl
|
||||
ret
|
||||
|
||||
|
||||
InitMapSignAttrMap: ; b8115
|
||||
ld de, AttrMap - TileMap
|
||||
add hl, de
|
||||
rept 2
|
||||
inc b
|
||||
endr
|
||||
rept 2
|
||||
inc c
|
||||
endr
|
||||
ld a, $87
|
||||
.loop
|
||||
push bc
|
||||
push hl
|
||||
.inner_loop
|
||||
ld [hli], a
|
||||
dec c
|
||||
jr nz, .inner_loop
|
||||
pop hl
|
||||
ld de, SCREEN_WIDTH
|
||||
add hl, de
|
||||
pop bc
|
||||
dec b
|
||||
jr nz, .loop
|
||||
ret
|
||||
; b812f
|
||||
|
||||
PlaceMapNameFrame: ; b812f
|
||||
hlcoord 0, 0
|
||||
; top left
|
||||
ld a, $61
|
||||
ld [hli], a
|
||||
; top row
|
||||
ld a, $62
|
||||
call .FillTopBottom
|
||||
; top right
|
||||
ld a, $64
|
||||
ld [hli], a
|
||||
; left, first line
|
||||
ld a, $65
|
||||
ld [hli], a
|
||||
; first line
|
||||
call .FillMiddle
|
||||
; right, first line
|
||||
ld a, $6b
|
||||
ld [hli], a
|
||||
; left, second line
|
||||
ld a, $66
|
||||
ld [hli], a
|
||||
; second line
|
||||
call .FillMiddle
|
||||
; right, second line
|
||||
ld a, $6c
|
||||
ld [hli], a
|
||||
; bottom left
|
||||
ld a, $67
|
||||
ld [hli], a
|
||||
; bottom
|
||||
ld a, $68
|
||||
call .FillTopBottom
|
||||
; bottom right
|
||||
ld a, $6a
|
||||
ld [hl], a
|
||||
ret
|
||||
; b815b
|
||||
|
||||
.FillMiddle: ; b815b
|
||||
ld c, 18
|
||||
ld a, $6d
|
||||
.loop
|
||||
ld [hli], a
|
||||
dec c
|
||||
jr nz, .loop
|
||||
ret
|
||||
; b8164
|
||||
|
||||
.FillTopBottom: ; b8164
|
||||
ld c, 5
|
||||
jr .enterloop
|
||||
|
||||
.continueloop
|
||||
rept 2
|
||||
ld [hli], a
|
||||
endr
|
||||
|
||||
.enterloop
|
||||
inc a
|
||||
rept 2
|
||||
ld [hli], a
|
||||
endr
|
||||
dec a
|
||||
dec c
|
||||
jr nz, .continueloop
|
||||
ret
|
||||
; b8172
|
||||
|
||||
CheckForSignpostItems: ; b8172
|
||||
; Checks to see if there are hidden items on the screen that have not yet been found. If it finds one, returns carry.
|
||||
call GetMapScriptHeaderBank
|
||||
ld [Buffer1], a
|
||||
; Get the coordinate of the bottom right corner of the screen, and load it in wd1ec/wd1ed.
|
||||
ld a, [XCoord]
|
||||
add SCREEN_WIDTH / 4
|
||||
ld [wd1ed], a
|
||||
ld a, [YCoord]
|
||||
add SCREEN_HEIGHT / 4
|
||||
ld [wd1ec], a
|
||||
; Get the pointer for the first signpost header in the map...
|
||||
ld hl, wdc02
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
; ... before even checking to see if there are any signposts on this map.
|
||||
ld a, [wCurrentMapSignpostCount]
|
||||
and a
|
||||
jr z, .nosignpostitems
|
||||
; For i = 1:wCurrentMapSignpostCount...
|
||||
.loop
|
||||
; Store the counter in Buffer2, and store the signpost header pointer in the stack.
|
||||
ld [Buffer2], a
|
||||
push hl
|
||||
; Get the Y coordinate of the signpost.
|
||||
call .GetFarByte
|
||||
ld e, a
|
||||
; Is the Y coordinate of the signpost on the screen? If not, go to the next signpost.
|
||||
ld a, [wd1ec]
|
||||
sub e
|
||||
jr c, .next
|
||||
cp SCREEN_HEIGHT / 2
|
||||
jr nc, .next
|
||||
; Is the X coordinate of the signpost on the screen? If not, go to the next signpost.
|
||||
call .GetFarByte
|
||||
ld d, a
|
||||
ld a, [wd1ed]
|
||||
sub d
|
||||
jr c, .next
|
||||
cp SCREEN_WIDTH / 2
|
||||
jr nc, .next
|
||||
; Is this signpost a hidden item? If not, go to the next signpost.
|
||||
call .GetFarByte
|
||||
cp SIGNPOST_ITEM
|
||||
jr nz, .next
|
||||
; Has this item already been found? If not, set off the Itemfinder.
|
||||
ld a, [Buffer1]
|
||||
call GetFarHalfword
|
||||
ld a, [Buffer1]
|
||||
call GetFarHalfword
|
||||
ld d, h
|
||||
ld e, l
|
||||
ld b, CHECK_FLAG
|
||||
call EventFlagAction
|
||||
ld a, c
|
||||
and a
|
||||
jr z, .itemnearby
|
||||
|
||||
.next
|
||||
; Restore the signpost header pointer and increment it by the length of a signpost header.
|
||||
pop hl
|
||||
ld bc, 5
|
||||
add hl, bc
|
||||
; Restore the signpost counter and decrement it. If it hits zero, there are no hidden items in range.
|
||||
ld a, [Buffer2]
|
||||
dec a
|
||||
jr nz, .loop
|
||||
|
||||
.nosignpostitems
|
||||
xor a
|
||||
ret
|
||||
|
||||
.itemnearby
|
||||
pop hl
|
||||
scf
|
||||
ret
|
||||
; b81e2
|
||||
|
||||
.GetFarByte: ; b81e2
|
||||
ld a, [Buffer1]
|
||||
call GetFarByte
|
||||
inc hl
|
||||
ret
|
||||
; b81ea
|
||||
|
||||
|
||||
TreeMonEncounter: ; b81ea
|
||||
callba MobileFn_1060ef
|
||||
|
||||
xor a
|
||||
ld [TempWildMonSpecies], a
|
||||
ld [CurPartyLevel], a
|
||||
|
||||
ld hl, TreeMonMaps
|
||||
call GetTreeMonSet
|
||||
jr nc, .no_battle
|
||||
|
||||
call GetTreeMons
|
||||
jr nc, .no_battle
|
||||
|
||||
call GetTreeMon
|
||||
jr nc, .no_battle
|
||||
|
||||
ld a, BATTLETYPE_TREE
|
||||
ld [BattleType], a
|
||||
ld a, 1
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
|
||||
.no_battle
|
||||
xor a
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
; b8219
|
||||
|
||||
RockMonEncounter: ; b8219
|
||||
|
||||
xor a
|
||||
ld [TempWildMonSpecies], a
|
||||
ld [CurPartyLevel], a
|
||||
|
||||
ld hl, RockMonMaps
|
||||
call GetTreeMonSet
|
||||
jr nc, .no_battle
|
||||
|
||||
call GetTreeMons
|
||||
jr nc, .no_battle
|
||||
|
||||
ld a, 10
|
||||
call RandomRange
|
||||
cp 4
|
||||
jr nc, .no_battle
|
||||
|
||||
call SelectTreeMon
|
||||
jr nc, .no_battle
|
||||
|
||||
ret
|
||||
|
||||
.no_battle
|
||||
xor a
|
||||
ret
|
||||
; b823e
|
||||
|
||||
db $05 ; ????
|
||||
|
||||
GetTreeMonSet: ; b823f
|
||||
; Return carry and treemon set in a
|
||||
; if the current map is in table hl.
|
||||
ld a, [MapNumber]
|
||||
ld e, a
|
||||
ld a, [MapGroup]
|
||||
ld d, a
|
||||
.loop
|
||||
ld a, [hli]
|
||||
cp -1
|
||||
jr z, .not_in_table
|
||||
|
||||
cp d
|
||||
jr nz, .skip2
|
||||
|
||||
ld a, [hli]
|
||||
cp e
|
||||
jr nz, .skip1
|
||||
|
||||
jr .in_table
|
||||
|
||||
.skip2
|
||||
inc hl
|
||||
.skip1
|
||||
inc hl
|
||||
jr .loop
|
||||
|
||||
.not_in_table
|
||||
xor a
|
||||
ret
|
||||
|
||||
.in_table
|
||||
ld a, [hl]
|
||||
scf
|
||||
ret
|
||||
; b825e
|
||||
|
||||
TreeMonMaps: ; b825e
|
||||
treemon_map: macro
|
||||
map \1
|
||||
db \2 ; treemon set
|
||||
endm
|
||||
treemon_map ROUTE_26, 4
|
||||
treemon_map ROUTE_27, 4
|
||||
treemon_map ROUTE_28, 0
|
||||
treemon_map ROUTE_29, 3
|
||||
treemon_map ROUTE_30, 3
|
||||
treemon_map ROUTE_31, 3
|
||||
treemon_map ROUTE_32, 4
|
||||
treemon_map ROUTE_33, 2
|
||||
treemon_map ROUTE_34, 3
|
||||
treemon_map ROUTE_35, 3
|
||||
treemon_map ROUTE_36, 3
|
||||
treemon_map ROUTE_37, 3
|
||||
treemon_map ROUTE_38, 3
|
||||
treemon_map ROUTE_39, 3
|
||||
treemon_map ROUTE_40, 0
|
||||
treemon_map ROUTE_41, 0
|
||||
treemon_map ROUTE_42, 2
|
||||
treemon_map ROUTE_43, 5
|
||||
treemon_map ROUTE_44, 1
|
||||
treemon_map ROUTE_45, 1
|
||||
treemon_map ROUTE_46, 1
|
||||
treemon_map NEW_BARK_TOWN, 0
|
||||
treemon_map CHERRYGROVE_CITY, 0
|
||||
treemon_map VIOLET_CITY, 0
|
||||
treemon_map AZALEA_TOWN, 2
|
||||
treemon_map CIANWOOD_CITY, 0
|
||||
treemon_map GOLDENROD_CITY, 0
|
||||
treemon_map OLIVINE_CITY, 0
|
||||
treemon_map ECRUTEAK_CITY, 0
|
||||
treemon_map MAHOGANY_TOWN, 0
|
||||
treemon_map LAKE_OF_RAGE, 5
|
||||
treemon_map BLACKTHORN_CITY, 0
|
||||
treemon_map SILVER_CAVE_OUTSIDE, 0
|
||||
treemon_map ILEX_FOREST, 6
|
||||
db -1
|
||||
; b82c5
|
||||
|
||||
RockMonMaps: ; b82c5
|
||||
treemon_map CIANWOOD_CITY, 7
|
||||
treemon_map ROUTE_40, 7
|
||||
treemon_map DARK_CAVE_VIOLET_ENTRANCE, 7
|
||||
treemon_map SLOWPOKE_WELL_B1F, 7
|
||||
db -1
|
||||
; b82d2
|
||||
|
||||
GetTreeMons: ; b82d2
|
||||
; Return the address of TreeMon table a in hl.
|
||||
; Return nc if table a doesn't exist.
|
||||
|
||||
cp 8
|
||||
jr nc, .quit
|
||||
|
||||
and a
|
||||
jr z, .quit
|
||||
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, TreeMons
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
|
||||
scf
|
||||
ret
|
||||
|
||||
.quit
|
||||
xor a
|
||||
ret
|
||||
; b82e8
|
||||
|
||||
TreeMons: ; b82e8
|
||||
dw TreeMons1
|
||||
dw TreeMons1
|
||||
dw TreeMons2
|
||||
dw TreeMons3
|
||||
dw TreeMons4
|
||||
dw TreeMons5
|
||||
dw TreeMons6
|
||||
dw RockMons
|
||||
dw TreeMons1
|
||||
|
||||
; Two tables each (normal, rare).
|
||||
; Structure:
|
||||
; db %, species, level
|
||||
|
||||
TreeMons1: ; b82fa
|
||||
db 50, SPEAROW, 10
|
||||
db 15, SPEAROW, 10
|
||||
db 15, SPEAROW, 10
|
||||
db 10, AIPOM, 10
|
||||
db 5, AIPOM, 10
|
||||
db 5, AIPOM, 10
|
||||
db -1
|
||||
|
||||
db 50, SPEAROW, 10
|
||||
db 15, HERACROSS, 10
|
||||
db 15, HERACROSS, 10
|
||||
db 10, AIPOM, 10
|
||||
db 5, AIPOM, 10
|
||||
db 5, AIPOM, 10
|
||||
db -1
|
||||
|
||||
TreeMons2: ; b8320
|
||||
db 50, SPEAROW, 10
|
||||
db 15, EKANS, 10
|
||||
db 15, SPEAROW, 10
|
||||
db 10, AIPOM, 10
|
||||
db 5, AIPOM, 10
|
||||
db 5, AIPOM, 10
|
||||
db -1
|
||||
|
||||
db 50, SPEAROW, 10
|
||||
db 15, HERACROSS, 10
|
||||
db 15, HERACROSS, 10
|
||||
db 10, AIPOM, 10
|
||||
db 5, AIPOM, 10
|
||||
db 5, AIPOM, 10
|
||||
db -1
|
||||
|
||||
TreeMons3: ; b8346
|
||||
db 50, HOOTHOOT, 10
|
||||
db 15, SPINARAK, 10
|
||||
db 15, LEDYBA, 10
|
||||
db 10, EXEGGCUTE, 10
|
||||
db 5, EXEGGCUTE, 10
|
||||
db 5, EXEGGCUTE, 10
|
||||
db -1
|
||||
|
||||
db 50, HOOTHOOT, 10
|
||||
db 15, PINECO, 10
|
||||
db 15, PINECO, 10
|
||||
db 10, EXEGGCUTE, 10
|
||||
db 5, EXEGGCUTE, 10
|
||||
db 5, EXEGGCUTE, 10
|
||||
db -1
|
||||
|
||||
TreeMons4: ; b836c
|
||||
db 50, HOOTHOOT, 10
|
||||
db 15, EKANS, 10
|
||||
db 15, HOOTHOOT, 10
|
||||
db 10, EXEGGCUTE, 10
|
||||
db 5, EXEGGCUTE, 10
|
||||
db 5, EXEGGCUTE, 10
|
||||
db -1
|
||||
|
||||
db 50, HOOTHOOT, 10
|
||||
db 15, PINECO, 10
|
||||
db 15, PINECO, 10
|
||||
db 10, EXEGGCUTE, 10
|
||||
db 5, EXEGGCUTE, 10
|
||||
db 5, EXEGGCUTE, 10
|
||||
db -1
|
||||
|
||||
TreeMons5: ; b8392
|
||||
db 50, HOOTHOOT, 10
|
||||
db 15, VENONAT, 10
|
||||
db 15, HOOTHOOT, 10
|
||||
db 10, EXEGGCUTE, 10
|
||||
db 5, EXEGGCUTE, 10
|
||||
db 5, EXEGGCUTE, 10
|
||||
db -1
|
||||
|
||||
db 50, HOOTHOOT, 10
|
||||
db 15, PINECO, 10
|
||||
db 15, PINECO, 10
|
||||
db 10, EXEGGCUTE, 10
|
||||
db 5, EXEGGCUTE, 10
|
||||
db 5, EXEGGCUTE, 10
|
||||
db -1
|
||||
|
||||
TreeMons6: ; b83b8
|
||||
db 50, HOOTHOOT, 10
|
||||
db 15, PINECO, 10
|
||||
db 15, PINECO, 10
|
||||
db 10, NOCTOWL, 10
|
||||
db 5, BUTTERFREE, 10
|
||||
db 5, BEEDRILL, 10
|
||||
db -1
|
||||
|
||||
db 50, HOOTHOOT, 10
|
||||
db 15, CATERPIE, 10
|
||||
db 15, WEEDLE, 10
|
||||
db 10, HOOTHOOT, 10
|
||||
db 5, METAPOD, 10
|
||||
db 5, KAKUNA, 10
|
||||
db -1
|
||||
|
||||
RockMons: ; b83de
|
||||
db 90, KRABBY, 15
|
||||
db 10, SHUCKLE, 15
|
||||
db -1
|
||||
; b83e5
|
||||
|
||||
GetTreeMon: ; b83e5
|
||||
push hl
|
||||
call GetTreeScore
|
||||
pop hl
|
||||
and a
|
||||
jr z, .bad
|
||||
cp 1
|
||||
jr z, .good
|
||||
cp 2
|
||||
jr z, .rare
|
||||
ret
|
||||
|
||||
.bad
|
||||
ld a, 10
|
||||
call RandomRange
|
||||
and a
|
||||
jr nz, NoTreeMon
|
||||
jr SelectTreeMon
|
||||
|
||||
.good
|
||||
ld a, 10
|
||||
call RandomRange
|
||||
cp 5
|
||||
jr nc, NoTreeMon
|
||||
jr SelectTreeMon
|
||||
|
||||
.rare
|
||||
ld a, 10
|
||||
call RandomRange
|
||||
cp 8
|
||||
jr nc, NoTreeMon
|
||||
jr .skip
|
||||
.skip
|
||||
ld a, [hli]
|
||||
cp -1
|
||||
jr nz, .skip
|
||||
call SelectTreeMon
|
||||
ret
|
||||
; b841f
|
||||
|
||||
SelectTreeMon: ; b841f
|
||||
; Read a TreeMons table and pick one monster at random.
|
||||
|
||||
ld a, 100
|
||||
call RandomRange
|
||||
.loop
|
||||
sub [hl]
|
||||
jr c, .ok
|
||||
rept 3
|
||||
inc hl
|
||||
endr
|
||||
jr .loop
|
||||
|
||||
.ok
|
||||
ld a, [hli]
|
||||
cp $ff
|
||||
jr z, NoTreeMon
|
||||
|
||||
ld a, [hli]
|
||||
ld [TempWildMonSpecies], a
|
||||
ld a, [hl]
|
||||
ld [CurPartyLevel], a
|
||||
scf
|
||||
ret
|
||||
|
||||
NoTreeMon: ; b843b
|
||||
xor a
|
||||
ld [TempWildMonSpecies], a
|
||||
ld [CurPartyLevel], a
|
||||
ret
|
||||
; b8443
|
||||
|
||||
GetTreeScore: ; b8443
|
||||
call .CoordScore
|
||||
ld [Buffer1], a
|
||||
call .OTIDScore
|
||||
ld [Buffer2], a
|
||||
ld c, a
|
||||
ld a, [Buffer1]
|
||||
sub c
|
||||
jr z, .rare
|
||||
jr nc, .ok
|
||||
add 10
|
||||
.ok
|
||||
cp 5
|
||||
jr c, .good
|
||||
|
||||
.bad
|
||||
xor a
|
||||
ret
|
||||
|
||||
.good
|
||||
ld a, 1
|
||||
ret
|
||||
|
||||
.rare
|
||||
ld a, 2
|
||||
ret
|
||||
; b8466
|
||||
|
||||
.CoordScore: ; b8466
|
||||
call GetFacingTileCoord
|
||||
ld hl, 0
|
||||
ld c, e
|
||||
ld b, 0
|
||||
ld a, d
|
||||
|
||||
and a
|
||||
jr z, .next
|
||||
.loop
|
||||
add hl, bc
|
||||
dec a
|
||||
jr nz, .loop
|
||||
.next
|
||||
|
||||
add hl, bc
|
||||
ld c, d
|
||||
add hl, bc
|
||||
|
||||
ld a, h
|
||||
ld [hDividend], a
|
||||
ld a, l
|
||||
ld [hDividend + 1], a
|
||||
ld a, 5
|
||||
ld [hDivisor], a
|
||||
ld b, 2
|
||||
call Divide
|
||||
|
||||
ld a, [hQuotient + 1]
|
||||
ld [hDividend], a
|
||||
ld a, [hQuotient + 2]
|
||||
ld [hDividend + 1], a
|
||||
ld a, 10
|
||||
ld [hDivisor], a
|
||||
ld b, 2
|
||||
call Divide
|
||||
|
||||
ld a, [hQuotient + 3]
|
||||
ret
|
||||
; b849d
|
||||
|
||||
.OTIDScore: ; b849d
|
||||
ld a, [PlayerID]
|
||||
ld [hDividend], a
|
||||
ld a, [PlayerID + 1]
|
||||
ld [hDividend + 1], a
|
||||
ld a, 10
|
||||
ld [hDivisor], a
|
||||
ld b, 2
|
||||
call Divide
|
||||
ld a, [hQuotient + 3]
|
||||
ret
|
||||
; b84b3
|
||||
|
||||
LoadFishingGFX: ; b84b3
|
||||
ld a, [rVBK]
|
||||
push af
|
||||
ld a, $1
|
||||
ld [rVBK], a
|
||||
|
||||
ld de, FishingGFX
|
||||
ld a, [PlayerGender]
|
||||
bit 0, a
|
||||
jr z, .got_gender
|
||||
ld de, KrisFishingGFX
|
||||
.got_gender
|
||||
|
||||
ld hl, VTiles0 tile $02
|
||||
call .LoadGFX
|
||||
ld hl, VTiles0 tile $06
|
||||
call .LoadGFX
|
||||
ld hl, VTiles0 tile $0a
|
||||
call .LoadGFX
|
||||
ld hl, VTiles1 tile $7c
|
||||
call .LoadGFX
|
||||
|
||||
pop af
|
||||
ld [rVBK], a
|
||||
ret
|
||||
; b84e3
|
||||
|
||||
.LoadGFX: ; b84e3
|
||||
lb bc, BANK(FishingGFX), 2
|
||||
push de
|
||||
call Get2bpp
|
||||
pop de
|
||||
ld hl, 2 tiles
|
||||
add hl, de
|
||||
ld d, h
|
||||
ld e, l
|
||||
ret
|
||||
; b84f2
|
||||
|
||||
FishingGFX: ; b84f2
|
||||
INCBIN "gfx/overworld/chris_fish.2bpp"
|
||||
; b8582
|
||||
|
||||
KrisFishingGFX: ; b8582
|
||||
INCBIN "gfx/overworld/kris_fish.2bpp"
|
||||
; b8612
|
@ -372,7 +372,7 @@ INCBIN "gfx/evo/bubble_large.2bpp"
|
||||
INCBIN "gfx/evo/bubble.2bpp"
|
||||
|
||||
Function4e881: ; 4e881
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearTileMap
|
||||
call ClearSprites
|
||||
call DisableLCD
|
||||
@ -405,7 +405,7 @@ UnknownText_0x4e8bd: ; 0x4e8bd
|
||||
|
||||
|
||||
Function4e8c2: ; 4e8c2
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearTileMap
|
||||
call ClearSprites
|
||||
call DisableLCD
|
||||
|
916
engine/flypoints.asm
Executable file
916
engine/flypoints.asm
Executable file
@ -0,0 +1,916 @@
|
||||
_FlyMap: ; 91af3
|
||||
call ClearBGPalettes
|
||||
call ClearTileMap
|
||||
call ClearSprites
|
||||
ld hl, hInMenu
|
||||
ld a, [hl]
|
||||
push af
|
||||
ld [hl], $1
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
callba Function8cf53
|
||||
call Function91ff2
|
||||
ld de, GFX_922e1
|
||||
ld hl, VTiles2 tile $30
|
||||
lb bc, BANK(GFX_922e1), 6
|
||||
call Request1bpp
|
||||
call FlyMap
|
||||
call Function91c8f
|
||||
ld b, $2
|
||||
call GetSGBLayout
|
||||
call SetPalettes
|
||||
.loop
|
||||
call JoyTextDelay
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
jr nz, .pressedB
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
jr nz, .pressedA
|
||||
call FlyMapScroll
|
||||
call GetMapCursorCoordinates
|
||||
callba Function8cf69
|
||||
call DelayFrame
|
||||
jr .loop
|
||||
|
||||
.pressedB
|
||||
ld a, -1
|
||||
jr .exit
|
||||
|
||||
.pressedA
|
||||
ld a, [wd002]
|
||||
ld l, a
|
||||
ld h, 0
|
||||
add hl, hl
|
||||
ld de, Flypoints + 1
|
||||
add hl, de
|
||||
ld a, [hl]
|
||||
|
||||
.exit
|
||||
ld [wd002], a
|
||||
pop af
|
||||
ld [hInMenu], a
|
||||
call ClearBGPalettes
|
||||
ld a, $90
|
||||
ld [hWY], a
|
||||
xor a
|
||||
ld [hBGMapAddress], a
|
||||
ld a, VBGMap0 / $100
|
||||
ld [hBGMapAddress + 1], a
|
||||
ld a, [wd002]
|
||||
ld e, a
|
||||
ret
|
||||
; 91b73
|
||||
|
||||
FlyMapScroll: ; 91b73
|
||||
ld a, [StartFlypoint]
|
||||
ld e, a
|
||||
ld a, [EndFlypoint]
|
||||
ld d, a
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
jr nz, .ScrollNext
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
jr nz, .ScrollPrev
|
||||
ret
|
||||
|
||||
.ScrollNext
|
||||
ld hl, wd002
|
||||
ld a, [hl]
|
||||
cp d
|
||||
jr nz, .NotAtEndYet
|
||||
ld a, e
|
||||
dec a
|
||||
ld [hl], a
|
||||
|
||||
.NotAtEndYet
|
||||
inc [hl]
|
||||
call CheckIfVisitedFlypoint
|
||||
jr z, .ScrollNext
|
||||
jr .Finally
|
||||
|
||||
.ScrollPrev
|
||||
ld hl, wd002
|
||||
ld a, [hl]
|
||||
cp e
|
||||
jr nz, .NotAtStartYet
|
||||
ld a, d
|
||||
inc a
|
||||
ld [hl], a
|
||||
|
||||
.NotAtStartYet
|
||||
dec [hl]
|
||||
call CheckIfVisitedFlypoint
|
||||
jr z, .ScrollPrev
|
||||
|
||||
.Finally
|
||||
call TownMapBubble
|
||||
call WaitBGMap
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
ret
|
||||
; 91bb5
|
||||
|
||||
TownMapBubble: ; 91bb5
|
||||
; Draw the bubble containing the location text in the town map HUD
|
||||
|
||||
; Top-left corner
|
||||
hlcoord 1, 0
|
||||
ld a, $30
|
||||
ld [hli], a
|
||||
|
||||
; Top row
|
||||
ld bc, 16
|
||||
ld a, " "
|
||||
call ByteFill
|
||||
|
||||
; Top-right corner
|
||||
ld a, $31
|
||||
ld [hl], a
|
||||
hlcoord 1, 1
|
||||
|
||||
|
||||
; Middle row
|
||||
ld bc, 18
|
||||
ld a, " "
|
||||
call ByteFill
|
||||
|
||||
|
||||
; Bottom-left corner
|
||||
hlcoord 1, 2
|
||||
ld a, $32
|
||||
ld [hli], a
|
||||
|
||||
; Bottom row
|
||||
ld bc, 16
|
||||
ld a, " "
|
||||
call ByteFill
|
||||
|
||||
; Bottom-right corner
|
||||
ld a, $33
|
||||
ld [hl], a
|
||||
|
||||
|
||||
; Print "Where?"
|
||||
hlcoord 2, 0
|
||||
ld de, .Where
|
||||
call PlaceString
|
||||
|
||||
; Print the name of the default flypoint
|
||||
call .Name
|
||||
|
||||
; Up/down arrows
|
||||
hlcoord 18, 1
|
||||
ld [hl], $34
|
||||
ret
|
||||
|
||||
.Where
|
||||
db "Where?@"
|
||||
|
||||
.Name
|
||||
; We need the map location of the default flypoint
|
||||
ld a, [wd002]
|
||||
ld l, a
|
||||
ld h, 0
|
||||
add hl, hl ; two bytes per flypoint
|
||||
ld de, Flypoints
|
||||
add hl, de
|
||||
ld e, [hl]
|
||||
|
||||
callba GetLandmarkName
|
||||
|
||||
hlcoord 2, 1
|
||||
ld de, StringBuffer1
|
||||
call PlaceString
|
||||
ret
|
||||
; 91c17
|
||||
|
||||
GetMapCursorCoordinates: ; 91c17
|
||||
ld a, [wd002]
|
||||
ld l, a
|
||||
ld h, $0
|
||||
add hl, hl
|
||||
ld de, Flypoints
|
||||
add hl, de
|
||||
ld e, [hl]
|
||||
callba GetLandmarkCoords
|
||||
ld a, [wd003]
|
||||
ld c, a
|
||||
ld a, [wd004]
|
||||
ld b, a
|
||||
ld hl, $4
|
||||
add hl, bc
|
||||
ld [hl], e
|
||||
ld hl, $5
|
||||
add hl, bc
|
||||
ld [hl], d
|
||||
ret
|
||||
; 91c3c
|
||||
|
||||
CheckIfVisitedFlypoint: ; 91c3c
|
||||
; Check if the flypoint loaded in [hl] has been visited yet.
|
||||
push bc
|
||||
push de
|
||||
push hl
|
||||
ld l, [hl]
|
||||
ld h, 0
|
||||
add hl, hl
|
||||
ld de, Flypoints + 1
|
||||
add hl, de
|
||||
ld c, [hl]
|
||||
call HasVisitedSpawn
|
||||
pop hl
|
||||
pop de
|
||||
pop bc
|
||||
and a
|
||||
ret
|
||||
; 91c50
|
||||
|
||||
HasVisitedSpawn: ; 91c50
|
||||
; Check if spawn point c has been visited.
|
||||
ld hl, VisitedSpawns
|
||||
ld b, CHECK_FLAG
|
||||
ld d, 0
|
||||
predef FlagPredef
|
||||
ld a, c
|
||||
ret
|
||||
; 91c5e
|
||||
|
||||
Flypoints: ; 91c5e
|
||||
; landmark, spawn point
|
||||
|
||||
const_def
|
||||
|
||||
flypoint: MACRO
|
||||
; \1\@FLY EQUS "FLY_\1"
|
||||
; \1\@SPAWN EQUS "SPAWN_\1"
|
||||
; const \1\@FLY
|
||||
; db \2, \1\@SPAWN
|
||||
const FLY_\1
|
||||
db \2, SPAWN_\1
|
||||
ENDM
|
||||
|
||||
; Johto
|
||||
flypoint NEW_BARK, NEW_BARK_TOWN
|
||||
flypoint CHERRYGROVE, CHERRYGROVE_CITY
|
||||
flypoint VIOLET, VIOLET_CITY
|
||||
flypoint AZALEA, AZALEA_TOWN
|
||||
flypoint GOLDENROD, GOLDENROD_CITY
|
||||
flypoint ECRUTEAK, ECRUTEAK_CITY
|
||||
flypoint OLIVINE, OLIVINE_CITY
|
||||
flypoint CIANWOOD, CIANWOOD_CITY
|
||||
flypoint MAHOGANY, MAHOGANY_TOWN
|
||||
flypoint LAKE, LAKE_OF_RAGE
|
||||
flypoint BLACKTHORN, BLACKTHORN_CITY
|
||||
flypoint MT_SILVER, SILVER_CAVE
|
||||
|
||||
; Kanto
|
||||
KANTO_FLYPOINT EQU const_value
|
||||
|
||||
flypoint PALLET, PALLET_TOWN
|
||||
flypoint VIRIDIAN, VIRIDIAN_CITY
|
||||
flypoint PEWTER, PEWTER_CITY
|
||||
flypoint CERULEAN, CERULEAN_CITY
|
||||
flypoint VERMILION, VERMILION_CITY
|
||||
flypoint ROCK_TUNNEL, ROCK_TUNNEL
|
||||
flypoint LAVENDER, LAVENDER_TOWN
|
||||
flypoint CELADON, CELADON_CITY
|
||||
flypoint SAFFRON, SAFFRON_CITY
|
||||
flypoint FUCHSIA, FUCHSIA_CITY
|
||||
flypoint CINNABAR, CINNABAR_ISLAND
|
||||
flypoint INDIGO, INDIGO_PLATEAU
|
||||
|
||||
db -1
|
||||
; 91c8f
|
||||
|
||||
Function91c8f: ; 91c8f
|
||||
ret
|
||||
; 91c90
|
||||
|
||||
FlyMap: ; 91c90
|
||||
|
||||
ld a, [MapGroup]
|
||||
ld b, a
|
||||
ld a, [MapNumber]
|
||||
ld c, a
|
||||
call GetWorldMapLocation
|
||||
|
||||
; If we're not in a valid location, i.e. Pokecenter floor 2F,
|
||||
; the backup map information is used
|
||||
|
||||
cp SPECIAL_MAP
|
||||
jr nz, .CheckRegion
|
||||
|
||||
ld a, [BackupMapGroup]
|
||||
ld b, a
|
||||
ld a, [BackupMapNumber]
|
||||
ld c, a
|
||||
call GetWorldMapLocation
|
||||
|
||||
.CheckRegion
|
||||
; The first 46 locations are part of Johto. The rest are in Kanto
|
||||
cp KANTO_LANDMARK
|
||||
jr nc, .KantoFlyMap
|
||||
|
||||
.JohtoFlyMap
|
||||
; Note that .NoKanto should be modified in tandem with this branch
|
||||
|
||||
push af
|
||||
|
||||
; Start from New Bark Town
|
||||
ld a, FLY_NEW_BARK
|
||||
ld [wd002], a
|
||||
|
||||
; Flypoints begin at New Bark Town...
|
||||
ld [StartFlypoint], a
|
||||
; ..and end at Silver Cave
|
||||
ld a, FLY_MT_SILVER
|
||||
ld [EndFlypoint], a
|
||||
|
||||
; Fill out the map
|
||||
call FillJohtoMap
|
||||
call .MapHud
|
||||
pop af
|
||||
call TownMapPlayerIcon
|
||||
ret
|
||||
|
||||
.KantoFlyMap
|
||||
|
||||
; The event that there are no flypoints enabled in a map is not
|
||||
; accounted for. As a result, if you attempt to select a flypoint
|
||||
; when there are none enabled, the game will crash. Additionally,
|
||||
; the flypoint selection has a default starting point that
|
||||
; can be flown to even if none are enabled
|
||||
|
||||
; To prevent both of these things from happening when the player
|
||||
; enters Kanto, fly access is restricted until Indigo Plateau is
|
||||
; visited and its flypoint enabled
|
||||
|
||||
push af
|
||||
ld c, SPAWN_INDIGO
|
||||
call HasVisitedSpawn
|
||||
and a
|
||||
jr z, .NoKanto
|
||||
|
||||
; Kanto's map is only loaded if we've visited Indigo Plateau
|
||||
|
||||
; Flypoints begin at Pallet Town...
|
||||
ld a, FLY_PALLET
|
||||
ld [StartFlypoint], a
|
||||
; ...and end at Indigo Plateau
|
||||
ld a, FLY_INDIGO
|
||||
ld [EndFlypoint], a
|
||||
|
||||
; Because Indigo Plateau is the first flypoint the player
|
||||
; visits, it's made the default flypoint
|
||||
ld [wd002], a
|
||||
|
||||
; Fill out the map
|
||||
call FillKantoMap
|
||||
call .MapHud
|
||||
pop af
|
||||
call TownMapPlayerIcon
|
||||
ret
|
||||
|
||||
.NoKanto
|
||||
; If Indigo Plateau hasn't been visited, we use Johto's map instead
|
||||
|
||||
; Start from New Bark Town
|
||||
ld a, FLY_NEW_BARK
|
||||
ld [wd002], a
|
||||
|
||||
; Flypoints begin at New Bark Town...
|
||||
ld [StartFlypoint], a
|
||||
; ..and end at Silver Cave
|
||||
ld a, FLY_MT_SILVER
|
||||
ld [EndFlypoint], a
|
||||
|
||||
call FillJohtoMap
|
||||
|
||||
pop af
|
||||
|
||||
.MapHud
|
||||
call TownMapBubble
|
||||
call TownMapPals
|
||||
|
||||
ld hl, VBGMap0 ; BG Map 0
|
||||
call TownMapBGUpdate
|
||||
|
||||
call TownMapMon
|
||||
ld a, c
|
||||
ld [wd003], a
|
||||
ld a, b
|
||||
ld [wd004], a
|
||||
ret
|
||||
; 91d11
|
||||
|
||||
Function91d11: ; 91d11
|
||||
ld a, [wd002]
|
||||
push af
|
||||
ld a, [wd003]
|
||||
push af
|
||||
ld a, e
|
||||
ld [wd002], a
|
||||
call ClearSprites
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
ld a, $1
|
||||
ld [hInMenu], a
|
||||
ld de, GFX_922d1
|
||||
ld hl, VTiles0 tile $7f
|
||||
lb bc, BANK(GFX_922d1), 1
|
||||
call Request2bpp ; actually 1bpp
|
||||
call Function91ed0
|
||||
ld hl, VTiles0 tile $78
|
||||
ld c, $4
|
||||
call Request2bpp
|
||||
call Function91ff2
|
||||
call FillKantoMap
|
||||
call Function91de9
|
||||
call TownMapPals
|
||||
ld hl, VBGMap1
|
||||
call TownMapBGUpdate
|
||||
call FillJohtoMap
|
||||
call Function91de9
|
||||
call TownMapPals
|
||||
ld hl, VBGMap0
|
||||
call TownMapBGUpdate
|
||||
ld b, $2
|
||||
call GetSGBLayout
|
||||
call SetPalettes
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
xor a
|
||||
call Function91e1e
|
||||
.asm_91d6e
|
||||
call JoyTextDelay
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and A_BUTTON | B_BUTTON
|
||||
jr nz, .asm_91d8f
|
||||
ld a, [hJoypadDown]
|
||||
and SELECT
|
||||
jr nz, .asm_91d87
|
||||
call Function91d9b
|
||||
call Function91dcd
|
||||
jr .asm_91d8a
|
||||
|
||||
.asm_91d87
|
||||
call Function91e5a
|
||||
|
||||
.asm_91d8a
|
||||
call DelayFrame
|
||||
jr .asm_91d6e
|
||||
|
||||
.asm_91d8f
|
||||
call ClearSprites
|
||||
pop af
|
||||
ld [wd003], a
|
||||
pop af
|
||||
ld [wd002], a
|
||||
ret
|
||||
; 91d9b
|
||||
|
||||
Function91d9b: ; 91d9b
|
||||
ld a, [hl]
|
||||
and $20
|
||||
jr nz, .asm_91da6
|
||||
ld a, [hl]
|
||||
and $10
|
||||
jr nz, .asm_91db7
|
||||
ret
|
||||
|
||||
.asm_91da6
|
||||
ld a, [hWY]
|
||||
cp $90
|
||||
ret z
|
||||
call ClearSprites
|
||||
ld a, $90
|
||||
ld [hWY], a
|
||||
xor a
|
||||
call Function91e1e
|
||||
ret
|
||||
|
||||
.asm_91db7
|
||||
ld a, [StatusFlags]
|
||||
bit 6, a
|
||||
ret z
|
||||
ld a, [hWY]
|
||||
and a
|
||||
ret z
|
||||
call ClearSprites
|
||||
xor a
|
||||
ld [hWY], a
|
||||
ld a, $1
|
||||
call Function91e1e
|
||||
ret
|
||||
; 91dcd
|
||||
|
||||
Function91dcd: ; 91dcd
|
||||
ld a, [hVBlankCounter]
|
||||
ld e, a
|
||||
and $f
|
||||
ret nz
|
||||
ld a, e
|
||||
and $10
|
||||
jr nz, .asm_91ddc
|
||||
call ClearSprites
|
||||
ret
|
||||
|
||||
.asm_91ddc
|
||||
hlcoord 0, 0
|
||||
ld de, Sprites
|
||||
ld bc, $a0
|
||||
call CopyBytes
|
||||
ret
|
||||
; 91de9
|
||||
|
||||
Function91de9: ; 91de9
|
||||
hlcoord 0, 0
|
||||
ld bc, SCREEN_WIDTH
|
||||
ld a, $7f
|
||||
call ByteFill
|
||||
hlcoord 0, 1
|
||||
ld a, $6
|
||||
ld [hli], a
|
||||
ld bc, SCREEN_HEIGHT
|
||||
ld a, $7
|
||||
call ByteFill
|
||||
ld [hl], $17
|
||||
call GetPokemonName
|
||||
hlcoord 2, 0
|
||||
call PlaceString
|
||||
ld h, b
|
||||
ld l, c
|
||||
ld de, String_91e16
|
||||
call PlaceString
|
||||
ret
|
||||
; 91e16
|
||||
|
||||
String_91e16:
|
||||
db "'S NEST@"
|
||||
; 91e1e
|
||||
|
||||
Function91e1e: ; 91e1e
|
||||
ld [wd003], a
|
||||
ld e, a
|
||||
callba Function2a01f
|
||||
decoord 0, 0
|
||||
ld hl, Sprites
|
||||
.asm_91e2e
|
||||
ld a, [de]
|
||||
and a
|
||||
jr z, .asm_91e4d
|
||||
push de
|
||||
ld e, a
|
||||
push hl
|
||||
callba GetLandmarkCoords
|
||||
pop hl
|
||||
ld a, d
|
||||
sub $4
|
||||
ld [hli], a
|
||||
ld a, e
|
||||
sub $4
|
||||
ld [hli], a
|
||||
ld a, $7f
|
||||
ld [hli], a
|
||||
xor a
|
||||
ld [hli], a
|
||||
pop de
|
||||
inc de
|
||||
jr .asm_91e2e
|
||||
|
||||
.asm_91e4d
|
||||
ld hl, Sprites
|
||||
decoord 0, 0
|
||||
ld bc, $a0
|
||||
call CopyBytes
|
||||
ret
|
||||
; 91e5a
|
||||
|
||||
Function91e5a: ; 91e5a
|
||||
call Function91ea9
|
||||
ret c
|
||||
|
||||
ld a, [wd002]
|
||||
ld e, a
|
||||
callba GetLandmarkCoords
|
||||
ld c, e
|
||||
ld b, d
|
||||
ld de, Unknown_91e9c
|
||||
ld hl, Sprites
|
||||
.asm_91e70
|
||||
ld a, [de]
|
||||
cp $80
|
||||
jr z, .asm_91e91
|
||||
|
||||
add b
|
||||
ld [hli], a
|
||||
inc de
|
||||
|
||||
ld a, [de]
|
||||
add c
|
||||
ld [hli], a
|
||||
inc de
|
||||
|
||||
ld a, [de]
|
||||
add $78
|
||||
ld [hli], a
|
||||
inc de
|
||||
|
||||
push bc
|
||||
ld c, 0
|
||||
ld a, [PlayerGender]
|
||||
bit 0, a
|
||||
jr z, .asm_91e8c
|
||||
inc c
|
||||
.asm_91e8c
|
||||
ld a, c
|
||||
ld [hli], a
|
||||
pop bc
|
||||
|
||||
jr .asm_91e70
|
||||
|
||||
.asm_91e91
|
||||
ld hl, Sprites + $10
|
||||
ld bc, SpritesEnd - (Sprites + $10)
|
||||
xor a
|
||||
call ByteFill
|
||||
ret
|
||||
; 91e9c
|
||||
|
||||
Unknown_91e9c: ; 91e9c
|
||||
db -8, -8, 0
|
||||
db -8, 0, 1
|
||||
db 0, -8, 2
|
||||
db 0, 0, 3
|
||||
db $80 ; terminator
|
||||
; 91ea9
|
||||
|
||||
Function91ea9: ; 91ea9
|
||||
ld a, [wd002]
|
||||
cp FAST_SHIP
|
||||
jr z, .johto
|
||||
cp KANTO_LANDMARK
|
||||
jr c, .johto
|
||||
|
||||
.kanto
|
||||
ld a, [wd003]
|
||||
and a
|
||||
jr z, .clear
|
||||
jr .ok
|
||||
|
||||
.johto
|
||||
ld a, [wd003]
|
||||
and a
|
||||
jr nz, .clear
|
||||
|
||||
.ok
|
||||
and a
|
||||
ret
|
||||
|
||||
.clear
|
||||
ld hl, Sprites
|
||||
ld bc, SpritesEnd - Sprites
|
||||
xor a
|
||||
call ByteFill
|
||||
scf
|
||||
ret
|
||||
; 91ed0
|
||||
|
||||
Function91ed0: ; 91ed0
|
||||
ld a, [wd002]
|
||||
cp FAST_SHIP
|
||||
jr z, .asm_91ede
|
||||
callba GetPlayerIcon
|
||||
ret
|
||||
|
||||
.asm_91ede
|
||||
ld de, FastShipGFX
|
||||
ld b, BANK(FastShipGFX)
|
||||
ret
|
||||
; 91ee4
|
||||
|
||||
TownMapBGUpdate: ; 91ee4
|
||||
; Update BG Map tiles and attributes
|
||||
|
||||
; BG Map address
|
||||
ld a, l
|
||||
ld [hBGMapAddress], a
|
||||
ld a, h
|
||||
ld [hBGMapAddress + 1], a
|
||||
|
||||
; Only update palettes on CGB
|
||||
ld a, [hCGB]
|
||||
and a
|
||||
jr z, .tiles
|
||||
|
||||
; BG Map mode 2 (palettes)
|
||||
ld a, 2
|
||||
ld [hBGMapMode], a
|
||||
|
||||
; The BG Map is updated in thirds, so we wait
|
||||
; 3 frames to update the whole screen's palettes.
|
||||
ld c, 3
|
||||
call DelayFrames
|
||||
|
||||
.tiles
|
||||
; Update BG Map tiles
|
||||
call WaitBGMap
|
||||
|
||||
; Turn off BG Map update
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
ret
|
||||
; 91eff
|
||||
|
||||
FillJohtoMap: ; 91eff
|
||||
ld de, JohtoMap
|
||||
jr FillTownMap
|
||||
|
||||
FillKantoMap: ; 91f04
|
||||
ld de, KantoMap
|
||||
|
||||
FillTownMap: ; 91f07
|
||||
hlcoord 0, 0
|
||||
.loop
|
||||
ld a, [de]
|
||||
cp $ff
|
||||
ret z
|
||||
ld a, [de]
|
||||
ld [hli], a
|
||||
inc de
|
||||
jr .loop
|
||||
; 91f13
|
||||
|
||||
TownMapPals: ; 91f13
|
||||
; Assign palettes based on tile ids
|
||||
|
||||
hlcoord 0, 0
|
||||
decoord 0, 0, AttrMap
|
||||
ld bc, 360
|
||||
.loop
|
||||
; Current tile
|
||||
ld a, [hli]
|
||||
push hl
|
||||
|
||||
; HP/borders use palette 0
|
||||
cp $60
|
||||
jr nc, .pal0
|
||||
|
||||
; The palette data is condensed to nybbles,
|
||||
; least-significant first.
|
||||
ld hl, TownMapPalMap
|
||||
srl a
|
||||
jr c, .odd
|
||||
|
||||
; Even-numbered tile ids take the bottom nybble...
|
||||
add l
|
||||
ld l, a
|
||||
ld a, h
|
||||
adc 0
|
||||
ld h, a
|
||||
ld a, [hl]
|
||||
and %111
|
||||
jr .update
|
||||
|
||||
.odd
|
||||
; ...and odd ids take the top.
|
||||
add l
|
||||
ld l, a
|
||||
ld a, h
|
||||
adc 0
|
||||
ld h, a
|
||||
ld a, [hl]
|
||||
swap a
|
||||
and %111
|
||||
jr .update
|
||||
|
||||
.pal0
|
||||
xor a
|
||||
|
||||
.update
|
||||
pop hl
|
||||
ld [de], a
|
||||
inc de
|
||||
dec bc
|
||||
ld a, b
|
||||
or c
|
||||
jr nz, .loop
|
||||
ret
|
||||
|
||||
TownMapPalMap:
|
||||
db $11, $21, $22, $00, $11, $13, $54, $54, $11, $21, $22, $00
|
||||
db $11, $10, $01, $00, $11, $21, $22, $00, $00, $00, $00, $00
|
||||
db $00, $00, $44, $04, $00, $00, $00, $00, $33, $33, $33, $33
|
||||
db $33, $33, $33, $03, $33, $33, $33, $33, $00, $00, $00, $00
|
||||
; 91f7b
|
||||
|
||||
TownMapMon: ; 91f7b
|
||||
; Draw the FlyMon icon at town map location in
|
||||
|
||||
; Get FlyMon species
|
||||
ld a, [CurPartyMon]
|
||||
ld hl, PartySpecies
|
||||
ld e, a
|
||||
ld d, $0
|
||||
add hl, de
|
||||
ld a, [hl]
|
||||
ld [wd265], a
|
||||
|
||||
; Get FlyMon icon
|
||||
ld e, 8 ; starting tile in VRAM
|
||||
callba GetSpeciesIcon
|
||||
|
||||
; Animation/palette
|
||||
ld de, 0
|
||||
ld a, $0
|
||||
call Function3b2a
|
||||
|
||||
ld hl, 3
|
||||
add hl, bc
|
||||
ld [hl], 8
|
||||
ld hl, 2
|
||||
add hl, bc
|
||||
ld [hl], 0
|
||||
ret
|
||||
; 91fa6
|
||||
|
||||
TownMapPlayerIcon: ; 91fa6
|
||||
; Draw the player icon at town map location in a
|
||||
push af
|
||||
|
||||
callba GetPlayerIcon
|
||||
|
||||
; Standing icon
|
||||
ld hl, VTiles0 tile $10
|
||||
ld c, 4 ; # tiles
|
||||
call Request2bpp
|
||||
|
||||
; Walking icon
|
||||
ld hl, $c0
|
||||
add hl, de
|
||||
ld d, h
|
||||
ld e, l
|
||||
ld hl, VTiles0 tile $14
|
||||
ld c, 4 ; # tiles
|
||||
ld a, BANK(ChrisSpriteGFX) ; does nothing
|
||||
call Request2bpp
|
||||
|
||||
; Animation/palette
|
||||
ld de, 0
|
||||
ld b, $0a ; Male
|
||||
ld a, [PlayerGender]
|
||||
bit 0, a
|
||||
jr z, .asm_91fd3
|
||||
ld b, $1e ; Female
|
||||
.asm_91fd3
|
||||
ld a, b
|
||||
call Function3b2a
|
||||
|
||||
ld hl, $3
|
||||
add hl, bc
|
||||
ld [hl], $10
|
||||
|
||||
pop af
|
||||
ld e, a
|
||||
push bc
|
||||
callba GetLandmarkCoords
|
||||
pop bc
|
||||
|
||||
ld hl, 4
|
||||
add hl, bc
|
||||
ld [hl], e
|
||||
ld hl, 5
|
||||
add hl, bc
|
||||
ld [hl], d
|
||||
ret
|
||||
; 0x91ff2
|
||||
|
||||
Function91ff2: ; 91ff2
|
||||
ld hl, TownMapGFX
|
||||
ld de, VTiles2
|
||||
lb bc, BANK(TownMapGFX), $30
|
||||
call DecompressRequest2bpp
|
||||
ret
|
||||
; 91fff
|
||||
|
||||
|
||||
JohtoMap: ; 91fff
|
||||
INCBIN "gfx/misc/johto.bin"
|
||||
; 92168
|
||||
|
||||
KantoMap: ; 92168
|
||||
INCBIN "gfx/misc/kanto.bin"
|
||||
; 922d1
|
||||
|
||||
|
||||
GFX_922d1: ; 922d1
|
||||
INCBIN "gfx/unknown/0922d1.2bpp"
|
||||
GFX_922e1: ; 922e1
|
||||
INCBIN "gfx/unknown/0922e1.2bpp"
|
||||
GFX_92301: ; 92301
|
||||
INCBIN "gfx/unknown/092301.2bpp"
|
@ -1,6 +1,6 @@
|
||||
LinkCommunications: ; 28000
|
||||
call WhiteBGMap
|
||||
ld c, $50
|
||||
call ClearBGPalettes
|
||||
ld c, 80
|
||||
call DelayFrames
|
||||
call ClearScreen
|
||||
call ClearSprites
|
||||
@ -8,7 +8,7 @@ LinkCommunications: ; 28000
|
||||
xor a
|
||||
ld [hSCX], a
|
||||
ld [hSCY], a
|
||||
ld c, $50
|
||||
ld c, 80
|
||||
call DelayFrames
|
||||
call ClearScreen
|
||||
call UpdateSprites
|
||||
@ -431,7 +431,7 @@ Function28177: ; 28177
|
||||
ld de, OTName
|
||||
ld bc, NAME_LENGTH
|
||||
call CopyBytes
|
||||
call Function222a
|
||||
call ReturnToMapFromSubmenu
|
||||
ld a, [wc2d7]
|
||||
push af
|
||||
ld a, $1
|
||||
@ -509,7 +509,7 @@ UnknownText_0x283ed: ; 0x283ed
|
||||
|
||||
Function283f2: ; 283f2
|
||||
ld a, $1
|
||||
ld [$ffcc], a
|
||||
ld [hFFCC], a
|
||||
.asm_283f6
|
||||
ld a, [hl]
|
||||
ld [hSerialSend], a
|
||||
@ -521,14 +521,14 @@ Function283f2: ; 283f2
|
||||
.asm_28401
|
||||
dec a
|
||||
jr nz, .asm_28401
|
||||
ld a, [$ffcc]
|
||||
ld a, [hFFCC]
|
||||
and a
|
||||
ld a, b
|
||||
pop bc
|
||||
jr z, .asm_28411
|
||||
dec hl
|
||||
xor a
|
||||
ld [$ffcc], a
|
||||
ld [hFFCC], a
|
||||
jr .asm_283f6
|
||||
|
||||
.asm_28411
|
||||
@ -2172,7 +2172,7 @@ Function28fa1: ; 28fa1
|
||||
Function28fdb: ; 28fdb
|
||||
xor a
|
||||
ld [wJumptableIndex], a
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearSprites
|
||||
call ClearTileMap
|
||||
call DisableLCD
|
||||
@ -2495,7 +2495,7 @@ Function29220: ; 29220
|
||||
; 29229
|
||||
|
||||
Function29229: ; 29229
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearTileMap
|
||||
call ClearSprites
|
||||
call DisableLCD
|
||||
@ -2623,7 +2623,7 @@ Function292ec: ; 292ec
|
||||
|
||||
Function292f6: ; 292f6
|
||||
push af
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call WaitTop
|
||||
ld a, VBGMap1 / $100
|
||||
ld [hBGMapAddress + 1], a
|
||||
@ -3902,7 +3902,7 @@ Function29dba: ; 29dba
|
||||
|
||||
Function29e0c: ; 29e0c
|
||||
xor a
|
||||
ld [$ffca], a
|
||||
ld [hFFCA], a
|
||||
ld a, [wcf5b]
|
||||
ld h, a
|
||||
ld a, [wcf5c]
|
||||
|
@ -655,7 +655,7 @@ Function467b: ; 467b
|
||||
ld hl, OBJECT_12
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
ld hl, OBJECT_27
|
||||
ld hl, OBJECT_MOVEMENT_BYTE_INDEX
|
||||
add hl, bc
|
||||
rept 3
|
||||
ld [hli], a
|
||||
@ -848,28 +848,28 @@ RestoreDefaultMovement: ; 4769
|
||||
; 4780
|
||||
|
||||
ClearObjectStructField27: ; 4780
|
||||
ld hl, OBJECT_27
|
||||
ld hl, OBJECT_MOVEMENT_BYTE_INDEX
|
||||
add hl, bc
|
||||
ld [hl], 0
|
||||
ret
|
||||
; 4787
|
||||
|
||||
IncrementObjectStructField27: ; 4787
|
||||
ld hl, OBJECT_27
|
||||
ld hl, OBJECT_MOVEMENT_BYTE_INDEX
|
||||
add hl, bc
|
||||
inc [hl]
|
||||
ret
|
||||
; 478d
|
||||
|
||||
DecrementObjectStructField27: ; 478d
|
||||
ld hl, OBJECT_27
|
||||
ld hl, OBJECT_MOVEMENT_BYTE_INDEX
|
||||
add hl, bc
|
||||
dec [hl]
|
||||
ret
|
||||
; 4793
|
||||
|
||||
JumptoObjectStructField27: ; 4793
|
||||
ld hl, OBJECT_27
|
||||
ld hl, OBJECT_MOVEMENT_BYTE_INDEX
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
pop hl
|
||||
@ -1043,17 +1043,17 @@ Function47dd: ; 47dd
|
||||
|
||||
.ObeyDPad: ; 487c
|
||||
ld hl, Function5000
|
||||
jp Function5041
|
||||
jp HandleMovementData
|
||||
; 4882
|
||||
|
||||
.Movement08: ; 4882
|
||||
ld hl, Function5015
|
||||
jp Function5041
|
||||
jp HandleMovementData
|
||||
; 4888
|
||||
|
||||
.Movement09: ; 4888
|
||||
ld hl, Function5026
|
||||
jp Function5041
|
||||
jp HandleMovementData
|
||||
; 488e
|
||||
|
||||
.Movement0a: ; 488e
|
||||
@ -1070,7 +1070,7 @@ Function47dd: ; 47dd
|
||||
|
||||
.Movement0d: ; 4897
|
||||
ld hl, Function5000
|
||||
jp Function5041
|
||||
jp HandleMovementData
|
||||
; 489d
|
||||
|
||||
.Movement0e: ; 489d
|
||||
@ -1079,12 +1079,12 @@ Function47dd: ; 47dd
|
||||
|
||||
.Follow: ; 48a0
|
||||
ld hl, Function54e6
|
||||
jp Function5041
|
||||
jp HandleMovementData
|
||||
; 48a6
|
||||
|
||||
.Script: ; 48a6
|
||||
ld hl, Function500e
|
||||
jp Function5041
|
||||
jp HandleMovementData
|
||||
; 48ac
|
||||
|
||||
.Strength: ; 48ac
|
||||
@ -1149,12 +1149,15 @@ Function47dd: ; 47dd
|
||||
ld hl, OBJECT_MAP_X
|
||||
add hl, bc
|
||||
ld d, [hl]
|
||||
|
||||
ld hl, OBJECT_MAP_Y
|
||||
add hl, bc
|
||||
ld e, [hl]
|
||||
|
||||
ld hl, OBJECT_32
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
|
||||
push bc
|
||||
call GetObjectStruct
|
||||
ld hl, OBJECT_DIRECTION_WALKING
|
||||
@ -1162,6 +1165,7 @@ Function47dd: ; 47dd
|
||||
ld a, [hl]
|
||||
cp STANDING
|
||||
jr z, .standing
|
||||
|
||||
ld hl, OBJECT_NEXT_MAP_X
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
@ -2400,11 +2404,14 @@ UpdateJumpPosition: ; 4fd5
|
||||
; 5000
|
||||
|
||||
Function5000: ; unscripted?
|
||||
; copy [wc3de] to [wc2df]
|
||||
ld a, [wc2de]
|
||||
ld hl, wc2df
|
||||
ld [hl], a
|
||||
ld a, $3e
|
||||
; load [wc2de] with movement_step_sleep_1
|
||||
ld a, movement_step_sleep_1
|
||||
ld [wc2de], a
|
||||
; recover the previous value of [wc2de]
|
||||
ld a, [hl]
|
||||
ret
|
||||
; 500e
|
||||
@ -2416,7 +2423,7 @@ Function500e: ; scripted
|
||||
; 5015
|
||||
|
||||
Function5015: ; 5015
|
||||
ld hl, OBJECT_27
|
||||
ld hl, OBJECT_MOVEMENT_BYTE_INDEX
|
||||
add hl, bc
|
||||
ld e, [hl]
|
||||
inc [hl]
|
||||
@ -2431,7 +2438,7 @@ Function5015: ; 5015
|
||||
; 5026
|
||||
|
||||
Function5026: ; 5026
|
||||
ld hl, OBJECT_27
|
||||
ld hl, OBJECT_MOVEMENT_BYTE_INDEX
|
||||
add hl, bc
|
||||
ld e, [hl]
|
||||
inc [hl]
|
||||
@ -2446,16 +2453,16 @@ Function5026: ; 5026
|
||||
; 5037
|
||||
|
||||
Function5037: ; 5037
|
||||
ld hl, Function503d
|
||||
jp Function5041
|
||||
ld hl, GetMovementPerson
|
||||
jp HandleMovementData
|
||||
; 503d
|
||||
|
||||
Function503d: ; 503d
|
||||
GetMovementPerson: ; 503d
|
||||
ld a, [wMovementPerson]
|
||||
ret
|
||||
; 5041
|
||||
|
||||
Function5041: ; 5041
|
||||
HandleMovementData: ; 5041
|
||||
call CopyMovementPointer
|
||||
.loop
|
||||
xor a
|
||||
@ -2484,7 +2491,7 @@ GetMovementByte: ; 505e
|
||||
jp [hl]
|
||||
; 5065
|
||||
|
||||
Function5065: ; 5065
|
||||
ContinueReadingMovement: ; 5065
|
||||
ld a, 1
|
||||
ld [wc2ea], a
|
||||
ret
|
||||
@ -2563,7 +2570,8 @@ Function54e6: ; 54e6
|
||||
.done
|
||||
call Function550a
|
||||
ret c
|
||||
ld a, $3e
|
||||
|
||||
ld a, movement_step_sleep_1
|
||||
ret
|
||||
; 550a
|
||||
|
||||
@ -2585,7 +2593,7 @@ Function550a: ; 550a
|
||||
.nope
|
||||
ld a, $ff
|
||||
ld [wObjectFollow_Follower], a
|
||||
ld a, $47
|
||||
ld a, movement_step_end
|
||||
scf
|
||||
ret
|
||||
; 5529
|
||||
@ -2696,6 +2704,7 @@ Function5582: ; 5582
|
||||
Function55ac: ; 55ac
|
||||
call FindFirstEmptyObjectStruct
|
||||
ret nc
|
||||
|
||||
ld d, h
|
||||
ld e, l
|
||||
callba Function8286
|
||||
@ -2703,11 +2712,14 @@ Function55ac: ; 55ac
|
||||
; 55b9
|
||||
|
||||
Function55b9: ; 55b9
|
||||
; load into wc2f0:
|
||||
; -1, -1, [de], [de + 1], [de + 2], [hMapObjectIndexBuffer], [MapX], [MapY], -1
|
||||
ld hl, wc2f0
|
||||
ld [hl], -1
|
||||
inc hl
|
||||
ld [hl], -1
|
||||
inc hl
|
||||
|
||||
ld a, [de]
|
||||
inc de
|
||||
ld [hli], a
|
||||
@ -2716,8 +2728,10 @@ Function55b9: ; 55b9
|
||||
ld [hli], a
|
||||
ld a, [de]
|
||||
ld [hli], a
|
||||
|
||||
ld a, [hMapObjectIndexBuffer]
|
||||
ld [hli], a
|
||||
|
||||
push hl
|
||||
ld hl, OBJECT_MAP_X
|
||||
add hl, bc
|
||||
@ -2726,6 +2740,7 @@ Function55b9: ; 55b9
|
||||
add hl, bc
|
||||
ld e, [hl]
|
||||
pop hl
|
||||
|
||||
ld [hl], d
|
||||
inc hl
|
||||
ld [hl], e
|
||||
@ -2786,17 +2801,21 @@ Function561d: ; 561d
|
||||
Function5629: ; 5629
|
||||
cp NUM_OBJECTS
|
||||
ret nc
|
||||
|
||||
call GetMapObject
|
||||
ld hl, MAPOBJECT_OBJECT_STRUCT_ID
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
cp -1
|
||||
ret z
|
||||
|
||||
cp NUM_OBJECT_STRUCTS
|
||||
ret nc
|
||||
|
||||
call GetObjectStruct
|
||||
call GetObjectSprite
|
||||
ret z
|
||||
|
||||
call Function5673
|
||||
ret
|
||||
; 5645
|
||||
@ -2977,9 +2996,9 @@ Function56cd: ; 56cd
|
||||
|
||||
.ok7
|
||||
ld a, d
|
||||
ld [$ffbf], a
|
||||
ld [hFFBF], a
|
||||
.loop
|
||||
ld a, [$ffbf]
|
||||
ld a, [hFFBF]
|
||||
ld d, a
|
||||
ld a, [hUsedSpriteTile]
|
||||
add e
|
||||
@ -3180,7 +3199,7 @@ ResetFollower: ; 5847
|
||||
cp -1
|
||||
ret z
|
||||
call GetObjectStruct
|
||||
callba Function58e3
|
||||
callba Function58e3 ; no need to bankswitch
|
||||
ld a, -1
|
||||
ld [wObjectFollow_Follower], a
|
||||
ret
|
||||
@ -3294,16 +3313,19 @@ Function58e3: ; 58e3
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
cp -1
|
||||
jp z, Function5903
|
||||
jp z, Function5903 ; a jr would have been appropriate here
|
||||
|
||||
push bc
|
||||
call GetMapObject
|
||||
ld hl, MAPOBJECT_MOVEMENT
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
pop bc
|
||||
|
||||
ld hl, OBJECT_MOVEMENTTYPE
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
|
||||
ld hl, OBJECT_09
|
||||
add hl, bc
|
||||
ld [hl], 0
|
||||
@ -3322,6 +3344,7 @@ Function5903: ; 5903
|
||||
ld hl, OBJECT_MOVEMENTTYPE
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
|
||||
ld hl, OBJECT_09
|
||||
add hl, bc
|
||||
ld [hl], 0
|
||||
@ -3495,7 +3518,7 @@ Function59f3: ; 59f3
|
||||
.next
|
||||
ld a, [hli]
|
||||
ld d, a
|
||||
and %11110000
|
||||
and $f0
|
||||
ret z
|
||||
cp c
|
||||
jr nz, .next
|
||||
@ -3503,20 +3526,20 @@ Function59f3: ; 59f3
|
||||
push bc
|
||||
push hl
|
||||
ld a, d
|
||||
and %00001111
|
||||
call Function5ac2
|
||||
call Function5a0d
|
||||
and $f
|
||||
call .GetObjectStructPointer
|
||||
call .asm_5a0d
|
||||
pop hl
|
||||
pop bc
|
||||
jr .next
|
||||
; 5a0d
|
||||
|
||||
Function5a0d: ; 5a0d
|
||||
.asm_5a0d: ; 5a0d
|
||||
ld hl, OBJECT_SPRITE_TILE
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
and %01111111
|
||||
ld [$ffc1], a
|
||||
ld [hFFC1], a
|
||||
|
||||
xor a
|
||||
bit 7, [hl]
|
||||
@ -3550,7 +3573,7 @@ Function5a0d: ; 5a0d
|
||||
jr z, .skip4
|
||||
or %10000000
|
||||
.skip4
|
||||
ld [$ffc2], a
|
||||
ld [hFFC2], a
|
||||
|
||||
ld hl, OBJECT_SPRITE_X
|
||||
add hl, bc
|
||||
@ -3565,7 +3588,7 @@ Function5a0d: ; 5a0d
|
||||
ld e, a
|
||||
ld a, [wd14c]
|
||||
add e
|
||||
ld [$ffbf], a
|
||||
ld [hFFBF], a
|
||||
|
||||
ld hl, OBJECT_SPRITE_Y
|
||||
add hl, bc
|
||||
@ -3580,7 +3603,7 @@ Function5a0d: ; 5a0d
|
||||
ld e, a
|
||||
ld a, [wd14d]
|
||||
add e
|
||||
ld [$ffc0], a
|
||||
ld [hFFC0], a
|
||||
|
||||
ld hl, OBJECT_FACING_STEP
|
||||
add hl, bc
|
||||
@ -3609,14 +3632,14 @@ Function5a0d: ; 5a0d
|
||||
jr nc, .full
|
||||
|
||||
.addsprite
|
||||
ld a, [$ffc0]
|
||||
ld a, [hFFC0]
|
||||
add [hl]
|
||||
inc hl
|
||||
|
||||
ld [bc], a
|
||||
inc c
|
||||
|
||||
ld a, [$ffbf]
|
||||
ld a, [hFFBF]
|
||||
add [hl]
|
||||
inc hl
|
||||
|
||||
@ -3626,7 +3649,7 @@ Function5a0d: ; 5a0d
|
||||
ld e, [hl]
|
||||
inc hl
|
||||
|
||||
ld a, [$ffc1]
|
||||
ld a, [hFFC1]
|
||||
bit 2, e
|
||||
jr z, .nope1
|
||||
xor a
|
||||
@ -3640,7 +3663,7 @@ Function5a0d: ; 5a0d
|
||||
ld a, e
|
||||
bit 1, a
|
||||
jr z, .nope2
|
||||
ld a, [$ffc2]
|
||||
ld a, [hFFC2]
|
||||
or e
|
||||
.nope2
|
||||
and %11110000
|
||||
@ -3665,7 +3688,7 @@ Function5a0d: ; 5a0d
|
||||
ret
|
||||
; 5ac2
|
||||
|
||||
Function5ac2: ; 5ac2
|
||||
.GetObjectStructPointer: ; 5ac2
|
||||
ld c, a
|
||||
ld b, 0
|
||||
ld hl, .Addresses
|
||||
|
@ -17,28 +17,28 @@ endr
|
||||
; 15377
|
||||
|
||||
MapSetupScripts: ; 15377
|
||||
dw MapSetupScript1
|
||||
dw MapSetupScript2
|
||||
dw MapSetupScript3
|
||||
dw MapSetupScript4
|
||||
dw MapSetupScript5
|
||||
dw MapSetupScript6
|
||||
dw MapSetupScript7
|
||||
dw MapSetupScript8
|
||||
dw MapSetupScript9
|
||||
dw MapSetupScript10
|
||||
dw MapSetupScript11
|
||||
dw MapSetupScript12
|
||||
dw MapSetupScript_Warp
|
||||
dw MapSetupScript_Continue
|
||||
dw MapSetupScript_ReloadMap
|
||||
dw MapSetupScript_Teleport
|
||||
dw MapSetupScript_Door
|
||||
dw MapSetupScript_Fall
|
||||
dw MapSetupScript_Connection
|
||||
dw MapSetupScript_LinkReturn
|
||||
dw MapSetupScript_Train
|
||||
dw MapSetupScript_Submenu
|
||||
dw MapSetupScript_BadWarp
|
||||
dw MapSetupScript_Fly
|
||||
; 1538f
|
||||
|
||||
MapSetupScript4: ; 1538f
|
||||
MapSetupScript_Teleport: ; 1538f
|
||||
db map_prolong_sprites
|
||||
|
||||
MapSetupScript12: ; 15390
|
||||
MapSetupScript_Fly: ; 15390
|
||||
db map_fade_out_palettes
|
||||
db map_keep_roam
|
||||
|
||||
MapSetupScript1: ; 15392
|
||||
MapSetupScript_Warp: ; 15392
|
||||
db map_lcd_off
|
||||
db map_sound_off
|
||||
db map_load_spawn
|
||||
@ -63,7 +63,7 @@ MapSetupScript1: ; 15392
|
||||
db map_wildmons
|
||||
db map_end_setup_script
|
||||
|
||||
MapSetupScript11: ; 153a9
|
||||
MapSetupScript_BadWarp: ; 153a9
|
||||
db map_load_spawn
|
||||
db map_attributes
|
||||
db map_change_callback
|
||||
@ -87,7 +87,7 @@ MapSetupScript11: ; 153a9
|
||||
db map_wildmons
|
||||
db map_end_setup_script
|
||||
|
||||
MapSetupScript7: ; 153bf
|
||||
MapSetupScript_Connection: ; 153bf
|
||||
db map_animations_off
|
||||
db map_load_connection
|
||||
db map_attributes
|
||||
@ -106,13 +106,13 @@ MapSetupScript7: ; 153bf
|
||||
db map_animations_on
|
||||
db map_end_setup_script
|
||||
|
||||
MapSetupScript6: ; 153d0
|
||||
MapSetupScript_Fall: ; 153d0
|
||||
db map_prolong_sprites
|
||||
|
||||
MapSetupScript5: ; 153d1
|
||||
MapSetupScript_Door: ; 153d1
|
||||
db map_fade_out_palettes
|
||||
|
||||
MapSetupScript9: ; 153d2
|
||||
MapSetupScript_Train: ; 153d2
|
||||
db map_load_warp
|
||||
db map_attributes
|
||||
db map_warp_face
|
||||
@ -135,7 +135,7 @@ MapSetupScript9: ; 153d2
|
||||
db map_update_roam
|
||||
db map_end_setup_script
|
||||
|
||||
MapSetupScript3: ; 153e7
|
||||
MapSetupScript_ReloadMap: ; 153e7
|
||||
db map_fade
|
||||
db map_clear_bg_palettes
|
||||
db map_lcd_off
|
||||
@ -153,7 +153,7 @@ MapSetupScript3: ; 153e7
|
||||
db map_wildmons
|
||||
db map_end_setup_script
|
||||
|
||||
MapSetupScript8: ; 153f7
|
||||
MapSetupScript_LinkReturn: ; 153f7
|
||||
db map_fade
|
||||
db map_lcd_off
|
||||
db map_sound_off
|
||||
@ -172,7 +172,7 @@ MapSetupScript8: ; 153f7
|
||||
db map_text_scroll_off
|
||||
db map_end_setup_script
|
||||
|
||||
MapSetupScript2: ; 15408
|
||||
MapSetupScript_Continue: ; 15408
|
||||
db map_lcd_off
|
||||
db map_sound_off
|
||||
db map_attributes_2
|
||||
@ -192,7 +192,7 @@ MapSetupScript2: ; 15408
|
||||
db map_wildmons
|
||||
db map_end_setup_script
|
||||
|
||||
MapSetupScript10: ; 1541a
|
||||
MapSetupScript_Submenu: ; 1541a
|
||||
db map_load_blocks
|
||||
db map_connection_blocks
|
||||
db map_end_setup_script
|
||||
@ -245,7 +245,7 @@ endr
|
||||
MapSetupCommands: ; 15440
|
||||
dba EnableLCD ; 00
|
||||
dba DisableLCD ; 01
|
||||
dba SoundRestart ; 02
|
||||
dba MapSetup_Sound_Off ; 02
|
||||
dba PlayMapMusic ; 03
|
||||
dba RestartMapMusic ; 04
|
||||
dba FadeToMapMusic ; 05
|
||||
@ -271,9 +271,9 @@ MapSetupCommands: ; 15440
|
||||
dba LoadWarpData ; 19
|
||||
dba LoadMapAttributes ; 1a
|
||||
dba LoadMapAttributes_IgnoreHidden ; 1b
|
||||
dba WhiteBGMap ; 1c
|
||||
dba FadeBlackBGMap ; 1d
|
||||
dba FadeInBGMap ; 1e
|
||||
dba ClearBGPalettes ; 1c
|
||||
dba FadeOutPalettes ; 1d
|
||||
dba FadeInPalettes ; 1e
|
||||
dba GetCoordOfUpperLeftCorner ; 1f
|
||||
dba RestoreFacingAfterWarp ; 20
|
||||
dba SpawnInFacingDown ; 21
|
||||
|
@ -61,32 +61,32 @@ MovementPointers: ; 5075
|
||||
dw Movement_fix_facing ; 3b
|
||||
dw Movement_3c ; 3c
|
||||
dw Movement_hide_person ; 3d
|
||||
dw Movement_show_person ; 3e
|
||||
dw Movement_3f ; 3f
|
||||
dw Movement_40 ; 40
|
||||
dw Movement_41 ; 41
|
||||
dw Movement_42 ; 42
|
||||
dw Movement_43 ; 43
|
||||
dw Movement_44 ; 44
|
||||
dw Movement_accelerate_last ; 45
|
||||
dw Movement_step_sleep_1 ; 3e
|
||||
dw Movement_step_sleep_2 ; 3f
|
||||
dw Movement_step_sleep_3 ; 40
|
||||
dw Movement_step_sleep_4 ; 41
|
||||
dw Movement_step_sleep_5 ; 42
|
||||
dw Movement_step_sleep_6 ; 43
|
||||
dw Movement_step_sleep_7 ; 44
|
||||
dw Movement_step_sleep_8 ; 45
|
||||
dw Movement_step_sleep ; 46
|
||||
dw Movement_step_end ; 47
|
||||
dw Movement_48 ; 48
|
||||
dw Movement_remove_person ; 49
|
||||
dw Movement_4a ; 4a
|
||||
dw Movement_step_loop ; 4a
|
||||
dw Movement_4b ; 4b
|
||||
dw Movement_teleport_from ; 4c
|
||||
dw Movement_teleport_to ; 4d
|
||||
dw Movement_skyfall ; 4e
|
||||
dw Movement_step_wait5 ; 4f
|
||||
dw Movement_50 ; 50
|
||||
dw Movement_51 ; 51
|
||||
dw Movement_52 ; 52
|
||||
dw Movement_fish_got_bite ; 51
|
||||
dw Movement_fish_cast_rod ; 52
|
||||
dw Movement_hide_emote ; 53
|
||||
dw Movement_show_emote ; 54
|
||||
dw Movement_step_shake ; 55
|
||||
dw Movement_56 ; 56
|
||||
dw Movement_57 ; 57
|
||||
dw Movement_rock_smash ; 57
|
||||
dw Movement_58 ; 58
|
||||
dw Movement_59 ; 59
|
||||
; 5129
|
||||
@ -139,7 +139,7 @@ Movement_step_wait5: ; 5145
|
||||
ld [hl], $3
|
||||
ld hl, OBJECT_DIRECTION_WALKING
|
||||
add hl, bc
|
||||
ld [hl], $ff
|
||||
ld [hl], STANDING
|
||||
ret
|
||||
; 516a
|
||||
|
||||
@ -156,14 +156,14 @@ Movement_58: ; 516a
|
||||
ld [hl], a
|
||||
ld hl, OBJECT_DIRECTION_WALKING
|
||||
add hl, bc
|
||||
ld [hl], $ff
|
||||
ld [hl], STANDING
|
||||
ld hl, OBJECT_09
|
||||
add hl, bc
|
||||
ld [hl], $12
|
||||
ret
|
||||
; 5189
|
||||
|
||||
Movement_51: ; 5189
|
||||
Movement_fish_got_bite: ; 5189
|
||||
ld hl, OBJECT_11
|
||||
add hl, bc
|
||||
ld [hl], $6
|
||||
@ -173,7 +173,7 @@ Movement_51: ; 5189
|
||||
ret
|
||||
; 5196
|
||||
|
||||
Movement_57: ; 5196
|
||||
Movement_rock_smash: ; 5196
|
||||
call GetMovementByte
|
||||
ld hl, OBJECT_STEP_DURATION
|
||||
add hl, bc
|
||||
@ -187,7 +187,7 @@ Movement_57: ; 5196
|
||||
ret
|
||||
; 51ab
|
||||
|
||||
Movement_52: ; 51ab
|
||||
Movement_fish_cast_rod: ; 51ab
|
||||
ld hl, OBJECT_11
|
||||
add hl, bc
|
||||
ld [hl], $6
|
||||
@ -197,11 +197,11 @@ Movement_52: ; 51ab
|
||||
ret
|
||||
; 51b8
|
||||
|
||||
Movement_4a: ; 51b8
|
||||
ld hl, OBJECT_27
|
||||
Movement_step_loop: ; 51b8
|
||||
ld hl, OBJECT_MOVEMENT_BYTE_INDEX
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
jp Function5065
|
||||
jp ContinueReadingMovement
|
||||
; 51c1
|
||||
|
||||
Movement_step_end: ; 51c1
|
||||
@ -209,11 +209,14 @@ Movement_step_end: ; 51c1
|
||||
ld hl, OBJECT_MOVEMENTTYPE
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
ld hl, OBJECT_27
|
||||
|
||||
ld hl, OBJECT_MOVEMENT_BYTE_INDEX
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
|
||||
ld hl, VramState
|
||||
res 7, [hl]
|
||||
|
||||
ld hl, OBJECT_09
|
||||
add hl, bc
|
||||
ld [hl], $1
|
||||
@ -225,16 +228,20 @@ Movement_48: ; 51db
|
||||
ld hl, OBJECT_MOVEMENTTYPE
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
ld hl, OBJECT_27
|
||||
|
||||
ld hl, OBJECT_MOVEMENT_BYTE_INDEX
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
|
||||
call GetMovementByte
|
||||
ld hl, OBJECT_STEP_DURATION
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
|
||||
ld hl, OBJECT_09
|
||||
add hl, bc
|
||||
ld [hl], $3
|
||||
|
||||
ld hl, VramState
|
||||
res 7, [hl]
|
||||
ret
|
||||
@ -245,10 +252,10 @@ Movement_remove_person: ; 51fd
|
||||
ld hl, wObjectFollow_Leader
|
||||
ld a, [hMapObjectIndexBuffer]
|
||||
cp [hl]
|
||||
jr nz, .asm_520a
|
||||
ld [hl], $ff
|
||||
jr nz, .not_leading
|
||||
ld [hl], -1
|
||||
|
||||
.asm_520a
|
||||
.not_leading
|
||||
ld hl, VramState
|
||||
res 7, [hl]
|
||||
ret
|
||||
@ -258,43 +265,45 @@ Movement_4b: ; 5210
|
||||
ld hl, OBJECT_11
|
||||
add hl, bc
|
||||
ld [hl], $1
|
||||
|
||||
ld hl, OBJECT_09
|
||||
add hl, bc
|
||||
ld [hl], $4
|
||||
|
||||
ld hl, VramState
|
||||
res 7, [hl]
|
||||
ret
|
||||
; 5222
|
||||
|
||||
Movement_show_person: ; 5222
|
||||
Movement_step_sleep_1: ; 5222
|
||||
ld a, $1
|
||||
jr Function5247
|
||||
|
||||
Movement_3f: ; 5226
|
||||
Movement_step_sleep_2: ; 5226
|
||||
ld a, $2
|
||||
jr Function5247
|
||||
|
||||
Movement_40: ; 522a
|
||||
Movement_step_sleep_3: ; 522a
|
||||
ld a, $3
|
||||
jr Function5247
|
||||
|
||||
Movement_41: ; 522e
|
||||
Movement_step_sleep_4: ; 522e
|
||||
ld a, $4
|
||||
jr Function5247
|
||||
|
||||
Movement_42: ; 5232
|
||||
Movement_step_sleep_5: ; 5232
|
||||
ld a, $5
|
||||
jr Function5247
|
||||
|
||||
Movement_43: ; 5236
|
||||
Movement_step_sleep_6: ; 5236
|
||||
ld a, $6
|
||||
jr Function5247
|
||||
|
||||
Movement_44: ; 523a
|
||||
Movement_step_sleep_7: ; 523a
|
||||
ld a, $7
|
||||
jr Function5247
|
||||
|
||||
Movement_accelerate_last: ; 523e
|
||||
Movement_step_sleep_8: ; 523e
|
||||
ld a, $8
|
||||
jr Function5247
|
||||
|
||||
@ -309,15 +318,18 @@ Function5247: ; 5247
|
||||
ld hl, OBJECT_STEP_DURATION
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
|
||||
ld hl, OBJECT_09
|
||||
add hl, bc
|
||||
ld [hl], $3
|
||||
|
||||
ld hl, OBJECT_11
|
||||
add hl, bc
|
||||
ld [hl], $1
|
||||
|
||||
ld hl, OBJECT_DIRECTION_WALKING
|
||||
add hl, bc
|
||||
ld [hl], $ff
|
||||
ld [hl], STANDING
|
||||
ret
|
||||
; 525f
|
||||
|
||||
@ -334,7 +346,7 @@ Movement_50: ; 525f
|
||||
ld [hl], $3
|
||||
ld hl, OBJECT_DIRECTION_WALKING
|
||||
add hl, bc
|
||||
ld [hl], $ff
|
||||
ld [hl], STANDING
|
||||
ret
|
||||
; 5279
|
||||
|
||||
@ -351,7 +363,7 @@ Movement_56: ; 5279
|
||||
ld [hl], $b
|
||||
ld hl, OBJECT_DIRECTION_WALKING
|
||||
add hl, bc
|
||||
ld [hl], $ff
|
||||
ld [hl], STANDING
|
||||
ret
|
||||
; 5293
|
||||
|
||||
@ -359,52 +371,52 @@ Movement_38: ; 5293
|
||||
ld hl, OBJECT_FLAGS1
|
||||
add hl, bc
|
||||
res 3, [hl]
|
||||
jp Function5065
|
||||
jp ContinueReadingMovement
|
||||
; 529c
|
||||
|
||||
Movement_39: ; 529c
|
||||
ld hl, OBJECT_FLAGS1
|
||||
add hl, bc
|
||||
set 3, [hl]
|
||||
jp Function5065
|
||||
jp ContinueReadingMovement
|
||||
; 52a5
|
||||
|
||||
Movement_remove_fixed_facing: ; 52a5
|
||||
ld hl, OBJECT_FLAGS1
|
||||
add hl, bc
|
||||
res 2, [hl]
|
||||
jp Function5065
|
||||
jp ContinueReadingMovement
|
||||
; 52ae
|
||||
|
||||
Movement_fix_facing: ; 52ae
|
||||
ld hl, OBJECT_FLAGS1
|
||||
add hl, bc
|
||||
set 2, [hl]
|
||||
jp Function5065
|
||||
jp ContinueReadingMovement
|
||||
; 52b7
|
||||
|
||||
Movement_3c: ; 52b7
|
||||
ld hl, OBJECT_FLAGS1
|
||||
add hl, bc
|
||||
res 0, [hl]
|
||||
jp Function5065
|
||||
jp ContinueReadingMovement
|
||||
; 52c0
|
||||
|
||||
Movement_hide_person: ; 52c0
|
||||
ld hl, OBJECT_FLAGS1
|
||||
add hl, bc
|
||||
set 0, [hl]
|
||||
jp Function5065
|
||||
jp ContinueReadingMovement
|
||||
; 52c9
|
||||
|
||||
Movement_hide_emote: ; 52c9
|
||||
call Function5579
|
||||
jp Function5065
|
||||
jp ContinueReadingMovement
|
||||
; 52cf
|
||||
|
||||
Movement_show_emote: ; 52cf
|
||||
call Function5547
|
||||
jp Function5065
|
||||
jp ContinueReadingMovement
|
||||
; 52d5
|
||||
|
||||
Movement_step_shake: ; 52d5
|
||||
@ -413,7 +425,7 @@ Movement_step_shake: ; 52d5
|
||||
|
||||
call GetMovementByte
|
||||
call Function5565
|
||||
jp Function5065
|
||||
jp ContinueReadingMovement
|
||||
; 52de
|
||||
|
||||
Movement_turn_head_down: ; 52de
|
||||
@ -441,7 +453,7 @@ TurnHead: ; 52ee
|
||||
ld [hl], $1
|
||||
ld hl, OBJECT_DIRECTION_WALKING
|
||||
add hl, bc
|
||||
ld [hl], $ff
|
||||
ld [hl], STANDING
|
||||
ret
|
||||
; 5300
|
||||
|
||||
|
@ -40,7 +40,7 @@ NamingScreen: ; 116c1
|
||||
; 116f8
|
||||
|
||||
Function116f8: ; 116f8
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
ld b, $8
|
||||
call GetSGBLayout
|
||||
call DisableLCD
|
||||
|
@ -594,7 +594,7 @@ Function103fd: ; 103fd
|
||||
ld [Options], a
|
||||
ld a, $8
|
||||
ld [PartyMenuActionText], a
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
callba Function5004f
|
||||
callba Function50405
|
||||
callba Function503e0
|
||||
@ -922,7 +922,7 @@ Function105dc: ; 105dc (4:45dc)
|
||||
ret
|
||||
|
||||
.asm_1066c: ; 1066c (4:466c)
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
jr .asm_1067e
|
||||
|
||||
.BattleOnly: ; 10671 (4:4671)
|
||||
@ -1401,7 +1401,7 @@ Function108d4: ; 108d4 (4:48d4)
|
||||
|
||||
|
||||
Function10955: ; 10955
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearTileMap
|
||||
call ClearSprites
|
||||
call DisableLCD
|
||||
|
@ -2,10 +2,10 @@ SelectMonFromParty: ; 50000
|
||||
call DisableSpriteUpdates
|
||||
xor a
|
||||
ld [PartyMenuActionText], a
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call Function5003f
|
||||
call WaitBGMap
|
||||
call Function32f9
|
||||
call SetPalettes
|
||||
call DelayFrame
|
||||
call PartyMenuSelect
|
||||
call Function2b74
|
||||
@ -17,12 +17,12 @@ Function5001d: ; 5001d
|
||||
ld a, b
|
||||
ld [PartyMenuActionText], a
|
||||
call DisableSpriteUpdates
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call Function5003f
|
||||
call WaitBGMap
|
||||
ld b, $a
|
||||
call GetSGBLayout
|
||||
call Function32f9
|
||||
call SetPalettes
|
||||
call DelayFrame
|
||||
call PartyMenuSelect
|
||||
call Function2b74
|
||||
@ -57,43 +57,42 @@ WritePartyMenuTilemap: ; 0x5005f
|
||||
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
||||
ld a, " "
|
||||
call ByteFill ; blank the tilemap
|
||||
call Function50396 ; This reads from a pointer table???
|
||||
call GetPartyMenuTilemapPointers ; This reads from a pointer table???
|
||||
.loop
|
||||
ld a, [hli]
|
||||
cp -1
|
||||
jr z, .asm_50084 ; 0x5007a $8
|
||||
cp $ff
|
||||
jr z, .end ; 0x5007a $8
|
||||
push hl
|
||||
ld hl, .jumptable
|
||||
ld hl, .Jumptable
|
||||
rst JumpTable
|
||||
pop hl
|
||||
jr .loop ; 0x50082 $f3
|
||||
|
||||
.asm_50084
|
||||
.end
|
||||
pop af
|
||||
ld [Options], a
|
||||
ret
|
||||
; 0x50089
|
||||
|
||||
.jumptable: ; 50089
|
||||
dw .displaynicks ; 0
|
||||
dw .drawhpbars ; 1
|
||||
dw Function50138 ; 2
|
||||
dw Function50176 ; 3
|
||||
dw Function501b2 ; 4
|
||||
dw Function501e0 ; 5
|
||||
dw Function5022f ; 6
|
||||
dw Function502b1 ; 7
|
||||
dw Function50307 ; 8
|
||||
.Jumptable: ; 50089
|
||||
dw PlacePartyNicknames
|
||||
dw PlacePartyHPBar
|
||||
dw PlacePartyMenuHPDigits
|
||||
dw PlacePartyMonLevel
|
||||
dw PlacePartyMonStatus
|
||||
dw PlacePartyMonTMHMCompatibility
|
||||
dw PlacePartyMonEvoStoneCompatibility
|
||||
dw PlacePartyMonGender
|
||||
dw PlacePartyMonMobileBattleSelection
|
||||
; 5009b
|
||||
|
||||
.displaynicks: ; 5009b
|
||||
PlacePartyNicknames: ; 5009b
|
||||
hlcoord 3, 1
|
||||
ld a, [PartyCount]
|
||||
and a
|
||||
jr z, .done
|
||||
jr z, .end
|
||||
ld c, a
|
||||
ld b, $0
|
||||
.loop2
|
||||
.loop
|
||||
push bc
|
||||
push hl
|
||||
push hl
|
||||
@ -103,28 +102,28 @@ WritePartyMenuTilemap: ; 0x5005f
|
||||
pop hl
|
||||
call PlaceString
|
||||
pop hl
|
||||
ld de, $0028
|
||||
ld de, 2 * SCREEN_WIDTH
|
||||
add hl, de
|
||||
pop bc
|
||||
inc b
|
||||
dec c
|
||||
jr nz, .loop2
|
||||
jr nz, .loop
|
||||
|
||||
.done
|
||||
.end
|
||||
rept 2
|
||||
dec hl
|
||||
endr
|
||||
ld de, .cancelstring
|
||||
ld de, .CANCEL
|
||||
call PlaceString
|
||||
ret
|
||||
; 500c8
|
||||
|
||||
.cancelstring: ; 500c8
|
||||
.CANCEL: ; 500c8
|
||||
db "CANCEL@"
|
||||
; 500cf
|
||||
|
||||
|
||||
.drawhpbars: ; 500cf
|
||||
PlacePartyHPBar: ; 500cf
|
||||
xor a
|
||||
ld [wcda9], a
|
||||
ld a, [PartyCount]
|
||||
@ -133,17 +132,17 @@ endr
|
||||
ld c, a
|
||||
ld b, $0
|
||||
hlcoord 11, 2
|
||||
.loop3
|
||||
.loop
|
||||
push bc
|
||||
push hl
|
||||
call Function50389
|
||||
call PartyMenuCheckEgg
|
||||
jr z, .skip
|
||||
push hl
|
||||
call _fillhpbar
|
||||
call PlacePartymonHPBar
|
||||
pop hl
|
||||
ld d, 6
|
||||
ld b, 0
|
||||
call DrawHPBar
|
||||
ld d, $6
|
||||
ld b, $0
|
||||
call DrawBattleHPBar
|
||||
ld hl, wcd9b
|
||||
ld a, [wcda9]
|
||||
ld c, a
|
||||
@ -157,31 +156,31 @@ endr
|
||||
ld hl, wcda9
|
||||
inc [hl]
|
||||
pop hl
|
||||
ld de, $0028
|
||||
ld de, 2 * SCREEN_WIDTH
|
||||
add hl, de
|
||||
pop bc
|
||||
inc b
|
||||
dec c
|
||||
jr nz, .loop3
|
||||
jr nz, .loop
|
||||
ld b, $a
|
||||
call GetSGBLayout
|
||||
ret
|
||||
; 50117
|
||||
|
||||
_fillhpbar: ; 50117
|
||||
PlacePartymonHPBar: ; 50117
|
||||
ld a, b
|
||||
ld bc, PartyMon2 - PartyMon1
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
ld hl, PartyMon1HP
|
||||
call AddNTimes
|
||||
ld a, [hli]
|
||||
or [hl]
|
||||
jr nz, .notfainted
|
||||
jr nz, .not_fainted
|
||||
xor a
|
||||
ld e, a
|
||||
ld c, a
|
||||
ret
|
||||
|
||||
.notfainted
|
||||
.not_fainted
|
||||
dec hl
|
||||
ld a, [hli]
|
||||
ld b, a
|
||||
@ -191,25 +190,25 @@ _fillhpbar: ; 50117
|
||||
ld d, a
|
||||
ld a, [hli]
|
||||
ld e, a
|
||||
predef ComputeHPBarLength
|
||||
predef DrawPartyMenuHPBar
|
||||
ret
|
||||
; 50138
|
||||
|
||||
Function50138: ; 50138
|
||||
PlacePartyMenuHPDigits: ; 50138
|
||||
ld a, [PartyCount]
|
||||
and a
|
||||
ret z
|
||||
ld c, a
|
||||
ld b, $0
|
||||
hlcoord 13, 1
|
||||
.asm_50143
|
||||
.loop
|
||||
push bc
|
||||
push hl
|
||||
call Function50389
|
||||
jr z, .asm_5016b
|
||||
call PartyMenuCheckEgg
|
||||
jr z, .next
|
||||
push hl
|
||||
ld a, b
|
||||
ld bc, PartyMon2 - PartyMon1
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
ld hl, PartyMon1HP
|
||||
call AddNTimes
|
||||
ld e, l
|
||||
@ -219,7 +218,7 @@ Function50138: ; 50138
|
||||
lb bc, 2, 3
|
||||
call PrintNum
|
||||
pop de
|
||||
ld a, $f3
|
||||
ld a, "/"
|
||||
ld [hli], a
|
||||
rept 2
|
||||
inc de
|
||||
@ -227,32 +226,32 @@ endr
|
||||
lb bc, 2, 3
|
||||
call PrintNum
|
||||
|
||||
.asm_5016b
|
||||
.next
|
||||
pop hl
|
||||
ld de, $0028
|
||||
ld de, 2 * SCREEN_WIDTH
|
||||
add hl, de
|
||||
pop bc
|
||||
inc b
|
||||
dec c
|
||||
jr nz, .asm_50143
|
||||
jr nz, .loop
|
||||
ret
|
||||
; 50176
|
||||
|
||||
Function50176: ; 50176
|
||||
PlacePartyMonLevel: ; 50176
|
||||
ld a, [PartyCount]
|
||||
and a
|
||||
ret z
|
||||
ld c, a
|
||||
ld b, 0
|
||||
hlcoord 8, 2
|
||||
.asm_50181
|
||||
.loop
|
||||
push bc
|
||||
push hl
|
||||
call Function50389
|
||||
jr z, .asm_501a7
|
||||
call PartyMenuCheckEgg
|
||||
jr z, .next
|
||||
push hl
|
||||
ld a, b
|
||||
ld bc, PartyMon2 - PartyMon1
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
ld hl, PartyMon1Level
|
||||
call AddNTimes
|
||||
ld e, l
|
||||
@ -260,70 +259,72 @@ Function50176: ; 50176
|
||||
pop hl
|
||||
ld a, [de]
|
||||
cp 100 ; This is distinct from MAX_LEVEL.
|
||||
jr nc, .asm_501a1
|
||||
jr nc, .ThreeDigits
|
||||
ld a, "<LV>"
|
||||
ld [hli], a
|
||||
ld bc, $4102
|
||||
.asm_501a1
|
||||
lb bc, PRINTNUM_RIGHTALIGN | 1, 2
|
||||
; jr .okay
|
||||
.ThreeDigits
|
||||
lb bc, PRINTNUM_RIGHTALIGN | 1, 3
|
||||
; .okay
|
||||
call PrintNum
|
||||
|
||||
.asm_501a7
|
||||
.next
|
||||
pop hl
|
||||
ld de, SCREEN_WIDTH * 2
|
||||
add hl, de
|
||||
pop bc
|
||||
inc b
|
||||
dec c
|
||||
jr nz, .asm_50181
|
||||
jr nz, .loop
|
||||
ret
|
||||
; 501b2
|
||||
|
||||
Function501b2: ; 501b2
|
||||
PlacePartyMonStatus: ; 501b2
|
||||
ld a, [PartyCount]
|
||||
and a
|
||||
ret z
|
||||
ld c, a
|
||||
ld b, 0
|
||||
hlcoord 5, 2
|
||||
.asm_501bd
|
||||
.loop
|
||||
push bc
|
||||
push hl
|
||||
call Function50389
|
||||
jr z, .asm_501d5
|
||||
call PartyMenuCheckEgg
|
||||
jr z, .next
|
||||
push hl
|
||||
ld a, b
|
||||
ld bc, PartyMon2 - PartyMon1
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
ld hl, PartyMon1Status
|
||||
call AddNTimes
|
||||
ld e, l
|
||||
ld d, h
|
||||
pop hl
|
||||
call Function50d0a
|
||||
call PlaceStatusString
|
||||
|
||||
.asm_501d5
|
||||
.next
|
||||
pop hl
|
||||
ld de, SCREEN_WIDTH * 2
|
||||
add hl, de
|
||||
pop bc
|
||||
inc b
|
||||
dec c
|
||||
jr nz, .asm_501bd
|
||||
jr nz, .loop
|
||||
ret
|
||||
; 501e0
|
||||
|
||||
Function501e0: ; 501e0
|
||||
PlacePartyMonTMHMCompatibility: ; 501e0
|
||||
ld a, [PartyCount]
|
||||
and a
|
||||
ret z
|
||||
ld c, a
|
||||
ld b, 0
|
||||
hlcoord 12, 2
|
||||
.asm_501eb
|
||||
.loop
|
||||
push bc
|
||||
push hl
|
||||
call Function50389
|
||||
jr z, .asm_5020a
|
||||
call PartyMenuCheckEgg
|
||||
jr z, .next
|
||||
push hl
|
||||
ld hl, PartySpecies
|
||||
ld e, b
|
||||
@ -333,56 +334,56 @@ Function501e0: ; 501e0
|
||||
ld [CurPartySpecies], a
|
||||
predef CanLearnTMHMMove
|
||||
pop hl
|
||||
call Function50215
|
||||
call .PlaceAbleNotAble
|
||||
call PlaceString
|
||||
|
||||
.asm_5020a
|
||||
.next
|
||||
pop hl
|
||||
ld de, SCREEN_WIDTH * 2
|
||||
add hl, de
|
||||
pop bc
|
||||
inc b
|
||||
dec c
|
||||
jr nz, .asm_501eb
|
||||
jr nz, .loop
|
||||
ret
|
||||
; 50215
|
||||
|
||||
Function50215: ; 50215
|
||||
.PlaceAbleNotAble: ; 50215
|
||||
ld a, c
|
||||
and a
|
||||
jr nz, .asm_5021d
|
||||
ld de, String_50226
|
||||
jr nz, .able
|
||||
ld de, .string_not_able
|
||||
ret
|
||||
|
||||
.asm_5021d
|
||||
ld de, String_50221
|
||||
.able
|
||||
ld de, .string_able
|
||||
ret
|
||||
; 50221
|
||||
|
||||
String_50221: ; 50221
|
||||
.string_able: ; 50221
|
||||
db "ABLE@"
|
||||
; 50226
|
||||
|
||||
String_50226: ; 50226
|
||||
.string_not_able: ; 50226
|
||||
db "NOT ABLE@"
|
||||
; 5022f
|
||||
|
||||
|
||||
Function5022f: ; 5022f
|
||||
PlacePartyMonEvoStoneCompatibility: ; 5022f
|
||||
ld a, [PartyCount]
|
||||
and a
|
||||
ret z
|
||||
ld c, a
|
||||
ld b, 0
|
||||
hlcoord 12, 2
|
||||
.asm_5023a
|
||||
.loop
|
||||
push bc
|
||||
push hl
|
||||
call Function50389
|
||||
jr z, .asm_5025d
|
||||
call PartyMenuCheckEgg
|
||||
jr z, .next
|
||||
push hl
|
||||
ld a, b
|
||||
ld bc, PartyMon2 - PartyMon1
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
ld hl, PartyMon1Species
|
||||
call AddNTimes
|
||||
ld a, [hl]
|
||||
@ -393,22 +394,22 @@ Function5022f: ; 5022f
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
call Function50268
|
||||
call .DetermineCompatibility
|
||||
pop hl
|
||||
call PlaceString
|
||||
|
||||
.asm_5025d
|
||||
.next
|
||||
pop hl
|
||||
ld de, $0028
|
||||
ld de, 2 * SCREEN_WIDTH
|
||||
add hl, de
|
||||
pop bc
|
||||
inc b
|
||||
dec c
|
||||
jr nz, .asm_5023a
|
||||
jr nz, .loop
|
||||
ret
|
||||
; 50268
|
||||
|
||||
Function50268: ; 50268
|
||||
.DetermineCompatibility: ; 50268
|
||||
ld de, StringBuffer1
|
||||
ld a, BANK(EvosAttacksPointers)
|
||||
ld bc, 2
|
||||
@ -422,15 +423,15 @@ Function50268: ; 50268
|
||||
ld bc, $a
|
||||
call FarCopyBytes
|
||||
ld hl, StringBuffer1
|
||||
.asm_50287
|
||||
.loop2
|
||||
ld a, [hli]
|
||||
and a
|
||||
jr z, .asm_5029f
|
||||
jr z, .nope
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
cp EVOLVE_ITEM
|
||||
jr nz, .asm_50287
|
||||
jr nz, .loop2
|
||||
rept 2
|
||||
dec hl
|
||||
endr
|
||||
@ -439,35 +440,35 @@ endr
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
jr nz, .asm_50287
|
||||
ld de, String_502a3
|
||||
jr nz, .loop2
|
||||
ld de, .string_able
|
||||
ret
|
||||
|
||||
.asm_5029f
|
||||
ld de, String_502a8
|
||||
.nope
|
||||
ld de, .string_not_able
|
||||
ret
|
||||
; 502a3
|
||||
|
||||
String_502a3: ; 502a3
|
||||
.string_able: ; 502a3
|
||||
db "ABLE@"
|
||||
; 502a8
|
||||
String_502a8: ; 502a8
|
||||
.string_not_able: ; 502a8
|
||||
db "NOT ABLE@"
|
||||
; 502b1
|
||||
|
||||
|
||||
Function502b1: ; 502b1
|
||||
PlacePartyMonGender: ; 502b1
|
||||
ld a, [PartyCount]
|
||||
and a
|
||||
ret z
|
||||
ld c, a
|
||||
ld b, 0
|
||||
hlcoord 12, 2
|
||||
.asm_502bc
|
||||
.loop
|
||||
push bc
|
||||
push hl
|
||||
call Function50389
|
||||
jr z, .asm_502e3
|
||||
call PartyMenuCheckEgg
|
||||
jr z, .next
|
||||
ld [CurPartySpecies], a
|
||||
push hl
|
||||
ld a, b
|
||||
@ -475,86 +476,86 @@ Function502b1: ; 502b1
|
||||
xor a
|
||||
ld [MonType], a
|
||||
call GetGender
|
||||
ld de, String_502fe
|
||||
jr c, .asm_502df
|
||||
ld de, String_502ee
|
||||
jr nz, .asm_502df
|
||||
ld de, String_502f5
|
||||
ld de, .unknown
|
||||
jr c, .got_gender
|
||||
ld de, .male
|
||||
jr nz, .got_gender
|
||||
ld de, .female
|
||||
|
||||
.asm_502df
|
||||
.got_gender
|
||||
pop hl
|
||||
call PlaceString
|
||||
|
||||
.asm_502e3
|
||||
.next
|
||||
pop hl
|
||||
ld de, $0028
|
||||
ld de, 2 * SCREEN_WIDTH
|
||||
add hl, de
|
||||
pop bc
|
||||
inc b
|
||||
dec c
|
||||
jr nz, .asm_502bc
|
||||
jr nz, .loop
|
||||
ret
|
||||
; 502ee
|
||||
|
||||
String_502ee: ; 502ee
|
||||
.male: ; 502ee
|
||||
db "♂…MALE@"
|
||||
; 502f5
|
||||
|
||||
String_502f5: ; 502f5
|
||||
.female: ; 502f5
|
||||
db "♀…FEMALE@"
|
||||
; 502fe
|
||||
|
||||
String_502fe: ; 502fe
|
||||
.unknown: ; 502fe
|
||||
db "…UNKNOWN@"
|
||||
; 50307
|
||||
|
||||
|
||||
Function50307: ; 50307
|
||||
PlacePartyMonMobileBattleSelection: ; 50307
|
||||
ld a, [PartyCount]
|
||||
and a
|
||||
ret z
|
||||
ld c, a
|
||||
ld b, 0
|
||||
hlcoord 12, 1
|
||||
.asm_50312
|
||||
.loop
|
||||
push bc
|
||||
push hl
|
||||
ld de, String_50372
|
||||
ld de, .String_Sanka_Shinai
|
||||
call PlaceString
|
||||
pop hl
|
||||
ld de, $0028
|
||||
ld de, 2 * SCREEN_WIDTH
|
||||
add hl, de
|
||||
pop bc
|
||||
inc b
|
||||
dec c
|
||||
jr nz, .asm_50312
|
||||
jr nz, .loop
|
||||
ld a, l
|
||||
ld e, $b
|
||||
ld e, PKMN_NAME_LENGTH
|
||||
sub e
|
||||
ld l, a
|
||||
ld a, h
|
||||
sbc $0
|
||||
ld h, a
|
||||
ld de, String_50379
|
||||
ld de, .String_Kettei_Yameru
|
||||
call PlaceString
|
||||
ld b, $3
|
||||
ld c, $0
|
||||
ld hl, wd002
|
||||
ld a, [hl]
|
||||
.asm_5033b
|
||||
.loop2
|
||||
push hl
|
||||
push bc
|
||||
hlcoord 12, 1
|
||||
.asm_50340
|
||||
.loop3
|
||||
and a
|
||||
jr z, .asm_5034a
|
||||
ld de, $0028
|
||||
jr z, .done
|
||||
ld de, 2 * SCREEN_WIDTH
|
||||
add hl, de
|
||||
dec a
|
||||
jr .asm_50340
|
||||
jr .loop3
|
||||
|
||||
.asm_5034a
|
||||
ld de, String_5036b
|
||||
.done
|
||||
ld de, .String_Banme
|
||||
push hl
|
||||
call PlaceString
|
||||
pop hl
|
||||
@ -562,7 +563,7 @@ Function50307: ; 50307
|
||||
push bc
|
||||
push hl
|
||||
ld a, c
|
||||
ld hl, Strings_50383
|
||||
ld hl, .Strings_1_2_3
|
||||
call GetNthString
|
||||
ld d, h
|
||||
ld e, l
|
||||
@ -575,24 +576,24 @@ Function50307: ; 50307
|
||||
inc c
|
||||
dec b
|
||||
ret z
|
||||
jr .asm_5033b
|
||||
jr .loop2
|
||||
; 5036b
|
||||
|
||||
String_5036b: ; 5036b
|
||||
.String_Banme: ; 5036b
|
||||
db " ばんめ @" ; Place
|
||||
; 50372
|
||||
String_50372: ; 50372
|
||||
.String_Sanka_Shinai: ; 50372
|
||||
db "さんかしない@" ; Cancel
|
||||
; 50379
|
||||
String_50379: ; 50379
|
||||
.String_Kettei_Yameru: ; 50379
|
||||
db "けってい やめる@" ; Quit
|
||||
; 50383
|
||||
Strings_50383: ; 50383
|
||||
.Strings_1_2_3: ; 50383
|
||||
db "1@", "2@", "3@" ; 1st, 2nd, 3rd
|
||||
; 50389
|
||||
|
||||
|
||||
Function50389: ; 50389
|
||||
PartyMenuCheckEgg: ; 50389
|
||||
ld a, PartySpecies % $100
|
||||
add b
|
||||
ld e, a
|
||||
@ -604,15 +605,15 @@ Function50389: ; 50389
|
||||
ret
|
||||
; 50396
|
||||
|
||||
Function50396: ; 50396
|
||||
GetPartyMenuTilemapPointers: ; 50396
|
||||
ld a, [PartyMenuActionText]
|
||||
and $f0
|
||||
jr nz, .override
|
||||
jr nz, .skip
|
||||
ld a, [PartyMenuActionText]
|
||||
and $f
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .selectmonmenuoptions
|
||||
ld hl, .Pointers
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
@ -621,31 +622,32 @@ endr
|
||||
ld l, a
|
||||
ret
|
||||
|
||||
.override
|
||||
ld hl, .default
|
||||
.skip
|
||||
ld hl, .Default
|
||||
ret
|
||||
; 503b2
|
||||
|
||||
.selectmonmenuoptions: ; 503b2
|
||||
dw .default
|
||||
dw .default
|
||||
dw .default
|
||||
dw .unknown1
|
||||
dw .default
|
||||
dw .unknown2
|
||||
dw .trade
|
||||
dw .trade
|
||||
dw .default
|
||||
dw .unknown3
|
||||
.Pointers: ; 503b2
|
||||
dw .Default
|
||||
dw .Default
|
||||
dw .Default
|
||||
dw .TMHM
|
||||
dw .Default
|
||||
dw .EvoStone
|
||||
dw .Gender
|
||||
dw .Gender
|
||||
dw .Default
|
||||
dw .Mobile
|
||||
; 503c6
|
||||
|
||||
.default: db 0, 1, 2, 3, 4, -1
|
||||
.unknown1: db 0, 5, 3, 4, -1
|
||||
.unknown2: db 0, 6, 3, 4, -1
|
||||
.trade: db 0, 7, 3, 4, -1
|
||||
.unknown3: db 0, 8, 3, 4, -1
|
||||
.Default: db 0, 1, 2, 3, 4, $ff
|
||||
.TMHM: db 0, 5, 3, 4, $ff
|
||||
.EvoStone: db 0, 6, 3, 4, $ff
|
||||
.Gender: db 0, 7, 3, 4, $ff
|
||||
.Mobile: db 0, 8, 3, 4, $ff
|
||||
; 503e0
|
||||
|
||||
|
||||
Function503e0: ; 503e0
|
||||
ld hl, PartyCount
|
||||
ld a, [hli]
|
||||
@ -653,7 +655,7 @@ Function503e0: ; 503e0
|
||||
ret z
|
||||
ld c, a
|
||||
xor a
|
||||
ld [hConnectedMapWidth], a
|
||||
ld [hObjectStructIndexBuffer], a
|
||||
.asm_503ea
|
||||
push bc
|
||||
push hl
|
||||
@ -661,9 +663,9 @@ Function503e0: ; 503e0
|
||||
ld a, BANK(Function8e83f)
|
||||
ld e, $0
|
||||
rst FarCall
|
||||
ld a, [hConnectedMapWidth]
|
||||
ld a, [hObjectStructIndexBuffer]
|
||||
inc a
|
||||
ld [hConnectedMapWidth], a
|
||||
ld [hObjectStructIndexBuffer], a
|
||||
pop hl
|
||||
pop bc
|
||||
dec c
|
||||
@ -671,6 +673,7 @@ Function503e0: ; 503e0
|
||||
callab Function8cf69
|
||||
ret
|
||||
; 50405
|
||||
|
||||
Function50405: ; 50405
|
||||
xor a
|
||||
ld [wd0e3], a
|
||||
@ -692,7 +695,7 @@ Function50405: ; 50405
|
||||
ld a, $1
|
||||
|
||||
.asm_50424
|
||||
ld [wcfa9], a
|
||||
ld [MenuSelection2], a
|
||||
ld a, $3
|
||||
ld [wcfa8], a
|
||||
ret
|
||||
@ -713,7 +716,7 @@ Function5042d: ; 0x5042d
|
||||
.asm_50444
|
||||
ld a, $1
|
||||
.asm_50446
|
||||
ld [wcfa9], a
|
||||
ld [MenuSelection2], a
|
||||
ld a, $3
|
||||
ld [wcfa8], a
|
||||
ret
|
||||
@ -738,7 +741,7 @@ PartyMenuSelect: ; 0x50457
|
||||
ld a, [PartyCount]
|
||||
inc a
|
||||
ld b, a
|
||||
ld a, [wcfa9] ; menu selection?
|
||||
ld a, [MenuSelection2] ; menu selection?
|
||||
cp b
|
||||
jr z, .exitmenu ; CANCEL
|
||||
ld [wd0d8], a
|
||||
@ -746,7 +749,7 @@ PartyMenuSelect: ; 0x50457
|
||||
ld b, a
|
||||
bit 1, b
|
||||
jr nz, .exitmenu ; B button?
|
||||
ld a, [wcfa9]
|
||||
ld a, [MenuSelection2]
|
||||
dec a
|
||||
ld [CurPartyMon], a
|
||||
ld c, a
|
||||
@ -773,7 +776,7 @@ PartyMenuSelect: ; 0x50457
|
||||
|
||||
PrintPartyMenuText: ; 5049a
|
||||
hlcoord 0, 14
|
||||
ld bc, $0212
|
||||
lb bc, 2, 18
|
||||
call TextBox
|
||||
ld a, [PartyCount]
|
||||
and a
|
||||
@ -920,6 +923,7 @@ UnknownText_0x505bc: ; 0x505bc
|
||||
db "@"
|
||||
; 0x505c1
|
||||
|
||||
|
||||
Function505c1: ; 505c1
|
||||
ld e, a
|
||||
ld d, 0
|
||||
|
@ -60,7 +60,7 @@ Pokedex: ; 40000
|
||||
; 40063
|
||||
|
||||
InitPokedex: ; 40063
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearSprites
|
||||
call ClearTileMap
|
||||
call Function414b7
|
||||
@ -487,7 +487,7 @@ Function4034f: ; 4034f
|
||||
ld [wcf64], a
|
||||
pop af
|
||||
ld [wcf65], a
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call DisableLCD
|
||||
call Function414fb
|
||||
call Function4038d
|
||||
|
@ -1079,9 +1079,11 @@ ApplyMovement: ; 971fa
|
||||
ld a, c
|
||||
callba SetFlagsForMovement_1
|
||||
pop bc
|
||||
|
||||
push bc
|
||||
call SetFlagsForMovement_2
|
||||
pop bc
|
||||
|
||||
call GetScriptByte
|
||||
ld l, a
|
||||
call GetScriptByte
|
||||
@ -1090,6 +1092,7 @@ ApplyMovement: ; 971fa
|
||||
ld b, a
|
||||
call GetMovementData
|
||||
ret c
|
||||
|
||||
ld a, SCRIPT_WAIT_MOVEMENT
|
||||
ld [ScriptMode], a
|
||||
call StopScript
|
||||
@ -1102,6 +1105,7 @@ SetFlagsForMovement_2: ; 0x97221
|
||||
; 0x97228
|
||||
|
||||
Script_applymovement2: ; 0x97228
|
||||
; apply movement to last talked
|
||||
; script command 0x6a
|
||||
; parameters:
|
||||
; data (MovementPointerLabelParam)
|
||||
@ -1426,12 +1430,12 @@ ShowEmoteScript: ; 973b6
|
||||
|
||||
.Show
|
||||
show_emote
|
||||
show_person
|
||||
step_sleep_1
|
||||
step_end
|
||||
|
||||
.Hide
|
||||
hide_emote
|
||||
show_person
|
||||
step_sleep_1
|
||||
step_end
|
||||
; 973c7
|
||||
|
||||
@ -1460,8 +1464,8 @@ Script_earthquake: ; 0x973c7
|
||||
; 973eb
|
||||
|
||||
EarthquakeMovement: ; 973eb
|
||||
step_shake 16
|
||||
step_sleep 16
|
||||
step_shake 16 ; the 16 gets overwritten with the script byte
|
||||
step_sleep 16 ; the 16 gets overwritten with the lower 6 bits of the script byte
|
||||
step_end
|
||||
EarthquakeMovementEnd
|
||||
; 973f0
|
||||
@ -2847,6 +2851,7 @@ Script_warp: ; 0x97a1d
|
||||
call LoadMapStatus
|
||||
call StopScript
|
||||
ret
|
||||
|
||||
.not_ok
|
||||
call GetScriptByte
|
||||
call GetScriptByte
|
||||
@ -3117,6 +3122,7 @@ Script_end: ; 0x97b74
|
||||
call ExitScriptSubroutine
|
||||
jr c, .resume
|
||||
ret
|
||||
|
||||
.resume
|
||||
xor a
|
||||
ld [ScriptRunning], a
|
||||
|
2112
engine/slot_machine.asm
Executable file
2112
engine/slot_machine.asm
Executable file
File diff suppressed because it is too large
Load Diff
@ -65,14 +65,14 @@ SpecialsPointers:: ; c029
|
||||
add_special Special_SlotMachine
|
||||
add_special Special_CardFlip
|
||||
add_special Special_DummyNonfunctionalGameCornerGame
|
||||
add_special Special_WhiteBGMapBufferScreen
|
||||
add_special FadeBlackBGMap
|
||||
add_special Special_ClearBGPalettesBufferScreen
|
||||
add_special FadeOutPalettes
|
||||
add_special Special_BattleTowerFade
|
||||
add_special Special_FadeBlackQuickly
|
||||
add_special FadeInBGMap
|
||||
add_special FadeInPalettes
|
||||
add_special Special_FadeInQuickly
|
||||
add_special Special_ReloadSpritesNoPalettes
|
||||
add_special WhiteBGMap
|
||||
add_special ClearBGPalettes
|
||||
add_special UpdateTimePals
|
||||
add_special ClearTileMap
|
||||
add_special UpdateSprites
|
||||
@ -465,8 +465,8 @@ UnknownText_0xc3d6: ; 0xc3d6
|
||||
db "@"
|
||||
; 0xc3db
|
||||
|
||||
Special_WhiteBGMapBufferScreen: ; c3db
|
||||
call WhiteBGMap
|
||||
Special_ClearBGPalettesBufferScreen: ; c3db
|
||||
call ClearBGPalettes
|
||||
call BufferScreen
|
||||
ret
|
||||
; c3e2
|
||||
|
@ -139,7 +139,7 @@ endr
|
||||
; 126b7
|
||||
|
||||
.Clear ; 126b7
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call Call_ExitMenu
|
||||
call Function2bae
|
||||
call .DrawMenuAccount_
|
||||
@ -529,7 +529,7 @@ StartMenu_Pokemon: ; 12976
|
||||
.choosemenu
|
||||
xor a
|
||||
ld [PartyMenuActionText], a ; Choose a POKéMON.
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
|
||||
.menu
|
||||
callba Function5004f
|
||||
@ -1449,7 +1449,7 @@ MonMenu_RockSmash: ; 12f3b
|
||||
; 12f50
|
||||
|
||||
MonMenu_SweetScent: ; 12f50
|
||||
callba DoMovementFunctionc
|
||||
callba SweetScentFromMenu
|
||||
ld b, $4
|
||||
ld a, $2
|
||||
ret
|
||||
@ -1466,7 +1466,7 @@ Function12f5b: ; 12f5b
|
||||
ld a, b
|
||||
ld [Options], a
|
||||
push af
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
pop af
|
||||
ret
|
||||
; 12f73
|
||||
@ -1527,7 +1527,7 @@ ManagePokemonMoves: ; 12fba
|
||||
call MoveScreenLoop
|
||||
pop af
|
||||
ld [Options], a
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
|
||||
.egg
|
||||
ld a, $0
|
||||
@ -1753,7 +1753,7 @@ String_1316b: ; 1316b
|
||||
; 13172
|
||||
|
||||
SetUpMoveScreenBG: ; 13172
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearTileMap
|
||||
call ClearSprites
|
||||
xor a
|
||||
|
@ -302,7 +302,7 @@ RadioTowerRocketsScript:
|
||||
end
|
||||
|
||||
BugContestResultsWarpScript:
|
||||
special WhiteBGMap
|
||||
special ClearBGPalettes
|
||||
scall BugContestResults_CopyContestantsToResults
|
||||
setevent EVENT_ROUTE_36_NATIONAL_PARK_GATE_OFFICER_CONTEST_DAY
|
||||
clearevent EVENT_ROUTE_36_NATIONAL_PARK_GATE_OFFICER_NOT_CONTEST_DAY
|
||||
|
@ -116,7 +116,7 @@ _UpdateTimePals:: ; 8c070
|
||||
ret
|
||||
; 8c079
|
||||
|
||||
FadeInBGMap:: ; 8c079
|
||||
FadeInPalettes:: ; 8c079
|
||||
ld c, $12
|
||||
call GetTimePalFade
|
||||
ld b, $4
|
||||
@ -124,7 +124,7 @@ FadeInBGMap:: ; 8c079
|
||||
ret
|
||||
; 8c084
|
||||
|
||||
FadeBlackBGMap:: ; 8c084
|
||||
FadeOutPalettes:: ; 8c084
|
||||
call Function8c0c1
|
||||
ld c, $9
|
||||
call GetTimePalFade
|
||||
|
@ -1,6 +1,6 @@
|
||||
_TitleScreen: ; 10ed67
|
||||
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearSprites
|
||||
call ClearTileMap
|
||||
|
||||
|
34
event/basement_key.asm
Executable file
34
event/basement_key.asm
Executable file
@ -0,0 +1,34 @@
|
||||
_BasementKey: ; 507b4
|
||||
; Are we even in the right map to use this?
|
||||
ld a, [MapGroup]
|
||||
cp GROUP_WAREHOUSE_ENTRANCE
|
||||
jr nz, .nope
|
||||
|
||||
ld a, [MapNumber]
|
||||
cp MAP_WAREHOUSE_ENTRANCE
|
||||
jr nz, .nope
|
||||
; Are we on the tile in front of the door?
|
||||
call GetFacingTileCoord
|
||||
ld a, d
|
||||
cp 22
|
||||
jr nz, .nope
|
||||
ld a, e
|
||||
cp 10
|
||||
jr nz, .nope
|
||||
; Let's use the Basement Key
|
||||
ld hl, .BasementKeyScript
|
||||
call QueueScript
|
||||
ld a, 1
|
||||
ld [wd0ec], a
|
||||
ret
|
||||
|
||||
.nope
|
||||
ld a, $0
|
||||
ld [wd0ec], a
|
||||
ret
|
||||
; 507e1
|
||||
|
||||
.BasementKeyScript: ; 0x507e1
|
||||
loadmovesprites
|
||||
farjump BasementDoorScript
|
||||
; 0x507e6
|
39
event/card_key.asm
Executable file
39
event/card_key.asm
Executable file
@ -0,0 +1,39 @@
|
||||
_CardKey: ; 50779
|
||||
; Are we even in the right map to use this?
|
||||
ld a, [MapGroup]
|
||||
cp GROUP_RADIO_TOWER_3F
|
||||
jr nz, .nope
|
||||
|
||||
ld a, [MapNumber]
|
||||
cp MAP_RADIO_TOWER_3F
|
||||
jr nz, .nope
|
||||
; Are we facing the slot?
|
||||
ld a, [PlayerDirection]
|
||||
and $c
|
||||
cp OW_UP
|
||||
jr nz, .nope
|
||||
|
||||
call GetFacingTileCoord
|
||||
ld a, d
|
||||
cp 18
|
||||
jr nz, .nope
|
||||
ld a, e
|
||||
cp 6
|
||||
jr nz, .nope
|
||||
; Let's use the Card Key.
|
||||
ld hl, .CardKeyScript
|
||||
call QueueScript
|
||||
ld a, $1
|
||||
ld [wd0ec], a
|
||||
ret
|
||||
|
||||
.nope
|
||||
ld a, $0
|
||||
ld [wd0ec], a
|
||||
ret
|
||||
; 507af
|
||||
|
||||
.CardKeyScript: ; 0x507af
|
||||
loadmovesprites
|
||||
farjump MapRadioTower3FSignpost2Script
|
||||
; 0x507b4
|
162
event/poisonstep.asm
Executable file
162
event/poisonstep.asm
Executable file
@ -0,0 +1,162 @@
|
||||
DoPoisonStep:: ; 505da
|
||||
ld a, [PartyCount]
|
||||
and a
|
||||
jr z, .no_faint
|
||||
|
||||
xor a
|
||||
ld c, 7
|
||||
ld hl, EngineBuffer1
|
||||
.loop_clearEngineBuffer1
|
||||
ld [hli], a
|
||||
dec c
|
||||
jr nz, .loop_clearEngineBuffer1
|
||||
|
||||
xor a
|
||||
ld [CurPartyMon], a
|
||||
.loop_check_poison
|
||||
call .DamageMonIfPoisoned
|
||||
jr nc, .not_poisoned
|
||||
; the output flag is stored in c, copy it to the ([CurPartyMon] + 2)nd EngineBuffer
|
||||
; and set the corresponding flag in EngineBuffer1
|
||||
ld a, [CurPartyMon]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, EngineBuffer2
|
||||
add hl, de
|
||||
ld [hl], c
|
||||
ld a, [EngineBuffer1]
|
||||
or c
|
||||
ld [EngineBuffer1], a
|
||||
|
||||
.not_poisoned
|
||||
ld a, [PartyCount]
|
||||
ld hl, CurPartyMon
|
||||
inc [hl]
|
||||
cp [hl]
|
||||
jr nz, .loop_check_poison
|
||||
|
||||
ld a, [EngineBuffer1]
|
||||
and %10
|
||||
jr nz, .someone_has_fainted
|
||||
ld a, [EngineBuffer1]
|
||||
and %01
|
||||
jr z, .no_faint
|
||||
call .PlayPoisonSFX
|
||||
xor a
|
||||
ret
|
||||
|
||||
.someone_has_fainted
|
||||
ld a, BANK(.Script_MonFaintedToPoison)
|
||||
ld hl, .Script_MonFaintedToPoison
|
||||
call CallScript
|
||||
scf
|
||||
ret
|
||||
|
||||
.no_faint
|
||||
xor a
|
||||
ret
|
||||
; 5062e
|
||||
|
||||
.DamageMonIfPoisoned: ; 5062e
|
||||
; check if mon is poisoned, return if not
|
||||
ld a, MON_STATUS
|
||||
call GetPartyParamLocation
|
||||
ld a, [hl]
|
||||
and 1 << PSN
|
||||
ret z
|
||||
|
||||
; check if mon is already fainted, return if so
|
||||
ld a, MON_HP
|
||||
call GetPartyParamLocation
|
||||
ld a, [hli]
|
||||
ld b, a
|
||||
ld c, [hl]
|
||||
or c
|
||||
ret z
|
||||
|
||||
; do 1 HP damage
|
||||
dec bc
|
||||
ld [hl], c
|
||||
dec hl
|
||||
ld [hl], b
|
||||
|
||||
; check if mon has fainted as a result of poison damage
|
||||
ld a, b
|
||||
or c
|
||||
jr nz, .not_fainted
|
||||
|
||||
; the mon has fainted, reset its status, set carry, and return %10
|
||||
ld a, MON_STATUS
|
||||
call GetPartyParamLocation
|
||||
ld [hl], 0
|
||||
ld c, %10
|
||||
scf
|
||||
ret
|
||||
|
||||
.not_fainted
|
||||
; set carry and return %01
|
||||
ld c, %01
|
||||
scf
|
||||
ret
|
||||
; 50658
|
||||
|
||||
.PlayPoisonSFX: ; 50658
|
||||
ld de, SFX_POISON
|
||||
call PlaySFX
|
||||
ld b, $2
|
||||
predef Functioncbcdd
|
||||
call DelayFrame
|
||||
ret
|
||||
; 50669
|
||||
|
||||
.Script_MonFaintedToPoison: ; 50669
|
||||
callasm .PlayPoisonSFX
|
||||
loadfont
|
||||
callasm .CheckWhitedOut
|
||||
iffalse .whiteout
|
||||
loadmovesprites
|
||||
end
|
||||
; 50677
|
||||
|
||||
.whiteout: ; 50677
|
||||
farjump Script_OverworldWhiteout
|
||||
; 5067b
|
||||
|
||||
.CheckWhitedOut: ; 5067b
|
||||
xor a
|
||||
ld [CurPartyMon], a
|
||||
ld de, EngineBuffer2
|
||||
.party_loop
|
||||
push de
|
||||
ld a, [de]
|
||||
and %10
|
||||
jr z, .mon_not_fainted
|
||||
ld c, HAPPINESS_POISONFAINT
|
||||
callba ChangeHappiness
|
||||
callba GetPartyNick
|
||||
ld hl, .PoisonFaintText
|
||||
call PrintText
|
||||
|
||||
.mon_not_fainted
|
||||
pop de
|
||||
inc de
|
||||
ld hl, CurPartyMon
|
||||
inc [hl]
|
||||
ld a, [PartyCount]
|
||||
cp [hl]
|
||||
jr nz, .party_loop
|
||||
predef CheckPlayerPartyForFitPkmn
|
||||
ld a, d
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
; 506b2
|
||||
|
||||
.PoisonFaintText: ; 506b2
|
||||
text_jump UnknownText_0x1c0acc
|
||||
db "@"
|
||||
; 506b7
|
||||
|
||||
.PoisonWhiteOutText: ; 506b7
|
||||
text_jump UnknownText_0x1c0ada
|
||||
db "@"
|
||||
; 506bc
|
74
event/sacred_ash.asm
Executable file
74
event/sacred_ash.asm
Executable file
@ -0,0 +1,74 @@
|
||||
|
||||
_SacredAsh: ; 507e6
|
||||
ld a, $0
|
||||
ld [wd0ec], a
|
||||
call CheckAnyFaintedMon
|
||||
ret nc
|
||||
|
||||
ld hl, SacredAshScript
|
||||
call QueueScript
|
||||
ld a, $1
|
||||
ld [wd0ec], a
|
||||
ret
|
||||
; 507fb
|
||||
|
||||
CheckAnyFaintedMon: ; 507fb
|
||||
ld de, PARTYMON_STRUCT_LENGTH
|
||||
ld bc, PartySpecies
|
||||
ld hl, PartyMon1HP
|
||||
ld a, [PartyCount]
|
||||
and a
|
||||
ret z
|
||||
|
||||
.loop
|
||||
push af
|
||||
push hl
|
||||
ld a, [bc]
|
||||
inc bc
|
||||
cp EGG
|
||||
jr z, .next
|
||||
|
||||
ld a, [hli]
|
||||
or [hl]
|
||||
jr z, .done
|
||||
|
||||
.next
|
||||
pop hl
|
||||
add hl, de
|
||||
pop af
|
||||
dec a
|
||||
jr nz, .loop
|
||||
xor a
|
||||
ret
|
||||
|
||||
.done
|
||||
pop hl
|
||||
pop af
|
||||
scf
|
||||
ret
|
||||
; 50821
|
||||
|
||||
SacredAshScript: ; 0x50821
|
||||
special HealParty
|
||||
reloadmappart
|
||||
playsound SFX_WARP_TO
|
||||
special FadeOutPalettes
|
||||
special FadeInPalettes
|
||||
special FadeOutPalettes
|
||||
special FadeInPalettes
|
||||
special FadeOutPalettes
|
||||
special FadeInPalettes
|
||||
waitbutton
|
||||
writetext UnknownText_0x50845
|
||||
playsound SFX_CAUGHT_MON
|
||||
waitbutton
|
||||
closetext
|
||||
loadmovesprites
|
||||
end
|
||||
; 0x50845
|
||||
|
||||
UnknownText_0x50845: ; 0x50845
|
||||
; 's #MON were all healed!
|
||||
text_jump UnknownText_0x1c0b65
|
||||
db "@"
|
||||
; 0x5084a
|
51
event/squirtbottle.asm
Executable file
51
event/squirtbottle.asm
Executable file
@ -0,0 +1,51 @@
|
||||
_Squirtbottle: ; 50730
|
||||
ld hl, UnknownScript_0x5073c
|
||||
call QueueScript
|
||||
ld a, $1
|
||||
ld [wd0ec], a
|
||||
ret
|
||||
; 5073c
|
||||
|
||||
UnknownScript_0x5073c: ; 0x5073c
|
||||
reloadmappart
|
||||
special UpdateTimePals
|
||||
callasm Function50753
|
||||
iffalse UnknownScript_0x5074b
|
||||
farjump WateredWeirdTreeScript
|
||||
; 0x5074b
|
||||
|
||||
UnknownScript_0x5074b: ; 0x5074b
|
||||
jumptext UnknownText_0x5074e
|
||||
; 0x5074e
|
||||
|
||||
UnknownText_0x5074e: ; 0x5074e
|
||||
; sprinkled water. But nothing happened…
|
||||
text_jump UnknownText_0x1c0b3b
|
||||
db "@"
|
||||
; 0x50753
|
||||
|
||||
Function50753: ; 50753
|
||||
ld a, [MapGroup]
|
||||
cp GROUP_ROUTE_36
|
||||
jr nz, .asm_50774
|
||||
|
||||
ld a, [MapNumber]
|
||||
cp MAP_ROUTE_36
|
||||
jr nz, .asm_50774
|
||||
|
||||
callba GetFacingObject
|
||||
jr c, .asm_50774
|
||||
|
||||
ld a, d
|
||||
cp $17
|
||||
jr nz, .asm_50774
|
||||
|
||||
ld a, $1
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
|
||||
.asm_50774
|
||||
xor a
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
; 50779
|
75
event/sweet_scent.asm
Executable file
75
event/sweet_scent.asm
Executable file
@ -0,0 +1,75 @@
|
||||
SweetScentFromMenu: ; 506bc
|
||||
ld hl, UnknownScript_0x506c8
|
||||
call QueueScript
|
||||
ld a, $1
|
||||
ld [wd0ec], a
|
||||
ret
|
||||
; 506c8
|
||||
|
||||
UnknownScript_0x506c8: ; 0x506c8
|
||||
reloadmappart
|
||||
special UpdateTimePals
|
||||
callasm GetPartyNick
|
||||
writetext UnknownText_0x50726
|
||||
closetext
|
||||
callasm SweetScentEncounter
|
||||
iffalse UnknownScript_0x506e9
|
||||
checkflag ENGINE_BUG_CONTEST_TIMER
|
||||
iftrue UnknownScript_0x506e5
|
||||
battlecheck
|
||||
startbattle
|
||||
returnafterbattle
|
||||
end
|
||||
; 0x506e5
|
||||
|
||||
UnknownScript_0x506e5: ; 0x506e5
|
||||
farjump BugCatchingContestBattleScript
|
||||
; 0x506e9
|
||||
|
||||
UnknownScript_0x506e9: ; 0x506e9
|
||||
writetext UnknownText_0x5072b
|
||||
closetext
|
||||
loadmovesprites
|
||||
end
|
||||
; 0x506ef
|
||||
|
||||
SweetScentEncounter: ; 506ef
|
||||
callba CanUseSweetScent
|
||||
jr nc, .no_battle
|
||||
ld hl, StatusFlags2
|
||||
bit 2, [hl]
|
||||
jr nz, .not_in_bug_contest
|
||||
callba GetMapEncounterRate
|
||||
ld a, b
|
||||
and a
|
||||
jr z, .no_battle
|
||||
callba ChooseWildEncounter
|
||||
jr nz, .no_battle
|
||||
jr .start_battle
|
||||
|
||||
.not_in_bug_contest
|
||||
callba ChooseWildEncounter_BugContest
|
||||
|
||||
.start_battle
|
||||
ld a, $1
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
|
||||
.no_battle
|
||||
xor a
|
||||
ld [ScriptVar], a
|
||||
ld [BattleType], a
|
||||
ret
|
||||
; 50726
|
||||
|
||||
UnknownText_0x50726: ; 0x50726
|
||||
; used SWEET SCENT!
|
||||
text_jump UnknownText_0x1c0b03
|
||||
db "@"
|
||||
; 0x5072b
|
||||
|
||||
UnknownText_0x5072b: ; 0x5072b
|
||||
; Looks like there's nothing here…
|
||||
text_jump UnknownText_0x1c0b1a
|
||||
db "@"
|
||||
; 0x50730
|
@ -10,7 +10,7 @@ Script_OverworldWhiteout:: ; 0x124c8
|
||||
Script_Whiteout: ; 0x124ce
|
||||
writetext .WhitedOutText
|
||||
closetext
|
||||
special FadeBlackBGMap
|
||||
special FadeOutPalettes
|
||||
pause 40
|
||||
special HealParty
|
||||
checkflag ENGINE_BUG_CONTEST_TIMER
|
||||
|
2
home.asm
2
home.asm
@ -530,7 +530,7 @@ CompareLong:: ; 31e4
|
||||
; 31f3
|
||||
|
||||
|
||||
WhiteBGMap:: ; 31f3
|
||||
ClearBGPalettes:: ; 31f3
|
||||
call ClearPalettes
|
||||
WaitBGMap:: ; 31f6
|
||||
; Tell VBlank to update BG Map
|
||||
|
@ -1,6 +1,6 @@
|
||||
; Audio interfaces.
|
||||
|
||||
SoundRestart:: ; 3b4e
|
||||
MapSetup_Sound_Off:: ; 3b4e
|
||||
|
||||
push hl
|
||||
push de
|
||||
@ -9,11 +9,11 @@ SoundRestart:: ; 3b4e
|
||||
|
||||
ld a, [hROMBank]
|
||||
push af
|
||||
ld a, BANK(_SoundRestart)
|
||||
ld a, BANK(_MapSetup_Sound_Off)
|
||||
ld [hROMBank], a
|
||||
ld [MBC3RomBank], a
|
||||
|
||||
call _SoundRestart
|
||||
call _MapSetup_Sound_Off
|
||||
|
||||
pop af
|
||||
ld [hROMBank], a
|
||||
@ -81,7 +81,7 @@ PlayMusic:: ; 3b97
|
||||
|
||||
ld a, [hROMBank]
|
||||
push af
|
||||
ld a, BANK(_PlayMusic) ; and BANK(_SoundRestart)
|
||||
ld a, BANK(_PlayMusic) ; and BANK(_MapSetup_Sound_Off)
|
||||
ld [hROMBank], a
|
||||
ld [MBC3RomBank], a
|
||||
|
||||
@ -93,7 +93,7 @@ PlayMusic:: ; 3b97
|
||||
jr .end
|
||||
|
||||
.nomusic
|
||||
call _SoundRestart
|
||||
call _MapSetup_Sound_Off
|
||||
|
||||
.end
|
||||
pop af
|
||||
|
@ -1,6 +1,6 @@
|
||||
Reset:: ; 150
|
||||
di
|
||||
call SoundRestart
|
||||
call MapSetup_Sound_Off
|
||||
xor a
|
||||
ld [hMapAnims], a
|
||||
call ClearPalettes
|
||||
@ -168,7 +168,7 @@ Init:: ; 17d
|
||||
|
||||
predef Function9853
|
||||
|
||||
call SoundRestart
|
||||
call MapSetup_Sound_Off
|
||||
xor a
|
||||
ld [wMapMusic], a
|
||||
jp GameInit
|
||||
|
17
home/map.asm
17
home/map.asm
@ -209,8 +209,8 @@ endr
|
||||
ret
|
||||
; 222a
|
||||
|
||||
Function222a:: ; 222a
|
||||
ld a, MAPSETUP_10
|
||||
ReturnToMapFromSubmenu:: ; 222a
|
||||
ld a, MAPSETUP_SUBMENU
|
||||
ld [hMapEntryMethod], a
|
||||
callba RunMapSetupScript
|
||||
xor a
|
||||
@ -1099,13 +1099,14 @@ Call_a_de:: ; 26b7
|
||||
; 26c7
|
||||
|
||||
GetMovementData:: ; 26c7
|
||||
; Initialize the movement data for person c at b:hl
|
||||
ld a, [hROMBank]
|
||||
push af
|
||||
ld a, b
|
||||
rst Bankswitch
|
||||
|
||||
ld a, c
|
||||
call Function19e9
|
||||
call LoadMovementDataPointer
|
||||
|
||||
pop hl
|
||||
ld a, h
|
||||
@ -1964,7 +1965,7 @@ FadeToMenu:: ; 2b29
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
call LoadStandardMenuDataHeader
|
||||
callba FadeBlackBGMap
|
||||
callba FadeOutPalettes
|
||||
call ClearSprites
|
||||
call DisableSpriteUpdates
|
||||
ret
|
||||
@ -1972,7 +1973,7 @@ FadeToMenu:: ; 2b29
|
||||
|
||||
|
||||
Function2b3c:: ; 2b3c
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call Function2bae
|
||||
call UpdateSprites
|
||||
call Call_ExitMenu
|
||||
@ -1981,7 +1982,7 @@ Function2b3c:: ; 2b3c
|
||||
; 2b4d
|
||||
|
||||
Function2b4d:: ; 2b4d
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call Call_ExitMenu
|
||||
call Function2bae
|
||||
call UpdateSprites
|
||||
@ -1993,7 +1994,7 @@ Function2b5c:: ; 2b5c
|
||||
call GetSGBLayout
|
||||
callba Function49409
|
||||
call Function3200
|
||||
callba FadeInBGMap
|
||||
callba FadeInPalettes
|
||||
call EnableSpriteUpdates
|
||||
ret
|
||||
; 2b74
|
||||
@ -2003,7 +2004,7 @@ Function2b74:: ; 0x2b74
|
||||
push af
|
||||
ld a, $1
|
||||
ld [wc2ce], a
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearSprites
|
||||
call Function2bae
|
||||
hlcoord 0, 12
|
||||
|
@ -428,7 +428,8 @@ Function19b8:: ; 19b8
|
||||
|
||||
|
||||
|
||||
Function19e9:: ; 19e9
|
||||
LoadMovementDataPointer:: ; 19e9
|
||||
; Load the movement data pointer for person a.
|
||||
ld [wMovementPerson], a
|
||||
ld a, [hROMBank]
|
||||
ld [wMovementDataPointer], a
|
||||
@ -439,12 +440,15 @@ Function19e9:: ; 19e9
|
||||
ld a, [wMovementPerson]
|
||||
call CheckObjectVisibility
|
||||
ret c
|
||||
|
||||
ld hl, OBJECT_MOVEMENTTYPE
|
||||
add hl, bc
|
||||
ld [hl], SPRITEMOVEDATA_SCRIPTED
|
||||
|
||||
ld hl, OBJECT_09
|
||||
add hl, bc
|
||||
ld [hl], 0
|
||||
|
||||
ld hl, VramState
|
||||
set 7, [hl]
|
||||
and a
|
||||
@ -589,14 +593,15 @@ endr
|
||||
; 1aae
|
||||
|
||||
Function1aae:: ; 1aae
|
||||
; Switch to the movement data bank
|
||||
ld a, [hROMBank]
|
||||
push af
|
||||
ld a, [hli]
|
||||
rst Bankswitch
|
||||
|
||||
; Load the current script byte as given by OBJECT_MOVEMENT_BYTE_INDEX, and increment OBJECT_MOVEMENT_BYTE_INDEX
|
||||
ld a, [hli]
|
||||
ld d, [hl]
|
||||
ld hl, OBJECT_27
|
||||
ld hl, OBJECT_MOVEMENT_BYTE_INDEX
|
||||
add hl, bc
|
||||
add [hl]
|
||||
ld e, a
|
||||
|
@ -6,7 +6,7 @@ Serial:: ; 6ef
|
||||
push de
|
||||
push hl
|
||||
|
||||
ld a, [$ffc9]
|
||||
ld a, [hFFC9]
|
||||
and a
|
||||
jr nz, .asm_71c
|
||||
|
||||
@ -77,7 +77,7 @@ Serial:: ; 6ef
|
||||
|
||||
.asm_752
|
||||
ld a, $1
|
||||
ld [$ffca], a
|
||||
ld [hFFCA], a
|
||||
ld a, $fe
|
||||
ld [hSerialSend], a
|
||||
|
||||
@ -91,7 +91,7 @@ Serial:: ; 6ef
|
||||
|
||||
Function75f:: ; 75f
|
||||
ld a, $1
|
||||
ld [$ffcc], a
|
||||
ld [hFFCC], a
|
||||
.asm_763
|
||||
ld a, [hl]
|
||||
ld [hSerialSend], a
|
||||
@ -103,7 +103,7 @@ Function75f:: ; 75f
|
||||
.asm_76e
|
||||
dec a
|
||||
jr nz, .asm_76e
|
||||
ld a, [$ffcc]
|
||||
ld a, [hFFCC]
|
||||
and a
|
||||
ld a, b
|
||||
pop bc
|
||||
@ -112,7 +112,7 @@ Function75f:: ; 75f
|
||||
cp $fd
|
||||
jr nz, .asm_763
|
||||
xor a
|
||||
ld [$ffcc], a
|
||||
ld [hFFCC], a
|
||||
jr .asm_763
|
||||
|
||||
.asm_782
|
||||
@ -127,7 +127,7 @@ Function75f:: ; 75f
|
||||
|
||||
Function78a:: ; 78a
|
||||
xor a
|
||||
ld [$ffca], a
|
||||
ld [hFFCA], a
|
||||
ld a, [hLinkPlayerNumber]
|
||||
cp $2
|
||||
jr nz, .asm_79b
|
||||
@ -137,7 +137,7 @@ Function78a:: ; 78a
|
||||
ld [rSC], a
|
||||
|
||||
.asm_79b
|
||||
ld a, [$ffca]
|
||||
ld a, [hFFCA]
|
||||
and a
|
||||
jr nz, .asm_7e5
|
||||
ld a, [hLinkPlayerNumber]
|
||||
@ -182,7 +182,7 @@ Function78a:: ; 78a
|
||||
|
||||
.asm_7e5
|
||||
xor a
|
||||
ld [$ffca], a
|
||||
ld [hFFCA], a
|
||||
ld a, [rIE]
|
||||
and $f
|
||||
sub $8
|
||||
@ -251,7 +251,7 @@ Function83b:: ; 83b
|
||||
ld de, wcf51
|
||||
ld c, $2
|
||||
ld a, $1
|
||||
ld [$ffcc], a
|
||||
ld [hFFCC], a
|
||||
.asm_847
|
||||
call DelayFrame
|
||||
ld a, [hl]
|
||||
@ -259,10 +259,10 @@ Function83b:: ; 83b
|
||||
call Function78a
|
||||
ld b, a
|
||||
inc hl
|
||||
ld a, [$ffcc]
|
||||
ld a, [hFFCC]
|
||||
and a
|
||||
ld a, $0
|
||||
ld [$ffcc], a
|
||||
ld [hFFCC], a
|
||||
jr nz, .asm_847
|
||||
ld a, b
|
||||
ld [de], a
|
||||
|
8
hram.asm
8
hram.asm
@ -68,14 +68,18 @@ hPrintNum10 EQU $ffbc
|
||||
|
||||
hUsedSpriteIndex EQU $ffbd
|
||||
hUsedSpriteTile EQU $ffbe
|
||||
hFFBF EQU $ffbf
|
||||
hFFC0 EQU $ffc0
|
||||
hFFC1 EQU $ffc1
|
||||
hFFC2 EQU $ffc2
|
||||
hMoneyTemp EQU $ffc3
|
||||
|
||||
hLCDStatCustom EQU $ffc6
|
||||
|
||||
hFFC9 EQU $ffc9
|
||||
|
||||
hFFCA EQU $ffca
|
||||
hLinkPlayerNumber EQU $ffcb
|
||||
|
||||
hFFCC EQU $ffcc
|
||||
hSerialSend EQU $ffcd
|
||||
hSerialReceive EQU $ffce
|
||||
|
||||
|
@ -714,7 +714,7 @@ endr
|
||||
and a
|
||||
jr z, .toss
|
||||
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearTileMap
|
||||
|
||||
.toss
|
||||
@ -1866,7 +1866,7 @@ UseItem_SelectMon: ; f1f9 (3:71f9)
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call Functionf21c
|
||||
pop bc
|
||||
pop de
|
||||
|
@ -303,16 +303,44 @@ hide_person: macro
|
||||
db movement_hide_person ; $3d
|
||||
endm
|
||||
|
||||
enum movement_show_person
|
||||
show_person: macro
|
||||
db movement_show_person ; $3e
|
||||
enum movement_step_sleep_1
|
||||
step_sleep_1: macro
|
||||
db movement_step_sleep_1 ; $3e
|
||||
endm
|
||||
|
||||
__enum__ = $45
|
||||
enum movement_step_sleep_2
|
||||
step_sleep_2: macro
|
||||
db movement_step_sleep_2 ; $3f
|
||||
endm
|
||||
|
||||
enum movement_accelerate_last
|
||||
accelerate_last: macro
|
||||
db movement_accelerate_last ; $45
|
||||
enum movement_step_sleep_3
|
||||
step_sleep_3: macro
|
||||
db movement_step_sleep_3 ; $40
|
||||
endm
|
||||
|
||||
enum movement_step_sleep_4
|
||||
step_sleep_4: macro
|
||||
db movement_step_sleep_4 ; $41
|
||||
endm
|
||||
|
||||
enum movement_step_sleep_5
|
||||
step_sleep_5: macro
|
||||
db movement_step_sleep_5 ; $42
|
||||
endm
|
||||
|
||||
enum movement_step_sleep_6
|
||||
step_sleep_6: macro
|
||||
db movement_step_sleep_6 ; $43
|
||||
endm
|
||||
|
||||
enum movement_step_sleep_7
|
||||
step_sleep_7: macro
|
||||
db movement_step_sleep_7 ; $44
|
||||
endm
|
||||
|
||||
enum movement_step_sleep_8
|
||||
step_sleep_8: macro
|
||||
db movement_step_sleep_8 ; $45
|
||||
endm
|
||||
|
||||
enum movement_step_sleep
|
||||
@ -333,6 +361,11 @@ remove_person: macro
|
||||
db movement_remove_person ; $49
|
||||
endm
|
||||
|
||||
enum movement_step_loop
|
||||
step_loop: macro
|
||||
db movement_step_loop ; $4a
|
||||
endm
|
||||
|
||||
__enum__ = $4c
|
||||
|
||||
enum movement_teleport_from
|
||||
@ -362,9 +395,9 @@ fish_got_bite: macro
|
||||
db movement_fish_got_bite ; $51
|
||||
endm
|
||||
|
||||
enum movement_fish_got_bite_2
|
||||
fish_got_bite_2: macro
|
||||
db movement_fish_got_bite_2 ; $52
|
||||
enum movement_fish_cast_rod
|
||||
fish_cast_rod: macro
|
||||
db movement_fish_cast_rod ; $52
|
||||
endm
|
||||
|
||||
enum movement_hide_emote
|
||||
|
@ -31,7 +31,7 @@ Script_BattleRoomLoop: ; 0x9f425
|
||||
keeptextopen
|
||||
loadmovesprites
|
||||
special BattleTowerBattle ; calls predef startbattle
|
||||
special FadeBlackBGMap
|
||||
special FadeOutPalettes
|
||||
reloadmap
|
||||
if_not_equal $0, Script_FailedBattleTowerChallenge
|
||||
copybytetovar wNrOfBeatenBattleTowerTrainers ; wcf64
|
||||
@ -46,10 +46,10 @@ Script_BattleRoomLoop: ; 0x9f425
|
||||
closetext
|
||||
loadmovesprites
|
||||
playmusic MUSIC_HEAL
|
||||
special FadeBlackBGMap
|
||||
special FadeOutPalettes
|
||||
special LoadMapPalettes
|
||||
pause 60
|
||||
special FadeInBGMap
|
||||
special FadeInPalettes
|
||||
special RestartMapMusic
|
||||
loadfont
|
||||
writetext Text_NextUpOpponentNo
|
||||
@ -73,7 +73,7 @@ Script_DontBattleNextOpponent: ; 0x9f483
|
||||
special BattleTowerAction
|
||||
playsound SFX_SAVE
|
||||
waitbutton
|
||||
special FadeBlackBGMap
|
||||
special FadeOutPalettes
|
||||
special Reset
|
||||
Script_DontSaveAndEndTheSession: ; 0x9f4a3
|
||||
writetext Text_CancelYourBattleRoomChallenge
|
||||
@ -84,7 +84,7 @@ Script_DontSaveAndEndTheSession: ; 0x9f4a3
|
||||
writebyte BATTLE_TOWER_ACTION_06
|
||||
special BattleTowerAction
|
||||
loadmovesprites
|
||||
special FadeBlackBGMap
|
||||
special FadeOutPalettes
|
||||
warpfacing UP, BATTLE_TOWER_1F, $7, $7
|
||||
loadfont
|
||||
jump UnknownScript_0x9e4b0
|
||||
|
@ -30,10 +30,10 @@ UnknownScript_0x19b0de:
|
||||
writetext UnknownText_0x19b266
|
||||
closetext
|
||||
loadmovesprites
|
||||
special FadeBlackBGMap
|
||||
special FadeOutPalettes
|
||||
playmusic MUSIC_HEAL
|
||||
pause 60
|
||||
special FadeInBGMap
|
||||
special FadeInPalettes
|
||||
special RestartMapMusic
|
||||
loadfont
|
||||
writetext UnknownText_0x19b296
|
||||
|
@ -176,8 +176,8 @@ MovementData_0x1884eb:
|
||||
jump_step_up
|
||||
db $38 ; movement
|
||||
remove_fixed_facing
|
||||
accelerate_last
|
||||
accelerate_last
|
||||
step_sleep_8
|
||||
step_sleep_8
|
||||
step_down
|
||||
step_down
|
||||
step_end
|
||||
|
@ -49,7 +49,7 @@ ColosseumScript_Initialize:
|
||||
|
||||
MapColosseumSignpost1Script:
|
||||
special Special_Colosseum
|
||||
newloadmap MAPSETUP_08
|
||||
newloadmap MAPSETUP_LINKRETURN
|
||||
end
|
||||
|
||||
ChrisScript_0x193499:
|
||||
|
@ -84,7 +84,7 @@ UnknownScript_0x99dc6:
|
||||
follow PLAYER, $8
|
||||
applymovement PLAYER, MovementData_0x99e5f
|
||||
stopfollow
|
||||
special FadeBlackBGMap
|
||||
special FadeOutPalettes
|
||||
playsound SFX_ENTER_DOOR
|
||||
waitbutton
|
||||
warp ECRUTEAK_CITY, $6, $1b
|
||||
|
@ -64,7 +64,7 @@ SailorScript_0x75160:
|
||||
loadmovesprites
|
||||
scall .LetThePlayerOut
|
||||
playsound SFX_EXIT_BUILDING
|
||||
special FadeBlackBGMap
|
||||
special FadeOutPalettes
|
||||
waitbutton
|
||||
setevent EVENT_VERMILION_PORT_SAILOR_AT_GANGWAY
|
||||
domaptrigger VERMILION_PORT, $1
|
||||
@ -77,7 +77,7 @@ SailorScript_0x75160:
|
||||
loadmovesprites
|
||||
scall .LetThePlayerOut
|
||||
playsound SFX_EXIT_BUILDING
|
||||
special FadeBlackBGMap
|
||||
special FadeOutPalettes
|
||||
waitbutton
|
||||
setevent EVENT_OLIVINE_PORT_SAILOR_AT_GANGWAY
|
||||
domaptrigger OLIVINE_PORT, $1
|
||||
|
@ -35,7 +35,7 @@ OfficerScript_0x550ec:
|
||||
writebyte $0
|
||||
special Special_MagnetTrain
|
||||
warpcheck
|
||||
newloadmap MAPSETUP_09
|
||||
newloadmap MAPSETUP_TRAIN
|
||||
applymovement PLAYER, .MovementBoardTheTrain
|
||||
wait $14
|
||||
end
|
||||
|
@ -572,8 +572,8 @@ MovementData_0x6eed2:
|
||||
big_step_down
|
||||
fix_facing
|
||||
jump_step_up
|
||||
accelerate_last
|
||||
accelerate_last
|
||||
step_sleep_8
|
||||
step_sleep_8
|
||||
remove_fixed_facing
|
||||
big_step_up
|
||||
big_step_up
|
||||
@ -664,8 +664,8 @@ MovementData_0x6ef23:
|
||||
big_step_left
|
||||
fix_facing
|
||||
jump_step_right
|
||||
accelerate_last
|
||||
accelerate_last
|
||||
step_sleep_8
|
||||
step_sleep_8
|
||||
remove_fixed_facing
|
||||
big_step_left
|
||||
big_step_left
|
||||
@ -694,8 +694,8 @@ MovementData_0x6ef3d:
|
||||
big_step_left
|
||||
fix_facing
|
||||
jump_step_right
|
||||
accelerate_last
|
||||
accelerate_last
|
||||
step_sleep_8
|
||||
step_sleep_8
|
||||
remove_fixed_facing
|
||||
big_step_right
|
||||
big_step_right
|
||||
|
@ -154,7 +154,7 @@ TeleportGuyScript:
|
||||
closetext
|
||||
loadmovesprites
|
||||
playsound SFX_WARP_TO
|
||||
special FadeBlackBGMap
|
||||
special FadeOutPalettes
|
||||
waitbutton
|
||||
warp NEW_BARK_TOWN, $d, $6
|
||||
end
|
||||
|
@ -125,7 +125,7 @@ LanceScript_0x180e7b:
|
||||
pause 30
|
||||
loadmovesprites
|
||||
applymovement $3, MovementData_0x180f5b
|
||||
special FadeBlackBGMap
|
||||
special FadeOutPalettes
|
||||
pause 15
|
||||
warpfacing UP, HALL_OF_FAME, $4, $d
|
||||
end
|
||||
|
@ -35,11 +35,11 @@ MapMobileBattleRoomSignpost0Script:
|
||||
writetext MobileBattleRoom_HealText
|
||||
pause 20
|
||||
loadmovesprites
|
||||
special FadeBlackBGMap
|
||||
special FadeOutPalettes
|
||||
playmusic MUSIC_HEAL
|
||||
special LoadMapPalettes
|
||||
pause 60
|
||||
special FadeInBGMap
|
||||
special FadeInPalettes
|
||||
special RestartMapMusic
|
||||
refreshscreen $0
|
||||
.two_:
|
||||
|
@ -42,9 +42,9 @@ UnknownScript_0x60bab:
|
||||
loadmovesprites
|
||||
special RestartMapMusic
|
||||
cry AMPHAROS
|
||||
special FadeBlackBGMap
|
||||
special FadeOutPalettes
|
||||
pause 10
|
||||
special FadeInBGMap
|
||||
special FadeInPalettes
|
||||
loadfont
|
||||
writetext UnknownText_0x60f3d
|
||||
closetext
|
||||
@ -116,10 +116,10 @@ UnknownScript_0x60c51:
|
||||
cry AMPHAROS
|
||||
closetext
|
||||
loadmovesprites
|
||||
special FadeBlackBGMap
|
||||
special FadeInBGMap
|
||||
special FadeBlackBGMap
|
||||
special FadeInBGMap
|
||||
special FadeOutPalettes
|
||||
special FadeInPalettes
|
||||
special FadeOutPalettes
|
||||
special FadeInPalettes
|
||||
end
|
||||
|
||||
ItemFragment_0x60c66:
|
||||
@ -131,8 +131,8 @@ MovementData_0x60c68:
|
||||
slow_step_right
|
||||
slow_step_up
|
||||
slow_step_up
|
||||
accelerate_last
|
||||
accelerate_last
|
||||
step_sleep_8
|
||||
step_sleep_8
|
||||
step_end
|
||||
|
||||
MovementData_0x60c70:
|
||||
@ -153,7 +153,7 @@ MovementData_0x60c79:
|
||||
slow_step_up
|
||||
slow_step_up
|
||||
slow_step_up
|
||||
accelerate_last
|
||||
step_sleep_8
|
||||
step_end
|
||||
|
||||
UnknownText_0x60c81:
|
||||
|
@ -39,7 +39,7 @@ SailorScript_0x748c0:
|
||||
waitbutton
|
||||
applymovement PLAYER, MovementData_0x74a30
|
||||
playsound SFX_EXIT_BUILDING
|
||||
special FadeBlackBGMap
|
||||
special FadeOutPalettes
|
||||
waitbutton
|
||||
checkevent EVENT_FAST_SHIP_FIRST_TIME
|
||||
iffalse UnknownScript_0x7490a
|
||||
|
@ -75,7 +75,7 @@ Route35NationalParkgate_GoBackIn:
|
||||
loadmovesprites
|
||||
scall Route35NationalParkgate_EnterContest
|
||||
playsound SFX_ENTER_DOOR
|
||||
special FadeBlackBGMap
|
||||
special FadeOutPalettes
|
||||
waitbutton
|
||||
warpfacing UP, NATIONAL_PARK_BUG_CONTEST, $a, $2f
|
||||
end
|
||||
@ -112,7 +112,7 @@ Route35NationalParkgate_OkayToProceed:
|
||||
special Special_GiveParkBalls
|
||||
scall Route35NationalParkgate_EnterContest
|
||||
playsound SFX_ENTER_DOOR
|
||||
special FadeBlackBGMap
|
||||
special FadeOutPalettes
|
||||
waitbutton
|
||||
special Special_SelectRandomBugContestContestants
|
||||
warpfacing UP, NATIONAL_PARK_BUG_CONTEST, $a, $2f
|
||||
|
@ -83,7 +83,7 @@ Route36NationalParkgate_MapScriptHeader:
|
||||
loadmovesprites
|
||||
spriteface PLAYER, LEFT
|
||||
playsound SFX_EXIT_BUILDING
|
||||
special FadeBlackBGMap
|
||||
special FadeOutPalettes
|
||||
waitbutton
|
||||
warpfacing LEFT, NATIONAL_PARK_BUG_CONTEST, $21, $12
|
||||
end
|
||||
@ -166,7 +166,7 @@ Route36OfficerScriptContest:
|
||||
special Special_GiveParkBalls
|
||||
spriteface PLAYER, LEFT
|
||||
playsound SFX_EXIT_BUILDING
|
||||
special FadeBlackBGMap
|
||||
special FadeOutPalettes
|
||||
waitbutton
|
||||
special Special_SelectRandomBugContestContestants
|
||||
warpfacing LEFT, NATIONAL_PARK_BUG_CONTEST, $21, $12
|
||||
|
@ -35,7 +35,7 @@ OfficerScript_0x18a81e:
|
||||
writebyte $1
|
||||
special Special_MagnetTrain
|
||||
warpcheck
|
||||
newloadmap MAPSETUP_09
|
||||
newloadmap MAPSETUP_TRAIN
|
||||
applymovement PLAYER, .MovementBoardTheTrain
|
||||
wait $14
|
||||
end
|
||||
|
@ -56,7 +56,7 @@ GruntM1Script:
|
||||
clearevent EVENT_AZALEA_TOWN_SLOWPOKES
|
||||
clearevent EVENT_KURTS_HOUSE_SLOWPOKE
|
||||
clearevent EVENT_KURTS_HOUSE_KURT_1
|
||||
special FadeBlackBGMap
|
||||
special FadeOutPalettes
|
||||
special HealParty
|
||||
pause 15
|
||||
warp KURTS_HOUSE, $3, $3
|
||||
@ -121,15 +121,15 @@ KurtSlowpokeWellVictoryMovementData:
|
||||
step_left
|
||||
step_left
|
||||
step_up
|
||||
accelerate_last
|
||||
accelerate_last
|
||||
accelerate_last
|
||||
step_sleep_8
|
||||
step_sleep_8
|
||||
step_sleep_8
|
||||
step_left
|
||||
step_up
|
||||
step_up
|
||||
accelerate_last
|
||||
accelerate_last
|
||||
accelerate_last
|
||||
step_sleep_8
|
||||
step_sleep_8
|
||||
step_sleep_8
|
||||
turn_head_left
|
||||
step_end
|
||||
|
||||
|
@ -445,9 +445,9 @@ ExplodingTrap22:
|
||||
end
|
||||
|
||||
VoltorbExplodingTrap:
|
||||
special FadeBlackBGMap
|
||||
special FadeOutPalettes
|
||||
cry VOLTORB
|
||||
special FadeInBGMap
|
||||
special FadeInPalettes
|
||||
setlasttalked $ff
|
||||
writecode VAR_BATTLETYPE, BATTLETYPE_TRAP
|
||||
loadpokedata VOLTORB, 23
|
||||
@ -455,9 +455,9 @@ VoltorbExplodingTrap:
|
||||
end
|
||||
|
||||
GeodudeExplodingTrap:
|
||||
special FadeBlackBGMap
|
||||
special FadeOutPalettes
|
||||
cry GEODUDE
|
||||
special FadeInBGMap
|
||||
special FadeInPalettes
|
||||
setlasttalked $ff
|
||||
writecode VAR_BATTLETYPE, BATTLETYPE_TRAP
|
||||
loadpokedata GEODUDE, 21
|
||||
@ -465,9 +465,9 @@ GeodudeExplodingTrap:
|
||||
end
|
||||
|
||||
KoffingExplodingTrap:
|
||||
special FadeBlackBGMap
|
||||
special FadeOutPalettes
|
||||
cry KOFFING
|
||||
special FadeInBGMap
|
||||
special FadeInPalettes
|
||||
setlasttalked $ff
|
||||
writecode VAR_BATTLETYPE, BATTLETYPE_TRAP
|
||||
loadpokedata KOFFING, 21
|
||||
|
@ -155,11 +155,11 @@ UnknownScript_0x6d091:
|
||||
writetext UnknownText_0x6da97
|
||||
closetext
|
||||
loadmovesprites
|
||||
special FadeBlackBGMap
|
||||
special FadeOutPalettes
|
||||
special Mobile_HealParty
|
||||
playsound SFX_FULL_HEAL
|
||||
special HealParty
|
||||
special FadeInBGMap
|
||||
special FadeInPalettes
|
||||
loadfont
|
||||
writetext UnknownText_0x6daf7
|
||||
closetext
|
||||
@ -449,17 +449,17 @@ MovementData_0x6d254:
|
||||
step_end
|
||||
|
||||
MovementData_0x6d258:
|
||||
accelerate_last
|
||||
step_sleep_8
|
||||
step_left
|
||||
step_left
|
||||
turn_head_up
|
||||
accelerate_last
|
||||
step_sleep_8
|
||||
step_right
|
||||
step_right
|
||||
step_right
|
||||
step_right
|
||||
turn_head_up
|
||||
accelerate_last
|
||||
step_sleep_8
|
||||
step_left
|
||||
step_left
|
||||
turn_head_down
|
||||
|
@ -254,8 +254,8 @@ MovementData_0x6e147:
|
||||
fix_facing
|
||||
fast_jump_step_left
|
||||
remove_fixed_facing
|
||||
accelerate_last
|
||||
accelerate_last
|
||||
step_sleep_8
|
||||
step_sleep_8
|
||||
slow_step_right
|
||||
big_step_down
|
||||
big_step_down
|
||||
|
@ -39,7 +39,7 @@ TimeCapsule_Initialize:
|
||||
|
||||
MapTimeCapsuleSignpost1Script:
|
||||
special Special_TimeCapsule
|
||||
newloadmap MAPSETUP_08
|
||||
newloadmap MAPSETUP_LINKRETURN
|
||||
end
|
||||
|
||||
ChrisScript_0x19351a:
|
||||
|
@ -39,7 +39,7 @@ TradeCenter_Initialize:
|
||||
|
||||
MapTradeCenterSignpost1Script:
|
||||
special Special_TradeCenter
|
||||
newloadmap MAPSETUP_08
|
||||
newloadmap MAPSETUP_LINKRETURN
|
||||
end
|
||||
|
||||
ChrisScript_0x19340b:
|
||||
|
@ -51,7 +51,7 @@ SailorScript_0x74dc4:
|
||||
waitbutton
|
||||
applymovement PLAYER, MovementData_0x74ef1
|
||||
playsound SFX_EXIT_BUILDING
|
||||
special FadeBlackBGMap
|
||||
special FadeOutPalettes
|
||||
waitbutton
|
||||
setevent EVENT_FAST_SHIP_PASSENGERS_EASTBOUND
|
||||
clearevent EVENT_FAST_SHIP_PASSENGERS_WESTBOUND
|
||||
|
@ -226,10 +226,10 @@ OlderHaircutBrotherScript:
|
||||
writetext UnknownText_0x7c6b8
|
||||
closetext
|
||||
loadmovesprites
|
||||
special FadeBlackBGMap
|
||||
special FadeOutPalettes
|
||||
playmusic MUSIC_HEAL
|
||||
pause 60
|
||||
special FadeInBGMap
|
||||
special FadeInPalettes
|
||||
special RestartMapMusic
|
||||
loadfont
|
||||
writetext UnknownText_0x7c6d8
|
||||
@ -309,10 +309,10 @@ YoungerHaircutBrotherScript:
|
||||
writetext UnknownText_0x7c80e
|
||||
closetext
|
||||
loadmovesprites
|
||||
special FadeBlackBGMap
|
||||
special FadeOutPalettes
|
||||
playmusic MUSIC_HEAL
|
||||
pause 60
|
||||
special FadeInBGMap
|
||||
special FadeInPalettes
|
||||
special RestartMapMusic
|
||||
loadfont
|
||||
writetext UnknownText_0x7c82a
|
||||
|
@ -371,7 +371,7 @@ Function11c1ca: ; 11c1ca
|
||||
ld a, [MenuSelection2]
|
||||
dec a
|
||||
call Function11c254
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearSprites
|
||||
call ClearScreen
|
||||
call Function11d323
|
||||
|
@ -1801,7 +1801,7 @@ Function89b07: ; 89b07
|
||||
; 89b14
|
||||
|
||||
Function89b14: ; 89b14
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call Function89b07
|
||||
call Function89b00
|
||||
ret
|
||||
@ -1814,7 +1814,7 @@ Function89b1e: ; 89b1e (22:5b1e)
|
||||
|
||||
Function89b28: ; 89b28 (22:5b28)
|
||||
call Function891de
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call Function893e2
|
||||
call Call_ExitMenu
|
||||
call Function891ab
|
||||
@ -2414,7 +2414,7 @@ Function89eb9: ; 89eb9 (22:5eb9)
|
||||
jp Function89e36
|
||||
|
||||
Function89ee1: ; 89ee1 (22:5ee1)
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call Function893e2
|
||||
call Function8923c
|
||||
callba Function4a3a7
|
||||
@ -2602,7 +2602,7 @@ Function89fed: ; 89fed (22:5fed)
|
||||
|
||||
Function89ff6: ; 89ff6 (22:5ff6)
|
||||
call Function891fe
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call Function893cc
|
||||
call Function89807
|
||||
call Function89492
|
||||
@ -2937,14 +2937,14 @@ Function8a241: ; 8a241 (22:6241)
|
||||
ret
|
||||
.asm_8a254
|
||||
call Function891de
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call Call_ExitMenu
|
||||
call Function891de
|
||||
and a
|
||||
ret
|
||||
|
||||
Function8a262: ; 8a262 (22:6262)
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call Function893e2
|
||||
call Function8923c
|
||||
callba Function4a3a7
|
||||
@ -3501,7 +3501,7 @@ Jumptable_8a671: ; 8a671 (22:6671)
|
||||
|
||||
Function8a679: ; 8a679 (22:6679)
|
||||
call Function891de
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call Function893cc
|
||||
call OpenSRAMBank4
|
||||
call Function8931b
|
||||
@ -3546,7 +3546,7 @@ Function8a6c5: ; 8a6c5 (22:66c5)
|
||||
|
||||
Function8a6cd: ; 8a6cd (22:66cd)
|
||||
call Function891de
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call Function893cc
|
||||
call OpenSRAMBank4
|
||||
call Function8931b
|
||||
@ -3594,7 +3594,7 @@ Function8a6cd: ; 8a6cd (22:66cd)
|
||||
.asm_8a73f
|
||||
call CloseSRAM
|
||||
.asm_8a742
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call Function89448
|
||||
call Function891d3
|
||||
call Function8b677
|
||||
@ -3657,7 +3657,7 @@ Function8a78c: ; 8a78c (22:678c)
|
||||
call DelayFrame
|
||||
call JoyTextDelay
|
||||
call Function891de
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call Function893cc
|
||||
call OpenSRAMBank4
|
||||
pop bc
|
||||
@ -3687,7 +3687,7 @@ Function8a7cb: ; 8a7cb (22:67cb)
|
||||
pop af
|
||||
ld [MenuSelection], a
|
||||
call Function891de
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call Function893cc
|
||||
call OpenSRAMBank4
|
||||
call Function8931b
|
||||
@ -3781,7 +3781,7 @@ Function8a8a1: ; 8a8a1 (22:68a1)
|
||||
|
||||
Function8a8c3: ; 8a8c3 (22:68c3)
|
||||
call Function891de
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call Function893cc
|
||||
call OpenSRAMBank4
|
||||
call Function8931b
|
||||
@ -3969,7 +3969,7 @@ Function8aa0a: ; 8aa0a (22:6a0a)
|
||||
call Function89381
|
||||
call CloseSRAM
|
||||
call Function891fe
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call Function893cc
|
||||
call Function89807
|
||||
call Function89492
|
||||
@ -4027,7 +4027,7 @@ Function8aa73: ; 8aa73 (22:6a73)
|
||||
call Function89193
|
||||
.asm_8aa9d
|
||||
call Function891fe
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call Function893cc
|
||||
call Function89807
|
||||
call Function89492
|
||||
@ -4101,7 +4101,7 @@ Function8ab11: ; 8ab11 (22:6b11)
|
||||
|
||||
Function8ab3b: ; 8ab3b (22:6b3b)
|
||||
call Function891fe
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call Function893cc
|
||||
call Function89807
|
||||
call Function89492
|
||||
@ -4140,7 +4140,7 @@ Function8ab77: ; 8ab77 (22:6b77)
|
||||
ret
|
||||
|
||||
Function8ab93: ; 8ab93 (22:6b93)
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call LoadStandardMenuDataHeader
|
||||
callba Function105688
|
||||
call ClearSprites
|
||||
@ -4183,7 +4183,7 @@ Function8aba9: ; 8aba9
|
||||
call PlayClickSFX
|
||||
.asm_8abe5
|
||||
call Function891de
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call Function893cc
|
||||
call OpenSRAMBank4
|
||||
call Function8931b
|
||||
@ -4228,7 +4228,7 @@ Function8ac4e: ; 8ac4e
|
||||
ld [MenuSelection], a
|
||||
push de
|
||||
call Function891de
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call Function893cc
|
||||
pop bc
|
||||
call Function89844
|
||||
@ -4337,7 +4337,7 @@ Function8ad0b: ; 8ad0b
|
||||
ld a, [MenuSelection]
|
||||
ld [wd02f], a
|
||||
call Function891de
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call Function893cc
|
||||
call OpenSRAMBank4
|
||||
call Function8931b
|
||||
|
@ -574,7 +574,7 @@ Function8b664: ; 8b664 (22:7664)
|
||||
ret
|
||||
|
||||
Function8b677: ; 8b677
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call DisableLCD
|
||||
call Function8b690
|
||||
call Function8b6bb
|
||||
|
@ -48,7 +48,7 @@ Function100022: ; 100022
|
||||
|
||||
Function100057: ; 100057
|
||||
call Function1000a4
|
||||
call Function222a
|
||||
call ReturnToMapFromSubmenu
|
||||
ld hl, VramState
|
||||
res 1, [hl]
|
||||
ret
|
||||
@ -74,7 +74,7 @@ Function100063: ; 100063
|
||||
Function100082: ; 100082
|
||||
xor a
|
||||
ld hl, OverworldMap
|
||||
ld bc, 1300
|
||||
ld bc, OverworldMapEnd - OverworldMap
|
||||
call ByteFill
|
||||
di
|
||||
call DoubleSpeed
|
||||
@ -312,7 +312,7 @@ Function10016f: ; 10016f
|
||||
Function10020b: ; 10020b
|
||||
xor a
|
||||
ld [wc303], a
|
||||
callba FadeBlackBGMap
|
||||
callba FadeOutPalettes
|
||||
callba Function106464
|
||||
call HideSprites
|
||||
call DelayFrame
|
||||
@ -412,7 +412,7 @@ Function1002c9: ; 1002c9
|
||||
; 1002dc
|
||||
|
||||
Function1002dc: ; 1002dc
|
||||
ld a, MAPSETUP_08
|
||||
ld a, MAPSETUP_LINKRETURN
|
||||
ld [hMapEntryMethod], a
|
||||
callba RunMapSetupScript
|
||||
xor a
|
||||
@ -3048,7 +3048,7 @@ Function10138b: ; 10138b
|
||||
; 1013aa
|
||||
|
||||
Function1013aa: ; 1013aa
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call Call_ExitMenu
|
||||
call Function2bae
|
||||
callba Function106464
|
||||
|
@ -951,7 +951,7 @@ Function106442: ; 106442
|
||||
call Function3e32
|
||||
xor a
|
||||
ld [hMobile], a
|
||||
ld [$ffc9], a
|
||||
ld [hFFC9], a
|
||||
ld a, [wcd25]
|
||||
inc a
|
||||
ld [wcd25], a
|
||||
|
@ -125,7 +125,7 @@ Function108089: ; 108089
|
||||
Function1080b7: ; 1080b7
|
||||
xor a
|
||||
ld [wJumptableIndex], a
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearSprites
|
||||
call ClearTileMap
|
||||
call DisableLCD
|
||||
@ -188,7 +188,7 @@ Function1080b7: ; 1080b7
|
||||
Function108157: ; 108157
|
||||
xor a
|
||||
ld [wJumptableIndex], a
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearSprites
|
||||
call ClearTileMap
|
||||
call DisableLCD
|
||||
@ -508,7 +508,7 @@ Function10830e: ; 10830e
|
||||
; 10839b
|
||||
|
||||
Function10839b: ; 10839b
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearSprites
|
||||
call ClearTileMap
|
||||
call DisableLCD
|
||||
@ -643,7 +643,7 @@ Function10842c: ; 10842c
|
||||
; 1084d7
|
||||
|
||||
Function1084d7: ; 1084d7
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearSprites
|
||||
call ClearTileMap
|
||||
call DisableLCD
|
||||
@ -712,7 +712,7 @@ Function1084d7: ; 1084d7
|
||||
; 108589
|
||||
|
||||
Function108589: ; 108589
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearSprites
|
||||
call ClearTileMap
|
||||
call DisableLCD
|
||||
@ -781,7 +781,7 @@ Function108589: ; 108589
|
||||
|
||||
Function108638: ; 108638
|
||||
callba Function8d03d
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearSprites
|
||||
call ClearTileMap
|
||||
xor a
|
||||
@ -817,7 +817,7 @@ Function108638: ; 108638
|
||||
|
||||
Function108689: ; 108689
|
||||
callba Function8d03d
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearSprites
|
||||
call ClearTileMap
|
||||
xor a
|
||||
@ -862,7 +862,7 @@ Function108689: ; 108689
|
||||
; 1086f4
|
||||
|
||||
Function1086f4: ; 1086f4
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearSprites
|
||||
call ClearTileMap
|
||||
xor a
|
||||
@ -1162,7 +1162,7 @@ Function108919: ; 108919
|
||||
ld c, $28
|
||||
call Function1082cc
|
||||
callba Function8d03d
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearSprites
|
||||
call ClearTileMap
|
||||
call DisableLCD
|
||||
|
@ -7708,7 +7708,7 @@ Function117699: ; 117699 (45:7699)
|
||||
ld hl, wc708
|
||||
ld bc, $11
|
||||
call ByteFill
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearSprites
|
||||
callba Function171c87
|
||||
callba Function104061
|
||||
@ -7726,7 +7726,7 @@ Function1176ee: ; 1176ee (45:76ee)
|
||||
jr Function1176ee
|
||||
.asm_117709
|
||||
callba Function8cf53
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearScreen
|
||||
call ClearSprites
|
||||
ret
|
||||
@ -8172,7 +8172,7 @@ Function117a94: ; 0x117a94
|
||||
ld [wcf64], a
|
||||
ld [wcf65], a
|
||||
ld [wcf66], a
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearSprites
|
||||
callba Function172e78
|
||||
callba Function104000
|
||||
@ -8180,7 +8180,7 @@ Function117a94: ; 0x117a94
|
||||
; 0x117ab4
|
||||
|
||||
Function117ab4: ; 0x117ab4
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearSprites
|
||||
callba Function172e78
|
||||
callba Function172eb9
|
||||
@ -8197,7 +8197,7 @@ Function117acd: ; 0x117acd
|
||||
callba Function104000
|
||||
jr Function117acd
|
||||
.asm_117ae2
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearSprites
|
||||
ret
|
||||
|
||||
|
@ -43,7 +43,7 @@ asm_11800b
|
||||
pop af
|
||||
ld [rSVBK], a
|
||||
call Function118452
|
||||
call Function222a
|
||||
call ReturnToMapFromSubmenu
|
||||
Function11805e: ; 11805e (46:405e)
|
||||
ret
|
||||
; 11805f
|
||||
@ -84,7 +84,7 @@ Function11805f: ; 11805f
|
||||
pop af
|
||||
ld [rSVBK], a
|
||||
call Function118452
|
||||
call Function222a
|
||||
call ReturnToMapFromSubmenu
|
||||
ret
|
||||
; 1180b8
|
||||
|
||||
@ -130,7 +130,7 @@ Function1180b8: ; 1180b8
|
||||
pop af
|
||||
ld [rSVBK], a
|
||||
call Function118452
|
||||
call Function222a
|
||||
call ReturnToMapFromSubmenu
|
||||
ret
|
||||
; 11811a
|
||||
|
||||
@ -180,7 +180,7 @@ Function118125: ; 118125
|
||||
ld [rSVBK], a
|
||||
call Function118452
|
||||
call Function118180
|
||||
call Function222a
|
||||
call ReturnToMapFromSubmenu
|
||||
ret
|
||||
; 118180
|
||||
|
||||
@ -262,7 +262,7 @@ Function1181da: ; 1181da
|
||||
pop af
|
||||
ld [rSVBK], a
|
||||
call Function118452
|
||||
call Function222a
|
||||
call ReturnToMapFromSubmenu
|
||||
ret
|
||||
; 118233
|
||||
|
||||
@ -374,7 +374,7 @@ Function1182d5: ; 1182d5
|
||||
pop af
|
||||
ld [rSVBK], a
|
||||
call Function118452
|
||||
call Function222a
|
||||
call ReturnToMapFromSubmenu
|
||||
ret
|
||||
; 118329
|
||||
|
||||
@ -482,7 +482,7 @@ Function1183cb: ; 1183cb
|
||||
ld a, $f
|
||||
ld [rIE], a
|
||||
ld a, $1
|
||||
ld [$ffc9], a
|
||||
ld [hFFC9], a
|
||||
ld [hMobile], a
|
||||
ei
|
||||
callba Function106462
|
||||
@ -512,7 +512,7 @@ Function118440: ; 118440
|
||||
Function118452: ; 118452
|
||||
di
|
||||
xor a
|
||||
ld [$ffc9], a
|
||||
ld [hFFC9], a
|
||||
ld [hMobile], a
|
||||
ld [hVBlank], a
|
||||
call NormalSpeed
|
||||
@ -5682,7 +5682,7 @@ Function11a9c0: ; 11a9c0
|
||||
; 11a9ce
|
||||
|
||||
Function11a9ce: ; 11a9ce
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call Function2bae
|
||||
call Call_ExitMenu
|
||||
callba Function106462
|
||||
@ -5950,7 +5950,7 @@ Function11acb7: ; 11acb7
|
||||
; 11ad1b
|
||||
|
||||
Function11ad1b: ; 11ad1b
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearSprites
|
||||
call ClearTileMap
|
||||
callba Function17c000
|
||||
|
@ -140,7 +140,7 @@ Function16c0dc: ; 16c0dc
|
||||
; 16c0ec
|
||||
|
||||
Function16c0ec: ; 16c0ec
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearScreen
|
||||
push af
|
||||
ld a, $ff
|
||||
@ -885,7 +885,7 @@ Function16d42e: ; 16d42e
|
||||
|
||||
Function16d43b: ; 16d43b
|
||||
call LoadStandardMenuDataHeader
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearTileMap
|
||||
call ClearSprites
|
||||
callba Function16d421
|
||||
|
@ -283,7 +283,7 @@ Function1704e1: ; 1704e1
|
||||
; 1704f1
|
||||
|
||||
Function1704f1: ; 1704f1
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearSprites
|
||||
call ClearScreen
|
||||
.asm_1704fa
|
||||
@ -1590,7 +1590,7 @@ Function1719ed: ; 1719ed (5c:59ed)
|
||||
ld [wcd4a], a
|
||||
dec a
|
||||
ld [wcd4b], a
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearSprites
|
||||
callba Function171d2b
|
||||
callba Function104061
|
||||
@ -1883,7 +1883,7 @@ Function171c2c: ; 171c2c (5c:5c2c)
|
||||
dec [hl]
|
||||
ret nz
|
||||
call ExitMenu
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
jr asm_171c60
|
||||
|
||||
Function171c39: ; 171c39 (5c:5c39)
|
||||
@ -1895,7 +1895,7 @@ Function171c41: ; 171c41 (5c:5c41)
|
||||
ld hl, wcd4c
|
||||
dec [hl]
|
||||
ret nz
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
callba Function106462
|
||||
callba Function106464
|
||||
ld a, $2
|
||||
|
@ -561,7 +561,7 @@ Function17d2ce: ; 17d2ce
|
||||
ld a, d
|
||||
ld [MusicFadeIDHi], a
|
||||
call PlayMusic
|
||||
call Function222a
|
||||
call ReturnToMapFromSubmenu
|
||||
call Function2b3c
|
||||
ret
|
||||
; 17d314
|
||||
@ -626,7 +626,7 @@ Function17d370: ; 17d370
|
||||
ld [wcd79], a
|
||||
dec a
|
||||
ld [wcd6c], a
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearSprites
|
||||
call ClearScreen
|
||||
callba Function104061
|
||||
@ -672,7 +672,7 @@ Function17d370: ; 17d370
|
||||
; 17d3f6
|
||||
|
||||
Function17d3f6: ; 17d3f6
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearSprites
|
||||
call ClearScreen
|
||||
callba Function104061
|
||||
@ -1245,7 +1245,7 @@ Function17d78d: ; 17d78d
|
||||
call CloseSRAM
|
||||
xor a
|
||||
ld [wcd77], a
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
ret
|
||||
; 17d7b4
|
||||
|
||||
|
@ -3,7 +3,7 @@ SECTION "bank43", ROMX, BANK[$43]
|
||||
|
||||
UnusedTitleScreen: ; 10c000
|
||||
|
||||
call WhiteBGMap
|
||||
call ClearBGPalettes
|
||||
call ClearTileMap
|
||||
call DisableLCD
|
||||
xor a
|
||||
|
14
wram.asm
14
wram.asm
@ -321,10 +321,10 @@ ScriptVar:: ; c2dd
|
||||
wc2de:: ds 1
|
||||
wc2df:: ds 3
|
||||
wMovementPerson:: ds 1
|
||||
wMovementDataPointer:: ds 3
|
||||
wMovementDataPointer:: ds 3 ; dba
|
||||
wc2e6:: ds 4
|
||||
wc2ea:: ds 1
|
||||
wMovementPointer:: ds 2
|
||||
wMovementPointer:: ds 2 ; c2eb
|
||||
ds 3
|
||||
wc2f0:: ds 1
|
||||
wc2f1:: ds 1
|
||||
@ -334,7 +334,8 @@ wc2f4:: ds 1
|
||||
wc2f5:: ds 1
|
||||
wc2f6:: ds 1
|
||||
wc2f7:: ds 1
|
||||
wc2f8:: ds 2
|
||||
wc2f8:: ds 1
|
||||
ds 1
|
||||
|
||||
TileDown:: ; c2fa
|
||||
ds 1
|
||||
@ -1478,6 +1479,10 @@ wd014:: ds 2
|
||||
wd016:: ds 1
|
||||
wMartItem8BCD::
|
||||
wd017:: ds 1
|
||||
|
||||
wd018_Mon:: party_struct wd018_Mon
|
||||
ds wd018_Mon - @
|
||||
|
||||
wd018:: ds 1
|
||||
wd019:: ds 1
|
||||
wMartItem9BCD::
|
||||
@ -1506,6 +1511,7 @@ CurFruitTree::
|
||||
CurInput::
|
||||
EngineBuffer1:: ; d03e
|
||||
ds 1
|
||||
|
||||
wd03f::
|
||||
wJumpStdScriptBuffer::
|
||||
CurFruit:: ; d03f
|
||||
@ -2153,7 +2159,7 @@ object_struct: MACRO
|
||||
\1Palette:: ds 1
|
||||
\1Walking:: ds 1
|
||||
\1Direction:: ds 1
|
||||
ds 1
|
||||
\1Object09:: ds 1
|
||||
\1StepDuration:: ds 1
|
||||
\1Action:: ds 1
|
||||
\1Object12:: ds 1
|
||||
|
Loading…
Reference in New Issue
Block a user