summaryrefslogtreecommitdiff
path: root/src/script.c
diff options
context:
space:
mode:
authorMarcus Huderle <huderlem@gmail.com>2017-09-30 16:41:16 -0700
committerMarcus Huderle <huderlem@gmail.com>2017-09-30 16:41:16 -0700
commit4c5bfdc153a8484c00aae30ed22badf006d7f8d9 (patch)
tree47bfb4286c03f021d48ffadde5da675a9f903f61 /src/script.c
parentaaa09d735451cced915bc6bacfce45ced8e33fa1 (diff)
parentf74d4742f597a423b7a8685d72c06597c8c78db7 (diff)
Merge remote-tracking branch 'upstream/master' into name_labels
Diffstat (limited to 'src/script.c')
-rw-r--r--src/script.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/script.c b/src/script.c
index 8f12da437..f049b96fc 100644
--- a/src/script.c
+++ b/src/script.c
@@ -40,7 +40,7 @@ u8 SetupBytecodeScript(struct ScriptContext *ctx, const u8 *ptr)
return 1;
}
-void SetupNativeScript(struct ScriptContext *ctx, void *ptr)
+void SetupNativeScript(struct ScriptContext *ctx, bool8 (*ptr)(void))
{
ctx->mode = 2;
ctx->nativePtr = ptr;
@@ -64,7 +64,7 @@ u8 RunScriptCommand(struct ScriptContext *ctx)
case 2:
if (ctx->nativePtr)
{
- if (ctx->nativePtr() == 1)
+ if (ctx->nativePtr() == TRUE)
ctx->mode = 1;
return 1;
}
@@ -228,16 +228,16 @@ void ScriptContext2_RunNewScript(const u8 *ptr)
;
}
-u8 *mapheader_get_tagged_pointer(u8 tag)
+static u8 *mapheader_get_tagged_pointer(u8 tag)
{
u8 *mapScripts = gMapHeader.mapScripts;
- if (!mapScripts)
+ if (mapScripts == NULL)
return NULL;
while (1)
{
- if (!*mapScripts)
+ if (*mapScripts == 0)
return NULL;
if (*mapScripts == tag)
{
@@ -248,14 +248,14 @@ u8 *mapheader_get_tagged_pointer(u8 tag)
}
}
-void mapheader_run_script_by_tag(u8 tag)
+static void mapheader_run_script_by_tag(u8 tag)
{
u8 *ptr = mapheader_get_tagged_pointer(tag);
if (ptr)
ScriptContext2_RunNewScript(ptr);
}
-u8 *mapheader_get_first_match_from_tagged_ptr_list(u8 tag)
+static u8 *mapheader_get_first_match_from_tagged_ptr_list(u8 tag)
{
u8 *ptr = mapheader_get_tagged_pointer(tag);
@@ -316,7 +316,7 @@ void mapheader_run_first_tag4_script_list_match(void)
ScriptContext2_RunNewScript(ptr);
}
-u32 CalculateRamScriptChecksum(void)
+static u32 CalculateRamScriptChecksum(void)
{
u32 i;
u32 sum = 0;