diff --git a/engine/include/GearSrc/MachDep.h b/engine/include/GearSrc/MachDep.h index 663f41b..1d14942 100644 --- a/engine/include/GearSrc/MachDep.h +++ b/engine/include/GearSrc/MachDep.h @@ -7,10 +7,6 @@ #include #include -#ifdef _GEARSRC -#include -#endif - #if defined(_GEARSRC) && defined(_WIN32) #define GSDECL extern __declspec(dllexport) #elif defined(_WIN32) diff --git a/engine/include/GearSrc/TypeDefs.h b/engine/include/GearSrc/TypeDefs.h index 242fdfe..247bd92 100644 --- a/engine/include/GearSrc/TypeDefs.h +++ b/engine/include/GearSrc/TypeDefs.h @@ -4,15 +4,15 @@ #include #if defined(_MSC_VER) || defined(__WATCOMC__) -typedef __int8_t GSI8; -typedef __int16_t GSI16; -typedef __int32_t GSI32; -typedef __int64_t GSI64; +typedef __int8 GSI8; +typedef __int16 GSI16; +typedef __int32 GSI32; +typedef __int64 GSI64; -typedef unsigned __int8_t GSU8; -typedef unsigned __int16_t GSU16; -typedef unsigned __int32_t GSU32; -typedef unsigned __int64_t GSU64; +typedef unsigned __int8 GSU8; +typedef unsigned __int16 GSU16; +typedef unsigned __int32 GSU32; +typedef unsigned __int64 GSU64; #elif __STDC_VERSION__ >= 199901L #include diff --git a/engine/src/client.c b/engine/src/client.c index c228148..900bdab 100644 --- a/engine/src/client.c +++ b/engine/src/client.c @@ -46,6 +46,8 @@ static void scene(GSClient client) { } void GSClientStep(GSClient client) { + static double r = 0; + GSGLClear(client->gl); GSGLCameraSetup(client->gl); GSGLSetLight(client->gl); @@ -61,8 +63,6 @@ void GSClientStep(GSClient client) { client->engine->param->gl_swapbuffer(); - static double r = 0; - client->look_at[0] = 5 + cos(r) * 5; client->look_at[2] = 5 + sin(r) * 5; diff --git a/engine/src/file.c b/engine/src/file.c index 883b53b..09bdd87 100644 --- a/engine/src/file.c +++ b/engine/src/file.c @@ -66,7 +66,11 @@ int GSFileRead(GSFile file, void* out, int size) { memcpy(out, file->data + file->seek, len); file->seek += len; + + return len; } + + return 0; } void GSFileSeek(GSFile file, int pos) {