mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-18 12:05:14 -04:00
fix a few errors with very old compilers
This commit is contained in:
parent
ed509392fb
commit
e5af257b6f
@ -175,7 +175,7 @@ static void Soundboard_Init(struct Soundboard* board, const String* boardName, S
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Sound* Soundboard_PickRandom(struct Soundboard* board, uint8_t type) {
|
static struct Sound* Soundboard_PickRandom(struct Soundboard* board, uint8_t type) {
|
||||||
String name;
|
String name;
|
||||||
struct SoundGroup* group;
|
struct SoundGroup* group;
|
||||||
int idx;
|
int idx;
|
||||||
@ -438,7 +438,7 @@ cleanup:
|
|||||||
static void Music_RunLoop(void) {
|
static void Music_RunLoop(void) {
|
||||||
const static String ogg = String_FromConst(".ogg");
|
const static String ogg = String_FromConst(".ogg");
|
||||||
char pathBuffer[FILENAME_SIZE];
|
char pathBuffer[FILENAME_SIZE];
|
||||||
String path = String_FromArray(pathBuffer);
|
String path;
|
||||||
|
|
||||||
uint16_t musicFiles[MUSIC_MAX_FILES];
|
uint16_t musicFiles[MUSIC_MAX_FILES];
|
||||||
String file;
|
String file;
|
||||||
@ -461,7 +461,7 @@ static void Music_RunLoop(void) {
|
|||||||
idx = Random_Range(&rnd, 0, count);
|
idx = Random_Range(&rnd, 0, count);
|
||||||
file = StringsBuffer_UNSAFE_Get(&files, musicFiles[idx]);
|
file = StringsBuffer_UNSAFE_Get(&files, musicFiles[idx]);
|
||||||
|
|
||||||
path.length = 0;
|
String_InitArray(path, pathBuffer);
|
||||||
String_Format1(&path, "audio/%s", &file);
|
String_Format1(&path, "audio/%s", &file);
|
||||||
Platform_Log1("playing music file: %s", &file);
|
Platform_Log1("playing music file: %s", &file);
|
||||||
|
|
||||||
|
@ -1046,7 +1046,7 @@ static void GL_CheckVboSupport(void) {
|
|||||||
glBufferSubData = (FUNC_GLBUFFERSUBDATA)GLContext_GetAddress("glBufferSubDataARB");
|
glBufferSubData = (FUNC_GLBUFFERSUBDATA)GLContext_GetAddress("glBufferSubDataARB");
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
Logger_Abort("Only OpenGL 1.1 supported.\r\n\r\n" \
|
Logger_Abort("Only OpenGL 1.1 supported.\n\n" \
|
||||||
"Compile the game with CC_BUILD_GL11, or ask on the classicube forums for it");
|
"Compile the game with CC_BUILD_GL11, or ask on the classicube forums for it");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -603,7 +603,7 @@ static void Launcher_ApplyUpdate(void) {
|
|||||||
ReturnCode res;
|
ReturnCode res;
|
||||||
|
|
||||||
/* Can't use WriteLine, want \n as actual newline not code page 437 */
|
/* Can't use WriteLine, want \n as actual newline not code page 437 */
|
||||||
res = Stream_WriteAllTo(&scriptPath, UPDATE_SCRIPT, sizeof(UPDATE_SCRIPT) - 1);
|
res = Stream_WriteAllTo(&scriptPath, (const uint8_t*)UPDATE_SCRIPT, sizeof(UPDATE_SCRIPT) - 1);
|
||||||
if (res) { Logger_Warn(res, "saving update script"); return; }
|
if (res) { Logger_Warn(res, "saving update script"); return; }
|
||||||
|
|
||||||
res = Platform_MarkExecutable(&scriptPath);
|
res = Platform_MarkExecutable(&scriptPath);
|
||||||
|
@ -1863,7 +1863,7 @@ static void Window_UpdateWindowState(void) {
|
|||||||
Event_RaiseVoid(&WindowEvents.Resized);
|
Event_RaiseVoid(&WindowEvents.Resized);
|
||||||
}
|
}
|
||||||
|
|
||||||
OSStatus Window_ProcessKeyboardEvent(EventHandlerCallRef inCaller, EventRef inEvent, void* userData) {
|
static OSStatus Window_ProcessKeyboardEvent(EventHandlerCallRef inCaller, EventRef inEvent, void* userData) {
|
||||||
UInt32 kind, code;
|
UInt32 kind, code;
|
||||||
Key key;
|
Key key;
|
||||||
char charCode, raw;
|
char charCode, raw;
|
||||||
@ -1922,7 +1922,7 @@ OSStatus Window_ProcessKeyboardEvent(EventHandlerCallRef inCaller, EventRef inEv
|
|||||||
return eventNotHandledErr;
|
return eventNotHandledErr;
|
||||||
}
|
}
|
||||||
|
|
||||||
OSStatus Window_ProcessWindowEvent(EventHandlerCallRef inCaller, EventRef inEvent, void* userData) {
|
static OSStatus Window_ProcessWindowEvent(EventHandlerCallRef inCaller, EventRef inEvent, void* userData) {
|
||||||
int width, height;
|
int width, height;
|
||||||
|
|
||||||
switch (GetEventKind(inEvent)) {
|
switch (GetEventKind(inEvent)) {
|
||||||
@ -1958,7 +1958,7 @@ OSStatus Window_ProcessWindowEvent(EventHandlerCallRef inCaller, EventRef inEven
|
|||||||
return eventNotHandledErr;
|
return eventNotHandledErr;
|
||||||
}
|
}
|
||||||
|
|
||||||
OSStatus Window_ProcessMouseEvent(EventHandlerCallRef inCaller, EventRef inEvent, void* userData) {
|
static OSStatus Window_ProcessMouseEvent(EventHandlerCallRef inCaller, EventRef inEvent, void* userData) {
|
||||||
HIPoint pt;
|
HIPoint pt;
|
||||||
Point2D mousePos;
|
Point2D mousePos;
|
||||||
UInt32 kind;
|
UInt32 kind;
|
||||||
|
@ -129,13 +129,6 @@
|
|||||||
#define ft_longjmp longjmp
|
#define ft_longjmp longjmp
|
||||||
#define ft_setjmp( b ) setjmp( *(ft_jmp_buf*) &(b) ) /* same thing here */
|
#define ft_setjmp( b ) setjmp( *(ft_jmp_buf*) &(b) ) /* same thing here */
|
||||||
|
|
||||||
|
|
||||||
/* the following is only used for debugging purposes, i.e., if */
|
|
||||||
/* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined */
|
|
||||||
|
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* FTSTDLIB_H_ */
|
#endif /* FTSTDLIB_H_ */
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user