diff --git a/desmume/src/NDSSystem.h b/desmume/src/NDSSystem.h index 7ca7b1eab..12b412581 100644 --- a/desmume/src/NDSSystem.h +++ b/desmume/src/NDSSystem.h @@ -510,6 +510,7 @@ extern struct TCommonSettings { : GFX3D_HighResolutionInterpolateColor(true) , GFX3D_EdgeMark(true) , GFX3D_Fog(true) + , GFX3D_Texture(true) , UseExtBIOS(false) , SWIFromBIOS(false) , PatchSWI3(false) @@ -546,6 +547,7 @@ extern struct TCommonSettings { bool GFX3D_HighResolutionInterpolateColor; bool GFX3D_EdgeMark; bool GFX3D_Fog; + bool GFX3D_Texture; bool UseExtBIOS; char ARM9BIOS[256]; diff --git a/desmume/src/gfx3d.cpp b/desmume/src/gfx3d.cpp index 06dd8c3eb..88a13042b 100644 --- a/desmume/src/gfx3d.cpp +++ b/desmume/src/gfx3d.cpp @@ -1613,6 +1613,7 @@ void gfx3d_UpdateToonTable(u8 offset, u16 val) { gfx3d.state.invalidateToon = true; gfx3d.state.u16ToonTable[offset] = val; + //printf("toon %d set to %04X\n",offset,val); } void gfx3d_UpdateToonTable(u8 offset, u32 val) @@ -1621,6 +1622,8 @@ void gfx3d_UpdateToonTable(u8 offset, u32 val) gfx3d.state.invalidateToon = true; gfx3d.state.u16ToonTable[offset] = val & 0xFFFF; gfx3d.state.u16ToonTable[offset+1] = val >> 16; + //printf("toon %d set to %04X\n",offset,gfx3d.state.u16ToonTable[offset]); + //printf("toon %d set to %04X\n",offset+1,gfx3d.state.u16ToonTable[offset+1]); } s32 gfx3d_GetClipMatrix (unsigned int index) @@ -2030,6 +2033,9 @@ static void gfx3d_doFlush() gfx3d.state.wbuffer = BIT1(gfx3d.state.activeFlushCommand); gfx3d.renderState = gfx3d.state; + + if(!CommonSettings.GFX3D_Texture) + gfx3d.renderState.enableTexturing = false; gfx3d.state.activeFlushCommand = gfx3d.state.pendingFlushCommand; diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp index e525b63e0..4f7396fb7 100644 --- a/desmume/src/windows/main.cpp +++ b/desmume/src/windows/main.cpp @@ -2763,6 +2763,7 @@ int _main() CommonSettings.GFX3D_HighResolutionInterpolateColor = GetPrivateProfileBool("3D", "HighResolutionInterpolateColor", 1, IniName); CommonSettings.GFX3D_EdgeMark = GetPrivateProfileBool("3D", "EnableEdgeMark", 1, IniName); CommonSettings.GFX3D_Fog = GetPrivateProfileBool("3D", "EnableFog", 1, IniName); + CommonSettings.GFX3D_Texture = GetPrivateProfileBool("3D", "EnableTexture", 1, IniName); //CommonSettings.gfx3d_flushMode = GetPrivateProfileInt("3D", "AlternateFlush", 0, IniName); Change3DCoreWithFallbackAndSave(cur3DCore); @@ -5439,9 +5440,10 @@ LRESULT CALLBACK GFX3DSettingsDlgProc(HWND hw, UINT msg, WPARAM wp, LPARAM lp) { int i; - CheckDlgButton(hw,IDC_INTERPOLATECOLOR,CommonSettings.GFX3D_HighResolutionInterpolateColor?1:0); - CheckDlgButton(hw,IDC_3DSETTINGS_EDGEMARK,CommonSettings.GFX3D_EdgeMark?1:0); - CheckDlgButton(hw,IDC_3DSETTINGS_FOG,CommonSettings.GFX3D_Fog?1:0); + CheckDlgButton(hw,IDC_INTERPOLATECOLOR,CommonSettings.GFX3D_HighResolutionInterpolateColor); + CheckDlgButton(hw,IDC_3DSETTINGS_EDGEMARK,CommonSettings.GFX3D_EdgeMark); + CheckDlgButton(hw,IDC_3DSETTINGS_FOG,CommonSettings.GFX3D_Fog); + CheckDlgButton(hw,IDC_3DSETTINGS_TEXTURE,CommonSettings.GFX3D_Texture); //CheckDlgButton(hw,IDC_ALTERNATEFLUSH,CommonSettings.gfx3d_flushMode); for(i = 0; core3DList[i] != NULL; i++) @@ -5461,6 +5463,7 @@ LRESULT CALLBACK GFX3DSettingsDlgProc(HWND hw, UINT msg, WPARAM wp, LPARAM lp) CommonSettings.GFX3D_HighResolutionInterpolateColor = IsDlgCheckboxChecked(hw,IDC_INTERPOLATECOLOR); CommonSettings.GFX3D_EdgeMark = IsDlgCheckboxChecked(hw,IDC_3DSETTINGS_EDGEMARK); CommonSettings.GFX3D_Fog = IsDlgCheckboxChecked(hw,IDC_3DSETTINGS_FOG); + CommonSettings.GFX3D_Texture = IsDlgCheckboxChecked(hw,IDC_3DSETTINGS_TEXTURE); Change3DCoreWithFallbackAndSave(ComboBox_GetCurSel(GetDlgItem(hw, IDC_3DCORE))); WritePrivateProfileInt("3D", "HighResolutionInterpolateColor", CommonSettings.GFX3D_HighResolutionInterpolateColor?1:0, IniName); WritePrivateProfileInt("3D", "EnableEdgeMark", CommonSettings.GFX3D_EdgeMark?1:0, IniName); diff --git a/desmume/src/windows/resource.h b/desmume/src/windows/resource.h index ad5f6ccd1..da38e60e1 100644 --- a/desmume/src/windows/resource.h +++ b/desmume/src/windows/resource.h @@ -692,6 +692,8 @@ #define ID_LABEL_HK2 4466 #define IDC_GI_USEDROMSIZE 4467 #define ID_LABEL_HK3 4467 +#define IDC_3DSETTINGS_FOG2 4467 +#define IDC_3DSETTINGS_TEXTURE 4467 #define ID_LABEL_HK4 4468 #define IDC_GI_ICON 4469 #define ID_LABEL_HK5 4469 diff --git a/desmume/src/windows/resources.rc b/desmume/src/windows/resources.rc index 90f73bc85..198d869e5 100644 Binary files a/desmume/src/windows/resources.rc and b/desmume/src/windows/resources.rc differ