From 6910b753bc25d494d627c347f18a87043cacb89a Mon Sep 17 00:00:00 2001 From: Tyler Young Date: Tue, 11 Feb 2025 21:36:35 -0500 Subject: [PATCH] CTR/PSP: Fix build error imposed by previous commit (#36) --- source/mathlib.c | 3 ++- source/wad.c | 8 ++++---- source/wii/gx/gx_rsurf.c | 2 -- source/wii/gx/gxquake.h | 4 +++- source/wii/main.c | 2 -- source/wii/system.c | 1 - 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/source/mathlib.c b/source/mathlib.c index 5ddc9a0..4505326 100644 --- a/source/mathlib.c +++ b/source/mathlib.c @@ -78,7 +78,8 @@ SinCos void SinCos( float radians, float *sine, float *cosine ) { #ifndef __PSP__ - sincos(radians, sine, cosine); + *sine = sin(radians); + *cosine = cos(radians); #else #ifdef PSP_VFPU diff --git a/source/wad.c b/source/wad.c index a24eb6c..930b41c 100644 --- a/source/wad.c +++ b/source/wad.c @@ -179,13 +179,13 @@ void WAD3_LoadTextureWadFile (char *filename) { lumpinfo_t *lumps, *lump_p; wadinfo_t header; int i, j, infotableofs, numlumps, lowmark; - FILE *file; + FILE *file = NULL; - if (COM_FOpenFile (va("textures/halflife/%s", filename), &file) != -1) + if (COM_FOpenFile (va("textures/halflife/%s", filename), (int *)file) != -1) goto loaded; - if (COM_FOpenFile (va("textures/%s", filename), &file) != -1) + if (COM_FOpenFile (va("textures/%s", filename), (int *)file) != -1) goto loaded; - if (COM_FOpenFile (filename, &file) != -1) + if (COM_FOpenFile (filename, (int *)file) != -1) goto loaded; Host_Error ("Couldn't load halflife wad \"%s\"\n", filename); diff --git a/source/wii/gx/gx_rsurf.c b/source/wii/gx/gx_rsurf.c index 1d0ba80..801e17b 100644 --- a/source/wii/gx/gx_rsurf.c +++ b/source/wii/gx/gx_rsurf.c @@ -868,7 +868,6 @@ void R_DrawBrushModel (entity_t *e) currententity = e; currenttexture0 = -1; - //currenttexture1 = -1; clmodel = e->model; @@ -1204,7 +1203,6 @@ void R_DrawWorld (void) currententity = &ent; currenttexture0 = -1; - //currenttexture1 = -1; //GX_Color4u8(255, 255, 255, 255); memset (lightmap_polys, 0, sizeof(lightmap_polys)); diff --git a/source/wii/gx/gxquake.h b/source/wii/gx/gxquake.h index 496176d..a2f89a1 100644 --- a/source/wii/gx/gxquake.h +++ b/source/wii/gx/gxquake.h @@ -20,6 +20,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include +#include + +#define QUAKE_WII_BASEDIR "/apps/nzportable" void GL_BeginRendering (int *x, int *y, int *width, int *height); void GL_EndRendering (void); @@ -174,7 +177,6 @@ extern int d_lightstylevalue[256]; // 8.8 fraction of base light value extern qboolean envmap; extern int currenttexture0; -extern int currenttexture1; extern int cnttextures[2]; extern int particletexture; extern int playertextures[MAX_SCOREBOARD]; diff --git a/source/wii/main.c b/source/wii/main.c index bbc73ba..52ca646 100644 --- a/source/wii/main.c +++ b/source/wii/main.c @@ -134,8 +134,6 @@ static void init() console_init(framebuffer[fb & 1], 20, 20, rmode->fbWidth, rmode->xfbHeight, rmode->fbWidth * 2); GL_Init(); - - //VIDEO_SetBlack(false); // Initialise the controller library. PAD_Init(); diff --git a/source/wii/system.c b/source/wii/system.c index c99d2e3..66d34b4 100644 --- a/source/wii/system.c +++ b/source/wii/system.c @@ -24,7 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include -#include #include #include #include