Organize structs vs enums
This commit is contained in:
parent
247da006ae
commit
cfec2b40a4
1 changed files with 17 additions and 18 deletions
33
src/raylib.h
33
src/raylib.h
|
@ -74,7 +74,6 @@
|
||||||
//#define PLATFORM_ANDROID // Android device
|
//#define PLATFORM_ANDROID // Android device
|
||||||
//#define PLATFORM_RPI // Raspberry Pi
|
//#define PLATFORM_RPI // Raspberry Pi
|
||||||
//#define PLATFORM_WEB // HTML5 (emscripten, asm.js)
|
//#define PLATFORM_WEB // HTML5 (emscripten, asm.js)
|
||||||
//#define RLGL_OCULUS_SUPPORT // Oculus Rift CV1 (complementary to PLATFORM_DESKTOP)
|
|
||||||
|
|
||||||
// Security check in case no PLATFORM_* defined
|
// Security check in case no PLATFORM_* defined
|
||||||
#if !defined(PLATFORM_DESKTOP) && !defined(PLATFORM_ANDROID) && !defined(PLATFORM_RPI) && !defined(PLATFORM_WEB)
|
#if !defined(PLATFORM_DESKTOP) && !defined(PLATFORM_ANDROID) && !defined(PLATFORM_RPI) && !defined(PLATFORM_WEB)
|
||||||
|
@ -516,6 +515,22 @@ typedef struct AudioStream {
|
||||||
unsigned int buffers[2]; // OpenAL audio buffers (double buffering)
|
unsigned int buffers[2]; // OpenAL audio buffers (double buffering)
|
||||||
} AudioStream;
|
} AudioStream;
|
||||||
|
|
||||||
|
// rRES data returned when reading a resource,
|
||||||
|
// it contains all required data for user (24 byte)
|
||||||
|
typedef struct RRESData {
|
||||||
|
unsigned int type; // Resource type (4 byte)
|
||||||
|
|
||||||
|
unsigned int param1; // Resouce parameter 1 (4 byte)
|
||||||
|
unsigned int param2; // Resouce parameter 2 (4 byte)
|
||||||
|
unsigned int param3; // Resouce parameter 3 (4 byte)
|
||||||
|
unsigned int param4; // Resouce parameter 4 (4 byte)
|
||||||
|
|
||||||
|
void *data; // Resource data pointer (4 byte)
|
||||||
|
} RRESData;
|
||||||
|
|
||||||
|
// RRES type (pointer to RRESData array)
|
||||||
|
typedef struct RRESData *RRES;
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Enumerators Definition
|
// Enumerators Definition
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
@ -615,19 +630,6 @@ typedef enum {
|
||||||
HMD_FOVE_VR,
|
HMD_FOVE_VR,
|
||||||
} VrDevice;
|
} VrDevice;
|
||||||
|
|
||||||
// rRES data returned when reading a resource,
|
|
||||||
// it contains all required data for user (24 byte)
|
|
||||||
typedef struct RRESData {
|
|
||||||
unsigned int type; // Resource type (4 byte)
|
|
||||||
|
|
||||||
unsigned int param1; // Resouce parameter 1 (4 byte)
|
|
||||||
unsigned int param2; // Resouce parameter 2 (4 byte)
|
|
||||||
unsigned int param3; // Resouce parameter 3 (4 byte)
|
|
||||||
unsigned int param4; // Resouce parameter 4 (4 byte)
|
|
||||||
|
|
||||||
void *data; // Resource data pointer (4 byte)
|
|
||||||
} RRESData;
|
|
||||||
|
|
||||||
// RRESData type
|
// RRESData type
|
||||||
typedef enum {
|
typedef enum {
|
||||||
RRES_TYPE_RAW = 0,
|
RRES_TYPE_RAW = 0,
|
||||||
|
@ -640,9 +642,6 @@ typedef enum {
|
||||||
RRES_TYPE_DIRECTORY
|
RRES_TYPE_DIRECTORY
|
||||||
} RRESDataType;
|
} RRESDataType;
|
||||||
|
|
||||||
// RRES type (pointer to RRESData array)
|
|
||||||
typedef struct RRESData *RRES;
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" { // Prevents name mangling of functions
|
extern "C" { // Prevents name mangling of functions
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue