mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-17 11:35:08 -04:00
less compile errors with metroworks
This commit is contained in:
parent
8749a37e36
commit
453fb48cad
@ -255,7 +255,7 @@ static void Png_Expand_RGB_A_16(int width, BitmapCol* palette, uint8_t* src, Bit
|
||||
}
|
||||
}
|
||||
|
||||
Png_RowExpander Png_GetExpander(uint8_t col, uint8_t bitsPerSample) {
|
||||
static Png_RowExpander Png_GetExpander(uint8_t col, uint8_t bitsPerSample) {
|
||||
switch (col) {
|
||||
case PNG_COL_GRAYSCALE:
|
||||
switch (bitsPerSample) {
|
||||
|
@ -40,6 +40,14 @@ typedef signed __int64 int64_t;
|
||||
#define CC_VAR __attribute__((visibility("default")))
|
||||
#endif
|
||||
#endif
|
||||
#elif __MWERKS__
|
||||
/* TODO: Is there actual attribute support for these somewhere? */
|
||||
#include <stdint.h>
|
||||
#define CC_INLINE inline
|
||||
#define CC_NOINLINE
|
||||
#define CC_ALIGN_HINT(x)
|
||||
#define CC_API
|
||||
#define CC_VAR
|
||||
#else
|
||||
#error "Unknown compiler. You'll need to add required definitions in Core.h!"
|
||||
#endif
|
||||
|
@ -146,7 +146,7 @@ const char* KeyBind_Names[KEYBIND_COUNT] = {
|
||||
|
||||
bool KeyBind_IsPressed(KeyBind binding) { return Key_Pressed[KeyBinds[binding]]; }
|
||||
|
||||
void KeyBind_Load(void) {
|
||||
static void KeyBind_Load(void) {
|
||||
String name; char nameBuffer[STRING_SIZE + 1];
|
||||
Key mapping;
|
||||
int i;
|
||||
@ -162,7 +162,7 @@ void KeyBind_Load(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void KeyBind_Save(void) {
|
||||
static void KeyBind_Save(void) {
|
||||
String name; char nameBuffer[STRING_SIZE];
|
||||
String value;
|
||||
int i;
|
||||
|
@ -364,7 +364,7 @@ static void Menu_SwitchFont(void* a, void* b) { Menu_ReplaceActive(Fo
|
||||
static struct ListScreen ListScreen_Instance;
|
||||
#define LIST_SCREEN_EMPTY "-----"
|
||||
|
||||
STRING_REF String ListScreen_UNSAFE_Get(struct ListScreen* s, int index) {
|
||||
static STRING_REF String ListScreen_UNSAFE_Get(struct ListScreen* s, int index) {
|
||||
const static String str = String_FromConst(LIST_SCREEN_EMPTY);
|
||||
|
||||
if (index >= 0 && index < s->Entries.Count) {
|
||||
|
@ -50,7 +50,7 @@ bool AABB_ContainsPoint(const struct AABB* parent, const Vector3* P) {
|
||||
/*########################################################################################################################*
|
||||
*------------------------------------------------------Intersection-------------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
Vector3 Intersection_InverseRotate(Vector3 pos, struct Entity* target) {
|
||||
static Vector3 Intersection_InverseRotate(Vector3 pos, struct Entity* target) {
|
||||
pos = Vector3_RotateY(pos, -target->RotY * MATH_DEG2RAD);
|
||||
pos = Vector3_RotateZ(pos, -target->RotZ * MATH_DEG2RAD);
|
||||
pos = Vector3_RotateX(pos, -target->RotX * MATH_DEG2RAD);
|
||||
|
@ -220,7 +220,7 @@ frustum20, frustum21, frustum22, frustum23,
|
||||
frustum30, frustum31, frustum32, frustum33,
|
||||
frustum40, frustum41, frustum42, frustum43;
|
||||
|
||||
void FrustumCulling_Normalise(float* plane0, float* plane1, float* plane2, float* plane3) {
|
||||
static void FrustumCulling_Normalise(float* plane0, float* plane1, float* plane2, float* plane3) {
|
||||
float val1 = *plane0, val2 = *plane1, val3 = *plane2;
|
||||
float t = Math_SqrtF(val1 * val1 + val2 * val2 + val3 * val3);
|
||||
*plane0 /= t; *plane1 /= t; *plane2 /= t; *plane3 /= t;
|
||||
|
@ -100,7 +100,7 @@ static CC_INLINE bool Vector3_Equals(const Vector3* a, const Vector3* b) {
|
||||
return a->X == b->X && a->Y == b->Y && a->Z == b->Z;
|
||||
}
|
||||
/* Whether any of the components of the two vectors differ. */
|
||||
static CC_INLINE bool Vector3_NotEquals(const Vector3* a, const Vector3* b) {
|
||||
static CC_INLINE bool Vector3_NotEquals(const Vector3* a, const Vector3* b) {
|
||||
return a->X != b->X || a->Y != b->Y || a->Z != b->Z;
|
||||
}
|
||||
/* Whether all of the components of the two vectors are equal. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user