writebackup --> closewindow; game corner prize vendors; others

This commit is contained in:
PikalaxALT 2015-12-24 22:58:42 -05:00
parent 1df28a6beb
commit a5e928eb98
44 changed files with 2604 additions and 2600 deletions

View File

@ -2932,7 +2932,7 @@ ForcePlayerMonChoice: ; 3d227
call ClearPalettes call ClearPalettes
call DelayFrame call DelayFrame
call _LoadHPBar call _LoadHPBar
call WriteBackup call CloseWindow
call GetMemSGBLayout call GetMemSGBLayout
call SetPalettes call SetPalettes
call SendOutPkmnText call SendOutPkmnText
@ -5368,7 +5368,7 @@ BattleMenuPKMN_Loop:
call ClearPalettes call ClearPalettes
call DelayFrame call DelayFrame
call _LoadHPBar call _LoadHPBar
call WriteBackup call CloseWindow
call LoadTileMapToTempTileMap call LoadTileMapToTempTileMap
call GetMemSGBLayout call GetMemSGBLayout
call SetPalettes call SetPalettes
@ -5451,7 +5451,7 @@ TryPlayerSwitch: ; 3e358
call DelayFrame call DelayFrame
call ClearSprites call ClearSprites
call _LoadHPBar call _LoadHPBar
call WriteBackup call CloseWindow
call GetMemSGBLayout call GetMemSGBLayout
call SetPalettes call SetPalettes
ld a, [CurPartyMon] ld a, [CurPartyMon]
@ -5464,7 +5464,7 @@ PlayerSwitch: ; 3e3ad
jr z, .not_linked jr z, .not_linked
call LoadStandardMenuDataHeader call LoadStandardMenuDataHeader
call LinkBattleSendReceiveAction call LinkBattleSendReceiveAction
call WriteBackup call CloseWindow
.not_linked .not_linked
call ParseEnemyAction call ParseEnemyAction

View File

@ -8961,7 +8961,7 @@ BattleCommand_BatonPass: ; 379c9
; Return to battle scene ; Return to battle scene
call ClearPalettes call ClearPalettes
callba _LoadBattleFontsHPBar callba _LoadBattleFontsHPBar
call WriteBackup call CloseWindow
call ClearSprites call ClearSprites
hlcoord 1, 0 hlcoord 1, 0
lb bc, 4, 10 lb bc, 4, 10
@ -9030,7 +9030,7 @@ BatonPass_LinkPlayerSwitch: ; 37a67
call LoadStandardMenuDataHeader call LoadStandardMenuDataHeader
ld hl, LinkBattleSendReceiveAction ld hl, LinkBattleSendReceiveAction
call CallBattleCore call CallBattleCore
call WriteBackup call CloseWindow
xor a xor a
ld [wPlayerAction], a ld [wPlayerAction], a
@ -9061,7 +9061,7 @@ BatonPass_LinkEnemySwitch: ; 37a82
add BATTLEACTION_SWITCH1 add BATTLEACTION_SWITCH1
ld [wBattleAction], a ld [wBattleAction], a
.switch .switch
jp WriteBackup jp CloseWindow
; 37aab ; 37aab

View File

@ -2331,7 +2331,7 @@ _ChangeBox: ; e35aa (38:75aa)
call BillsPC_ChangeBoxSubmenu call BillsPC_ChangeBoxSubmenu
jr .loop jr .loop
.done .done
call WriteBackup call CloseWindow
ret ret
BillsPC_ClearTilemap: ; e35e2 (38:75e2) BillsPC_ClearTilemap: ; e35e2 (38:75e2)

View File

@ -201,7 +201,7 @@ DoEggStep:: ; 16f3e
; 16f5e ; 16f5e
OverworldHatchEgg:: ; 16f5e OverworldHatchEgg:: ; 16f5e
call ResetWindow call RefreshScreen
call LoadStandardMenuDataHeader call LoadStandardMenuDataHeader
call HatchEggs call HatchEggs
call ExitAllMenus call ExitAllMenus

View File

@ -228,28 +228,27 @@ HandleMapTimeAndJoypad: ; 967c1
Function967d1: ; 967d1 Function967d1: ; 967d1
callba Function576a ; engine/map_objects.asm callba Function576a ; engine/map_objects.asm
callba Functiond497 callba _HandlePlayerStep
call Function96812 call _CheckObjectEnteringVisibleRange
ret ret
; 967e1 ; 967e1
Function967e1: ; 967e1 Function967e1: ; 967e1
callba _UpdateSprites callba _UpdateSprites
callba Functiond4d2 callba ScrollScreen
callba PlaceMapNameSign callba PlaceMapNameSign
ret ret
; 967f4 ; 967f4
Function967f4: ; 967f4 Function967f4: ; 967f4
ld a, [wPlayerStepFlags] ld a, [wPlayerStepFlags]
bit 5, a bit 5, a ; in the middle of step
jr z, .events jr z, .events
bit 6, a bit 6, a ; stopping step
jr z, .noevents jr z, .noevents
bit 4, a bit 4, a ; in midair
jr nz, .noevents jr nz, .noevents
call EnableEvents call EnableEvents
.events .events
ld a, 0 ; events ld a, 0 ; events
ld [MapEventStatus], a ld [MapEventStatus], a
@ -261,17 +260,15 @@ Function967f4: ; 967f4
ret ret
; 96812 ; 96812
Function96812: ; 96812 _CheckObjectEnteringVisibleRange: ; 96812
ld hl, wPlayerStepFlags ld hl, wPlayerStepFlags
bit 6, [hl] bit 6, [hl]
ret z ret z
callba CheckObjectEnteringVisibleRange
callba Function81ca
ret ret
; 9681f ; 9681f
PlayerEvents: ; 9681f PlayerEvents: ; 9681f
xor a xor a
; If there's already a player event, don't interrupt it. ; If there's already a player event, don't interrupt it.
ld a, [ScriptRunning] ld a, [ScriptRunning]

View File

@ -34,7 +34,7 @@ InitGender: ; 48dcb (12:4dcb)
call LoadMenuDataHeader call LoadMenuDataHeader
call WaitBGMap2 call WaitBGMap2
call VerticalMenu call VerticalMenu
call WriteBackup call CloseWindow
ld a, [wMenuCursorY] ld a, [wMenuCursorY]
dec a dec a
ld [PlayerGender], a ld [PlayerGender], a

View File

@ -362,13 +362,13 @@ Continue: ; 5d65
call DelayFrames call DelayFrames
call ConfirmContinue call ConfirmContinue
jr nc, .Check1Pass jr nc, .Check1Pass
call WriteBackup call CloseWindow
jr .FailToLoad jr .FailToLoad
.Check1Pass .Check1Pass
call Continue_CheckRTC_RestartClock call Continue_CheckRTC_RestartClock
jr nc, .Check2Pass jr nc, .Check2Pass
call WriteBackup call CloseWindow
jr .FailToLoad jr .FailToLoad
.Check2Pass .Check2Pass
@ -380,7 +380,7 @@ Continue: ; 5d65
ld [MusicFadeIDHi], a ld [MusicFadeIDHi], a
call ClearBGPalettes call ClearBGPalettes
call Continue_MobileAdapterMenu call Continue_MobileAdapterMenu
call WriteBackup call CloseWindow
call ClearTileMap call ClearTileMap
ld c, 20 ld c, 20
call DelayFrames call DelayFrames
@ -832,7 +832,7 @@ Function60e9: ; Unreferenced
ld a, [wMenuCursorY] ld a, [wMenuCursorY]
dec a dec a
call CopyNameFromMenu call CopyNameFromMenu
call WriteBackup call CloseWindow
ret ret
; 60fa ; 60fa

View File

@ -315,7 +315,7 @@ _KrisMailBoxMenu: ; 0x447a0
jr z, .nomail jr z, .nomail
call LoadStandardMenuDataHeader call LoadStandardMenuDataHeader
call MailboxPC call MailboxPC
jp WriteBackup jp CloseWindow
.nomail .nomail
ld hl, .EmptyMailboxText ld hl, .EmptyMailboxText

View File

@ -17,7 +17,7 @@ MainMenu: ; 49cdc
ld hl, .MenuDataHeader ld hl, .MenuDataHeader
call LoadMenuDataHeader call LoadMenuDataHeader
call MainMenuJoypadLoop call MainMenuJoypadLoop
call WriteBackup call CloseWindow
jr c, .quit jr c, .quit
call ClearTileMap call ClearTileMap
ld a, [MenuSelection] ld a, [MenuSelection]

View File

@ -2875,7 +2875,7 @@ Function56a3: ; 56a3
; 56cd ; 56cd
Function56cd: ; 56cd Function56cd: ; 56cd
ld a, [wd14c] ld a, [wFollowNotExactPersonX]
ld d, a ld d, a
ld hl, OBJECT_SPRITE_X_OFFSET ld hl, OBJECT_SPRITE_X_OFFSET
add hl, bc add hl, bc
@ -2907,7 +2907,7 @@ Function56cd: ; 56cd
.ok3 .ok3
ld [hUsedSpriteIndex], a ld [hUsedSpriteIndex], a
ld a, [wd14d] ld a, [wFollowNotExactPersonY]
ld e, a ld e, a
ld hl, OBJECT_SPRITE_Y_OFFSET ld hl, OBJECT_SPRITE_Y_OFFSET
add hl, bc add hl, bc
@ -3357,9 +3357,9 @@ Function5958: ; 5958
push hl push hl
push de push de
push bc push bc
ld a, [wd14c] ld a, [wFollowNotExactPersonX]
ld d, a ld d, a
ld a, [wd14d] ld a, [wFollowNotExactPersonY]
ld e, a ld e, a
ld bc, ObjectStructs ld bc, ObjectStructs
ld a, NUM_OBJECT_STRUCTS ld a, NUM_OBJECT_STRUCTS
@ -3391,8 +3391,8 @@ Function5958: ; 5958
jr nz, .loop jr nz, .loop
xor a xor a
ld [wd14c], a ld [wFollowNotExactPersonX], a
ld [wd14d], a ld [wFollowNotExactPersonY], a
pop bc pop bc
pop de pop de
pop hl pop hl
@ -3544,7 +3544,7 @@ PRIORITY_HIGH EQU $30
add 8 add 8
ld e, a ld e, a
ld a, [wd14c] ld a, [wFollowNotExactPersonX]
add e add e
ld [hFFBF], a ld [hFFBF], a
@ -3559,7 +3559,7 @@ PRIORITY_HIGH EQU $30
add 12 add 12
ld e, a ld e, a
ld a, [wd14d] ld a, [wFollowNotExactPersonY]
add e add e
ld [hFFC0], a ld [hFFC0], a

1808
engine/move_mon.asm Executable file

File diff suppressed because it is too large Load Diff

View File

@ -508,6 +508,7 @@ UseItem: ; 10311
ld [wJumptableIndex], a ld [wJumptableIndex], a
ret ret
; 10364 (4:4364) ; 10364 (4:4364)
TossMenu: ; 10364 TossMenu: ; 10364
ld hl, Text_ThrowAwayHowMany ld hl, Text_ThrowAwayHowMany
call Pack_PrintTextNoScroll call Pack_PrintTextNoScroll
@ -534,7 +535,7 @@ TossMenu: ; 10364
ret ret
; 1039d ; 1039d
Function1039d: ; 1039d ResetPocketCursorPositions: ; 1039d
; unreferenced ; unreferenced
ld a, [wCurrPocket] ld a, [wCurrPocket]
and a and a

271
engine/player_step.asm Executable file
View File

@ -0,0 +1,271 @@
_HandlePlayerStep:: ; d497 (3:5497)
ld a, [wPlayerStepFlags]
and a
ret z
bit 7, a ; starting step
jr nz, .update_overworld_map
bit 6, a ; finishing step
jr nz, .update_player_coords
bit 5, a ; ongoing step
jr nz, .finish
ret
.update_overworld_map
ld a, 4
ld [wHandlePlayerStep], a
call UpdateOverworldMap
jr .finish
.update_player_coords
call UpdatePlayerCoords
jr .finish
.finish
call HandlePlayerStep
ld a, [wPlayerStepVectorX]
ld d, a
ld a, [wPlayerStepVectorY]
ld e, a
ld a, [wFollowNotExactPersonX]
sub d
ld [wFollowNotExactPersonX], a
ld a, [wFollowNotExactPersonY]
sub e
ld [wFollowNotExactPersonY], a
ret
ScrollScreen:: ; d4d2 (3:54d2)
ld a, [wPlayerStepVectorX]
ld d, a
ld a, [wPlayerStepVectorY]
ld e, a
ld a, [hSCX]
add d
ld [hSCX], a
ld a, [hSCY]
add e
ld [hSCY], a
ret
HandlePlayerStep: ; d4e5 (3:54e5)
ld hl, wHandlePlayerStep
ld a, [hl]
and a
ret z
dec [hl]
ld a, [hl]
ld hl, .Jumptable
rst JumpTable
ret
.Jumptable: ; d4f2 (3:54f2)
jumptable_start
jumptable GetMovementPermissions
jumptable BufferScreen
jumptable .mobile
jumptable .fail2
; The rest are never used. Ever.
jumptable .fail1
jumptable .fail1
jumptable .fail1
jumptable .fail1
jumptable .fail1
jumptable .fail1
jumptable .fail1
.fail1: ; d508 (3:5508)
ret
.mobile: ; d509 (3:5509)
callba MobileFn_10602e
ret
.fail2: ; d510 (3:5510)
ret
UpdatePlayerCoords: ; d511 (3:5511)
ld a, [wPlayerStepDirection]
and a
jr nz, .check_step_down
ld hl, YCoord
inc [hl]
ret
.check_step_down
cp UP
jr nz, .check_step_left
ld hl, YCoord
dec [hl]
ret
.check_step_left
cp LEFT
jr nz, .check_step_right
ld hl, XCoord
dec [hl]
ret
.check_step_right
cp RIGHT
ret nz
ld hl, XCoord
inc [hl]
ret
UpdateOverworldMap: ; d536 (3:5536)
ld a, [wPlayerStepDirection]
and a
jr z, .step_down
cp UP
jr z, .step_up
cp LEFT
jr z, .step_left
cp RIGHT
jr z, .step_right
ret
.step_down
call .ScrollOverworldMapDown
call LoadMapPart
call ScrollMapUp
ret
.step_up
call .ScrollOverworldMapUp
call LoadMapPart
call ScrollMapDown
ret
.step_left
call .ScrollOverworldMapLeft
call LoadMapPart
call ScrollMapRight
ret
.step_right
call .ScrollOverworldMapRight
call LoadMapPart
call ScrollMapLeft
ret
.ScrollOverworldMapDown: ; d571 (3:5571)
ld a, [wBGMapAnchor]
add 2 * BG_MAP_WIDTH
ld [wBGMapAnchor], a
jr nc, .not_overflowed
ld a, [wBGMapAnchor + 1]
inc a
and $3
or VBGMap0 / $100
ld [wBGMapAnchor + 1], a
.not_overflowed
ld hl, wMetatileStandingY
inc [hl]
ld a, [hl]
cp 2 ; was 1
jr nz, .done_down
ld [hl], 0
call .Add6ToOverworldMapAnchor
.done_down
ret
.Add6ToOverworldMapAnchor: ; d595 (3:5595)
ld hl, wOverworldMapAnchor
ld a, [MapWidth]
add 6
add [hl]
ld [hli], a
ret nc
inc [hl]
ret
.ScrollOverworldMapUp: ; d5a2 (3:55a2)
ld a, [wBGMapAnchor]
sub 2 * BG_MAP_WIDTH
ld [wBGMapAnchor], a
jr nc, .not_underflowed
ld a, [wBGMapAnchor + 1]
dec a
and $3
or VBGMap0 / $100
ld [wBGMapAnchor + 1], a
.not_underflowed
ld hl, wMetatileStandingY
dec [hl]
ld a, [hl]
cp -1 ; was 0
jr nz, .done_up
ld [hl], $1
call .Sub6FromOverworldMapAnchor
.done_up
ret
.Sub6FromOverworldMapAnchor: ; d5c6 (3:55c6)
ld hl, wOverworldMapAnchor
ld a, [MapWidth]
add 6
ld b, a
ld a, [hl]
sub b
ld [hli], a
ret nc
dec [hl]
ret
.ScrollOverworldMapLeft: ; d5d5 (3:55d5)
ld a, [wBGMapAnchor]
ld e, a
and $e0
ld d, a
ld a, e
sub $2
and $1f
or d
ld [wBGMapAnchor], a
ld hl, wMetatileStandingX
dec [hl]
ld a, [hl]
cp -1
jr nz, .done_left
ld [hl], 1
call .DecrementwOverworldMapAnchor
.done_left
ret
.DecrementwOverworldMapAnchor: ; d5f4 (3:55f4)
ld hl, wOverworldMapAnchor
ld a, [hl]
sub 1
ld [hli], a
ret nc
dec [hl]
ret
.ScrollOverworldMapRight: ; d5fe (3:55fe)
ld a, [wBGMapAnchor]
ld e, a
and $e0
ld d, a
ld a, e
add $2
and $1f
or d
ld [wBGMapAnchor], a
ld hl, wMetatileStandingX
inc [hl]
ld a, [hl]
cp 2
jr nz, .done_right
ld [hl], 0
call .IncrementwOverworldMapAnchor
.done_right
ret
.IncrementwOverworldMapAnchor: ; d61d (3:561d)
ld hl, wOverworldMapAnchor
ld a, [hl]
add 1
ld [hli], a
ret nc
inc [hl]
ret

View File

@ -23,7 +23,7 @@ PokemonCenterPC: ; 1559a
.shutdown .shutdown
call PC_PlayShutdownSound call PC_PlayShutdownSound
call ExitMenu call ExitMenu
call WriteBackup call CloseWindow
ret ret
; 155d6 ; 155d6

View File

@ -215,7 +215,7 @@ SaveTheGame_yesorno: ; 14baf
call PlaceYesNoBox call PlaceYesNoBox
ld a, [wMenuCursorY] ld a, [wMenuCursorY]
dec a dec a
call WriteBackup call CloseWindow
push af push af
call ret_d90 call ret_d90
pop af pop af

View File

@ -150,7 +150,7 @@ ScriptCommandTable: ; 96cb1
dw Script_repeattext ; 4d dw Script_repeattext ; 4d
dw Script_yesorno ; 4e dw Script_yesorno ; 4e
dw Script_loadmenudata ; 4f dw Script_loadmenudata ; 4f
dw Script_writebackup ; 50 dw Script_closewindow ; 50
dw Script_jumptextfaceplayer ; 51 dw Script_jumptextfaceplayer ; 51
IF _CRYSTAL IF _CRYSTAL
dw Script_farjumptext ; 52 dw Script_farjumptext ; 52
@ -480,10 +480,10 @@ Script_loadmenudata: ; 96efa
ret ret
; 96f0f ; 96f0f
Script_writebackup: ; 96f0f Script_closewindow: ; 96f0f
; script command 0x50 ; script command 0x50
call WriteBackup call CloseWindow
call UpdateSprites call UpdateSprites
ret ret
; 96f16 ; 96f16
@ -3038,7 +3038,7 @@ Script_refreshscreen: ; 97b20
; parameters: ; parameters:
; dummy (SingleByteParam) ; dummy (SingleByteParam)
call ResetWindow call RefreshScreen
call GetScriptByte call GetScriptByte
ret ret
; 97b27 ; 97b27

View File

@ -155,7 +155,7 @@ UseRegisteredItem: ; 133c3
; 133f5 ; 133f5
.Party ; 133f5 .Party ; 133f5
call ResetWindow call RefreshScreen
call FadeToMenu call FadeToMenu
call DoItemEffect call DoItemEffect
call CloseSubmenu call CloseSubmenu
@ -165,7 +165,7 @@ UseRegisteredItem: ; 133c3
; 13406 ; 13406
.Overworld ; 13406 .Overworld ; 13406
call ResetWindow call RefreshScreen
ld a, 1 ld a, 1
ld [wUsingItemWithSelect], a ld [wUsingItemWithSelect], a
call DoItemEffect call DoItemEffect
@ -181,7 +181,7 @@ UseRegisteredItem: ; 133c3
; 13422 ; 13422
.CantUse ; 13422 .CantUse ; 13422
call ResetWindow call RefreshScreen
._cantuse ._cantuse
call CantUseItem call CantUseItem

View File

@ -1712,7 +1712,7 @@ Slots_AskBet: ; 9307c (24:707c)
ld hl, .MenuDataHeader ld hl, .MenuDataHeader
call LoadMenuDataHeader call LoadMenuDataHeader
call VerticalMenu call VerticalMenu
call WriteBackup call CloseWindow
ret c ret c
ld a, [wMenuCursorY] ld a, [wMenuCursorY]
ld b, a ld b, a
@ -1802,7 +1802,7 @@ Slots_AskPlayAgain: ; 930e9 (24:70e9)
call PlaceYesNoBox call PlaceYesNoBox
ld a, [wMenuCursorY] ld a, [wMenuCursorY]
dec a dec a
call WriteBackup call CloseWindow
and a and a
jr nz, .exit_slots jr nz, .exit_slots
and a and a

View File

@ -604,7 +604,7 @@ Function129f4: ; 129f4
call MenuTextBox call MenuTextBox
callba SelectQuantityToToss callba SelectQuantityToToss
push af push af
call WriteBackup call CloseWindow
call ExitMenu call ExitMenu
pop af pop af
jr c, .asm_12a42 jr c, .asm_12a42
@ -1322,7 +1322,7 @@ MonMenu_Whirlpool: ; 12e7f
; 12e94 ; 12e94
MonMenu_Waterfall: ; 12e94 MonMenu_Waterfall: ; 12e94
callba Functioncade callba WaterfallFunction
ld a, [wFieldMoveSucceeded] ld a, [wFieldMoveSucceeded]
cp $1 cp $1
jr nz, .Fail jr nz, .Fail

