mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-16 19:15:14 -04:00
Add cc_uint8 definitions for metrowerks
Don't be fooled though, compiling for that is still completely broken
This commit is contained in:
parent
72fb33f9b6
commit
363f28f52b
11
src/Core.h
11
src/Core.h
@ -59,8 +59,17 @@ typedef unsigned __INTPTR_TYPE__ cc_uintptr;
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#elif __MWERKS__
|
#elif __MWERKS__
|
||||||
|
typedef signed char cc_int8;
|
||||||
|
typedef signed short cc_int16;
|
||||||
|
typedef signed int cc_int32;
|
||||||
|
typedef signed long long cc_int64;
|
||||||
|
|
||||||
|
typedef unsigned char cc_uint8;
|
||||||
|
typedef unsigned short cc_uint16;
|
||||||
|
typedef unsigned int cc_uint32;
|
||||||
|
typedef unsigned long long cc_uint64;
|
||||||
|
typedef unsigned int cc_uintptr;
|
||||||
/* TODO: Is there actual attribute support for these somewhere? */
|
/* TODO: Is there actual attribute support for these somewhere? */
|
||||||
#include <stdint.h>
|
|
||||||
#define CC_INLINE inline
|
#define CC_INLINE inline
|
||||||
#define CC_NOINLINE
|
#define CC_NOINLINE
|
||||||
#define CC_API
|
#define CC_API
|
||||||
|
@ -333,7 +333,7 @@ static void Logger_DumpFrame(String* trace, void* addr) {
|
|||||||
/* android's bionic libc doesn't provide backtrace (execinfo.h) */
|
/* android's bionic libc doesn't provide backtrace (execinfo.h) */
|
||||||
#include <unwind.h>
|
#include <unwind.h>
|
||||||
|
|
||||||
static _Unwind_Reason_Code Logger_DumpFrame(struct _Unwind_Context* ctx, void* arg) {
|
static _Unwind_Reason_Code Logger_UnwindFrame(struct _Unwind_Context* ctx, void* arg) {
|
||||||
cc_uintptr addr = _Unwind_GetIP(ctx);
|
cc_uintptr addr = _Unwind_GetIP(ctx);
|
||||||
if (!addr) return _URC_END_OF_STACK;
|
if (!addr) return _URC_END_OF_STACK;
|
||||||
|
|
||||||
@ -342,7 +342,7 @@ static _Unwind_Reason_Code Logger_DumpFrame(struct _Unwind_Context* ctx, void* a
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Logger_Backtrace(String* trace, void* ctx) {
|
void Logger_Backtrace(String* trace, void* ctx) {
|
||||||
_Unwind_Backtrace(Logger_DumpFrame, trace);
|
_Unwind_Backtrace(Logger_UnwindFrame, trace);
|
||||||
String_AppendConst(trace, _NL);
|
String_AppendConst(trace, _NL);
|
||||||
}
|
}
|
||||||
#elif defined CC_BUILD_OSX
|
#elif defined CC_BUILD_OSX
|
||||||
|
@ -1942,7 +1942,7 @@ static void MenuOptionsScreen_Enum(void* screen, void* widget) {
|
|||||||
struct ButtonWidget* btn = (struct ButtonWidget*)widget;
|
struct ButtonWidget* btn = (struct ButtonWidget*)widget;
|
||||||
int index;
|
int index;
|
||||||
struct MenuInputDesc* desc;
|
struct MenuInputDesc* desc;
|
||||||
const char** names;
|
const char* const* names;
|
||||||
int raw, count;
|
int raw, count;
|
||||||
|
|
||||||
index = Menu_Index(s, btn);
|
index = Menu_Index(s, btn);
|
||||||
|
@ -87,7 +87,7 @@ float Options_GetFloat(const char* key, float min, float max, float defValue) {
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Options_GetEnum(const char* key, int defValue, const char** names, int namesCount) {
|
int Options_GetEnum(const char* key, int defValue, const char* const* names, int namesCount) {
|
||||||
String str;
|
String str;
|
||||||
if (!Options_UNSAFE_Get(key, &str)) return defValue;
|
if (!Options_UNSAFE_Get(key, &str)) return defValue;
|
||||||
return Utils_ParseEnum(&str, defValue, names, namesCount);
|
return Utils_ParseEnum(&str, defValue, names, namesCount);
|
||||||
|
@ -84,7 +84,7 @@ CC_API bool Options_GetBool(const char* key, bool defValue);
|
|||||||
CC_API float Options_GetFloat(const char* key, float min, float max, float defValue);
|
CC_API float Options_GetFloat(const char* key, float min, float max, float defValue);
|
||||||
/* Returns value of given option as an integer, or defalt value if could not be converted. */
|
/* Returns value of given option as an integer, or defalt value if could not be converted. */
|
||||||
/* NOTE: Conversion is done by going through all elements of names, returning index of a match. */
|
/* NOTE: Conversion is done by going through all elements of names, returning index of a match. */
|
||||||
CC_API int Options_GetEnum(const char* key, int defValue, const char** names, int namesCount);
|
CC_API int Options_GetEnum(const char* key, int defValue, const char* const* names, int namesCount);
|
||||||
|
|
||||||
/* Sets value of given option to either "true" or "false". */
|
/* Sets value of given option to either "true" or "false". */
|
||||||
CC_API void Options_SetBool(const char* keyRaw, bool value);
|
CC_API void Options_SetBool(const char* keyRaw, bool value);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user