From: Spacy <sp...@us...> - 2006-08-05 17:30:11
|
Update of /cvsroot/vba/VisualBoyAdvance/src/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15693/src/win32 Modified Files: Direct3D.cpp Log Message: code cleanup, little changes Index: Direct3D.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/Direct3D.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Direct3D.cpp 31 Jul 2006 15:51:01 -0000 1.12 --- Direct3D.cpp 5 Aug 2006 17:30:07 -0000 1.13 *************** *** 31,39 **** #include "../gb/gbGlobals.h" - extern int Init_2xSaI(u32); // initializes all pixel filters - extern int systemSpeed; - - #include <tchar.h> - // Direct3D #define DIRECT3D_VERSION 0x0900 --- 31,34 ---- *************** *** 42,45 **** --- 37,42 ---- #include <Dxerr.h> // contains debug functions + extern int Init_2xSaI(u32); // initializes all pixel filters + extern int systemSpeed; #ifdef _DEBUG *************** *** 49,53 **** #endif - #ifdef MMX extern "C" bool cpu_mmx; --- 46,49 ---- *************** *** 68,73 **** RECT destRect; bool failed; - ID3DXFont *pFont; void createFont(); void destroyFont(); --- 64,69 ---- RECT destRect; bool failed; + ID3DXFont *pFont; void createFont(); void destroyFont(); *************** *** 80,84 **** Direct3DDisplay(); virtual ~Direct3DDisplay(); - virtual DISPLAY_TYPE getType() { return DIRECT_3D; }; --- 76,79 ---- *************** *** 92,96 **** virtual void resize( int w, int h ); virtual void setOption( const char *option, int value ); ! virtual int selectFullScreenMode( GUID ** ); }; --- 87,91 ---- virtual void resize( int w, int h ); virtual void setOption( const char *option, int value ); ! virtual int selectFullScreenMode( GUID ** ); }; *************** *** 180,184 **** float scaleX = ((float)theApp.fsWidth / theApp.sizeX); float scaleY = ((float)theApp.fsHeight / theApp.sizeY); ! float min = scaleX < scaleY ? scaleX : scaleY; if(theApp.fullScreenStretch) { theApp.surfaceSizeX = theApp.fsWidth; --- 175,179 ---- float scaleX = ((float)theApp.fsWidth / theApp.sizeX); float scaleY = ((float)theApp.fsHeight / theApp.sizeY); ! float min = (scaleX < scaleY) ? scaleX : scaleY; if(theApp.fullScreenStretch) { theApp.surfaceSizeX = theApp.fsWidth; *************** *** 413,417 **** pBackBuffer = NULL; ! D3DCOLOR color = theApp.showSpeedTransparent ? D3DCOLOR_ARGB(0x7f, 0x00, 0x00, 0xff) : D3DCOLOR_ARGB(0xff, 0x00, 0x00, 0xff); RECT r; r.left = 4; --- 408,412 ---- pBackBuffer = NULL; ! D3DCOLOR color; RECT r; r.left = 4; *************** *** 419,426 **** if( theApp.screenMessage ) { ! if(((GetTickCount() - theApp.screenMessageTime) < 3000) && !theApp.disableStatusMessage && pFont) { r.top = dpp.BackBufferHeight - 20; r.bottom = dpp.BackBufferHeight - 4; ! pFont->DrawText(NULL, theApp.screenMessageBuffer, -1, &r, 0, color); } else { theApp.screenMessage = false; --- 414,422 ---- if( theApp.screenMessage ) { ! color = theApp.showSpeedTransparent ? D3DCOLOR_ARGB(0x7F, 0xFF, 0x00, 0x00) : D3DCOLOR_ARGB(0xFF, 0xFF, 0x00, 0x00); ! if( ( ( GetTickCount() - theApp.screenMessageTime ) < 3000 ) && !theApp.disableStatusMessage && pFont ) { r.top = dpp.BackBufferHeight - 20; r.bottom = dpp.BackBufferHeight - 4; ! pFont->DrawText( NULL, theApp.screenMessageBuffer, -1, &r, 0, color ); } else { theApp.screenMessage = false; *************** *** 428,442 **** } ! if( theApp.showSpeed && (theApp.videoOption > VIDEO_4X) ) { char buffer[30]; ! if(theApp.showSpeed == 1) { ! sprintf(buffer, "%3d%%", systemSpeed); } else { ! sprintf(buffer, "%3d%%(%d, %d fps)", systemSpeed, systemFrameSkip, theApp.showRenderedFrames); } r.top = 4; r.bottom = 20; ! pFont->DrawText(NULL, buffer, -1, &r, 0, color); } --- 424,439 ---- } ! if( theApp.showSpeed && ( theApp.videoOption > VIDEO_4X ) ) { ! color = theApp.showSpeedTransparent ? D3DCOLOR_ARGB(0x7F, 0x00, 0x00, 0xFF) : D3DCOLOR_ARGB(0xFF, 0x00, 0x00, 0xFF); char buffer[30]; ! if( theApp.showSpeed == 1 ) { ! sprintf( buffer, "%3d%%", systemSpeed ); } else { ! sprintf( buffer, "%3d%%(%d, %d fps)", systemSpeed, systemFrameSkip, theApp.showRenderedFrames ); } r.top = 4; r.bottom = 20; ! pFont->DrawText( NULL, buffer, -1, &r, 0, color ); } *************** *** 505,509 **** HRESULT hr = D3DXCreateFont( pDevice, ! 12, 0, FW_BOLD, --- 502,506 ---- HRESULT hr = D3DXCreateFont( pDevice, ! 14, 0, FW_BOLD, |