summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGriffinR <griffin.richards@comcast.net>2019-08-14 23:38:42 -0400
committerGriffinR <griffin.richards@comcast.net>2019-08-14 23:38:42 -0400
commitecf2097abb1481109578b7b8260fd40606f27abe (patch)
treed7b607d12674491bdbe323cd830ad77af7622db6 /src
parentca8048c300f7df74e46ade85b1a7f3adbf34522a (diff)
initial event_scripts documentation
Diffstat (limited to 'src')
-rw-r--r--src/decoration.c2
-rw-r--r--src/field_specials.c2
-rw-r--r--src/match_call.c12
-rw-r--r--src/secret_base.c4
-rw-r--r--src/union_room.c18
5 files changed, 19 insertions, 19 deletions
diff --git a/src/decoration.c b/src/decoration.c
index 974859c88..a200768a4 100644
--- a/src/decoration.c
+++ b/src/decoration.c
@@ -633,7 +633,7 @@ static void DecorationMenuAction_Cancel(u8 taskId)
RemoveDecorationWindow(0);
if (!gDecorationContext.isPlayerRoom)
{
- ScriptContext1_SetupScript(gUnknown_0823B4E8);
+ ScriptContext1_SetupScript(EventScript_SecretBasePCCancel);
DestroyTask(taskId);
}
else
diff --git a/src/field_specials.c b/src/field_specials.c
index efe77bd70..be39f80d0 100644
--- a/src/field_specials.c
+++ b/src/field_specials.c
@@ -2009,7 +2009,7 @@ bool8 warp0_in_pokecenter(void)
return FALSE;
}
-bool32 sub_8139ED0(void)
+bool32 PlayerAtTrainerHillEntrance(void)
{
if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(TRAINER_HILL_ENTRANCE) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(TRAINER_HILL_ENTRANCE))
{
diff --git a/src/match_call.c b/src/match_call.c
index b02af9977..172831792 100644
--- a/src/match_call.c
+++ b/src/match_call.c
@@ -965,9 +965,9 @@ static const struct MatchCallText *const sMatchCallGeneralTopics[] =
sMatchCallBattlePyramidTexts,
};
-extern const u8 gUnknown_082A5C9C[];
-extern const u8 gUnknown_082A5D2C[];
-extern const u8 gUnknown_082A633D[];
+extern const u8 gBirchDexRatingText_AreYouCurious[];
+extern const u8 gBirchDexRatingText_SoYouveSeenAndCaught[];
+extern const u8 gBirchDexRatingText_OnANationwideBasis[];
void InitMatchCallCounters(void)
{
@@ -1979,10 +1979,10 @@ void sub_8197080(u8 *destStr)
ConvertIntToDecimalStringN(gStringVar1, numSeen, 0, 3);
ConvertIntToDecimalStringN(gStringVar2, numCaught, 0, 3);
dexRatingLevel = GetPokedexRatingLevel(numCaught);
- str = StringCopy(buffer, gUnknown_082A5C9C);
+ str = StringCopy(buffer, gBirchDexRatingText_AreYouCurious);
str[0] = CHAR_PROMPT_CLEAR;
str++;
- str = StringCopy(str, gUnknown_082A5D2C);
+ str = StringCopy(str, gBirchDexRatingText_SoYouveSeenAndCaught);
str[0] = CHAR_PROMPT_CLEAR;
str++;
StringCopy(str, sBirchDexRatingTexts[dexRatingLevel]);
@@ -1996,7 +1996,7 @@ void sub_8197080(u8 *destStr)
numCaught = GetNationalPokedexCount(FLAG_GET_CAUGHT);
ConvertIntToDecimalStringN(gStringVar1, numSeen, 0, 3);
ConvertIntToDecimalStringN(gStringVar2, numCaught, 0, 3);
- StringExpandPlaceholders(str, gUnknown_082A633D);
+ StringExpandPlaceholders(str, gBirchDexRatingText_OnANationwideBasis);
}
Free(buffer);
diff --git a/src/secret_base.c b/src/secret_base.c
index 12cb8cd61..0b5f1cae5 100644
--- a/src/secret_base.c
+++ b/src/secret_base.c
@@ -1077,9 +1077,9 @@ static void ReturnToMainRegistryMenu(u8 taskId)
static void GoToSecretBasePCMainMenu(u8 taskId)
{
if (VarGet(VAR_CURRENT_SECRET_BASE) == 0)
- ScriptContext1_SetupScript(gUnknown_0823B4E8);
+ ScriptContext1_SetupScript(EventScript_SecretBasePCCancel);
else
- ScriptContext1_SetupScript(gUnknown_0823B5E9);
+ ScriptContext1_SetupScript(EventScript_SecretBasePCStart);
DestroyTask(taskId);
}
diff --git a/src/union_room.c b/src/union_room.c
index 01288c8cc..8c88c19f8 100644
--- a/src/union_room.c
+++ b/src/union_room.c
@@ -50,7 +50,7 @@
#include "constants/songs.h"
#include "constants/species.h"
-EWRAM_DATA u8 gUnknown_02022C20[12] = {};
+EWRAM_DATA u8 sUnionRoomPlayerName[12] = {};
EWRAM_DATA u8 gUnknown_02022C2C = 0;
EWRAM_DATA u8 gUnknown_02022C2D = 0;
EWRAM_DATA union UnkUnion_Main gUnknown_02022C30 = {};
@@ -4101,7 +4101,7 @@ void sub_8016934(void)
{
struct UnkStruct_URoom *ptr;
- gUnknown_02022C20[0] = EOS;
+ sUnionRoomPlayerName[0] = EOS;
CreateTask(sub_801697C, 0);
gUnknown_02022C30.uRoom = gUnknown_02022C30.uRoom; // Needed to match.
gUnknown_02022C30.uRoom = ptr = AllocZeroed(0x26C);
@@ -4110,7 +4110,7 @@ void sub_8016934(void)
ptr->textState = 0;
ptr->field_10 = 0;
ptr->field_12 = 0;
- gUnknown_02022C20[0] = EOS;
+ sUnionRoomPlayerName[0] = EOS;
}
void sub_801697C(u8 taskId)
@@ -4149,7 +4149,7 @@ void sub_801697C(u8 taskId)
{
case 1:
case 2:
- if (gUnknown_02022C20[0] == EOS)
+ if (sUnionRoomPlayerName[0] == EOS)
{
for (i = 0; i < PLAYER_NAME_LENGTH + 1; i++)
{
@@ -4158,7 +4158,7 @@ void sub_801697C(u8 taskId)
sub_8018404(text, &structPtr->field_0->arr[i]);
if (sub_800E540(ReadAsU16(structPtr->field_0->arr[i].unk.field_0.unk_00.playerTrainerId), text))
{
- StringCopy(gUnknown_02022C20, text);
+ StringCopy(sUnionRoomPlayerName, text);
break;
}
}
@@ -4182,12 +4182,12 @@ void sub_801697C(u8 taskId)
}
}
-bool16 sp182_move_string(void)
+bool16 BufferUnionRoomPlayerName(void)
{
- if (gUnknown_02022C20[0] != EOS)
+ if (sUnionRoomPlayerName[0] != EOS)
{
- StringCopy(gStringVar1, gUnknown_02022C20);
- gUnknown_02022C20[0] = EOS;
+ StringCopy(gStringVar1, sUnionRoomPlayerName);
+ sUnionRoomPlayerName[0] = EOS;
return TRUE;
}
else