summaryrefslogtreecommitdiff
path: root/include/SSystem/SComponent/c_phase.h
blob: 81386b613f5d5617fdba89dcafcad231b57c0919 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef C_PHASE_H
#define C_PHASE_H

#include <types.h>

typedef int (*cPhs__Handler)(void*);

typedef int cPhs_Step;

enum {
    /* 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
    /* 0x4 */ cPhs_COMPLEATE_e,
    /* 0x5 */ cPhs_ERROR_e,
};

typedef struct request_of_phase_process_class {
    cPhs__Handler* mpHandlerTable;
    int id;
} request_of_phase_process_class;

typedef int (*request_of_phase_process_fn)(void*);

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);

#endif /* C_PHASE_H */