summaryrefslogtreecommitdiffstats
path: root/apps/plugins/sdl/progs/wolf3d
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-04-04 20:24:33 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-04-11 19:29:47 +0200
commite28d1fe91671f64ce30d6e439787a48d71de5616 (patch)
treef787aaac6e894abf7e3f4144cd1b827e65db673d /apps/plugins/sdl/progs/wolf3d
parent2ad6c3438e53ddaa80c0aa43e995376495ce1a77 (diff)
downloadrockbox-e28d1fe91671f64ce30d6e439787a48d71de5616.tar.gz
rockbox-e28d1fe91671f64ce30d6e439787a48d71de5616.tar.bz2
rockbox-e28d1fe91671f64ce30d6e439787a48d71de5616.zip
SDL: Silence a large number of compile warnings (WIP)
There are some real bugs in here, but we're drowning in warnings. Change-Id: I7c2c0eafc8426327521bdd8a3ac2d3742ac16864
Diffstat (limited to 'apps/plugins/sdl/progs/wolf3d')
-rw-r--r--apps/plugins/sdl/progs/wolf3d/id_in.h10
-rw-r--r--apps/plugins/sdl/progs/wolf3d/id_pm.h16
-rw-r--r--apps/plugins/sdl/progs/wolf3d/id_us.h2
-rw-r--r--apps/plugins/sdl/progs/wolf3d/id_vh.h4
-rw-r--r--apps/plugins/sdl/progs/wolf3d/wl_def.h14
-rw-r--r--apps/plugins/sdl/progs/wolf3d/wl_draw.c8
-rw-r--r--apps/plugins/sdl/progs/wolf3d/wl_menu.h4
7 files changed, 29 insertions, 29 deletions
diff --git a/apps/plugins/sdl/progs/wolf3d/id_in.h b/apps/plugins/sdl/progs/wolf3d/id_in.h
index 90e0c05109..31c79ef61b 100644
--- a/apps/plugins/sdl/progs/wolf3d/id_in.h
+++ b/apps/plugins/sdl/progs/wolf3d/id_in.h
@@ -165,12 +165,12 @@ extern ScanCode IN_WaitForKey(void);
extern word IN_GetJoyButtonsDB(word joy);
extern const char *IN_GetScanName(ScanCode);
-void IN_WaitAndProcessEvents();
-void IN_ProcessEvents();
+void IN_WaitAndProcessEvents(void);
+void IN_ProcessEvents(void);
int IN_MouseButtons (void);
-boolean IN_JoyPresent();
+boolean IN_JoyPresent(void);
void IN_SetJoyCurrent(int joyIndex);
int IN_JoyButtons (void);
void IN_GetJoyDelta(int *dx,int *dy);
@@ -178,6 +178,6 @@ void IN_GetJoyFineDelta(int *dx, int *dy);
void IN_StartAck(void);
boolean IN_CheckAck (void);
-bool IN_IsInputGrabbed();
-void IN_CenterMouse();
+bool IN_IsInputGrabbed(void);
+void IN_CenterMouse(void);
#endif
diff --git a/apps/plugins/sdl/progs/wolf3d/id_pm.h b/apps/plugins/sdl/progs/wolf3d/id_pm.h
index bbedb78c78..f8c4ae26b0 100644
--- a/apps/plugins/sdl/progs/wolf3d/id_pm.h
+++ b/apps/plugins/sdl/progs/wolf3d/id_pm.h
@@ -17,40 +17,40 @@ extern bool PMSoundInfoPagePadded;
// The last pointer points one byte after the last page.
extern uint8_t **PMPages;
-void PM_Startup();
-void PM_Shutdown();
+void PM_Startup(void);
+void PM_Shutdown(void);
-static uint32_t PM_GetPageSize(int page)
+static inline uint32_t PM_GetPageSize(int page)
{
if(page < 0 || page >= ChunksInFile)
Quit("PM_GetPageSize: Tried to access illegal page: %i", page);
return (uint32_t) (PMPages[page + 1] - PMPages[page]);
}
-static uint8_t *PM_GetPage(int page)
+static inline uint8_t *PM_GetPage(int page)
{
if(page < 0 || page >= ChunksInFile)
Quit("PM_GetPage: Tried to access illegal page: %i", page);
return PMPages[page];
}
-static uint8_t *PM_GetEnd()
+static inline uint8_t *PM_GetEnd(void)
{
return PMPages[ChunksInFile];
}
-static byte *PM_GetTexture(int wallpic)
+static inline byte *PM_GetTexture(int wallpic)
{
return PM_GetPage(wallpic);
}
-static uint16_t *PM_GetSprite(int shapenum)
+static inline uint16_t *PM_GetSprite(int shapenum)
{
// correct alignment is enforced by PM_Startup()
return (uint16_t *) (void *) PM_GetPage(PMSpriteStart + shapenum);
}
-static byte *PM_GetSound(int soundpagenum)
+static inline byte *PM_GetSound(int soundpagenum)
{
return PM_GetPage(PMSoundStart + soundpagenum);
}
diff --git a/apps/plugins/sdl/progs/wolf3d/id_us.h b/apps/plugins/sdl/progs/wolf3d/id_us.h
index 84958631f7..6a1f7ea3ff 100644
--- a/apps/plugins/sdl/progs/wolf3d/id_us.h
+++ b/apps/plugins/sdl/progs/wolf3d/id_us.h
@@ -96,6 +96,6 @@ void USL_PrintInCenter(const char *s,Rect r);
char *USL_GiveSaveName(word game);
void US_InitRndT(int randomize);
-int US_RndT();
+int US_RndT(void);
#endif
diff --git a/apps/plugins/sdl/progs/wolf3d/id_vh.h b/apps/plugins/sdl/progs/wolf3d/id_vh.h
index 814e28d49c..fc9f738fe9 100644
--- a/apps/plugins/sdl/progs/wolf3d/id_vh.h
+++ b/apps/plugins/sdl/progs/wolf3d/id_vh.h
@@ -64,7 +64,7 @@ void VWB_Vlin (int y1, int y2, int x, int color);
#define VWB_HlinScaledCoord VW_Hlin
#define VWB_VlinScaledCoord VW_Vlin
-void VH_UpdateScreen();
+void VH_UpdateScreen(void);
#define VW_UpdateScreen VH_UpdateScreen
//
@@ -91,7 +91,7 @@ void LatchDrawPic (unsigned x, unsigned y, unsigned picnum);
void LatchDrawPicScaledCoord (unsigned scx, unsigned scy, unsigned picnum);
void LoadLatchMem (void);
-void VH_Startup();
+void VH_Startup(void);
boolean FizzleFade (SDL_Surface *source, int x1, int y1,
unsigned width, unsigned height, unsigned frames, boolean abortable);
diff --git a/apps/plugins/sdl/progs/wolf3d/wl_def.h b/apps/plugins/sdl/progs/wolf3d/wl_def.h
index af74a5315c..63cd22f4e8 100644
--- a/apps/plugins/sdl/progs/wolf3d/wl_def.h
+++ b/apps/plugins/sdl/progs/wolf3d/wl_def.h
@@ -961,7 +961,7 @@ void DrawPlayBorder (void);
void DrawStatusBorder (byte color);
void DrawPlayScreen (void);
void DrawPlayBorderSides (void);
-void ShowActStatus();
+void ShowActStatus(void);
void PlayDemo (int demonumber);
void RecordDemo (void);
@@ -1372,7 +1372,7 @@ void GP2X_ButtonUp(int button);
=============================================================================
*/
-static fixed FixedMul(fixed a, fixed b)
+static inline fixed FixedMul(fixed a, fixed b)
{
return (fixed)(((int64_t)a * b + 0x8000) >> 16);
}
@@ -1394,13 +1394,13 @@ static fixed FixedMul(fixed a, fixed b)
#define CHECKMALLOCRESULT(x) if(!(x)) Quit("Out of memory at %s:%i", __FILE__, __LINE__)
-static char* itoa(int value, char* string, int radix)
+static inline char* itoa(int value, char* string, int radix)
{
sprintf(string, "%d", value);
return string;
}
-static char* ltoa(long value, char* string, int radix)
+static inline char* ltoa(long value, char* string, int radix)
{
sprintf(string, "%ld", value);
return string;
@@ -1409,14 +1409,14 @@ static char* ltoa(long value, char* string, int radix)
#define lengthof(x) (sizeof(x) / sizeof(*(x)))
#define endof(x) ((x) + lengthof(x))
-static word READWORD(byte **ptr)
+static inline word READWORD(byte **ptr)
{
word val = (*ptr)[0] | (*ptr)[1] << 8;
*ptr += 2;
return val;
}
-static longword READLONGWORD(byte **ptr)
+static inline longword READLONGWORD(byte **ptr)
{
longword val = (*ptr)[0] | (*ptr)[1] << 8 | (*ptr)[2] << 16 | (*ptr)[3] << 24;
*ptr += 4;
@@ -1454,7 +1454,7 @@ static longword READLONGWORD(byte **ptr)
*************************************************************/
// The feature flags are stored as a wall in the upper right corner of each level
- static word GetFeatureFlags()
+ static inline word GetFeatureFlags()
{
return ffDataTopRight;
}
diff --git a/apps/plugins/sdl/progs/wolf3d/wl_draw.c b/apps/plugins/sdl/progs/wolf3d/wl_draw.c
index 625e93dc0a..09db5af05d 100644
--- a/apps/plugins/sdl/progs/wolf3d/wl_draw.c
+++ b/apps/plugins/sdl/progs/wolf3d/wl_draw.c
@@ -251,7 +251,7 @@ boolean TransformTile (int tx, int ty, short *dispx, short *dispheight)
====================
*/
-int CalcHeight()
+int CalcHeight(void)
{
fixed z = FixedMul(xintercept - viewx, viewcos)
- FixedMul(yintercept - viewy, viewsin);
@@ -275,7 +275,7 @@ byte *postsource;
int postx;
int postwidth;
-void ScalePost()
+void ScalePost(void)
{
int ywcount, yoffs, yw, yd, yendoffs;
byte col;
@@ -1091,7 +1091,7 @@ void CalcTics (void)
//==========================================================================
-void AsmRefresh()
+void AsmRefresh(void)
{
int32_t xstep,ystep;
longword xpartial,ypartial;
@@ -1517,7 +1517,7 @@ void WallRefresh (void)
ScalePost (); // no more optimization on last post
}
-void CalcViewVariables()
+void CalcViewVariables(void)
{
viewangle = player->angle;
midangle = viewangle*(FINEANGLES/ANGLES);
diff --git a/apps/plugins/sdl/progs/wolf3d/wl_menu.h b/apps/plugins/sdl/progs/wolf3d/wl_menu.h
index c56fd7f576..2d5a5fe4c3 100644
--- a/apps/plugins/sdl/progs/wolf3d/wl_menu.h
+++ b/apps/plugins/sdl/progs/wolf3d/wl_menu.h
@@ -118,10 +118,10 @@ extern CP_iteminfo MainItems;
void US_ControlPanel(ScanCode);
-void EnableEndGameMenuItem();
+void EnableEndGameMenuItem(void);
void SetupControlPanel(void);
-void SetupSaveGames();
+void SetupSaveGames(void);
void CleanupControlPanel(void);
void DrawMenu(CP_iteminfo *item_i,CP_itemtype *items);