summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpikalaxalt <PikalaxALT@gmail.com>2016-05-29 10:55:45 -0400
committerpikalaxalt <PikalaxALT@gmail.com>2016-05-29 10:55:45 -0400
commit2792f51d733df0d0b6ee21fec72623c2a4235e5a (patch)
tree16005a683821c9972be334ede8aafdc3b8324d09
parent9f3c214413f103170095cb81de245868752a29a7 (diff)
Another chunk of bank 3c
-rwxr-xr-xconstants/hide_show_constants.asm184
-rw-r--r--engine/bank3c.asm147
-rw-r--r--engine/bank3f.asm28
-rwxr-xr-xengine/items/items.asm2
-rw-r--r--engine/overworld/advance_player_sprite.asm2
-rw-r--r--home.asm115
-rw-r--r--home/overworld.asm4
-rwxr-xr-xhome/pikachu.asm113
-rwxr-xr-xscripts/beach_house2.asm33
-rwxr-xr-xscripts/billshouse2.asm158
-rwxr-xr-xscripts/oakslab.asm2
-rwxr-xr-xscripts/silphco11_2.asm76
-rwxr-xr-xscripts/ssanne9_2.asm35
-rwxr-xr-xscripts/viridianforest2.asm8
-rwxr-xr-xwram.asm2
15 files changed, 551 insertions, 358 deletions
diff --git a/constants/hide_show_constants.asm b/constants/hide_show_constants.asm
index 9481466e..ffc4ea08 100755
--- a/constants/hide_show_constants.asm
+++ b/constants/hide_show_constants.asm
@@ -150,96 +150,98 @@ const_value SET $7c ; idk anymore lol
const HS_ROCKET_HIDEOUT_4_ITEM_3 ; 88
const HS_ROCKET_HIDEOUT_4_ITEM_4 ; 89 XXX never (de)activated?
const HS_ROCKET_HIDEOUT_4_ITEM_5 ; 8A
- const HS_SILPH_CO_2F_1 ; 8B
- const HS_SILPH_CO_2F_2 ; 8C
- const HS_SILPH_CO_2F_3 ; 8D
- const HS_SILPH_CO_2F_4 ; 8E
- const HS_SILPH_CO_2F_5 ; 8F
- const HS_SILPH_CO_3F_1 ; 90 X
- const HS_SILPH_CO_3F_2 ; 91
- const HS_SILPH_CO_3F_ITEM ; 92
- const HS_SILPH_CO_4F_1 ; 93
- const HS_SILPH_CO_4F_2 ; 94 X
- const HS_SILPH_CO_4F_3 ; 95 X
- const HS_SILPH_CO_4F_ITEM_1 ; 96 X
- const HS_SILPH_CO_4F_ITEM_2 ; 97
- const HS_SILPH_CO_4F_ITEM_3 ; 98
- const HS_SILPH_CO_5F_1 ; 99
- const HS_SILPH_CO_5F_2 ; 9A
- const HS_SILPH_CO_5F_3 ; 9B X
- const HS_SILPH_CO_5F_4 ; 9C X
- const HS_SILPH_CO_5F_ITEM_1 ; 9D X
- const HS_SILPH_CO_5F_ITEM_2 ; 9E
- const HS_SILPH_CO_5F_ITEM_3 ; 9F
- const HS_SILPH_CO_6F_1 ; A0
- const HS_SILPH_CO_6F_2 ; A1 X
- const HS_SILPH_CO_6F_3 ; A2 X
- const HS_SILPH_CO_6F_ITEM_1 ; A3
- const HS_SILPH_CO_6F_ITEM_2 ; A4
- const HS_SILPH_CO_7F_1 ; A5
- const HS_SILPH_CO_7F_2 ; A6
- const HS_SILPH_CO_7F_3 ; A7
- const HS_SILPH_CO_7F_4 ; A8 X
- const HS_SILPH_CO_7F_RIVAL ; A9 X
- const HS_SILPH_CO_7F_ITEM_1 ; AA XXX sprite doesn't exist
- const HS_SILPH_CO_7F_ITEM_2 ; AB
- const HS_SILPH_CO_7F_8 ; AC
- const HS_SILPH_CO_8F_1 ; AD
- const HS_SILPH_CO_8F_2 ; AE
- const HS_SILPH_CO_8F_3 ; AF
- const HS_SILPH_CO_9F_1 ; B0
- const HS_SILPH_CO_9F_2 ; B1
- const HS_SILPH_CO_9F_3 ; B2
- const HS_SILPH_CO_10F_1 ; B3 XXX never (de)activated?
- const HS_SILPH_CO_10F_2 ; B4 X
- const HS_SILPH_CO_10F_3 ; B5 X
- const HS_SILPH_CO_10F_ITEM_1 ; B6 X
- const HS_SILPH_CO_10F_ITEM_2 ; B7
- const HS_SILPH_CO_10F_ITEM_3 ; B8
- const HS_SILPH_CO_11F_1 ; B9
- const HS_SILPH_CO_11F_2 ; BA XXX sprite doesn't exist
- const HS_SILPH_CO_11F_3 ; BB X
- const HS_MAP_F4_1 ; BC X
- const HS_MANSION_2_ITEM ; BD X
- const HS_MANSION_3_ITEM_1 ; BE X
- const HS_MANSION_3_ITEM_2 ; BF X
- const HS_MANSION_4_ITEM_1 ; C0 X
- const HS_MANSION_4_ITEM_2 ; C1 X
- const HS_MANSION_4_ITEM_3 ; C2 X
- const HS_MANSION_4_ITEM_4 ; C3 X
- const HS_MANSION_4_ITEM_5 ; C4 X
- const HS_SAFARI_ZONE_EAST_ITEM_1 ; C5 X
- const HS_SAFARI_ZONE_EAST_ITEM_2 ; C6 X
- const HS_SAFARI_ZONE_EAST_ITEM_3 ; C7 X
- const HS_SAFARI_ZONE_EAST_ITEM_4 ; C8 X
- const HS_SAFARI_ZONE_NORTH_ITEM_1 ; C9 X
- const HS_SAFARI_ZONE_NORTH_ITEM_2 ; CA X
- const HS_SAFARI_ZONE_WEST_ITEM_1 ; CB X
- const HS_SAFARI_ZONE_WEST_ITEM_2 ; CC X
- const HS_SAFARI_ZONE_WEST_ITEM_3 ; CD X
- const HS_SAFARI_ZONE_WEST_ITEM_4 ; CE X
- const HS_SAFARI_ZONE_CENTER_ITEM ; CF X
- const HS_UNKNOWN_DUNGEON_2_ITEM_1 ; D0 X
- const HS_UNKNOWN_DUNGEON_2_ITEM_2 ; D1 X
- const HS_UNKNOWN_DUNGEON_2_ITEM_3 ; D2 X
- const HS_MEWTWO ; D3 X
- const HS_UNKNOWN_DUNGEON_3_ITEM_1 ; D4 X
- const HS_UNKNOWN_DUNGEON_3_ITEM_2 ; D5 X
- const HS_VICTORY_ROAD_1_ITEM_1 ; D6
- const HS_VICTORY_ROAD_1_ITEM_2 ; D7
- const HS_CHAMPIONS_ROOM_OAK ; D8
+
+const_value SET $8d
+ const HS_SILPH_CO_2F_1 ; 8D
+ const HS_SILPH_CO_2F_2 ; 8E
+ const HS_SILPH_CO_2F_3 ; 8F
+ const HS_SILPH_CO_2F_4 ; 90 X
+ const HS_SILPH_CO_2F_5 ; 91
+ const HS_SILPH_CO_3F_1 ; 92
+ const HS_SILPH_CO_3F_2 ; 93
+ const HS_SILPH_CO_3F_ITEM ; 94 X
+ const HS_SILPH_CO_4F_1 ; 95 X
+ const HS_SILPH_CO_4F_2 ; 96 X
+ const HS_SILPH_CO_4F_3 ; 97
+ const HS_SILPH_CO_4F_ITEM_1 ; 98
+ const HS_SILPH_CO_4F_ITEM_2 ; 99
+ const HS_SILPH_CO_4F_ITEM_3 ; 9A
+ const HS_SILPH_CO_5F_1 ; 9B X
+ const HS_SILPH_CO_5F_2 ; 9C X
+ const HS_SILPH_CO_5F_3 ; 9D X
+ const HS_SILPH_CO_5F_4 ; 9E
+ const HS_SILPH_CO_5F_ITEM_1 ; 9F
+ const HS_SILPH_CO_5F_ITEM_2 ; A0
+ const HS_SILPH_CO_5F_ITEM_3 ; A1 X
+ const HS_SILPH_CO_6F_1 ; A2 X
+ const HS_SILPH_CO_6F_2 ; A3
+ const HS_SILPH_CO_6F_3 ; A4
+ const HS_SILPH_CO_6F_ITEM_1 ; A5
+ const HS_SILPH_CO_6F_ITEM_2 ; A6
+ const HS_SILPH_CO_7F_1 ; A7
+ const HS_SILPH_CO_7F_2 ; A8 X
+ const HS_SILPH_CO_7F_3 ; A9 X
+ const HS_SILPH_CO_7F_4 ; AA XXX sprite doesn't exist
+ const HS_SILPH_CO_7F_RIVAL ; AB
+ const HS_SILPH_CO_7F_ITEM_1 ; AC
+ const HS_SILPH_CO_7F_ITEM_2 ; AD
+ const HS_SILPH_CO_7F_8 ; AE
+ const HS_SILPH_CO_8F_1 ; AF
+ const HS_SILPH_CO_8F_2 ; B0
+ const HS_SILPH_CO_8F_3 ; B1
+ const HS_SILPH_CO_9F_1 ; B2
+ const HS_SILPH_CO_9F_2 ; B3 XXX never (de)activated?
+ const HS_SILPH_CO_9F_3 ; B4 X
+ const HS_SILPH_CO_10F_1 ; B5 X
+ const HS_SILPH_CO_10F_2 ; B6 X
+ const HS_SILPH_CO_10F_3 ; B7
+ const HS_SILPH_CO_10F_ITEM_1 ; B8
+ const HS_SILPH_CO_10F_ITEM_2 ; B9
+ const HS_SILPH_CO_10F_ITEM_3 ; BA XXX sprite doesn't exist
+ const HS_SILPH_CO_11F_1 ; BB X
+ const HS_SILPH_CO_11F_2 ; BC X
+ const HS_SILPH_CO_11F_3 ; BD X
+ const HS_MAP_F4_1 ; BE X
+ const HS_MANSION_2_ITEM ; BF X
+ const HS_MANSION_3_ITEM_1 ; C0 X
+ const HS_MANSION_3_ITEM_2 ; C1 X
+ const HS_MANSION_4_ITEM_1 ; C2 X
+ const HS_MANSION_4_ITEM_2 ; C3 X
+ const HS_MANSION_4_ITEM_3 ; C4 X
+ const HS_MANSION_4_ITEM_4 ; C5 X
+ const HS_MANSION_4_ITEM_5 ; C6 X
+ const HS_SAFARI_ZONE_EAST_ITEM_1 ; C7 X
+ const HS_SAFARI_ZONE_EAST_ITEM_2 ; C8 X
+ const HS_SAFARI_ZONE_EAST_ITEM_3 ; C9 X
+ const HS_SAFARI_ZONE_EAST_ITEM_4 ; CA X
+ const HS_SAFARI_ZONE_NORTH_ITEM_1 ; CB X
+ const HS_SAFARI_ZONE_NORTH_ITEM_2 ; CC X
+ const HS_SAFARI_ZONE_WEST_ITEM_1 ; CD X
+ const HS_SAFARI_ZONE_WEST_ITEM_2 ; CE X
+ const HS_SAFARI_ZONE_WEST_ITEM_3 ; CF X
+ const HS_SAFARI_ZONE_WEST_ITEM_4 ; D0 X
+ const HS_SAFARI_ZONE_CENTER_ITEM ; D1 X
+ const HS_UNKNOWN_DUNGEON_2_ITEM_1 ; D2 X
+ const HS_UNKNOWN_DUNGEON_2_ITEM_2 ; D3 X
+ const HS_UNKNOWN_DUNGEON_2_ITEM_3 ; D4 X
+ const HS_MEWTWO ; D5 X
+ const HS_UNKNOWN_DUNGEON_3_ITEM_1 ; D6
+ const HS_UNKNOWN_DUNGEON_3_ITEM_2 ; D7
+ const HS_VICTORY_ROAD_1_ITEM_1 ; D8
+ const HS_VICTORY_ROAD_1_ITEM_2 ; D9
+ const HS_CHAMPIONS_ROOM_OAK ; DA
const_value SET $df
- const HS_SEAFOAM_ISLANDS_1_BOULDER_1 ; D9
- const HS_SEAFOAM_ISLANDS_1_BOULDER_2 ; DA
- const HS_SEAFOAM_ISLANDS_2_BOULDER_1 ; DB
- const HS_SEAFOAM_ISLANDS_2_BOULDER_2 ; DC
- const HS_SEAFOAM_ISLANDS_3_BOULDER_1 ; DD
- const HS_SEAFOAM_ISLANDS_3_BOULDER_2 ; DE
- const HS_SEAFOAM_ISLANDS_4_BOULDER_1 ; DF
- const HS_SEAFOAM_ISLANDS_4_BOULDER_2 ; E0
- const HS_SEAFOAM_ISLANDS_4_BOULDER_3 ; E1
- const HS_SEAFOAM_ISLANDS_4_BOULDER_4 ; E2
- const HS_SEAFOAM_ISLANDS_5_BOULDER_1 ; E3 X
- const HS_SEAFOAM_ISLANDS_5_BOULDER_2 ; E4
- const HS_ARTICUNO ; E5
+ const HS_SEAFOAM_ISLANDS_1_BOULDER_1 ; DF
+ const HS_SEAFOAM_ISLANDS_1_BOULDER_2 ; E0
+ const HS_SEAFOAM_ISLANDS_2_BOULDER_1 ; E1
+ const HS_SEAFOAM_ISLANDS_2_BOULDER_2 ; E2
+ const HS_SEAFOAM_ISLANDS_3_BOULDER_1 ; E3
+ const HS_SEAFOAM_ISLANDS_3_BOULDER_2 ; E4
+ const HS_SEAFOAM_ISLANDS_4_BOULDER_1 ; E5
+ const HS_SEAFOAM_ISLANDS_4_BOULDER_2 ; E6
+ const HS_SEAFOAM_ISLANDS_4_BOULDER_3 ; E7
+ const HS_SEAFOAM_ISLANDS_4_BOULDER_4 ; E8
+ const HS_SEAFOAM_ISLANDS_5_BOULDER_1 ; E9
+ const HS_SEAFOAM_ISLANDS_5_BOULDER_2 ; EA
+ const HS_ARTICUNO ; EB
diff --git a/engine/bank3c.asm b/engine/bank3c.asm
index 8158d56f..01c3486b 100644
--- a/engine/bank3c.asm
+++ b/engine/bank3c.asm
@@ -95,12 +95,12 @@ PikachuCriesPointerTable: ; f008e (3c:408e)
pikacry_def PikachuCry2 ; 21:491a
pikacry_def PikachuCry3 ; 21:4fdc
pikacry_def PikachuCry4 ; 21:59ee
-
+
; bank 22
pikacry_def PikachuCry5 ; 22:4000
pikacry_def PikachuCry6 ; 22:5042
pikacry_def PikachuCry7 ; 22:6254
-
+
; bank 23
pikacry_def PikachuCry8 ; 23:4000
pikacry_def PikachuCry9 ; 23:50ca
@@ -110,11 +110,11 @@ PikachuCriesPointerTable: ; f008e (3c:408e)
pikacry_def PikachuCry11 ; 24:4000
pikacry_def PikachuCry12 ; 24:4722
pikacry_def PikachuCry13 ; 24:54a4
-
+
; bank 25
pikacry_def PikachuCry14 ; 25:4000
pikacry_def PikachuCry15 ; 25:589a
-
+
; banks 31-34, in no particular order
pikacry_def PikachuCry16 ; 31:4000
@@ -128,19 +128,19 @@ PikachuCriesPointerTable: ; f008e (3c:408e)
pikacry_def PikachuCry24 ; 33:5632
pikacry_def PikachuCry25 ; 34:573c
pikacry_def PikachuCry26 ; 33:725c
-
+
; bank 35
pikacry_def PikachuCry27 ; 35:4000
pikacry_def PikachuCry28 ; 35:4b5a
pikacry_def PikachuCry29 ; 35:5da4
pikacry_def PikachuCry30 ; 35:69ce
pikacry_def PikachuCry31 ; 35:6e80
-
+
; bank 36
pikacry_def PikachuCry32 ; 36:4000
pikacry_def PikachuCry33 ; 36:458a
pikacry_def PikachuCry34 ; 36:523c
-
+
; bank 37
pikacry_def PikachuCry35 ; 37:4000
pikacry_def PikachuCry36 ; 37:522a
@@ -203,7 +203,7 @@ ResetStatusAndHalveMoneyOnBlackout:: ; f0274 (3c:4274)
ld a, %11111111
ld [wJoyIgnore], a
predef_jump HealParty
-
+
Func_f02da:: ; f02da (3c:42da)
ld a, [wCurMap]
cp VERMILION_GYM ; ??? new thing about verm gym?
@@ -262,7 +262,7 @@ BeachHouse_Block:: ; f0914 (3c:4914)
Func_f0a54:: ; f0a54 (3c:4a54)
ret
-
+
Func_f0a55:: ; f0a55 (3c:4a55)
ld hl, Pointer_f0a76 ; 3c:4a76
.loop
@@ -359,130 +359,11 @@ BeachHouseBlockdata: ; f2388 (3c:6388)
INCBIN "maps/beach_house.blk"
INCLUDE "data/mapObjects/beach_house.asm"
-Func_f23d0: ; f23d0
- call SaveScreenTilesToBuffer2
- xor a
- ld [wUpdateSpritesEnabled], a
- ld hl, wd730
- set 6, [hl]
- callab Func_e8c5c
- ld hl, wd730
- res 6, [hl]
- call GBPalWhiteOutWithDelay3
- call ReloadTilesetTilePatterns
- call RestoreScreenTilesAndReloadTilePatterns
- call LoadScreenTilesFromBuffer2
- call Delay3
- call GBPalNormal
- ld hl, Text_f2412
- ld a, [hOaksAideResult]
- and a
- jr nz, .asm_f2406
- ld hl, Text_f240c
-.asm_f2406
- call PrintText
- jp TextScriptEnd
-
-Text_f240c:
- TX_FAR _BeachHousePrinterText5
- TX_SFX_ITEM2
- db "@"
-
-Text_f2412:
- TX_FAR _BeachHousePrinterText6
- TX_SFX_ITEM2
- db "@"
-
-Func_f2418:
- ld hl, BillsHouseText_f243b
- call PrintText
- call YesNoChoice
- ld a, [wCurrentMenuItem]
- and a
- jr nz, .asm_f2433
-.asm_f2427
- ld hl, BillsHouseText_f2440
- call PrintText
- ld a, $2
- ld [W_BILLSHOUSECURSCRIPT], a
- ret
-
-.asm_f2433
- ld hl, BillsHouseText_f2445
- call PrintText
- jr .asm_f2427
-
-BillsHouseText_f243b:
- TX_FAR _BillsHouseText_1e865
- db "@"
-
-BillsHouseText_f2440:
- TX_FAR _BillsHouseText_1e86a
- db "@"
-
-BillsHouseText_f2445:
- TX_FAR _BillsHouseText_1e86f
- db "@"
-
-Func_f244a:
- CheckEvent EVENT_GOT_SS_TICKET
- jr nz, .asm_f247e
- ld hl, BillsHouseText_f248c
- call PrintText
- lb bc, S_S_TICKET, 1
- call GiveItem
- jr nc, .asm_f2485
- ld hl, BillsHouseText_f2491
- call PrintText
- SetEvent EVENT_GOT_SS_TICKET
- ld a, HS_CERULEAN_GUARD_1
- ld [wMissableObjectIndex], a
- predef ShowObject
- ld a, HS_CERULEAN_GUARD_2
- ld [wMissableObjectIndex], a
- predef HideObject
-.asm_f247e
- ld hl, BillsHouseText_f249d
- call PrintText
- ret
-
-.asm_f2485
- ld hl, BillsHouseText_f2498
- call PrintText
- ret
-
-BillsHouseText_f248c:
- TX_FAR _BillThankYouText
- db "@"
-
-BillsHouseText_f2491:
- TX_FAR _SSTicketReceivedText
- TX_SFX_KEY_ITEM
- TX_BUTTON_SOUND
- db "@"
-
-BillsHouseText_f2498:
- TX_FAR _SSTicketNoRoomText
- db "@"
-
-BillsHouseText_f249d:
- TX_FAR _BillsHouseText_1e8cb
- db "@"
-
-Func_f24a2:
- ld hl, BillsHouseText_f24a9
- call PrintText
- ret
-
-BillsHouseText_f24a9:
- TX_FAR _BillsHouseText_1e8da
- db "@"
-
-Func_f24ae: ; f24ae
- dr $f24ae, $f2528
-
+INCLUDE "scripts/beach_house2.asm"
+INCLUDE "scripts/billshouse2.asm"
INCLUDE "scripts/viridianforest2.asm"
- dr $f2564, $f25f8
+INCLUDE "scripts/ssanne9_2.asm"
+INCLUDE "scripts/silphco11_2.asm"
INCLUDE "engine/overworld/hidden_objects.asm"
@@ -553,7 +434,7 @@ Func_f2d0c:
ld a, [hl]
ld [wSecondLockTrashCanIndex + 1], a
ret
-
+
GymTrashCans3a: ; f2d31 (3c:6d31)
; First byte: number of trashcan entries
; Following four byte pairs: indices for the second trash can.
diff --git a/engine/bank3f.asm b/engine/bank3f.asm
index 5cab9357..c8041a3a 100644
--- a/engine/bank3f.asm
+++ b/engine/bank3f.asm
@@ -4,26 +4,26 @@ INCLUDE "data/map_header_banks.asm"
Func_fc4dd:: ; fc4dd (3f:44dd)
; possibly to test if pika should be out?
- ld a, [wd430]
+ ld a, [wPikachuOverworldStateFlags]
bit 5, a
- jr nz, .asm_fc4f8 ; 3f:44f8
- ld a, [wd430]
+ jr nz, .hide ; 3f:44f8
+ ld a, [wPikachuOverworldStateFlags]
bit 7, a
- jr nz, .asm_fc4f8
+ jr nz, .hide
call IsStarterPikachuInOurParty
- jr nc, .asm_fc4f8
+ jr nc, .hide
ld a, [wWalkBikeSurfState]
and a
- jr nz, .asm_fc4f8
+ jr nz, .hide
scf
ret
-.asm_fc4f8
+.hide
and a
ret
Func_fc4fa:: ; fc4fa (3f:44fa)
- ld hl, wd430
+ ld hl, wPikachuOverworldStateFlags
bit 4, [hl]
res 4, [hl]
jr nz, .asm_fc515
@@ -316,14 +316,14 @@ Func_fc69a:: ; fc69a (3f:469a)
Func_fc6c5:: ; fc6c5 (3f:46c5)
push hl
- ld hl, wd430
+ ld hl, wPikachuOverworldStateFlags
set 2, [hl]
pop hl
ret
Func_fc6cd:: ; fc6cd (3f:46cd)
push hl
- ld hl, wd430
+ ld hl, wPikachuOverworldStateFlags
res 2, [hl]
pop hl
ret
@@ -944,7 +944,7 @@ Func_fca7e: ; fca7e (3f:4a7e)
ret
Func_fca99: ; fca99 (3f:4a99)
- ld a, [wd430]
+ ld a, [wPikachuOverworldStateFlags]
bit 3, a
jr nz, .asm_fcad1
ld hl, $10e
@@ -1238,10 +1238,10 @@ Func_fcc08:: ; fcc08 (3f:4c08)
ret
Func_fcc23: ; fcc23 (3f:4c28)
- ld a, [wd430]
+ ld a, [wPikachuOverworldStateFlags]
bit 5, a
jr nz, .asm_fcc40
- ld a, [wd430]
+ ld a, [wPikachuOverworldStateFlags]
bit 7, a
jr nz, .asm_fcc40
ld a, [wd472]
@@ -1288,7 +1288,7 @@ Func_fcc42: ; fcc42 (3f:4c42)
ret
Func_fcc64: ; fcc64 (3f:4c64)
- ld hl, wd430
+ ld hl, wPikachuOverworldStateFlags
bit 6, [hl]
jr z, .asm_fcc6e
res 6, [hl]
diff --git a/engine/items/items.asm b/engine/items/items.asm
index aa607911..5d76c37e 100755
--- a/engine/items/items.asm
+++ b/engine/items/items.asm
@@ -607,7 +607,7 @@ ItemUseSurfboard: ; d725 (3:5725)
call .makePlayerMoveForward
ld a,$3
ld [wd431], a
- ld hl,wd430
+ ld hl,wPikachuOverworldStateFlags
set 5,[hl]
ld hl,wd730
set 7,[hl]
diff --git a/engine/overworld/advance_player_sprite.asm b/engine/overworld/advance_player_sprite.asm
index e02fb129..758dd558 100644
--- a/engine/overworld/advance_player_sprite.asm
+++ b/engine/overworld/advance_player_sprite.asm
@@ -7,7 +7,7 @@ _AdvancePlayerSprite:: ; f010c (3c:410c)
dec [hl]
jr nz,.afterUpdateMapCoords
; if it's the end of the animation, update the player's map coordinates
- ld hl, wd430
+ ld hl, wPikachuOverworldStateFlags
res 5, [hl]
ld a,[wYCoord]
add b
diff --git a/home.asm b/home.asm
index fd2e1b26..5f924a40 100644
--- a/home.asm
+++ b/home.asm
@@ -970,120 +970,7 @@ InterlaceMergeSpriteBuffers:: ; 14c7 (0:14c7)
call CopyVideoData
jp PrepareRTCDataAndDisableSRAM
-Func_1510:: ; 1510 (0:1510)
- push hl
- ld hl, wd430
- set 7, [hl]
- ld hl, wSpriteStateData1 + $f2 ; pikachu data?
- ld [hl], $ff
- pop hl
- ret
-
-Func_151d:: ; 151d (0:151d)
- push hl
- ld hl, wd430
- res 7, [hl]
- pop hl
- ret
-
-Func_1525:: ; 1525 (0:1525)
- push hl
- ld hl, wd430
- res 3, [hl]
- pop hl
- ret
-
-Func_152d:: ; 152d (0:152d)
- push hl
- ld hl, wd430
- set 3, [hl]
- ld hl, wSpriteStateData1 + $f2 ; pikachu data?
- ld [hl], $ff
- pop hl
- ret
-
-Func_153a:: ; 153a (0:153a)
- push hl
- ld hl, wd430
- set 1, [hl]
- pop hl
- ret
-
-Func_1542:: ; 1542 (0:1542)
- push hl
- ld hl, wd430
- res 1, [hl]
- pop hl
- ret
-
-Func_154a:: ; 154a (0:154a)
- push hl
- ld hl, wd430
- bit 1, [hl]
- pop hl
- ret
-
-Func_1552:: ; 1552 (0:1552)
- ld a, [hl]
- dec a
- swap a
- ld [$ff93], a
- homecall Func_fc6d5 ; 3f:46d5
- ret
-
-Func_1568:: ; 1568 (0:1568)
- ld b, $0
- ld c, a
-.asm_156b
- inc b
- ld a, [hli]
- cp $ff
- jr z, .asm_1578
- cp c
- jr nz, .asm_156b
- dec b
- dec hl
- scf
- ret
-.asm_1578
- dec b
- dec hl
- and a
- ret
-
-Func_157c:: ; 157c (0:157c)
- push hl
- push bc
- ld a, [H_LOADEDROMBANK]
- push af
- ld a, [wd44a]
- call BankswitchCommon
- ld hl, wd44b
- ld c, [hl]
- inc hl
- ld b, [hl]
- ld a, [bc]
- inc bc
- ld [hl], b
- dec hl
- ld [hl], c
- ld c, a
- pop af
- call BankswitchCommon
- ld a, c
- pop bc
- pop hl
- ret
-
-Func_159b:: ; 159b (0:159b)
- ld a, [H_LOADEDROMBANK]
- ld b, a
- push af
- callbs Func_fd2a1
- pop af
- call BankswitchCommon
- ret
-
+INCLUDE "home/pikachu.asm"
;INCLUDE "data/collision.asm"
INCLUDE "home/lcdc.asm"
diff --git a/home/overworld.asm b/home/overworld.asm
index 1f84597d..3a9708d9 100644
--- a/home/overworld.asm
+++ b/home/overworld.asm
@@ -638,7 +638,7 @@ CheckMapConnections:: ; 05db (0:05db)
ld [wCurrentTileBlockMapViewPointer + 1],a
.loadNewMap ; 06ce (0:06ce)
; load the connected map that was entered
- ld hl,wd430
+ ld hl,wPikachuOverworldStateFlags
set 4,[hl]
ld a,$2
ld [wd431],a
@@ -1716,7 +1716,7 @@ CollisionCheckOnWater:: ; 0cca (0:0cca)
.stopSurfing ; based game freak
ld a,$3
ld [wd431],a
- ld hl,wd430
+ ld hl,wPikachuOverworldStateFlags
set 5,[hl]
xor a
ld [wWalkBikeSurfState],a
diff --git a/home/pikachu.asm b/home/pikachu.asm
new file mode 100755
index 00000000..5239873c
--- /dev/null
+++ b/home/pikachu.asm
@@ -0,0 +1,113 @@
+Func_1510:: ; 1510 (0:1510)
+ push hl
+ ld hl, wPikachuOverworldStateFlags
+ set 7, [hl]
+ ld hl, wSpriteStateData1 + $f2 ; pikachu data?
+ ld [hl], $ff
+ pop hl
+ ret
+
+Func_151d:: ; 151d (0:151d)
+ push hl
+ ld hl, wPikachuOverworldStateFlags
+ res 7, [hl]
+ pop hl
+ ret
+
+Func_1525:: ; 1525 (0:1525)
+ push hl
+ ld hl, wPikachuOverworldStateFlags
+ res 3, [hl]
+ pop hl
+ ret
+
+Func_152d:: ; 152d (0:152d)
+ push hl
+ ld hl, wPikachuOverworldStateFlags
+ set 3, [hl]
+ ld hl, wSpriteStateData1 + $f2 ; pikachu data?
+ ld [hl], $ff
+ pop hl
+ ret
+
+Func_153a:: ; 153a (0:153a)
+ push hl
+ ld hl, wPikachuOverworldStateFlags
+ set 1, [hl]
+ pop hl
+ ret
+
+Func_1542:: ; 1542 (0:1542)
+ push hl
+ ld hl, wPikachuOverworldStateFlags
+ res 1, [hl]
+ pop hl
+ ret
+
+Func_154a:: ; 154a (0:154a)
+ push hl
+ ld hl, wPikachuOverworldStateFlags
+ bit 1, [hl]
+ pop hl
+ ret
+
+Func_1552:: ; 1552 (0:1552)
+ ld a, [hl]
+ dec a
+ swap a
+ ld [hTilePlayerStandingOn], a
+ homecall Func_fc6d5 ; 3f:46d5
+ ret
+
+Func_1568:: ; 1568 (0:1568)
+ ld b, $0
+ ld c, a
+.asm_156b
+ inc b
+ ld a, [hli]
+ cp $ff
+ jr z, .asm_1578
+ cp c
+ jr nz, .asm_156b
+ dec b
+ dec hl
+ scf
+ ret
+.asm_1578
+ dec b
+ dec hl
+ and a
+ ret
+
+Func_157c:: ; 157c (0:157c)
+ push hl
+ push bc
+ ld a, [H_LOADEDROMBANK]
+ push af
+ ld a, [wd44a]
+ call BankswitchCommon
+ ld hl, wd44b
+ ld c, [hl]
+ inc hl
+ ld b, [hl]
+ ld a, [bc]
+ inc bc
+ ld [hl], b
+ dec hl
+ ld [hl], c
+ ld c, a
+ pop af
+ call BankswitchCommon
+ ld a, c
+ pop bc
+ pop hl
+ ret
+
+Func_159b:: ; 159b (0:159b)
+ ld a, [H_LOADEDROMBANK]
+ ld b, a
+ push af
+ callbs Func_fd2a1
+ pop af
+ call BankswitchCommon
+ ret
diff --git a/scripts/beach_house2.asm b/scripts/beach_house2.asm
new file mode 100755
index 00000000..918334ab
--- /dev/null
+++ b/scripts/beach_house2.asm
@@ -0,0 +1,33 @@
+Func_f23d0: ; f23d0
+ call SaveScreenTilesToBuffer2
+ xor a
+ ld [wUpdateSpritesEnabled], a
+ ld hl, wd730
+ set 6, [hl]
+ callab Func_e8c5c
+ ld hl, wd730
+ res 6, [hl]
+ call GBPalWhiteOutWithDelay3
+ call ReloadTilesetTilePatterns
+ call RestoreScreenTilesAndReloadTilePatterns
+ call LoadScreenTilesFromBuffer2
+ call Delay3
+ call GBPalNormal
+ ld hl, Text_f2412
+ ld a, [hOaksAideResult]
+ and a
+ jr nz, .asm_f2406
+ ld hl, Text_f240c
+.asm_f2406
+ call PrintText
+ jp TextScriptEnd
+
+Text_f240c:
+ TX_FAR _BeachHousePrinterText5
+ TX_SFX_ITEM2
+ db "@"
+
+Text_f2412:
+ TX_FAR _BeachHousePrinterText6
+ TX_SFX_ITEM2
+ db "@"
diff --git a/scripts/billshouse2.asm b/scripts/billshouse2.asm
new file mode 100755
index 00000000..48205029
--- /dev/null
+++ b/scripts/billshouse2.asm
@@ -0,0 +1,158 @@
+Func_f2418:
+ ld hl, BillsHouseText_f243b
+ call PrintText
+ call YesNoChoice
+ ld a, [wCurrentMenuItem]
+ and a
+ jr nz, .asm_f2433
+.asm_f2427
+ ld hl, BillsHouseText_f2440
+ call PrintText
+ ld a, $2
+ ld [W_BILLSHOUSECURSCRIPT], a
+ ret
+
+.asm_f2433
+ ld hl, BillsHouseText_f2445
+ call PrintText
+ jr .asm_f2427
+
+BillsHouseText_f243b:
+ TX_FAR _BillsHouseText_1e865
+ db "@"
+
+BillsHouseText_f2440:
+ TX_FAR _BillsHouseText_1e86a
+ db "@"
+
+BillsHouseText_f2445:
+ TX_FAR _BillsHouseText_1e86f
+ db "@"
+
+Func_f244a:
+ CheckEvent EVENT_GOT_SS_TICKET
+ jr nz, .asm_f247e
+ ld hl, BillsHouseText_f248c
+ call PrintText
+ lb bc, S_S_TICKET, 1
+ call GiveItem
+ jr nc, .asm_f2485
+ ld hl, BillsHouseText_f2491
+ call PrintText
+ SetEvent EVENT_GOT_SS_TICKET
+ ld a, HS_CERULEAN_GUARD_1
+ ld [wMissableObjectIndex], a
+ predef ShowObject
+ ld a, HS_CERULEAN_GUARD_2
+ ld [wMissableObjectIndex], a
+ predef HideObject
+.asm_f247e
+ ld hl, BillsHouseText_f249d
+ call PrintText
+ ret
+
+.asm_f2485
+ ld hl, BillsHouseText_f2498
+ call PrintText
+ ret
+
+BillsHouseText_f248c:
+ TX_FAR _BillThankYouText
+ db "@"
+
+BillsHouseText_f2491:
+ TX_FAR _SSTicketReceivedText
+ TX_SFX_KEY_ITEM
+ TX_BUTTON_SOUND
+ db "@"
+
+BillsHouseText_f2498:
+ TX_FAR _SSTicketNoRoomText
+ db "@"
+
+BillsHouseText_f249d:
+ TX_FAR _BillsHouseText_1e8cb
+ db "@"
+
+Func_f24a2:
+ ld hl, BillsHouseText_f24a9
+ call PrintText
+ ret
+
+BillsHouseText_f24a9:
+ TX_FAR _BillsHouseText_1e8da
+ db "@"
+
+Func_f24ae: ; f24ae
+ ld a, [wCurMap]
+ cp BILLS_HOUSE
+ jr nz, .asm_f24d2
+ call Func_154a
+ jr z, .asm_f24d2
+ ld a, [W_BILLSHOUSECURSCRIPT]
+ cp $5
+ ld e, $1b
+ ret z
+ cp $0
+ ld e, $17
+ ret z
+ CheckEventHL EVENT_MET_BILL_2
+ ld e, $20
+ ret z
+ ld e, $1f
+ ret
+
+.asm_f24d2
+ ld e, $ff
+ ret
+
+Func_f24d5:
+ ld a, $ff
+ ld [wJoyIgnore], a
+ xor a
+ ld [wPlayerMovingDirection], a
+ call UpdateSprites
+ call UpdateSprites
+ ld hl, Data_f2505
+ call Func_159b
+ ld a, $f ; pikachu
+ ld [wEmotionBubbleSpriteIndex], a
+ ld a, $1
+ ld [wWhichEmotionBubble], a
+ predef EmotionBubble
+ call Func_153a
+ callab InitializePikachuTextID
+ ret
+
+Data_f2505:
+ db $00
+ db $20
+ db $20
+ db $20
+ db $1e
+ db $3f
+
+Func_f250b:
+ ld hl, Data_f251c
+ ld b, SPRITE_FACING_UP
+ call Func_f0a82
+ ld hl, Data_f2521
+ ld b, SPRITE_FACING_RIGHT
+ call Func_f0a82
+ ret
+
+Data_f251c:
+ db $00
+ db $1f
+ db $1d
+ db $38
+ db $3f
+
+Data_f2521:
+ db $00
+ db $1e
+ db $1f
+ db $1f
+ db $1d
+ db $38
+ db $3f
diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm
index 63cec822..43464d77 100755
--- a/scripts/oakslab.asm
+++ b/scripts/oakslab.asm
@@ -798,7 +798,7 @@ OaksLabText_1c9a7:
OaksLabScript_1c9ac:
ld a, $1
- ld [wSavedPlayerScreenY], a
+ ld [wEmotionBubbleSpriteIndex], a
xor a
ld [wWhichEmotionBubble], a
predef EmotionBubble
diff --git a/scripts/silphco11_2.asm b/scripts/silphco11_2.asm
new file mode 100755
index 00000000..e7b59757
--- /dev/null
+++ b/scripts/silphco11_2.asm
@@ -0,0 +1,76 @@
+Func_f25a0:
+ ld hl, MissableObjects_f25ce
+.asm_f25a3
+ ld a, [hli]
+ cp $ff
+ jr z, .asm_f25b4
+ push hl
+ ld [wMissableObjectIndex], a
+ predef HideObject
+ pop hl
+ jr .asm_f25a3
+
+.asm_f25b4
+ ld hl, MissableObjects_f25c7
+.asm_f25b7
+ ld a, [hli]
+ cp $ff
+ ret z
+ push hl
+ ld [wMissableObjectIndex], a
+ predef ShowObject
+ pop hl
+ jr .asm_f25b7
+
+MissableObjects_f25c7:
+ db HS_SAFFRON_CITY_8
+ db HS_SAFFRON_CITY_9
+ db HS_SAFFRON_CITY_A
+ db HS_SAFFRON_CITY_B
+ db HS_SAFFRON_CITY_C
+ db HS_SAFFRON_CITY_D
+ db $FF
+
+MissableObjects_f25ce
+ db HS_SAFFRON_CITY_1
+ db HS_SAFFRON_CITY_2
+ db HS_SAFFRON_CITY_3
+ db HS_SAFFRON_CITY_4
+ db HS_SAFFRON_CITY_5
+ db HS_SAFFRON_CITY_6
+ db HS_SAFFRON_CITY_7
+ db HS_SAFFRON_CITY_E
+ db HS_SAFFRON_CITY_F
+ db HS_SILPH_CO_2F_2
+ db HS_SILPH_CO_2F_3
+ db HS_SILPH_CO_2F_4
+ db HS_SILPH_CO_2F_5
+ db HS_SILPH_CO_3F_1
+ db HS_SILPH_CO_3F_2
+ db HS_SILPH_CO_4F_1
+ db HS_SILPH_CO_4F_2
+ db HS_SILPH_CO_4F_3
+ db HS_SILPH_CO_5F_1
+ db HS_SILPH_CO_5F_2
+ db HS_SILPH_CO_5F_3
+ db HS_SILPH_CO_5F_4
+ db HS_SILPH_CO_6F_1
+ db HS_SILPH_CO_6F_2
+ db HS_SILPH_CO_6F_3
+ db HS_SILPH_CO_7F_1
+ db HS_SILPH_CO_7F_2
+ db HS_SILPH_CO_7F_3
+ db HS_SILPH_CO_7F_4
+ db HS_SILPH_CO_8F_1
+ db HS_SILPH_CO_8F_2
+ db HS_SILPH_CO_8F_3
+ db HS_SILPH_CO_9F_1
+ db HS_SILPH_CO_9F_2
+ db HS_SILPH_CO_9F_3
+ db HS_SILPH_CO_10F_1
+ db HS_SILPH_CO_10F_2
+ db HS_SILPH_CO_11F_1
+ db HS_SILPH_CO_11F_2
+ db HS_SILPH_CO_11F_3
+ db HS_MAP_F4_1
+ db $ff \ No newline at end of file
diff --git a/scripts/ssanne9_2.asm b/scripts/ssanne9_2.asm
new file mode 100755
index 00000000..f856221c
--- /dev/null
+++ b/scripts/ssanne9_2.asm
@@ -0,0 +1,35 @@
+Func_f2570:
+ ld hl, SSAnne9Text_f2577
+ call PrintText
+ ret
+
+SSAnne9Text_f2577:
+ TX_FAR _SSAnne9Text_61c1f
+ db "@"
+
+Func_f257c:
+ ld hl, SSAnne9Text_f2583
+ call PrintText
+ ret
+
+SSAnne9Text_f2583:
+ TX_FAR _SSAnne9Text_61c2e
+ db "@"
+
+Func_f2588:
+ ld hl, SSAnne9Text_f258f
+ call PrintText
+ ret
+
+SSAnne9Text_f258f:
+ TX_FAR _SSAnne9Text_61c3d
+ db "@"
+
+Func_f2594:
+ ld hl, SSAnne9Text_f259b
+ call PrintText
+ ret
+
+SSAnne9Text_f259b:
+ TX_FAR _SSAnne9Text_61c4c
+ db "@"
diff --git a/scripts/viridianforest2.asm b/scripts/viridianforest2.asm
index 41c81218..489db39c 100755
--- a/scripts/viridianforest2.asm
+++ b/scripts/viridianforest2.asm
@@ -43,3 +43,11 @@ Text_f255f:
TX_FAR _ViridianForestText13
db "@"
+Func_f2564:
+ ld hl, ViridianForestText_f256b
+ call PrintText
+ ret
+
+ViridianForestText_f256b:
+ TX_FAR _ViridianForestText14
+ db "@"
diff --git a/wram.asm b/wram.asm
index 2c9b3d4e..64a394ed 100755
--- a/wram.asm
+++ b/wram.asm
@@ -2523,7 +2523,7 @@ wDestinationWarpID:: ; d42f
; if $ff, the player's coordinates are not updated when entering the map
ds 1
-wd430:: ds 1 ; d42f
+wPikachuOverworldStateFlags:: ds 1 ; d42f
wd431:: ds 1 ; d430
wd432:: ds 1 ; d431
wd433:: ds 1 ; d432