summaryrefslogtreecommitdiff
path: root/src/scrcmd.c
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2016-10-18 21:15:22 -0700
committerYamaArashi <shadow962@live.com>2016-10-18 21:15:22 -0700
commit98520842e6db9f3cade035ffaec67ce919c30bb3 (patch)
treec9c27c9518157017373ef2546a67956519697e7f /src/scrcmd.c
parent89dea52f12456f7d6ebca8f99aab846bb5577042 (diff)
script condition table
Diffstat (limited to 'src/scrcmd.c')
-rw-r--r--src/scrcmd.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/scrcmd.c b/src/scrcmd.c
index c88a7499b..d2cdaf278 100644
--- a/src/scrcmd.c
+++ b/src/scrcmd.c
@@ -171,7 +171,7 @@ extern u8 *gStdScripts_End[];
extern u8 gSpeciesNames[][11];
extern u8 gMoveNames[][13];
-extern u8 gUnknown_083762DC[6][3];
+extern u8 gScriptConditionTable[6][3];
extern u8 * const gUnknown_083762F0[];
extern u8 * const gUnknown_083CE048[];
extern struct Decoration gDecorations[];
@@ -251,7 +251,7 @@ bool8 ScrCmd_jumpif(struct ScriptContext *ctx)
{
u8 condition = *(ctx->scriptPtr++);
u8 *ptr = (u8 *)ScriptReadWord(ctx);
- if (gUnknown_083762DC[condition][ctx->comparisonResult] == 1)
+ if (gScriptConditionTable[condition][ctx->comparisonResult] == 1)
ScriptJump(ctx, ptr);
return FALSE;
}
@@ -260,7 +260,7 @@ bool8 ScrCmd_callif(struct ScriptContext *ctx)
{
u8 condition = *(ctx->scriptPtr++);
u8 *ptr = (u8 *)ScriptReadWord(ctx);
- if (gUnknown_083762DC[condition][ctx->comparisonResult] == 1)
+ if (gScriptConditionTable[condition][ctx->comparisonResult] == 1)
ScriptCall(ctx, ptr);
return FALSE;
}
@@ -291,7 +291,7 @@ bool8 ScrCmd_if5(struct ScriptContext *ctx)
{
u8 condition = *(ctx->scriptPtr++);
u8 *ptr = (u8 *)(ScriptReadWord(ctx) - gUnknown_0202E8B0);
- if (gUnknown_083762DC[condition][ctx->comparisonResult] == 1)
+ if (gScriptConditionTable[condition][ctx->comparisonResult] == 1)
ScriptJump(ctx, ptr);
return FALSE;
}
@@ -300,7 +300,7 @@ bool8 ScrCmd_if6(struct ScriptContext *ctx)
{
u8 condition = *(ctx->scriptPtr++);
u8 *ptr = (u8 *)(ScriptReadWord(ctx) - gUnknown_0202E8B0);
- if (gUnknown_083762DC[condition][ctx->comparisonResult] == 1)
+ if (gScriptConditionTable[condition][ctx->comparisonResult] == 1)
ScriptCall(ctx, ptr);
return FALSE;
}
@@ -327,7 +327,7 @@ bool8 ScrCmd_jumpstdif(struct ScriptContext *ctx)
{
u8 condition = *(ctx->scriptPtr++);
u8 index = *(ctx->scriptPtr++);
- if (gUnknown_083762DC[condition][ctx->comparisonResult] == 1)
+ if (gScriptConditionTable[condition][ctx->comparisonResult] == 1)
{
u8 **ptr = &gStdScripts[index];
if (ptr < gStdScripts_End)
@@ -340,7 +340,7 @@ bool8 ScrCmd_callstdif(struct ScriptContext *ctx)
{
u8 condition = *(ctx->scriptPtr++);
u8 index = *(ctx->scriptPtr++);
- if (gUnknown_083762DC[condition][ctx->comparisonResult] == 1)
+ if (gScriptConditionTable[condition][ctx->comparisonResult] == 1)
{
u8 **ptr = &gStdScripts[index];
if (ptr < gStdScripts_End)