Source file part of map script renaming

This commit is contained in:
Phlosioneer
2019-02-22 02:23:46 -05:00
committed by huderlem
parent a589d4a630
commit 5f7a971313
12 changed files with 62 additions and 47 deletions
+21 -21
View File
@@ -241,7 +241,7 @@ void ScriptContext2_RunNewScript(const u8 *ptr)
while (RunScriptCommand(&sScriptContext2) == TRUE);
}
u8 *mapheader_get_tagged_pointer(u8 tag)
u8 *MapHeaderGetScriptTable(u8 tag)
{
const u8 *mapScripts = gMapHeader.mapScripts;
@@ -261,16 +261,16 @@ u8 *mapheader_get_tagged_pointer(u8 tag)
}
}
void mapheader_run_script_by_tag(u8 tag)
void MapHeaderRunScriptType(u8 tag)
{
u8 *ptr = mapheader_get_tagged_pointer(tag);
u8 *ptr = MapHeaderGetScriptTable(tag);
if (ptr)
ScriptContext2_RunNewScript(ptr);
}
u8 *mapheader_get_first_match_from_tagged_ptr_list(u8 tag)
u8 *MapHeaderCheckScriptTable(u8 tag)
{
u8 *ptr = mapheader_get_tagged_pointer(tag);
u8 *ptr = MapHeaderGetScriptTable(tag);
if (!ptr)
return NULL;
@@ -291,45 +291,45 @@ u8 *mapheader_get_first_match_from_tagged_ptr_list(u8 tag)
}
}
void mapheader_run_script_with_tag_x1(void)
void RunOnLoadMapScript(void)
{
mapheader_run_script_by_tag(1);
MapHeaderRunScriptType(1);
}
void mapheader_run_script_with_tag_x3(void)
void RunOnTransitionMapScript(void)
{
mapheader_run_script_by_tag(3);
MapHeaderRunScriptType(3);
}
void mapheader_run_script_with_tag_x5(void)
void RunOnResumeMapScript(void)
{
mapheader_run_script_by_tag(5);
MapHeaderRunScriptType(5);
}
void mapheader_run_script_with_tag_x7(void)
void RunOnReturnToFieldMapScript(void)
{
mapheader_run_script_by_tag(7);
MapHeaderRunScriptType(7);
}
void mapheader_run_script_with_tag_x6(void)
void RunOnDiveWarpMapScript(void)
{
mapheader_run_script_by_tag(6);
MapHeaderRunScriptType(6);
}
bool8 mapheader_run_first_tag2_script_list_match(void)
bool8 TryRunOnFrameMapScript(void)
{
u8 *ptr = mapheader_get_first_match_from_tagged_ptr_list(2);
u8 *ptr = MapHeaderCheckScriptTable(2);
if (!ptr)
return 0;
return FALSE;
ScriptContext1_SetupScript(ptr);
return 1;
return TRUE;
}
void mapheader_run_first_tag4_script_list_match(void)
void TryRunOnWarpIntoMapScript(void)
{
u8 *ptr = mapheader_get_first_match_from_tagged_ptr_list(4);
u8 *ptr = MapHeaderCheckScriptTable(4);
if (ptr)
ScriptContext2_RunNewScript(ptr);
}