diff options
| author | Derek Hensley <hensley.derek58@gmail.com> | 2023-03-19 06:48:49 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-20 00:48:49 +1100 |
| commit | 03c8d46ed26a7a67c4f97efa22e5bc50542af493 (patch) | |
| tree | 241f42c063cfc0088a380305f3fab8a1d3295fcb /include | |
| parent | 6ff77ab09258c4f19a5336c66f8b9cdb7a90fcb5 (diff) | |
Slowly Cleanup (#1213)
* Add slowly.h
* Init and destroy
* File header
Diffstat (limited to 'include')
| -rw-r--r-- | include/functions.h | 5 | ||||
| -rw-r--r-- | include/slowly.h | 31 | ||||
| -rw-r--r-- | include/z64.h | 19 |
3 files changed, 32 insertions, 23 deletions
diff --git a/include/functions.h b/include/functions.h index e5f0ccca6..fca5af036 100644 --- a/include/functions.h +++ b/include/functions.h @@ -2684,10 +2684,7 @@ void func_8018450C(PlayState* play, SkeletonInfo* skeleton, Mtx* mtx, OverrideKe // void func_801850A0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7); // void func_801853C8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6); // void func_80185460(void); -//void Slowly_Main(SlowlyTask* slowly); -//void Slowly_ThreadEntry(SlowlyTask* slowly); -void Slowly_Start(SlowlyTask* slowly, void* stack, void (*callback)(), void* callbackArg0, void* callbackArg1); -void Slowly_Stop(SlowlyTask* slowly); + // void func_801857C0(void); // char* func_801857D0(void); // void func_80185864(void); diff --git a/include/slowly.h b/include/slowly.h new file mode 100644 index 000000000..b91d652d9 --- /dev/null +++ b/include/slowly.h @@ -0,0 +1,31 @@ +#ifndef SLOWLY_H +#define SLOWLY_H + +#include "ultra64.h" + +#define SLOWLY_STATUS_DONE (1 << 0) +#define SLOWLY_STATUS_STARTED (1 << 1) + +typedef void (*SlowlyCallbackZero)(void); +typedef void (*SlowlyCallbackOne)(void*); +typedef void (*SlowlyCallbackTwo)(void*, void*); + +typedef union { + SlowlyCallbackZero zero; + SlowlyCallbackOne one; + SlowlyCallbackTwo two; +} SlowlyCallback; // size = 0x4 + +typedef struct { + /* 0x000 */ OSThread thread; + /* 0x1B0 */ u8 argCount; + /* 0x1B1 */ u8 status; + /* 0x1B4 */ SlowlyCallback callback; + /* 0x1B8 */ void* arg0; + /* 0x1BC */ void* arg1; +} SlowlyMgr; // size = 0x1C0 + +void Slowly_Init(SlowlyMgr* slowly, void* stack, SlowlyCallbackTwo callback, void* arg0, void* arg1); +void Slowly_Destroy(SlowlyMgr* slowly); + +#endif diff --git a/include/z64.h b/include/z64.h index 17271501f..cd9dc71cf 100644 --- a/include/z64.h +++ b/include/z64.h @@ -219,25 +219,6 @@ typedef struct { /* 0x10 */ OSTime resetTime; } NmiBuff; // size >= 0x18 -typedef enum { - SLOWLY_CALLBACK_NO_ARGS, - SLOWLY_CALLBACK_ONE_ARG, - SLOWLY_CALLBACK_TWO_ARGS -} SlowlyCallbackArgCount; - -typedef struct { - /* 0x000 */ OSThread thread; - /* 0x1B0 */ u8 callbackArgCount; - /* 0x1B1 */ u8 status; - /* 0x1B4 */ union { - void (*callback0)(void); - void (*callback1)(void*); - void (*callback2)(void*, void*); - }; - /* 0x1B8 */ void* callbackArg0; - /* 0x1BC */ void* callbackArg1; -} SlowlyTask; // size = 0x1C0 - typedef struct { /* 0x00 */ int unk0; /* 0x04 */ void* unk4; |
