2021-03-28 22:49:05 +02:00
|
|
|
#ifndef C_PHASE_H
|
|
|
|
|
#define C_PHASE_H
|
|
|
|
|
|
2023-12-25 07:31:05 -08:00
|
|
|
#include "dolphin/types.h"
|
2021-03-28 22:49:05 +02:00
|
|
|
|
2021-03-30 02:45:32 +02:00
|
|
|
typedef int (*cPhs__Handler)(void*);
|
|
|
|
|
|
|
|
|
|
enum cPhs__Step {
|
2023-08-16 13:32:40 -07:00
|
|
|
/* 0x0 */ cPhs_INIT_e,
|
|
|
|
|
/* 0x1 */ cPhs_LOADING_e,
|
|
|
|
|
/* 0x2 */ cPhs_NEXT_e,
|
|
|
|
|
/* 0x3 */ cPhs_UNK3_e, // appears to be an alternate error code, unsure how it differs
|
2022-10-03 15:26:26 -07:00
|
|
|
/* 0x4 */ cPhs_COMPLEATE_e,
|
|
|
|
|
/* 0x5 */ cPhs_ERROR_e,
|
2021-03-30 02:45:32 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
typedef struct request_of_phase_process_class {
|
|
|
|
|
cPhs__Handler* mpHandlerTable;
|
2022-10-03 15:26:26 -07:00
|
|
|
int id;
|
2021-03-30 02:45:32 +02:00
|
|
|
} request_of_phase_process_class;
|
|
|
|
|
|
2023-08-10 03:57:49 -06:00
|
|
|
typedef int (*request_of_phase_process_fn)(void*);
|
2022-02-07 15:27:50 -08:00
|
|
|
|
2021-03-30 02:45:32 +02:00
|
|
|
void cPhs_Reset(request_of_phase_process_class* pPhase);
|
|
|
|
|
void cPhs_Set(request_of_phase_process_class* pPhase, cPhs__Handler* pHandlerTable);
|
|
|
|
|
void cPhs_UnCompleate(request_of_phase_process_class* pPhase);
|
|
|
|
|
int cPhs_Compleate(request_of_phase_process_class* pPhase);
|
|
|
|
|
int cPhs_Next(request_of_phase_process_class* pPhase);
|
|
|
|
|
int cPhs_Do(request_of_phase_process_class* pPhase, void* pUserData);
|
|
|
|
|
int cPhs_Handler(request_of_phase_process_class* pPhase, cPhs__Handler* pHandlerTable,
|
|
|
|
|
void* pUserData);
|
|
|
|
|
|
2021-03-28 22:49:05 +02:00
|
|
|
#endif /* C_PHASE_H */
|