mirror of https://github.com/mgba-emu/mgba.git
Move inline struct definitions out of place for C++ compatibility
This commit is contained in:
parent
a72c77a3df
commit
48a3522fbc
|
@ -14,6 +14,20 @@ enum ThreadState {
|
||||||
THREAD_SHUTDOWN = 3
|
THREAD_SHUTDOWN = 3
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct GBASync {
|
||||||
|
int videoFramePending;
|
||||||
|
int videoFrameWait;
|
||||||
|
int videoFrameSkip;
|
||||||
|
int videoFrameOn;
|
||||||
|
Mutex videoFrameMutex;
|
||||||
|
Condition videoFrameAvailableCond;
|
||||||
|
Condition videoFrameRequiredCond;
|
||||||
|
|
||||||
|
int audioWait;
|
||||||
|
Condition audioRequiredCond;
|
||||||
|
Mutex audioBufferMutex;
|
||||||
|
};
|
||||||
|
|
||||||
struct GBAThread {
|
struct GBAThread {
|
||||||
// Output
|
// Output
|
||||||
enum ThreadState state;
|
enum ThreadState state;
|
||||||
|
@ -39,19 +53,7 @@ struct GBAThread {
|
||||||
ThreadCallback frameCallback;
|
ThreadCallback frameCallback;
|
||||||
void* userData;
|
void* userData;
|
||||||
|
|
||||||
struct GBASync {
|
struct GBASync sync;
|
||||||
int videoFramePending;
|
|
||||||
int videoFrameWait;
|
|
||||||
int videoFrameSkip;
|
|
||||||
int videoFrameOn;
|
|
||||||
Mutex videoFrameMutex;
|
|
||||||
Condition videoFrameAvailableCond;
|
|
||||||
Condition videoFrameRequiredCond;
|
|
||||||
|
|
||||||
int audioWait;
|
|
||||||
Condition audioRequiredCond;
|
|
||||||
Mutex audioBufferMutex;
|
|
||||||
} sync;
|
|
||||||
|
|
||||||
int rewindBufferSize;
|
int rewindBufferSize;
|
||||||
int rewindBufferCapacity;
|
int rewindBufferCapacity;
|
||||||
|
|
|
@ -46,48 +46,51 @@ union GBAColor {
|
||||||
uint16_t packed;
|
uint16_t packed;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct GBAObj {
|
||||||
|
unsigned y : 8;
|
||||||
|
unsigned transformed : 1;
|
||||||
|
unsigned disable : 1;
|
||||||
|
enum ObjMode mode : 2;
|
||||||
|
unsigned mosaic : 1;
|
||||||
|
unsigned multipalette : 1;
|
||||||
|
enum ObjShape shape : 2;
|
||||||
|
|
||||||
|
int x : 9;
|
||||||
|
int : 3;
|
||||||
|
unsigned hflip : 1;
|
||||||
|
unsigned vflip : 1;
|
||||||
|
unsigned size : 2;
|
||||||
|
|
||||||
|
unsigned tile : 10;
|
||||||
|
unsigned priority : 2;
|
||||||
|
unsigned palette : 4;
|
||||||
|
|
||||||
|
int : 16;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct GBATransformedObj {
|
||||||
|
unsigned y : 8;
|
||||||
|
unsigned transformed : 1;
|
||||||
|
unsigned doublesize : 1;
|
||||||
|
enum ObjMode mode : 2;
|
||||||
|
unsigned mosaic : 1;
|
||||||
|
unsigned multipalette : 1;
|
||||||
|
enum ObjShape shape : 2;
|
||||||
|
|
||||||
|
int x : 9;
|
||||||
|
unsigned matIndex : 5;
|
||||||
|
unsigned size : 2;
|
||||||
|
|
||||||
|
unsigned tile : 10;
|
||||||
|
unsigned priority : 2;
|
||||||
|
unsigned palette : 4;
|
||||||
|
|
||||||
|
int : 16;
|
||||||
|
};
|
||||||
|
|
||||||
union GBAOAM {
|
union GBAOAM {
|
||||||
struct GBAObj {
|
struct GBAObj obj[128];
|
||||||
unsigned y : 8;
|
struct GBATransformedObj tobj[128];
|
||||||
unsigned transformed : 1;
|
|
||||||
unsigned disable : 1;
|
|
||||||
enum ObjMode mode : 2;
|
|
||||||
unsigned mosaic : 1;
|
|
||||||
unsigned multipalette : 1;
|
|
||||||
enum ObjShape shape : 2;
|
|
||||||
|
|
||||||
int x : 9;
|
|
||||||
int : 3;
|
|
||||||
unsigned hflip : 1;
|
|
||||||
unsigned vflip : 1;
|
|
||||||
unsigned size : 2;
|
|
||||||
|
|
||||||
unsigned tile : 10;
|
|
||||||
unsigned priority : 2;
|
|
||||||
unsigned palette : 4;
|
|
||||||
|
|
||||||
int : 16;
|
|
||||||
} obj[128];
|
|
||||||
|
|
||||||
struct GBATransformedObj {
|
|
||||||
unsigned y : 8;
|
|
||||||
unsigned transformed : 1;
|
|
||||||
unsigned doublesize : 1;
|
|
||||||
enum ObjMode mode : 2;
|
|
||||||
unsigned mosaic : 1;
|
|
||||||
unsigned multipalette : 1;
|
|
||||||
enum ObjShape shape : 2;
|
|
||||||
|
|
||||||
int x : 9;
|
|
||||||
unsigned matIndex : 5;
|
|
||||||
unsigned size : 2;
|
|
||||||
|
|
||||||
unsigned tile : 10;
|
|
||||||
unsigned priority : 2;
|
|
||||||
unsigned palette : 4;
|
|
||||||
|
|
||||||
int : 16;
|
|
||||||
} tobj[128];
|
|
||||||
|
|
||||||
struct GBAOAMMatrix {
|
struct GBAOAMMatrix {
|
||||||
int : 16;
|
int : 16;
|
||||||
|
|
Loading…
Reference in New Issue