summaryrefslogtreecommitdiff
path: root/plugins/gxvideo
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/gxvideo')
-rw-r--r--plugins/gxvideo/cfg.c12
-rw-r--r--plugins/gxvideo/draw.c28
-rw-r--r--plugins/gxvideo/fps.c2
-rw-r--r--plugins/gxvideo/gpu.c50
-rw-r--r--plugins/gxvideo/gpucfg/main.c36
-rw-r--r--plugins/gxvideo/key.c1
-rw-r--r--plugins/gxvideo/menu.c9
-rw-r--r--plugins/gxvideo/prim.c92
-rw-r--r--plugins/gxvideo/soft.c204
9 files changed, 208 insertions, 226 deletions
diff --git a/plugins/gxvideo/cfg.c b/plugins/gxvideo/cfg.c
index ffe0ff0e..2274c529 100644
--- a/plugins/gxvideo/cfg.c
+++ b/plugins/gxvideo/cfg.c
@@ -29,7 +29,7 @@
#define DEFAULT_CFG_NAME "gxvideo.cfg"
-int get_int_value (char const * file_buffer, char const * name, int dflt) {
+static int get_int_value (char const * file_buffer, char const * name, int dflt) {
char * p = strstr(file_buffer, name);
if (p != NULL) {
p += strlen(name);
@@ -41,7 +41,7 @@ int get_int_value (char const * file_buffer, char const * name, int dflt) {
return dflt;
}
-double get_double_value(char const * file_buffer, char const * name,
+static double get_double_value(char const * file_buffer, char const * name,
double dflt) {
char * p = strstr(file_buffer, name);
if (p != NULL) {
@@ -54,15 +54,15 @@ double get_double_value(char const * file_buffer, char const * name,
return dflt;
}
-void write_int_value (FILE * f, char const * name, int val) {
+static void write_int_value (FILE * f, char const * name, int val) {
fprintf(f, "%s = %d\n", name, val);
}
-void write_double_value (FILE * f, char const * name, double val) {
+static void write_double_value (FILE * f, char const * name, double val) {
fprintf(f, "%s = %.1f\n", name, val);
}
-void ReadConfigFile() {
+static void ReadConfigFile() {
struct stat buf;
FILE * f_in;
char cfg_file_name[256];
@@ -153,7 +153,7 @@ void ReadConfigFile() {
free(file_buffer);
}
-void ExecCfg(char const * arg) {
+static void ExecCfg(char const * arg) {
char cfg[256];
struct stat buf;
diff --git a/plugins/gxvideo/draw.c b/plugins/gxvideo/draw.c
index c8d6c7e0..a83e429b 100644
--- a/plugins/gxvideo/draw.c
+++ b/plugins/gxvideo/draw.c
@@ -38,7 +38,7 @@ enum {
gxv_blit_t available_port[GXV_MAX_PORT];
/* Convert RGB to YUV */
-inline uint32_t rgb_to_yuv(uint8_t R, uint8_t G, uint8_t B) {
+static inline uint32_t rgb_to_yuv(uint8_t R, uint8_t G, uint8_t B) {
uint8_t Y, U, V;
Y = abs(R * 2104 + G * 4130 + B * 802 + 4096 + 131072) >> 13;
Y = MIN(Y, 235);
@@ -49,7 +49,7 @@ inline uint32_t rgb_to_yuv(uint8_t R, uint8_t G, uint8_t B) {
return Y << 24 | V << 16 | Y << 8 | U;
}
-inline uint32_t rgb_to_yuv2(uint8_t R0, uint8_t G0, uint8_t B0, uint8_t R1,
+static inline uint32_t rgb_to_yuv2(uint8_t R0, uint8_t G0, uint8_t B0, uint8_t R1,
uint8_t G1, uint8_t B1) {
int32_t Y0, U0, V0;
int32_t Y1, U1, V1;
@@ -97,7 +97,7 @@ static Atom xv_intern_atom_if_exists(Display *display, char const * atom_name) {
// close display
-void DestroyDisplay(void) {
+static void DestroyDisplay(void) {
if (g_draw.display) {
XFreeColormap(g_draw.display, g_draw.colormap);
if (g_draw.hGC) {
@@ -136,7 +136,7 @@ void DestroyDisplay(void) {
// Create display
-void create_display(void) {
+static void create_display(void) {
//fprintf(stderr, "Entering %s\n", __FUNCTION__);
XSetWindowAttributes winattr;
int myscreen;
@@ -427,15 +427,17 @@ void create_display(void) {
return;
}
-int rgb_check_port(XvImageFormatValues const * fo) {
+#if 0
+static int rgb_check_port(XvImageFormatValues const * fo) {
if (fo->type == XvRGB && fo->bits_per_pixel == 32) {
g_draw.xv_id = fo->id;
return 1;
}
return 0;
}
+#endif
-void rgb_blit_16(int8_t * buff, int32_t x, int32_t y, int32_t w, int32_t h) {
+static void rgb_blit_16(int8_t * buff, int32_t x, int32_t y, int32_t w, int32_t h) {
//fprintf(stderr, "BlitToYUV\n");
int16_t * src_pxl;
int8_t * dst_pxl;
@@ -457,7 +459,7 @@ void rgb_blit_16(int8_t * buff, int32_t x, int32_t y, int32_t w, int32_t h) {
}
}
-void rgb_blit_24(int8_t * buff, int32_t x, int32_t y, int32_t w, int32_t h) {
+static void rgb_blit_24(int8_t * buff, int32_t x, int32_t y, int32_t w, int32_t h) {
//fprintf(stderr, "BlitToYUV\n");
int8_t * src_pxl;
int8_t * dst_pxl;
@@ -479,7 +481,8 @@ void rgb_blit_24(int8_t * buff, int32_t x, int32_t y, int32_t w, int32_t h) {
}
}
-int yuyv_check_port(XvImageFormatValues * fo) {
+#if 0
+static int yuyv_check_port(XvImageFormatValues * fo) {
if (fo->type == XvYUV && fo->bits_per_pixel == 16 && fo->format == XvPacked
&& strncmp("UYVY", fo->component_order, 4) == 0) {
g_draw.xv_id = fo->id;
@@ -487,8 +490,9 @@ int yuyv_check_port(XvImageFormatValues * fo) {
}
return 0;
}
+#endif
-void yuyv_blit_24(int8_t * buff, int32_t x, int32_t y, int32_t w, int32_t h) {
+static void yuyv_blit_24(int8_t * buff, int32_t x, int32_t y, int32_t w, int32_t h) {
//fprintf(stderr, "yuyv_blit_24 %d %d %d %d\n", x, y, w, h);
uint8_t * src_pxl;
int8_t R0, G0, B0;
@@ -516,7 +520,7 @@ void yuyv_blit_24(int8_t * buff, int32_t x, int32_t y, int32_t w, int32_t h) {
}
}
-void yuyv_blit_16(int8_t * buff, int32_t x, int32_t y, int32_t w, int32_t h) {
+static void yuyv_blit_16(int8_t * buff, int32_t x, int32_t y, int32_t w, int32_t h) {
//fprintf(stderr, "yuyv_blit_16 %d %d %d %d\n", x, y, w, h);
int8_t R0, G0, B0;
int8_t R1, G1, B1;
@@ -552,7 +556,7 @@ void yuyv_blit_16(int8_t * buff, int32_t x, int32_t y, int32_t w, int32_t h) {
* The aspect of the psx output mode is preserved.
* Note: dest dx,dy,dw,dh are both input and output variables
*/
-inline void maintain_aspect(uint32_t * dx, uint32_t * dy, uint32_t * dw,
+static inline void maintain_aspect(uint32_t * dx, uint32_t * dy, uint32_t * dw,
uint32_t * dh, int32_t w, int32_t h) {
double ratio_x = ((double) *dw) / ((double) w);
@@ -667,7 +671,7 @@ void do_clear_screen_buffer(void) // CLEAR DX BUFFER
XClearWindow(g_draw.display, g_draw.window);
}
-void Xcleanup() // X CLEANUP
+static void Xcleanup() // X CLEANUP
{
//CloseMenu();
}
diff --git a/plugins/gxvideo/fps.c b/plugins/gxvideo/fps.c
index 151ff72e..f53800ff 100644
--- a/plugins/gxvideo/fps.c
+++ b/plugins/gxvideo/fps.c
@@ -27,7 +27,7 @@
#define TIMEBASE 100000
-unsigned long time_get_time() {
+static unsigned long time_get_time() {
struct timeval tv;
gettimeofday(&tv, 0); // well, maybe there are better ways
return tv.tv_sec * 100000 + tv.tv_usec / 10; // to do that, but at least it works
diff --git a/plugins/gxvideo/gpu.c b/plugins/gxvideo/gpu.c
index 590bdb8c..85b003bd 100644
--- a/plugins/gxvideo/gpu.c
+++ b/plugins/gxvideo/gpu.c
@@ -27,6 +27,7 @@
#include "globals.h"
#include "gpu.h"
#include "swap.h"
+#include "psemu_plugin_defs.h"
#define CALLBACK
@@ -47,16 +48,6 @@
#define MIN(a,b) ((a) > (b) ? (b) : (a))
#define MAX(a,b) ((a) < (b) ? (b) : (a))
-#ifdef ENABLE_NLS
-#include <libintl.h>
-#include <locale.h>
-#define _(x) gettext(x)
-#define N_(x) (x)
-#else
-#define _(x) (x)
-#define N_(x) (x)
-#endif
-
////////////////////////////////////////////////////////////////////////
// PPDK developer must change libraryName field and can change revision and build
////////////////////////////////////////////////////////////////////////
@@ -66,7 +57,9 @@ unsigned char const revision = 0;
unsigned char const build = 0; // increase that with each version
static char const * libraryName = N_("GXVideo Driver");
+#if 0
static char const * libraryInfo = N_("GXvideo Driver v1.00");
+#endif
//static char const * PluginAuthor =
// N_("gschwind (rewrite from Pete Bernert and the P.E.Op.S. team)");
@@ -105,9 +98,11 @@ unsigned long CALLBACK PSEgetLibVersion(void) {
return version << 16 | revision << 8 | build;
}
+#if 0
char * GPUgetLibInfos(void) {
return _(libraryInfo);
}
+#endif
////////////////////////////////////////////////////////////////////////
// Snapshot func
@@ -785,7 +780,7 @@ void CALLBACK GPUwriteStatus(uint32_t gdata) {
// vram read/write helpers, needed by LEWPY's optimized vram read/write :)
////////////////////////////////////////////////////////////////////////
-inline void FinishedVRAMWrite(void) {
+static inline void FinishedVRAMWrite(void) {
// Set register to NORMAL operation
g_gpu.DataWriteMode = DR_NORMAL;
// Reset transfer values, to prevent mis-transfer of data
@@ -797,7 +792,7 @@ inline void FinishedVRAMWrite(void) {
g_gpu.VRAMWrite.RowsRemaining = 0;
}
-inline void FinishedVRAMRead(void) {
+static inline void FinishedVRAMRead(void) {
// Set register to NORMAL operation
g_gpu.DataReadMode = DR_NORMAL;
// Reset transfer values, to prevent mis-transfer of data
@@ -1100,6 +1095,7 @@ void CALLBACK GPUwriteData(uint32_t gdata) {
// this functions will be removed soon (or 'soonish')... not really needed, but some emus want them
////////////////////////////////////////////////////////////////////////
+#if 0
void CALLBACK GPUsetMode(unsigned long gdata) {
// Peops does nothing here...
// DataWriteMode=(gdata&1)?DR_VRAMTRANSFER:DR_NORMAL;
@@ -1115,6 +1111,7 @@ long CALLBACK GPUgetMode(void) {
iT |= 0x2;
return iT;
}
+#endif
////////////////////////////////////////////////////////////////////////
// call config dlg
@@ -1129,9 +1126,11 @@ long CALLBACK GPUconfigure(void) {
// sets all kind of act fixes
////////////////////////////////////////////////////////////////////////
+#if 0
void SetFixes(void) {
}
+#endif
////////////////////////////////////////////////////////////////////////
// process gpu commands
@@ -1139,7 +1138,7 @@ void SetFixes(void) {
unsigned long lUsedAddr[3];
-inline char CheckForEndlessLoop(unsigned long laddr) {
+static inline char CheckForEndlessLoop(unsigned long laddr) {
if (laddr == lUsedAddr[1])
return 1;
if (laddr == lUsedAddr[2])
@@ -1212,15 +1211,6 @@ long CALLBACK GPUtest(void) {
// Freeze
////////////////////////////////////////////////////////////////////////
-typedef struct GPUFREEZETAG {
- uint32_t ulFreezeVersion; // should be always 1 for now (set by main emu)
- uint32_t ulStatus; // current gpu status
- uint32_t ulControl[256]; // latest control register values
- unsigned char psxVRam[1024 * 1024 * 2]; // current VRam image (full 2 MB for ZN)
-} GPUFreeze_t;
-
-////////////////////////////////////////////////////////////////////////
-
long CALLBACK GPUfreeze(uint32_t ulGetFreezeData, GPUFreeze_t * pF) {
//----------------------------------------------------//
if (ulGetFreezeData == 2) // 2: info, which save slot is selected? (just for display)
@@ -1422,7 +1412,8 @@ unsigned char cFont[10][120] = {
////////////////////////////////////////////////////////////////////////
-void PaintPicDot(unsigned char * p, unsigned char c) {
+#if 0
+static void PaintPicDot(unsigned char * p, unsigned char c) {
if (c == 0) {
*p++ = 0x00;
@@ -1444,6 +1435,7 @@ void PaintPicDot(unsigned char * p, unsigned char c) {
} // red
// transparent
}
+#endif
////////////////////////////////////////////////////////////////////////
// the main emu allocs 128x96x3 bytes, and passes a ptr
@@ -1455,9 +1447,7 @@ void PaintPicDot(unsigned char * p, unsigned char c) {
// rendered picture
// LINUX version:
-//extern char * Xpixels;
-
-void GPUgetScreenPic(unsigned char * pMem) {
+long GPUgetScreenPic(unsigned char * pMem) {
/*
unsigned short c;unsigned char * pf;int x,y;
@@ -1525,6 +1515,7 @@ void GPUgetScreenPic(unsigned char * pMem) {
pf+=127*3; // offset to next line
}
*/
+ return -1;
}
////////////////////////////////////////////////////////////////////////
@@ -1535,16 +1526,19 @@ void GPUgetScreenPic(unsigned char * pMem) {
// release your picture data and stop displaying
// the screen pic
-void CALLBACK GPUshowScreenPic(unsigned char * pMem) {
+long CALLBACK GPUshowScreenPic(unsigned char * pMem) {
DestroyPic(); // destroy old pic data
if (pMem == 0)
- return; // done
+ return 0; // done
CreatePic(pMem); // create new pic... don't free pMem or something like that... just read from it
+ return 0;
}
+#if 0
void CALLBACK GPUsetfix(uint32_t dwFixBits) {
g_prim.dwEmuFixes = dwFixBits;
}
+#endif
void CALLBACK GPUvBlank(int val) {
//fprintf(stderr, "Vblanc %d\n", val);
diff --git a/plugins/gxvideo/gpucfg/main.c b/plugins/gxvideo/gpucfg/main.c
index b224f959..326eb1d8 100644
--- a/plugins/gxvideo/gpucfg/main.c
+++ b/plugins/gxvideo/gpucfg/main.c
@@ -67,49 +67,29 @@ typedef struct {
void save_config(cfg_window_t *);
-/* This function checks for the value being outside the accepted range,
- and returns the appropriate boundary value */
-int set_limit(char *p, int len, int lower, int upper) {
- int val = 0;
-
- if (p)
- val = atoi(p + len);
- /* printf("Checking for val %d greater than %d and lower than %d, ", val, lower, upper);*/
- if (val < lower)
- val = lower;
- if (val > upper)
- val = upper;
- /* printf ("val is now %d\n", val);*/
- return val;
-}
-
-void on_about_clicked(GtkWidget * widget, gpointer user_data) {
+static void on_about_clicked(GtkWidget * widget, gpointer user_data) {
gtk_widget_destroy(widget);
exit(0);
}
-void set_widget_sensitive(GtkWidget * widget, gboolean * state) {
- gtk_widget_set_sensitive(widget, *state);
-}
-
-void on_fullscreen_toggled(GtkWidget * widget, cfg_window_t * w) {
+static void on_fullscreen_toggled(GtkWidget * widget, cfg_window_t * w) {
gtk_widget_set_sensitive(w->resolution_combobox,
!gtk_toggle_button_get_active(
GTK_TOGGLE_BUTTON(w->fullscreen_checkbutton)));
}
-void update_fixes_stase(GtkWidget * ths, GtkWidget * w) {
+static void update_fixes_stase(GtkWidget * ths, GtkWidget * w) {
gtk_widget_set_sensitive(ths, gtk_toggle_button_get_active(
GTK_TOGGLE_BUTTON(w)));
}
-void on_use_fixes_toggled(GtkWidget * widget, cfg_window_t * w) {
+static void on_use_fixes_toggled(GtkWidget * widget, cfg_window_t * w) {
/* Set the state of each of the fixes to the value of the use fixes toggle */
gtk_container_foreach(GTK_CONTAINER (w->fixes_table),
(GtkCallback) update_fixes_stase, w->use_game_fixes_checkbutton);
}
-void on_fps_toggled(GtkWidget * widget, cfg_window_t * w) {
+static void on_fps_toggled(GtkWidget * widget, cfg_window_t * w) {
gboolean state_set_fps = gtk_toggle_button_get_active(
GTK_TOGGLE_BUTTON(w->set_fps_checkbutton));
gboolean state_auto_fps_limit = gtk_toggle_button_get_active(
@@ -119,17 +99,17 @@ void on_fps_toggled(GtkWidget * widget, cfg_window_t * w) {
gtk_widget_set_sensitive(w->auto_fps_limit_checkbutton, state_set_fps);
}
-void on_destroy_window(GtkWidget * widget, cfg_window_t * w) {
+static void on_destroy_window(GtkWidget * widget, cfg_window_t * w) {
free(w);
}
-void on_click_save_button(GtkWidget * widget, cfg_window_t * w) {
+static void on_click_save_button(GtkWidget * widget, cfg_window_t * w) {
save_config(w);
gtk_widget_destroy(GTK_WIDGET(w->config_window));
gtk_exit(0);
}
-void on_click_cancel_button(GtkWidget * widget, cfg_window_t * w) {
+static void on_click_cancel_button(GtkWidget * widget, cfg_window_t * w) {
gtk_widget_destroy(GTK_WIDGET(w->config_window));
gtk_exit(0);
}
diff --git a/plugins/gxvideo/key.c b/plugins/gxvideo/key.c
index 2d56ae92..c8a9b288 100644
--- a/plugins/gxvideo/key.c
+++ b/plugins/gxvideo/key.c
@@ -19,6 +19,7 @@
#include "gpu.h"
#include "draw.h"
#include "key.h"
+#include "psemu_plugin_defs.h"
#define VK_INSERT 65379
#define VK_HOME 65360
diff --git a/plugins/gxvideo/menu.c b/plugins/gxvideo/menu.c
index 7a96cfc1..babe2446 100644
--- a/plugins/gxvideo/menu.c
+++ b/plugins/gxvideo/menu.c
@@ -17,7 +17,7 @@
#include "draw.h"
#include "menu.h"
-#include "gpu.h"
+#include "gpu.h"
unsigned long dwCoreFlags = 0;
@@ -28,19 +28,18 @@ void InitMenu(void)
// kill existing lists/fonts
void CloseMenu(void)
-{
- DestroyPic();
+{
+ DestroyPic();
}
// DISPLAY FPS/MENU TEXT
#include <time.h>
-//extern time_t tStart;
int iMPos=0; // menu arrow pos
void DisplayText(void) // DISPLAY TEXT
-{
+{
}
diff --git a/plugins/gxvideo/prim.c b/plugins/gxvideo/prim.c
index de1bb9a2..6a8d8cba 100644
--- a/plugins/gxvideo/prim.c
+++ b/plugins/gxvideo/prim.c
@@ -39,7 +39,7 @@ __inline unsigned short BGR24to16 (uint32_t BGR);
#else
-inline unsigned short BGR24to16(uint32_t BGR) {
+static inline unsigned short BGR24to16(uint32_t BGR) {
return (unsigned short) (((BGR >> 3) & 0x1f) | ((BGR & 0xf80000) >> 9)
| ((BGR & 0xf800) >> 6));
}
@@ -50,7 +50,7 @@ inline unsigned short BGR24to16(uint32_t BGR) {
// Update global TP infos
////////////////////////////////////////////////////////////////////////
-inline void UpdateGlobalTP(unsigned short gdata) {
+static inline void UpdateGlobalTP(unsigned short gdata) {
g_soft.GlobalTextAddrX = (gdata << 6) & 0x3c0; // texture addr
if (512 == 1024) {
@@ -107,7 +107,7 @@ inline void UpdateGlobalTP(unsigned short gdata) {
////////////////////////////////////////////////////////////////////////
-inline void SetRenderMode(uint32_t DrawAttributes) {
+static inline void SetRenderMode(uint32_t DrawAttributes) {
g_soft.DrawSemiTrans = (SEMITRANSBIT(DrawAttributes)) ? 1 : 0;
if (SHADETEXBIT(DrawAttributes)) {
@@ -141,7 +141,7 @@ inline void SetRenderMode(uint32_t DrawAttributes) {
#define CHKMAX_X 1024
#define CHKMAX_Y 512
-void AdjustCoord4() {
+static void AdjustCoord4() {
g_soft.lx0 = (short) (((int) g_soft.lx0 << SIGNSHIFT) >> SIGNSHIFT);
g_soft.lx1 = (short) (((int) g_soft.lx1 << SIGNSHIFT) >> SIGNSHIFT);
g_soft.lx2 = (short) (((int) g_soft.lx2 << SIGNSHIFT) >> SIGNSHIFT);
@@ -152,7 +152,7 @@ void AdjustCoord4() {
g_soft.ly3 = (short) (((int) g_soft.ly3 << SIGNSHIFT) >> SIGNSHIFT);
}
-void AdjustCoord3() {
+static void AdjustCoord3() {
g_soft.lx0 = (short) (((int) g_soft.lx0 << SIGNSHIFT) >> SIGNSHIFT);
g_soft.lx1 = (short) (((int) g_soft.lx1 << SIGNSHIFT) >> SIGNSHIFT);
g_soft.lx2 = (short) (((int) g_soft.lx2 << SIGNSHIFT) >> SIGNSHIFT);
@@ -161,14 +161,14 @@ void AdjustCoord3() {
g_soft.ly2 = (short) (((int) g_soft.ly2 << SIGNSHIFT) >> SIGNSHIFT);
}
-void AdjustCoord2() {
+static void AdjustCoord2() {
g_soft.lx0 = (short) (((int) g_soft.lx0 << SIGNSHIFT) >> SIGNSHIFT);
g_soft.lx1 = (short) (((int) g_soft.lx1 << SIGNSHIFT) >> SIGNSHIFT);
g_soft.ly0 = (short) (((int) g_soft.ly0 << SIGNSHIFT) >> SIGNSHIFT);
g_soft.ly1 = (short) (((int) g_soft.ly1 << SIGNSHIFT) >> SIGNSHIFT);
}
-void AdjustCoord1() {
+static void AdjustCoord1() {
g_soft.lx0 = (short) (((int) g_soft.lx0 << SIGNSHIFT) >> SIGNSHIFT);
g_soft.ly0 = (short) (((int) g_soft.ly0 << SIGNSHIFT) >> SIGNSHIFT);
@@ -194,7 +194,7 @@ void AdjustCoord1() {
// \ / \
// 2___3
*/
-inline char CheckCoord4() {
+static inline char CheckCoord4() {
if (g_soft.lx0 < 0) {
if (((g_soft.lx1 - g_soft.lx0) > CHKMAX_X)
|| ((g_soft.lx2 - g_soft.lx0) > CHKMAX_X)) {
@@ -266,7 +266,7 @@ inline char CheckCoord4() {
return 0;
}
-inline char CheckCoord3() {
+static inline char CheckCoord3() {
if (g_soft.lx0 < 0) {
if ((g_soft.lx1 - g_soft.lx0) > CHKMAX_X)
return 1;
@@ -307,7 +307,7 @@ inline char CheckCoord3() {
return 0;
}
-inline char CheckCoord2() {
+static inline char CheckCoord2() {
if (g_soft.lx0 < 0) {
if ((g_soft.lx1 - g_soft.lx0) > CHKMAX_X)
return 1;
@@ -328,7 +328,7 @@ inline char CheckCoord2() {
return 0;
}
-inline char CheckCoordL(short slx0, short sly0, short slx1, short sly1) {
+static inline char CheckCoordL(short slx0, short sly0, short slx1, short sly1) {
if (slx0 < 0) {
if ((slx1 - slx0) > CHKMAX_X)
return 1;
@@ -353,7 +353,7 @@ inline char CheckCoordL(short slx0, short sly0, short slx1, short sly1) {
// mask stuff... used in silent hill
////////////////////////////////////////////////////////////////////////
-void cmdSTP(unsigned char * baseAddr) {
+static void cmdSTP(unsigned char * baseAddr) {
uint32_t gdata = GETLE32(&((uint32_t*)baseAddr)[0]);
g_gpu.status_reg &= ~0x1800; // Clear the necessary bits
@@ -377,7 +377,7 @@ void cmdSTP(unsigned char * baseAddr) {
// cmd: Set texture page infos
////////////////////////////////////////////////////////////////////////
-void cmdTexturePage(unsigned char * baseAddr) {
+static void cmdTexturePage(unsigned char * baseAddr) {
uint32_t gdata = GETLE32(&((uint32_t*)baseAddr)[0]);
g_gpu.status_reg &= ~0x000007ff;
@@ -393,7 +393,7 @@ void cmdTexturePage(unsigned char * baseAddr) {
// cmd: turn on/off texture window
////////////////////////////////////////////////////////////////////////
-void cmdTextureWindow(unsigned char *baseAddr) {
+static void cmdTextureWindow(unsigned char *baseAddr) {
uint32_t gdata = GETLE32(&((uint32_t*)baseAddr)[0]);
uint32_t YAlign, XAlign;
@@ -455,7 +455,7 @@ void cmdTextureWindow(unsigned char *baseAddr) {
////////////////////////////////////////////////////////////////////////
-void cmdDrawAreaStart(unsigned char * baseAddr) {
+static void cmdDrawAreaStart(unsigned char * baseAddr) {
uint32_t gdata = GETLE32(&((uint32_t*)baseAddr)[0]);
g_prim.drawX = gdata & 0x3ff; // for soft drawing
g_gpu.lGPUInfoVals[INFO_DRAWSTART] = gdata & 0xFFFFF;
@@ -468,7 +468,7 @@ void cmdDrawAreaStart(unsigned char * baseAddr) {
// cmd: end of drawing area... primitives will be clipped inside
////////////////////////////////////////////////////////////////////////
-void cmdDrawAreaEnd(unsigned char * baseAddr) {
+static void cmdDrawAreaEnd(unsigned char * baseAddr) {
uint32_t gdata = GETLE32(&((uint32_t*)baseAddr)[0]);
g_prim.drawW = gdata & 0x3ff; // for soft drawing
@@ -483,7 +483,7 @@ void cmdDrawAreaEnd(unsigned char * baseAddr) {
// cmd: draw offset... will be added to prim coords
////////////////////////////////////////////////////////////////////////
-void cmdDrawOffset(unsigned char * baseAddr) {
+static void cmdDrawOffset(unsigned char * baseAddr) {
uint32_t gdata = GETLE32(&((uint32_t*)baseAddr)[0]);
g_gpu.dsp.DrawOffset.x = (short) (gdata & 0x7ff);
@@ -501,7 +501,7 @@ void cmdDrawOffset(unsigned char * baseAddr) {
// cmd: load image to vram
////////////////////////////////////////////////////////////////////////
-void primLoadImage(unsigned char * baseAddr) {
+static void primLoadImage(unsigned char * baseAddr) {
unsigned short *sgpuData = ((unsigned short *) baseAddr);
g_gpu.VRAMWrite.x = GETLEs16(&sgpuData[2]) & 0x3ff;
@@ -521,7 +521,7 @@ void primLoadImage(unsigned char * baseAddr) {
// cmd: vram -> psx mem
////////////////////////////////////////////////////////////////////////
-void primStoreImage(unsigned char * baseAddr) {
+static void primStoreImage(unsigned char * baseAddr) {
unsigned short *sgpuData = ((unsigned short *) baseAddr);
g_gpu.VRAMRead.x = GETLEs16(&sgpuData[2]) & 0x03ff;
@@ -543,7 +543,7 @@ void primStoreImage(unsigned char * baseAddr) {
// cmd: blkfill - NO primitive! Doesn't care about draw areas...
////////////////////////////////////////////////////////////////////////
-void primBlkFill(unsigned char * baseAddr) {
+static void primBlkFill(unsigned char * baseAddr) {
uint32_t *gpuData = ((uint32_t *) baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -572,7 +572,7 @@ void primBlkFill(unsigned char * baseAddr) {
// cmd: move image vram -> vram
////////////////////////////////////////////////////////////////////////
-void primMoveImage(unsigned char * baseAddr) {
+static void primMoveImage(unsigned char * baseAddr) {
short *sgpuData = ((short *) baseAddr);
short imageY0, imageX0, imageY1, imageX1, imageSX, imageSY, i, j;
@@ -646,7 +646,7 @@ void primMoveImage(unsigned char * baseAddr) {
////////////////////////////////////////////////////////////////////////
// cmd: draw free-size Tile
////////////////////////////////////////////////////////////////////////
-void primTileS(unsigned char * baseAddr) {
+static void primTileS(unsigned char * baseAddr) {
uint32_t *gpuData = ((uint32_t*) baseAddr);
short *sgpuData = ((short *) baseAddr);
short sW = GETLEs16(&sgpuData[4]) & 0x3ff;
@@ -676,7 +676,7 @@ void primTileS(unsigned char * baseAddr) {
// cmd: draw 1 dot Tile (point)
////////////////////////////////////////////////////////////////////////
-void primTile1(unsigned char * baseAddr) {
+static void primTile1(unsigned char * baseAddr) {
uint32_t *gpuData = ((uint32_t*) baseAddr);
short *sgpuData = ((short *) baseAddr);
short sH = 1;
@@ -705,7 +705,7 @@ void primTile1(unsigned char * baseAddr) {
// cmd: draw 8 dot Tile (small rect)
////////////////////////////////////////////////////////////////////////
-void primTile8(unsigned char * baseAddr) {
+static void primTile8(unsigned char * baseAddr) {
uint32_t *gpuData = ((uint32_t*) baseAddr);
short *sgpuData = ((short *) baseAddr);
short sH = 8;
@@ -734,7 +734,7 @@ void primTile8(unsigned char * baseAddr) {
// cmd: draw 16 dot Tile (medium rect)
////////////////////////////////////////////////////////////////////////
-void primTile16(unsigned char * baseAddr) {
+static void primTile16(unsigned char * baseAddr) {
uint32_t *gpuData = ((uint32_t*) baseAddr);
short *sgpuData = ((short *) baseAddr);
short sH = 16;
@@ -763,7 +763,7 @@ void primTile16(unsigned char * baseAddr) {
// cmd: small sprite (textured rect)
////////////////////////////////////////////////////////////////////////
-void primSprt8(unsigned char * baseAddr) {
+static void primSprt8(unsigned char * baseAddr) {
uint32_t *gpuData = ((uint32_t *) baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -788,7 +788,7 @@ void primSprt8(unsigned char * baseAddr) {
// cmd: medium sprite (textured rect)
////////////////////////////////////////////////////////////////////////
-void primSprt16(unsigned char * baseAddr) {
+static void primSprt16(unsigned char * baseAddr) {
uint32_t *gpuData = ((uint32_t *) baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -814,7 +814,7 @@ void primSprt16(unsigned char * baseAddr) {
////////////////////////////////////////////////////////////////////////
// func used on texture coord wrap
-void primSprtSRest(unsigned char * baseAddr, unsigned short type) {
+static void primSprtSRest(unsigned char * baseAddr, unsigned short type) {
uint32_t *gpuData = ((uint32_t *) baseAddr);
short *sgpuData = ((short *) baseAddr);
unsigned short sTypeRest = 0;
@@ -906,7 +906,7 @@ void primSprtSRest(unsigned char * baseAddr, unsigned short type) {
////////////////////////////////////////////////////////////////////////
-void primSprtS(unsigned char * baseAddr) {
+static void primSprtS(unsigned char * baseAddr) {
uint32_t *gpuData = ((uint32_t *) baseAddr);
short *sgpuData = ((short *) baseAddr);
short sW, sH;
@@ -959,7 +959,7 @@ void primSprtS(unsigned char * baseAddr) {
// cmd: flat shaded Poly4
////////////////////////////////////////////////////////////////////////
-void primPolyF4(unsigned char *baseAddr) {
+static void primPolyF4(unsigned char *baseAddr) {
uint32_t *gpuData = ((uint32_t *) baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -989,7 +989,7 @@ void primPolyF4(unsigned char *baseAddr) {
// cmd: smooth shaded Poly4
////////////////////////////////////////////////////////////////////////
-void primPolyG4(unsigned char * baseAddr) {
+static void primPolyG4(unsigned char * baseAddr) {
uint32_t *gpuData = (uint32_t *) baseAddr;
short *sgpuData = ((short *) baseAddr);
@@ -1020,7 +1020,7 @@ void primPolyG4(unsigned char * baseAddr) {
// cmd: flat shaded Texture3
////////////////////////////////////////////////////////////////////////
-void primPolyFT3(unsigned char * baseAddr) {
+static void primPolyFT3(unsigned char * baseAddr) {
uint32_t *gpuData = ((uint32_t *) baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -1051,7 +1051,7 @@ void primPolyFT3(unsigned char * baseAddr) {
// cmd: flat shaded Texture4
////////////////////////////////////////////////////////////////////////
-void primPolyFT4(unsigned char * baseAddr) {
+static void primPolyFT4(unsigned char * baseAddr) {
uint32_t *gpuData = ((uint32_t *) baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -1085,7 +1085,7 @@ void primPolyFT4(unsigned char * baseAddr) {
// cmd: smooth shaded Texture3
////////////////////////////////////////////////////////////////////////
-void primPolyGT3(unsigned char *baseAddr) {
+static void primPolyGT3(unsigned char *baseAddr) {
uint32_t *gpuData = ((uint32_t *) baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -1125,7 +1125,7 @@ void primPolyGT3(unsigned char *baseAddr) {
// cmd: smooth shaded Poly3
////////////////////////////////////////////////////////////////////////
-void primPolyG3(unsigned char *baseAddr) {
+static void primPolyG3(unsigned char *baseAddr) {
uint32_t *gpuData = ((uint32_t *) baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -1153,7 +1153,7 @@ void primPolyG3(unsigned char *baseAddr) {
// cmd: smooth shaded Texture4
////////////////////////////////////////////////////////////////////////
-void primPolyGT4(unsigned char *baseAddr) {
+static void primPolyGT4(unsigned char *baseAddr) {
uint32_t *gpuData = ((uint32_t *) baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -1197,7 +1197,7 @@ void primPolyGT4(unsigned char *baseAddr) {
// cmd: smooth shaded Poly3
////////////////////////////////////////////////////////////////////////
-void primPolyF3(unsigned char *baseAddr) {
+static void primPolyF3(unsigned char *baseAddr) {
uint32_t *gpuData = ((uint32_t *) baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -1225,7 +1225,8 @@ void primPolyF3(unsigned char *baseAddr) {
// cmd: skipping shaded polylines
////////////////////////////////////////////////////////////////////////
-void primLineGSkip(unsigned char *baseAddr) {
+#if 0
+static void primLineGSkip(unsigned char *baseAddr) {
uint32_t *gpuData = ((uint32_t *) baseAddr);
int iMax = 255;
int i = 2;
@@ -1242,12 +1243,13 @@ void primLineGSkip(unsigned char *baseAddr) {
break;
}
}
+#endif
////////////////////////////////////////////////////////////////////////
// cmd: shaded polylines
////////////////////////////////////////////////////////////////////////
-void primLineGEx(unsigned char *baseAddr) {
+static void primLineGEx(unsigned char *baseAddr) {
uint32_t *gpuData = ((uint32_t *) baseAddr);
int iMax = 255;
uint32_t lc0, lc1;
@@ -1311,7 +1313,7 @@ void primLineGEx(unsigned char *baseAddr) {
// cmd: shaded polyline2
////////////////////////////////////////////////////////////////////////
-void primLineG2(unsigned char *baseAddr) {
+static void primLineG2(unsigned char *baseAddr) {
uint32_t *gpuData = ((uint32_t *) baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -1341,7 +1343,8 @@ void primLineG2(unsigned char *baseAddr) {
// cmd: skipping flat polylines
////////////////////////////////////////////////////////////////////////
-void primLineFSkip(unsigned char *baseAddr) {
+#if 0
+static void primLineFSkip(unsigned char *baseAddr) {
uint32_t *gpuData = ((uint32_t *) baseAddr);
int i = 2, iMax = 255;
@@ -1356,12 +1359,13 @@ void primLineFSkip(unsigned char *baseAddr) {
break;
}
}
+#endif
////////////////////////////////////////////////////////////////////////
// cmd: drawing flat polylines
////////////////////////////////////////////////////////////////////////
-void primLineFEx(unsigned char *baseAddr) {
+static void primLineFEx(unsigned char *baseAddr) {
uint32_t *gpuData = ((uint32_t *) baseAddr);
int iMax;
short slx0, slx1, sly0, sly1;
@@ -1414,7 +1418,7 @@ void primLineFEx(unsigned char *baseAddr) {
// cmd: drawing flat polyline2
////////////////////////////////////////////////////////////////////////
-void primLineF2(unsigned char *baseAddr) {
+static void primLineF2(unsigned char *baseAddr) {
uint32_t *gpuData = ((uint32_t *) baseAddr);
short *sgpuData = ((short *) baseAddr);
@@ -1445,7 +1449,7 @@ void primLineF2(unsigned char *baseAddr) {
// cmd: well, easiest command... not implemented
////////////////////////////////////////////////////////////////////////
-void primNI(unsigned char *bA) {
+static void primNI(unsigned char *bA) {
fprintf(stderr, "Unknow GPU func \n");
}
diff --git a/plugins/gxvideo/soft.c b/plugins/gxvideo/soft.c
index a0772745..d7e3a5c7 100644
--- a/plugins/gxvideo/soft.c
+++ b/plugins/gxvideo/soft.c
@@ -192,7 +192,7 @@ void offsetPSX4(void) {
uint8_t const dithertable[16] = { 7, 0, 6, 1, 2, 5, 3, 4, 1, 6, 0, 7, 4, 3, 5,
2 };
-void Dither16(uint16_t * pdest, uint32_t r, uint32_t g, uint32_t b, uint16_t sM) {
+static void Dither16(uint16_t * pdest, uint32_t r, uint32_t g, uint32_t b, uint16_t sM) {
uint8_t coeff;
uint8_t rlow, glow, blow;
int x, y;
@@ -225,7 +225,7 @@ void Dither16(uint16_t * pdest, uint32_t r, uint32_t g, uint32_t b, uint16_t sM)
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
-inline void GetShadeTransCol_Dither(uint16_t * pdest, int32_t m1,
+static inline void GetShadeTransCol_Dither(uint16_t * pdest, int32_t m1,
int32_t m2, int32_t m3) {
int32_t r, g, b;
@@ -284,7 +284,7 @@ inline void GetShadeTransCol_Dither(uint16_t * pdest, int32_t m1,
////////////////////////////////////////////////////////////////////////
-inline void GetShadeTransCol(unsigned short * pdest, unsigned short color) {
+static inline void GetShadeTransCol(unsigned short * pdest, unsigned short color) {
if (g_draw.bCheckMask && (*pdest & HOST2LE16(0x8000)))
return;
@@ -339,7 +339,7 @@ else PUTLE16(pdest, color|g_draw.sSetMask);
////////////////////////////////////////////////////////////////////////
-inline void GetShadeTransCol32(uint32_t * pdest, uint32_t color) {
+static inline void GetShadeTransCol32(uint32_t * pdest, uint32_t color) {
if (g_soft.DrawSemiTrans) {
int32_t r, g, b;
@@ -438,7 +438,7 @@ inline void GetShadeTransCol32(uint32_t * pdest, uint32_t color) {
////////////////////////////////////////////////////////////////////////
-inline void GetTextureTransColG(unsigned short * pdest, unsigned short color) {
+static inline void GetTextureTransColG(unsigned short * pdest, unsigned short color) {
int32_t r, g, b;
unsigned short l;
@@ -516,7 +516,7 @@ inline void GetTextureTransColG(unsigned short * pdest, unsigned short color) {
////////////////////////////////////////////////////////////////////////
-inline void GetTextureTransColG_S(unsigned short * pdest, unsigned short color) {
+static inline void GetTextureTransColG_S(unsigned short * pdest, unsigned short color) {
int32_t r, g, b;
unsigned short l;
@@ -541,7 +541,7 @@ inline void GetTextureTransColG_S(unsigned short * pdest, unsigned short color)
////////////////////////////////////////////////////////////////////////
-inline void GetTextureTransColG_SPR(unsigned short * pdest,
+static inline void GetTextureTransColG_SPR(unsigned short * pdest,
unsigned short color) {
int32_t r, g, b;
unsigned short l;
@@ -620,7 +620,7 @@ inline void GetTextureTransColG_SPR(unsigned short * pdest,
////////////////////////////////////////////////////////////////////////
-inline void GetTextureTransColG32(uint32_t * pdest, uint32_t color) {
+static inline void GetTextureTransColG32(uint32_t * pdest, uint32_t color) {
int32_t r, g, b, l;
if (color == 0)
@@ -752,7 +752,7 @@ inline void GetTextureTransColG32(uint32_t * pdest, uint32_t color) {
////////////////////////////////////////////////////////////////////////
-inline void GetTextureTransColG32_S(uint32_t * pdest, uint32_t color) {
+static inline void GetTextureTransColG32_S(uint32_t * pdest, uint32_t color) {
int32_t r, g, b;
if (color == 0)
@@ -789,7 +789,7 @@ inline void GetTextureTransColG32_S(uint32_t * pdest, uint32_t color) {
////////////////////////////////////////////////////////////////////////
-inline void GetTextureTransColG32_SPR(uint32_t * pdest, uint32_t color) {
+static inline void GetTextureTransColG32_SPR(uint32_t * pdest, uint32_t color) {
int32_t r, g, b;
if (color == 0)
@@ -919,7 +919,7 @@ inline void GetTextureTransColG32_SPR(uint32_t * pdest, uint32_t color) {
////////////////////////////////////////////////////////////////////////
-inline void GetTextureTransColGX_Dither(unsigned short * pdest,
+static inline void GetTextureTransColGX_Dither(unsigned short * pdest,
unsigned short color, int32_t m1, int32_t m2, int32_t m3) {
int32_t r, g, b;
@@ -986,7 +986,7 @@ inline void GetTextureTransColGX_Dither(unsigned short * pdest,
////////////////////////////////////////////////////////////////////////
-inline void GetTextureTransColGX(unsigned short * pdest, unsigned short color,
+static inline void GetTextureTransColGX(unsigned short * pdest, unsigned short color,
short m1, short m2, short m3) {
int32_t r, g, b;
unsigned short l;
@@ -1055,7 +1055,7 @@ inline void GetTextureTransColGX(unsigned short * pdest, unsigned short color,
////////////////////////////////////////////////////////////////////////
-inline void GetTextureTransColGX_S(unsigned short * pdest,
+static inline void GetTextureTransColGX_S(unsigned short * pdest,
unsigned short color, short m1, short m2, short m3) {
int32_t r, g, b;
@@ -1078,7 +1078,7 @@ inline void GetTextureTransColGX_S(unsigned short * pdest,
////////////////////////////////////////////////////////////////////////
-inline void GetTextureTransColGX32_S(uint32_t * pdest, uint32_t color,
+static inline void GetTextureTransColGX32_S(uint32_t * pdest, uint32_t color,
short m1, short m2, short m3) {
int32_t r, g, b;
@@ -1301,11 +1301,11 @@ static int left_B, delta_left_B, right_B, delta_right_B;
// NASM version (external):
#define shl10idiv i386_shl10idiv
-inline int shl10idiv(int x, int y);
+static inline int shl10idiv(int x, int y);
#else
-inline int shl10idiv(int x, int y) {
+static inline int shl10idiv(int x, int y) {
int64_t bi = x;
bi <<= 10;
return bi / y;
@@ -1317,7 +1317,7 @@ inline int shl10idiv(int x, int y) {
// GNUC long long int version:
-inline int shl10idiv(int x, int y)
+static inline int shl10idiv(int x, int y)
{
long long int bi=x;
bi<<=10;
@@ -1330,7 +1330,7 @@ inline int shl10idiv(int x, int y)
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
-inline int RightSection_F(void) {
+static inline int RightSection_F(void) {
soft_vertex * v1 = right_array[right_section];
soft_vertex * v2 = right_array[right_section - 1];
@@ -1346,7 +1346,7 @@ inline int RightSection_F(void) {
////////////////////////////////////////////////////////////////////////
-inline int LeftSection_F(void) {
+static inline int LeftSection_F(void) {
soft_vertex * v1 = left_array[left_section];
soft_vertex * v2 = left_array[left_section - 1];
@@ -1362,7 +1362,7 @@ inline int LeftSection_F(void) {
////////////////////////////////////////////////////////////////////////
-inline char NextRow_F(void) {
+static inline char NextRow_F(void) {
if (--left_section_height <= 0) {
if (--left_section <= 0) {
return 1;
@@ -1389,7 +1389,7 @@ inline char NextRow_F(void) {
////////////////////////////////////////////////////////////////////////
-inline char SetupSections_F(short x1, short y1, short x2, short y2, short x3,
+static inline char SetupSections_F(short x1, short y1, short x2, short y2, short x3,
short y3) {
soft_vertex * v1, *v2, *v3;
int height, longest;
@@ -1473,7 +1473,7 @@ inline char SetupSections_F(short x1, short y1, short x2, short y2, short x3,
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
-inline int RightSection_G(void) {
+static inline int RightSection_G(void) {
soft_vertex * v1 = right_array[right_section];
soft_vertex * v2 = right_array[right_section - 1];
@@ -1489,7 +1489,7 @@ inline int RightSection_G(void) {
////////////////////////////////////////////////////////////////////////
-inline int LeftSection_G(void) {
+static inline int LeftSection_G(void) {
soft_vertex * v1 = left_array[left_section];
soft_vertex * v2 = left_array[left_section - 1];
@@ -1512,7 +1512,7 @@ inline int LeftSection_G(void) {
////////////////////////////////////////////////////////////////////////
-inline char NextRow_G(void) {
+static inline char NextRow_G(void) {
if (--left_section_height <= 0) {
if (--left_section <= 0) {
return 1;
@@ -1542,7 +1542,7 @@ inline char NextRow_G(void) {
////////////////////////////////////////////////////////////////////////
-inline char SetupSections_G(short x1, short y1, short x2, short y2, short x3,
+static inline char SetupSections_G(short x1, short y1, short x2, short y2, short x3,
short y3, int32_t rgb1, int32_t rgb2, int32_t rgb3) {
soft_vertex * v1, *v2, *v3;
int height, longest, temp;
@@ -1646,7 +1646,7 @@ inline char SetupSections_G(short x1, short y1, short x2, short y2, short x3,
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
-inline int RightSection_FT(void) {
+static inline int RightSection_FT(void) {
soft_vertex * v1 = right_array[right_section];
soft_vertex * v2 = right_array[right_section - 1];
@@ -1662,7 +1662,7 @@ inline int RightSection_FT(void) {
////////////////////////////////////////////////////////////////////////
-inline int LeftSection_FT(void) {
+static inline int LeftSection_FT(void) {
soft_vertex * v1 = left_array[left_section];
soft_vertex * v2 = left_array[left_section - 1];
@@ -1683,7 +1683,7 @@ inline int LeftSection_FT(void) {
////////////////////////////////////////////////////////////////////////
-inline char NextRow_FT(void) {
+static inline char NextRow_FT(void) {
if (--left_section_height <= 0) {
if (--left_section <= 0) {
return 1;
@@ -1712,7 +1712,7 @@ inline char NextRow_FT(void) {
////////////////////////////////////////////////////////////////////////
-inline char SetupSections_FT(short x1, short y1, short x2, short y2, short x3,
+static inline char SetupSections_FT(short x1, short y1, short x2, short y2, short x3,
short y3, short tx1, short ty1, short tx2, short ty2, short tx3,
short ty3) {
soft_vertex * v1, *v2, *v3;
@@ -1829,7 +1829,7 @@ inline char SetupSections_FT(short x1, short y1, short x2, short y2, short x3,
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
-inline int RightSection_GT(void) {
+static inline int RightSection_GT(void) {
soft_vertex * v1 = right_array[right_section];
soft_vertex * v2 = right_array[right_section - 1];
@@ -1845,7 +1845,7 @@ inline int RightSection_GT(void) {
////////////////////////////////////////////////////////////////////////
-inline int LeftSection_GT(void) {
+static inline int LeftSection_GT(void) {
soft_vertex * v1 = left_array[left_section];
soft_vertex * v2 = left_array[left_section - 1];
@@ -1873,7 +1873,7 @@ inline int LeftSection_GT(void) {
////////////////////////////////////////////////////////////////////////
-inline char NextRow_GT(void) {
+static inline char NextRow_GT(void) {
if (--left_section_height <= 0) {
if (--left_section <= 0) {
return 1;
@@ -1905,7 +1905,7 @@ inline char NextRow_GT(void) {
////////////////////////////////////////////////////////////////////////
-inline char SetupSections_GT(short x1, short y1, short x2, short y2, short x3,
+static inline char SetupSections_GT(short x1, short y1, short x2, short y2, short x3,
short y3, short tx1, short ty1, short tx2, short ty2, short tx3,
short ty3, int32_t rgb1, int32_t rgb2, int32_t rgb3) {
soft_vertex * v1, *v2, *v3;
@@ -2040,7 +2040,7 @@ inline char SetupSections_GT(short x1, short y1, short x2, short y2, short x3,
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
-inline int RightSection_F4(void) {
+static inline int RightSection_F4(void) {
soft_vertex * v1 = right_array[right_section];
soft_vertex * v2 = right_array[right_section - 1];
@@ -2057,7 +2057,7 @@ inline int RightSection_F4(void) {
////////////////////////////////////////////////////////////////////////
-inline int LeftSection_F4(void) {
+static inline int LeftSection_F4(void) {
soft_vertex * v1 = left_array[left_section];
soft_vertex * v2 = left_array[left_section - 1];
@@ -2074,7 +2074,7 @@ inline int LeftSection_F4(void) {
////////////////////////////////////////////////////////////////////////
-inline char NextRow_F4(void) {
+static inline char NextRow_F4(void) {
if (--left_section_height <= 0) {
if (--left_section > 0)
while (LeftSection_F4() <= 0) {
@@ -2099,7 +2099,7 @@ inline char NextRow_F4(void) {
////////////////////////////////////////////////////////////////////////
-inline char SetupSections_F4(short x1, short y1, short x2, short y2, short x3,
+static inline char SetupSections_F4(short x1, short y1, short x2, short y2, short x3,
short y3, short x4, short y4) {
soft_vertex * v1, *v2, *v3, *v4;
int height, width, longest1, longest2;
@@ -2268,7 +2268,7 @@ inline char SetupSections_F4(short x1, short y1, short x2, short y2, short x3,
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
-inline int RightSection_FT4(void) {
+static inline int RightSection_FT4(void) {
soft_vertex * v1 = right_array[right_section];
soft_vertex * v2 = right_array[right_section - 1];
@@ -2289,7 +2289,7 @@ inline int RightSection_FT4(void) {
////////////////////////////////////////////////////////////////////////
-inline int LeftSection_FT4(void) {
+static inline int LeftSection_FT4(void) {
soft_vertex * v1 = left_array[left_section];
soft_vertex * v2 = left_array[left_section - 1];
@@ -2310,7 +2310,7 @@ inline int LeftSection_FT4(void) {
////////////////////////////////////////////////////////////////////////
-inline char NextRow_FT4(void) {
+static inline char NextRow_FT4(void) {
if (--left_section_height <= 0) {
if (--left_section > 0)
while (LeftSection_FT4() <= 0) {
@@ -2339,7 +2339,7 @@ inline char NextRow_FT4(void) {
////////////////////////////////////////////////////////////////////////
-inline char SetupSections_FT4(short x1, short y1, short x2, short y2, short x3,
+static inline char SetupSections_FT4(short x1, short y1, short x2, short y2, short x3,
short y3, short x4, short y4, short tx1, short ty1, short tx2,
short ty2, short tx3, short ty3, short tx4, short ty4) {
soft_vertex * v1, *v2, *v3, *v4;
@@ -2520,7 +2520,7 @@ inline char SetupSections_FT4(short x1, short y1, short x2, short y2, short x3,
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
-inline int RightSection_GT4(void) {
+static inline int RightSection_GT4(void) {
soft_vertex * v1 = right_array[right_section];
soft_vertex * v2 = right_array[right_section - 1];
@@ -2548,7 +2548,7 @@ inline int RightSection_GT4(void) {
////////////////////////////////////////////////////////////////////////
-inline int LeftSection_GT4(void) {
+static inline int LeftSection_GT4(void) {
soft_vertex * v1 = left_array[left_section];
soft_vertex * v2 = left_array[left_section - 1];
@@ -2576,7 +2576,7 @@ inline int LeftSection_GT4(void) {
////////////////////////////////////////////////////////////////////////
-inline char NextRow_GT4(void) {
+static inline char NextRow_GT4(void) {
if (--left_section_height <= 0) {
if (--left_section > 0)
while (LeftSection_GT4() <= 0) {
@@ -2611,7 +2611,7 @@ inline char NextRow_GT4(void) {
////////////////////////////////////////////////////////////////////////
-inline char SetupSections_GT4(short x1, short y1, short x2, short y2, short x3,
+static inline char SetupSections_GT4(short x1, short y1, short x2, short y2, short x3,
short y3, short x4, short y4, short tx1, short ty1, short tx2,
short ty2, short tx3, short ty3, short tx4, short ty4, int32_t rgb1,
int32_t rgb2, int32_t rgb3, int32_t rgb4) {
@@ -2814,7 +2814,7 @@ inline char SetupSections_GT4(short x1, short y1, short x2, short y2, short x3,
// POLY 3/4 FLAT SHADED
////////////////////////////////////////////////////////////////////////
-inline void drawPoly3Fi(short x1, short y1, short x2, short y2, short x3,
+static inline void drawPoly3Fi(short x1, short y1, short x2, short y2, short x3,
short y3, int32_t rgb) {
int i, j, xmin, xmax, ymin, ymax;
unsigned short color;
@@ -2997,7 +2997,7 @@ void drawPoly4F(int32_t rgb) {
// POLY 3/4 F-SHADED TEX PAL 4
////////////////////////////////////////////////////////////////////////
-void drawPoly3TEx4(short x1, short y1, short x2, short y2, short x3, short y3,
+static void drawPoly3TEx4(short x1, short y1, short x2, short y2, short x3, short y3,
short tx1, short ty1, short tx2, short ty2, short tx3, short ty3,
short clX, short clY) {
int i, j, xmin, xmax, ymin, ymax;
@@ -3151,7 +3151,7 @@ void drawPoly3TEx4(short x1, short y1, short x2, short y2, short x3, short y3,
////////////////////////////////////////////////////////////////////////
-void drawPoly3TEx4_IL(short x1, short y1, short x2, short y2, short x3,
+static void drawPoly3TEx4_IL(short x1, short y1, short x2, short y2, short x3,
short y3, short tx1, short ty1, short tx2, short ty2, short tx3,
short ty3, short clX, short clY) {
int i, j, xmin, xmax, ymin, ymax, n_xi, n_yi, TXV;
@@ -3332,7 +3332,7 @@ void drawPoly3TEx4_IL(short x1, short y1, short x2, short y2, short x3,
////////////////////////////////////////////////////////////////////////
-void drawPoly3TEx4_TW(short x1, short y1, short x2, short y2, short x3,
+static void drawPoly3TEx4_TW(short x1, short y1, short x2, short y2, short x3,
short y3, short tx1, short ty1, short tx2, short ty2, short tx3,
short ty3, short clX, short clY) {
int i, j, xmin, xmax, ymin, ymax;
@@ -3494,7 +3494,7 @@ void drawPoly3TEx4_TW(short x1, short y1, short x2, short y2, short x3,
#ifdef POLYQUAD3
-void drawPoly4TEx4_TRI(short x1, short y1, short x2, short y2, short x3,
+static void drawPoly4TEx4_TRI(short x1, short y1, short x2, short y2, short x3,
short y3, short x4, short y4, short tx1, short ty1, short tx2,
short ty2, short tx3, short ty3, short tx4, short ty4, short clX,
short clY) {
@@ -3508,7 +3508,7 @@ void drawPoly4TEx4_TRI(short x1, short y1, short x2, short y2, short x3,
// more exact:
-void drawPoly4TEx4(short x1, short y1, short x2, short y2, short x3, short y3,
+static void drawPoly4TEx4(short x1, short y1, short x2, short y2, short x3, short y3,
short x4, short y4, short tx1, short ty1, short tx2, short ty2,
short tx3, short ty3, short tx4, short ty4, short clX, short clY) {
int32_t num;
@@ -3677,7 +3677,7 @@ void drawPoly4TEx4(short x1, short y1, short x2, short y2, short x3, short y3,
////////////////////////////////////////////////////////////////////////
-void drawPoly4TEx4_IL(short x1, short y1, short x2, short y2, short x3,
+static void drawPoly4TEx4_IL(short x1, short y1, short x2, short y2, short x3,
short y3, short x4, short y4, short tx1, short ty1, short tx2,
short ty2, short tx3, short ty3, short tx4, short ty4, short clX,
short clY) {
@@ -3872,7 +3872,7 @@ void drawPoly4TEx4_IL(short x1, short y1, short x2, short y2, short x3,
////////////////////////////////////////////////////////////////////////
-void drawPoly4TEx4_TW(short x1, short y1, short x2, short y2, short x3,
+static void drawPoly4TEx4_TW(short x1, short y1, short x2, short y2, short x3,
short y3, short x4, short y4, short tx1, short ty1, short tx2,
short ty2, short tx3, short ty3, short tx4, short ty4, short clX,
short clY) {
@@ -4044,7 +4044,7 @@ void drawPoly4TEx4_TW(short x1, short y1, short x2, short y2, short x3,
////////////////////////////////////////////////////////////////////////
-void drawPoly4TEx4_TW_S(short x1, short y1, short x2, short y2, short x3,
+static void drawPoly4TEx4_TW_S(short x1, short y1, short x2, short y2, short x3,
short y3, short x4, short y4, short tx1, short ty1, short tx2,
short ty2, short tx3, short ty3, short tx4, short ty4, short clX,
short clY) {
@@ -4216,7 +4216,7 @@ void drawPoly4TEx4_TW_S(short x1, short y1, short x2, short y2, short x3,
// POLY 3 F-SHADED TEX PAL 8
////////////////////////////////////////////////////////////////////////
-void drawPoly3TEx8(short x1, short y1, short x2, short y2, short x3, short y3,
+static void drawPoly3TEx8(short x1, short y1, short x2, short y2, short x3, short y3,
short tx1, short ty1, short tx2, short ty2, short tx3, short ty3,
short clX, short clY) {
int i, j, xmin, xmax, ymin, ymax;
@@ -4358,7 +4358,7 @@ void drawPoly3TEx8(short x1, short y1, short x2, short y2, short x3, short y3,
////////////////////////////////////////////////////////////////////////
-void drawPoly3TEx8_IL(short x1, short y1, short x2, short y2, short x3,
+static void drawPoly3TEx8_IL(short x1, short y1, short x2, short y2, short x3,
short y3, short tx1, short ty1, short tx2, short ty2, short tx3,
short ty3, short clX, short clY) {
int i, j, xmin, xmax, ymin, ymax, n_xi, n_yi, TXV, TXU;
@@ -4539,7 +4539,7 @@ void drawPoly3TEx8_IL(short x1, short y1, short x2, short y2, short x3,
////////////////////////////////////////////////////////////////////////
-void drawPoly3TEx8_TW(short x1, short y1, short x2, short y2, short x3,
+static void drawPoly3TEx8_TW(short x1, short y1, short x2, short y2, short x3,
short y3, short tx1, short ty1, short tx2, short ty2, short tx3,
short ty3, short clX, short clY) {
int i, j, xmin, xmax, ymin, ymax;
@@ -4689,7 +4689,7 @@ void drawPoly3TEx8_TW(short x1, short y1, short x2, short y2, short x3,
#ifdef POLYQUAD3
-void drawPoly4TEx8_TRI(short x1, short y1, short x2, short y2, short x3,
+static void drawPoly4TEx8_TRI(short x1, short y1, short x2, short y2, short x3,
short y3, short x4, short y4, short tx1, short ty1, short tx2,
short ty2, short tx3, short ty3, short tx4, short ty4, short clX,
short clY) {
@@ -4704,7 +4704,7 @@ void drawPoly4TEx8_TRI(short x1, short y1, short x2, short y2, short x3,
// more exact:
-void drawPoly4TEx8(short x1, short y1, short x2, short y2, short x3, short y3,
+static void drawPoly4TEx8(short x1, short y1, short x2, short y2, short x3, short y3,
short x4, short y4, short tx1, short ty1, short tx2, short ty2,
short tx3, short ty3, short tx4, short ty4, short clX, short clY) {
int32_t num;
@@ -4860,7 +4860,7 @@ void drawPoly4TEx8(short x1, short y1, short x2, short y2, short x3, short y3,
////////////////////////////////////////////////////////////////////////
-void drawPoly4TEx8_IL(short x1, short y1, short x2, short y2, short x3,
+static void drawPoly4TEx8_IL(short x1, short y1, short x2, short y2, short x3,
short y3, short x4, short y4, short tx1, short ty1, short tx2,
short ty2, short tx3, short ty3, short tx4, short ty4, short clX,
short clY) {
@@ -5054,7 +5054,7 @@ void drawPoly4TEx8_IL(short x1, short y1, short x2, short y2, short x3,
////////////////////////////////////////////////////////////////////////
-void drawPoly4TEx8_TW(short x1, short y1, short x2, short y2, short x3,
+static void drawPoly4TEx8_TW(short x1, short y1, short x2, short y2, short x3,
short y3, short x4, short y4, short tx1, short ty1, short tx2,
short ty2, short tx3, short ty3, short tx4, short ty4, short clX,
short clY) {
@@ -5214,7 +5214,7 @@ void drawPoly4TEx8_TW(short x1, short y1, short x2, short y2, short x3,
////////////////////////////////////////////////////////////////////////
-void drawPoly4TEx8_TW_S(short x1, short y1, short x2, short y2, short x3,
+static void drawPoly4TEx8_TW_S(short x1, short y1, short x2, short y2, short x3,
short y3, short x4, short y4, short tx1, short ty1, short tx2,
short ty2, short tx3, short ty3, short tx4, short ty4, short clX,
short clY) {
@@ -5375,7 +5375,7 @@ void drawPoly4TEx8_TW_S(short x1, short y1, short x2, short y2, short x3,
// POLY 3 F-SHADED TEX 15 BIT
////////////////////////////////////////////////////////////////////////
-void drawPoly3TD(short x1, short y1, short x2, short y2, short x3, short y3,
+static void drawPoly3TD(short x1, short y1, short x2, short y2, short x3, short y3,
short tx1, short ty1, short tx2, short ty2, short tx3, short ty3) {
int i, j, xmin, xmax, ymin, ymax;
int32_t difX, difY, difX2, difY2;
@@ -5492,7 +5492,7 @@ void drawPoly3TD(short x1, short y1, short x2, short y2, short x3, short y3,
////////////////////////////////////////////////////////////////////////
-void drawPoly3TD_TW(short x1, short y1, short x2, short y2, short x3, short y3,
+static void drawPoly3TD_TW(short x1, short y1, short x2, short y2, short x3, short y3,
short tx1, short ty1, short tx2, short ty2, short tx3, short ty3) {
int i, j, xmin, xmax, ymin, ymax;
int32_t difX, difY, difX2, difY2;
@@ -5617,7 +5617,7 @@ void drawPoly3TD_TW(short x1, short y1, short x2, short y2, short x3, short y3,
#ifdef POLYQUAD3
-void drawPoly4TD_TRI(short x1, short y1, short x2, short y2, short x3,
+static void drawPoly4TD_TRI(short x1, short y1, short x2, short y2, short x3,
short y3, short x4, short y4, short tx1, short ty1, short tx2,
short ty2, short tx3, short ty3, short tx4, short ty4) {
drawPoly3TD(x2, y2, x3, y3, x4, y4, tx2, ty2, tx3, ty3, tx4, ty4);
@@ -5628,7 +5628,7 @@ void drawPoly4TD_TRI(short x1, short y1, short x2, short y2, short x3,
// more exact:
-void drawPoly4TD(short x1, short y1, short x2, short y2, short x3, short y3,
+static void drawPoly4TD(short x1, short y1, short x2, short y2, short x3, short y3,
short x4, short y4, short tx1, short ty1, short tx2, short ty2,
short tx3, short ty3, short tx4, short ty4) {
int32_t num;
@@ -5763,7 +5763,7 @@ void drawPoly4TD(short x1, short y1, short x2, short y2, short x3, short y3,
////////////////////////////////////////////////////////////////////////
-void drawPoly4TD_TW(short x1, short y1, short x2, short y2, short x3, short y3,
+static void drawPoly4TD_TW(short x1, short y1, short x2, short y2, short x3, short y3,
short x4, short y4, short tx1, short ty1, short tx2, short ty2,
short tx3, short ty3, short tx4, short ty4) {
int32_t num;
@@ -5904,7 +5904,7 @@ void drawPoly4TD_TW(short x1, short y1, short x2, short y2, short x3, short y3,
////////////////////////////////////////////////////////////////////////
-void drawPoly4TD_TW_S(short x1, short y1, short x2, short y2, short x3,
+static void drawPoly4TD_TW_S(short x1, short y1, short x2, short y2, short x3,
short y3, short x4, short y4, short tx1, short ty1, short tx2,
short ty2, short tx3, short ty3, short tx4, short ty4) {
int32_t num;
@@ -6047,7 +6047,7 @@ void drawPoly4TD_TW_S(short x1, short y1, short x2, short y2, short x3,
// POLY 3/4 G-SHADED
////////////////////////////////////////////////////////////////////////
-inline void drawPoly3Gi(short x1, short y1, short x2, short y2, short x3,
+static inline void drawPoly3Gi(short x1, short y1, short x2, short y2, short x3,
short y3, int32_t rgb1, int32_t rgb2, int32_t rgb3) {
int i, j, xmin, xmax, ymin, ymax;
int32_t cR1, cG1, cB1;
@@ -6212,7 +6212,7 @@ void drawPoly4G(int32_t rgb1, int32_t rgb2, int32_t rgb3, int32_t rgb4) {
// POLY 3/4 G-SHADED TEX PAL4
////////////////////////////////////////////////////////////////////////
-void drawPoly3TGEx4(short x1, short y1, short x2, short y2, short x3, short y3,
+static void drawPoly3TGEx4(short x1, short y1, short x2, short y2, short x3, short y3,
short tx1, short ty1, short tx2, short ty2, short tx3, short ty3,
short clX, short clY, int32_t col1, int32_t col2, int32_t col3) {
int i, j, xmin, xmax, ymin, ymax;
@@ -6383,7 +6383,7 @@ void drawPoly3TGEx4(short x1, short y1, short x2, short y2, short x3, short y3,
////////////////////////////////////////////////////////////////////////
-void drawPoly3TGEx4_IL(short x1, short y1, short x2, short y2, short x3,
+static void drawPoly3TGEx4_IL(short x1, short y1, short x2, short y2, short x3,
short y3, short tx1, short ty1, short tx2, short ty2, short tx3,
short ty3, short clX, short clY, int32_t col1, int32_t col2,
int32_t col3) {
@@ -6575,7 +6575,7 @@ void drawPoly3TGEx4_IL(short x1, short y1, short x2, short y2, short x3,
////////////////////////////////////////////////////////////////////////
-void drawPoly3TGEx4_TW(short x1, short y1, short x2, short y2, short x3,
+static void drawPoly3TGEx4_TW(short x1, short y1, short x2, short y2, short x3,
short y3, short tx1, short ty1, short tx2, short ty2, short tx3,
short ty3, short clX, short clY, int32_t col1, int32_t col2,
int32_t col3) {
@@ -6754,7 +6754,7 @@ void drawPoly3TGEx4_TW(short x1, short y1, short x2, short y2, short x3,
// correct that way, so small texture distortions can
// happen...
-void drawPoly4TGEx4_TRI_IL(short x1, short y1, short x2, short y2, short x3,
+static void drawPoly4TGEx4_TRI_IL(short x1, short y1, short x2, short y2, short x3,
short y3, short x4, short y4, short tx1, short ty1, short tx2,
short ty2, short tx3, short ty3, short tx4, short ty4, short clX,
short clY, int32_t col1, int32_t col2, int32_t col3, int32_t col4) {
@@ -6766,7 +6766,7 @@ void drawPoly4TGEx4_TRI_IL(short x1, short y1, short x2, short y2, short x3,
#ifdef POLYQUAD3GT
-void drawPoly4TGEx4_TRI(short x1, short y1, short x2, short y2, short x3,
+static void drawPoly4TGEx4_TRI(short x1, short y1, short x2, short y2, short x3,
short y3, short x4, short y4, short tx1, short ty1, short tx2,
short ty2, short tx3, short ty3, short tx4, short ty4, short clX,
short clY, int32_t col1, int32_t col2, int32_t col3, int32_t col4) {
@@ -6780,7 +6780,7 @@ void drawPoly4TGEx4_TRI(short x1, short y1, short x2, short y2, short x3,
////////////////////////////////////////////////////////////////////////
-void drawPoly4TGEx4(short x1, short y1, short x2, short y2, short x3, short y3,
+static void drawPoly4TGEx4(short x1, short y1, short x2, short y2, short x3, short y3,
short x4, short y4, short tx1, short ty1, short tx2, short ty2,
short tx3, short ty3, short tx4, short ty4, short clX, short clY,
int32_t col1, int32_t col2, int32_t col4, int32_t col3) {
@@ -6978,7 +6978,7 @@ void drawPoly4TGEx4(short x1, short y1, short x2, short y2, short x3, short y3,
////////////////////////////////////////////////////////////////////////
-void drawPoly4TGEx4_TW(short x1, short y1, short x2, short y2, short x3,
+static void drawPoly4TGEx4_TW(short x1, short y1, short x2, short y2, short x3,
short y3, short x4, short y4, short tx1, short ty1, short tx2,
short ty2, short tx3, short ty3, short tx4, short ty4, short clX,
short clY, int32_t col1, int32_t col2, int32_t col3, int32_t col4) {
@@ -6993,7 +6993,7 @@ void drawPoly4TGEx4_TW(short x1, short y1, short x2, short y2, short x3,
// POLY 3/4 G-SHADED TEX PAL8
////////////////////////////////////////////////////////////////////////
-void drawPoly3TGEx8(short x1, short y1, short x2, short y2, short x3, short y3,
+static void drawPoly3TGEx8(short x1, short y1, short x2, short y2, short x3, short y3,
short tx1, short ty1, short tx2, short ty2, short tx3, short ty3,
short clX, short clY, int32_t col1, int32_t col2, int32_t col3) {
int i, j, xmin, xmax, ymin, ymax;
@@ -7157,7 +7157,7 @@ void drawPoly3TGEx8(short x1, short y1, short x2, short y2, short x3, short y3,
////////////////////////////////////////////////////////////////////////
-void drawPoly3TGEx8_IL(short x1, short y1, short x2, short y2, short x3,
+static void drawPoly3TGEx8_IL(short x1, short y1, short x2, short y2, short x3,
short y3, short tx1, short ty1, short tx2, short ty2, short tx3,
short ty3, short clX, short clY, int32_t col1, int32_t col2,
int32_t col3) {
@@ -7348,7 +7348,7 @@ void drawPoly3TGEx8_IL(short x1, short y1, short x2, short y2, short x3,
////////////////////////////////////////////////////////////////////////
-void drawPoly3TGEx8_TW(short x1, short y1, short x2, short y2, short x3,
+static void drawPoly3TGEx8_TW(short x1, short y1, short x2, short y2, short x3,
short y3, short tx1, short ty1, short tx2, short ty2, short tx3,
short ty3, short clX, short clY, int32_t col1, int32_t col2,
int32_t col3) {
@@ -7518,7 +7518,7 @@ void drawPoly3TGEx8_TW(short x1, short y1, short x2, short y2, short x3,
// note: two g-shaded tris: small texture distortions can happen
-void drawPoly4TGEx8_TRI_IL(short x1, short y1, short x2, short y2, short x3,
+static void drawPoly4TGEx8_TRI_IL(short x1, short y1, short x2, short y2, short x3,
short y3, short x4, short y4, short tx1, short ty1, short tx2,
short ty2, short tx3, short ty3, short tx4, short ty4, short clX,
short clY, int32_t col1, int32_t col2, int32_t col3, int32_t col4) {
@@ -7530,7 +7530,7 @@ void drawPoly4TGEx8_TRI_IL(short x1, short y1, short x2, short y2, short x3,
#ifdef POLYQUAD3GT
-void drawPoly4TGEx8_TRI(short x1, short y1, short x2, short y2, short x3,
+static void drawPoly4TGEx8_TRI(short x1, short y1, short x2, short y2, short x3,
short y3, short x4, short y4, short tx1, short ty1, short tx2,
short ty2, short tx3, short ty3, short tx4, short ty4, short clX,
short clY, int32_t col1, int32_t col2, int32_t col3, int32_t col4) {
@@ -7542,7 +7542,7 @@ void drawPoly4TGEx8_TRI(short x1, short y1, short x2, short y2, short x3,
#endif
-void drawPoly4TGEx8(short x1, short y1, short x2, short y2, short x3, short y3,
+static void drawPoly4TGEx8(short x1, short y1, short x2, short y2, short x3, short y3,
short x4, short y4, short tx1, short ty1, short tx2, short ty2,
short tx3, short ty3, short tx4, short ty4, short clX, short clY,
int32_t col1, int32_t col2, int32_t col4, int32_t col3) {
@@ -7732,7 +7732,7 @@ void drawPoly4TGEx8(short x1, short y1, short x2, short y2, short x3, short y3,
////////////////////////////////////////////////////////////////////////
-void drawPoly4TGEx8_TW(short x1, short y1, short x2, short y2, short x3,
+static void drawPoly4TGEx8_TW(short x1, short y1, short x2, short y2, short x3,
short y3, short x4, short y4, short tx1, short ty1, short tx2,
short ty2, short tx3, short ty3, short tx4, short ty4, short clX,
short clY, int32_t col1, int32_t col2, int32_t col3, int32_t col4) {
@@ -7746,7 +7746,7 @@ void drawPoly4TGEx8_TW(short x1, short y1, short x2, short y2, short x3,
// POLY 3 G-SHADED TEX 15 BIT
////////////////////////////////////////////////////////////////////////
-void drawPoly3TGD(short x1, short y1, short x2, short y2, short x3, short y3,
+static void drawPoly3TGD(short x1, short y1, short x2, short y2, short x3, short y3,
short tx1, short ty1, short tx2, short ty2, short tx3, short ty3,
int32_t col1, int32_t col2, int32_t col3) {
int i, j, xmin, xmax, ymin, ymax;
@@ -7894,7 +7894,7 @@ void drawPoly3TGD(short x1, short y1, short x2, short y2, short x3, short y3,
////////////////////////////////////////////////////////////////////////
-void drawPoly3TGD_TW(short x1, short y1, short x2, short y2, short x3,
+static void drawPoly3TGD_TW(short x1, short y1, short x2, short y2, short x3,
short y3, short tx1, short ty1, short tx2, short ty2, short tx3,
short ty3, int32_t col1, int32_t col2, int32_t col3) {
int i, j, xmin, xmax, ymin, ymax;
@@ -8051,7 +8051,7 @@ void drawPoly3TGD_TW(short x1, short y1, short x2, short y2, short x3,
#ifdef POLYQUAD3GT
-void drawPoly4TGD_TRI(short x1, short y1, short x2, short y2, short x3,
+static void drawPoly4TGD_TRI(short x1, short y1, short x2, short y2, short x3,
short y3, short x4, short y4, short tx1, short ty1, short tx2,
short ty2, short tx3, short ty3, short tx4, short ty4, int32_t col1,
int32_t col2, int32_t col3, int32_t col4) {
@@ -8063,7 +8063,7 @@ void drawPoly4TGD_TRI(short x1, short y1, short x2, short y2, short x3,
#endif
-void drawPoly4TGD(short x1, short y1, short x2, short y2, short x3, short y3,
+static void drawPoly4TGD(short x1, short y1, short x2, short y2, short x3, short y3,
short x4, short y4, short tx1, short ty1, short tx2, short ty2,
short tx3, short ty3, short tx4, short ty4, int32_t col1, int32_t col2,
int32_t col4, int32_t col3) {
@@ -8236,7 +8236,7 @@ void drawPoly4TGD(short x1, short y1, short x2, short y2, short x3, short y3,
////////////////////////////////////////////////////////////////////////
-void drawPoly4TGD_TW(short x1, short y1, short x2, short y2, short x3,
+static void drawPoly4TGD_TW(short x1, short y1, short x2, short y2, short x3,
short y3, short x4, short y4, short tx1, short ty1, short tx2,
short ty2, short tx3, short ty3, short tx4, short ty4, int32_t col1,
int32_t col2, int32_t col3, int32_t col4) {
@@ -8266,7 +8266,7 @@ void drawPoly4TGD_TW(short x1, short y1, short x2, short y2, short x3,
*/
// real rect test
-inline char IsNoRect(void) {
+static inline char IsNoRect(void) {
if (!(g_prim.dwActFixes & 0x200))
return 0;
@@ -9022,7 +9022,7 @@ void DrawSoftwareSpriteMirror(unsigned char * baseAddr, int32_t w, int32_t h) {
////////////////////////////////////////////////////////////////////////
-void DrawSoftwareSprite_IL(unsigned char * baseAddr, short w, short h,
+static void DrawSoftwareSprite_IL(unsigned char * baseAddr, short w, short h,
int32_t tx, int32_t ty) {
int32_t sprtY, sprtX, sprtW, sprtH, tdx, tdy;
uint32_t *gpuData = (uint32_t *) baseAddr;
@@ -9317,7 +9317,7 @@ void DrawSoftwareSprite(unsigned char * baseAddr, short w, short h, int32_t tx,
///////////////////////////////////////////////////////////////////////
-void Line_E_SE_Shade(int x0, int y0, int x1, int y1, uint32_t rgb0,
+static void Line_E_SE_Shade(int x0, int y0, int x1, int y1, uint32_t rgb0,
uint32_t rgb1) {
int dx, dy, incrE, incrSE, d;
uint32_t r0, g0, b0, r1, g1, b1;
@@ -9375,7 +9375,7 @@ void Line_E_SE_Shade(int x0, int y0, int x1, int y1, uint32_t rgb0,
///////////////////////////////////////////////////////////////////////
-void Line_S_SE_Shade(int x0, int y0, int x1, int y1, uint32_t rgb0,
+static void Line_S_SE_Shade(int x0, int y0, int x1, int y1, uint32_t rgb0,
uint32_t rgb1) {
int dx, dy, incrS, incrSE, d;
uint32_t r0, g0, b0, r1, g1, b1;
@@ -9433,7 +9433,7 @@ void Line_S_SE_Shade(int x0, int y0, int x1, int y1, uint32_t rgb0,
///////////////////////////////////////////////////////////////////////
-void Line_N_NE_Shade(int x0, int y0, int x1, int y1, uint32_t rgb0,
+static void Line_N_NE_Shade(int x0, int y0, int x1, int y1, uint32_t rgb0,
uint32_t rgb1) {
int dx, dy, incrN, incrNE, d;
uint32_t r0, g0, b0, r1, g1, b1;
@@ -9491,7 +9491,7 @@ void Line_N_NE_Shade(int x0, int y0, int x1, int y1, uint32_t rgb0,
///////////////////////////////////////////////////////////////////////
-void Line_E_NE_Shade(int x0, int y0, int x1, int y1, uint32_t rgb0,
+static void Line_E_NE_Shade(int x0, int y0, int x1, int y1, uint32_t rgb0,
uint32_t rgb1) {
int dx, dy, incrE, incrNE, d;
uint32_t r0, g0, b0, r1, g1, b1;
@@ -9549,7 +9549,7 @@ void Line_E_NE_Shade(int x0, int y0, int x1, int y1, uint32_t rgb0,
///////////////////////////////////////////////////////////////////////
-void VertLineShade(int x, int y0, int y1, uint32_t rgb0, uint32_t rgb1) {
+static void VertLineShade(int x, int y0, int y1, uint32_t rgb0, uint32_t rgb1) {
int y, dy;
uint32_t r0, g0, b0, r1, g1, b1;
int32_t dr, dg, db;
@@ -9595,7 +9595,7 @@ void VertLineShade(int x, int y0, int y1, uint32_t rgb0, uint32_t rgb1) {
///////////////////////////////////////////////////////////////////////
-void HorzLineShade(int y, int x0, int x1, uint32_t rgb0, uint32_t rgb1) {
+static void HorzLineShade(int y, int x0, int x1, uint32_t rgb0, uint32_t rgb1) {
int x, dx;
uint32_t r0, g0, b0, r1, g1, b1;
int32_t dr, dg, db;
@@ -9641,7 +9641,7 @@ void HorzLineShade(int y, int x0, int x1, uint32_t rgb0, uint32_t rgb1) {
///////////////////////////////////////////////////////////////////////
-void Line_E_SE_Flat(int x0, int y0, int x1, int y1, unsigned short colour) {
+static void Line_E_SE_Flat(int x0, int y0, int x1, int y1, unsigned short colour) {
int dx, dy, incrE, incrSE, d, x, y;
dx = x1 - x0;
@@ -9671,7 +9671,7 @@ void Line_E_SE_Flat(int x0, int y0, int x1, int y1, unsigned short colour) {
///////////////////////////////////////////////////////////////////////
-void Line_S_SE_Flat(int x0, int y0, int x1, int y1, unsigned short colour) {
+static void Line_S_SE_Flat(int x0, int y0, int x1, int y1, unsigned short colour) {
int dx, dy, incrS, incrSE, d, x, y;
dx = x1 - x0;
@@ -9701,7 +9701,7 @@ void Line_S_SE_Flat(int x0, int y0, int x1, int y1, unsigned short colour) {
///////////////////////////////////////////////////////////////////////
-void Line_N_NE_Flat(int x0, int y0, int x1, int y1, unsigned short colour) {
+static void Line_N_NE_Flat(int x0, int y0, int x1, int y1, unsigned short colour) {
int dx, dy, incrN, incrNE, d, x, y;
dx = x1 - x0;
@@ -9731,7 +9731,7 @@ void Line_N_NE_Flat(int x0, int y0, int x1, int y1, unsigned short colour) {
///////////////////////////////////////////////////////////////////////
-void Line_E_NE_Flat(int x0, int y0, int x1, int y1, unsigned short colour) {
+static void Line_E_NE_Flat(int x0, int y0, int x1, int y1, unsigned short colour) {
int dx, dy, incrE, incrNE, d, x, y;
dx = x1 - x0;
@@ -9761,7 +9761,7 @@ void Line_E_NE_Flat(int x0, int y0, int x1, int y1, unsigned short colour) {
///////////////////////////////////////////////////////////////////////
-void VertLineFlat(int x, int y0, int y1, unsigned short colour) {
+static void VertLineFlat(int x, int y0, int y1, unsigned short colour) {
int y;
if (y0 < g_prim.drawY)
@@ -9776,7 +9776,7 @@ void VertLineFlat(int x, int y0, int y1, unsigned short colour) {
///////////////////////////////////////////////////////////////////////
-void HorzLineFlat(int y, int x0, int x1, unsigned short colour) {
+static void HorzLineFlat(int y, int x0, int x1, unsigned short colour) {
int x;
if (x0 < g_prim.drawX)