View File

@ -1811,7 +1811,7 @@ CoinVendor_SellCoinsMenuScript: ; 0xbcde4
special Special_DisplayMoneyAndCoinBalance special Special_DisplayMoneyAndCoinBalance
loadmenudata CoinVendor_MenuDataHeader loadmenudata CoinVendor_MenuDataHeader
verticalmenu verticalmenu
writebackup closewindow
if_equal $1, CoinVendor_Buy50CoinsScript if_equal $1, CoinVendor_Buy50CoinsScript
if_equal $2, CoinVendor_Buy500CoinsScript if_equal $2, CoinVendor_Buy500CoinsScript
jump CoinVendor_CancelScript jump CoinVendor_CancelScript

View File

@ -139,8 +139,8 @@ SpecialBuenaPrize: ; 8afd4
jr .loop jr .loop
.done .done
call WriteBackup call CloseWindow
call WriteBackup call CloseWindow
ld hl, .Text_PleaseComeBackAgain ld hl, .Text_PleaseComeBackAgain
call PrintText call PrintText
call JoyWaitAorB call JoyWaitAorB

View File

@ -1,23 +1,23 @@
const_def const_def
const DAYCARETEXT_00 const DAYCARETEXT_MAN_INTRO
const DAYCARETEXT_01 const DAYCARETEXT_MAN_EGG
const DAYCARETEXT_02 const DAYCARETEXT_LADY_INTRO
const DAYCARETEXT_03 const DAYCARETEXT_LADY_EGG
const DAYCARETEXT_04 const DAYCARETEXT_WHICH_ONE
const DAYCARETEXT_05 const DAYCARETEXT_DEPOSIT
const DAYCARETEXT_06 const DAYCARETEXT_CANT_BREED_EGG
const DAYCARETEXT_07 const DAYCARETEXT_LAST_MON
const DAYCARETEXT_08 const DAYCARETEXT_LAST_ALIVE_MON
const DAYCARETEXT_09 const DAYCARETEXT_COME_BACK_LATER
const DAYCARETEXT_0A const DAYCARETEXT_REMOVE_MAIL
const DAYCARETEXT_0B const DAYCARETEXT_GENIUSES
const DAYCARETEXT_0C const DAYCARETEXT_ASK_WITHDRAW
const DAYCARETEXT_0D const DAYCARETEXT_WITHDRAW
const DAYCARETEXT_0E const DAYCARETEXT_TOO_SOON
const DAYCARETEXT_0F const DAYCARETEXT_PARTY_FULL
const DAYCARETEXT_10 const DAYCARETEXT_NOT_ENOUGH_MONEY
const DAYCARETEXT_11 const DAYCARETEXT_OH_FINE
const DAYCARETEXT_12 const DAYCARETEXT_COME_AGAIN
const DAYCARETEXT_13 const DAYCARETEXT_13
Special_DayCareMan: ; 166d6 Special_DayCareMan: ; 166d6
@ -25,12 +25,12 @@ Special_DayCareMan: ; 166d6
bit 0, [hl] bit 0, [hl]
jr nz, .AskWithdrawMon jr nz, .AskWithdrawMon
ld hl, wDaycareMan ld hl, wDaycareMan
ld a, DAYCARETEXT_00 ld a, DAYCARETEXT_MAN_INTRO
call DayCareManIntroText call DayCareManIntroText
jr c, .cancel jr c, .cancel
call DayCareAskDepositPokemon call DayCareAskDepositPokemon
jr c, .print_text jr c, .print_text
callba Functionde2a callba DepositMonWithDaycareMan
ld hl, wDaycareMan ld hl, wDaycareMan
set 0, [hl] set 0, [hl]
call DayCare_DepositPokemonText call DayCare_DepositPokemonText
@ -38,13 +38,13 @@ Special_DayCareMan: ; 166d6
ret ret
.AskWithdrawMon .AskWithdrawMon
callba Functione698 callba GetBreedMon1LevelGrowth
ld hl, wBreedMon1Nick ld hl, wBreedMon1Nick
call Function1686d call GetPriceToRetrieveBreedmon
call Function16807 call DayCare_AskWithdrawBreedMon
jr c, .print_text jr c, .print_text
callba Functiondd21 callba RetrievePokemonFromDaycareMan
call Function16850 call DayCare_TakeMoney_PlayCry
ld hl, wDaycareMan ld hl, wDaycareMan
res 0, [hl] res 0, [hl]
res 5, [hl] res 5, [hl]
@ -64,12 +64,12 @@ Special_DayCareLady: ; 1672a
bit 0, [hl] bit 0, [hl]
jr nz, .AskWithdrawMon jr nz, .AskWithdrawMon
ld hl, wDaycareLady ld hl, wDaycareLady
ld a, DAYCARETEXT_02 ld a, DAYCARETEXT_LADY_INTRO
call DayCareLadyIntroText call DayCareLadyIntroText
jr c, .cancel jr c, .cancel
call DayCareAskDepositPokemon call DayCareAskDepositPokemon
jr c, .print_text jr c, .print_text
callba Functionde37 callba DepositMonWithDaycareLady
ld hl, wDaycareLady ld hl, wDaycareLady
set 0, [hl] set 0, [hl]
call DayCare_DepositPokemonText call DayCare_DepositPokemonText
@ -77,13 +77,13 @@ Special_DayCareLady: ; 1672a
ret ret
.AskWithdrawMon .AskWithdrawMon
callba Functione6b3 callba GetBreedMon2LevelGrowth
ld hl, wBreedMon2Nick ld hl, wBreedMon2Nick
call Function1686d call GetPriceToRetrieveBreedmon
call Function16807 call DayCare_AskWithdrawBreedMon
jr c, .print_text jr c, .print_text
callba Functiondd42 callba RetrievePokemonFromDaycareLady
call Function16850 call DayCare_TakeMoney_PlayCry
ld hl, wDaycareLady ld hl, wDaycareLady
res 0, [hl] res 0, [hl]
ld hl, wDaycareMan ld hl, wDaycareMan
@ -121,7 +121,7 @@ DayCareAskDepositPokemon: ; 16798
ld a, [PartyCount] ld a, [PartyCount]
cp 2 cp 2
jr c, .OnlyOneMon jr c, .OnlyOneMon
ld a, DAYCARETEXT_04 ld a, DAYCARETEXT_WHICH_ONE
call PrintDayCareText call PrintDayCareText
ld b, 6 ld b, 6
callba SelectTradeOrDaycareMon callba SelectTradeOrDaycareMon
@ -145,27 +145,27 @@ DayCareAskDepositPokemon: ; 16798
ret ret
.Declined .Declined
ld a, DAYCARETEXT_12 ld a, DAYCARETEXT_COME_AGAIN
scf scf
ret ret
.Egg .Egg
ld a, DAYCARETEXT_06 ld a, DAYCARETEXT_CANT_BREED_EGG
scf scf
ret ret
.OnlyOneMon .OnlyOneMon
ld a, DAYCARETEXT_07 ld a, DAYCARETEXT_LAST_MON
scf scf
ret ret
.OutOfUsableMons .OutOfUsableMons
ld a, DAYCARETEXT_08 ld a, DAYCARETEXT_LAST_ALIVE_MON
scf scf
ret ret
.HoldingMail .HoldingMail
ld a, DAYCARETEXT_0A ld a, DAYCARETEXT_REMOVE_MAIL
scf scf
ret ret
; 167f1 ; 167f1
@ -177,76 +177,76 @@ DayCareAskDepositPokemon: ; 16798
; 0x167f6 ; 0x167f6
DayCare_DepositPokemonText: ; 167f6 DayCare_DepositPokemonText: ; 167f6
ld a, DAYCARETEXT_05 ld a, DAYCARETEXT_DEPOSIT
call PrintDayCareText call PrintDayCareText
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
call PlayCry call PlayCry
ld a, DAYCARETEXT_09 ld a, DAYCARETEXT_COME_BACK_LATER
call PrintDayCareText call PrintDayCareText
ret ret
; 16807 ; 16807
Function16807: ; 16807 DayCare_AskWithdrawBreedMon: ; 16807
ld a, [StringBuffer2 + 1] ld a, [StringBuffer2 + 1]
and a and a
jr nz, .asm_16819 jr nz, .grew_at_least_one_level
ld a, $f ld a, DAYCARETEXT_PARTY_FULL
call PrintDayCareText call PrintDayCareText
call YesNoBox call YesNoBox
jr c, .asm_16844 jr c, .refused
jr .asm_1682d jr .check_money
.asm_16819 .grew_at_least_one_level
ld a, $b ld a, DAYCARETEXT_GENIUSES
call PrintDayCareText call PrintDayCareText
call YesNoBox call YesNoBox
jr c, .asm_16844 jr c, .refused
ld a, $c ld a, DAYCARETEXT_ASK_WITHDRAW
call PrintDayCareText call PrintDayCareText
call YesNoBox call YesNoBox
jr c, .asm_16844 jr c, .refused
.asm_1682d .check_money
ld de, Money ld de, Money
ld bc, StringBuffer2 + 2 ld bc, StringBuffer2 + 2
callba CompareMoney callba CompareMoney
jr c, .asm_16848 jr c, .not_enough_money
ld a, [PartyCount] ld a, [PartyCount]
cp $6 cp PARTY_LENGTH
jr nc, .asm_1684c jr nc, .PartyFull
and a and a
ret ret
.asm_16844 .refused
ld a, $12 ld a, DAYCARETEXT_COME_AGAIN
scf scf
ret ret
.asm_16848 .not_enough_money
ld a, $11 ld a, DAYCARETEXT_OH_FINE
scf scf
ret ret
.asm_1684c .PartyFull
ld a, $10 ld a, DAYCARETEXT_NOT_ENOUGH_MONEY
scf scf
ret ret
; 16850 ; 16850
Function16850: ; 16850 DayCare_TakeMoney_PlayCry: ; 16850
ld bc, StringBuffer2 + 2 ld bc, StringBuffer2 + 2
ld de, Money ld de, Money
callba TakeMoney callba TakeMoney
ld a, $d ld a, DAYCARETEXT_WITHDRAW
call PrintDayCareText call PrintDayCareText
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
call PlayCry call PlayCry
ld a, $e ld a, DAYCARETEXT_TOO_SOON
call PrintDayCareText call PrintDayCareText
ret ret
; 1686d ; 1686d
Function1686d: ; 1686d GetPriceToRetrieveBreedmon: ; 1686d
ld a, b ld a, b
ld [StringBuffer2], a ld [StringBuffer2], a
ld a, d ld a, d
@ -255,10 +255,10 @@ Function1686d: ; 1686d
ld bc, NAME_LENGTH ld bc, NAME_LENGTH
call CopyBytes call CopyBytes
ld hl, 0 ld hl, 0
ld bc, $64 ld bc, 100
ld a, [StringBuffer2 + 1] ld a, [StringBuffer2 + 1]
call AddNTimes call AddNTimes
ld de, $64 ld de, 100
add hl, de add hl, de
xor a xor a
ld [StringBuffer2 + 2], a ld [StringBuffer2 + 2], a
@ -272,7 +272,7 @@ Function1686d: ; 1686d
PrintDayCareText: ; 1689b PrintDayCareText: ; 1689b
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, TextTable_168aa ld hl, .TextTable
rept 2 rept 2
add hl, de add hl, de
endr endr
@ -283,7 +283,7 @@ endr
ret ret
; 168aa ; 168aa
TextTable_168aa: ; 168aa .TextTable: ; 168aa
dw .DayCareManIntro ; 00 dw .DayCareManIntro ; 00
dw .DayCareManOddEgg ; 01 dw .DayCareManOddEgg ; 01
dw .DayCareLadyIntro ; 02 dw .DayCareLadyIntro ; 02

