diff --git a/FrameBuffer.cpp b/FrameBuffer.cpp index f0e49303..970e9c88 100644 --- a/FrameBuffer.cpp +++ b/FrameBuffer.cpp @@ -834,7 +834,7 @@ void RDRAMtoFrameBuffer::CopyFromRDRAM( u32 _address, bool _bUseAlpha) r = ((col >> 11)&31)<<3; g = ((col >> 6)&31)<<3; b = ((col >> 1)&31)<<3; - a = col&1 > 0 ? 0xff : 0; + a = (col&1) > 0 ? 0xff : 0; //*(dst++) = RGBA5551_RGBA8888(c); dst[x + y*width] = (a<<24)|(b<<16)|(g<<8)|r; } diff --git a/gSP.cpp b/gSP.cpp index 25366aea..d9c5549b 100644 --- a/gSP.cpp +++ b/gSP.cpp @@ -568,14 +568,14 @@ void gSPLookAt( u32 l ) { } -void gSPVertex( u32 v, u32 n, u32 v0 ) +void gSPVertex( u32 a, u32 n, u32 v0 ) { //flush batched triangles: #ifdef __TRIBUFFER_OPT gSPFlushTriangles(); #endif - u32 address = RSP_SegmentToPhysical( v ); + u32 address = RSP_SegmentToPhysical(a); if ((address + sizeof( Vertex ) * n) > RDRAMSize) return; @@ -648,14 +648,14 @@ void gSPVertex( u32 v, u32 n, u32 v0 ) } } -void gSPCIVertex( u32 v, u32 n, u32 v0 ) +void gSPCIVertex( u32 a, u32 n, u32 v0 ) { #ifdef __TRIBUFFER_OPT gSPFlushTriangles(); #endif - u32 address = RSP_SegmentToPhysical( v ); + u32 address = RSP_SegmentToPhysical( a ); if ((address + sizeof( PDVertex ) * n) > RDRAMSize) return; @@ -731,10 +731,10 @@ void gSPCIVertex( u32 v, u32 n, u32 v0 ) } } -void gSPDMAVertex( u32 v, u32 n, u32 v0 ) +void gSPDMAVertex( u32 a, u32 n, u32 v0 ) { - u32 address = gSP.DMAOffsets.vtx + RSP_SegmentToPhysical( v ); + u32 address = gSP.DMAOffsets.vtx + RSP_SegmentToPhysical(a); if ((address + 10 * n) > RDRAMSize) return; diff --git a/mupenplus/GLideN64_mupenplus.h b/mupenplus/GLideN64_mupenplus.h index d6f7af9b..4566da93 100644 --- a/mupenplus/GLideN64_mupenplus.h +++ b/mupenplus/GLideN64_mupenplus.h @@ -41,6 +41,6 @@ extern ptr_VidExt_GL_SetAttribute CoreVideo_GL_SetAttribute; extern ptr_VidExt_GL_GetAttribute CoreVideo_GL_GetAttribute; extern ptr_VidExt_GL_SwapBuffers CoreVideo_GL_SwapBuffers; -extern void (*renderCallback)(); +extern void(*renderCallback)(int); #endif // GLIDEN64_MUPENPLUS_H diff --git a/mupenplus/MupenPlusAPIImpl.cpp b/mupenplus/MupenPlusAPIImpl.cpp index aa8f4d43..abd772c3 100644 --- a/mupenplus/MupenPlusAPIImpl.cpp +++ b/mupenplus/MupenPlusAPIImpl.cpp @@ -25,7 +25,7 @@ ptr_VidExt_GL_SetAttribute CoreVideo_GL_SetAttribute = NULL; ptr_VidExt_GL_GetAttribute CoreVideo_GL_GetAttribute = NULL; ptr_VidExt_GL_SwapBuffers CoreVideo_GL_SwapBuffers = NULL; -void (*renderCallback)() = NULL; +void(*renderCallback)(int) = NULL; m64p_error PluginAPI::PluginStartup(m64p_dynlib_handle _CoreLibHandle) { @@ -91,7 +91,6 @@ m64p_error PluginAPI::PluginGetVersion( void PluginAPI::SetRenderingCallback(void (*callback)(int)) { - static void (*renderCallback)(int) = NULL; renderCallback = callback; }