summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconstants/event_constants.asm32
-rw-r--r--macros.asm2
-rwxr-xr-xscripts/celadongamecorner.asm2
-rwxr-xr-xscripts/celadongym.asm8
-rwxr-xr-xscripts/ceruleangym.asm10
-rwxr-xr-xscripts/cinnabargym.asm10
-rwxr-xr-xscripts/fuchsiagym.asm10
-rwxr-xr-xscripts/pewtercity.asm2
-rwxr-xr-xscripts/pewtergym.asm8
-rwxr-xr-xscripts/saffrongym.asm10
-rwxr-xr-xscripts/vermiliongym.asm8
-rwxr-xr-xscripts/viridiancity.asm2
-rwxr-xr-xscripts/viridiangym.asm10
13 files changed, 57 insertions, 57 deletions
diff --git a/constants/event_constants.asm b/constants/event_constants.asm
index 64241ae6..072a90b8 100755
--- a/constants/event_constants.asm
+++ b/constants/event_constants.asm
@@ -80,8 +80,8 @@ const_value = 0
const EVENT_04D
const EVENT_04E
const EVENT_04F
- const EVENT_050
- const EVENT_051
+ const EVENT_GOT_TM27
+ const EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI
const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_0
const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_1
const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_2
@@ -118,8 +118,8 @@ const_value = 0
const EVENT_073
const EVENT_074
const EVENT_075
- const EVENT_076
- const EVENT_077
+ const EVENT_GOT_TM34
+ const EVENT_BEAT_BROCK
const EVENT_078
const EVENT_079
const EVENT_07A
@@ -190,8 +190,8 @@ const_value = 0
const EVENT_BEAT_CERULEAN_GYM_TRAINER_1
const EVENT_0BC
const EVENT_0BD
- const EVENT_0BE
- const EVENT_0BF
+ const EVENT_GOT_TM11
+ const EVENT_BEAT_MISTY
const EVENT_0C0
const EVENT_0C1
const EVENT_0C2
@@ -358,8 +358,8 @@ const_value = 0
const EVENT_BEAT_VERMILION_GYM_TRAINER_1
const EVENT_BEAT_VERMILION_GYM_TRAINER_2
const EVENT_165
- const EVENT_166
- const EVENT_167
+ const EVENT_GOT_TM24
+ const EVENT_BEAT_LT_SURGE
const EVENT_168
const EVENT_169
const EVENT_16A
@@ -424,8 +424,8 @@ const_value = 0
const EVENT_1A5
const EVENT_1A6
const EVENT_1A7
- const EVENT_1A8
- const EVENT_1A9
+ const EVENT_GOT_TM21
+ const EVENT_BEAT_ERIKA
const EVENT_BEAT_CELADON_GYM_TRAINER_0
const EVENT_BEAT_CELADON_GYM_TRAINER_2
const EVENT_BEAT_CELADON_GYM_TRAINER_3
@@ -600,8 +600,8 @@ const_value = 0
const EVENT_255
const EVENT_256
const EVENT_257
- const EVENT_258
- const EVENT_259
+ const EVENT_GOT_TM06
+ const EVENT_BEAT_KOGA
const EVENT_BEAT_FUCHSIA_GYM_TRAINER_0
const EVENT_BEAT_FUCHSIA_GYM_TRAINER_2
const EVENT_BEAT_FUCHSIA_GYM_TRAINER_3
@@ -664,8 +664,8 @@ const_value = 0
const EVENT_295
const EVENT_296
const EVENT_297
- const EVENT_298
- const EVENT_299
+ const EVENT_GOT_TM38
+ const EVENT_BEAT_BLAINE
const EVENT_29A
const EVENT_29B
const EVENT_29C
@@ -864,8 +864,8 @@ const_value = 0
const EVENT_35D
const EVENT_35E
const EVENT_35F
- const EVENT_360
- const EVENT_361
+ const EVENT_GOT_TM46
+ const EVENT_BEAT_SABRINA
const EVENT_BEAT_SAFFRON_GYM_TRAINER_0
const EVENT_BEAT_SAFFRON_GYM_TRAINER_1
const EVENT_BEAT_SAFFRON_GYM_TRAINER_2
diff --git a/macros.asm b/macros.asm
index 11f0f37b..62fd4b53 100644
--- a/macros.asm
+++ b/macros.asm
@@ -428,7 +428,7 @@ event_fill_count = 1 + event_fill_count
ELSE
IF ((\2) % 8) != 7
ld a, [wEventFlags + event_end_byte]
- and ~((1 << (((\2) % 8) + 1)) - 1) $ ff
+ and ~((1 << (((\2) % 8) + 1)) - 1) & $ff
ld [wEventFlags + event_end_byte], a
ENDC
ENDC
diff --git a/scripts/celadongamecorner.asm b/scripts/celadongamecorner.asm
index 51ffef89..ef4b4760 100755
--- a/scripts/celadongamecorner.asm
+++ b/scripts/celadongamecorner.asm
@@ -283,7 +283,7 @@ CeladonGameCornerText6: ; 48db1 (12:4db1)
CeladonGameCornerText7: ; 48db6 (12:4db6)
TX_ASM
- CheckEvent EVENT_1A9
+ CheckEvent EVENT_BEAT_ERIKA
ld hl, CeladonGameCornerText_48dca
jr z, .asm_48dc4
ld hl, CeladonGameCornerText_48dcf
diff --git a/scripts/celadongym.asm b/scripts/celadongym.asm
index 1e2959dd..9d761a31 100755
--- a/scripts/celadongym.asm
+++ b/scripts/celadongym.asm
@@ -46,14 +46,14 @@ CeladonGymText_48963: ; 48963 (12:4963)
ld a, $9
ld [hSpriteIndexOrTextID], a
call DisplayTextID
- SetEvent EVENT_1A9
+ SetEvent EVENT_BEAT_ERIKA
ld bc, (TM_21 << 8) | 1
call GiveItem
jr nc, .BagFull
ld a, $a
ld [hSpriteIndexOrTextID], a
call DisplayTextID
- SetEvent EVENT_1A8
+ SetEvent EVENT_GOT_TM21
jr .asm_4898c
.BagFull
ld a, $b
@@ -151,9 +151,9 @@ CeladonGymTrainerHeader7: ; 48a04 (12:4a04)
CeladonGymText1: ; 48a11 (12:4a11)
TX_ASM
- CheckEvent EVENT_1A9
+ CheckEvent EVENT_BEAT_ERIKA
jr z, .asm_48a2d
- CheckEventReuseA EVENT_1A8
+ CheckEventReuseA EVENT_GOT_TM21
jr nz, .asm_48a25
call z, CeladonGymText_48963
call DisableWaitingAfterTextDisplay
diff --git a/scripts/ceruleangym.asm b/scripts/ceruleangym.asm
index e4c614d6..c8ce12b9 100755
--- a/scripts/ceruleangym.asm
+++ b/scripts/ceruleangym.asm
@@ -46,14 +46,14 @@ CeruleanGymScript_5c70d: ; 5c70d (17:470d)
ld a, $5
ld [hSpriteIndexOrTextID], a
call DisplayTextID
- SetEvent EVENT_0BF
+ SetEvent EVENT_BEAT_MISTY
ld bc, (TM_11 << 8) | 1
call GiveItem
jr nc, .BagFull
ld a, $6
ld [hSpriteIndexOrTextID], a
call DisplayTextID
- SetEvent EVENT_0BE
+ SetEvent EVENT_GOT_TM11
jr .asm_5c736
.BagFull
ld a, $7
@@ -102,9 +102,9 @@ CeruleanGymTrainerHeader1: ; 5c764 (17:4764)
CeruleanGymText1: ; 5c771 (17:4771)
TX_ASM
- CheckEvent EVENT_0BF
+ CheckEvent EVENT_BEAT_MISTY
jr z, .asm_5c78d
- CheckEventReuseA EVENT_0BE
+ CheckEventReuseA EVENT_GOT_TM11
jr nz, .asm_5c785
call z, CeruleanGymScript_5c70d
call DisableWaitingAfterTextDisplay
@@ -198,7 +198,7 @@ CeruleanGymAfterBattleText2: ; 5c80c (17:480c)
CeruleanGymText4: ; 5c811 (17:4811)
TX_ASM
- CheckEvent EVENT_0BF
+ CheckEvent EVENT_BEAT_MISTY
jr nz, .asm_5c821
ld hl, CeruleanGymText_5c82a
call PrintText
diff --git a/scripts/cinnabargym.asm b/scripts/cinnabargym.asm
index fe7f1c13..f5c07317 100755
--- a/scripts/cinnabargym.asm
+++ b/scripts/cinnabargym.asm
@@ -143,14 +143,14 @@ CinnabarGymScript3_75857: ; 75857 (1d:5857)
ld a, $a
ld [hSpriteIndexOrTextID], a
call DisplayTextID
- SetEvent EVENT_299
+ SetEvent EVENT_BEAT_BLAINE
ld bc, (TM_38 << 8) | 1
call GiveItem
jr nc, .BagFull
ld a, $b
ld [hSpriteIndexOrTextID], a
call DisplayTextID
- SetEvent EVENT_298
+ SetEvent EVENT_GOT_TM38
jr .asm_75880
.BagFull
ld a, $c
@@ -206,9 +206,9 @@ CinnabarGymScript_758b7: ; 758b7 (1d:58b7)
CinnabarGymText1: ; 758df (1d:58df)
TX_ASM
- CheckEvent EVENT_299
+ CheckEvent EVENT_BEAT_BLAINE
jr z, .asm_d9332
- CheckEventReuseA EVENT_298
+ CheckEventReuseA EVENT_GOT_TM38
jr nz, .asm_3012f
call z, CinnabarGymScript3_75857
call DisableWaitingAfterTextDisplay
@@ -453,7 +453,7 @@ CinnabarGymText_75aa7: ; 75aa7 (1d:5aa7)
CinnabarGymText9: ; 75aac (1d:5aac)
TX_ASM
- CheckEvent EVENT_299
+ CheckEvent EVENT_BEAT_BLAINE
jr nz, .asm_627d9
ld hl, CinnabarGymText_75ac2
jr .asm_0b11d
diff --git a/scripts/fuchsiagym.asm b/scripts/fuchsiagym.asm
index f13af011..0855d506 100755
--- a/scripts/fuchsiagym.asm
+++ b/scripts/fuchsiagym.asm
@@ -46,14 +46,14 @@ FuchsiaGymScript3_75497: ; 75497 (1d:5497)
ld a, $9
ld [hSpriteIndexOrTextID], a
call DisplayTextID
- SetEvent EVENT_259
+ SetEvent EVENT_BEAT_KOGA
ld bc, (TM_06 << 8) | 1
call GiveItem
jr nc, .BagFull
ld a, $a
ld [hSpriteIndexOrTextID], a
call DisplayTextID
- SetEvent EVENT_258
+ SetEvent EVENT_GOT_TM06
jr .asm_754c0
.BagFull
ld a, $b
@@ -142,9 +142,9 @@ FuchsiaGymTrainerHeader6: ; 75527 (1d:5527)
FuchsiaGymText1: ; 75534 (1d:5534)
TX_ASM
- CheckEvent EVENT_259
+ CheckEvent EVENT_BEAT_KOGA
jr z, .asm_181b6
- CheckEventReuseA EVENT_258
+ CheckEventReuseA EVENT_GOT_TM06
jr nz, .asm_adc3b
call z, FuchsiaGymScript3_75497
call DisableWaitingAfterTextDisplay
@@ -313,7 +313,7 @@ FuchsiaGymAfterBattleText6: ; 75635 (1d:5635)
FuchsiaGymText8: ; 7563a (1d:563a)
TX_ASM
- CheckEvent EVENT_259
+ CheckEvent EVENT_BEAT_KOGA
ld hl, FuchsiaGymText_75653
jr nz, .asm_50671
ld hl, FuchsiaGymText_7564e
diff --git a/scripts/pewtercity.asm b/scripts/pewtercity.asm
index 2fce86df..8e72ee4b 100755
--- a/scripts/pewtercity.asm
+++ b/scripts/pewtercity.asm
@@ -21,7 +21,7 @@ PewterCityScript0: ; 19251 (6:5251)
ret
PewterCityScript_1925e: ; 1925e (6:525e)
- CheckEvent EVENT_077
+ CheckEvent EVENT_BEAT_BROCK
ret nz
ld hl, CoordsData_19277
call ArePlayerCoordsInArray
diff --git a/scripts/pewtergym.asm b/scripts/pewtergym.asm
index e2798b24..03a1c218 100755
--- a/scripts/pewtergym.asm
+++ b/scripts/pewtergym.asm
@@ -46,14 +46,14 @@ PewterGymScript_5c3df: ; 5c3df (17:43df)
ld a, $4
ld [hSpriteIndexOrTextID], a
call DisplayTextID
- SetEvent EVENT_077
+ SetEvent EVENT_BEAT_BROCK
ld bc, (TM_34 << 8) | 1
call GiveItem
jr nc, .BagFull
ld a, $5
ld [hSpriteIndexOrTextID], a
call DisplayTextID
- SetEvent EVENT_076
+ SetEvent EVENT_GOT_TM34
jr .asm_5c408
.BagFull
ld a, $6
@@ -101,9 +101,9 @@ PewterGymTrainerHeader0: ; 5c441 (17:4441)
PewterGymText1: ; 5c44e (17:444e)
TX_ASM
- CheckEvent EVENT_077
+ CheckEvent EVENT_BEAT_BROCK
jr z, .asm_5c46a
- CheckEventReuseA EVENT_076
+ CheckEventReuseA EVENT_GOT_TM34
jr nz, .asm_5c462
call z, PewterGymScript_5c3df
call DisableWaitingAfterTextDisplay
diff --git a/scripts/saffrongym.asm b/scripts/saffrongym.asm
index 4e2115c3..e712689f 100755
--- a/scripts/saffrongym.asm
+++ b/scripts/saffrongym.asm
@@ -46,14 +46,14 @@ SaffronGymText_5d068: ; 5d068 (17:5068)
ld a, $a
ld [hSpriteIndexOrTextID], a
call DisplayTextID
- SetEvent EVENT_361
+ SetEvent EVENT_BEAT_SABRINA
ld bc, (TM_46 << 8) | 1
call GiveItem
jr nc, .BagFull
ld a, $b
ld [hSpriteIndexOrTextID], a
call DisplayTextID
- SetEvent EVENT_360
+ SetEvent EVENT_GOT_TM46
jr .asm_5d091
.BagFull
ld a, $c
@@ -152,9 +152,9 @@ SaffronGymTrainerHeader6: ; 5d10b (17:510b)
SaffronGymText1: ; 5d118 (17:5118)
TX_ASM
- CheckEvent EVENT_361
+ CheckEvent EVENT_BEAT_SABRINA
jr z, .asm_5d134
- CheckEventReuseA EVENT_360
+ CheckEventReuseA EVENT_GOT_TM46
jr nz, .asm_5d12c
call z, SaffronGymText_5d068
call DisableWaitingAfterTextDisplay
@@ -255,7 +255,7 @@ SaffronGymText8: ; 5d1c3 (17:51c3)
SaffronGymText9: ; 5d1cd (17:51cd)
TX_ASM
- CheckEvent EVENT_361
+ CheckEvent EVENT_BEAT_SABRINA
jr nz, .asm_5d1dd
ld hl, SaffronGymText_5d1e6
call PrintText
diff --git a/scripts/vermiliongym.asm b/scripts/vermiliongym.asm
index 31f736cd..8c400b5f 100755
--- a/scripts/vermiliongym.asm
+++ b/scripts/vermiliongym.asm
@@ -65,14 +65,14 @@ VermilionGymScript_5caaa: ; 5caaa (17:4aaa)
ld a, $6
ld [hSpriteIndexOrTextID], a
call DisplayTextID
- SetEvent EVENT_167
+ SetEvent EVENT_BEAT_LT_SURGE
ld bc, (TM_24 << 8) | 1
call GiveItem
jr nc, .BagFull
ld a, $7
ld [hSpriteIndexOrTextID], a
call DisplayTextID
- SetEvent EVENT_166
+ SetEvent EVENT_GOT_TM24
jr .asm_5cad3
.BagFull
ld a, $8
@@ -131,9 +131,9 @@ VermilionGymTrainerHeader2: ; 5cb10 (17:4b10)
VermilionGymText1: ; 5cb1d (17:4b1d)
TX_ASM
- CheckEvent EVENT_167
+ CheckEvent EVENT_BEAT_LT_SURGE
jr z, .asm_5cb39
- CheckEventReuseA EVENT_166
+ CheckEventReuseA EVENT_GOT_TM24
jr nz, .asm_5cb31
call z, VermilionGymScript_5caaa
call DisableWaitingAfterTextDisplay
diff --git a/scripts/viridiancity.asm b/scripts/viridiancity.asm
index f7884c9b..2d55cc44 100755
--- a/scripts/viridiancity.asm
+++ b/scripts/viridiancity.asm
@@ -151,7 +151,7 @@ ViridianCityText2: ; 19107 (6:5107)
cp %01111111
ld hl, ViridianCityText_19127
jr z, .asm_ae9fe
- CheckEvent EVENT_051
+ CheckEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI
jr nz, .asm_ae9fe
ld hl, ViridianCityText_19122
.asm_ae9fe
diff --git a/scripts/viridiangym.asm b/scripts/viridiangym.asm
index 9047b80a..1dd736cf 100755
--- a/scripts/viridiangym.asm
+++ b/scripts/viridiangym.asm
@@ -140,14 +140,14 @@ ViridianGymScript3_74995: ; 74995 (1d:4995)
ld a, $c
ld [hSpriteIndexOrTextID], a
call DisplayTextID
- SetEvent EVENT_051
+ SetEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI
ld bc, (TM_27 << 8) | 1
call GiveItem
jr nc, .BagFull
ld a, $d
ld [hSpriteIndexOrTextID], a
call DisplayTextID
- SetEvent EVENT_050
+ SetEvent EVENT_GOT_TM27
jr .asm_749be
.BagFull
ld a, $e
@@ -261,9 +261,9 @@ ViridianGymTrainerHeader7: ; 74a5c (1d:4a5c)
ViridianGymText1: ; 74a69 (1d:4a69)
TX_ASM
- CheckEvent EVENT_051
+ CheckEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI
jr z, .asm_6de66
- CheckEventReuseA EVENT_050
+ CheckEventReuseA EVENT_GOT_TM27
jr nz, .asm_9fc95
call z, ViridianGymScript3_74995
call DisableWaitingAfterTextDisplay
@@ -475,7 +475,7 @@ ViridianGymAfterBattleText8: ; 74bb6 (1d:4bb6)
ViridianGymText10: ; 74bbb (1d:4bbb)
TX_ASM
- CheckEvent EVENT_051
+ CheckEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI
jr nz, .asm_1abd1
ld hl, ViridianGymText_74bd4
call PrintText