From f11b11b18e4a2e2ed63863e33722967f4fda9dee Mon Sep 17 00:00:00 2001 From: zeromus Date: Tue, 9 Sep 2008 02:46:54 +0000 Subject: [PATCH] fix windows release build. fix windows inputconfig. fix a bug in 4x4 texture decoding introduced during c++ conversion. --- desmume/ChangeLog | 9 +++++---- desmume/src/windows/ConfigKeys.cpp | 6 +++--- desmume/src/windows/DeSmuME_2005.vcproj | 8 ++++++++ desmume/src/windows/OGLRender.cpp | 18 +++++++++++++----- 4 files changed, 29 insertions(+), 12 deletions(-) diff --git a/desmume/ChangeLog b/desmume/ChangeLog index d469fe1fc..af34a69c8 100644 --- a/desmume/ChangeLog +++ b/desmume/ChangeLog @@ -5,11 +5,12 @@ - Really minor memory access speed up (mainly added for clarity) [shash] - Added transparency and fixed material alpha support and alpha testing on the 3D core [shash] - Changed how depth initial values are calculated (fixes SM64DS skybox) [shash] - - Added SSE2 version for matrix [CrazyMax] + - Added SSE2 version for some matrix routines [CrazyMax] - Some fixes in core (New SMB don't freeze now) [CrazyMax] - Some optimizations in code [CrazyMax] - Make matrix 4x4 multiply routines use W-coordinate. [zeromus] - Add many matrix and vector functions to matrix.c [zeromus] + - Convert to c++! Mac OS X port: - Fixed: Filenames and paths with unicode characters now work. [Jeff] - Fixed: Load state from file button works again. [Jeff] @@ -25,7 +26,7 @@ Windows port: - Removed the bug report link with a define, to avoid reports from betas/external builds [shash] - Added the version on window bar to recognize versions from screenshots [shash] - - Changed graphics render core to DirectDraw (work fastest) [CrazyMax] + - Changed graphics render core to DirectDraw (work faster) [CrazyMax] - Some fixes in 3D core OGL (fixed textures) [CrazyMax] - Added texture caching (speedup 3D core) [CrazyMax] - Fixes clear depth (ex. Castlevania now don't flipping) [NHerve] @@ -35,7 +36,7 @@ - Fix errors in matrix operations regarding projection mode and pos-vector mode [zeromus] - Fix error in command unpacking which caused some display lists to totally blow up [zeromus] - Render shadow volumes [zeromus] - - Convert alpha and material values from [0,31] ranges to opengl ranges in a more precise way [zeromus] + - Convert alpha and material values from [0,31], [0,7] etc ranges to opengl [0,maxint] ranges in a more precise way [zeromus] - Fix a race condition in NDS_3D_Reset and NDS_glInit [zeromus] - Add many of NHerve's improvements into OGLRender because I was trying to fix all the 3d issues. [zeromus] - Toon shading infrastructure and a demo implementation [zeromus] @@ -43,7 +44,7 @@ - Defer rendering until after flush. This was a necessary architectural change, as it permits savestate for the display list, and allows us eventually to separate the GE emulation from the rendering [zeromus] - Fix the 2d/3d compositing well enough for NSMB to fix bugs, but it is still bad [zeromus] - + 0.7.3 -> 0.8 Cocoa: diff --git a/desmume/src/windows/ConfigKeys.cpp b/desmume/src/windows/ConfigKeys.cpp index d3cfd8791..4b39c26f9 100644 --- a/desmume/src/windows/ConfigKeys.cpp +++ b/desmume/src/windows/ConfigKeys.cpp @@ -244,18 +244,18 @@ BOOL CALLBACK ConfigView_Proc(HWND dialog,UINT komunikat,WPARAM wparam,LPARAM lp if (g_pKeyboard) for(i=0;i<48;i++) for(j=0;j<12;j++) - SendDlgItemMessage(dialog,key_combos[j],CB_ADDSTRING,0,(LPARAM)&tabkeytext[i]); + SendDlgItemMessage(dialog,key_combos[j],CB_ADDSTRING,0,(LPARAM)tabkeytext[i]); if (g_pJoystick) { for(i=0;i<4;i++) for(j=0;j<12;j++) - SendDlgItemMessage(dialog,key_combos[j],CB_ADDSTRING,0,(LPARAM)&tabkeytext[i+48]); + SendDlgItemMessage(dialog,key_combos[j],CB_ADDSTRING,0,(LPARAM)tabkeytext[i+48]); for(i=0;i + + + >2); y ++) { u32 tmpPos[4]={(y<<2)*texcache[i].sizeX,((y<<2)+1)*texcache[i].sizeX, @@ -1042,14 +1046,21 @@ __forceinline void setTexture(unsigned int format, unsigned int texpal) dst[currentPos+1] = tmp_col[(currRow>>2)&3]; dst[currentPos+2] = tmp_col[(currRow>>4)&3]; dst[currentPos+3] = tmp_col[(currRow>>6)&3]; + + if(dead) { + dst[currentPos] = 0; + dst[currentPos+1] = 0; + dst[currentPos+2] = 0; + dst[currentPos+3] = 0; + } txt_slot_current_size-=4;; if (txt_slot_current_size<=0) { + //dead = true; txt_slot_current++; - //zero 9/7/08 - changed *adr= to adr= while changing from c++. was that a bug? map=(unsigned int*)ARM9Mem.textureSlotAddr[txt_slot_current]; - //map-=txt_slot_size>>2; //zero 8/25/08 - I dont understand this. it broke my game. + map-=txt_slot_size>>2; //this is weird, but necessary since we use map[d] above txt_slot_size=txt_slot_current_size=0x020000; } } @@ -1092,7 +1103,6 @@ __forceinline void setTexture(unsigned int format, unsigned int texpal) if (txt_slot_current_size<=0) { txt_slot_current++; - //zero 9/7/08 - changed *adr= to adr= while changing from c++. was that a bug? map=(unsigned short *)ARM9Mem.textureSlotAddr[txt_slot_current]; map-=txt_slot_size>>1; txt_slot_size=txt_slot_current_size=0x020000; @@ -1107,8 +1117,6 @@ __forceinline void setTexture(unsigned int format, unsigned int texpal) texcache[i].sizeX, texcache[i].sizeY, 0, GL_RGBA, GL_UNSIGNED_BYTE, texMAP); - DebugDumpTexture(i); - //============================================================================================ texcache_count=i;