DXGL r152 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r151‎ | r152 | r153 >
Date:22:02, 29 May 2012
Author:admin
Status:new
Tags:
Comment:
Fix build errors
Modified paths:
  • /ddraw/glRenderer.cpp (modified) (history)
  • /ddraw/glRenderer.h (modified) (history)

Diff [purge]

Index: ddraw/glRenderer.cpp
@@ -135,7 +135,6 @@
136136 }
137137 glTexImage2D(GL_TEXTURE_2D,0,texformat3,bigx,bigy,0,texformat,texformat2,bigbuffer);
138138 }
139 - return 0;
140139 }
141140
142141 /**
@@ -191,7 +190,6 @@
192191 break;
193192 }
194193 }
195 - return 0;
196194 }
197195
198196 /**
@@ -343,7 +341,7 @@
344342 * @param texformat3
345343 * OpenGL internalformat parameter for glTexImage2D
346344 */
347 -int glRenderer::UploadTexture(char *buffer, char *bigbuffer, GLuint texture, int x, int y,
 345+void glRenderer::UploadTexture(char *buffer, char *bigbuffer, GLuint texture, int x, int y,
348346 int bigx, int bigy, int pitch, int bigpitch, int bpp, int texformat, int texformat2, int texformat3)
349347 {
350348 EnterCriticalSection(&cs);
@@ -373,7 +371,6 @@
374372 Sleep(0);
375373 }
376374 LeaveCriticalSection(&cs);
377 - return (int)outputs[0];
378375 }
379376
380377 /**
@@ -400,7 +397,7 @@
401398 * @param texformat2
402399 * OpenGL type parameter for glGetTexImage
403400 */
404 -int glRenderer::DownloadTexture(char *buffer, char *bigbuffer, GLuint texture, int x, int y,
 401+void glRenderer::DownloadTexture(char *buffer, char *bigbuffer, GLuint texture, int x, int y,
405402 int bigx, int bigy, int pitch, int bigpitch, int bpp, int texformat, int texformat2)
406403 {
407404 EnterCriticalSection(&cs);
@@ -429,7 +426,6 @@
430427 Sleep(0);
431428 }
432429 LeaveCriticalSection(&cs);
433 - return (int)outputs[0];
434430 }
435431
436432 /**
@@ -1560,13 +1556,13 @@
15611557 (DWORD)inputs[4],(DWORD)inputs[5],(GLint)inputs[6],(GLint)inputs[7],(GLint)inputs[8]);
15621558 return 0;
15631559 case GLEVENT_UPLOAD:
1564 - outputs[0] = (void*)_UploadTexture((char*)inputs[0],(char*)inputs[1],(GLuint)inputs[2],(int)inputs[3],
 1560+ _UploadTexture((char*)inputs[0],(char*)inputs[1],(GLuint)inputs[2],(int)inputs[3],
15651561 (int)inputs[4],(int)inputs[5],(int)inputs[6],(int)inputs[7],(int)inputs[8],(int)inputs[9],
15661562 (int)inputs[10],(int)inputs[11],(int)inputs[12]);
15671563 wndbusy = false;
15681564 return 0;
15691565 case GLEVENT_DOWNLOAD:
1570 - outputs[0] = (void*)_DownloadTexture((char*)inputs[0],(char*)inputs[1],(GLuint)inputs[2],(int)inputs[3],
 1566+ _DownloadTexture((char*)inputs[0],(char*)inputs[1],(GLuint)inputs[2],(int)inputs[3],
15711567 (int)inputs[4],(int)inputs[5],(int)inputs[6],(int)inputs[7],(int)inputs[8],(int)inputs[9],
15721568 (int)inputs[10],(int)inputs[11]);
15731569 wndbusy = false;
Index: ddraw/glRenderer.h
@@ -79,8 +79,8 @@
8080 glRenderer(int width, int height, int bpp, bool fullscreen, HWND hwnd, glDirectDraw7 *glDD7);
8181 ~glRenderer();
8282 static DWORD WINAPI ThreadEntry(void *entry);
83 - int UploadTexture(char *buffer, char *bigbuffer, GLuint texture, int x, int y, int bigx, int bigy, int pitch, int bigpitch, int bpp, int texformat, int texformat2, int texformat3);
84 - int DownloadTexture(char *buffer, char *bigbuffer, GLuint texture, int x, int y, int bigx, int bigy, int pitch, int bigpitch, int bpp, int texformat, int texformat2);
 83+ void UploadTexture(char *buffer, char *bigbuffer, GLuint texture, int x, int y, int bigx, int bigy, int pitch, int bigpitch, int bpp, int texformat, int texformat2, int texformat3);
 84+ void DownloadTexture(char *buffer, char *bigbuffer, GLuint texture, int x, int y, int bigx, int bigy, int pitch, int bigpitch, int bpp, int texformat, int texformat2);
8585 HRESULT Blt(LPRECT lpDestRect, glDirectDrawSurface7 *src,
8686 glDirectDrawSurface7 *dest, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx);
8787 GLuint MakeTexture(GLint min, GLint mag, GLint wraps, GLint wrapt, DWORD width, DWORD height, GLint texformat1, GLint texformat2, GLint texformat3);
@@ -98,8 +98,8 @@
9999 // In-thread APIs
100100 DWORD _Entry();
101101 BOOL _InitGL(int width, int height, int bpp, int fullscreen, HWND hWnd, glDirectDraw7 *glDD7);
102 - int _UploadTexture(char *buffer, char *bigbuffer, GLuint texture, int x, int y, int bigx, int bigy, int pitch, int bigpitch, int bpp, int texformat, int texformat2, int texformat3);
103 - int _DownloadTexture(char *buffer, char *bigbuffer, GLuint texture, int x, int y, int bigx, int bigy, int pitch, int bigpitch, int bpp, int texformat, int texformat2);
 102+ void _UploadTexture(char *buffer, char *bigbuffer, GLuint texture, int x, int y, int bigx, int bigy, int pitch, int bigpitch, int bpp, int texformat, int texformat2, int texformat3);
 103+ void _DownloadTexture(char *buffer, char *bigbuffer, GLuint texture, int x, int y, int bigx, int bigy, int pitch, int bigpitch, int bpp, int texformat, int texformat2);
104104 HRESULT _Blt(LPRECT lpDestRect, glDirectDrawSurface7 *src,
105105 glDirectDrawSurface7 *dest, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx);
106106 GLuint _MakeTexture(GLint min, GLint mag, GLint wraps, GLint wrapt, DWORD width, DWORD height, GLint texformat1, GLint texformat2, GLint texformat3);