View File

@ -131,7 +131,7 @@ Elevator_AskWhichFloor: ; 134dd
xor a xor a
ld [wMenuScrollPosition], a ld [wMenuScrollPosition], a
call ScrollingMenu call ScrollingMenu
call WriteBackup call CloseWindow
ld a, [wMenuJoypad] ld a, [wMenuJoypad]
cp B_BUTTON cp B_BUTTON
jr z, .cancel jr z, .cancel

View File

@ -154,7 +154,7 @@ Kurt_SelectQuantity: ; 880c2
scf scf
.done .done
call WriteBackup call CloseWindow
ret ret
; 8810d ; 8810d

View File

@ -108,7 +108,7 @@ endr
ld hl, MenuDataHeader_0x166b5 ld hl, MenuDataHeader_0x166b5
call CopyMenuDataHeader call CopyMenuDataHeader
call VerticalMenu call VerticalMenu
call WriteBackup call CloseWindow
jr c, .cancel jr c, .cancel
ld a, [wMenuCursorY] ld a, [wMenuCursorY]
cp $1 cp $1
@ -153,7 +153,7 @@ endr
call Function16517 call Function16517
call Function1656b call Function1656b
call Function16571 call Function16571
call WriteBackup call CloseWindow
jr c, .CancelDeposit jr c, .CancelDeposit
ld hl, StringBuffer2 ld hl, StringBuffer2
ld a, [hli] ld a, [hli]
@ -221,7 +221,7 @@ endr
call Function16512 call Function16512
call Function1656b call Function1656b
call Function16571 call Function16571
call WriteBackup call CloseWindow
jr c, .CancelWithdraw jr c, .CancelWithdraw
ld hl, StringBuffer2 ld hl, StringBuffer2
ld a, [hli] ld a, [hli]

View File

@ -153,7 +153,7 @@ endr
call WaitBGMap2 call WaitBGMap2
call JoyWaitAorB call JoyWaitAorB
call PlayClickSFX call PlayClickSFX
call WriteBackup call CloseWindow
ret ret
; 8aebc ; 8aebc

View File

@ -49,7 +49,7 @@ LoadMenuTextBox:: ; 1d58
MenuTextBoxBackup:: ; 1d67 MenuTextBoxBackup:: ; 1d67
call MenuTextBox call MenuTextBox
call WriteBackup call CloseWindow
ret ret
; 1d6e ; 1d6e
@ -100,7 +100,7 @@ VerticalMenu::
GetMenu2:: ; 1dab GetMenu2:: ; 1dab
call LoadMenuDataHeader call LoadMenuDataHeader
call VerticalMenu call VerticalMenu
call WriteBackup call CloseWindow
ld a, [wMenuCursorY] ld a, [wMenuCursorY]
ret ret
; 1db8 ; 1db8
@ -167,7 +167,7 @@ InterpretTwoOptionMenu:: ; 1dfe
push af push af
ld c, $f ld c, $f
call DelayFrames call DelayFrames
call WriteBackup call CloseWindow
pop af pop af
jr c, .no jr c, .no
ld a, [wMenuCursorY] ld a, [wMenuCursorY]

View File

@ -13,7 +13,7 @@ InitVerticalMenuCursor:: ; 0x1c10
callab _InitVerticalMenuCursor callab _InitVerticalMenuCursor
ret ret
WriteBackup:: ; 0x1c17 CloseWindow:: ; 0x1c17
push af push af
call ExitMenu call ExitMenu
call ApplyTilemap call ApplyTilemap

View File

@ -1,4 +1,4 @@
ResetWindow:: ; 2dba RefreshScreen:: ; 2dba
call ClearWindowData call ClearWindowData
ld a, [hROMBank] ld a, [hROMBank]

View File

@ -528,9 +528,9 @@ loadmenudata: macro
dw \1 ; data dw \1 ; data
endm endm
enum writebackup_command enum closewindow_command
writebackup: macro closewindow: macro
db writebackup_command db closewindow_command
endm endm
enum jumptextfaceplayer_command enum jumptextfaceplayer_command

2360
main.asm

File diff suppressed because it is too large Load Diff

View File

@ -30,7 +30,7 @@ CeladonVendingMachine:
special PlaceMoneyTopRight special PlaceMoneyTopRight
loadmenudata .MenuData loadmenudata .MenuData
verticalmenu verticalmenu
writebackup closewindow
if_equal $1, .FreshWater if_equal $1, .FreshWater
if_equal $2, .SodaPop if_equal $2, .SodaPop
if_equal $3, .Lemonade if_equal $3, .Lemonade

View File

