SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
include
Game
System
FunctionAsyncExecutor.hpp
1
#pragma once
2
3
#include "Game/System/OSThreadWrapper.hpp"
4
#include "Game/Util.hpp"
5
6
class
JKRExpHeap;
7
class
JKRUnitHeap;
8
9
class
FunctionAsyncExecInfo
{
10
public
:
11
FunctionAsyncExecInfo
(
MR::FunctorBase
*,
int
,
const
char
*);
12
13
FunctionAsyncExecInfo
() {
14
15
}
16
17
~FunctionAsyncExecInfo
();
18
19
void
execute();
20
21
inline
bool
isSame(
const
char
*pStr) {
22
return
MR::strcasecmp(_8, pStr) == 0;
23
}
24
25
MR::FunctorBase
* mFunc;
// _0
26
int
mPriority;
// _4
27
const
char
* _8;
28
bool
_C;
29
OSMessageQueue mQueue;
// _10
30
OSMessage mMessage;
// _30
31
};
32
33
class
FunctionAsyncExecutorThread
:
public
OSThreadWrapper
{
34
public
:
35
FunctionAsyncExecutorThread
(JKRHeap *);
36
37
virtual
~FunctionAsyncExecutorThread
();
38
virtual
s32 run();
39
40
bool
mIsSuspended;
// _3C
41
const
char
* _40;
42
};
43
44
class
FunctionAsyncExecutorOnMainThread
{
45
public
:
46
FunctionAsyncExecutorOnMainThread
(OSThread *);
47
48
void
update();
49
50
u8 _0;
51
u8 _1;
52
u8 _2;
53
u8 _3;
54
OSMessageQueue mQueue;
// _4
55
OSMessage mMsgArray[0x40];
// _24
56
OSThread* mThread;
// _124
57
};
58
59
class
FunctionAsyncExecutor
{
60
public
:
61
FunctionAsyncExecutor
();
62
63
void
update();
64
void
start(
const
MR::FunctorBase
&,
int
,
const
char
*);
65
bool
startOnMainThread(
const
MR::FunctorBase
&,
const
char
*);
66
void
waitForEnd(
const
char
*);
67
bool
isEnd(
const
char
*)
const
;
68
OSThread* getOSThread(
const
char
*);
69
FunctionAsyncExecInfo
* createAndAddExecInfo(
const
MR::FunctorBase
&,
int
,
const
char
*);
70
FunctionAsyncExecutorThread
* getSuspendThread();
71
72
inline
FunctionAsyncExecInfo
*
const
* first()
const
{
73
return
&mHolders[0];
74
}
75
76
inline
FunctionAsyncExecInfo
*
const
* last()
const
{
77
return
&mHolders[_40C];
78
}
79
80
FunctionAsyncExecutorThread
* mThreads[2];
// _0
81
FunctionAsyncExecutorOnMainThread
* mMainThreadExec;
// _8
82
FunctionAsyncExecInfo
* mHolders[0x100];
83
u32 _40C;
84
JKRUnitHeap* _410;
85
JKRExpHeap* _414;
86
};
FunctionAsyncExecInfo
Definition
FunctionAsyncExecutor.hpp:9
FunctionAsyncExecutor
Definition
FunctionAsyncExecutor.hpp:59
FunctionAsyncExecutorOnMainThread
Definition
FunctionAsyncExecutor.hpp:44
FunctionAsyncExecutorThread
Definition
FunctionAsyncExecutor.hpp:33
MR::FunctorBase
Definition
Functor.hpp:8
OSThreadWrapper
Definition
OSThreadWrapper.hpp:7
Generated by
1.10.0