diff --git a/Source/Project64-video/Renderer/OGLESglitchmain.cpp b/Source/Project64-video/Renderer/OGLESglitchmain.cpp index 098b555d0..fbb80b630 100644 --- a/Source/Project64-video/Renderer/OGLESglitchmain.cpp +++ b/Source/Project64-video/Renderer/OGLESglitchmain.cpp @@ -1531,13 +1531,7 @@ FxBool gfxLfbReadRegion(GrBuffer_t src_buffer, FxU32 src_x, FxU32 src_y, FxU32 s return FXTRUE; } -FX_ENTRY FxBool FX_CALL -grLfbWriteRegion(GrBuffer_t dst_buffer, - FxU32 dst_x, FxU32 dst_y, - GrLfbSrcFmt_t src_format, - FxU32 src_width, FxU32 src_height, - FxBool pixelPipeline, - FxI32 src_stride, void *src_data) +FxBool gfxLfbWriteRegion(GrBuffer_t dst_buffer, FxU32 dst_x, FxU32 dst_y, GrLfbSrcFmt_t src_format, FxU32 src_width, FxU32 src_height, FxBool pixelPipeline, FxI32 src_stride, void *src_data); { unsigned char *buf; unsigned int i, j; @@ -1560,7 +1554,7 @@ grLfbWriteRegion(GrBuffer_t dst_buffer, //glDrawBuffer(current_buffer); break; default: - WriteTrace(TraceGlitch, TraceWarning, "grLfbWriteRegion : unknown buffer : %x", dst_buffer); + WriteTrace(TraceGlitch, TraceWarning, "gfxLfbWriteRegion : unknown buffer : %x", dst_buffer); } if (dst_buffer != GR_BUFFER_AUXBUFFER) @@ -1613,7 +1607,7 @@ grLfbWriteRegion(GrBuffer_t dst_buffer, } break; default: - WriteTrace(TraceGlitch, TraceWarning, "grLfbWriteRegion : unknown format : %d", src_format); + WriteTrace(TraceGlitch, TraceWarning, "gfxLfbWriteRegion : unknown format : %d", src_format); } glBindTexture(GL_TEXTURE_2D, default_texture); diff --git a/Source/Project64-video/Renderer/OGLglitchmain.cpp b/Source/Project64-video/Renderer/OGLglitchmain.cpp index a3093d23c..aedca8fac 100644 --- a/Source/Project64-video/Renderer/OGLglitchmain.cpp +++ b/Source/Project64-video/Renderer/OGLglitchmain.cpp @@ -1794,13 +1794,7 @@ FxBool gfxLfbReadRegion(GrBuffer_t src_buffer, FxU32 src_x, FxU32 src_y, FxU32 s return FXTRUE; } -FX_ENTRY FxBool FX_CALL -grLfbWriteRegion(GrBuffer_t dst_buffer, - FxU32 dst_x, FxU32 dst_y, - GrLfbSrcFmt_t src_format, - FxU32 src_width, FxU32 src_height, - FxBool pixelPipeline, - FxI32 src_stride, void *src_data) +FxBool gfxLfbWriteRegion(GrBuffer_t dst_buffer, FxU32 dst_x, FxU32 dst_y, GrLfbSrcFmt_t src_format, FxU32 src_width, FxU32 src_height, FxBool pixelPipeline, FxI32 src_stride, void *src_data) { unsigned char *buf; unsigned int i, j; @@ -1823,7 +1817,7 @@ grLfbWriteRegion(GrBuffer_t dst_buffer, glDrawBuffer(current_buffer); break; default: - WriteTrace(TraceGlitch, TraceWarning, "grLfbWriteRegion : unknown buffer : %x", dst_buffer); + WriteTrace(TraceGlitch, TraceWarning, "gfxLfbWriteRegion : unknown buffer : %x", dst_buffer); } if (dst_buffer != GR_BUFFER_AUXBUFFER) @@ -1876,7 +1870,7 @@ grLfbWriteRegion(GrBuffer_t dst_buffer, } break; default: - WriteTrace(TraceGlitch, TraceWarning, "grLfbWriteRegion : unknown format : %d", src_format); + WriteTrace(TraceGlitch, TraceWarning, "gfxLfbWriteRegion : unknown format : %d", src_format); } glBindTexture(GL_TEXTURE_2D, default_texture); @@ -1924,7 +1918,7 @@ grLfbWriteRegion(GrBuffer_t dst_buffer, glDrawBuffer(current_buffer); glPopAttrib(); - grDisplayGLError("grLfbWriteRegion"); + grDisplayGLError("gfxLfbWriteRegion"); return FXTRUE; } diff --git a/Source/Project64-video/Renderer/Renderer.h b/Source/Project64-video/Renderer/Renderer.h index 562a327c5..5e3cd16f5 100644 --- a/Source/Project64-video/Renderer/Renderer.h +++ b/Source/Project64-video/Renderer/Renderer.h @@ -62,6 +62,7 @@ void gfxBufferSwap(FxU32 swap_interval); FxBool gfxLfbLock(GrLock_t type, GrBuffer_t buffer, GrLfbWriteMode_t writeMode, GrOriginLocation_t origin, FxBool pixelPipeline, GrLfbInfo_t *info); FxBool gfxLfbUnlock(GrLock_t type, GrBuffer_t buffer); FxBool gfxLfbReadRegion(GrBuffer_t src_buffer, FxU32 src_x, FxU32 src_y, FxU32 src_width, FxU32 src_height, FxU32 dst_stride, void *dst_data); +FxBool gfxLfbWriteRegion(GrBuffer_t dst_buffer, FxU32 dst_x, FxU32 dst_y, GrLfbSrcFmt_t src_format, FxU32 src_width, FxU32 src_height, FxBool pixelPipeline, FxI32 src_stride, void *src_data); extern uint32_t nbTextureUnits; extern uint32_t g_scr_res_x, g_scr_res_y, g_res_x, g_res_y; diff --git a/Source/Project64-video/rdp.cpp b/Source/Project64-video/rdp.cpp index 7e33cf8a5..1f41ee485 100644 --- a/Source/Project64-video/rdp.cpp +++ b/Source/Project64-video/rdp.cpp @@ -2970,24 +2970,9 @@ void rdp_setcolorimage() ptr_dst[x + y * width] = c; } } - grLfbWriteRegion(GR_BUFFER_BACKBUFFER, - (uint32_t)rdp.offset_x, - (uint32_t)rdp.offset_y, - GR_LFB_SRC_FMT_555, - width, - height, - FXFALSE, - width << 1, - ptr_dst); + gfxLfbWriteRegion(GR_BUFFER_BACKBUFFER, (uint32_t)rdp.offset_x, (uint32_t)rdp.offset_y, GR_LFB_SRC_FMT_555, width, height, FXFALSE, width << 1, ptr_dst); delete[] ptr_dst; } - /* - else //just clear buffer - { - gfxColorMask(FXTRUE, FXTRUE); - gfxBufferClear (0, 0, 0xFFFF); - } - */ } } diff --git a/Source/Project64-video/ucode06.cpp b/Source/Project64-video/ucode06.cpp index 16eadde66..6a36cfcec 100644 --- a/Source/Project64-video/ucode06.cpp +++ b/Source/Project64-video/ucode06.cpp @@ -234,15 +234,7 @@ void DrawDepthImage(const DRAWIMAGE & d) dst[x + y*dst_width] = src[(int(x*scale_x_src) + int(y*scale_y_src)*src_width) ^ 1]; } } - grLfbWriteRegion(GR_BUFFER_AUXBUFFER, - 0, - 0, - GR_LFB_SRC_FMT_ZA16, - dst_width, - dst_height, - FXFALSE, - dst_width << 1, - dst); + gfxLfbWriteRegion(GR_BUFFER_AUXBUFFER, 0, 0, GR_LFB_SRC_FMT_ZA16, dst_width, dst_height, FXFALSE, dst_width << 1, dst); delete[] dst; }