summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asm/contest.s20
-rw-r--r--asm/contest_ai.s4
-rw-r--r--asm/contest_effect.s4
-rw-r--r--asm/contest_link_80C2020.s20
-rw-r--r--asm/matuda_debug_menu.s24
-rw-r--r--asm/script_pokemon_util_80C4BF0.s4
-rw-r--r--asm/tv.s4
-rw-r--r--constants/variables.inc10
-rw-r--r--data/event_scripts.s2
-rw-r--r--data/scripts/contest_hall.inc4
-rw-r--r--data/scripts/maps/LilycoveCity_ContestLobby.inc6
-rw-r--r--src/scrcmd.c4
-rw-r--r--sym_ewram.txt2
13 files changed, 55 insertions, 53 deletions
diff --git a/asm/contest.s b/asm/contest.s
index 044a43aad..c13ed9672 100644
--- a/asm/contest.s
+++ b/asm/contest.s
@@ -6187,7 +6187,7 @@ _080AE48E:
movs r0, 0x4
b _080AE50A
_080AE49E:
- ldr r0, _080AE4B0 @ =gSpecialVar_0x8011
+ ldr r0, _080AE4B0 @ =gScriptContestCategory
ldrh r0, [r0]
cmp r0, 0x4
bhi _080AE4F2
@@ -6197,7 +6197,7 @@ _080AE49E:
ldr r0, [r0]
mov pc, r0
.align 2, 0
-_080AE4B0: .4byte gSpecialVar_0x8011
+_080AE4B0: .4byte gScriptContestCategory
_080AE4B4: .4byte _080AE4B8
.align 2, 0
_080AE4B8:
@@ -13239,7 +13239,7 @@ contest_get_move_excitement: @ 80B19FC
ldrb r1, [r0, 0x1]
lsls r1, 29
lsrs r1, 29
- ldr r0, _080B1A28 @ =gSpecialVar_0x8011
+ ldr r0, _080B1A28 @ =gScriptContestCategory
ldrh r2, [r0]
lsls r0, r2, 2
adds r0, r2
@@ -13251,7 +13251,7 @@ contest_get_move_excitement: @ 80B19FC
.align 2, 0
_080B1A20: .4byte gContestExcitementTable
_080B1A24: .4byte gContestMoves
-_080B1A28: .4byte gSpecialVar_0x8011
+_080B1A28: .4byte gScriptContestCategory
thumb_func_end contest_get_move_excitement
thumb_func_start sub_80B1A2C
@@ -15401,7 +15401,7 @@ _080B2AB6:
_080B2AC8: .4byte gUnknown_02038690
_080B2ACC: .4byte gUnknown_02038695
_080B2AD0:
- ldr r0, _080B2AE4 @ =gSpecialVar_0x8011
+ ldr r0, _080B2AE4 @ =gScriptContestCategory
ldrh r0, [r0]
cmp r0, 0x4
bhi _080B2B16
@@ -15411,7 +15411,7 @@ _080B2AD0:
ldr r0, [r0]
mov pc, r0
.align 2, 0
-_080B2AE4: .4byte gSpecialVar_0x8011
+_080B2AE4: .4byte gScriptContestCategory
_080B2AE8: .4byte _080B2AEC
.align 2, 0
_080B2AEC:
@@ -15492,7 +15492,7 @@ _080B2B16:
mov r1, r9
cmp r1, 0xFF
beq _080B2BB8
- ldr r0, _080B2BB0 @ =gSpecialVar_0x8011
+ ldr r0, _080B2BB0 @ =gScriptContestCategory
ldrh r1, [r0]
ldr r0, _080B2BB4 @ =0x00002e06
add r0, r8
@@ -15505,7 +15505,7 @@ _080B2BA0: .4byte gUnknown_02038570
_080B2BA4: .4byte 0x00002e04
_080B2BA8: .4byte 0x00002e07
_080B2BAC: .4byte 0x00002e12
-_080B2BB0: .4byte gSpecialVar_0x8011
+_080B2BB0: .4byte gScriptContestCategory
_080B2BB4: .4byte 0x00002e06
_080B2BB8:
ldr r0, _080B2BC0 @ =0x00002e06
@@ -15659,7 +15659,7 @@ _080B2CCA:
.align 2, 0
_080B2CD0: .4byte gSaveBlock1 + 0x2DFC
_080B2CD4:
- ldr r0, _080B2CE8 @ =gSpecialVar_0x8011
+ ldr r0, _080B2CE8 @ =gScriptContestCategory
ldrh r0, [r0]
cmp r0, 0x4
bhi _080B2D14
@@ -15669,7 +15669,7 @@ _080B2CD4:
ldr r0, [r0]
mov pc, r0
.align 2, 0
-_080B2CE8: .4byte gSpecialVar_0x8011
+_080B2CE8: .4byte gScriptContestCategory
_080B2CEC: .4byte _080B2CF0
.align 2, 0
_080B2CF0:
diff --git a/asm/contest_ai.s b/asm/contest_ai.s
index 5b25685d4..7aef5885c 100644
--- a/asm/contest_ai.s
+++ b/asm/contest_ai.s
@@ -1316,7 +1316,7 @@ _0812923C:
thumb_func_start contest_ai_get_contest_type
contest_ai_get_contest_type: @ 8129244
ldr r1, _08129258 @ =0x020192e4
- ldr r0, _0812925C @ =gSpecialVar_0x8011
+ ldr r0, _0812925C @ =gScriptContestCategory
ldrh r0, [r0]
strh r0, [r1, 0x18]
ldr r1, _08129260 @ =gUnknown_02039238
@@ -1326,7 +1326,7 @@ contest_ai_get_contest_type: @ 8129244
bx lr
.align 2, 0
_08129258: .4byte 0x020192e4
-_0812925C: .4byte gSpecialVar_0x8011
+_0812925C: .4byte gScriptContestCategory
_08129260: .4byte gUnknown_02039238
thumb_func_end contest_ai_get_contest_type
diff --git a/asm/contest_effect.s b/asm/contest_effect.s
index 26c810341..4ae5c7e41 100644
--- a/asm/contest_effect.s
+++ b/asm/contest_effect.s
@@ -2413,7 +2413,7 @@ ContestEffect_44: @ 80B8EBC
adds r0, r3
ldrb r0, [r0, 0x1]
lsls r0, 29
- ldr r1, _080B8EF8 @ =gSpecialVar_0x8011
+ ldr r1, _080B8EF8 @ =gScriptContestCategory
lsrs r0, 29
ldrh r1, [r1]
cmp r0, r1
@@ -2428,7 +2428,7 @@ _080B8EEA:
.align 2, 0
_080B8EF0: .4byte gContestMoves
_080B8EF4: .4byte 0x020192d0
-_080B8EF8: .4byte gSpecialVar_0x8011
+_080B8EF8: .4byte gScriptContestCategory
thumb_func_end ContestEffect_44
thumb_func_start ContestEffect_45
diff --git a/asm/contest_link_80C2020.s b/asm/contest_link_80C2020.s
index f308993d9..4403c9bad 100644
--- a/asm/contest_link_80C2020.s
+++ b/asm/contest_link_80C2020.s
@@ -3041,7 +3041,7 @@ _080C3884:
bl sub_809D104
_080C389E:
adds r4, 0xD
- ldr r0, _080C38C8 @ =gSpecialVar_0x8011
+ ldr r0, _080C38C8 @ =gScriptContestCategory
ldrh r0, [r0]
cmp r0, 0
bne _080C38CC
@@ -3059,7 +3059,7 @@ _080C389E:
.align 2, 0
_080C38C0: .4byte 0x0600e000
_080C38C4: .4byte gUnknown_08E964B8
-_080C38C8: .4byte gSpecialVar_0x8011
+_080C38C8: .4byte gScriptContestCategory
_080C38CC:
cmp r0, 0x1
bne _080C38EC
@@ -4546,7 +4546,7 @@ sub_80C43F4: @ 80C43F4
adds r5, r0, 0
cmp r5, 0
beq _080C4422
- ldr r4, _080C4434 @ =gSpecialVar_0x8011
+ ldr r4, _080C4434 @ =gScriptContestCategory
ldrb r0, [r4]
ldr r1, _080C4438 @ =gSpecialVar_0x8010
ldrb r1, [r1]
@@ -4562,7 +4562,7 @@ _080C4422:
.align 2, 0
_080C442C: .4byte gUnknown_02038694
_080C4430: .4byte gPlayerParty
-_080C4434: .4byte gSpecialVar_0x8011
+_080C4434: .4byte gScriptContestCategory
_080C4438: .4byte gSpecialVar_0x8010
_080C443C: .4byte gScriptResult
thumb_func_end sub_80C43F4
@@ -4577,7 +4577,7 @@ sub_80C4440: @ 80C4440
muls r1, r0
ldr r0, _080C4468 @ =gPlayerParty
adds r2, r1, r0
- ldr r0, _080C446C @ =gSpecialVar_0x8011
+ ldr r0, _080C446C @ =gScriptContestCategory
ldrh r0, [r0]
cmp r0, 0x4
bhi _080C44B2
@@ -4589,7 +4589,7 @@ sub_80C4440: @ 80C4440
.align 2, 0
_080C4464: .4byte gUnknown_02038694
_080C4468: .4byte gPlayerParty
-_080C446C: .4byte gSpecialVar_0x8011
+_080C446C: .4byte gScriptContestCategory
_080C4470: .4byte _080C4474
.align 2, 0
_080C4474:
@@ -4646,7 +4646,7 @@ sub_80C44C0: @ 80C44C0
beq _080C44D4
b _080C465E
_080C44D4:
- ldr r0, _080C44F0 @ =gSpecialVar_0x8011
+ ldr r0, _080C44F0 @ =gScriptContestCategory
ldrh r0, [r0]
cmp r0, 0x4
bls _080C44DE
@@ -4660,7 +4660,7 @@ _080C44DE:
.align 2, 0
_080C44E8: .4byte gUnknown_02038690
_080C44EC: .4byte gUnknown_02038695
-_080C44F0: .4byte gSpecialVar_0x8011
+_080C44F0: .4byte gScriptContestCategory
_080C44F4: .4byte _080C44F8
.align 2, 0
_080C44F8:
@@ -5433,7 +5433,7 @@ _080C4AB8:
bl sub_80C4B34
ldr r1, _080C4AFC @ =gUnknown_0203869B
strb r0, [r1]
- ldr r0, _080C4B00 @ =gSpecialVar_0x8011
+ ldr r0, _080C4B00 @ =gScriptContestCategory
ldrb r0, [r0]
bl sub_80AE82C
ldr r1, _080C4B04 @ =sub_80C8EBC
@@ -5449,7 +5449,7 @@ _080C4AB8:
.align 2, 0
_080C4AF8: .4byte gTasks + 0x8
_080C4AFC: .4byte gUnknown_0203869B
-_080C4B00: .4byte gSpecialVar_0x8011
+_080C4B00: .4byte gScriptContestCategory
_080C4B04: .4byte sub_80C8EBC
_080C4B08: .4byte sub_80C4B0C
thumb_func_end sub_80C4A44
diff --git a/asm/matuda_debug_menu.s b/asm/matuda_debug_menu.s
index 7fc379f13..8b9c60374 100644
--- a/asm/matuda_debug_menu.s
+++ b/asm/matuda_debug_menu.s
@@ -322,7 +322,7 @@ _080A9D6E:
bl sub_80C4B34
ldr r1, _080A9DAC @ =gUnknown_0203869B
strb r0, [r1]
- ldr r0, _080A9DB0 @ =gSpecialVar_0x8011
+ ldr r0, _080A9DB0 @ =gScriptContestCategory
ldrb r0, [r0]
bl sub_80AE82C
movs r0, 0
@@ -338,7 +338,7 @@ _080A9D6E:
.align 2, 0
_080A9DA8: .4byte gTasks
_080A9DAC: .4byte gUnknown_0203869B
-_080A9DB0: .4byte gSpecialVar_0x8011
+_080A9DB0: .4byte gScriptContestCategory
_080A9DB4: .4byte sub_80C8EBC
_080A9DB8: .4byte sub_80A9DBC
thumb_func_end sub_80A9D58
@@ -828,7 +828,7 @@ _080AA17A:
lsrs r5, r0, 24
cmp r5, 0x5
bls _080AA17A
- ldr r1, _080AA258 @ =gSpecialVar_0x8011
+ ldr r1, _080AA258 @ =gScriptContestCategory
ldr r4, _080AA25C @ =gSpecialVar_0x8010
movs r0, 0
strh r0, [r4]
@@ -899,7 +899,7 @@ _080AA248: .4byte gUnknown_02038570
_080AA24C: .4byte gUnknown_083C9276
_080AA250: .4byte gUnknown_083C9364
_080AA254: .4byte gMenuWindow
-_080AA258: .4byte gSpecialVar_0x8011
+_080AA258: .4byte gScriptContestCategory
_080AA25C: .4byte gSpecialVar_0x8010
_080AA260: .4byte gUnknown_083C9337
_080AA264: .4byte gUnknown_083C933B
@@ -2174,7 +2174,7 @@ _080AAC1A:
bl sub_80AA5BC
asrs r4, 24
strh r4, [r5, 0x34]
- ldr r0, _080AAC54 @ =gSpecialVar_0x8011
+ ldr r0, _080AAC54 @ =gScriptContestCategory
strh r4, [r0]
lsls r4, 24
lsrs r4, 24
@@ -2194,7 +2194,7 @@ _080AAC1A:
pop {r0}
bx r0
.align 2, 0
-_080AAC54: .4byte gSpecialVar_0x8011
+_080AAC54: .4byte gScriptContestCategory
_080AAC58: .4byte gSpecialVar_0x8010
thumb_func_end sub_80AABF0
@@ -2231,7 +2231,7 @@ _080AAC86:
_080AAC92:
ldrb r0, [r4]
bl sub_80AA5E8
- ldr r0, _080AACC0 @ =gSpecialVar_0x8011
+ ldr r0, _080AACC0 @ =gScriptContestCategory
ldrb r0, [r0]
ldrb r1, [r4]
bl sub_80AE398
@@ -2248,7 +2248,7 @@ _080AAC92:
bx r0
.align 2, 0
_080AACBC: .4byte gSpecialVar_0x8010
-_080AACC0: .4byte gSpecialVar_0x8011
+_080AACC0: .4byte gScriptContestCategory
thumb_func_end sub_80AAC5C
thumb_func_start sub_80AACC4
@@ -2328,7 +2328,7 @@ sub_80AAD44: @ 80AAD44
_080AAD56:
lsls r0, r4, 24
lsrs r0, 24
- ldr r1, _080AAD7C @ =gSpecialVar_0x8011
+ ldr r1, _080AAD7C @ =gScriptContestCategory
ldrb r1, [r1]
bl sub_80AE770
strh r0, [r5]
@@ -2344,7 +2344,7 @@ _080AAD72:
bx r0
.align 2, 0
_080AAD78: .4byte gUnknown_02038670
-_080AAD7C: .4byte gSpecialVar_0x8011
+_080AAD7C: .4byte gScriptContestCategory
_080AAD80: .4byte sub_805469C
thumb_func_end sub_80AAD44
@@ -2707,7 +2707,7 @@ _080AB044:
subs r2, 0x1
cmp r2, r5
bgt _080AB044
- ldr r1, _080AB080 @ =gSpecialVar_0x8011
+ ldr r1, _080AB080 @ =gScriptContestCategory
movs r0, 0
strh r0, [r1]
adds r4, r1, 0
@@ -2729,7 +2729,7 @@ _080AB058:
.align 2, 0
_080AB078: .4byte gUnknown_02038695
_080AB07C: .4byte gUnknown_02038690
-_080AB080: .4byte gSpecialVar_0x8011
+_080AB080: .4byte gScriptContestCategory
thumb_func_end sub_80AB02C
thumb_func_start unref_sub_80AB084
diff --git a/asm/script_pokemon_util_80C4BF0.s b/asm/script_pokemon_util_80C4BF0.s
index a0fa7f7af..1af5232a2 100644
--- a/asm/script_pokemon_util_80C4BF0.s
+++ b/asm/script_pokemon_util_80C4BF0.s
@@ -88,7 +88,7 @@ sub_80C4C64: @ 80C4C64
thumb_func_start sub_80C4C78
sub_80C4C78: @ 80C4C78
push {lr}
- ldr r0, _080C4C8C @ =gSpecialVar_0x8011
+ ldr r0, _080C4C8C @ =gScriptContestCategory
ldrh r0, [r0]
cmp r0, 0x4
bhi _080C4CB8
@@ -98,7 +98,7 @@ sub_80C4C78: @ 80C4C78
ldr r0, [r0]
mov pc, r0
.align 2, 0
-_080C4C8C: .4byte gSpecialVar_0x8011
+_080C4C8C: .4byte gScriptContestCategory
_080C4C90: .4byte _080C4C94
.align 2, 0
_080C4C94:
diff --git a/asm/tv.s b/asm/tv.s
index d02da2cd8..7550e59e3 100644
--- a/asm/tv.s
+++ b/asm/tv.s
@@ -1446,7 +1446,7 @@ sub_80BE284: @ 80BE284
negs r0, r0
ands r0, r2
orrs r0, r1
- ldr r1, _080BE310 @ =gSpecialVar_0x8011
+ ldr r1, _080BE310 @ =gScriptContestCategory
ldrb r2, [r1]
movs r1, 0x7
ands r1, r2
@@ -1488,7 +1488,7 @@ _080BE2FE:
_080BE304: .4byte gSaveBlock1 + 0x2A98
_080BE308: .4byte 0xfffffca0
_080BE30C: .4byte gUnknown_03005D38
-_080BE310: .4byte gSpecialVar_0x8011
+_080BE310: .4byte gScriptContestCategory
_080BE314: .4byte gSpecialVar_0x8010
_080BE318: .4byte gUnknown_02038694
_080BE31C: .4byte gPlayerParty
diff --git a/constants/variables.inc b/constants/variables.inc
index a9be34463..ee81c54a1 100644
--- a/constants/variables.inc
+++ b/constants/variables.inc
@@ -1,4 +1,6 @@
- .equiv FACING, 0x800C
- .equiv RESULT, 0x800D
- .equiv ITEM_ID, 0x800E
- .equiv LAST_TALKED, 0x800F
+ .equiv FACING, 0x800C
+ .equiv RESULT, 0x800D
+ .equiv ITEM_ID, 0x800E
+ .equiv LAST_TALKED, 0x800F
+
+ .equiv CONTEST_CATEGORY, 0x8011 \ No newline at end of file
diff --git a/data/event_scripts.s b/data/event_scripts.s
index 382d7c880..d70145f6a 100644
--- a/data/event_scripts.s
+++ b/data/event_scripts.s
@@ -27,7 +27,7 @@ gSpecialVars::
.4byte gScriptItemId
.4byte gScriptLastTalked
.4byte gSpecialVar_0x8010
- .4byte gSpecialVar_0x8011
+ .4byte gScriptContestCategory
.include "data/specials.inc"
diff --git a/data/scripts/contest_hall.inc b/data/scripts/contest_hall.inc
index 14e684cb9..9e1c8a9d9 100644
--- a/data/scripts/contest_hall.inc
+++ b/data/scripts/contest_hall.inc
@@ -142,7 +142,7 @@ FallarborTown_ContestLobby_EventScript_1A5097:: @ 81A5097
switch RESULT
case 5, FallarborTown_ContestLobby_EventScript_1A503E
case 127, FallarborTown_ContestLobby_EventScript_1A503E
- copyvar 0x8011, RESULT
+ copyvar CONTEST_CATEGORY, RESULT
jump FallarborTown_ContestLobby_EventScript_1A5048
end
@@ -231,7 +231,7 @@ LinkContestRoom1_EventScript_1A51E4:: @ 81A51E4
return
LinkContestRoom1_EventScript_1A51EA:: @ 81A51EA
- switch 0x8011
+ switch CONTEST_CATEGORY
case 0, LinkContestRoom1_EventScript_1A5227
case 1, LinkContestRoom1_EventScript_1A522D
case 2, LinkContestRoom1_EventScript_1A5233
diff --git a/data/scripts/maps/LilycoveCity_ContestLobby.inc b/data/scripts/maps/LilycoveCity_ContestLobby.inc
index ed12473b9..576e13d84 100644
--- a/data/scripts/maps/LilycoveCity_ContestLobby.inc
+++ b/data/scripts/maps/LilycoveCity_ContestLobby.inc
@@ -117,7 +117,7 @@ LilycoveCity_ContestLobby_EventScript_1589E6:: @ 81589E6
return
LilycoveCity_ContestLobby_EventScript_1589EA:: @ 81589EA
- switch 0x8011
+ switch CONTEST_CATEGORY
case 0, LilycoveCity_ContestLobby_EventScript_158A27
case 1, LilycoveCity_ContestLobby_EventScript_158A2B
case 2, LilycoveCity_ContestLobby_EventScript_158A2F
@@ -410,7 +410,7 @@ LilycoveCity_ContestLobby_EventScript_158CEA:: @ 8158CEA
switch RESULT
case 5, LilycoveCity_ContestLobby_EventScript_158C35
case 127, LilycoveCity_ContestLobby_EventScript_158C35
- copyvar 0x8011, RESULT
+ copyvar CONTEST_CATEGORY, RESULT
jump LilycoveCity_ContestLobby_EventScript_158C42
end
@@ -593,7 +593,7 @@ LilycoveCity_ContestLobby_EventScript_158EE8:: @ 8158EE8
end
LilycoveCity_ContestLobby_EventScript_158F08:: @ 8158F08
- switch 0x8011
+ switch CONTEST_CATEGORY
case 0, LilycoveCity_ContestLobby_EventScript_158F45
case 1, LilycoveCity_ContestLobby_EventScript_158F52
case 2, LilycoveCity_ContestLobby_EventScript_158F5F
diff --git a/src/scrcmd.c b/src/scrcmd.c
index f3eb96ba0..2a3e4f32e 100644
--- a/src/scrcmd.c
+++ b/src/scrcmd.c
@@ -161,7 +161,7 @@ extern u16 gScriptResult;
extern u32 gUnknown_0202FF84[];
-extern u16 gSpecialVar_0x8011;
+extern u16 gScriptContestCategory;
extern SpecialFunc gSpecials[];
extern u8 *gStdScripts[];
@@ -1792,7 +1792,7 @@ bool8 ScrCmd_showcontestresults(struct ScriptContext *ctx)
bool8 ScrCmd_contestlinktransfer(struct ScriptContext *ctx)
{
- sub_80C4980(gSpecialVar_0x8011);
+ sub_80C4980(gScriptContestCategory);
ScriptContext1_Stop();
return TRUE;
}
diff --git a/sym_ewram.txt b/sym_ewram.txt
index 93a4ca670..b709fc02a 100644
--- a/sym_ewram.txt
+++ b/sym_ewram.txt
@@ -827,7 +827,7 @@ gUnknown_0203869A: @ 203869A
gUnknown_0203869B: @ 203869B
.space 0x1
-gSpecialVar_0x8011: @ 203869C
+gScriptContestCategory: @ 203869C
.space 0x2
gSpecialVar_0x8010: @ 203869E