mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-14 18:15:28 -04:00
Fix a few compile errors with metrowerks
This commit is contained in:
parent
c5c18c7d98
commit
d7015cf2e9
@ -413,7 +413,7 @@ void LocalInterpComp_SetLocation(struct InterpComp* interp, struct LocationUpdat
|
||||
LocalInterpComp_Angle(&prev->Pitch, &next->Pitch, update->Pitch, interpolate);
|
||||
}
|
||||
if (flags & LOCATIONUPDATE_YAW) {
|
||||
LocalInterpComp_Angle(&prev->Yaw, &next->Yaw, update->Yaw, interpolate);
|
||||
LocalInterpComp_Angle(&prev->Yaw, &next->Yaw, update->Yaw, interpolate);
|
||||
}
|
||||
if (flags & LOCATIONUPDATE_ROTX) {
|
||||
LocalInterpComp_Angle(&prev->RotX, &next->RotX, update->RotX, interpolate);
|
||||
|
@ -1160,9 +1160,12 @@ static GLuint GL_GenAndBind(GLenum target) {
|
||||
}
|
||||
|
||||
GfxResourceID Gfx_CreateDynamicVb(VertexFormat fmt, int maxVertices) {
|
||||
GLuint id;
|
||||
cc_uint32 size;
|
||||
if (Gfx.LostContext) return 0;
|
||||
GLuint id = GL_GenAndBind(GL_ARRAY_BUFFER);
|
||||
cc_uint32 size = maxVertices * gfx_strideSizes[fmt];
|
||||
|
||||
id = GL_GenAndBind(GL_ARRAY_BUFFER);
|
||||
size = maxVertices * gfx_strideSizes[fmt];
|
||||
_glBufferData(GL_ARRAY_BUFFER, size, NULL, GL_DYNAMIC_DRAW);
|
||||
return id;
|
||||
}
|
||||
@ -1230,10 +1233,10 @@ cc_result Gfx_TakeScreenshot(struct Stream* output) {
|
||||
|
||||
void Gfx_GetApiInfo(String* lines) {
|
||||
static const String memExt = String_FromConst("GL_NVX_gpu_memory_info");
|
||||
int totalKb, curKb;
|
||||
GLint totalKb, curKb, depthBits;
|
||||
float total, cur;
|
||||
String extensions;
|
||||
int depthBits, pointerSize = sizeof(void*) * 8;
|
||||
int pointerSize = sizeof(void*) * 8;
|
||||
|
||||
glGetIntegerv(GL_DEPTH_BITS, &depthBits);
|
||||
String_Format1(&lines[0], "-- Using OpenGL (%i bit) --", &pointerSize);
|
||||
|
@ -629,7 +629,7 @@ cc_result File_Length(FileHandle file, cc_uint32* len) {
|
||||
*#########################################################################################################################*/
|
||||
#if defined CC_BUILD_WIN
|
||||
void Thread_Sleep(cc_uint32 milliseconds) { Sleep(milliseconds); }
|
||||
DWORD WINAPI Thread_StartCallback(void* param) {
|
||||
static DWORD WINAPI Thread_StartCallback(void* param) {
|
||||
Thread_StartFunc* func = (Thread_StartFunc*)param;
|
||||
(*func)();
|
||||
return 0;
|
||||
@ -711,7 +711,7 @@ void Waitable_Wait(void* handle) { }
|
||||
void Waitable_WaitFor(void* handle, cc_uint32 milliseconds) { }
|
||||
#elif defined CC_BUILD_POSIX
|
||||
void Thread_Sleep(cc_uint32 milliseconds) { usleep(milliseconds * 1000); }
|
||||
void* Thread_StartCallback(void* lpParam) {
|
||||
static void* Thread_StartCallback(void* lpParam) {
|
||||
Thread_StartFunc* func = (Thread_StartFunc*)lpParam;
|
||||
(*func)();
|
||||
return NULL;
|
||||
@ -1800,6 +1800,7 @@ int Platform_GetCommandLineArgs(int argc, STRING_REF char** argv, String* args)
|
||||
cc_result Platform_SetDefaultCurrentDirectory(int argc, char **argv) {
|
||||
char path[NATIVE_STR_LEN];
|
||||
int i, len = 0;
|
||||
cc_result res;
|
||||
|
||||
for (i = 1; i < argc; ++i) {
|
||||
if (strlen(argv[i]) > 2 && argv[i][0] == '-' && argv[i][1] == 'd') {
|
||||
@ -1812,7 +1813,7 @@ cc_result Platform_SetDefaultCurrentDirectory(int argc, char **argv) {
|
||||
return chdir(Platform_DefaultDirectory + 2) == -1 ? errno : 0;
|
||||
}
|
||||
|
||||
cc_result res = Process_RawGetExePath(path, &len);
|
||||
res = Process_RawGetExePath(path, &len);
|
||||
if (res) return res;
|
||||
|
||||
/* get rid of filename at end of directory */
|
||||
|
Loading…
x
Reference in New Issue
Block a user