diff --git a/readme.md b/readme.md index d9924035c..bcf57a05f 100644 --- a/readme.md +++ b/readme.md @@ -4,7 +4,7 @@ ClassiCube is a custom Minecraft Classic and ClassiCube client written in C that ![screenshot_n](http://i.imgur.com/FCiwl27.png) -You can grab the latest stable binaries [from here](https://www.classicube.net/download/) and the very latest builds [from here](https://www.classicube.net/nightlies/). +You can download the game [from here](https://www.classicube.net/download/) and the very latest builds [from here](https://www.classicube.net/nightlies/). #### What ClassiCube is * A complete re-implementation of Minecraft Classic, with optional additions. diff --git a/src/Graphics.c b/src/Graphics.c index cbae50271..4f4cea6cf 100644 --- a/src/Graphics.c +++ b/src/Graphics.c @@ -946,7 +946,7 @@ void Gfx_SetDynamicVbData(GfxResourceID vb, void* vertices, int vCount) { *#########################################################################################################################*/ static D3DTRANSFORMSTATETYPE matrix_modes[2] = { D3DTS_PROJECTION, D3DTS_VIEW }; -void Gfx_LoadMatrix(MatrixType type, struct Matrix* matrix) { +void Gfx_LoadMatrix(MatrixType type, const struct Matrix* matrix) { if (Gfx.LostContext) return; IDirect3DDevice9_SetTransform(device, matrix_modes[type], (const D3DMATRIX*)matrix); } @@ -1887,7 +1887,7 @@ void Gfx_SetFogMode(FogFunc func) { void Gfx_SetTexturing(cc_bool enabled) { } void Gfx_SetAlphaTest(cc_bool enabled) { gfx_alphaTest = enabled; SwitchProgram(); } -void Gfx_LoadMatrix(MatrixType type, struct Matrix* matrix) { +void Gfx_LoadMatrix(MatrixType type, const struct Matrix* matrix) { if (type == MATRIX_VIEW) _view = *matrix; if (type == MATRIX_PROJECTION) _proj = *matrix; @@ -2061,9 +2061,9 @@ void Gfx_SetAlphaTest(cc_bool enabled) { gl_Toggle(GL_ALPHA_TEST); } static GLenum matrix_modes[3] = { GL_PROJECTION, GL_MODELVIEW, GL_TEXTURE }; static int lastMatrix; -void Gfx_LoadMatrix(MatrixType type, struct Matrix* matrix) { +void Gfx_LoadMatrix(MatrixType type, const struct Matrix* matrix) { if (type != lastMatrix) { lastMatrix = type; glMatrixMode(matrix_modes[type]); } - glLoadMatrixf((float*)matrix); + glLoadMatrixf((const float*)matrix); } void Gfx_LoadIdentityMatrix(MatrixType type) { diff --git a/src/Graphics.h b/src/Graphics.h index b3a630ba0..05925f27a 100644 --- a/src/Graphics.h +++ b/src/Graphics.h @@ -175,7 +175,7 @@ CC_API void Gfx_DrawVb_IndexedTris(int verticesCount); void Gfx_DrawIndexedTris_T2fC4b(int verticesCount, int startVertex); /* Loads the given matrix over the currently active matrix. */ -CC_API void Gfx_LoadMatrix(MatrixType type, struct Matrix* matrix); +CC_API void Gfx_LoadMatrix(MatrixType type, const struct Matrix* matrix); /* Loads the identity matrix over the currently active matrix. */ CC_API void Gfx_LoadIdentityMatrix(MatrixType type); CC_API void Gfx_EnableTextureOffset(float x, float y); diff --git a/src/Platform.c b/src/Platform.c index 9cff289e3..7fc73fcc1 100644 --- a/src/Platform.c +++ b/src/Platform.c @@ -902,7 +902,7 @@ static cc_result Socket_ioctl(cc_socket s, cc_uint32 cmd, int* data) { #endif } -cc_result Socket_Available(cc_socket s, cc_uint32* available) { +cc_result Socket_Available(cc_socket s, int* available) { return Socket_ioctl(s, FIONREAD, available); } cc_result Socket_SetBlocking(cc_socket s, cc_bool blocking) { diff --git a/src/Platform.h b/src/Platform.h index d754d5efa..6af2f0a9e 100644 --- a/src/Platform.h +++ b/src/Platform.h @@ -221,7 +221,7 @@ void Platform_LoadSysFonts(void); /* Allocates a new socket. */ CC_API cc_result Socket_Create(cc_socket* s); /* Returns how much data is available to be read from the given socket. */ -CC_API cc_result Socket_Available(cc_socket s, cc_uint32* available); +CC_API cc_result Socket_Available(cc_socket s, int* available); /* Sets whether operations on the given socket block the calling thread. */ /* e.g. if blocking is on, calling Connect() blocks until a response is received. */ CC_API cc_result Socket_SetBlocking(cc_socket s, cc_bool blocking); diff --git a/src/Server.c b/src/Server.c index 5b1cdfd2f..d0bc5cfd3 100644 --- a/src/Server.c +++ b/src/Server.c @@ -351,7 +351,7 @@ static void MPConnection_CheckDisconnection(void) { static const cc_string title = String_FromConst("Disconnected!"); static const cc_string reason = String_FromConst("You've lost connection to the server"); cc_result availRes, selectRes; - cc_uint32 pending = 0; + int pending = 0; cc_bool poll_read; availRes = Socket_Available(net_socket, &pending);