2019-01-01 20:06:23 +00:00
|
|
|
GameCorner_Script:
|
2014-05-18 18:19:10 +00:00
|
|
|
call CeladonGameCornerScript_48bcf
|
|
|
|
call CeladonGameCornerScript_48bec
|
|
|
|
call EnableAutoTextBoxDrawing
|
2019-01-01 20:06:23 +00:00
|
|
|
ld hl, GameCorner_ScriptPointers
|
|
|
|
ld a, [wGameCornerCurScript]
|
2014-05-18 18:19:10 +00:00
|
|
|
jp CallFunctionInTable
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerScript_48bcf:
|
2016-01-03 19:17:10 +00:00
|
|
|
ld hl, wCurrentMapScriptFlags
|
2014-05-18 18:19:10 +00:00
|
|
|
bit 6, [hl]
|
|
|
|
res 6, [hl]
|
|
|
|
ret z
|
2014-05-24 18:40:38 +00:00
|
|
|
call Random
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh a, [hRandomAdd]
|
2014-05-18 18:19:10 +00:00
|
|
|
cp $7
|
|
|
|
jr nc, .asm_48be2
|
|
|
|
ld a, $8
|
|
|
|
.asm_48be2
|
|
|
|
srl a
|
|
|
|
srl a
|
|
|
|
srl a
|
2015-07-13 20:35:35 +00:00
|
|
|
ld [wLuckySlotHiddenObjectIndex], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerScript_48bec:
|
2016-01-03 19:17:10 +00:00
|
|
|
ld hl, wCurrentMapScriptFlags
|
2014-05-18 18:19:10 +00:00
|
|
|
bit 5, [hl]
|
|
|
|
res 5, [hl]
|
|
|
|
ret z
|
2015-07-21 17:36:03 +00:00
|
|
|
CheckEvent EVENT_FOUND_ROCKET_HIDEOUT
|
2014-05-18 18:19:10 +00:00
|
|
|
ret nz
|
|
|
|
ld a, $2a
|
2015-07-24 21:39:45 +00:00
|
|
|
ld [wNewTileBlockID], a
|
2015-08-05 21:20:29 +00:00
|
|
|
lb bc, 2, 8
|
2014-09-14 18:29:18 +00:00
|
|
|
predef_jump ReplaceTileBlock
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerScript_48c07:
|
2014-05-18 18:19:10 +00:00
|
|
|
xor a
|
2014-05-25 17:51:53 +00:00
|
|
|
ld [wJoyIgnore], a
|
2019-01-01 20:06:23 +00:00
|
|
|
ld [wGameCornerCurScript], a
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wCurMapScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2019-01-01 20:06:23 +00:00
|
|
|
GameCorner_ScriptPointers:
|
2014-05-18 18:19:10 +00:00
|
|
|
dw CeladonGameCornerScript0
|
|
|
|
dw CeladonGameCornerScript1
|
|
|
|
dw CeladonGameCornerScript2
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerScript0:
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerScript1:
|
2015-08-31 02:38:41 +00:00
|
|
|
ld a, [wIsInBattle]
|
2014-05-18 18:19:10 +00:00
|
|
|
cp $ff
|
|
|
|
jp z, CeladonGameCornerScript_48c07
|
|
|
|
ld a, $f0
|
2014-05-25 17:51:53 +00:00
|
|
|
ld [wJoyIgnore], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $d
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hSpriteIndexOrTextID], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call DisplayTextID
|
|
|
|
ld a, $b
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hSpriteIndex], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call SetSpriteMovementBytesToFF
|
|
|
|
ld de, MovementData_48c5a
|
2015-08-31 02:38:41 +00:00
|
|
|
ld a, [wYCoord]
|
2020-08-28 16:10:55 +00:00
|
|
|
cp 6
|
2014-05-18 18:19:10 +00:00
|
|
|
jr nz, .asm_48c43
|
|
|
|
ld de, MovementData_48c63
|
|
|
|
jr .asm_48c4d
|
|
|
|
.asm_48c43
|
2015-08-31 02:38:41 +00:00
|
|
|
ld a, [wXCoord]
|
2020-08-28 16:10:55 +00:00
|
|
|
cp 8
|
2014-05-18 18:19:10 +00:00
|
|
|
jr nz, .asm_48c4d
|
|
|
|
ld de, MovementData_48c63
|
|
|
|
.asm_48c4d
|
|
|
|
ld a, $b
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hSpriteIndex], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call MoveSprite
|
|
|
|
ld a, $2
|
2019-01-01 20:06:23 +00:00
|
|
|
ld [wGameCornerCurScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
MovementData_48c5a:
|
2015-07-17 07:52:25 +00:00
|
|
|
db NPC_MOVEMENT_DOWN
|
|
|
|
db NPC_MOVEMENT_RIGHT
|
|
|
|
db NPC_MOVEMENT_RIGHT
|
|
|
|
db NPC_MOVEMENT_UP
|
|
|
|
db NPC_MOVEMENT_RIGHT
|
|
|
|
db NPC_MOVEMENT_RIGHT
|
|
|
|
db NPC_MOVEMENT_RIGHT
|
|
|
|
db NPC_MOVEMENT_RIGHT
|
2020-07-16 16:32:19 +00:00
|
|
|
db -1 ; end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
MovementData_48c63:
|
2015-07-17 07:52:25 +00:00
|
|
|
db NPC_MOVEMENT_RIGHT
|
|
|
|
db NPC_MOVEMENT_RIGHT
|
|
|
|
db NPC_MOVEMENT_RIGHT
|
|
|
|
db NPC_MOVEMENT_RIGHT
|
|
|
|
db NPC_MOVEMENT_RIGHT
|
2020-07-16 16:32:19 +00:00
|
|
|
db -1 ; end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerScript2:
|
2014-05-26 21:04:56 +00:00
|
|
|
ld a, [wd730]
|
2014-05-18 18:19:10 +00:00
|
|
|
bit 0, a
|
|
|
|
ret nz
|
|
|
|
xor a
|
2014-05-25 17:51:53 +00:00
|
|
|
ld [wJoyIgnore], a
|
2014-09-25 23:21:49 +00:00
|
|
|
ld a, HS_GAME_CORNER_ROCKET
|
2015-07-25 03:27:59 +00:00
|
|
|
ld [wMissableObjectIndex], a
|
2014-06-16 20:57:26 +00:00
|
|
|
predef HideObject
|
2016-01-03 19:17:10 +00:00
|
|
|
ld hl, wCurrentMapScriptFlags
|
2014-05-18 18:19:10 +00:00
|
|
|
set 5, [hl]
|
|
|
|
set 6, [hl]
|
|
|
|
ld a, $0
|
2019-01-01 20:06:23 +00:00
|
|
|
ld [wGameCornerCurScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2019-01-01 20:06:23 +00:00
|
|
|
GameCorner_TextPointers:
|
2014-05-18 18:19:10 +00:00
|
|
|
dw CeladonGameCornerText1
|
|
|
|
dw CeladonGameCornerText2
|
|
|
|
dw CeladonGameCornerText3
|
|
|
|
dw CeladonGameCornerText4
|
|
|
|
dw CeladonGameCornerText5
|
|
|
|
dw CeladonGameCornerText6
|
|
|
|
dw CeladonGameCornerText7
|
|
|
|
dw CeladonGameCornerText8
|
|
|
|
dw CeladonGameCornerText9
|
|
|
|
dw CeladonGameCornerText10
|
|
|
|
dw CeladonGameCornerText11
|
|
|
|
dw CeladonGameCornerText12
|
|
|
|
dw CeladonGameCornerText13
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText1:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText1
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText2:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2014-05-18 18:19:10 +00:00
|
|
|
call CeladonGameCornerScript_48f1e
|
|
|
|
ld hl, CeladonGameCornerText_48d22
|
|
|
|
call PrintText
|
|
|
|
call YesNoChoice
|
2014-05-26 21:04:56 +00:00
|
|
|
ld a, [wCurrentMenuItem]
|
2014-05-18 18:19:10 +00:00
|
|
|
and a
|
2015-07-03 19:38:12 +00:00
|
|
|
jr nz, .asm_48d0f
|
2017-12-30 00:54:27 +00:00
|
|
|
ld b, COIN_CASE
|
2014-05-18 18:19:10 +00:00
|
|
|
call IsItemInBag
|
2015-07-03 19:38:12 +00:00
|
|
|
jr z, .asm_48d19
|
2014-05-18 18:19:10 +00:00
|
|
|
call Has9990Coins
|
2015-07-03 19:38:12 +00:00
|
|
|
jr nc, .asm_48d14
|
2014-05-18 18:19:10 +00:00
|
|
|
xor a
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hMoney], a
|
|
|
|
ldh [hMoney + 2], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $10
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hMoney + 1], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call HasEnoughMoney
|
2015-07-03 19:38:12 +00:00
|
|
|
jr nc, .asm_48cdb
|
|
|
|
ld hl, CeladonGameCornerText_48d31
|
|
|
|
jr .asm_48d1c
|
|
|
|
.asm_48cdb
|
2014-05-18 18:19:10 +00:00
|
|
|
xor a
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hMoney], a
|
|
|
|
ldh [hMoney + 2], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $10
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hMoney + 1], a
|
2015-07-17 08:21:40 +00:00
|
|
|
ld hl, hMoney + 2
|
2014-05-26 21:04:56 +00:00
|
|
|
ld de, wPlayerMoney + 2
|
2014-05-18 18:19:10 +00:00
|
|
|
ld c, $3
|
2014-06-16 20:57:26 +00:00
|
|
|
predef SubBCDPredef
|
2014-05-18 18:19:10 +00:00
|
|
|
xor a
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hUnusedCoinsByte], a
|
|
|
|
ldh [hCoins], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $50
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hCoins + 1], a
|
2014-05-26 21:04:56 +00:00
|
|
|
ld de, wPlayerCoins + 1
|
2015-07-17 08:21:40 +00:00
|
|
|
ld hl, hCoins + 1
|
2014-05-18 18:19:10 +00:00
|
|
|
ld c, $2
|
2014-06-16 20:57:26 +00:00
|
|
|
predef AddBCDPredef
|
2014-05-18 18:19:10 +00:00
|
|
|
call CeladonGameCornerScript_48f1e
|
|
|
|
ld hl, CeladonGameCornerText_48d27
|
2015-07-03 19:38:12 +00:00
|
|
|
jr .asm_48d1c
|
|
|
|
.asm_48d0f
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, CeladonGameCornerText_48d2c
|
2015-07-03 19:38:12 +00:00
|
|
|
jr .asm_48d1c
|
|
|
|
.asm_48d14
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, CeladonGameCornerText_48d36
|
2015-07-03 19:38:12 +00:00
|
|
|
jr .asm_48d1c
|
|
|
|
.asm_48d19
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, CeladonGameCornerText_48d3b
|
2015-07-03 19:38:12 +00:00
|
|
|
.asm_48d1c
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText_48d22:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText_48d22
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText_48d27:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText_48d27
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText_48d2c:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText_48d2c
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText_48d31:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText_48d31
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText_48d36:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText_48d36
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText_48d3b:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText_48d3b
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText3:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText3
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText4:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText4
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText5:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2015-07-21 17:36:03 +00:00
|
|
|
CheckEvent EVENT_GOT_10_COINS
|
2015-07-03 19:38:12 +00:00
|
|
|
jr nz, .asm_48d89
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, CeladonGameCornerText_48d9c
|
|
|
|
call PrintText
|
|
|
|
ld b, COIN_CASE
|
|
|
|
call IsItemInBag
|
2015-07-03 19:38:12 +00:00
|
|
|
jr z, .asm_48d93
|
2014-05-18 18:19:10 +00:00
|
|
|
call Has9990Coins
|
2015-07-03 19:38:12 +00:00
|
|
|
jr nc, .asm_48d8e
|
2014-05-18 18:19:10 +00:00
|
|
|
xor a
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hUnusedCoinsByte], a
|
|
|
|
ldh [hCoins], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $10
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hCoins + 1], a
|
2014-05-26 21:04:56 +00:00
|
|
|
ld de, wPlayerCoins + 1
|
2015-07-17 08:21:40 +00:00
|
|
|
ld hl, hCoins + 1
|
2014-05-18 18:19:10 +00:00
|
|
|
ld c, $2
|
2014-06-16 20:57:26 +00:00
|
|
|
predef AddBCDPredef
|
2015-07-21 17:36:03 +00:00
|
|
|
SetEvent EVENT_GOT_10_COINS
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $1
|
2014-09-13 07:50:56 +00:00
|
|
|
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, Received10CoinsText
|
2015-07-03 19:38:12 +00:00
|
|
|
jr .asm_48d96
|
|
|
|
.asm_48d89
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, CeladonGameCornerText_48dac
|
2015-07-03 19:38:12 +00:00
|
|
|
jr .asm_48d96
|
|
|
|
.asm_48d8e
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, CeladonGameCornerText_48da7
|
2015-07-03 19:38:12 +00:00
|
|
|
jr .asm_48d96
|
|
|
|
.asm_48d93
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, CeladonGameCornerText_48f19
|
2015-07-03 19:38:12 +00:00
|
|
|
.asm_48d96
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText_48d9c:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText_48d9c
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Received10CoinsText:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _Received10CoinsText
|
|
|
|
sound_get_item_1
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText_48da7:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText_48da7
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText_48dac:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText_48dac
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText6:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText6
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText7:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2015-07-21 02:41:23 +00:00
|
|
|
CheckEvent EVENT_BEAT_ERIKA
|
2015-07-03 19:38:12 +00:00
|
|
|
ld hl, CeladonGameCornerText_48dca
|
|
|
|
jr z, .asm_48dc4
|
|
|
|
ld hl, CeladonGameCornerText_48dcf
|
|
|
|
.asm_48dc4
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText_48dca:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText_48dca
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText_48dcf:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText_48dcf
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText8:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText8
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText9:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2015-07-21 17:36:03 +00:00
|
|
|
CheckEvent EVENT_GOT_20_COINS_2
|
2015-07-03 19:38:12 +00:00
|
|
|
jr nz, .asm_48e13
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, CeladonGameCornerText_48e26
|
|
|
|
call PrintText
|
|
|
|
ld b, COIN_CASE
|
|
|
|
call IsItemInBag
|
2015-07-03 19:38:12 +00:00
|
|
|
jr z, .asm_48e1d
|
2014-05-18 18:19:10 +00:00
|
|
|
call Has9990Coins
|
2015-07-03 19:38:12 +00:00
|
|
|
jr nc, .asm_48e18
|
2014-05-18 18:19:10 +00:00
|
|
|
xor a
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hUnusedCoinsByte], a
|
|
|
|
ldh [hCoins], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $20
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hCoins + 1], a
|
2014-05-26 21:04:56 +00:00
|
|
|
ld de, wPlayerCoins + 1
|
2015-07-17 08:21:40 +00:00
|
|
|
ld hl, hCoins + 1
|
2014-05-18 18:19:10 +00:00
|
|
|
ld c, $2
|
2014-06-16 20:57:26 +00:00
|
|
|
predef AddBCDPredef
|
2015-07-21 17:36:03 +00:00
|
|
|
SetEvent EVENT_GOT_20_COINS_2
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, Received20CoinsText
|
2015-07-03 19:38:12 +00:00
|
|
|
jr .asm_48e20
|
|
|
|
.asm_48e13
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, CeladonGameCornerText_48e36
|
2015-07-03 19:38:12 +00:00
|
|
|
jr .asm_48e20
|
|
|
|
.asm_48e18
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, CeladonGameCornerText_48e31
|
2015-07-03 19:38:12 +00:00
|
|
|
jr .asm_48e20
|
|
|
|
.asm_48e1d
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, CeladonGameCornerText_48f19
|
2015-07-03 19:38:12 +00:00
|
|
|
.asm_48e20
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText_48e26:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText_48e26
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Received20CoinsText:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _Received20CoinsText
|
|
|
|
sound_get_item_1
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText_48e31:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText_48e31
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText_48e36:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText_48e36
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText10:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2015-07-21 17:36:03 +00:00
|
|
|
CheckEvent EVENT_GOT_20_COINS
|
2015-07-03 19:38:12 +00:00
|
|
|
jr nz, .asm_48e75
|
|
|
|
ld hl, CeladonGameCornerText_48e88
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
2017-12-30 00:54:27 +00:00
|
|
|
ld b, COIN_CASE
|
2014-05-18 18:19:10 +00:00
|
|
|
call IsItemInBag
|
2015-07-03 19:38:12 +00:00
|
|
|
jr z, .asm_48e7f
|
2014-05-18 18:19:10 +00:00
|
|
|
call Has9990Coins
|
2015-07-03 19:38:12 +00:00
|
|
|
jr z, .asm_48e7a
|
2014-05-18 18:19:10 +00:00
|
|
|
xor a
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hUnusedCoinsByte], a
|
|
|
|
ldh [hCoins], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $20
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hCoins + 1], a
|
2014-05-26 21:04:56 +00:00
|
|
|
ld de, wPlayerCoins + 1
|
2015-07-17 08:21:40 +00:00
|
|
|
ld hl, hCoins + 1
|
2014-05-18 18:19:10 +00:00
|
|
|
ld c, $2
|
2014-06-16 20:57:26 +00:00
|
|
|
predef AddBCDPredef
|
2015-07-21 17:36:03 +00:00
|
|
|
SetEvent EVENT_GOT_20_COINS
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, CeladonGameCornerText_48e8d
|
2015-07-03 19:38:12 +00:00
|
|
|
jr .asm_48e82
|
|
|
|
.asm_48e75
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, CeladonGameCornerText_48e98
|
2015-07-03 19:38:12 +00:00
|
|
|
jr .asm_48e82
|
|
|
|
.asm_48e7a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, CeladonGameCornerText_48e93
|
2015-07-03 19:38:12 +00:00
|
|
|
jr .asm_48e82
|
|
|
|
.asm_48e7f
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, CeladonGameCornerText_48f19
|
2015-07-03 19:38:12 +00:00
|
|
|
.asm_48e82
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText_48e88:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText_48e88
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText_48e8d:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText_48e8d
|
|
|
|
sound_get_item_1
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText_48e93:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText_48e93
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText_48e98:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText_48e98
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText11:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, CeladonGameCornerText_48ece
|
|
|
|
call PrintText
|
2014-05-26 21:04:56 +00:00
|
|
|
ld hl, wd72d
|
2014-05-18 18:19:10 +00:00
|
|
|
set 6, [hl]
|
|
|
|
set 7, [hl]
|
|
|
|
ld hl, CeladonGameCornerText_48ed3
|
|
|
|
ld de, CeladonGameCornerText_48ed3
|
2014-09-14 18:29:18 +00:00
|
|
|
call SaveEndBattleTextPointers
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh a, [hSpriteIndex]
|
2014-09-13 07:50:56 +00:00
|
|
|
ld [wSpriteIndex], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call EngageMapTrainer
|
|
|
|
call InitBattleEnemyParameters
|
|
|
|
xor a
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hJoyHeld], a
|
|
|
|
ldh [hJoyPressed], a
|
|
|
|
ldh [hJoyReleased], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $1
|
2019-01-01 20:06:23 +00:00
|
|
|
ld [wGameCornerCurScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
jp TextScriptEnd
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText_48ece:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText_48ece
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText_48ed3:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText_48ed3
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText13:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText_48ed8
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText12:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $1
|
2014-09-13 07:50:56 +00:00
|
|
|
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, CeladonGameCornerText_48f09
|
|
|
|
call PrintText
|
|
|
|
call WaitForSoundToFinish
|
2015-07-19 08:46:12 +00:00
|
|
|
ld a, SFX_GO_INSIDE
|
2014-05-18 18:19:10 +00:00
|
|
|
call PlaySound
|
|
|
|
call WaitForSoundToFinish
|
2015-07-21 17:36:03 +00:00
|
|
|
SetEvent EVENT_FOUND_ROCKET_HIDEOUT
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $43
|
2015-07-24 21:39:45 +00:00
|
|
|
ld [wNewTileBlockID], a
|
2015-08-05 21:20:29 +00:00
|
|
|
lb bc, 2, 8
|
2014-09-14 18:29:18 +00:00
|
|
|
predef ReplaceTileBlock
|
2014-05-18 18:19:10 +00:00
|
|
|
jp TextScriptEnd
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText_48f09:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText_48f09
|
|
|
|
text_asm
|
2015-07-19 08:46:12 +00:00
|
|
|
ld a, SFX_SWITCH
|
2014-05-18 18:19:10 +00:00
|
|
|
call PlaySound
|
|
|
|
call WaitForSoundToFinish
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerText_48f19:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _CeladonGameCornerText_48f19
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeladonGameCornerScript_48f1e:
|
2014-05-26 21:04:56 +00:00
|
|
|
ld hl, wd730
|
2014-05-18 18:19:10 +00:00
|
|
|
set 6, [hl]
|
2020-07-07 15:30:10 +00:00
|
|
|
hlcoord 11, 0
|
2020-11-06 15:33:58 +00:00
|
|
|
ld b, 5
|
|
|
|
ld c, 7
|
2014-05-18 18:19:10 +00:00
|
|
|
call TextBoxBorder
|
|
|
|
call UpdateSprites
|
2020-07-07 15:30:10 +00:00
|
|
|
hlcoord 12, 1
|
2015-08-05 21:20:29 +00:00
|
|
|
ld b, 4
|
|
|
|
ld c, 7
|
2014-05-18 18:19:10 +00:00
|
|
|
call ClearScreenArea
|
2020-07-07 15:30:10 +00:00
|
|
|
hlcoord 12, 2
|
2014-05-18 18:19:10 +00:00
|
|
|
ld de, GameCornerMoneyText
|
|
|
|
call PlaceString
|
2020-07-07 15:30:10 +00:00
|
|
|
hlcoord 12, 3
|
2014-05-18 18:19:10 +00:00
|
|
|
ld de, GameCornerBlankText1
|
|
|
|
call PlaceString
|
2020-07-07 15:30:10 +00:00
|
|
|
hlcoord 12, 3
|
2014-05-26 21:04:56 +00:00
|
|
|
ld de, wPlayerMoney
|
2020-11-06 15:33:58 +00:00
|
|
|
ld c, 3 | MONEY_SIGN | LEADING_ZEROES
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintBCDNumber
|
2020-07-07 15:30:10 +00:00
|
|
|
hlcoord 12, 4
|
2014-05-18 18:19:10 +00:00
|
|
|
ld de, GameCornerCoinText
|
|
|
|
call PlaceString
|
2020-07-07 15:30:10 +00:00
|
|
|
hlcoord 12, 5
|
2014-05-18 18:19:10 +00:00
|
|
|
ld de, GameCornerBlankText2
|
|
|
|
call PlaceString
|
2020-07-07 15:30:10 +00:00
|
|
|
hlcoord 15, 5
|
2014-05-26 21:04:56 +00:00
|
|
|
ld de, wPlayerCoins
|
2014-05-18 18:19:10 +00:00
|
|
|
ld c, $82
|
|
|
|
call PrintBCDNumber
|
2014-05-26 21:04:56 +00:00
|
|
|
ld hl, wd730
|
2014-05-18 18:19:10 +00:00
|
|
|
res 6, [hl]
|
|
|
|
ret
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
GameCornerMoneyText:
|
2014-05-18 18:19:10 +00:00
|
|
|
db "MONEY@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
GameCornerCoinText:
|
2014-05-18 18:19:10 +00:00
|
|
|
db "COIN@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
GameCornerBlankText1:
|
2014-05-18 18:19:10 +00:00
|
|
|
db " @"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
GameCornerBlankText2:
|
2014-05-18 18:19:10 +00:00
|
|
|
db " @"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Has9990Coins:
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $99
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hCoins], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $90
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hCoins + 1], a
|
2014-05-18 18:19:10 +00:00
|
|
|
jp HasEnoughCoins
|