diff options
| author | SND\dario86_cp <SND\dario86_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-03-12 18:54:28 +0000 |
|---|---|---|
| committer | SND\dario86_cp <SND\dario86_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-03-12 18:54:28 +0000 |
| commit | a58cfdac407bc1d8fedc11acd924b275ba28cc51 (patch) | |
| tree | b4c2e08c34ef1bfe0ba947ef8eed931c9a43fc0e /plugins/dfxvideo | |
| parent | 9bdd06684bcc627c06ddcf4c406f6b48f0dfe389 (diff) | |
| download | pcsxr-a58cfdac407bc1d8fedc11acd924b275ba28cc51.tar.gz | |
Commited patch in issue #8171 (by darktjm).
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@64524 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins/dfxvideo')
| -rw-r--r-- | plugins/dfxvideo/cfg.c | 4 | ||||
| -rw-r--r-- | plugins/dfxvideo/draw.c | 32 | ||||
| -rw-r--r-- | plugins/dfxvideo/draw.h | 12 | ||||
| -rw-r--r-- | plugins/dfxvideo/fps.c | 2 | ||||
| -rw-r--r-- | plugins/dfxvideo/gpu.c | 109 | ||||
| -rw-r--r-- | plugins/dfxvideo/gpucfg-0.1df/main.c | 45 | ||||
| -rw-r--r-- | plugins/dfxvideo/key.c | 1 | ||||
| -rw-r--r-- | plugins/dfxvideo/menu.c | 163 | ||||
| -rw-r--r-- | plugins/dfxvideo/prim.c | 90 | ||||
| -rw-r--r-- | plugins/dfxvideo/soft.c | 214 | ||||
| -rw-r--r-- | plugins/dfxvideo/zn.c | 56 |
11 files changed, 363 insertions, 365 deletions
diff --git a/plugins/dfxvideo/cfg.c b/plugins/dfxvideo/cfg.c index 9baf8bc2..04148486 100644 --- a/plugins/dfxvideo/cfg.c +++ b/plugins/dfxvideo/cfg.c @@ -80,7 +80,7 @@ char * pConfigFile = NULL; size+=sprintf(pB+size, "%s = %.1f\n", name, (double)var); \ } -void ReadConfigFile() +static void ReadConfigFile() { struct stat buf; FILE *in;char t[256];int len, size; @@ -166,7 +166,7 @@ void ReadConfigFile() free(pB); } -void ExecCfg(char *arg) { +static void ExecCfg(char *arg) { char cfg[256]; struct stat buf; diff --git a/plugins/dfxvideo/draw.c b/plugins/dfxvideo/draw.c index 53451ad7..52d665a9 100644 --- a/plugins/dfxvideo/draw.c +++ b/plugins/dfxvideo/draw.c @@ -63,8 +63,6 @@ int xv_vsync = 0; XShmSegmentInfo shminfo; int finalw,finalh; -extern XvImage *XvShmCreateImage(Display*, XvPortID, int, char*, int, int, XShmSegmentInfo*); - #include <time.h> // prototypes @@ -105,7 +103,7 @@ static __inline int GetResult2(DWORD A, DWORD B, DWORD C, DWORD D, DWORD E) } /* 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 = min(abs(R * 2104 + G * 4130 + B * 802 + 4096 + 131072) >> 13, 235); uint8_t U = min(abs(R * -1214 + G * -2384 + B * 3598 + 4096 + 1048576) >> 13, 240); uint8_t V = min(abs(R * 3598 + G * -3013 + B * -585 + 4096 + 1048576) >> 13, 240); @@ -127,7 +125,7 @@ __inline uint32_t rgb_to_yuv(uint8_t R, uint8_t G, uint8_t B) { + ((((A & qlowpixelMask8) + (B & qlowpixelMask8) + (C & qlowpixelMask8) + (D & qlowpixelMask8)) >> 2) & qlowpixelMask8)))) -void Super2xSaI_ex8(unsigned char *srcPtr, DWORD srcPitch, +static void Super2xSaI_ex8(unsigned char *srcPtr, DWORD srcPitch, unsigned char *dstBitmap, int width, int height) { DWORD dstPitch = srcPitch<<1; @@ -275,7 +273,7 @@ void Super2xSaI_ex8(unsigned char *srcPtr, DWORD srcPitch, //////////////////////////////////////////////////////////////////////// -void Std2xSaI_ex8(unsigned char *srcPtr, DWORD srcPitch, +static void Std2xSaI_ex8(unsigned char *srcPtr, DWORD srcPitch, unsigned char *dstBitmap, int width, int height) { DWORD dstPitch = srcPitch<<1; @@ -481,7 +479,7 @@ void Std2xSaI_ex8(unsigned char *srcPtr, DWORD srcPitch, //////////////////////////////////////////////////////////////////////// -void SuperEagle_ex8(unsigned char *srcPtr, DWORD srcPitch, +static void SuperEagle_ex8(unsigned char *srcPtr, DWORD srcPitch, unsigned char *dstBitmap, int width, int height) { DWORD dstPitch = srcPitch<<1; @@ -711,7 +709,7 @@ static __inline void scale2x_32_def_whole(uint32_t* dst0, uint32_t* dst1, const } } -void Scale2x_ex8(unsigned char *srcPtr, DWORD srcPitch, +static void Scale2x_ex8(unsigned char *srcPtr, DWORD srcPitch, unsigned char *dstPtr, int width, int height) { //const int srcpitch = srcPitch; @@ -840,7 +838,7 @@ static __inline void scale3x_32_def_whole(uint32_t* dst0, uint32_t* dst1, uint32 } -void Scale3x_ex8(unsigned char *srcPtr, DWORD srcPitch, +static void Scale3x_ex8(unsigned char *srcPtr, DWORD srcPitch, unsigned char *dstPtr, int width, int height) { int count = height; @@ -937,7 +935,7 @@ static Atom xv_intern_atom_if_exists( Display *display, char const * atom_name ) // close display -void DestroyDisplay(void) +static void DestroyDisplay(void) { if(display) { @@ -979,7 +977,7 @@ int root_window_id=0; // Create display -void CreateDisplay(void) +static void CreateDisplay(void) { XSetWindowAttributes winattr; int myscreen; @@ -1336,7 +1334,7 @@ shminfo.readOnly = 0; void (*p2XSaIFunc) (unsigned char *, DWORD, unsigned char *, int, int); unsigned char *pBackBuffer = 0; -void BlitScreen32(unsigned char *surf, int32_t x, int32_t y) +static void BlitScreen32(unsigned char *surf, int32_t x, int32_t y) { unsigned char *pD; unsigned int startxy; @@ -1405,7 +1403,7 @@ void BlitScreen32(unsigned char *surf, int32_t x, int32_t y) -void BlitToYUV(unsigned char * surf,int32_t x,int32_t y) +static void BlitToYUV(unsigned char * surf,int32_t x,int32_t y) { unsigned char * pD; unsigned int startxy; @@ -1498,7 +1496,7 @@ void BlitToYUV(unsigned char * surf,int32_t x,int32_t y) } //dst will have half the pitch (32bit to 16bit) -void RGB2YUV(uint32_t *s, int width, int height, uint32_t *d) +static void RGB2YUV(uint32_t *s, int width, int height, uint32_t *d) { int x,y; int R,G,B, Y1,Y2,U,V; @@ -1531,13 +1529,11 @@ void RGB2YUV(uint32_t *s, int width, int height, uint32_t *d) } } -extern time_t tStart; - /* compute the position and the size of output screen * The aspect of the psx output mode is preserved. * Note: dest dx,dy,dw,dh are both input and output variables */ -__inline void MaintainAspect(uint32_t * dx, uint32_t * dy, uint32_t * dw, uint32_t * dh) +static __inline void MaintainAspect(uint32_t * dx, uint32_t * dy, uint32_t * dw, uint32_t * dh) { double ratio_x = ((double)*dw) / ((double)PSXDisplay.DisplayMode.x) ; @@ -1673,7 +1669,7 @@ void DoClearFrontBuffer(void) // CLEAR DX BUFFER XSync(display,False);*/ } -int Xinitialize() +static int Xinitialize() { iDesktopCol=32; @@ -1739,7 +1735,7 @@ int Xinitialize() return 0; } -void Xcleanup() // X CLEANUP +static void Xcleanup() // X CLEANUP { CloseMenu(); diff --git a/plugins/dfxvideo/draw.h b/plugins/dfxvideo/draw.h index 2454a1f4..a769d795 100644 --- a/plugins/dfxvideo/draw.h +++ b/plugins/dfxvideo/draw.h @@ -41,6 +41,18 @@ typedef struct { void MoveScanLineArea(HWND hwnd); #endif +#if !defined(_WINDOWS) && !defined (_MACGL) +extern Display *display; +extern Window window; +extern int root_window_id; +#endif + +#ifndef _WINDOWS +extern char * Xpixels; +#endif + +#include <time.h> +extern time_t tStart; /////////////////////////////////////////////////////////////////////// #endif // _GPU_DRAW_H_ diff --git a/plugins/dfxvideo/fps.c b/plugins/dfxvideo/fps.c index 2edcd30b..b1734789 100644 --- a/plugins/dfxvideo/fps.c +++ b/plugins/dfxvideo/fps.c @@ -63,7 +63,7 @@ void CheckFrameRate(void) #define TIMEBASE 100000 -unsigned long timeGetTime() +static unsigned long timeGetTime() { struct timeval tv; gettimeofday(&tv, 0); // well, maybe there are better ways diff --git a/plugins/dfxvideo/gpu.c b/plugins/dfxvideo/gpu.c index 4aa6f230..e74331ae 100644 --- a/plugins/dfxvideo/gpu.c +++ b/plugins/dfxvideo/gpu.c @@ -32,16 +32,7 @@ #include "key.h" #include "fps.h" #include "swap.h" - -#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 +#include "psemu_plugin_defs.h" #ifdef _WINDOWS #include "resource.h" @@ -58,14 +49,20 @@ const unsigned char build = 17; // increase that with each version #if defined (_WINDOWS) static char *libraryName = N_("Soft Driver"); +#if 0 static char *libraryInfo = N_("P.E.Op.S. Soft Driver V1.17\nCoded by Pete Bernert and the P.E.Op.S. team\n"); +#endif #elif defined (_MACGL) static char *libraryName = N_("SoftGL Driver"); +#if 0 static char *libraryInfo = N_("P.E.Op.S. SoftGL Driver V1.17\nCoded by Pete Bernert and the P.E.Op.S. team\n"); +#endif #else static char *libraryName = N_("XVideo Driver"); +#if 0 static char *libraryInfo = N_("P.E.Op.S. Xvideo Driver V1.17\nCoded by Pete Bernert and the P.E.Op.S. team\n"); #endif +#endif static char *PluginAuthor = N_("Pete Bernert and the P.E.Op.S. team"); @@ -137,7 +134,7 @@ EXECUTION_STATE WINAPI STUB_SetThreadExecutionState(EXECUTION_STATE esFlags) // The dynamic version of the system call is prepended with a "D_" EXECUTION_STATE (WINAPI *D_SetThreadExecutionState)(EXECUTION_STATE esFlags) = STUB_SetThreadExecutionState; -BOOL LoadKernel32(void) +static BOOL LoadKernel32(void) { // Get a handle to the kernel32.dll (which is actually already loaded) kernel32LibHandle = LoadLibrary("kernel32.dll"); @@ -152,7 +149,7 @@ BOOL LoadKernel32(void) return TRUE; } -BOOL FreeKernel32(void) +static BOOL FreeKernel32(void) { // Release the handle to kernel32.dll if (kernel32LibHandle != NULL) @@ -166,12 +163,12 @@ BOOL FreeKernel32(void) #else // Linux: Stub the functions -BOOL LoadKernel32(void) +static BOOL LoadKernel32(void) { return TRUE; } -BOOL FreeKernel32(void) +static BOOL FreeKernel32(void) { return TRUE; } @@ -195,11 +192,13 @@ void CALLBACK GPUdisplayText(char * pText) // some debug func //////////////////////////////////////////////////////////////////////// +#if 0 void CALLBACK GPUdisplayFlags(unsigned long dwFlags) // some info func { dwCoreFlags=dwFlags; BuildDispMenu(0); } +#endif //////////////////////////////////////////////////////////////////////// // stuff to make this a true PDK module @@ -220,16 +219,18 @@ unsigned long CALLBACK PSEgetLibVersion(void) return version<<16|revision<<8|build; } +#if 0 char * GPUgetLibInfos(void) { return _(libraryInfo); } +#endif //////////////////////////////////////////////////////////////////////// // Snapshot func //////////////////////////////////////////////////////////////////////// -char * pGetConfigInfos(int iCfg) +static char * pGetConfigInfos(int iCfg) { char szO[2][4]={"off","on "}; char szTxt[256]; @@ -305,7 +306,12 @@ static void DoTextSnapShot(int iNum) pB = pGetConfigInfos(0); if (pB) { - fwrite(pB, strlen(pB), 1, txtfile); + if(fwrite(pB, strlen(pB), 1, txtfile) != 1) { + fclose(txtfile); + free(pB); + remove(szTxt); + return; + } free(pB); } fclose(txtfile); @@ -373,7 +379,11 @@ void CALLBACK GPUmakeSnapshot(void) if ((bmpfile = fopen(filename,"wb")) == NULL) return; - fwrite(header, 0x36, 1, bmpfile); + if(fwrite(header, 0x36, 1, bmpfile) != 1) { + fclose(bmpfile); + remove(filename); + return; + } for (i = height + PSXDisplay.DisplayPosition.y - 1; i >= PSXDisplay.DisplayPosition.y; i--) { pD = (unsigned char *)&psxVuw[i * 1024 + PSXDisplay.DisplayPosition.x]; @@ -396,10 +406,21 @@ void CALLBACK GPUmakeSnapshot(void) pD += 2; } } - fwrite(line, PreviousPSXDisplay.Range.x1 * 3, 1, bmpfile); + if(fwrite(line, PreviousPSXDisplay.Range.x1 * 3, 1, bmpfile) != 1) { + fclose(bmpfile); + remove(filename); + return; + } } - fwrite(empty, 0x2, 1, bmpfile); + if(fwrite(empty, 0x2, 1, bmpfile) != 1) { fclose(bmpfile); + remove(filename); + return; + } + if(fclose(bmpfile) != 0) { + remove(filename); + return; + } DoTextSnapShot(snapshotnr); } @@ -621,7 +642,7 @@ void updateDisplay(void) // UPDATE DISPLAY // roughly emulated screen centering bits... not complete !!! //////////////////////////////////////////////////////////////////////// -void ChangeDispOffsetsX(void) // X CENTER +static void ChangeDispOffsetsX(void) // X CENTER { long lx,l; @@ -681,7 +702,7 @@ void ChangeDispOffsetsX(void) // X CENTER //////////////////////////////////////////////////////////////////////// -void ChangeDispOffsetsY(void) // Y CENTER +static void ChangeDispOffsetsY(void) // Y CENTER { int iT,iO=PreviousPSXDisplay.Range.y0; int iOldYOffset=PreviousPSXDisplay.DisplayModeNew.y; @@ -741,7 +762,7 @@ void ChangeDispOffsetsY(void) // Y CENTER // check if update needed //////////////////////////////////////////////////////////////////////// -void updateDisplayIfChanged(void) // UPDATE DISPLAY IF CHANGED +static void updateDisplayIfChanged(void) // UPDATE DISPLAY IF CHANGED { if ((PSXDisplay.DisplayMode.y == PSXDisplay.DisplayModeNew.y) && (PSXDisplay.DisplayMode.x == PSXDisplay.DisplayModeNew.x)) @@ -793,11 +814,8 @@ void ChangeWindowMode(void) // TOGGLE FULLSCREEN - WI #include "draw.h" -void ChangeWindowMode(void) // TOGGLE FULLSCREEN - WINDOW +static void ChangeWindowMode(void) // TOGGLE FULLSCREEN - WINDOW { - extern Display *display; - extern Window window; - extern int root_window_id; Screen *screen; XSizeHints hints; MotifWmHints mwmhints; @@ -1240,7 +1258,7 @@ void CALLBACK GPUwriteStatus(uint32_t gdata) // WRITE STATUS // vram read/write helpers, needed by LEWPY's optimized vram read/write :) //////////////////////////////////////////////////////////////////////// -__inline void FinishedVRAMWrite(void) +static __inline void FinishedVRAMWrite(void) { /* // NEWX @@ -1267,7 +1285,7 @@ __inline void FinishedVRAMWrite(void) VRAMWrite.RowsRemaining = 0; } -__inline void FinishedVRAMRead(void) +static __inline void FinishedVRAMRead(void) { // Set register to NORMAL operation DataReadMode = DR_NORMAL; @@ -1568,6 +1586,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... @@ -1583,6 +1602,7 @@ long CALLBACK GPUgetMode(void) if(DataReadMode ==DR_VRAMTRANSFER) iT|=0x2; return iT; } +#endif //////////////////////////////////////////////////////////////////////// // call config dlg @@ -1629,7 +1649,7 @@ void SetFixes(void) unsigned long lUsedAddr[3]; -__inline BOOL CheckForEndlessLoop(unsigned long laddr) +static __inline BOOL CheckForEndlessLoop(unsigned long laddr) { if(laddr==lUsedAddr[1]) return TRUE; if(laddr==lUsedAddr[2]) return TRUE; @@ -1720,16 +1740,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) { //----------------------------------------------------// @@ -2019,7 +2029,9 @@ unsigned char cFont[10][120]= //////////////////////////////////////////////////////////////////////// -void PaintPicDot(unsigned char * p,unsigned char c) +#ifdef _WINDOWS /* used by commmented out linux version as well */ + +static void PaintPicDot(unsigned char * p,unsigned char c) { if(c==0) {*p++=0x00;*p++=0x00;*p=0x00;return;} // black @@ -2027,6 +2039,7 @@ void PaintPicDot(unsigned char * p,unsigned char c) if(c==2) {*p++=0x00;*p++=0x00;*p=0xff;return;} // red // transparent } +#endif //////////////////////////////////////////////////////////////////////// // the main emu allocs 128x96x3 bytes, and passes a ptr @@ -2039,7 +2052,7 @@ void PaintPicDot(unsigned char * p,unsigned char c) #ifdef _WINDOWS -void CALLBACK GPUgetScreenPic(unsigned char * pMem) +long CALLBACK GPUgetScreenPic(unsigned char * pMem) { HRESULT ddrval;DDSURFACEDESC xddsd;unsigned char * pf; int x,y,c,v;RECT r; @@ -2174,16 +2187,16 @@ void CALLBACK GPUgetScreenPic(unsigned char * pMem) *(pf+(127*3))=0xff;*pf++=0xff; pf+=127*3; // offset to next line } + return 0; } #else // LINUX version: -extern char * Xpixels; - -void GPUgetScreenPic(unsigned char * pMem) +long GPUgetScreenPic(unsigned char * pMem) { + return -1; /* unsigned short c;unsigned char * pf;int x,y; @@ -2250,6 +2263,7 @@ void GPUgetScreenPic(unsigned char * pMem) *(pf+(127*3))=0xff;*pf++=0xff; pf+=127*3; // offset to next line } + return 0; */ } @@ -2263,17 +2277,20 @@ 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 + if(pMem==0) 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) { dwEmuFixes=dwFixBits; } +#endif void CALLBACK GPUvBlank( int val ) { diff --git a/plugins/dfxvideo/gpucfg-0.1df/main.c b/plugins/dfxvideo/gpucfg-0.1df/main.c index 7a0e2327..e5062757 100644 --- a/plugins/dfxvideo/gpucfg-0.1df/main.c +++ b/plugins/dfxvideo/gpucfg-0.1df/main.c @@ -34,7 +34,7 @@ enum { /* 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) +static int set_limit (char *p, int len, int lower, int upper) { int val = 0; @@ -49,18 +49,18 @@ int set_limit (char *p, int len, int lower, int upper) 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, gpointer user_data) +static void set_widget_sensitive(GtkWidget *widget, gpointer user_data) { - gtk_widget_set_sensitive (widget, (int)user_data); + gtk_widget_set_sensitive (widget, (int)(long)user_data); } -void on_fullscreen_toggled(GtkWidget *widget, gpointer user_data) +static void on_fullscreen_toggled(GtkWidget *widget, gpointer user_data) { GtkWidget *check, *resCombo2; GladeXML *xml; @@ -69,10 +69,10 @@ void on_fullscreen_toggled(GtkWidget *widget, gpointer user_data) check = glade_xml_get_widget(xml, "checkFullscreen"); resCombo2 = glade_xml_get_widget(xml, "resCombo2"); - set_widget_sensitive(resCombo2, !gtk_toggle_button_get_active(check)); + gtk_widget_set_sensitive(resCombo2, !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check))); } -void on_use_fixes_toggled(GtkWidget *widget, gpointer user_data) +static void on_use_fixes_toggled(GtkWidget *widget, gpointer user_data) { GtkWidget *check, *table_fixes; GladeXML *xml; @@ -83,25 +83,26 @@ void on_use_fixes_toggled(GtkWidget *widget, gpointer user_data) /* Set the state of each of the fixes to the value of the use fixes toggle */ gtk_container_foreach (GTK_CONTAINER (table_fixes), (GtkCallback) set_widget_sensitive, - (void *)gtk_toggle_button_get_active (check)); + (gpointer)(long)gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(check))); } -void on_fps_toggled(GtkWidget *widget, gpointer user_data) +static void on_fps_toggled(GtkWidget *widget, gpointer user_data) { - GtkWidget *checkSetFPS, *checkAutoFPSLimit, *entryFPS; + GtkWidget *entryFPS, *checkAutoFPSLimit; + GtkToggleButton *checkSetFPS; GladeXML *xml; xml = (GladeXML*) user_data; - checkSetFPS = glade_xml_get_widget(xml, "checkSetFPS"); + checkSetFPS = GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "checkSetFPS")); checkAutoFPSLimit = glade_xml_get_widget(xml, "checkAutoFPSLimit"); entryFPS = glade_xml_get_widget(xml, "entryFPS"); - set_widget_sensitive(entryFPS, - gtk_toggle_button_get_active(checkSetFPS) && !gtk_toggle_button_get_active(checkAutoFPSLimit)); - set_widget_sensitive(checkAutoFPSLimit, gtk_toggle_button_get_active(checkSetFPS)); + gtk_widget_set_sensitive(entryFPS, + gtk_toggle_button_get_active(checkSetFPS) && !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkAutoFPSLimit))); + gtk_widget_set_sensitive(checkAutoFPSLimit, gtk_toggle_button_get_active(checkSetFPS)); } -void OnConfigClose(GtkWidget *widget, gpointer user_data) +static void OnConfigClose(GtkWidget *widget, gpointer user_data) { GladeXML *xml = (GladeXML *)user_data; @@ -112,9 +113,9 @@ void OnConfigClose(GtkWidget *widget, gpointer user_data) int main (int argc, char *argv[]) { - GtkWidget *CfgWnd, *widget; + GtkWidget *widget; GladeXML *xml; - FILE *in;char t[256];int len,val; + FILE *in;char t[256];int len = 0,val; float valf; char * pB, * p; char cfg[255]; @@ -282,7 +283,7 @@ main (int argc, char *argv[]) if(valf>500) valf=500; } sprintf(tempstr,"%.1f",valf); - gtk_entry_set_text(glade_xml_get_widget(xml, "entryFPS"),tempstr); + gtk_entry_set_text(GTK_ENTRY(glade_xml_get_widget(xml, "entryFPS")),tempstr); val=0; if(pB) @@ -343,7 +344,7 @@ main (int argc, char *argv[]) } -void SetCfgVal(char * pB,char * pE,int val) +static void SetCfgVal(char * pB,char * pE,int val) { char * p, *ps, *pC;char t[32]; @@ -381,7 +382,6 @@ void SaveConfig(GtkWidget *widget, gpointer user_data) char cfg[255]; char tempstr[50]; int i; - struct stat buf; pB=(char *)malloc(32767); memset(pB,0,32767); @@ -432,7 +432,7 @@ void SaveConfig(GtkWidget *widget, gpointer user_data) SetCfgVal(pB,"\nUseFrameSkip",val); //Framerate stored *10 - val = atof(gtk_entry_get_text(glade_xml_get_widget(xml, "entryFPS"))) * 10; + val = atof(gtk_entry_get_text(GTK_ENTRY(glade_xml_get_widget(xml, "entryFPS")))) * 10; SetCfgVal(pB,"\nFrameRate",val); val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "checkUseFixes"))); @@ -453,7 +453,8 @@ void SaveConfig(GtkWidget *widget, gpointer user_data) if((in=fopen(cfg, WRITEBINARY))!=NULL) { - fwrite(pB,strlen(pB),1,in); + if(fwrite(pB,strlen(pB),1,in) != 1) + perror(cfg); fclose(in); } diff --git a/plugins/dfxvideo/key.c b/plugins/dfxvideo/key.c index 4d75c8f4..17311ef8 100644 --- a/plugins/dfxvideo/key.c +++ b/plugins/dfxvideo/key.c @@ -22,6 +22,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/dfxvideo/menu.c b/plugins/dfxvideo/menu.c index 57ff2201..4867ca0b 100644 --- a/plugins/dfxvideo/menu.c +++ b/plugins/dfxvideo/menu.c @@ -20,79 +20,76 @@ #include "externals.h" #include "draw.h" #include "menu.h" -#include "gpu.h"
+#include "gpu.h" -#ifdef _WINDOWS
-
-#include "record.h"
-
-HFONT hGFont=NULL;
-BOOL bTransparent=FALSE;
-
-#endif
+#ifdef _WINDOWS + +#include "record.h" + +HFONT hGFont=NULL; +BOOL bTransparent=FALSE; + +#endif unsigned long dwCoreFlags = 0; // create lists/stuff for fonts (actually there are no more lists, but I am too lazy to change the func names ;) void InitMenu(void) -{
-#ifdef _WINDOWS
- hGFont=CreateFont(//-8,
- 13,0,0,0,FW_NORMAL,FALSE,FALSE,FALSE,
- ANSI_CHARSET,OUT_DEFAULT_PRECIS,
- CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,
- DEFAULT_PITCH,
- //"Courier New");
- //"MS Sans Serif");
- "Arial");
+{ +#ifdef _WINDOWS + hGFont=CreateFont(//-8, + 13,0,0,0,FW_NORMAL,FALSE,FALSE,FALSE, + ANSI_CHARSET,OUT_DEFAULT_PRECIS, + CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY, + DEFAULT_PITCH, + //"Courier New"); + //"MS Sans Serif"); + "Arial"); #endif } // kill existing lists/fonts void CloseMenu(void) { -#ifdef _WINDOWS
- if(hGFont) DeleteObject(hGFont);
- hGFont=NULL;
-#else
- DestroyPic();
+#ifdef _WINDOWS + if(hGFont) DeleteObject(hGFont); + hGFont=NULL; +#else + DestroyPic(); #endif } // DISPLAY FPS/MENU TEXT -#include <time.h> -extern time_t tStart; - int iMPos=0; // menu arrow pos void DisplayText(void) // DISPLAY TEXT -{
-#ifdef _WINDOWS
- HDC hdc;HFONT hFO;
-
- IDirectDrawSurface_GetDC(DX.DDSRender,&hdc);
- hFO=(HFONT)SelectObject(hdc,hGFont);
-
- SetTextColor(hdc,RGB(0,255,0));
- if(bTransparent)
- SetBkMode(hdc,TRANSPARENT);
- else SetBkColor(hdc,RGB(0,0,0));
-
- if(szDebugText[0] && ((time(NULL) - tStart) < 2)) // special debug text? show it
- {
- RECT r={0,0,1024,1024};
- DrawText(hdc,szDebugText,lstrlen(szDebugText),&r,DT_LEFT|DT_NOCLIP);
- }
- else // else standard gpu menu
- {
- szDebugText[0]=0;
- lstrcat(szDispBuf,szMenuBuf);
- ExtTextOut(hdc,0,0,0,NULL,szDispBuf,lstrlen(szDispBuf),NULL);
- }
-
- SelectObject(hdc,hFO);
- IDirectDrawSurface_ReleaseDC(DX.DDSRender,hdc);
+{ +#ifdef _WINDOWS + HDC hdc;HFONT hFO; + + IDirectDrawSurface_GetDC(DX.DDSRender,&hdc); + hFO=(HFONT)SelectObject(hdc,hGFont); + + SetTextColor(hdc,RGB(0,255,0)); + if(bTransparent) + SetBkMode(hdc,TRANSPARENT); + else SetBkColor(hdc,RGB(0,0,0)); + + if(szDebugText[0] && ((time(NULL) - tStart) < 2)) // special debug text? show it + { + RECT r={0,0,1024,1024}; + DrawText(hdc,szDebugText,lstrlen(szDebugText),&r,DT_LEFT|DT_NOCLIP); + } + else // else standard gpu menu + { + szDebugText[0]=0; + lstrcat(szDispBuf,szMenuBuf); + ExtTextOut(hdc,0,0,0,NULL,szDispBuf,lstrlen(szDispBuf),NULL); + } + + SelectObject(hdc,hFO); + IDirectDrawSurface_ReleaseDC(DX.DDSRender,hdc); #endif } @@ -144,27 +141,27 @@ void BuildDispMenu(int iInc) szMenuBuf[24]='0'+(char)((dwCoreFlags&0xf000)>>12); // number } -#ifdef _WINDOWS
- if(bVsync_Key) szMenuBuf[25] = 'V';
-#endif
+#ifdef _WINDOWS + if(bVsync_Key) szMenuBuf[25] = 'V'; +#endif if(lSelectedSlot) szMenuBuf[26] = '0'+(char)lSelectedSlot; - szMenuBuf[(iMPos+1)*5]='<'; // set arrow
- -#ifdef _WINDOWS
- if(RECORD_RECORDING)
- {
- szMenuBuf[27] = ' ';
- szMenuBuf[28] = ' ';
- szMenuBuf[29] = ' ';
- szMenuBuf[30] = 'R';
- szMenuBuf[31] = 'e';
- szMenuBuf[32] = 'c';
- szMenuBuf[33] = 0;
- }
-
- if(DX.DDSScreenPic) ShowTextGpuPic();
+ szMenuBuf[(iMPos+1)*5]='<'; // set arrow + +#ifdef _WINDOWS + if(RECORD_RECORDING) + { + szMenuBuf[27] = ' '; + szMenuBuf[28] = ' '; + szMenuBuf[29] = ' '; + szMenuBuf[30] = 'R'; + szMenuBuf[31] = 'e'; + szMenuBuf[32] = 'c'; + szMenuBuf[33] = 0; + } + + if(DX.DDSScreenPic) ShowTextGpuPic(); #endif } @@ -178,18 +175,18 @@ void SwitchDispMenu(int iStep) // SWITCH DISP MENU case 0: // frame limit { int iType=0; - bInitCap = TRUE;
- -#ifdef _WINDOWS
- if(iFrameLimit==1 && UseFrameLimit &&
- GetAsyncKeyState(VK_SHIFT)&32768)
- {
- fFrameRate+=iStep;
- if(fFrameRate<3.0f) fFrameRate=3.0f;
- SetAutoFrameCap();
- break;
- }
-#endif
+ bInitCap = TRUE; + +#ifdef _WINDOWS + if(iFrameLimit==1 && UseFrameLimit && + GetAsyncKeyState(VK_SHIFT)&32768) + { + fFrameRate+=iStep; + if(fFrameRate<3.0f) fFrameRate=3.0f; + SetAutoFrameCap(); + break; + } +#endif if(UseFrameLimit) iType=iFrameLimit; iType+=iStep; diff --git a/plugins/dfxvideo/prim.c b/plugins/dfxvideo/prim.c index 563980ae..8729170a 100644 --- a/plugins/dfxvideo/prim.c +++ b/plugins/dfxvideo/prim.c @@ -54,7 +54,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)); } @@ -65,7 +65,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) { GlobalTextAddrX = (gdata << 6) & 0x3c0; // texture addr @@ -119,7 +119,7 @@ __inline void UpdateGlobalTP(unsigned short gdata) //////////////////////////////////////////////////////////////////////// -__inline void SetRenderMode(uint32_t DrawAttributes) +static __inline void SetRenderMode(uint32_t DrawAttributes) { DrawSemiTrans = (SEMITRANSBIT(DrawAttributes)) ? TRUE : FALSE; @@ -155,7 +155,7 @@ __inline void SetRenderMode(uint32_t DrawAttributes) #define CHKMAX_X 1024 #define CHKMAX_Y 512 -void AdjustCoord4() +static void AdjustCoord4() { lx0=(short)(((int)lx0<<SIGNSHIFT)>>SIGNSHIFT); lx1=(short)(((int)lx1<<SIGNSHIFT)>>SIGNSHIFT); @@ -167,7 +167,7 @@ void AdjustCoord4() ly3=(short)(((int)ly3<<SIGNSHIFT)>>SIGNSHIFT); } -void AdjustCoord3() +static void AdjustCoord3() { lx0=(short)(((int)lx0<<SIGNSHIFT)>>SIGNSHIFT); lx1=(short)(((int)lx1<<SIGNSHIFT)>>SIGNSHIFT); @@ -177,7 +177,7 @@ void AdjustCoord3() ly2=(short)(((int)ly2<<SIGNSHIFT)>>SIGNSHIFT); } -void AdjustCoord2() +static void AdjustCoord2() { lx0=(short)(((int)lx0<<SIGNSHIFT)>>SIGNSHIFT); lx1=(short)(((int)lx1<<SIGNSHIFT)>>SIGNSHIFT); @@ -185,7 +185,7 @@ void AdjustCoord2() ly1=(short)(((int)ly1<<SIGNSHIFT)>>SIGNSHIFT); } -void AdjustCoord1() +static void AdjustCoord1() { lx0=(short)(((int)lx0<<SIGNSHIFT)>>SIGNSHIFT); ly0=(short)(((int)ly0<<SIGNSHIFT)>>SIGNSHIFT); @@ -207,11 +207,13 @@ void AdjustCoord1() // x -466 1023 180 1023 // y 20 -228 222 -100 +/* // 0 __1 // \ / \ // 2___3 +*/ -__inline BOOL CheckCoord4() +static __inline BOOL CheckCoord4() { if(lx0<0) { @@ -277,7 +279,7 @@ __inline BOOL CheckCoord4() return FALSE; } -__inline BOOL CheckCoord3() +static __inline BOOL CheckCoord3() { if(lx0<0) { @@ -314,7 +316,7 @@ __inline BOOL CheckCoord3() } -__inline BOOL CheckCoord2() +static __inline BOOL CheckCoord2() { if(lx0<0) { @@ -336,7 +338,7 @@ __inline BOOL CheckCoord2() return FALSE; } -__inline BOOL CheckCoordL(short slx0,short sly0,short slx1,short sly1) +static __inline BOOL CheckCoordL(short slx0,short sly0,short slx1,short sly1) { if(slx0<0) { @@ -363,7 +365,7 @@ __inline BOOL 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]); @@ -381,7 +383,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]); @@ -398,7 +400,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]); @@ -466,7 +468,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]); @@ -490,7 +492,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]); @@ -514,7 +516,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]); @@ -539,7 +541,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); @@ -559,7 +561,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); @@ -581,7 +583,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); @@ -610,7 +612,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); @@ -718,7 +720,7 @@ void primMoveImage(unsigned char * baseAddr) //#define SMALLDEBUG //#include <dbgout.h> -void primTileS(unsigned char * baseAddr) +static void primTileS(unsigned char * baseAddr) { uint32_t *gpuData = ((uint32_t*)baseAddr); short *sgpuData = ((short *) baseAddr); @@ -749,7 +751,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); @@ -779,7 +781,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); @@ -809,7 +811,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); @@ -839,7 +841,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); @@ -865,7 +867,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); @@ -892,7 +894,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); @@ -977,7 +979,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); @@ -1023,7 +1025,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); @@ -1055,7 +1057,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); @@ -1088,7 +1090,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); @@ -1121,7 +1123,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); @@ -1157,7 +1159,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); @@ -1197,7 +1199,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); @@ -1227,7 +1229,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); @@ -1270,7 +1272,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); @@ -1300,7 +1302,7 @@ void primPolyF3(unsigned char *baseAddr) // cmd: skipping shaded polylines //////////////////////////////////////////////////////////////////////// -void primLineGSkip(unsigned char *baseAddr) +static void primLineGSkip(unsigned char *baseAddr) { uint32_t *gpuData = ((uint32_t *) baseAddr); int iMax=255; @@ -1322,7 +1324,7 @@ void primLineGSkip(unsigned char *baseAddr) // cmd: shaded polylines //////////////////////////////////////////////////////////////////////// -void primLineGEx(unsigned char *baseAddr) +static void primLineGEx(unsigned char *baseAddr) { uint32_t *gpuData = ((uint32_t *) baseAddr); int iMax=255; @@ -1383,7 +1385,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); @@ -1412,7 +1414,7 @@ void primLineG2(unsigned char *baseAddr) // cmd: skipping flat polylines //////////////////////////////////////////////////////////////////////// -void primLineFSkip(unsigned char *baseAddr) +static void primLineFSkip(unsigned char *baseAddr) { uint32_t *gpuData = ((uint32_t *) baseAddr); int i=2,iMax=255; @@ -1432,7 +1434,7 @@ void primLineFSkip(unsigned char *baseAddr) // cmd: drawing flat polylines //////////////////////////////////////////////////////////////////////// -void primLineFEx(unsigned char *baseAddr) +static void primLineFEx(unsigned char *baseAddr) { uint32_t *gpuData = ((uint32_t *) baseAddr); int iMax; @@ -1481,7 +1483,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); @@ -1511,7 +1513,7 @@ void primLineF2(unsigned char *baseAddr) // cmd: well, easiest command... not implemented //////////////////////////////////////////////////////////////////////// -void primNI(unsigned char *bA) +static void primNI(unsigned char *bA) { } diff --git a/plugins/dfxvideo/soft.c b/plugins/dfxvideo/soft.c index 4fdb3ae8..a0b2d25e 100644 --- a/plugins/dfxvideo/soft.c +++ b/plugins/dfxvideo/soft.c @@ -25,11 +25,11 @@ #include "prim.h" #include "menu.h" #include "swap.h" -
-#ifdef _WINDOWS
-#pragma warning (disable:4244)
-#pragma warning (disable:4761)
-#endif
+ +#ifdef _WINDOWS +#pragma warning (disable:4244) +#pragma warning (disable:4761) +#endif //////////////////////////////////////////////////////////////////////////////////// // "NO EDGE BUFFER" POLY VERSION... FUNCS BASED ON FATMAP.TXT FROM MRI / Doomsday @@ -211,7 +211,7 @@ unsigned char dithertable[16] = 4, 3, 5, 2 }; -void Dither16(unsigned short * pdest,uint32_t r,uint32_t g,uint32_t b,unsigned short sM) +static void Dither16(unsigned short * pdest,uint32_t r,uint32_t g,uint32_t b,unsigned short sM) { unsigned char coeff; unsigned char rlow, glow, blow; @@ -240,7 +240,7 @@ void Dither16(unsigned short * pdest,uint32_t r,uint32_t g,uint32_t b,unsigned s ///////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////// -__inline void GetShadeTransCol_Dither(unsigned short * pdest, int32_t m1, int32_t m2, int32_t m3) +static __inline void GetShadeTransCol_Dither(unsigned short * pdest, int32_t m1, int32_t m2, int32_t m3) { int32_t r,g,b; @@ -304,7 +304,7 @@ __inline void GetShadeTransCol_Dither(unsigned short * pdest, int32_t m1, int32_ //////////////////////////////////////////////////////////////////////// -__inline void GetShadeTransCol(unsigned short * pdest,unsigned short color) +static __inline void GetShadeTransCol(unsigned short * pdest,unsigned short color) { if(bCheckMask && (*pdest & HOST2LE16(0x8000))) return; @@ -363,7 +363,7 @@ __inline void GetShadeTransCol(unsigned short * pdest,unsigned short color) //////////////////////////////////////////////////////////////////////// -__inline void GetShadeTransCol32(uint32_t * pdest,uint32_t color) +static __inline void GetShadeTransCol32(uint32_t * pdest,uint32_t color) { if(DrawSemiTrans) { @@ -450,7 +450,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; @@ -523,7 +523,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; @@ -544,7 +544,7 @@ __inline void GetTextureTransColG_S(unsigned short * pdest,unsigned short color) //////////////////////////////////////////////////////////////////////// -__inline void GetTextureTransColG_SPR(unsigned short * pdest,unsigned short color) +static __inline void GetTextureTransColG_SPR(unsigned short * pdest,unsigned short color) { int32_t r,g,b;unsigned short l; @@ -617,7 +617,7 @@ __inline void GetTextureTransColG_SPR(unsigned short * pdest,unsigned short colo //////////////////////////////////////////////////////////////////////// -__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; @@ -721,7 +721,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; @@ -746,7 +746,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; @@ -848,7 +848,7 @@ __inline void GetTextureTransColG32_SPR(uint32_t * pdest,uint32_t color) //////////////////////////////////////////////////////////////////////// -__inline void GetTextureTransColGX_Dither(unsigned short * pdest,unsigned short color,int32_t m1,int32_t m2,int32_t m3) +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; @@ -919,7 +919,7 @@ __inline void GetTextureTransColGX_Dither(unsigned short * pdest,unsigned short //////////////////////////////////////////////////////////////////////// -__inline void GetTextureTransColGX(unsigned short * pdest,unsigned short color,short m1,short m2,short m3) +static __inline void GetTextureTransColGX(unsigned short * pdest,unsigned short color,short m1,short m2,short m3) { int32_t r,g,b;unsigned short l; @@ -991,7 +991,7 @@ __inline void GetTextureTransColGX(unsigned short * pdest,unsigned short color,s //////////////////////////////////////////////////////////////////////// -__inline void GetTextureTransColGX_S(unsigned short * pdest,unsigned short color,short m1,short m2,short m3) +static __inline void GetTextureTransColGX_S(unsigned short * pdest,unsigned short color,short m1,short m2,short m3) { int32_t r,g,b; @@ -1010,7 +1010,7 @@ __inline void GetTextureTransColGX_S(unsigned short * pdest,unsigned short color //////////////////////////////////////////////////////////////////////// -__inline void GetTextureTransColGX32_S(uint32_t * pdest,uint32_t color,short m1,short m2,short m3) +static __inline void GetTextureTransColGX32_S(uint32_t * pdest,uint32_t color,short m1,short m2,short m3) { int32_t r,g,b; @@ -1205,11 +1205,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 bi=x; bi<<=10; @@ -1222,7 +1222,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; @@ -1235,7 +1235,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 ]; @@ -1251,7 +1251,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 ]; @@ -1267,7 +1267,7 @@ __inline int LeftSection_F(void) //////////////////////////////////////////////////////////////////////// -__inline BOOL NextRow_F(void) +static __inline BOOL NextRow_F(void) { if(--left_section_height<=0) { @@ -1293,7 +1293,7 @@ __inline BOOL NextRow_F(void) //////////////////////////////////////////////////////////////////////// -__inline BOOL SetupSections_F(short x1, short y1, short x2, short y2, short x3, short y3) +static __inline BOOL SetupSections_F(short x1, short y1, short x2, short y2, short x3, short y3) { soft_vertex * v1, * v2, * v3; int height,longest; @@ -1355,7 +1355,7 @@ __inline BOOL 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 ]; @@ -1371,7 +1371,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 ]; @@ -1394,7 +1394,7 @@ __inline int LeftSection_G(void) //////////////////////////////////////////////////////////////////////// -__inline BOOL NextRow_G(void) +static __inline BOOL NextRow_G(void) { if(--left_section_height<=0) { @@ -1423,7 +1423,7 @@ __inline BOOL NextRow_G(void) //////////////////////////////////////////////////////////////////////// -__inline BOOL SetupSections_G(short x1,short y1,short x2,short y2,short x3,short y3,int32_t rgb1, int32_t rgb2, int32_t rgb3) +static __inline BOOL 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; @@ -1501,7 +1501,7 @@ __inline BOOL SetupSections_G(short x1,short y1,short x2,short y2,short x3,short //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// -__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 ]; @@ -1517,7 +1517,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 ]; @@ -1538,7 +1538,7 @@ __inline int LeftSection_FT(void) //////////////////////////////////////////////////////////////////////// -__inline BOOL NextRow_FT(void) +static __inline BOOL NextRow_FT(void) { if(--left_section_height<=0) { @@ -1566,7 +1566,7 @@ __inline BOOL NextRow_FT(void) //////////////////////////////////////////////////////////////////////// -__inline BOOL 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) +static __inline BOOL 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; int height,longest,temp; @@ -1654,7 +1654,7 @@ texture distortions //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// -__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 ]; @@ -1670,7 +1670,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 ]; @@ -1698,7 +1698,7 @@ __inline int LeftSection_GT(void) //////////////////////////////////////////////////////////////////////// -__inline BOOL NextRow_GT(void) +static __inline BOOL NextRow_GT(void) { if(--left_section_height<=0) { @@ -1729,7 +1729,7 @@ __inline BOOL NextRow_GT(void) //////////////////////////////////////////////////////////////////////// -__inline BOOL 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) +static __inline BOOL 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; int height,longest,temp; @@ -1834,7 +1834,7 @@ texture distortions //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// -__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 ]; @@ -1853,7 +1853,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 ]; @@ -1872,7 +1872,7 @@ __inline int LeftSection_F4(void) //////////////////////////////////////////////////////////////////////// -__inline BOOL NextRow_F4(void) +static __inline BOOL NextRow_F4(void) { if(--left_section_height<=0) { @@ -1904,7 +1904,7 @@ __inline BOOL NextRow_F4(void) //////////////////////////////////////////////////////////////////////// -__inline BOOL SetupSections_F4(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4) +static __inline BOOL 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; @@ -2046,7 +2046,7 @@ __inline BOOL 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 ]; @@ -2069,7 +2069,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 ]; @@ -2092,7 +2092,7 @@ __inline int LeftSection_FT4(void) //////////////////////////////////////////////////////////////////////// -__inline BOOL NextRow_FT4(void) +static __inline BOOL NextRow_FT4(void) { if(--left_section_height<=0) { @@ -2128,7 +2128,7 @@ __inline BOOL NextRow_FT4(void) //////////////////////////////////////////////////////////////////////// -__inline BOOL 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) +static __inline BOOL 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; int height,width,longest1,longest2; @@ -2277,7 +2277,7 @@ __inline BOOL 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 ]; @@ -2307,7 +2307,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 ]; @@ -2337,7 +2337,7 @@ __inline int LeftSection_GT4(void) //////////////////////////////////////////////////////////////////////// -__inline BOOL NextRow_GT4(void) +static __inline BOOL NextRow_GT4(void) { if(--left_section_height<=0) { @@ -2379,7 +2379,7 @@ __inline BOOL NextRow_GT4(void) //////////////////////////////////////////////////////////////////////// -__inline BOOL 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) +static __inline BOOL 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) { soft_vertex * v1, * v2, * v3, * v4; int height,width,longest1,longest2; @@ -2549,7 +2549,7 @@ __inline BOOL 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,short y3,int32_t rgb) +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;uint32_t lcolor; @@ -2693,7 +2693,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, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3,short clX, short clY) +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; int32_t difX, difY,difX2, difY2; @@ -2825,7 +2825,7 @@ void drawPoly3TEx4(short x1, short y1, short x2, short y2, short x3, short y3, s //////////////////////////////////////////////////////////////////////// -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) +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; int32_t difX, difY,difX2, difY2; @@ -2981,7 +2981,7 @@ void drawPoly3TEx4_IL(short x1, short y1, short x2, short y2, short x3, short y3 //////////////////////////////////////////////////////////////////////// -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) +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; int32_t difX, difY,difX2, difY2; @@ -3120,7 +3120,7 @@ void drawPoly3TEx4_TW(short x1, short y1, short x2, short y2, short x3, short y3 #ifdef POLYQUAD3 -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) +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) { drawPoly3TEx4(x2,y2,x3,y3,x4,y4, tx2,ty2,tx3,ty3,tx4,ty4, @@ -3134,7 +3134,7 @@ void drawPoly4TEx4_TRI(short x1, short y1, short x2, short y2, short x3, short y // more exact: -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) +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; int32_t i,j,xmin,xmax,ymin,ymax; @@ -3270,7 +3270,7 @@ void drawPoly4TEx4(short x1, short y1, short x2, short y2, short x3, short y3, s //////////////////////////////////////////////////////////////////////// -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) +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) { int32_t num; int32_t i,j=0,xmin,xmax,ymin,ymax,n_xi,n_yi,TXV; @@ -3429,7 +3429,7 @@ void drawPoly4TEx4_IL(short x1, short y1, short x2, short y2, short x3, short y3 //////////////////////////////////////////////////////////////////////// -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) +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) { int32_t num; int32_t i,j,xmin,xmax,ymin,ymax; @@ -3567,7 +3567,7 @@ void drawPoly4TEx4_TW(short x1, short y1, short x2, short y2, short x3, short y3 //////////////////////////////////////////////////////////////////////// -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) +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) { int32_t num; int32_t i,j,xmin,xmax,ymin,ymax; @@ -3706,7 +3706,7 @@ void drawPoly4TEx4_TW_S(short x1, short y1, short x2, short y2, short x3, short // POLY 3 F-SHADED TEX PAL 8 //////////////////////////////////////////////////////////////////////// -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) +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; int32_t difX, difY,difX2, difY2; @@ -3822,7 +3822,7 @@ void drawPoly3TEx8(short x1, short y1, short x2, short y2, short x3, short y3, s //////////////////////////////////////////////////////////////////////// -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) +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; int32_t difX, difY,difX2, difY2; @@ -3972,7 +3972,7 @@ void drawPoly3TEx8_IL(short x1, short y1, short x2, short y2, short x3, short y3 //////////////////////////////////////////////////////////////////////// -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) +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; int32_t difX, difY,difX2, difY2; @@ -4097,7 +4097,7 @@ void drawPoly3TEx8_TW(short x1, short y1, short x2, short y2, short x3, short y3 #ifdef POLYQUAD3 -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) +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) { drawPoly3TEx8(x2,y2,x3,y3,x4,y4, tx2,ty2,tx3,ty3,tx4,ty4, @@ -4112,7 +4112,7 @@ void drawPoly4TEx8_TRI(short x1, short y1, short x2, short y2, short x3, short y // more exact: -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) +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; int32_t i,j,xmin,xmax,ymin,ymax; @@ -4231,7 +4231,7 @@ void drawPoly4TEx8(short x1, short y1, short x2, short y2, short x3, short y3, s //////////////////////////////////////////////////////////////////////// -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) +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) { int32_t num; int32_t i,j,xmin,xmax,ymin,ymax,n_xi,n_yi,TXV,TXU; @@ -4382,7 +4382,7 @@ void drawPoly4TEx8_IL(short x1, short y1, short x2, short y2, short x3, short y3 //////////////////////////////////////////////////////////////////////// -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) +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) { int32_t num; int32_t i,j,xmin,xmax,ymin,ymax; @@ -4507,7 +4507,7 @@ void drawPoly4TEx8_TW(short x1, short y1, short x2, short y2, short x3, short y3 //////////////////////////////////////////////////////////////////////// -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) +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) { int32_t num; int32_t i,j,xmin,xmax,ymin,ymax; @@ -4634,7 +4634,7 @@ void drawPoly4TEx8_TW_S(short x1, short y1, short x2, short y2, short x3, short // POLY 3 F-SHADED TEX 15 BIT //////////////////////////////////////////////////////////////////////// -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) +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; @@ -4734,7 +4734,7 @@ void drawPoly3TD(short x1, short y1, short x2, short y2, short x3, short y3, sho //////////////////////////////////////////////////////////////////////// -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) +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; @@ -4843,7 +4843,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, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4) +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); @@ -4855,7 +4855,7 @@ void drawPoly4TD_TRI(short x1, short y1, short x2, short y2, short x3, short y3, // more exact: -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) +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; int32_t i,j,xmin,xmax,ymin,ymax; @@ -4961,7 +4961,7 @@ void drawPoly4TD(short x1, short y1, short x2, short y2, short x3, short y3, sho //////////////////////////////////////////////////////////////////////// -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) +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; int32_t i,j,xmin,xmax,ymin,ymax; @@ -5073,7 +5073,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, short y3, short x4, short y4, short tx1, short ty1, short tx2, short ty2, short tx3, short ty3, short tx4, short ty4) +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; int32_t i,j,xmin,xmax,ymin,ymax; @@ -5187,7 +5187,7 @@ void drawPoly4TD_TW_S(short x1, short y1, short x2, short y2, short x3, short y3 // POLY 3/4 G-SHADED //////////////////////////////////////////////////////////////////////// -__inline void drawPoly3Gi(short x1,short y1,short x2,short y2,short x3,short y3,int32_t rgb1, int32_t rgb2, int32_t rgb3) +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; @@ -5328,7 +5328,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, 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) +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; int32_t cR1,cG1,cB1; @@ -5474,7 +5474,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, 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) +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) { int i,j,xmin,xmax,ymin,ymax,n_xi,n_yi,TXV; int32_t cR1,cG1,cB1; @@ -5638,7 +5638,7 @@ void drawPoly3TGEx4_IL(short x1, short y1, short x2, short y2, short x3, short y //////////////////////////////////////////////////////////////////////// -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) +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) { int i,j,xmin,xmax,ymin,ymax; int32_t cR1,cG1,cB1; @@ -5792,7 +5792,7 @@ void drawPoly3TGEx4_TW(short x1, short y1, short x2, short y2, short x3, short y // correct that way, so small texture distortions can // happen... -void drawPoly4TGEx4_TRI_IL(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, +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) @@ -5809,7 +5809,7 @@ void drawPoly4TGEx4_TRI_IL(short x1, short y1, short x2, short y2, short x3, sho #ifdef POLYQUAD3GT -void drawPoly4TGEx4_TRI(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, +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) @@ -5828,7 +5828,7 @@ void drawPoly4TGEx4_TRI(short x1, short y1, short x2, short y2, short x3, short //////////////////////////////////////////////////////////////////////// -void drawPoly4TGEx4(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, +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) @@ -5994,7 +5994,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, short y3, short x4, short y4, +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) @@ -6014,7 +6014,7 @@ void drawPoly4TGEx4_TW(short x1, short y1, short x2, short y2, short x3, short y // POLY 3/4 G-SHADED TEX PAL8 //////////////////////////////////////////////////////////////////////// -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) +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; int32_t cR1,cG1,cB1; @@ -6150,7 +6150,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, 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) +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) { int i,j,xmin,xmax,ymin,ymax,n_xi,n_yi,TXV,TXU; int32_t cR1,cG1,cB1; @@ -6309,7 +6309,7 @@ void drawPoly3TGEx8_IL(short x1, short y1, short x2, short y2, short x3, short y //////////////////////////////////////////////////////////////////////// -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) +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) { int i,j,xmin,xmax,ymin,ymax; int32_t cR1,cG1,cB1; @@ -6452,7 +6452,7 @@ void drawPoly3TGEx8_TW(short x1, short y1, short x2, short y2, short x3, short y // note: two g-shaded tris: small texture distortions can happen -void drawPoly4TGEx8_TRI_IL(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, +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) @@ -6469,7 +6469,7 @@ void drawPoly4TGEx8_TRI_IL(short x1, short y1, short x2, short y2, short x3, sho #ifdef POLYQUAD3GT -void drawPoly4TGEx8_TRI(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, +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) @@ -6486,7 +6486,7 @@ void drawPoly4TGEx8_TRI(short x1, short y1, short x2, short y2, short x3, short #endif -void drawPoly4TGEx8(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, +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) @@ -6640,7 +6640,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, short y3, short x4, short y4, +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) @@ -6659,7 +6659,7 @@ void drawPoly4TGEx8_TW(short x1, short y1, short x2, short y2, short x3, short y // POLY 3 G-SHADED TEX 15 BIT //////////////////////////////////////////////////////////////////////// -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) +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; int32_t cR1,cG1,cB1; @@ -6783,7 +6783,7 @@ void drawPoly3TGD(short x1, short y1, short x2, short y2, short x3, short y3, sh //////////////////////////////////////////////////////////////////////// -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) +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; int32_t cR1,cG1,cB1; @@ -6916,7 +6916,7 @@ void drawPoly3TGD_TW(short x1, short y1, short x2, short y2, short x3, short y3, #ifdef POLYQUAD3GT -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) +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) { drawPoly3TGD(x2,y2,x3,y3,x4,y4, tx2,ty2,tx3,ty3,tx4,ty4, @@ -6928,7 +6928,7 @@ void drawPoly4TGD_TRI(short x1, short y1, short x2, short y2, short x3, short y3 #endif -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) +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) { int32_t num; int32_t i,j,xmin,xmax,ymin,ymax; @@ -7066,7 +7066,7 @@ void drawPoly4TGD(short x1, short y1, short x2, short y2, short x3, short y3, sh //////////////////////////////////////////////////////////////////////// -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) +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) { drawPoly3TGD_TW(x2,y2,x3,y3,x4,y4, tx2,ty2,tx3,ty3,tx4,ty4, @@ -7096,7 +7096,7 @@ __inline BOOL IsNoRect(void) */ // real rect test -__inline BOOL IsNoRect(void) +static __inline BOOL IsNoRect(void) { if(!(dwActFixes&0x200)) return FALSE; @@ -7554,7 +7554,7 @@ void DrawSoftwareSpriteMirror(unsigned char * baseAddr,int32_t w,int32_t h) //////////////////////////////////////////////////////////////////////// -void DrawSoftwareSprite_IL(unsigned char * baseAddr,short w,short h,int32_t tx,int32_t ty) +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; @@ -7839,7 +7839,7 @@ void DrawSoftwareSprite(unsigned char * baseAddr,short w,short h,int32_t tx,int3 /////////////////////////////////////////////////////////////////////// -void Line_E_SE_Shade(int x0, int y0, int x1, int y1, uint32_t rgb0, uint32_t rgb1) +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; @@ -7898,7 +7898,7 @@ void Line_E_SE_Shade(int x0, int y0, int x1, int y1, uint32_t rgb0, uint32_t rgb /////////////////////////////////////////////////////////////////////// -void Line_S_SE_Shade(int x0, int y0, int x1, int y1, uint32_t rgb0, uint32_t rgb1) +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; @@ -7957,7 +7957,7 @@ void Line_S_SE_Shade(int x0, int y0, int x1, int y1, uint32_t rgb0, uint32_t rgb /////////////////////////////////////////////////////////////////////// -void Line_N_NE_Shade(int x0, int y0, int x1, int y1, uint32_t rgb0, uint32_t rgb1) +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; @@ -8016,7 +8016,7 @@ void Line_N_NE_Shade(int x0, int y0, int x1, int y1, uint32_t rgb0, uint32_t rgb /////////////////////////////////////////////////////////////////////// -void Line_E_NE_Shade(int x0, int y0, int x1, int y1, uint32_t rgb0, uint32_t rgb1) +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; @@ -8075,7 +8075,7 @@ void Line_E_NE_Shade(int x0, int y0, int x1, int y1, uint32_t rgb0, uint32_t rgb /////////////////////////////////////////////////////////////////////// -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; @@ -8125,7 +8125,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; @@ -8175,7 +8175,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; @@ -8208,7 +8208,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; @@ -8241,7 +8241,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; @@ -8274,7 +8274,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; @@ -8307,7 +8307,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; @@ -8323,7 +8323,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; diff --git a/plugins/dfxvideo/zn.c b/plugins/dfxvideo/zn.c index 534e9674..d3fe1c57 100644 --- a/plugins/dfxvideo/zn.c +++ b/plugins/dfxvideo/zn.c @@ -23,37 +23,7 @@ // - psx gpu plugin interface prototypes-------------- // // --------------------------------------------------- // -#ifdef _WINDOWS
-long CALLBACK GPUopen(HWND hwndGPU);
-#else
-long GPUopen(unsigned long * disp,const char * CapText,const char * CfgFile);
-#endif -void CALLBACK GPUdisplayText(char * pText); -void CALLBACK GPUdisplayFlags(uint32_t dwFlags); -void CALLBACK GPUmakeSnapshot(void); -long CALLBACK GPUinit(); -long CALLBACK GPUclose(); -long CALLBACK GPUshutdown(); -void CALLBACK GPUcursor(int iPlayer,int x,int y); -void CALLBACK GPUupdateLace(void); -uint32_t CALLBACK GPUreadStatus(void); -void CALLBACK GPUwriteStatus(uint32_t gdata); -void CALLBACK GPUreadDataMem(uint32_t * pMem, int iSize); -uint32_t CALLBACK GPUreadData(void); -void CALLBACK GPUwriteDataMem(uint32_t * pMem, int iSize); -void CALLBACK GPUwriteData(uint32_t gdata); -void CALLBACK GPUsetMode(uint32_t gdata); -long CALLBACK GPUgetMode(void); -long CALLBACK GPUdmaChain(uint32_t * baseAddrL, uint32_t addr); -long CALLBACK GPUconfigure(void); -void CALLBACK GPUabout(void); -long CALLBACK GPUtest(void); -long CALLBACK GPUfreeze(uint32_t ulGetFreezeData,void * pF); -void CALLBACK GPUgetScreenPic(unsigned char * pMem); -void CALLBACK GPUshowScreenPic(unsigned char * pMem); -#ifndef _WINDOWS
-void CALLBACK GPUkeypressed(int keycode);
-#endif +#include "psemu_plugin_defs.h" // --------------------------------------------------- // // - zn gpu interface -------------------------------- // @@ -79,6 +49,7 @@ typedef struct GPUOTAG const char* CfgFile; // NULL terminated string } GPUConfiguration_t; +#if 0 // ZN_* functions: wtf? not supported by pcsx // --------------------------------------------------- // // --------------------------------------------------- // // --------------------------------------------------- // @@ -113,10 +84,10 @@ long CALLBACK ZN_GPUopen(void * vcfg) long lret; if(!cfg) return -1; - if(cfg->Version!=1) return -1;
+ if(cfg->Version!=1) return -1; -#ifdef _WINDOWS
- lret=GPUopen((HWND)cfg->hWnd);
+#ifdef _WINDOWS + lret=GPUopen((HWND)cfg->hWnd); #else lret = GPUopen(&cfg->hWnd, cfg->GameName, cfg->CfgFile); #endif @@ -254,11 +225,12 @@ void CALLBACK ZN_GPUshowScreenPic(unsigned char * pMem) // --------------------------------------------------- // -#ifndef _WINDOWS
-
-void CALLBACK ZN_GPUkeypressed(int keycode)
-{
- GPUkeypressed(keycode);
-}
-
-#endif
+#ifndef _WINDOWS + +void CALLBACK ZN_GPUkeypressed(int keycode) +{ + GPUkeypressed(keycode); +} + +#endif +#endif |