@ -9,25 +9,25 @@ CeladonGameCornerPrizeRoom_MapScriptHeader:
.MapCallbacks: .MapCallbacks:
db 0 db 0
GentlemanScript_0x726e9: CeladonGameCornerPrizeRoomGentlemanScript:
jumptextfaceplayer UnknownText_0x728b8 jumptextfaceplayer CeladonGameCornerPrizeRoomGentlemanText
PharmacistScript_0x726ec: CeladonGameCornerPrizeRoomPharmacistScript:
jumptextfaceplayer UnknownText_0x728e9 jumptextfaceplayer CeladonGameCornerPrizeRoomPharmacistText
MapCeladonGameCornerPrizeRoomSignpost0Script: GoldenrodGameCornerTMVendor:
faceplayer faceplayer
opentext opentext
writetext UnknownText_0x7293e writetext CeladonPrizeRoom_PrizeVendorIntroText
waitbutton waitbutton
checkitem COIN_CASE checkitem COIN_CASE
iffalse CeladonPrizeRoom_NoCoinCase iffalse CeladonPrizeRoom_NoCoinCase
writetext UnknownText_0x72974 writetext CeladonPrizeRoom_AskWhichPrizeText
CeladonPrizeRoom_tmcounterloop: CeladonPrizeRoom_tmcounterloop:
special Special_DisplayCoinCaseBalance special Special_DisplayCoinCaseBalance
loadmenudata MenuDataHeader_0x72790 loadmenudata CeladonPrizeRoom_TMMenuDataHeader
verticalmenu verticalmenu
writebackup closewindow
if_equal $1, .doubleteam if_equal $1, .doubleteam
if_equal $2, .psychic if_equal $2, .psychic
if_equal $3, .hyperbeam if_equal $3, .hyperbeam
@ -67,50 +67,50 @@ CeladonPrizeRoom_tmcounterloop:
jump CeladonPrizeRoom_purchased jump CeladonPrizeRoom_purchased
CeladonPrizeRoom_askbuy: CeladonPrizeRoom_askbuy:
writetext UnknownText_0x72991 writetext CeladonPrizeRoom_ConfirmPurchaseText
yesorno yesorno
end end
CeladonPrizeRoom_purchased: CeladonPrizeRoom_purchased:
waitsfx waitsfx
playsound SFX_TRANSACTION playsound SFX_TRANSACTION
writetext UnknownText_0x729ad writetext CeladonPrizeRoom_HereYouGoText
waitbutton waitbutton
jump CeladonPrizeRoom_tmcounterloop jump CeladonPrizeRoom_tmcounterloop
CeladonPrizeRoom_notenoughcoins: CeladonPrizeRoom_notenoughcoins:
writetext UnknownText_0x729bb writetext CeladonPrizeRoom_NotEnoughCoinsText
waitbutton waitbutton
closetext closetext
end end
CeladonPrizeRoom_notenoughroom: CeladonPrizeRoom_notenoughroom:
writetext UnknownText_0x729d8 writetext CeladonPrizeRoom_NotEnoughRoomText
waitbutton waitbutton
closetext closetext
end end
CeladonPrizeRoom_cancel: CeladonPrizeRoom_cancel:
writetext UnknownText_0x729f2 writetext CeladonPrizeRoom_ComeAgainText
waitbutton waitbutton
closetext closetext
end end
CeladonPrizeRoom_NoCoinCase: CeladonPrizeRoom_NoCoinCase:
writetext UnknownText_0x72a14 writetext CeladonPrizeRoom_NoCoinCaseText
waitbutton waitbutton
closetext closetext
end end
MenuDataHeader_0x72790: CeladonPrizeRoom_TMMenuDataHeader:
db $40 ; flags db $40 ; flags
db 02, 00 ; start coords db 02, 00 ; start coords
db 11, 15 ; end coords db 11, 15 ; end coords
dw MenuData2_0x72798 dw .MenuData2
db 1 ; default option db 1 ; default option
MenuData2_0x72798: .MenuData2:
db $80 ; flags db $80 ; flags
db 4 ; items db 4 ; items
db "TM32 1500@" db "TM32 1500@"
@ -119,19 +119,19 @@ MenuData2_0x72798:
db "CANCEL@" db "CANCEL@"
MapCeladonGameCornerPrizeRoomSignpost1Script: GoldenrodGameCornerPokemonVendor:
faceplayer faceplayer
opentext opentext
writetext UnknownText_0x7293e writetext CeladonPrizeRoom_PrizeVendorIntroText
waitbutton waitbutton
checkitem COIN_CASE checkitem COIN_CASE
iffalse CeladonPrizeRoom_NoCoinCase iffalse CeladonPrizeRoom_NoCoinCase
.loop: .loop:
writetext UnknownText_0x72974 writetext CeladonPrizeRoom_AskWhichPrizeText
special Special_DisplayCoinCaseBalance special Special_DisplayCoinCaseBalance
loadmenudata MenuDataHeader_0x72877 loadmenudata .MenuDataHeader
verticalmenu verticalmenu
writebackup closewindow
if_equal $1, .pikachu if_equal $1, .pikachu
if_equal $2, .porygon if_equal $2, .porygon
if_equal $3, .larvitar if_equal $3, .larvitar
@ -147,7 +147,7 @@ MapCeladonGameCornerPrizeRoomSignpost1Script:
iffalse CeladonPrizeRoom_cancel iffalse CeladonPrizeRoom_cancel
waitsfx waitsfx
playsound SFX_TRANSACTION playsound SFX_TRANSACTION
writetext UnknownText_0x729ad writetext CeladonPrizeRoom_HereYouGoText
waitbutton waitbutton
writebyte PIKACHU writebyte PIKACHU
special Special_GameCornerPrizeMonCheckDex special Special_GameCornerPrizeMonCheckDex
@ -165,7 +165,7 @@ MapCeladonGameCornerPrizeRoomSignpost1Script:
iffalse CeladonPrizeRoom_cancel iffalse CeladonPrizeRoom_cancel
waitsfx waitsfx
playsound SFX_TRANSACTION playsound SFX_TRANSACTION
writetext UnknownText_0x729ad writetext CeladonPrizeRoom_HereYouGoText
waitbutton waitbutton
writebyte PORYGON writebyte PORYGON
special Special_GameCornerPrizeMonCheckDex special Special_GameCornerPrizeMonCheckDex
@ -183,7 +183,7 @@ MapCeladonGameCornerPrizeRoomSignpost1Script:
iffalse CeladonPrizeRoom_cancel iffalse CeladonPrizeRoom_cancel
waitsfx waitsfx
playsound SFX_TRANSACTION playsound SFX_TRANSACTION
writetext UnknownText_0x729ad writetext CeladonPrizeRoom_HereYouGoText
waitbutton waitbutton
writebyte LARVITAR writebyte LARVITAR
special Special_GameCornerPrizeMonCheckDex special Special_GameCornerPrizeMonCheckDex
@ -192,14 +192,14 @@ MapCeladonGameCornerPrizeRoomSignpost1Script:
jump .loop jump .loop
MenuDataHeader_0x72877: .MenuDataHeader:
db $40 ; flags db $40 ; flags
db 02, 00 ; start coords db 02, 00 ; start coords
db 11, 17 ; end coords db 11, 17 ; end coords
dw MenuData2_0x7287f dw .MenuData2
db 1 ; default option db 1 ; default option
MenuData2_0x7287f: .MenuData2:
db $80 ; flags db $80 ; flags
db 4 ; items db 4 ; items
db "PIKACHU 2222@" db "PIKACHU 2222@"
@ -208,13 +208,13 @@ MenuData2_0x7287f:
db "CANCEL@" db "CANCEL@"
UnknownText_0x728b8: CeladonGameCornerPrizeRoomGentlemanText:
text "I wanted PORYGON," text "I wanted PORYGON,"
line "but I was short by" line "but I was short by"
cont "100 coins…" cont "100 coins…"
done done
UnknownText_0x728e9: CeladonGameCornerPrizeRoomPharmacistText:
text "Whew…" text "Whew…"
para "I've got to stay" para "I've got to stay"
@ -225,7 +225,7 @@ UnknownText_0x728e9:
cont "all my money…" cont "all my money…"
done done
UnknownText_0x7293e: CeladonPrizeRoom_PrizeVendorIntroText:
text "Welcome!" text "Welcome!"
para "We exchange your" para "We exchange your"
@ -233,38 +233,38 @@ UnknownText_0x7293e:
cont "prizes!" cont "prizes!"
done done
UnknownText_0x72974: CeladonPrizeRoom_AskWhichPrizeText:
text "Which prize would" text "Which prize would"
line "you like?" line "you like?"
done done
UnknownText_0x72991: CeladonPrizeRoom_ConfirmPurchaseText:
text "OK, so you wanted" text "OK, so you wanted"
line "a @" line "a @"
text_from_ram StringBuffer3 text_from_ram StringBuffer3
text "?" text "?"
done done
UnknownText_0x729ad: CeladonPrizeRoom_HereYouGoText:
text "Here you go!" text "Here you go!"
done done
UnknownText_0x729bb: CeladonPrizeRoom_NotEnoughCoinsText:
text "You don't have" text "You don't have"
line "enough coins." line "enough coins."
done done
UnknownText_0x729d8: CeladonPrizeRoom_NotEnoughRoomText:
text "You have no room" text "You have no room"
line "for it." line "for it."
done done
UnknownText_0x729f2: CeladonPrizeRoom_ComeAgainText:
text "Oh. Please come" text "Oh. Please come"
line "back with coins!" line "back with coins!"
done done
UnknownText_0x72a14: CeladonPrizeRoom_NoCoinCaseText:
text "Oh? You don't have" text "Oh? You don't have"
line "a COIN CASE." line "a COIN CASE."
done done
@ -283,10 +283,10 @@ CeladonGameCornerPrizeRoom_MapEventHeader:
.Signposts: .Signposts:
db 2 db 2
signpost 1, 2, SIGNPOST_READ, MapCeladonGameCornerPrizeRoomSignpost0Script signpost 1, 2, SIGNPOST_READ, GoldenrodGameCornerTMVendor
signpost 1, 4, SIGNPOST_READ, MapCeladonGameCornerPrizeRoomSignpost1Script signpost 1, 4, SIGNPOST_READ, GoldenrodGameCornerPokemonVendor
.PersonEvents: .PersonEvents:
db 2 db 2
person_event SPRITE_GENTLEMAN, 2, 0, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, GentlemanScript_0x726e9, -1 person_event SPRITE_GENTLEMAN, 2, 0, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, CeladonGameCornerPrizeRoomGentlemanScript, -1
person_event SPRITE_PHARMACIST, 4, 4, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, PharmacistScript_0x726ec, -1 person_event SPRITE_PHARMACIST, 4, 4, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, CeladonGameCornerPrizeRoomPharmacistScript, -1

View File

@ -34,7 +34,7 @@ DragonShrineTestScript:
buttonsound buttonsound
loadmenudata MenuDataHeader_0x18d215 loadmenudata MenuDataHeader_0x18d215
verticalmenu verticalmenu
writebackup closewindow
if_equal $1, .RightAnswer if_equal $1, .RightAnswer
if_equal $2, .WrongAnswer if_equal $2, .WrongAnswer
if_equal $3, .RightAnswer if_equal $3, .RightAnswer
@ -46,7 +46,7 @@ DragonShrineTestScript:
buttonsound buttonsound
loadmenudata MenuDataHeader_0x18d234 loadmenudata MenuDataHeader_0x18d234
verticalmenu verticalmenu
writebackup closewindow
if_equal $1, .RightAnswer if_equal $1, .RightAnswer
if_equal $2, .RightAnswer if_equal $2, .RightAnswer
if_equal $3, .WrongAnswer if_equal $3, .WrongAnswer
@ -56,7 +56,7 @@ DragonShrineTestScript:
buttonsound buttonsound
loadmenudata MenuDataHeader_0x18d258 loadmenudata MenuDataHeader_0x18d258
verticalmenu verticalmenu
writebackup closewindow
if_equal $1, .WrongAnswer if_equal $1, .WrongAnswer
if_equal $2, .RightAnswer if_equal $2, .RightAnswer
if_equal $3, .RightAnswer if_equal $3, .RightAnswer
@ -66,7 +66,7 @@ DragonShrineTestScript:
buttonsound buttonsound
loadmenudata MenuDataHeader_0x18d283 loadmenudata MenuDataHeader_0x18d283
verticalmenu verticalmenu
writebackup closewindow
if_equal $1, .RightAnswer if_equal $1, .RightAnswer
if_equal $2, .WrongAnswer if_equal $2, .WrongAnswer
if_equal $3, .RightAnswer if_equal $3, .RightAnswer
@ -76,7 +76,7 @@ DragonShrineTestScript:
buttonsound buttonsound
loadmenudata MenuDataHeader_0x18d2a5 loadmenudata MenuDataHeader_0x18d2a5
verticalmenu verticalmenu
writebackup closewindow
if_equal $1, .WrongAnswer if_equal $1, .WrongAnswer
if_equal $2, .RightAnswer if_equal $2, .RightAnswer
if_equal $3, .WrongAnswer if_equal $3, .WrongAnswer

View File

@ -68,7 +68,7 @@ AcademyBlackboard:
.Loop .Loop
loadmenudata .MenuHeader loadmenudata .MenuHeader
_2dmenu _2dmenu
writebackup closewindow
if_equal $1, .Poison if_equal $1, .Poison
if_equal $2, .Paralysis if_equal $2, .Paralysis
if_equal $3, .Sleep if_equal $3, .Sleep

View File

@ -69,7 +69,7 @@ MoveTutor:
writetext UnknownText_0x1990ce writetext UnknownText_0x1990ce
loadmenudata .MoveMenuDataHeader loadmenudata .MoveMenuDataHeader
verticalmenu verticalmenu
writebackup closewindow
if_equal $1, .Flamethrower if_equal $1, .Flamethrower
if_equal $2, .Thunderbolt if_equal $2, .Thunderbolt
if_equal $3, .IceBeam if_equal $3, .IceBeam

View File

@ -16,7 +16,7 @@ GoldenrodVendingMachine:
special PlaceMoneyTopRight special PlaceMoneyTopRight
loadmenudata .MenuData loadmenudata .MenuData
verticalmenu verticalmenu
writebackup closewindow
if_equal $1, .FreshWater if_equal $1, .FreshWater
if_equal $2, .SodaPop if_equal $2, .SodaPop
if_equal $3, .Lemonade if_equal $3, .Lemonade

View File

