From acb1645d2cc473959014f98513ce0bd0e207cf2d Mon Sep 17 00:00:00 2001 From: Rachel Date: Sun, 3 Nov 2024 16:07:33 -0800 Subject: [PATCH] Unify terminology: taskManager -> task --- include/field/field_system.h | 2 +- include/field_script_context.h | 4 +- src/field_comm_manager.c | 2 +- src/field_map_change.c | 2 +- src/field_menu.c | 2 +- src/field_script_context.c | 6 +- src/field_system.c | 4 +- src/field_task.c | 24 ++++---- src/overlay005/ov5_021D431C.c | 4 +- src/overlay005/ov5_021DFB54.c | 6 +- src/overlay005/ov5_021EA874.c | 2 +- src/overlay006/ov6_02242AF0.c | 2 +- src/overlay006/ov6_02246C24.c | 2 +- src/overlay006/ov6_02246F00.c | 2 +- src/overlay006/ov6_02247D30.c | 2 +- src/overlay006/ov6_02247F5C.c | 2 +- src/overlay008/ov8_02249960.c | 14 ++--- src/overlay023/ov23_02241F74.c | 2 +- src/overlay023/ov23_022499E4.c | 4 +- src/overlay023/ov23_0224B05C.c | 2 +- src/overlay023/ov23_0225128C.c | 2 +- src/pokeradar.c | 2 +- src/scrcmd.c | 100 ++++++++++++++++----------------- src/script_manager.c | 8 +-- src/unk_0203D1B8.c | 2 +- src/unk_02046AD4.c | 10 ++-- src/unk_02046C7C.c | 4 +- src/unk_02048614.c | 8 +-- src/unk_02048BD0.c | 2 +- src/unk_020494DC.c | 6 +- src/unk_0204F13C.c | 6 +- src/unk_0204FAB4.c | 6 +- src/unk_0205003C.c | 6 +- src/unk_02050568.c | 2 +- src/unk_02055C50.c | 2 +- src/unk_0205A0D8.c | 4 +- src/unk_0205DFC4.c | 4 +- src/unk_0206B9D8.c | 6 +- src/unk_0206C0E8.c | 2 +- src/unk_0206C784.c | 4 +- src/unk_0206F314.c | 2 +- src/unk_0207160C.c | 4 +- src/unk_02071D40.c | 2 +- src/unk_020722AC.c | 2 +- 44 files changed, 143 insertions(+), 143 deletions(-) diff --git a/include/field/field_system.h b/include/field/field_system.h index d734074abe..4d3efff208 100644 --- a/include/field/field_system.h +++ b/include/field/field_system.h @@ -58,7 +58,7 @@ typedef struct FieldSystem_t { FieldSystem_sub2 *unk_04; BgConfig *bgConfig; SaveData *saveData; - FieldTask *taskManager; + FieldTask *task; MapHeaderData *mapHeaderData; int bottomScreen; Location *location; diff --git a/include/field_script_context.h b/include/field_script_context.h index 20302460fd..4481ece6bd 100644 --- a/include/field_script_context.h +++ b/include/field_script_context.h @@ -21,7 +21,7 @@ struct ScriptContext { const ScrCmdFunc *cmdTable; u32 cmdTableSize; u32 data[4]; - FieldTask *taskManager; + FieldTask *task; MessageLoader *loader; const u8 *scripts; FieldSystem *fieldSystem; @@ -33,7 +33,7 @@ void ScriptContext_Init(ScriptContext *ctx, const ScrCmdFunc *cmdTable, u32 cmdT BOOL ScriptContext_Start(ScriptContext *ctx, const u8 *ptr); void ScriptContext_Pause(ScriptContext *ctx, ShouldResumeScriptFunc shouldResume); void ScriptContext_Stop(ScriptContext *ctx); -void ScriptContext_SetTaskManager(ScriptContext *ctx, FieldTask *taskManager); +void ScriptContext_SetTask(ScriptContext *ctx, FieldTask *taskManager); BOOL ScriptContext_Run(ScriptContext *ctx); void ScriptContext_Jump(ScriptContext *ctx, const u8 *ptr); void ScriptContext_Call(ScriptContext *ctx, const u8 *ptr); diff --git a/src/field_comm_manager.c b/src/field_comm_manager.c index ada89f57e0..ccb8eec33c 100644 --- a/src/field_comm_manager.c +++ b/src/field_comm_manager.c @@ -403,7 +403,7 @@ static void sub_02059B74(void) for (v0 = 0; v0 < CommSys_ConnectedCount(); v0++) { if (v0 != CommSys_CurNetId()) { if (sub_02036564(v0) == 94) { - if (sFieldCommMan->fieldSystem->taskManager == NULL) { + if (sFieldCommMan->fieldSystem->task == NULL) { for (v1 = 0; v1 < 4; v1++) { if (sFieldCommMan->trainerCard[v1]) { Heap_FreeToHeap(sFieldCommMan->trainerCard[v1]); diff --git a/src/field_map_change.c b/src/field_map_change.c index c9848c5e8b..3afc4cd8e1 100644 --- a/src/field_map_change.c +++ b/src/field_map_change.c @@ -1576,5 +1576,5 @@ void sub_02054864(FieldTask *taskMan) Location *location = FieldOverworldState_GetSpecialLocation(SaveData_GetFieldOverworldState(fieldSystem->saveData)); fieldSystem->mapLoadType = MAP_LOAD_TYPE_OVERWORLD; - FieldSystem_StartChangeMapTask(fieldSystem->taskManager, location); + FieldSystem_StartChangeMapTask(fieldSystem->task, location); } diff --git a/src/field_menu.c b/src/field_menu.c index 25db9e62c5..f944d3bd5a 100644 --- a/src/field_menu.c +++ b/src/field_menu.c @@ -340,7 +340,7 @@ void sub_0203AB00(FieldSystem *fieldSystem) menu->unk_224 = sub_0203ABD0(fieldSystem); } - FieldTask_InitJump(fieldSystem->taskManager, sub_0203AC44, menu); + FieldTask_InitJump(fieldSystem->task, sub_0203AC44, menu); } static FieldMenu *FieldMenu_Alloc(void) diff --git a/src/field_script_context.c b/src/field_script_context.c index 9a8ee807b8..174e47bcdb 100644 --- a/src/field_script_context.c +++ b/src/field_script_context.c @@ -27,7 +27,7 @@ void ScriptContext_Init(ScriptContext *ctx, const ScrCmdFunc *cmdTable, u32 cmdT ctx->stack[i] = NULL; } - ctx->taskManager = NULL; + ctx->task = NULL; } BOOL ScriptContext_Start(ScriptContext *ctx, const u8 *ptr) @@ -50,9 +50,9 @@ void ScriptContext_Stop(ScriptContext *ctx) ctx->scriptPtr = NULL; } -void ScriptContext_SetTaskManager(ScriptContext *ctx, FieldTask *taskManager) +void ScriptContext_SetTask(ScriptContext *ctx, FieldTask *task) { - ctx->taskManager = taskManager; + ctx->task = task; } BOOL ScriptContext_Run(ScriptContext *ctx) diff --git a/src/field_system.c b/src/field_system.c index 856e50b58b..6eceb48f8b 100644 --- a/src/field_system.c +++ b/src/field_system.c @@ -158,7 +158,7 @@ static FieldSystem *InitFieldSystem(OverlayManager *ovyManager) fieldSystem->processManager->pause = FALSE; fieldSystem->processManager->kill = FALSE; fieldSystem->saveData = ((ApplicationArgs *)OverlayManager_Args(ovyManager))->saveData; - fieldSystem->taskManager = NULL; + fieldSystem->task = NULL; fieldSystem->location = FieldOverworldState_GetPlayerLocation(SaveData_GetFieldOverworldState(fieldSystem->saveData)); fieldSystem->unk_2C = sub_02039D6C(); @@ -220,7 +220,7 @@ static BOOL HandleInputsEventsAndProcesses(FieldSystem *fieldSystem) // Does not match with return (expression) if (fieldSystem->processManager->kill - && !fieldSystem->taskManager + && !fieldSystem->task && !fieldSystem->processManager->parent && !fieldSystem->processManager->child) { return TRUE; diff --git a/src/field_task.c b/src/field_task.c index 71a6499bc1..573a58aa9a 100644 --- a/src/field_task.c +++ b/src/field_task.c @@ -31,10 +31,10 @@ static FieldTask *CreateTaskManager(FieldSystem *fieldSys, FieldTaskFunc taskFun FieldTask *FieldSystem_CreateTask(FieldSystem *fieldSys, FieldTaskFunc taskFunc, void *taskEnv) { - GF_ASSERT(fieldSys->taskManager == NULL); + GF_ASSERT(fieldSys->task == NULL); FieldTask *task = CreateTaskManager(fieldSys, taskFunc, taskEnv); - fieldSys->taskManager = task; + fieldSys->task = task; return task; } @@ -56,29 +56,29 @@ FieldTask *FieldTask_InitCall(FieldTask *task, FieldTaskFunc taskFunc, void *tas { FieldTask *next = CreateTaskManager(task->fieldSys, taskFunc, taskEnv); next->prev = task; - task->fieldSys->taskManager = next; + task->fieldSys->task = next; return next; } BOOL FieldTask_Run(FieldSystem *fieldSys) { - if (fieldSys->taskManager == NULL) { + if (fieldSys->task == NULL) { return FALSE; } // Run invocations through the call-stack until it is empty. - while (fieldSys->taskManager->func(fieldSys->taskManager) == TRUE) { - FieldTask *prev = fieldSys->taskManager->prev; + while (fieldSys->task->func(fieldSys->task) == TRUE) { + FieldTask *prev = fieldSys->task->prev; - if (fieldSys->taskManager->dummy14) { - Heap_FreeToHeap(fieldSys->taskManager->dummy14); + if (fieldSys->task->dummy14) { + Heap_FreeToHeap(fieldSys->task->dummy14); } - Heap_FreeToHeap(fieldSys->taskManager->dummy1C); - Heap_FreeToHeap(fieldSys->taskManager); + Heap_FreeToHeap(fieldSys->task->dummy1C); + Heap_FreeToHeap(fieldSys->task); - fieldSys->taskManager = prev; + fieldSys->task = prev; if (prev == NULL) { return TRUE; } @@ -89,7 +89,7 @@ BOOL FieldTask_Run(FieldSystem *fieldSys) BOOL FieldSystem_IsRunningTask(FieldSystem *fieldSys) { - return fieldSys->taskManager != NULL; + return fieldSys->task != NULL; } BOOL FieldSystem_IsRunningApplication(FieldSystem *fieldSys) diff --git a/src/overlay005/ov5_021D431C.c b/src/overlay005/ov5_021D431C.c index 4d7ce876d1..2b1d7ae8f7 100644 --- a/src/overlay005/ov5_021D431C.c +++ b/src/overlay005/ov5_021D431C.c @@ -295,7 +295,7 @@ BOOL ov5_021D453C(FieldSystem *fieldSystem, UnkStruct_ov5_021D432C *param1) (param1->unk_00)++; } break; case 1: - sub_02056B30(fieldSystem->taskManager, 0, 9, 1, 0x0, 6, 1, 11); + sub_02056B30(fieldSystem->task, 0, 9, 1, 0x0, 6, 1, 11); { int v9; int v10; @@ -813,7 +813,7 @@ void ov5_021D4D48(FieldSystem *fieldSystem, const u8 param1) u8 *v0 = Heap_AllocFromHeapAtEnd(4, sizeof(u8)); *v0 = param1; - FieldTask_InitCall(fieldSystem->taskManager, ov5_021D4BC8, v0); + FieldTask_InitCall(fieldSystem->task, ov5_021D4BC8, v0); } void ov5_021D4D68(FieldSystem *fieldSystem, const u8 param1) diff --git a/src/overlay005/ov5_021DFB54.c b/src/overlay005/ov5_021DFB54.c index 754d76110a..63351b9c74 100644 --- a/src/overlay005/ov5_021DFB54.c +++ b/src/overlay005/ov5_021DFB54.c @@ -587,7 +587,7 @@ static void ov5_021E00B0(FieldSystem *fieldSystem, int param1, const UnkStruct_o v0->unk_24 = Player_MapObject(v0->playerAvatar); v0->unk_0C = *param2; - FieldTask_InitCall(fieldSystem->taskManager, ov5_021E0160, v0); + FieldTask_InitCall(fieldSystem->task, ov5_021E0160, v0); } void ov5_021E00EC(FieldTask *taskMan, int param1, int param2) @@ -968,7 +968,7 @@ static void ov5_021E06F8(FieldSystem *fieldSystem, int param1, const UnkStruct_o v0->unk_14 = Player_MapObject(v0->playerAvatar); v0->unk_1C = *param2; - FieldTask_InitCall(fieldSystem->taskManager, ov5_021E07A0, v0); + FieldTask_InitCall(fieldSystem->task, ov5_021E07A0, v0); } void ov5_021E0734(FieldTask *param0, int param1, int param2) @@ -1520,7 +1520,7 @@ static void ov5_021E0DE0(FieldSystem *fieldSystem) v0->unk_08 = Player_MapObject(v0->playerAvatar); v0->unk_10 = PlayerAvatar_Gender(v0->playerAvatar); - FieldTask_InitCall(fieldSystem->taskManager, ov5_021E0E10, v0); + FieldTask_InitCall(fieldSystem->task, ov5_021E0E10, v0); } static BOOL ov5_021E0E10(FieldTask *param0) diff --git a/src/overlay005/ov5_021EA874.c b/src/overlay005/ov5_021EA874.c index 2b45fab9ab..c328fde223 100644 --- a/src/overlay005/ov5_021EA874.c +++ b/src/overlay005/ov5_021EA874.c @@ -465,7 +465,7 @@ static void ov5_021EAF1C(UnkStruct_ov5_021EAE78 *param0) void ov5_021EAF50(FieldSystem *fieldSystem) { UnkStruct_ov5_021EAE78 *v0; - FieldTask *v1 = fieldSystem->taskManager; + FieldTask *v1 = fieldSystem->task; v0 = Heap_AllocFromHeapAtEnd(11, sizeof(UnkStruct_ov5_021EAE78)); ov5_021EAEE0(v0); diff --git a/src/overlay006/ov6_02242AF0.c b/src/overlay006/ov6_02242AF0.c index 3181bed251..2c91d437ac 100644 --- a/src/overlay006/ov6_02242AF0.c +++ b/src/overlay006/ov6_02242AF0.c @@ -175,7 +175,7 @@ void ov6_02242B58(FieldSystem *fieldSystem, const u16 param1, const u16 param2) v2->unk_00 = ov6_02242E60; } - FieldTask_InitCall(fieldSystem->taskManager, ov6_02242C5C, v2); + FieldTask_InitCall(fieldSystem->task, ov6_02242C5C, v2); } u32 ov6_02242C3C(FieldSystem *fieldSystem, const u16 param1) diff --git a/src/overlay006/ov6_02246C24.c b/src/overlay006/ov6_02246C24.c index 631e4057ac..a15db87844 100644 --- a/src/overlay006/ov6_02246C24.c +++ b/src/overlay006/ov6_02246C24.c @@ -62,7 +62,7 @@ void ov6_02246C24(FieldSystem *fieldSystem, const u8 param1) v4->unk_00.z += v5.z; } - FieldTask_InitCall(fieldSystem->taskManager, ov6_02246C9C, v4); + FieldTask_InitCall(fieldSystem->task, ov6_02246C9C, v4); } else { GF_ASSERT(FALSE); } diff --git a/src/overlay006/ov6_02246F00.c b/src/overlay006/ov6_02246F00.c index f6278e0565..e5f90a45a5 100644 --- a/src/overlay006/ov6_02246F00.c +++ b/src/overlay006/ov6_02246F00.c @@ -36,7 +36,7 @@ void ov6_02246F00(FieldSystem *fieldSystem, const u8 param1, const u8 param2) v1->unk_01 = param1; v1->unk_02 = 0; - FieldTask_InitCall(fieldSystem->taskManager, ov6_02246F40, v1); + FieldTask_InitCall(fieldSystem->task, ov6_02246F40, v1); } else { GF_ASSERT(FALSE); } diff --git a/src/overlay006/ov6_02247D30.c b/src/overlay006/ov6_02247D30.c index 4eccb0406a..8d5b7c04b2 100644 --- a/src/overlay006/ov6_02247D30.c +++ b/src/overlay006/ov6_02247D30.c @@ -60,7 +60,7 @@ void ov6_02247D30(FieldSystem *fieldSystem, const u8 param1) v4->unk_00.z += v5.z; } - FieldTask_InitCall(fieldSystem->taskManager, ov6_02247DAC, v4); + FieldTask_InitCall(fieldSystem->task, ov6_02247DAC, v4); } else { GF_ASSERT(FALSE); } diff --git a/src/overlay006/ov6_02247F5C.c b/src/overlay006/ov6_02247F5C.c index b53fbf583f..42f8e699e7 100644 --- a/src/overlay006/ov6_02247F5C.c +++ b/src/overlay006/ov6_02247F5C.c @@ -33,7 +33,7 @@ void ov6_02247F5C(FieldSystem *fieldSystem) void ov6_02247FBC(FieldSystem *fieldSystem) { - FieldTask_InitCall(fieldSystem->taskManager, ov6_02247FD0, NULL); + FieldTask_InitCall(fieldSystem->task, ov6_02247FD0, NULL); } static BOOL ov6_02247FD0(FieldTask *param0) diff --git a/src/overlay008/ov8_02249960.c b/src/overlay008/ov8_02249960.c index 2cb0f8fa6b..91499074c6 100644 --- a/src/overlay008/ov8_02249960.c +++ b/src/overlay008/ov8_02249960.c @@ -366,13 +366,13 @@ void ov8_0224997C(FieldSystem *fieldSystem) v6->unk_00 = 0; if (v4 == 239) { - FieldTask_InitCall(fieldSystem->taskManager, ov8_02249CD8, v6); + FieldTask_InitCall(fieldSystem->task, ov8_02249CD8, v6); v8->unk_00 = 2; } else if (v4 == 240) { - FieldTask_InitCall(fieldSystem->taskManager, ov8_02249B74, v6); + FieldTask_InitCall(fieldSystem->task, ov8_02249B74, v6); v8->unk_00 = 1; } else if (v4 == 241) { - FieldTask_InitCall(fieldSystem->taskManager, ov8_02249A94, v6); + FieldTask_InitCall(fieldSystem->task, ov8_02249A94, v6); v8->unk_00 = 0; } else { GF_ASSERT(FALSE); @@ -761,10 +761,10 @@ void ov8_02249FB8(FieldSystem *fieldSystem) PlayerAvatar_PosVectorOut(fieldSystem->playerAvatar, &v1); if (v1.y == (FX32_ONE * 16 * 0)) { - FieldTask_InitCall(fieldSystem->taskManager, ov8_0224A018, v0); + FieldTask_InitCall(fieldSystem->task, ov8_0224A018, v0); v3->unk_00 = 1; } else { - FieldTask_InitCall(fieldSystem->taskManager, ov8_0224A0E8, v0); + FieldTask_InitCall(fieldSystem->task, ov8_0224A0E8, v0); v3->unk_00 = 0; } } @@ -2206,7 +2206,7 @@ void ov8_0224AD34(FieldSystem *fieldSystem, const u8 param1) v1->unk_13 = v4; Sound_PlayEffect(1599); - FieldTask_InitCall(fieldSystem->taskManager, ov8_0224ADE8, v0); + FieldTask_InitCall(fieldSystem->task, ov8_0224ADE8, v0); } } @@ -2905,7 +2905,7 @@ BOOL ov8_0224B67C(FieldSystem *fieldSystem, Window *param1, MessageLoader *param v2->unk_14 = v1; v2->unk_18 = v3; - FieldTask_InitCall(fieldSystem->taskManager, ov8_0224B3D4, v2); + FieldTask_InitCall(fieldSystem->task, ov8_0224B3D4, v2); } return 1; diff --git a/src/overlay023/ov23_02241F74.c b/src/overlay023/ov23_02241F74.c index d6fc5dbda4..42d89f6139 100644 --- a/src/overlay023/ov23_02241F74.c +++ b/src/overlay023/ov23_02241F74.c @@ -1192,7 +1192,7 @@ BOOL ov23_02243298(int param0) return 0; } - if (sCommManUnderground->fieldSystem->taskManager) { + if (sCommManUnderground->fieldSystem->task) { sCommManUnderground->unk_130++; if (sCommManUnderground->unk_130 > 100) { diff --git a/src/overlay023/ov23_022499E4.c b/src/overlay023/ov23_022499E4.c index 335429e8b9..e664cdae7c 100644 --- a/src/overlay023/ov23_022499E4.c +++ b/src/overlay023/ov23_022499E4.c @@ -391,7 +391,7 @@ static void ov23_02249E18(void) ov23_02242B14(); - if (v0->fieldSystem->taskManager != NULL) { + if (v0->fieldSystem->task != NULL) { return; } @@ -579,7 +579,7 @@ static void ov23_0224A09C(void) ov23_02242B14(); sub_02059524(); - if (v0->fieldSystem->taskManager != NULL) { + if (v0->fieldSystem->task != NULL) { return; } diff --git a/src/overlay023/ov23_0224B05C.c b/src/overlay023/ov23_0224B05C.c index e13f9c816c..365a82c914 100644 --- a/src/overlay023/ov23_0224B05C.c +++ b/src/overlay023/ov23_0224B05C.c @@ -959,7 +959,7 @@ static UnkStruct_ov23_0224BA48 *ov23_0224BCC4(FieldSystem *fieldSystem, int para { UnkStruct_ov23_0224BA48 *v0 = NULL; - if (fieldSystem->taskManager == NULL) { + if (fieldSystem->task == NULL) { v0 = Heap_AllocFromHeapAtEnd(11, sizeof(UnkStruct_ov23_0224BA48)); MI_CpuClear8(v0, sizeof(UnkStruct_ov23_0224BA48)); diff --git a/src/overlay023/ov23_0225128C.c b/src/overlay023/ov23_0225128C.c index c3ab803b8c..be629b836f 100644 --- a/src/overlay023/ov23_0225128C.c +++ b/src/overlay023/ov23_0225128C.c @@ -782,7 +782,7 @@ static void ov23_02251C04(SysTask *param0, void *param1) } break; case 3: - if (v0->fieldSystem->taskManager == NULL) { + if (v0->fieldSystem->task == NULL) { v2 = Heap_AllocFromHeapAtEnd(11, sizeof(UnkStruct_ov23_02251ACC)); MI_CpuClear8(v2, sizeof(UnkStruct_ov23_02251ACC)); v2->unk_00 = 0; diff --git a/src/pokeradar.c b/src/pokeradar.c index bccd890c77..3e5c95413c 100644 --- a/src/pokeradar.c +++ b/src/pokeradar.c @@ -270,7 +270,7 @@ void sub_0206979C(FieldSystem *fieldSystem) GrassPatch *patch; int patchRing; - if (!fieldSystem->chain->active || fieldSystem->taskManager != NULL) { + if (!fieldSystem->chain->active || fieldSystem->task != NULL) { return; } diff --git a/src/scrcmd.c b/src/scrcmd.c index d9fd4cbf26..e3c26e1247 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1898,7 +1898,7 @@ static BOOL ScrCmd_017(ScriptContext *ctx) static BOOL ScrCmd_Unused018(ScriptContext *ctx) { - u32 taskVal = FieldTask_GetDummy1CVal(ctx->taskManager); + u32 taskVal = FieldTask_GetDummy1CVal(ctx->task); u8 val = ScriptContext_ReadByte(ctx); s32 offset = (s32)ScriptContext_ReadWord(ctx); @@ -3554,7 +3554,7 @@ static BOOL ScrCmd_192(ScriptContext *ctx) void **v0; v0 = FieldSystem_GetScriptMemberPtr(ctx->fieldSystem, 19); - *v0 = sub_0203D50C(ctx->fieldSystem->taskManager, 32); + *v0 = sub_0203D50C(ctx->fieldSystem->task, 32); return 1; } @@ -3921,13 +3921,13 @@ BOOL sub_02041D60(ScriptContext *ctx) static BOOL ScrCmd_0A1(ScriptContext *ctx) { - FieldTask_StartFieldMap(ctx->fieldSystem->taskManager); + FieldTask_StartFieldMap(ctx->fieldSystem->task); return 1; } static BOOL ScrCmd_1F8(ScriptContext *ctx) { - FieldTask_FinishFieldMap(ctx->fieldSystem->taskManager); + FieldTask_FinishFieldMap(ctx->fieldSystem->task); return 1; } @@ -3977,7 +3977,7 @@ static BOOL ScrCmd_0A2(ScriptContext *ctx) static BOOL ScrCmd_0A3(ScriptContext *ctx) { - sub_0207DDC0(ctx->taskManager); + sub_0207DDC0(ctx->task); return 1; } @@ -4083,7 +4083,7 @@ static BOOL ScrCmd_20A(ScriptContext *ctx) u16 v0 = ScriptContext_ReadHalfWord(ctx); StringTemplate **v1 = FieldSystem_GetScriptMemberPtr(ctx->fieldSystem, SCRIPT_MANAGER_STR_TEMPLATE); - VsSeeker_Start(ctx->taskManager, *v1, FieldSystem_GetVarPointer(ctx->fieldSystem, v0)); + VsSeeker_Start(ctx->task, *v1, FieldSystem_GetVarPointer(ctx->fieldSystem, v0)); return 1; } @@ -4102,7 +4102,7 @@ static BOOL ScrCmd_20B(ScriptContext *ctx) static BOOL ScrCmd_0A5(ScriptContext *ctx) { - sub_0209ACF4(ctx->taskManager); + sub_0209ACF4(ctx->task); return 1; } @@ -4110,7 +4110,7 @@ static BOOL ScrCmd_30E(ScriptContext *ctx) { u16 *v0 = ScriptContext_GetVarPointer(ctx); - sub_0209B344(ctx->taskManager, v0); + sub_0209B344(ctx->task, v0); return 1; } @@ -4120,7 +4120,7 @@ static BOOL ScrCmd_0A6(ScriptContext *ctx) u16 *v1 = ScriptContext_GetVarPointer(ctx); u16 v2 = ScriptContext_GetVar(ctx); - sub_0203DAC0(ctx->fieldSystem->taskManager, v1, ctx->fieldSystem->saveData, v0, v2); + sub_0203DAC0(ctx->fieldSystem->task, v1, ctx->fieldSystem->saveData, v0, v2); return 1; } @@ -4231,7 +4231,7 @@ static BOOL ScrCmd_310(ScriptContext *ctx) static BOOL ScrCmd_OpenSealCapsuleEditor(ScriptContext *ctx) { - sub_020980DC(ctx->taskManager, ctx->fieldSystem->saveData); + sub_020980DC(ctx->task, ctx->fieldSystem->saveData); return TRUE; } @@ -4335,7 +4335,7 @@ static BOOL ScrCmd_0AD(ScriptContext *ctx) static BOOL ScrCmd_0AE(ScriptContext *ctx) { - sub_0203DDDC(ctx->fieldSystem->taskManager); + sub_0203DDDC(ctx->fieldSystem->task); return 1; } @@ -4351,7 +4351,7 @@ static BOOL ScrCmd_0AF(ScriptContext *ctx) static BOOL ScrCmd_0B0(ScriptContext *ctx) { - sub_02052E58(ctx->fieldSystem->taskManager); + sub_02052E58(ctx->fieldSystem->task); return 1; } @@ -4403,7 +4403,7 @@ static BOOL ScrCmd_0B3(ScriptContext *ctx) { u16 v0 = ScriptContext_ReadHalfWord(ctx); - sub_0207DDE0(ctx->taskManager, FieldSystem_GetVarPointer(ctx->fieldSystem, v0)); + sub_0207DDE0(ctx->task, FieldSystem_GetVarPointer(ctx->fieldSystem, v0)); return 1; } @@ -4478,7 +4478,7 @@ static BOOL ScrCmd_0BA(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - sub_0203DFE8(ctx->taskManager, 0, 0, 7, 0, NULL, ScriptContext_GetVarPointer(ctx)); + sub_0203DFE8(ctx->task, 0, 0, 7, 0, NULL, ScriptContext_GetVarPointer(ctx)); return 1; } @@ -4492,14 +4492,14 @@ static BOOL ScrCmd_0BB(ScriptContext *ctx) v1 = Party_GetPokemonBySlotIndex(Party_GetFromSavedata(fieldSystem->saveData), v3); Pokemon_GetValue(v1, MON_DATA_NICKNAME, v0); - sub_0203DFE8(ctx->taskManager, 1, Pokemon_GetValue(v1, MON_DATA_SPECIES, NULL), 10, v3, v0, ScriptContext_GetVarPointer(ctx)); + sub_0203DFE8(ctx->task, 1, Pokemon_GetValue(v1, MON_DATA_SPECIES, NULL), 10, v3, v0, ScriptContext_GetVarPointer(ctx)); return 1; } static BOOL ScrCmd_271(ScriptContext *ctx) { - sub_0203DFE8(ctx->taskManager, 6, 0, 10, 0, NULL, ScriptContext_GetVarPointer(ctx)); + sub_0203DFE8(ctx->task, 6, 0, 10, 0, NULL, ScriptContext_GetVarPointer(ctx)); return 1; } @@ -4536,7 +4536,7 @@ static BOOL ScrCmd_243(ScriptContext *ctx) u16 *v2 = ScriptContext_GetVarPointer(ctx); *v2 = 0xffff; - sub_0203D80C(ctx->fieldSystem->taskManager, v1, v2, NULL); + sub_0203D80C(ctx->fieldSystem->task, v1, v2, NULL); return 1; } @@ -4551,7 +4551,7 @@ static BOOL ScrCmd_244(ScriptContext *ctx) *v2 = 0xffff; *v3 = 0xffff; - sub_0203D80C(ctx->fieldSystem->taskManager, v1, v2, v3); + sub_0203D80C(ctx->fieldSystem->task, v1, v2, v3); return 1; } @@ -4599,7 +4599,7 @@ static BOOL ScrCmd_Warp(ScriptContext *ctx) u16 z = ScriptContext_GetVar(ctx); u16 direction = ScriptContext_GetVar(ctx); - FieldTask_StartMapChangeFull(ctx->taskManager, mapID, -1, x, z, direction); + FieldTask_StartMapChangeFull(ctx->task, mapID, -1, x, z, direction); return TRUE; } @@ -4616,14 +4616,14 @@ static BOOL ScrCmd_203(ScriptContext *ctx) v3 = ScriptContext_ReadHalfWord(ctx); v4 = -1; - sub_02054800(ctx->fieldSystem->taskManager, v0, v4, v1, v2, v3); + sub_02054800(ctx->fieldSystem->task, v0, v4, v1, v2, v3); return 1; } static BOOL ScrCmd_204(ScriptContext *ctx) { - sub_02054864(ctx->fieldSystem->taskManager); + sub_02054864(ctx->fieldSystem->task); return 1; } @@ -4647,7 +4647,7 @@ static BOOL ScrCmd_201(ScriptContext *ctx) static BOOL ScrCmd_0BF(ScriptContext *ctx) { - ov5_021E0734(ctx->taskManager, PlayerAvatar_GetDir(ctx->fieldSystem->playerAvatar), ScriptContext_GetVar(ctx)); + ov5_021E0734(ctx->task, PlayerAvatar_GetDir(ctx->fieldSystem->playerAvatar), ScriptContext_GetVar(ctx)); return 1; } @@ -4664,7 +4664,7 @@ static BOOL ScrCmd_0C0(ScriptContext *ctx) v0 = PlayerAvatar_GetMoveDir(ctx->fieldSystem->playerAvatar); } - ov5_021E00EC(ctx->taskManager, v0, ScriptContext_GetVar(ctx)); + ov5_021E00EC(ctx->task, v0, ScriptContext_GetVar(ctx)); } return 1; @@ -4672,7 +4672,7 @@ static BOOL ScrCmd_0C0(ScriptContext *ctx) static BOOL ScrCmd_0C1(ScriptContext *ctx) { - ov5_021E0998(ctx->taskManager, PlayerAvatar_GetDir(ctx->fieldSystem->playerAvatar), ScriptContext_GetVar(ctx)); + ov5_021E0998(ctx->task, PlayerAvatar_GetDir(ctx->fieldSystem->playerAvatar), ScriptContext_GetVar(ctx)); return 1; } @@ -4735,7 +4735,7 @@ static BOOL sub_02042C80(ScriptContext *ctx) static BOOL ScrCmd_0C6(ScriptContext *ctx) { - ov5_021E0DD4(ctx->taskManager); + ov5_021E0DD4(ctx->task); return 1; } @@ -4922,7 +4922,7 @@ static BOOL ScrCmd_0F6(ScriptContext *ctx) v1 = FieldSystem_GetScriptMemberPtr(ctx->fieldSystem, 19); v0 = *v1; - sub_0205167C(ctx->fieldSystem->taskManager, v0->unk_2C, (0x4 | 0x1)); + sub_0205167C(ctx->fieldSystem->task, v0->unk_2C, (0x4 | 0x1)); Heap_FreeToHeap(v0); *v1 = NULL; @@ -5041,7 +5041,7 @@ static BOOL ScrCmd_124(ScriptContext *ctx) u16 v1 = ScriptContext_GetVar(ctx); u8 v2 = (u8)ScriptContext_GetVar(ctx); - sub_02051270(ctx->taskManager, v1, v2, v0, 0); + sub_02051270(ctx->task, v1, v2, v0, 0); return 1; } @@ -5052,7 +5052,7 @@ static BOOL ScrCmd_2BD(ScriptContext *ctx) u16 v1 = ScriptContext_GetVar(ctx); u8 v2 = (u8)ScriptContext_GetVar(ctx); - sub_02051270(ctx->taskManager, v1, v2, v0, 1); + sub_02051270(ctx->task, v1, v2, v0, 1); return 1; } @@ -5063,7 +5063,7 @@ static BOOL ScrCmd_319(ScriptContext *ctx) u16 v1 = ScriptContext_GetVar(ctx); u8 v2 = (u8)ScriptContext_GetVar(ctx); - sub_02051ABC(ctx->taskManager, v1, v2, v0, 1); + sub_02051ABC(ctx->task, v1, v2, v0, 1); return 1; } @@ -5073,7 +5073,7 @@ static BOOL ScrCmd_318(ScriptContext *ctx) u16 v1 = ScriptContext_GetVar(ctx); u8 v2 = (u8)ScriptContext_GetVar(ctx); - sub_020512E4(ctx->taskManager, v1, v2, v0, 1); + sub_020512E4(ctx->task, v1, v2, v0, 1); return 1; } @@ -5083,13 +5083,13 @@ static BOOL ScrCmd_125(ScriptContext *ctx) BOOL *v1 = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_BATTLE_RESULT); u16 v2 = ScriptContext_GetVar(ctx); - sub_02051480(ctx->taskManager, v2, 11, v1); + sub_02051480(ctx->task, v2, 11, v1); return 1; } static BOOL ScrCmd_126(ScriptContext *ctx) { - sub_02051590(ctx->taskManager); + sub_02051590(ctx->task); return 1; } @@ -5115,7 +5115,7 @@ static BOOL ScrCmd_129(ScriptContext *ctx) FieldSystem *fieldSystem = ctx->fieldSystem; BOOL *v1 = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_BATTLE_RESULT); - sub_0205120C(ctx->taskManager, v1); + sub_0205120C(ctx->task, v1); return 1; } @@ -5177,7 +5177,7 @@ static BOOL ScrCmd_2D7(ScriptContext *ctx) static BOOL ScrCmd_131(ScriptContext *ctx) { - ov5_021DDBC8(ctx->taskManager); + ov5_021DDBC8(ctx->task); return 1; } @@ -5486,7 +5486,7 @@ static BOOL sub_02043A4C(ScriptContext *ctx) static BOOL ScrCmd_153(ScriptContext *ctx) { - sub_02054708(ctx->fieldSystem->taskManager); + sub_02054708(ctx->fieldSystem->task); return 1; } @@ -5533,7 +5533,7 @@ static BOOL ScrCmd_156(ScriptContext *ctx) static BOOL ScrCmd_14B(ScriptContext *ctx) { - sub_02052C5C(ctx->taskManager); + sub_02052C5C(ctx->task); return 1; } @@ -5557,7 +5557,7 @@ static BOOL ScrCmd_GetPlayerGender(ScriptContext *ctx) static BOOL ScrCmd_HealParty(ScriptContext *ctx) { - FieldSystem *fieldSystem = FieldTask_GetFieldSystem(ctx->taskManager); + FieldSystem *fieldSystem = FieldTask_GetFieldSystem(ctx->task); HealAllPokemonInParty(Party_GetFromSavedata(fieldSystem->saveData)); return FALSE; @@ -5995,7 +5995,7 @@ static BOOL ScrCmd_1B2(ScriptContext *ctx) static BOOL ScrCmd_1B3(ScriptContext *ctx) { - sub_020736D8(ctx->taskManager); + sub_020736D8(ctx->task); return 1; } @@ -6013,7 +6013,7 @@ static BOOL ScrCmd_1B5(ScriptContext *ctx) { u16 v0 = ScriptContext_GetVar(ctx); - sub_020703FC(ctx->taskManager, v0); + sub_020703FC(ctx->task, v0); return 1; } @@ -6556,7 +6556,7 @@ static BOOL ScrCmd_229(ScriptContext *ctx) void **v0 = FieldSystem_GetScriptMemberPtr(ctx->fieldSystem, SCRIPT_MANAGER_DATA_PTR); u16 v1 = ScriptContext_GetVar(ctx); - sub_0206C740(ctx->taskManager, (UnkStruct_ov6_02246204 *)*v0, v1, 11); + sub_0206C740(ctx->task, (UnkStruct_ov6_02246204 *)*v0, v1, 11); return 1; } @@ -6634,7 +6634,7 @@ static BOOL ScrCmd_239(ScriptContext *ctx) { u16 v0 = ScriptContext_ReadHalfWord(ctx); - ov7_0224BE7C(ctx->taskManager, FieldSystem_GetVarPointer(ctx->fieldSystem, v0)); + ov7_0224BE7C(ctx->task, FieldSystem_GetVarPointer(ctx->fieldSystem, v0)); return 1; } @@ -6965,7 +6965,7 @@ static BOOL ScrCmd_267(ScriptContext *ctx) { u16 v0 = ScriptContext_GetVar(ctx); - sub_0203E414(ctx->fieldSystem->taskManager, v0); + sub_0203E414(ctx->fieldSystem->task, v0); return 1; } @@ -6992,7 +6992,7 @@ static BOOL ScrCmd_269(ScriptContext *ctx) GF_ASSERT(FALSE); } - sub_0205E318(ctx->taskManager, v0, v2, v3, v4, v5); + sub_0205E318(ctx->task, v0, v2, v3, v4, v5); return 1; } @@ -7009,7 +7009,7 @@ static BOOL ScrCmd_26A(ScriptContext *ctx) GF_ASSERT(FALSE); } - sub_0205E3F4(ctx->taskManager, v0, v2, v3); + sub_0205E3F4(ctx->task, v0, v2, v3); return 1; } @@ -7573,9 +7573,9 @@ static BOOL ScrCmd_29F(ScriptContext *ctx) u16 v0 = ScriptContext_GetVar(ctx); if (v0 == 0) { - ov6_0223E384(ctx->fieldSystem->taskManager); + ov6_0223E384(ctx->fieldSystem->task); } else { - ov6_0223E4EC(ctx->fieldSystem->taskManager); + ov6_0223E4EC(ctx->fieldSystem->task); } return 1; @@ -7790,7 +7790,7 @@ static BOOL ScrCmd_2C4(ScriptContext *ctx) v2->unk_10 = ctx->fieldSystem->unk_98; v2->unk_20 = ctx->fieldSystem->unk_BC; - FieldTask_RunApplication(ctx->taskManager, &Unk_020F8BE0, v2); + FieldTask_RunApplication(ctx->task, &Unk_020F8BE0, v2); ScriptContext_Pause(ctx, sub_02041CC8); return 1; @@ -7888,7 +7888,7 @@ static BOOL ScrCmd_2D8(ScriptContext *ctx) v2, }; - ov7_0224CDA4(ctx->taskManager, ctx->fieldSystem, (u16 *)v3[v0], 3, 0); + ov7_0224CDA4(ctx->task, ctx->fieldSystem, (u16 *)v3[v0], 3, 0); return 1; } @@ -8080,7 +8080,7 @@ static BOOL ScrCmd_2F7(ScriptContext *ctx) u16 *v1 = FieldSystem_GetVarPointer(ctx->fieldSystem, v0); if (sub_02039074(ctx->fieldSystem->saveData)) { - sub_0205749C(ctx->taskManager, *v1); + sub_0205749C(ctx->task, *v1); } return 1; @@ -8088,7 +8088,7 @@ static BOOL ScrCmd_2F7(ScriptContext *ctx) static BOOL ScrCmd_2FB(ScriptContext *ctx) { - sub_020985E4(ctx->taskManager, ctx->fieldSystem->saveData); + sub_020985E4(ctx->task, ctx->fieldSystem->saveData); return 1; } diff --git a/src/script_manager.c b/src/script_manager.c index 77a22219fb..7a74edd884 100644 --- a/src/script_manager.c +++ b/src/script_manager.c @@ -52,7 +52,7 @@ void ScriptManager_Set(FieldSystem *fieldSystem, u16 scriptID, MapObject *object void ScriptManager_SetApproachingTrainer(FieldSystem *fieldSystem, MapObject *object, int sightRange, int direction, int scriptID, int trainerID, int trainerType, int approachNum) { - ScriptManager *scriptManager = FieldTask_GetEnv(fieldSystem->taskManager); + ScriptManager *scriptManager = FieldTask_GetEnv(fieldSystem->task); ApproachingTrainer *trainer = &scriptManager->trainers[approachNum]; trainer->sightRange = sightRange; @@ -187,7 +187,7 @@ static void sub_0203EAF4(FieldSystem *fieldSystem, ScriptContext *ctx, u16 scrip ScriptContext_Start(ctx, ctx->scripts); sub_0203F0E4(ctx, offsetID); - ScriptContext_SetTaskManager(ctx, fieldSystem->taskManager); + ScriptContext_SetTask(ctx, fieldSystem->task); } static u16 ScriptContext_LoadAndOffsetID(FieldSystem *fieldSystem, ScriptContext *ctx, u16 scriptID) @@ -434,7 +434,7 @@ void *ScriptManager_GetMemberPtr(ScriptManager *scriptManager, u32 member) void *FieldSystem_GetScriptMemberPtr(FieldSystem *fieldSystem, u32 member) { - ScriptManager *script = FieldTask_GetEnv(fieldSystem->taskManager); + ScriptManager *script = FieldTask_GetEnv(fieldSystem->task); GF_ASSERT(script->magic == SCRIPT_MANAGER_MAGIC_NUMBER); @@ -443,7 +443,7 @@ void *FieldSystem_GetScriptMemberPtr(FieldSystem *fieldSystem, u32 member) void sub_0203F0C0(FieldSystem *fieldSystem) { - ScriptManager *scriptManager = FieldTask_GetEnv(fieldSystem->taskManager); + ScriptManager *scriptManager = FieldTask_GetEnv(fieldSystem->task); if (sub_0203A9C8(fieldSystem) == 1) { scriptManager->function = sub_0203AB00; diff --git a/src/unk_0203D1B8.c b/src/unk_0203D1B8.c index bfb9f770e1..c575aaf18c 100644 --- a/src/unk_0203D1B8.c +++ b/src/unk_0203D1B8.c @@ -1530,7 +1530,7 @@ void sub_0203E2FC(FieldSystem *fieldSystem) v0.unk_08 = SaveData_GetTrainerInfo(fieldSystem->saveData); v0.unk_0C = sub_02055428(fieldSystem, fieldSystem->location->mapId); - sub_020985AC(fieldSystem->taskManager, &v0); + sub_020985AC(fieldSystem->task, &v0); } BOOL sub_0203E348(FieldSystem *fieldSystem, UnkStruct_0203E348 *param1) diff --git a/src/unk_02046AD4.c b/src/unk_02046AD4.c index 53ec505582..bc277da1bb 100644 --- a/src/unk_02046AD4.c +++ b/src/unk_02046AD4.c @@ -64,7 +64,7 @@ BOOL ScrCmd_147(ScriptContext *param0) v0[v3] = 0xffff; - ov7_0224CDA4(param0->taskManager, param0->fieldSystem, v0, 0, 0); + ov7_0224CDA4(param0->task, param0->fieldSystem, v0, 0, 0); return 1; } @@ -79,7 +79,7 @@ BOOL ScrCmd_148(ScriptContext *param0) v1 = 0; } - ov7_0224CDA4(param0->taskManager, param0->fieldSystem, (u16 *)PokeMartSpecialties[v0], 0, v1); + ov7_0224CDA4(param0->task, param0->fieldSystem, (u16 *)PokeMartSpecialties[v0], 0, v1); return 1; } @@ -94,7 +94,7 @@ BOOL ScrCmd_149(ScriptContext *param0) v1 = 0; } - ov7_0224CDA4(param0->taskManager, param0->fieldSystem, (u16 *)VeilstoneDeptStoreDecorationStocks[v0], 1, v1); + ov7_0224CDA4(param0->task, param0->fieldSystem, (u16 *)VeilstoneDeptStoreDecorationStocks[v0], 1, v1); return 1; } @@ -102,12 +102,12 @@ BOOL ScrCmd_14A(ScriptContext *param0) { u16 v0 = ScriptContext_GetVar(param0); - ov7_0224CDA4(param0->taskManager, param0->fieldSystem, (u16 *)SunyshoreMarketDailyStocks[v0], 2, 0); + ov7_0224CDA4(param0->task, param0->fieldSystem, (u16 *)SunyshoreMarketDailyStocks[v0], 2, 0); return 1; } BOOL ScrCmd_257(ScriptContext *param0) { - sub_0203E518(param0->fieldSystem->taskManager); + sub_0203E518(param0->fieldSystem->task); return 1; } diff --git a/src/unk_02046C7C.c b/src/unk_02046C7C.c index 5ad229213c..0f637a1795 100644 --- a/src/unk_02046C7C.c +++ b/src/unk_02046C7C.c @@ -204,7 +204,7 @@ BOOL ScrCmd_101(ScriptContext *param0) { void **v0 = FieldSystem_GetScriptMemberPtr(param0->fieldSystem, SCRIPT_MANAGER_DATA_PTR); - sub_020933F8(param0->taskManager, *v0); + sub_020933F8(param0->task, *v0); return 1; } @@ -428,6 +428,6 @@ BOOL ScrCmd_115(ScriptContext *param0) BOOL ScrCmd_116(ScriptContext *param0) { - ov6_02247A0C(param0->taskManager); + ov6_02247A0C(param0->task); return 1; } diff --git a/src/unk_02048614.c b/src/unk_02048614.c index d24ccea6b4..745a3cc56c 100644 --- a/src/unk_02048614.c +++ b/src/unk_02048614.c @@ -152,7 +152,7 @@ BOOL ScrCmd_0E5(ScriptContext *param0) v6 = sub_0206B034(SaveData_GetVarsFlags(fieldSystem->saveData)); } - sub_020515CC(param0->taskManager, v4, v5, v6, 11, v3); + sub_020515CC(param0->task, v4, v5, v6, 11, v3); return 1; } @@ -164,7 +164,7 @@ BOOL ScrCmd_2A0(ScriptContext *param0) u16 v3 = ScriptContext_GetVar(param0); u16 v4 = ScriptContext_GetVar(param0); - sub_020515CC(param0->taskManager, v3, v4, v2, 11, v1); + sub_020515CC(param0->task, v3, v4, v2, 11, v1); return 1; } @@ -257,7 +257,7 @@ BOOL ScrCmd_0EA(ScriptContext *param0) BOOL ScrCmd_0EB(ScriptContext *param0) { - sub_02052C5C(param0->taskManager); + sub_02052C5C(param0->task); return 1; } @@ -301,7 +301,7 @@ BOOL ScrCmd_0EF(ScriptContext *param0) FieldSystem *fieldSystem = param0->fieldSystem; BOOL *v1 = FieldSystem_GetScriptMemberPtr(fieldSystem, SCRIPT_MANAGER_BATTLE_RESULT); - sub_020515CC(param0->taskManager, 1, 0, 0, 11, v1); + sub_020515CC(param0->task, 1, 0, 0, 11, v1); return 1; } diff --git a/src/unk_02048BD0.c b/src/unk_02048BD0.c index 246416bf82..28781caef1 100644 --- a/src/unk_02048BD0.c +++ b/src/unk_02048BD0.c @@ -63,7 +63,7 @@ BOOL ScrCmd_21D(ScriptContext *param0) const u16 *v11; v11 = RecordMixedRNG_GetEntryName(v1, 0, 0); - sub_0203DFE8(param0->taskManager, 5, 0, 7, 0, v11, ScriptContext_GetVarPointer(param0)); + sub_0203DFE8(param0->task, 5, 0, 7, 0, v11, ScriptContext_GetVarPointer(param0)); } return 1; case 5: { diff --git a/src/unk_020494DC.c b/src/unk_020494DC.c index 655171c988..cef0401fb2 100644 --- a/src/unk_020494DC.c +++ b/src/unk_020494DC.c @@ -115,11 +115,11 @@ BOOL ScrCmd_1DD(ScriptContext *param0) *v3 = sub_0204A100(param0->fieldSystem->saveData); break; case 16: - sub_0206BCE4(param0->taskManager, v1, v2, *v3); + sub_0206BCE4(param0->task, v1, v2, *v3); return 1; case (30 + 0): v5 = FieldSystem_GetScriptMemberPtr(param0->fieldSystem, 19); - sub_0204A358(v6, param0->taskManager, v5); + sub_0204A358(v6, param0->task, v5); return 1; case (30 + 1): v5 = FieldSystem_GetScriptMemberPtr(param0->fieldSystem, 19); @@ -299,7 +299,7 @@ BOOL ScrCmd_1E2(ScriptContext *param0) v0 = ScriptContext_ReadHalfWord(param0); if (sub_0205E6D8(param0->fieldSystem->saveData) == 1) { - sub_0206BD88(param0->fieldSystem->taskManager, v1, v0); + sub_0206BD88(param0->fieldSystem->task, v1, v0); } else { v2->unk_8DA = v0; v2->unk_8D5 = v1; diff --git a/src/unk_0204F13C.c b/src/unk_0204F13C.c index c430ebe8a5..7666f7bcf2 100644 --- a/src/unk_0204F13C.c +++ b/src/unk_0204F13C.c @@ -138,7 +138,7 @@ BOOL ScrCmd_2CC(ScriptContext *param0) } ; - sub_0204F470(param0->taskManager, v8, v0); + sub_0204F470(param0->task, v8, v0); return 1; default:; @@ -232,7 +232,7 @@ BOOL ScrCmd_2CF(ScriptContext *param0) ; ; - sub_0204F3D0(param0->taskManager, v0, v1); + sub_0204F3D0(param0->task, v0, v1); return 1; } @@ -295,7 +295,7 @@ void sub_0204F470(FieldTask *param0, void **param1, u8 param2) v1->unk_04 = param2; v1->unk_08 = param1; - FieldTask_InitCall(fieldSystem->taskManager, sub_0204F4A4, v1); + FieldTask_InitCall(fieldSystem->task, sub_0204F4A4, v1); return; } diff --git a/src/unk_0204FAB4.c b/src/unk_0204FAB4.c index 7f02dac5c4..0e3592cc87 100644 --- a/src/unk_0204FAB4.c +++ b/src/unk_0204FAB4.c @@ -103,7 +103,7 @@ BOOL ScrCmd_2D2(ScriptContext *param0) v0 = 2; } - sub_0204FDB4(param0->taskManager, v8, v0); + sub_0204FDB4(param0->task, v8, v0); return 1; default: GF_ASSERT(FALSE); @@ -156,7 +156,7 @@ BOOL ScrCmd_2D3(ScriptContext *param0) u16 v1 = ScriptContext_GetVar(param0); u16 *v2 = ScriptContext_GetVarPointer(param0); - sub_0204FCF8(param0->taskManager, v0, v1, v2); + sub_0204FCF8(param0->task, v0, v1, v2); return 1; } @@ -220,7 +220,7 @@ static void sub_0204FDB4(FieldTask *param0, void **param1, u8 param2) v1->unk_04 = param2; v1->unk_0C = param1; - FieldTask_InitCall(fieldSystem->taskManager, sub_0204FDE8, v1); + FieldTask_InitCall(fieldSystem->task, sub_0204FDE8, v1); return; } diff --git a/src/unk_0205003C.c b/src/unk_0205003C.c index daf4aa23d3..eb36249f41 100644 --- a/src/unk_0205003C.c +++ b/src/unk_0205003C.c @@ -103,7 +103,7 @@ BOOL ScrCmd_2D9(ScriptContext *param0) v0 = 2; } - sub_020502E0(param0->taskManager, v8, v0); + sub_020502E0(param0->task, v8, v0); return 1; default: GF_ASSERT(FALSE); @@ -148,7 +148,7 @@ BOOL ScrCmd_2DA(ScriptContext *param0) u16 v1 = ScriptContext_GetVar(param0); u16 *v2 = ScriptContext_GetVarPointer(param0); - sub_02050224(param0->taskManager, v0, v1, v2); + sub_02050224(param0->task, v0, v1, v2); return 1; } @@ -210,7 +210,7 @@ void sub_020502E0(FieldTask *param0, void **param1, u8 param2) v1->unk_04 = param2; v1->unk_0C = param1; - FieldTask_InitCall(fieldSystem->taskManager, sub_02050314, v1); + FieldTask_InitCall(fieldSystem->task, sub_02050314, v1); return; } diff --git a/src/unk_02050568.c b/src/unk_02050568.c index 82376df1a9..807a36e10c 100644 --- a/src/unk_02050568.c +++ b/src/unk_02050568.c @@ -44,7 +44,7 @@ void sub_02050568(FieldSystem *fieldSystem) UnkStruct_02050568 *v0 = Heap_AllocFromHeapAtEnd(11, sizeof(UnkStruct_02050568)); memset(v0, 0, sizeof(UnkStruct_02050568)); - FieldTask_InitCall(fieldSystem->taskManager, sub_020505A0, v0); + FieldTask_InitCall(fieldSystem->task, sub_020505A0, v0); } static BOOL sub_020505A0(FieldTask *taskMan) diff --git a/src/unk_02055C50.c b/src/unk_02055C50.c index 1bfc2415fd..fe3be42d41 100644 --- a/src/unk_02055C50.c +++ b/src/unk_02055C50.c @@ -471,7 +471,7 @@ void sub_020562AC(FieldSystem *fieldSystem) v0->unk_0C = NULL; v0->unk_04 = PlayerAvatar_GetDir(fieldSystem->playerAvatar); - FieldTask_InitCall(fieldSystem->taskManager, sub_02056124, v0); + FieldTask_InitCall(fieldSystem->task, sub_02056124, v0); } void sub_020562D8(FieldSystem *fieldSystem) diff --git a/src/unk_0205A0D8.c b/src/unk_0205A0D8.c index 47e56ab6ac..bd545d7ec6 100644 --- a/src/unk_0205A0D8.c +++ b/src/unk_0205A0D8.c @@ -654,7 +654,7 @@ static void sub_0205AAA0(UnkStruct_0205A0D8 *param0, BOOL param1) void sub_0205AB10(FieldSystem *fieldSystem, UnkFuncPtr_0205AB10 *param1) { UnkStruct_0205A0D8 *v0; - FieldTask *v1 = fieldSystem->taskManager; + FieldTask *v1 = fieldSystem->task; if (v1) { return; @@ -737,7 +737,7 @@ static void sub_0205AC28(UnkStruct_0205A0D8 *param0) static UnkStruct_0205A0D8 *sub_0205AC74(FieldSystem *fieldSystem) { - return FieldTask_GetEnv(fieldSystem->taskManager); + return FieldTask_GetEnv(fieldSystem->task); } static void sub_0205AC80(UnkStruct_0205A0D8 *param0, BOOL param1) diff --git a/src/unk_0205DFC4.c b/src/unk_0205DFC4.c index c52837a23b..0a9df27cb3 100644 --- a/src/unk_0205DFC4.c +++ b/src/unk_0205DFC4.c @@ -331,7 +331,7 @@ void sub_0205E318(FieldTask *param0, MapObject *param1, u16 param2, u16 param3, v1->unk_10 = param3; v1->unk_00 = param1; - FieldTask_InitCall(fieldSystem->taskManager, sub_0205E268, v1); + FieldTask_InitCall(fieldSystem->task, sub_0205E268, v1); } static BOOL sub_0205E3AC(FieldTask *param0) @@ -366,7 +366,7 @@ void sub_0205E3F4(FieldTask *param0, MapObject *param1, u16 param2, u16 param3) v1->unk_00 = param1; v1->unk_09 = 0; - FieldTask_InitCall(fieldSystem->taskManager, sub_0205E3AC, v1); + FieldTask_InitCall(fieldSystem->task, sub_0205E3AC, v1); } int sub_0205E430(u8 param0, u8 param1) diff --git a/src/unk_0206B9D8.c b/src/unk_0206B9D8.c index d722416341..c3929cfcaa 100644 --- a/src/unk_0206B9D8.c +++ b/src/unk_0206B9D8.c @@ -214,7 +214,7 @@ void sub_0206BBFC(FieldTask *param0, void **param1, u8 param2, u8 param3, u8 par v1->unk_0D = param7; v1->unk_14 = param1; - FieldTask_InitCall(fieldSystem->taskManager, sub_0206BB94, v1); + FieldTask_InitCall(fieldSystem->task, sub_0206BB94, v1); } static int sub_0206BC48(UnkStruct_0206BC48 *param0, FieldSystem *fieldSystem) @@ -279,7 +279,7 @@ void sub_0206BCE4(FieldTask *param0, u16 param1, u16 param2, u16 param3) v1->unk_14 = param3; v1->unk_10 = param2; - FieldTask_InitCall(fieldSystem->taskManager, sub_0206BC94, v1); + FieldTask_InitCall(fieldSystem->task, sub_0206BC94, v1); } static BOOL sub_0206BD1C(FieldTask *param0) @@ -322,7 +322,7 @@ void sub_0206BD88(FieldTask *param0, u16 param1, u16 param2) v1->unk_00 = param1; v1->unk_02 = param2; - FieldTask_InitCall(fieldSystem->taskManager, sub_0206BD1C, v1); + FieldTask_InitCall(fieldSystem->task, sub_0206BD1C, v1); } u16 sub_0206BDBC(SaveData *param0) diff --git a/src/unk_0206C0E8.c b/src/unk_0206C0E8.c index bb784ba080..ed9d9bf05b 100644 --- a/src/unk_0206C0E8.c +++ b/src/unk_0206C0E8.c @@ -46,7 +46,7 @@ void sub_0206C0E8(FieldSystem *fieldSystem) v0->unk_0C = 0; v0->unk_0D = 0; - FieldTask_InitCall(fieldSystem->taskManager, sub_0206C120, v0); + FieldTask_InitCall(fieldSystem->task, sub_0206C120, v0); } static BOOL sub_0206C120(FieldTask *taskMan) diff --git a/src/unk_0206C784.c b/src/unk_0206C784.c index 67a239d0fb..809b0c41e4 100644 --- a/src/unk_0206C784.c +++ b/src/unk_0206C784.c @@ -126,7 +126,7 @@ void sub_0206C784(FieldSystem *fieldSystem, const u8 param1, const u8 param2, co v0->unk_00 = 2; } - FieldTask_InitCall(fieldSystem->taskManager, sub_0206C964, v0); + FieldTask_InitCall(fieldSystem->task, sub_0206C964, v0); } static void sub_0206C8D4(FieldSystem *fieldSystem, const u8 param1, UnkStruct_ov5_021D5894 *param2) @@ -138,7 +138,7 @@ static void sub_0206C8D4(FieldSystem *fieldSystem, const u8 param1, UnkStruct_ov v0->unk_04 = param2; v0->unk_00 = param1; - FieldTask_InitCall(fieldSystem->taskManager, sub_0206C8F8, v0); + FieldTask_InitCall(fieldSystem->task, sub_0206C8F8, v0); } static BOOL sub_0206C8F8(FieldTask *taskMan) diff --git a/src/unk_0206F314.c b/src/unk_0206F314.c index 63fd478520..6334e66a6a 100644 --- a/src/unk_0206F314.c +++ b/src/unk_0206F314.c @@ -911,5 +911,5 @@ void sub_020703FC(FieldTask *param0, u16 param1) v1->unk_04 = param1; v1->unk_08 = NULL; - FieldTask_InitCall(fieldSystem->taskManager, sub_020702D0, v1); + FieldTask_InitCall(fieldSystem->task, sub_020702D0, v1); } diff --git a/src/unk_0207160C.c b/src/unk_0207160C.c index ea236b4cd3..4e4b6c2f53 100644 --- a/src/unk_0207160C.c +++ b/src/unk_0207160C.c @@ -305,11 +305,11 @@ void sub_0207183C(FieldSystem *fieldSystem) if (v1->unk_00 == 0) { v2->unk_04 = Unk_020F03F4[v1->unk_02].unk_00[1]; - FieldTask_InitCall(fieldSystem->taskManager, sub_020718D8, v2); + FieldTask_InitCall(fieldSystem->task, sub_020718D8, v2); v1->unk_00 = 1; } else { v2->unk_04 = Unk_020F03F4[v1->unk_02].unk_00[0]; - FieldTask_InitCall(fieldSystem->taskManager, sub_020719D8, v2); + FieldTask_InitCall(fieldSystem->task, sub_020719D8, v2); v1->unk_00 = 0; } } diff --git a/src/unk_02071D40.c b/src/unk_02071D40.c index b62593e3ab..2c9960c265 100644 --- a/src/unk_02071D40.c +++ b/src/unk_02071D40.c @@ -281,7 +281,7 @@ void sub_02072204(FieldSystem *fieldSystem) v0->unk_00 = 0; v0->unk_04 = (TrainerCard *)sub_0205C17C(fieldSystem->unk_7C); - FieldTask_InitCall(fieldSystem->taskManager, sub_02072230, v0); + FieldTask_InitCall(fieldSystem->task, sub_02072230, v0); } static BOOL sub_02072230(FieldTask *param0) diff --git a/src/unk_020722AC.c b/src/unk_020722AC.c index 25df61817d..2d9384263d 100644 --- a/src/unk_020722AC.c +++ b/src/unk_020722AC.c @@ -1303,5 +1303,5 @@ void sub_020736D8(FieldTask *param0) v1->unk_00 = 0; v1->unk_04 = 0; - FieldTask_InitCall(fieldSystem->taskManager, sub_02073694, v1); + FieldTask_InitCall(fieldSystem->task, sub_02073694, v1); }