Skip to content

Commit 62ffa83

Browse files
committed
Identify wCurrentMapScriptFlags bits (pret#467)
+ adapt own code
1 parent 7717837 commit 62ffa83

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

scripts/CinnabarVolcano1FB1F.asm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
; marcelnote - new location
22
CinnabarVolcano1FB1F_Script:
33
ld hl, wCurrentMapScriptFlags
4-
bit 5, [hl] ; this is set upon entering the map
5-
res 5, [hl]
4+
bit BIT_CUR_MAP_LOADED_1, [hl] ; this is set upon entering the map
5+
res BIT_CUR_MAP_LOADED_1, [hl]
66
call nz, CinnabarVolcano1FB1FCheckBoulderEventScript
77
call EnableAutoTextBoxDrawing
88
; new

scripts/CinnabarVolcano2F.asm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
; boulder events are reset in CinnabarIsland map
44
CinnabarVolcano2F_Script:
55
ld hl, wCurrentMapScriptFlags
6-
bit 6, [hl] ; this is set upon entering the map
7-
res 6, [hl]
6+
bit BIT_CUR_MAP_LOADED_2, [hl] ; this is set upon entering the map
7+
res BIT_CUR_MAP_LOADED_2, [hl]
88
call nz, CinnabarVolcano2FCheckBoulder1EventScript ; check first boulder upon entering
99
ld hl, wCurrentMapScriptFlags
10-
bit 5, [hl] ; this is set upon entering the map
11-
res 5, [hl]
10+
bit BIT_CUR_MAP_LOADED_1, [hl] ; this is set upon entering the map
11+
res BIT_CUR_MAP_LOADED_1, [hl]
1212
call nz, CinnabarVolcano2FCheckBouldersEventScript
1313
call EnableAutoTextBoxDrawing
1414
ld hl, CinnabarVolcano2FTrainerHeaders

scripts/MtMoonSquare.asm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
MtMoonSquare_Script:
33
call EnableAutoTextBoxDrawing
44
ld hl, wCurrentMapScriptFlags
5-
bit 5, [hl]
6-
res 5, [hl]
5+
bit BIT_CUR_MAP_LOADED_1, [hl]
6+
res BIT_CUR_MAP_LOADED_1, [hl]
77
ret z
88
call Random
99
cp 25 ; prob_spawning = (n+1)/256

scripts/SilphFactory2F.asm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ SilphFactory2FResetScripts:
1818

1919
SilphFactory2FGateCallbackScript: ; marcelnote - adapted from SilphCo9FGateCallbackScript
2020
ld hl, wCurrentMapScriptFlags
21-
bit 5, [hl]
22-
res 5, [hl]
21+
bit BIT_CUR_MAP_LOADED_1, [hl]
22+
res BIT_CUR_MAP_LOADED_1, [hl]
2323
ret z
2424
ld hl, .GateCoordinates
2525
call SilphFactory2F_SetCardKeyDoorYScript

0 commit comments

Comments
 (0)