@ -21,128 +21,128 @@ GoldenrodGameCorner_MapScriptHeader:
; callbacks ; callbacks
dbw 2, UnknownScript_0x56bf9 dbw 2, .Callback
UnknownScript_0x56bf9: .Callback
checkevent EVENT_BEAT_ELITE_FOUR checkevent EVENT_BEAT_ELITE_FOUR
iffalse UnknownScript_0x56c19 iffalse .finish
checkitem COIN_CASE checkitem COIN_CASE
iffalse UnknownScript_0x56c0e iffalse .move_tutor_inside
checkcode VAR_WEEKDAY checkcode VAR_WEEKDAY
if_equal WEDNESDAY, UnknownScript_0x56c11 if_equal WEDNESDAY, .move_tutor_outside
if_equal SATURDAY, UnknownScript_0x56c11 if_equal SATURDAY, .move_tutor_outside
UnknownScript_0x56c0e: .move_tutor_inside
appear GOLDENRODGAMECORNER_POKEFAN_M3 appear GOLDENRODGAMECORNER_POKEFAN_M3
return return
UnknownScript_0x56c11: .move_tutor_outside
checkflag ENGINE_DAILY_MOVE_TUTOR checkflag ENGINE_DAILY_MOVE_TUTOR
iftrue UnknownScript_0x56c19 iftrue .finish
disappear GOLDENRODGAMECORNER_POKEFAN_M3 disappear GOLDENRODGAMECORNER_POKEFAN_M3
UnknownScript_0x56c19: ;0x56c19 .finish
return return
PokefanMScript_0x56c1a: GoldenrodGameCornerPokefanM3Script:
faceplayer faceplayer
opentext opentext
writetext UnknownText_0x5718a writetext GoldenrodGameCornerPokefanM3Text
waitbutton waitbutton
closetext closetext
spriteface GOLDENRODGAMECORNER_POKEFAN_M3, RIGHT spriteface GOLDENRODGAMECORNER_POKEFAN_M3, RIGHT
end end
ClerkScript_0x56c25: GoldenrodGmeCornerCoinVendorScript:
jumpstd gamecornercoinvendor jumpstd gamecornercoinvendor
ReceptionistScript_0x56c28: GoldenrodGmeCornerTMVendorScript:
faceplayer faceplayer
opentext opentext
writetext UnknownText_0x56e50 writetext GoldenrodGameCornerPrizeVendorIntroText
waitbutton waitbutton
checkitem COIN_CASE checkitem COIN_CASE
iffalse UnknownScript_0x56cc3 iffalse GoldenrodGameCornerPrizeVendor_NoCoinCaseScript
writetext UnknownText_0x56e8b writetext GoldenrodGameCornerPrizeVendorWhichPrizeText
UnknownScript_0x56c36: ; 056c36 GoldenrodGmeCornerTMVendor_LoopScript: ; 056c36
special Special_DisplayCoinCaseBalance special Special_DisplayCoinCaseBalance
loadmenudata MenuDataHeader_0x56cc9 loadmenudata GoldenrodGameCornerTMVendorMenuData
verticalmenu verticalmenu
writebackup closewindow
if_equal $1, UnknownScript_0x56c4d if_equal $1, .Thunder
if_equal $2, UnknownScript_0x56c69 if_equal $2, .Blizzard
if_equal $3, UnknownScript_0x56c85 if_equal $3, .FireBlast
jump UnknownScript_0x56cbd jump GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
UnknownScript_0x56c4d: .Thunder:
checkcoins 5500 checkcoins 5500
if_equal $2, UnknownScript_0x56cb1 if_equal $2, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
itemtotext TM_THUNDER, $0 itemtotext TM_THUNDER, $0
scall UnknownScript_0x56ca1 scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript
iffalse UnknownScript_0x56cbd iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
giveitem TM_THUNDER giveitem TM_THUNDER
iffalse UnknownScript_0x56cb7 iffalse GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript
takecoins 5500 takecoins 5500
jump UnknownScript_0x56ca6 jump GoldenrodGmeCornerTMVendor_FinishScript
UnknownScript_0x56c69: .Blizzard:
checkcoins 5500 checkcoins 5500
if_equal $2, UnknownScript_0x56cb1 if_equal $2, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
itemtotext TM_BLIZZARD, $0 itemtotext TM_BLIZZARD, $0
scall UnknownScript_0x56ca1 scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript
iffalse UnknownScript_0x56cbd iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
giveitem TM_BLIZZARD giveitem TM_BLIZZARD
iffalse UnknownScript_0x56cb7 iffalse GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript
takecoins 5500 takecoins 5500
jump UnknownScript_0x56ca6 jump GoldenrodGmeCornerTMVendor_FinishScript
UnknownScript_0x56c85: .FireBlast:
checkcoins 5500 checkcoins 5500
if_equal $2, UnknownScript_0x56cb1 if_equal $2, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
itemtotext TM_FIRE_BLAST, $0 itemtotext TM_FIRE_BLAST, $0
scall UnknownScript_0x56ca1 scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript
iffalse UnknownScript_0x56cbd iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
giveitem TM_FIRE_BLAST giveitem TM_FIRE_BLAST
iffalse UnknownScript_0x56cb7 iffalse GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript
takecoins 5500 takecoins 5500
jump UnknownScript_0x56ca6 jump GoldenrodGmeCornerTMVendor_FinishScript
UnknownScript_0x56ca1: GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript:
writetext UnknownText_0x56ea8 writetext GoldenrodGameCornerPrizeVendorConfirmPrizeText
yesorno yesorno
end end
UnknownScript_0x56ca6: GoldenrodGmeCornerTMVendor_FinishScript:
waitsfx waitsfx
playsound SFX_TRANSACTION playsound SFX_TRANSACTION
writetext UnknownText_0x56ebd writetext GoldenrodGameCornerPrizeVendorHereYouGoText
waitbutton waitbutton
jump UnknownScript_0x56c36 jump GoldenrodGmeCornerTMVendor_LoopScript
UnknownScript_0x56cb1: GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript:
writetext UnknownText_0x56ecb writetext GoldenrodGameCornerPrizeVendorNeedMoreCoinsText
waitbutton waitbutton
closetext closetext
end end
UnknownScript_0x56cb7: GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript:
writetext UnknownText_0x56ee8 writetext GoldenrodGameCornerPrizeVendorNoMoreRoomText
waitbutton waitbutton
closetext closetext
end end
UnknownScript_0x56cbd: GoldenrodGameCornerPrizeVendor_CancelPurchaseScript:
writetext UnknownText_0x56f09 writetext GoldenrodGameCornerPrizeVendorQuitText
waitbutton waitbutton
closetext closetext
end end
UnknownScript_0x56cc3: GoldenrodGameCornerPrizeVendor_NoCoinCaseScript:
writetext UnknownText_0x56f35 writetext GoldenrodGameCornerPrizeVendorNoCoinCaseText
waitbutton waitbutton
closetext closetext
end end
MenuDataHeader_0x56cc9: GoldenrodGameCornerTMVendorMenuData:
db $40 ; flags db $40 ; flags
db 02, 00 ; start coords db 02, 00 ; start coords
db 11, 15 ; end coords db 11, 15 ; end coords
@ -158,87 +158,87 @@ MenuData2_0x56cd1:
db "CANCEL@" db "CANCEL@"
ReceptionistScript_0x56d01: GoldenrodGameCornerPrizeMonVendorScript:
faceplayer faceplayer
opentext opentext
writetext UnknownText_0x56e50 writetext GoldenrodGameCornerPrizeVendorIntroText
waitbutton waitbutton
checkitem COIN_CASE checkitem COIN_CASE
iffalse UnknownScript_0x56cc3 iffalse GoldenrodGameCornerPrizeVendor_NoCoinCaseScript
UnknownScript_0x56d0c: .loop
writetext UnknownText_0x56e8b writetext GoldenrodGameCornerPrizeVendorWhichPrizeText
special Special_DisplayCoinCaseBalance special Special_DisplayCoinCaseBalance
loadmenudata MenuDataHeader_0x56db0 loadmenudata .MenuDataHeader
verticalmenu verticalmenu
writebackup closewindow
if_equal $1, UnknownScript_0x56d26 if_equal $1, .abra
if_equal $2, UnknownScript_0x56d54 if_equal $2, .cubone
if_equal $3, UnknownScript_0x56d82 if_equal $3, .wobbuffet
jump UnknownScript_0x56cbd jump GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
UnknownScript_0x56d26: .abra:
checkcoins 100 checkcoins 100
if_equal $2, UnknownScript_0x56cb1 if_equal $2, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
checkcode VAR_PARTYCOUNT checkcode VAR_PARTYCOUNT
if_equal $6, UnknownScript_0x56cb7 if_equal $6, GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript
pokenamemem ABRA, $0 pokenamemem ABRA, $0
scall UnknownScript_0x56ca1 scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript
iffalse UnknownScript_0x56cbd iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
waitsfx waitsfx
playsound SFX_TRANSACTION playsound SFX_TRANSACTION
writetext UnknownText_0x56ebd writetext GoldenrodGameCornerPrizeVendorHereYouGoText
waitbutton waitbutton
writebyte ABRA writebyte ABRA
special Special_GameCornerPrizeMonCheckDex special Special_GameCornerPrizeMonCheckDex
givepoke ABRA, 5 givepoke ABRA, 5
takecoins 100 takecoins 100
jump UnknownScript_0x56d0c jump .loop
UnknownScript_0x56d54: .cubone:
checkcoins 800 checkcoins 800
if_equal $2, UnknownScript_0x56cb1 if_equal $2, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
checkcode VAR_PARTYCOUNT checkcode VAR_PARTYCOUNT
if_equal $6, UnknownScript_0x56cb7 if_equal $6, GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript
pokenamemem CUBONE, $0 pokenamemem CUBONE, $0
scall UnknownScript_0x56ca1 scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript
iffalse UnknownScript_0x56cbd iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
waitsfx waitsfx
playsound SFX_TRANSACTION playsound SFX_TRANSACTION
writetext UnknownText_0x56ebd writetext GoldenrodGameCornerPrizeVendorHereYouGoText
waitbutton waitbutton
writebyte CUBONE writebyte CUBONE
special Special_GameCornerPrizeMonCheckDex special Special_GameCornerPrizeMonCheckDex
givepoke CUBONE, 15 givepoke CUBONE, 15
takecoins 800 takecoins 800
jump UnknownScript_0x56d0c jump .loop
UnknownScript_0x56d82: .wobbuffet:
checkcoins 1500 checkcoins 1500
if_equal $2, UnknownScript_0x56cb1 if_equal $2, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
checkcode VAR_PARTYCOUNT checkcode VAR_PARTYCOUNT
if_equal $6, UnknownScript_0x56cb7 if_equal $6, GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript
pokenamemem WOBBUFFET, $0 pokenamemem WOBBUFFET, $0
scall UnknownScript_0x56ca1 scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript
iffalse UnknownScript_0x56cbd iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
waitsfx waitsfx
playsound SFX_TRANSACTION playsound SFX_TRANSACTION
writetext UnknownText_0x56ebd writetext GoldenrodGameCornerPrizeVendorHereYouGoText
waitbutton waitbutton
writebyte WOBBUFFET writebyte WOBBUFFET
special Special_GameCornerPrizeMonCheckDex special Special_GameCornerPrizeMonCheckDex
givepoke WOBBUFFET, 15 givepoke WOBBUFFET, 15
takecoins 1500 takecoins 1500
jump UnknownScript_0x56d0c jump .loop
MenuDataHeader_0x56db0: .MenuDataHeader:
db $40 ; flags db $40 ; flags
db 02, 00 ; start coords db 02, 00 ; start coords
db 11, 17 ; end coords db 11, 17 ; end coords
dw MenuData2_0x56db8 dw .MenuData2
db 1 ; default option db 1 ; default option
MenuData2_0x56db8: .MenuData2:
db $80 ; flags db $80 ; flags
db 4 ; items db 4 ; items
db "ABRA 100@" db "ABRA 100@"
@ -247,83 +247,83 @@ MenuData2_0x56db8:
db "CANCEL@" db "CANCEL@"
PharmacistScript_0x56df1: GoldenrodGameCornerPharmacistScript:
faceplayer faceplayer
opentext opentext
writetext UnknownText_0x56f55 writetext GoldenrodGameCornerPharmacistText
waitbutton waitbutton
closetext closetext
spriteface LAST_TALKED, LEFT spriteface LAST_TALKED, LEFT
end end
PokefanMScript_0x56dfc: GoldenrodGameCornerPokefanM1Script:
faceplayer faceplayer
opentext opentext
writetext UnknownText_0x56f9e writetext GoldenrodGameCornerPokefanM1Text
waitbutton waitbutton
closetext closetext
spriteface GOLDENRODGAMECORNER_POKEFAN_M1, RIGHT spriteface GOLDENRODGAMECORNER_POKEFAN_M1, RIGHT
end end
CooltrainerMScript_0x56e07: GoldenrodGameCornerCooltrainerMScript:
faceplayer faceplayer
opentext opentext
writetext UnknownText_0x56ff4 writetext GoldenrodGameCornerCooltrainerMText
waitbutton waitbutton
closetext closetext
spriteface GOLDENRODGAMECORNER_COOLTRAINER_M, LEFT spriteface GOLDENRODGAMECORNER_COOLTRAINER_M, LEFT
end end
PokefanFScript_0x56e12: GoldenrodGameCornerPokefanFScript:
faceplayer faceplayer
opentext opentext
writetext UnknownText_0x5702b writetext GoldenrodGameCornerPokefanFText
waitbutton waitbutton
closetext closetext
spriteface GOLDENRODGAMECORNER_POKEFAN_F, RIGHT spriteface GOLDENRODGAMECORNER_POKEFAN_F, RIGHT
end end
CooltrainerFScript_0x56e1d: GoldenrodGameCornerCooltrainerFScript:
jumptextfaceplayer UnknownText_0x57097 jumptextfaceplayer GoldenrodGameCornerCooltrainerFText
GentlemanScript_0x56e20: GoldenrodGameCornerGentlemanScript:
faceplayer faceplayer
opentext opentext
writetext UnknownText_0x570b1 writetext GoldenrodGameCornerGentlemanText
waitbutton waitbutton
closetext closetext
spriteface GOLDENRODGAMECORNER_GENTLEMAN, RIGHT spriteface GOLDENRODGAMECORNER_GENTLEMAN, RIGHT
end end
PokefanMScript_0x56e2b: GoldenrodGameCornerPokefanM2Script:
jumptextfaceplayer UnknownText_0x5710d jumptextfaceplayer GoldenrodGameCornerPokefanM2Text
MapGoldenrodGameCornerSignpost30Script: GoldenrodGameCornerLeftTheirDrinkScript:
jumptext UnknownText_0x571af jumptext GoldenrodGameCornerLeftTheirDrinkText
MapGoldenrodGameCornerSignpost17Script: GoldenrodGameCornerSlotsMachineScript:
random $6 random 6
if_equal $0, MapGoldenrodGameCornerSignpost7Script if_equal 0, GoldenrodGameCornerLuckySlotsMachineScript
refreshscreen $0 refreshscreen $0
writebyte $0 writebyte FALSE
special Special_SlotMachine special Special_SlotMachine
closetext closetext
end end
MapGoldenrodGameCornerSignpost7Script: GoldenrodGameCornerLuckySlotsMachineScript:
refreshscreen $0 refreshscreen $0
writebyte $1 writebyte TRUE
special Special_SlotMachine special Special_SlotMachine
closetext closetext
end end
MapGoldenrodGameCornerSignpost29Script: GoldenrodGameCornerCardFlipMachineScript:
refreshscreen $0 refreshscreen $0
special Special_CardFlip special Special_CardFlip
closetext closetext
end end
UnknownText_0x56e50: GoldenrodGameCornerPrizeVendorIntroText:
text "Welcome!" text "Welcome!"
para "We exchange your" para "We exchange your"
@ -331,43 +331,43 @@ UnknownText_0x56e50:
cont "fabulous prizes!" cont "fabulous prizes!"
done done
UnknownText_0x56e8b: GoldenrodGameCornerPrizeVendorWhichPrizeText:
text "Which prize would" text "Which prize would"
line "you like?" line "you like?"
done done
UnknownText_0x56ea8: GoldenrodGameCornerPrizeVendorConfirmPrizeText:
text_from_ram StringBuffer3 text_from_ram StringBuffer3
text "." text "."
line "Is that right?" line "Is that right?"
done done
UnknownText_0x56ebd: GoldenrodGameCornerPrizeVendorHereYouGoText:
text "Here you go!" text "Here you go!"
done done
UnknownText_0x56ecb: GoldenrodGameCornerPrizeVendorNeedMoreCoinsText:
text "Sorry! You need" text "Sorry! You need"
line "more coins." line "more coins."
done done
UnknownText_0x56ee8: GoldenrodGameCornerPrizeVendorNoMoreRoomText:
text "Sorry. You can't" text "Sorry. You can't"
line "carry any more." line "carry any more."
done done
UnknownText_0x56f09: GoldenrodGameCornerPrizeVendorQuitText:
text "OK. Please save" text "OK. Please save"
line "your coins and" line "your coins and"
cont "come again!" cont "come again!"
done done
UnknownText_0x56f35: GoldenrodGameCornerPrizeVendorNoCoinCaseText:
text "Oh? You don't have" text "Oh? You don't have"
line "a COIN CASE." line "a COIN CASE."
done done
UnknownText_0x56f55: GoldenrodGameCornerPharmacistText:
text "I always play this" text "I always play this"
line "slot machine. It" line "slot machine. It"
@ -375,7 +375,7 @@ UnknownText_0x56f55:
line "others, I think." line "others, I think."
done done
UnknownText_0x56f9e: GoldenrodGameCornerPokefanM1Text:
text "I just love this" text "I just love this"
line "new slot machine." line "new slot machine."
@ -384,13 +384,13 @@ UnknownText_0x56f9e:
cont "ones in CELADON." cont "ones in CELADON."
done done
UnknownText_0x56ff4: GoldenrodGameCornerCooltrainerMText:
text "Life is a gamble." text "Life is a gamble."
line "I'm going to flip" line "I'm going to flip"
cont "cards till I drop!" cont "cards till I drop!"
done done
UnknownText_0x5702b: GoldenrodGameCornerPokefanFText:
text "Card flip…" text "Card flip…"
para "I prefer it over" para "I prefer it over"
@ -403,12 +403,12 @@ UnknownText_0x5702b:
line "much lower." line "much lower."
done done
UnknownText_0x57097: GoldenrodGameCornerCooltrainerFText:
text "I won't quit until" text "I won't quit until"
line "I win!" line "I win!"
done done
UnknownText_0x570b1: GoldenrodGameCornerGentlemanText:
text "I taught BLIZZARD" text "I taught BLIZZARD"
line "to my #MON." line "to my #MON."
@ -419,7 +419,7 @@ UnknownText_0x570b1:
line "worth it." line "worth it."
done done
UnknownText_0x5710d: GoldenrodGameCornerPokefanM2Text:
text "I couldn't win at" text "I couldn't win at"
line "the slots, and I" line "the slots, and I"
@ -433,12 +433,12 @@ UnknownText_0x5710d:
line "UNDERGROUND." line "UNDERGROUND."
done done
UnknownText_0x5718a: GoldenrodGameCornerPokefanM3Text:
text "Wahahah! The coins" text "Wahahah! The coins"
line "keep rolling in!" line "keep rolling in!"
done done
UnknownText_0x571af: GoldenrodGameCornerLeftTheirDrinkText:
text "Someone left their" text "Someone left their"
line "drink." line "drink."
@ -459,49 +459,49 @@ GoldenrodGameCorner_MapEventHeader:
.Signposts: .Signposts:
db 31 db 31
signpost 6, 6, SIGNPOST_READ, MapGoldenrodGameCornerSignpost17Script signpost 6, 6, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
signpost 7, 6, SIGNPOST_READ, MapGoldenrodGameCornerSignpost17Script signpost 7, 6, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
signpost 8, 6, SIGNPOST_READ, MapGoldenrodGameCornerSignpost17Script signpost 8, 6, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
signpost 9, 6, SIGNPOST_READ, MapGoldenrodGameCornerSignpost17Script signpost 9, 6, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
signpost 10, 6, SIGNPOST_READ, MapGoldenrodGameCornerSignpost17Script signpost 10, 6, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
signpost 11, 6, SIGNPOST_RIGHT, MapGoldenrodGameCornerSignpost17Script signpost 11, 6, SIGNPOST_RIGHT, GoldenrodGameCornerSlotsMachineScript
signpost 6, 7, SIGNPOST_READ, MapGoldenrodGameCornerSignpost17Script signpost 6, 7, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
signpost 7, 7, SIGNPOST_READ, MapGoldenrodGameCornerSignpost7Script signpost 7, 7, SIGNPOST_READ, GoldenrodGameCornerLuckySlotsMachineScript
signpost 8, 7, SIGNPOST_READ, MapGoldenrodGameCornerSignpost17Script signpost 8, 7, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
signpost 9, 7, SIGNPOST_READ, MapGoldenrodGameCornerSignpost17Script signpost 9, 7, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
signpost 10, 7, SIGNPOST_READ, MapGoldenrodGameCornerSignpost17Script signpost 10, 7, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
signpost 11, 7, SIGNPOST_LEFT, MapGoldenrodGameCornerSignpost17Script signpost 11, 7, SIGNPOST_LEFT, GoldenrodGameCornerSlotsMachineScript
signpost 6, 12, SIGNPOST_READ, MapGoldenrodGameCornerSignpost17Script signpost 6, 12, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
signpost 7, 12, SIGNPOST_READ, MapGoldenrodGameCornerSignpost17Script signpost 7, 12, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
signpost 8, 12, SIGNPOST_READ, MapGoldenrodGameCornerSignpost17Script signpost 8, 12, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
signpost 9, 12, SIGNPOST_READ, MapGoldenrodGameCornerSignpost17Script signpost 9, 12, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
signpost 10, 12, SIGNPOST_READ, MapGoldenrodGameCornerSignpost17Script signpost 10, 12, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
signpost 11, 12, SIGNPOST_RIGHT, MapGoldenrodGameCornerSignpost17Script signpost 11, 12, SIGNPOST_RIGHT, GoldenrodGameCornerSlotsMachineScript
signpost 6, 13, SIGNPOST_READ, MapGoldenrodGameCornerSignpost29Script signpost 6, 13, SIGNPOST_READ, GoldenrodGameCornerCardFlipMachineScript
signpost 7, 13, SIGNPOST_READ, MapGoldenrodGameCornerSignpost29Script signpost 7, 13, SIGNPOST_READ, GoldenrodGameCornerCardFlipMachineScript
signpost 8, 13, SIGNPOST_READ, MapGoldenrodGameCornerSignpost29Script signpost 8, 13, SIGNPOST_READ, GoldenrodGameCornerCardFlipMachineScript
signpost 9, 13, SIGNPOST_READ, MapGoldenrodGameCornerSignpost29Script signpost 9, 13, SIGNPOST_READ, GoldenrodGameCornerCardFlipMachineScript
signpost 10, 13, SIGNPOST_READ, MapGoldenrodGameCornerSignpost29Script signpost 10, 13, SIGNPOST_READ, GoldenrodGameCornerCardFlipMachineScript
signpost 11, 13, SIGNPOST_LEFT, MapGoldenrodGameCornerSignpost29Script signpost 11, 13, SIGNPOST_LEFT, GoldenrodGameCornerCardFlipMachineScript
signpost 6, 18, SIGNPOST_READ, MapGoldenrodGameCornerSignpost29Script signpost 6, 18, SIGNPOST_READ, GoldenrodGameCornerCardFlipMachineScript
signpost 7, 18, SIGNPOST_READ, MapGoldenrodGameCornerSignpost29Script signpost 7, 18, SIGNPOST_READ, GoldenrodGameCornerCardFlipMachineScript
signpost 8, 18, SIGNPOST_READ, MapGoldenrodGameCornerSignpost29Script signpost 8, 18, SIGNPOST_READ, GoldenrodGameCornerCardFlipMachineScript
signpost 9, 18, SIGNPOST_READ, MapGoldenrodGameCornerSignpost29Script signpost 9, 18, SIGNPOST_READ, GoldenrodGameCornerCardFlipMachineScript
signpost 10, 18, SIGNPOST_READ, MapGoldenrodGameCornerSignpost29Script signpost 10, 18, SIGNPOST_READ, GoldenrodGameCornerCardFlipMachineScript
signpost 11, 18, SIGNPOST_RIGHT, MapGoldenrodGameCornerSignpost29Script signpost 11, 18, SIGNPOST_RIGHT, GoldenrodGameCornerCardFlipMachineScript
signpost 1, 12, SIGNPOST_LEFT, MapGoldenrodGameCornerSignpost30Script signpost 1, 12, SIGNPOST_LEFT, GoldenrodGameCornerLeftTheirDrinkScript
.PersonEvents: .PersonEvents:
db 12 db 12
person_event SPRITE_CLERK, 2, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, ClerkScript_0x56c25, -1 person_event SPRITE_CLERK, 2, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, GoldenrodGmeCornerCoinVendorScript, -1
person_event SPRITE_RECEPTIONIST, 2, 16, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, ReceptionistScript_0x56c28, -1 person_event SPRITE_RECEPTIONIST, 2, 16, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, GoldenrodGmeCornerTMVendorScript, -1
person_event SPRITE_RECEPTIONIST, 2, 18, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, ReceptionistScript_0x56d01, -1 person_event SPRITE_RECEPTIONIST, 2, 18, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, GoldenrodGameCornerPrizeMonVendorScript, -1
person_event SPRITE_PHARMACIST, 7, 8, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, 2, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, PharmacistScript_0x56df1, -1 person_event SPRITE_PHARMACIST, 7, 8, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, (1 << DAY), (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, GoldenrodGameCornerPharmacistScript, -1
person_event SPRITE_PHARMACIST, 7, 8, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, 4, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, PharmacistScript_0x56df1, -1 person_event SPRITE_PHARMACIST, 7, 8, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, (1 << NITE), (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, GoldenrodGameCornerPharmacistScript, -1
person_event SPRITE_POKEFAN_M, 10, 11, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, PokefanMScript_0x56dfc, -1 person_event SPRITE_POKEFAN_M, 10, 11, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, GoldenrodGameCornerPokefanM1Script, -1
person_event SPRITE_COOLTRAINER_M, 8, 14, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, CooltrainerMScript_0x56e07, -1 person_event SPRITE_COOLTRAINER_M, 8, 14, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, GoldenrodGameCornerCooltrainerMScript, -1
person_event SPRITE_POKEFAN_F, 6, 17, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, PokefanFScript_0x56e12, -1 person_event SPRITE_POKEFAN_F, 6, 17, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, GoldenrodGameCornerPokefanFScript, -1
person_event SPRITE_COOLTRAINER_F, 3, 10, SPRITEMOVEDATA_WANDER, 1, 2, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, CooltrainerFScript_0x56e1d, -1 person_event SPRITE_COOLTRAINER_F, 3, 10, SPRITEMOVEDATA_WANDER, 1, 2, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, GoldenrodGameCornerCooltrainerFScript, -1
person_event SPRITE_GENTLEMAN, 10, 5, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, GentlemanScript_0x56e20, -1 person_event SPRITE_GENTLEMAN, 10, 5, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, GoldenrodGameCornerGentlemanScript, -1
person_event SPRITE_POKEFAN_M, 9, 2, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, PokefanMScript_0x56e2b, -1 person_event SPRITE_POKEFAN_M, 9, 2, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, GoldenrodGameCornerPokefanM2Script, -1
person_event SPRITE_POKEFAN_M, 10, 17, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, PokefanMScript_0x56c1a, EVENT_GOLDENROD_GAME_CORNER_MOVE_TUTOR person_event SPRITE_POKEFAN_M, 10, 17, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, GoldenrodGameCornerPokefanM3Script, EVENT_GOLDENROD_GAME_CORNER_MOVE_TUTOR

View File

@ -27,7 +27,7 @@ UnknownScript_0x625df:
reloadmappart reloadmappart
loadmenudata MenuDataHeader_0x62602 loadmenudata MenuDataHeader_0x62602
verticalmenu verticalmenu
writebackup closewindow
if_equal $1, UnknownScript_0x625f0 if_equal $1, UnknownScript_0x625f0
if_equal $2, UnknownScript_0x625f8 if_equal $2, UnknownScript_0x625f8
jump UnknownScript_0x62600 jump UnknownScript_0x62600
@ -72,7 +72,7 @@ UnknownScript_0x62629:
reloadmappart reloadmappart
loadmenudata MenuDataHeader_0x6264c loadmenudata MenuDataHeader_0x6264c
verticalmenu verticalmenu
writebackup closewindow
if_equal $1, UnknownScript_0x6263a if_equal $1, UnknownScript_0x6263a
if_equal $2, UnknownScript_0x62642 if_equal $2, UnknownScript_0x62642
jump UnknownScript_0x6264a jump UnknownScript_0x6264a

View File

@ -255,7 +255,7 @@ Function89261: ; 89261
push af push af
ld c, $a ld c, $a
call DelayFrames call DelayFrames
call WriteBackup call CloseWindow
call Function8920f call Function8920f
pop af pop af
jr c, .done jr c, .done
@ -2816,7 +2816,7 @@ Function8a116: ; 8a116 (22:6116)
ret ret
.asm_8a16b .asm_8a16b
call Function89209 call Function89209
call WriteBackup call CloseWindow
call Function8920f call Function8920f
scf scf
ret ret
@ -2999,7 +2999,7 @@ Function8a2aa: ; 8a2aa (22:62aa)
and a and a
ret ret
.asm_8a2ea .asm_8a2ea
call WriteBackup call CloseWindow
.asm_8a2ed .asm_8a2ed
scf scf
ret ret
@ -3901,7 +3901,7 @@ Function8a999: ; 8a999 (22:6999)
jr .asm_8a9a1 jr .asm_8a9a1
.asm_8a9bb .asm_8a9bb
call Function89209 call Function89209
call WriteBackup call CloseWindow
call Function8920f call Function8920f
ret ret

View File

@ -2857,7 +2857,7 @@ Jumptable_101247: ; 101247
Function101251: ; 101251 Function101251: ; 101251
call UpdateSprites call UpdateSprites
call ResetWindow call RefreshScreen
ld hl, UnknownText_0x1021f4 ld hl, UnknownText_0x1021f4
call Function1021e0 call Function1021e0
call Function1020ea call Function1020ea
@ -7752,7 +7752,7 @@ AskMobileOrCable: ; 103612
.skip_load .skip_load
call VerticalMenu call VerticalMenu
call WriteBackup call CloseWindow
jr c, .pressed_b jr c, .pressed_b
ld a, [wMenuCursorY] ld a, [wMenuCursorY]
ld [ScriptVar], a ld [ScriptVar], a

View File

@ -1416,7 +1416,7 @@ Function118982:
push af push af
ld a, $1 ld a, $1
ld [rSVBK], a ld [rSVBK], a
call WriteBackup call CloseWindow
pop af pop af
ld [rSVBK], a ld [rSVBK], a
ld a, [wcd38] ld a, [wcd38]
@ -1440,7 +1440,7 @@ Function118982:
push af push af
ld a, $1 ld a, $1
ld [rSVBK], a ld [rSVBK], a
call WriteBackup call CloseWindow
pop af pop af
ld [rSVBK], a ld [rSVBK], a
ld a, $7 ld a, $7

View File

@ -456,7 +456,7 @@ Special_Menu_ChallengeExplanationCancel: ; 17d224
.Load_Interpret .Load_Interpret
call LoadMenuDataHeader call LoadMenuDataHeader
call Function17d246 call Function17d246
call WriteBackup call CloseWindow
ret ret
; 17d246 ; 17d246
@ -1939,7 +1939,7 @@ Function17dc1f: ; 17dc1f
ld [wMenuCursorY], a ld [wMenuCursorY], a
.asm_17dc6e .asm_17dc6e
call WriteBackup call CloseWindow
pop af pop af
ld [rSVBK], a ld [rSVBK], a
ld a, [wMenuCursorY] ld a, [wMenuCursorY]

View File

@ -2050,7 +2050,7 @@ TempMon::
wSpriteFlags:: ds 1 wSpriteFlags:: ds 1
wd13f:: ds 2 wHandlePlayerStep:: ds 2
PartyMenuActionText:: ; d141 PartyMenuActionText:: ; d141
ds 1 ds 1
@ -2073,16 +2073,21 @@ wPrevMapGroup:: ds 1
wPrevMapNumber:: ds 1 wPrevMapNumber:: ds 1
; d14c ; d14c
wd14c:: ds 1 ; used in FollowNotExact wFollowNotExactPersonX:: ds 1 ; used in FollowNotExact
wd14d:: ds 1 ; used in FollowNotExact wFollowNotExactPersonY:: ds 1 ; used in FollowNotExact
; Player movement ; Player movement
wPlayerStepVectorX:: ds 1 wPlayerStepVectorX:: ds 1 ; d14e
wPlayerStepVectorY:: ds 1 wPlayerStepVectorY:: ds 1 ; d14f
wPlayerStepFlags:: ds 1 wPlayerStepFlags:: ds 1 ; d150
wPlayerStepDirection:: ds 1 ; bit 7: Start step
; bit 6: Stop step
; bit 5: Doing step
; bit 4: In midair
; bits 0-3: unused
wPlayerStepDirection:: ds 1 ; d151
wBGMapAnchor:: ds 2 wBGMapAnchor:: ds 2 ; d152
UsedSprites:: ds 64 ; d154 UsedSprites:: ds 64 ; d154
UsedSpritesEnd:: UsedSpritesEnd::