win32: add an option to disable texturing, for debugging and educational purposes

This commit is contained in:
zeromus 2010-07-02 18:56:05 +00:00
parent 705a26cf41
commit 25c2789ca5
5 changed files with 16 additions and 3 deletions

View File

@ -510,6 +510,7 @@ extern struct TCommonSettings {
: GFX3D_HighResolutionInterpolateColor(true) : GFX3D_HighResolutionInterpolateColor(true)
, GFX3D_EdgeMark(true) , GFX3D_EdgeMark(true)
, GFX3D_Fog(true) , GFX3D_Fog(true)
, GFX3D_Texture(true)
, UseExtBIOS(false) , UseExtBIOS(false)
, SWIFromBIOS(false) , SWIFromBIOS(false)
, PatchSWI3(false) , PatchSWI3(false)
@ -546,6 +547,7 @@ extern struct TCommonSettings {
bool GFX3D_HighResolutionInterpolateColor; bool GFX3D_HighResolutionInterpolateColor;
bool GFX3D_EdgeMark; bool GFX3D_EdgeMark;
bool GFX3D_Fog; bool GFX3D_Fog;
bool GFX3D_Texture;
bool UseExtBIOS; bool UseExtBIOS;
char ARM9BIOS[256]; char ARM9BIOS[256];

View File

@ -1613,6 +1613,7 @@ void gfx3d_UpdateToonTable(u8 offset, u16 val)
{ {
gfx3d.state.invalidateToon = true; gfx3d.state.invalidateToon = true;
gfx3d.state.u16ToonTable[offset] = val; gfx3d.state.u16ToonTable[offset] = val;
//printf("toon %d set to %04X\n",offset,val);
} }
void gfx3d_UpdateToonTable(u8 offset, u32 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.invalidateToon = true;
gfx3d.state.u16ToonTable[offset] = val & 0xFFFF; gfx3d.state.u16ToonTable[offset] = val & 0xFFFF;
gfx3d.state.u16ToonTable[offset+1] = val >> 16; 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) s32 gfx3d_GetClipMatrix (unsigned int index)
@ -2031,6 +2034,9 @@ static void gfx3d_doFlush()
gfx3d.renderState = gfx3d.state; gfx3d.renderState = gfx3d.state;
if(!CommonSettings.GFX3D_Texture)
gfx3d.renderState.enableTexturing = false;
gfx3d.state.activeFlushCommand = gfx3d.state.pendingFlushCommand; gfx3d.state.activeFlushCommand = gfx3d.state.pendingFlushCommand;
int polycount = polylist->count; int polycount = polylist->count;

View File

@ -2763,6 +2763,7 @@ int _main()
CommonSettings.GFX3D_HighResolutionInterpolateColor = GetPrivateProfileBool("3D", "HighResolutionInterpolateColor", 1, IniName); CommonSettings.GFX3D_HighResolutionInterpolateColor = GetPrivateProfileBool("3D", "HighResolutionInterpolateColor", 1, IniName);
CommonSettings.GFX3D_EdgeMark = GetPrivateProfileBool("3D", "EnableEdgeMark", 1, IniName); CommonSettings.GFX3D_EdgeMark = GetPrivateProfileBool("3D", "EnableEdgeMark", 1, IniName);
CommonSettings.GFX3D_Fog = GetPrivateProfileBool("3D", "EnableFog", 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); //CommonSettings.gfx3d_flushMode = GetPrivateProfileInt("3D", "AlternateFlush", 0, IniName);
Change3DCoreWithFallbackAndSave(cur3DCore); Change3DCoreWithFallbackAndSave(cur3DCore);
@ -5439,9 +5440,10 @@ LRESULT CALLBACK GFX3DSettingsDlgProc(HWND hw, UINT msg, WPARAM wp, LPARAM lp)
{ {
int i; int i;
CheckDlgButton(hw,IDC_INTERPOLATECOLOR,CommonSettings.GFX3D_HighResolutionInterpolateColor?1:0); CheckDlgButton(hw,IDC_INTERPOLATECOLOR,CommonSettings.GFX3D_HighResolutionInterpolateColor);
CheckDlgButton(hw,IDC_3DSETTINGS_EDGEMARK,CommonSettings.GFX3D_EdgeMark?1:0); CheckDlgButton(hw,IDC_3DSETTINGS_EDGEMARK,CommonSettings.GFX3D_EdgeMark);
CheckDlgButton(hw,IDC_3DSETTINGS_FOG,CommonSettings.GFX3D_Fog?1:0); CheckDlgButton(hw,IDC_3DSETTINGS_FOG,CommonSettings.GFX3D_Fog);
CheckDlgButton(hw,IDC_3DSETTINGS_TEXTURE,CommonSettings.GFX3D_Texture);
//CheckDlgButton(hw,IDC_ALTERNATEFLUSH,CommonSettings.gfx3d_flushMode); //CheckDlgButton(hw,IDC_ALTERNATEFLUSH,CommonSettings.gfx3d_flushMode);
for(i = 0; core3DList[i] != NULL; i++) 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_HighResolutionInterpolateColor = IsDlgCheckboxChecked(hw,IDC_INTERPOLATECOLOR);
CommonSettings.GFX3D_EdgeMark = IsDlgCheckboxChecked(hw,IDC_3DSETTINGS_EDGEMARK); CommonSettings.GFX3D_EdgeMark = IsDlgCheckboxChecked(hw,IDC_3DSETTINGS_EDGEMARK);
CommonSettings.GFX3D_Fog = IsDlgCheckboxChecked(hw,IDC_3DSETTINGS_FOG); CommonSettings.GFX3D_Fog = IsDlgCheckboxChecked(hw,IDC_3DSETTINGS_FOG);
CommonSettings.GFX3D_Texture = IsDlgCheckboxChecked(hw,IDC_3DSETTINGS_TEXTURE);
Change3DCoreWithFallbackAndSave(ComboBox_GetCurSel(GetDlgItem(hw, IDC_3DCORE))); Change3DCoreWithFallbackAndSave(ComboBox_GetCurSel(GetDlgItem(hw, IDC_3DCORE)));
WritePrivateProfileInt("3D", "HighResolutionInterpolateColor", CommonSettings.GFX3D_HighResolutionInterpolateColor?1:0, IniName); WritePrivateProfileInt("3D", "HighResolutionInterpolateColor", CommonSettings.GFX3D_HighResolutionInterpolateColor?1:0, IniName);
WritePrivateProfileInt("3D", "EnableEdgeMark", CommonSettings.GFX3D_EdgeMark?1:0, IniName); WritePrivateProfileInt("3D", "EnableEdgeMark", CommonSettings.GFX3D_EdgeMark?1:0, IniName);

View File

@ -692,6 +692,8 @@
#define ID_LABEL_HK2 4466 #define ID_LABEL_HK2 4466
#define IDC_GI_USEDROMSIZE 4467 #define IDC_GI_USEDROMSIZE 4467
#define ID_LABEL_HK3 4467 #define ID_LABEL_HK3 4467
#define IDC_3DSETTINGS_FOG2 4467
#define IDC_3DSETTINGS_TEXTURE 4467
#define ID_LABEL_HK4 4468 #define ID_LABEL_HK4 4468
#define IDC_GI_ICON 4469 #define IDC_GI_ICON 4469
#define ID_LABEL_HK5 4469 #define ID_LABEL_HK5 4469

Binary file not shown.