summaryrefslogtreecommitdiff
path: root/engine/overworld
diff options
context:
space:
mode:
Diffstat (limited to 'engine/overworld')
-rwxr-xr-xengine/overworld/healing_machine.asm2
-rw-r--r--engine/overworld/missable_objects.asm8
-rw-r--r--engine/overworld/specific_script_flags.asm25
-rw-r--r--engine/overworld/sprite_collisions.asm2
-rw-r--r--engine/overworld/unused_load_missable_object_data.asm40
5 files changed, 69 insertions, 8 deletions
diff --git a/engine/overworld/healing_machine.asm b/engine/overworld/healing_machine.asm
index e5fba7e1..84891353 100755
--- a/engine/overworld/healing_machine.asm
+++ b/engine/overworld/healing_machine.asm
@@ -34,7 +34,7 @@ AnimateHealingMachine:
dec b
jr nz, .partyLoop
ld a, [wAudioROMBank]
- cp BANK(AudioEngine3)
+ cp BANK("Audio Engine 3")
ld [wAudioSavedROMBank], a
jr nz, .next
call StopAllMusic
diff --git a/engine/overworld/missable_objects.asm b/engine/overworld/missable_objects.asm
index 358a9b9f..bcaa731b 100644
--- a/engine/overworld/missable_objects.asm
+++ b/engine/overworld/missable_objects.asm
@@ -15,17 +15,13 @@ MarkTownVisitedAndLoadMissableObjects::
add hl, bc
ld a, [hli] ; load missable objects pointer in hl
ld h, [hl]
- ; fall through
-
-; LoadMissableObjects:
-; seems to not exist in yellow (predef replaced with something near TryPushingBoulder)
ld l, a
push hl
ld a, l
- sub MissableObjects & $ff ; calculate difference between out pointer and the base pointer
+ sub LOW(MissableObjects) ; calculate difference between out pointer and the base pointer
ld l, a
ld a, h
- sbc MissableObjects / $100
+ sbc HIGH(MissableObjects)
ld h, a
ld a, h
ldh [hDividend], a
diff --git a/engine/overworld/specific_script_flags.asm b/engine/overworld/specific_script_flags.asm
new file mode 100644
index 00000000..d6f333ac
--- /dev/null
+++ b/engine/overworld/specific_script_flags.asm
@@ -0,0 +1,25 @@
+SetMapSpecificScriptFlagsOnMapReload::
+ ld a, [wCurMap]
+ cp VERMILION_GYM
+ jr z, .vermilion_gym
+ ld c, a
+ ld hl, Bit5Maps
+.search_loop
+ ld a, [hli]
+ cp c
+ jr z, .in_list
+ cp a, $ff
+ jr nz, .search_loop
+ ret
+
+.vermilion_gym
+ ld hl, wCurrentMapScriptFlags
+ set 6, [hl]
+ ret
+
+.in_list
+ ld hl, wCurrentMapScriptFlags
+ set 5, [hl]
+ ret
+
+INCLUDE "data/maps/bit_5_maps.asm"
diff --git a/engine/overworld/sprite_collisions.asm b/engine/overworld/sprite_collisions.asm
index db81977b..b29dc108 100644
--- a/engine/overworld/sprite_collisions.asm
+++ b/engine/overworld/sprite_collisions.asm
@@ -1,5 +1,5 @@
_UpdateSprites::
- ld h, wSpriteStateData1 / $100
+ ld h, HIGH(wSpriteStateData1)
inc h
ld a, SPRITESTATEDATA2_IMAGEBASEOFFSET
.spriteLoop
diff --git a/engine/overworld/unused_load_missable_object_data.asm b/engine/overworld/unused_load_missable_object_data.asm
new file mode 100644
index 00000000..ce0c00d1
--- /dev/null
+++ b/engine/overworld/unused_load_missable_object_data.asm
@@ -0,0 +1,40 @@
+Func_f0a54: ; unreferenced
+ ret
+
+LoadMissableObjectData::
+; farcalled by an unreferenced function
+ ld hl, .MissableObjectsMaps
+.loop
+ ld a, [hli]
+ cp -1
+ ret z
+ ld b, a
+ ld a, [wCurMap]
+ cp b
+ jr z, .found
+ inc hl
+ inc hl
+ inc hl
+ jr .loop
+
+.found
+ ld a, [hli]
+ ld c, a
+ ld b, 0
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld de, wMissableObjectList
+ call CopyData
+ ret
+
+.MissableObjectsMaps:
+ dbbw BLUES_HOUSE, .BluesHouseEnd - .BluesHouse, .BluesHouse
+ db -1 ; end
+
+.BluesHouse:
+ db 1, HS_DAISY_SITTING_COPY
+ db 2, HS_DAISY_WALKING_COPY
+ db 3, HS_TOWN_MAP_COPY
+ db -1 ; end
+.BluesHouseEnd: