Less warnings and slightly improve readme

This commit is contained in:
UnknownShadow200 2021-03-04 19:06:16 +11:00
parent c61bc528a0
commit e60e852eee
6 changed files with 9 additions and 9 deletions

View file

@ -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.

View file

@ -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) {

View file

@ -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);

View file

@ -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) {

View file

@ -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);

View file

@ -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);