Skip to content

Commit

Permalink
UI/d3d: Remove compressed texture
Browse files Browse the repository at this point in the history
  • Loading branch information
IonAgorria committed Apr 24, 2024
1 parent 6dd0da3 commit c50f6ba
Show file tree
Hide file tree
Showing 14 changed files with 127 additions and 329 deletions.
1 change: 0 additions & 1 deletion Source/Game/PerimeterDataChannel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ void PerimeterDataChannelLoad()
terDrawMeshShadow = ini.getInt("Graphics","DrawMeshShadow");
terShadowType = ini.getInt("Graphics","ShadowType");
terEnableBumpChaos = ini.getInt("Graphics","EnableBumpChaos");
gb_VisGeneric->SetFavoriteLoadDDS(ini.getInt("Graphics","FavoriteLoadDDS"));

terNearDistanceLOD = ini.getInt("Graphics","NearDistanceLOD");
terFarDistanceLOD = ini.getInt("Graphics","FarDistanceLOD");
Expand Down
305 changes: 111 additions & 194 deletions Source/Game/Scripts/InterfaceScriptExport.cppi

Large diffs are not rendered by default.

20 changes: 1 addition & 19 deletions Source/Render/D3D/D3DRenderTexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,10 @@ IDirect3DTexture9* cD3DRender::CreateSurface(int x, int y, eSurfaceFormat Textur
{
IDirect3DTexture9* lpTexture = nullptr;

#ifndef PERIMETER_EXODUS //We don't support DXT textures in our D3DXLoadSurfaceFromMemory
if((TextureFormat==SURFMT_COLOR || TextureFormat==SURFMT_COLORALPHA || TextureFormat==SURFMT_GRAYALPHA) && Option_FavoriteLoadDDS)
{
if(TextureFormat==SURFMT_GRAYALPHA)
{
RDCALL(lpD3DDevice->CreateTexture(x,y,MipMap,0,
D3DFMT_DXT3,
D3DPOOL_MANAGED,&lpTexture,NULL));
}else
{
RDCALL(lpD3DDevice->CreateTexture(x,y,MipMap,0,
(TextureFormat==SURFMT_COLOR)?D3DFMT_DXT1:D3DFMT_DXT5,
D3DPOOL_MANAGED,&lpTexture,NULL));
}
VISASSERT(lpTexture);
return lpTexture;
}
#endif

VISASSERT(x&&y&&TextureFormat>=0&&TextureFormat<SURFMT_NUMBER);
int Usage=0;
D3DPOOL Pool=D3DPOOL_MANAGED;

if(TextureFormat==SURFMT_RENDERMAP16 || TextureFormat==SURFMT_RENDERMAP32 || TextureFormat==SURFMT_RENDERMAP_FLOAT)
{
Usage=D3DUSAGE_RENDERTARGET;
Expand Down
1 change: 0 additions & 1 deletion Source/Render/inc/StdAfxRD.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ extern DebugType<float> Option_MapLevel;
extern DebugType<int> Option_ShowRenderTextureDBG;
extern DebugType<int> Option_DebugShowShadowVolume;
extern DebugType<int> Option_ShadowType;
extern DebugType<int> Option_FavoriteLoadDDS;
extern DebugType<int> Option_EnableBump;
extern DebugType<int> Option_EnableLinkEffectToModel;
extern DebugType<int> Option_EnableOcclusion;
Expand Down
55 changes: 1 addition & 54 deletions Source/Render/src/TexLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,60 +306,7 @@ bool cTexLibrary::ReLoadTexture(cTexture* Texture)
#endif
return true;
}
/*
if(Option_FavoriteLoadDDS && !bump)
{
char drive[_MAX_DRIVE];
char dir[_MAX_DIR];
char fname[_MAX_FNAME];
char ext[_MAX_EXT];
_splitpath( Texture->GetName(), drive, dir, fname, ext );
char path_buffer[MAX_PATH];
_makepath(path_buffer, drive, dir, fname, "dds" );
void* buf;
int size;
//0 - alpha_none, 1- alpha_test, 2 - alpha_blend
int ret=ResourceFileRead(path_buffer,buf,size);///Утечка памяти
if(!ret)
{
BYTE alpha_type=((BYTE*)buf)[size-1];
switch(alpha_type)
{
case 0:
break;
case 1:
Texture->SetAttribute(TEXTURE_ALPHA_TEST);
break;
case 2:
Texture->SetAttribute(TEXTURE_ALPHA_BLEND);
break;
default:
//Неправильный dds файл. В конце должен быть байт с alpha.
Error(Texture);
Texture->Release();
return false;
}
IDirect3DTexture9* pTexture=gb_RenderDevice->CreateTextureFromMemory(buf,size-1);
if(!pTexture)
{
Error(Texture);
Texture->Release();
return false;
}
D3DSURFACE_DESC desc;
RDCALL(pTexture->GetLevelDesc(0,&desc));
Texture->SetWidth(desc.Width);
Texture->SetHeight(desc.Height);
Texture->BitMap.push_back(pTexture);
return true;
}
}
*/

//Get path for file and open it
std::string path = Texture->GetName();
if (get_content_entry(path)) {
Expand Down
7 changes: 0 additions & 7 deletions Source/Render/src/VisGeneric.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ DebugType<float> Option_MapLevel(0.8f);
DebugType<int> Option_ShowRenderTextureDBG(0);
DebugType<int> Option_DebugShowShadowVolume(0);
DebugType<int> Option_ShadowType(false);
DebugType<int> Option_FavoriteLoadDDS(false);
bool Option_IsShadowMap=false;
DebugType<int> Option_EnableBump(true);
DebugType<int> Option_EnableLinkEffectToModel(true);
Expand Down Expand Up @@ -141,7 +140,6 @@ cVisGeneric::cVisGeneric() : cUnknownClass(KIND_UI_VISGENERIC)//: SceneArray(KIN
RDI(ShowRenderTextureDBG);
RDI(DebugShowShadowVolume);
RDI(ShadowType);
RDI(FavoriteLoadDDS);
RDI(EnableOcclusion);
RDI(EnablePointLight);
RDI(ShadowMapSelf4x4);
Expand Down Expand Up @@ -236,11 +234,6 @@ void cVisGeneric::SetDebugShowShadowVolume(int p)
Option_DebugShowShadowVolume=p;
}

void cVisGeneric::SetFavoriteLoadDDS(bool p)
{
Option_FavoriteLoadDDS=p;
}

void cVisGeneric::SetShadowType(eShadowType p,int shadow_size)
{
Option_ShadowType=p;
Expand Down
1 change: 0 additions & 1 deletion Source/Render/src/VisGeneric.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ class cVisGeneric : public cUnknownClass
void SetDrawMeshScreen(bool);
void SetMapLevel(float);
void SetShowRenderTextureDBG(bool);
void SetFavoriteLoadDDS(bool);
void SetAnisotropic(bool);
bool GetAnisotropic();

Expand Down
36 changes: 12 additions & 24 deletions Source/Scripts/InterfaceScriptExport.prm
Original file line number Diff line number Diff line change
Expand Up @@ -222,16 +222,16 @@ SqshBorder rightSeparateBottomBtn = { x = 783 / 1024; y = littleBtnHeight; sx =
SqshBorder mainMenuMap = { x = 626 / 1024; y = (55 + 256 + 2) / 768; sx = 300 / 1024; sy = 147 / 768; };

////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int customUp = 80;
int customUp = 90;
int customStep = 50;
int optionsGameUp = 120;
int optionsGameStep = 80;
int ingameGameUp = 160;
int ingameGameStep = 80;
int ingameGraphUp = 160;
int ingameGraphStep = 80;
int ingameCustomUp = 90;
int ingameCustomStep = 46;
int ingameCustomUp = 100;
int ingameCustomStep = 50;
int battleUp = 405;
int battleStep = 40;
int startUp = 174 + 109;
Expand Down Expand Up @@ -5234,16 +5234,15 @@ sqshControlContainer _sqsh_controls[int _sqsh_control_count] = {
// image2 = {texture="resource\\icons\\MainMenu\\il.tga";};
controls = new sqshControl[] {

{type = SQSH_GENERAL_WND_TYPE; id = SQSH_MM_RAMKA; x=(500 - 250)/1024; y=(133 + customStep * 0)/768; sx=500/1024; sy=3/768; image={texture="resource\\icons\\MainMenu\\Main_menu.tga";_ix = 2; _iy = 987; ix = 500; iy = 3;}; state = SQSH_ENABLED; txt_dx =0.3f; },
{type = SQSH_GENERAL_WND_TYPE; id = SQSH_MM_RAMKA; x=(500 - 250)/1024; y=(133 + customStep * 1)/768; sx=500/1024; sy=3/768; image={texture="resource\\icons\\MainMenu\\Main_menu.tga";_ix = 2; _iy = 987; ix = 500; iy = 3;}; state = SQSH_ENABLED; txt_dx =0.3f; },
{type = SQSH_GENERAL_WND_TYPE; id = SQSH_MM_RAMKA; x=(500 - 250)/1024; y=(133 + customStep * 2)/768; sx=500/1024; sy=3/768; image={texture="resource\\icons\\MainMenu\\Main_menu.tga";_ix = 2; _iy = 987; ix = 500; iy = 3;}; state = SQSH_ENABLED; txt_dx =0.3f; },
{type = SQSH_GENERAL_WND_TYPE; id = SQSH_MM_RAMKA; x=(500 - 250)/1024; y=(133 + customStep * 3)/768; sx=500/1024; sy=3/768; image={texture="resource\\icons\\MainMenu\\Main_menu.tga";_ix = 2; _iy = 987; ix = 500; iy = 3;}; state = SQSH_ENABLED; txt_dx =0.3f; },
{type = SQSH_GENERAL_WND_TYPE; id = SQSH_MM_RAMKA; x=(500 - 250)/1024; y=(133 + customStep * 4)/768; sx=500/1024; sy=3/768; image={texture="resource\\icons\\MainMenu\\Main_menu.tga";_ix = 2; _iy = 987; ix = 500; iy = 3;}; state = SQSH_ENABLED; txt_dx =0.3f; },
{type = SQSH_GENERAL_WND_TYPE; id = SQSH_MM_RAMKA; x=(500 - 250)/1024; y=(133 + customStep * 5)/768; sx=500/1024; sy=3/768; image={texture="resource\\icons\\MainMenu\\Main_menu.tga";_ix = 2; _iy = 987; ix = 500; iy = 3;}; state = SQSH_ENABLED; txt_dx =0.3f; },
{type = SQSH_GENERAL_WND_TYPE; id = SQSH_MM_RAMKA; x=(500 - 250)/1024; y=(133 + customStep * 6)/768; sx=500/1024; sy=3/768; image={texture="resource\\icons\\MainMenu\\Main_menu.tga";_ix = 2; _iy = 987; ix = 500; iy = 3;}; state = SQSH_ENABLED; txt_dx =0.3f; },
{type = SQSH_GENERAL_WND_TYPE; id = SQSH_MM_RAMKA; x=(500 - 250)/1024; y=(133 + customStep * 7)/768; sx=500/1024; sy=3/768; image={texture="resource\\icons\\MainMenu\\Main_menu.tga";_ix = 2; _iy = 987; ix = 500; iy = 3;}; state = SQSH_ENABLED; txt_dx =0.3f; },
{type = SQSH_GENERAL_WND_TYPE; id = SQSH_MM_RAMKA; x=(500 - 250)/1024; y=(133 + customStep * 8)/768; sx=500/1024; sy=3/768; image={texture="resource\\icons\\MainMenu\\Main_menu.tga";_ix = 2; _iy = 987; ix = 500; iy = 3;}; state = SQSH_ENABLED; txt_dx =0.3f; },
{type = SQSH_GENERAL_WND_TYPE; id = SQSH_MM_RAMKA; x=(500 - 250)/1024; y=(133 + customStep * 9)/768; sx=500/1024; sy=3/768; image={texture="resource\\icons\\MainMenu\\Main_menu.tga";_ix = 2; _iy = 987; ix = 500; iy = 3;}; state = SQSH_ENABLED; txt_dx =0.3f; },
{type = SQSH_GENERAL_WND_TYPE; id = SQSH_MM_RAMKA; x=(500 - 250)/1024; y=(customUp + 53 + customStep * 0)/768; sx=500/1024; sy=3/768; image={texture="resource\\icons\\MainMenu\\Main_menu.tga";_ix = 2; _iy = 987; ix = 500; iy = 3;}; state = SQSH_ENABLED; txt_dx =0.3f; },
{type = SQSH_GENERAL_WND_TYPE; id = SQSH_MM_RAMKA; x=(500 - 250)/1024; y=(customUp + 53 + customStep * 1)/768; sx=500/1024; sy=3/768; image={texture="resource\\icons\\MainMenu\\Main_menu.tga";_ix = 2; _iy = 987; ix = 500; iy = 3;}; state = SQSH_ENABLED; txt_dx =0.3f; },
{type = SQSH_GENERAL_WND_TYPE; id = SQSH_MM_RAMKA; x=(500 - 250)/1024; y=(customUp + 53 + customStep * 2)/768; sx=500/1024; sy=3/768; image={texture="resource\\icons\\MainMenu\\Main_menu.tga";_ix = 2; _iy = 987; ix = 500; iy = 3;}; state = SQSH_ENABLED; txt_dx =0.3f; },
{type = SQSH_GENERAL_WND_TYPE; id = SQSH_MM_RAMKA; x=(500 - 250)/1024; y=(customUp + 53 + customStep * 3)/768; sx=500/1024; sy=3/768; image={texture="resource\\icons\\MainMenu\\Main_menu.tga";_ix = 2; _iy = 987; ix = 500; iy = 3;}; state = SQSH_ENABLED; txt_dx =0.3f; },
{type = SQSH_GENERAL_WND_TYPE; id = SQSH_MM_RAMKA; x=(500 - 250)/1024; y=(customUp + 53 + customStep * 4)/768; sx=500/1024; sy=3/768; image={texture="resource\\icons\\MainMenu\\Main_menu.tga";_ix = 2; _iy = 987; ix = 500; iy = 3;}; state = SQSH_ENABLED; txt_dx =0.3f; },
{type = SQSH_GENERAL_WND_TYPE; id = SQSH_MM_RAMKA; x=(500 - 250)/1024; y=(customUp + 53 + customStep * 5)/768; sx=500/1024; sy=3/768; image={texture="resource\\icons\\MainMenu\\Main_menu.tga";_ix = 2; _iy = 987; ix = 500; iy = 3;}; state = SQSH_ENABLED; txt_dx =0.3f; },
{type = SQSH_GENERAL_WND_TYPE; id = SQSH_MM_RAMKA; x=(500 - 250)/1024; y=(customUp + 53 + customStep * 6)/768; sx=500/1024; sy=3/768; image={texture="resource\\icons\\MainMenu\\Main_menu.tga";_ix = 2; _iy = 987; ix = 500; iy = 3;}; state = SQSH_ENABLED; txt_dx =0.3f; },
{type = SQSH_GENERAL_WND_TYPE; id = SQSH_MM_RAMKA; x=(500 - 250)/1024; y=(customUp + 53 + customStep * 7)/768; sx=500/1024; sy=3/768; image={texture="resource\\icons\\MainMenu\\Main_menu.tga";_ix = 2; _iy = 987; ix = 500; iy = 3;}; state = SQSH_ENABLED; txt_dx =0.3f; },
{type = SQSH_GENERAL_WND_TYPE; id = SQSH_MM_RAMKA; x=(500 - 250)/1024; y=(customUp + 53 + customStep * 8)/768; sx=500/1024; sy=3/768; image={texture="resource\\icons\\MainMenu\\Main_menu.tga";_ix = 2; _iy = 987; ix = 500; iy = 3;}; state = SQSH_ENABLED; txt_dx =0.3f; },

sqshControl_ScaleButton { x=171/1024; y=(customUp + customStep*0)/768; sx=680/1024; sy=64/768; ystart=64/768; },
// {type = SQSH_SCALE_BUTTON_TYPE; id = SQSH_MM_RAMKA; x=171/1024; y=(customUp + customStep*0)/768; sx=680/1024; sy=64/768; ystart=64/768; hitTestMode = HITTEST_NONE; },
Expand Down Expand Up @@ -5292,14 +5291,8 @@ sqshControlContainer _sqsh_controls[int _sqsh_control_count] = {
image_check={texture="";_ix = 478;_iy = 493; ix = 25; iy = 23;};
target = SQSH_MM_PARTICLE_RATE; },


{type = SQSH_SCALE_BUTTON_TYPE; id = SQSH_MM_RAMKA; x=171/1024; y=(customUp + customStep*10)/768; sx=680/1024; sy=64/768; ystart=64/768; hitTestMode = HITTEST_NONE; },
{type = SQSH_PUSH_BUTTON_TYPE; id = SQSH_MM_GRAPHICS_COMPRESS; x=188/1024; y=(customUp + customStep*10)/768; sx=412/1024; sy=64/768; text="COMPRESS TEXTURES"; font_group=2; txt_dy = 16/768; txt_align = SHELL_ALIGN_LEFT; state = SQSH_ENABLED; sound = "mainmenu_button"; target = SQSH_MM_GRAPHICS_COMPRESS_COMBO;image={texture="resource\\icons\\MainMenu\\tv.avi";dx=339/1024;dy=157/768;dsx=128/1024;dsy=128/768;hasResolutionVersion=0;};},
{type = SQSH_COMBO_TYPE; id = SQSH_MM_GRAPHICS_COMPRESS_COMBO; x=635/1024; y=(customUp + customStep*10 + 18)/768; sx=(149+2*14)/1024; sy=32/768; target=SQSH_MM_GRAPHICS_COMPRESS; image={texture="resource\\icons\\MainMenu\\tv.avi";dx=339/1024;dy=157/768;dsx=128/1024;dsy=128/768;hasResolutionVersion=0;};},

{type = SQSH_SCALE_BUTTON_TYPE; id = SQSH_MM_RAMKA; x=leftSeparateBottomBtn.x; y=leftSeparateBottomBtn.y; sx=leftSeparateBottomBtn.sx; sy=leftSeparateBottomBtn.sy; ystart=42/768; hitTestMode = HITTEST_NONE; },
{type = SQSH_PUSH_BUTTON_TYPE; id = SQSH_MM_BACK_FROM_CUSTOM_BTN; x=leftSeparateBottomBtn.x; y=leftSeparateBottomBtn.y; sx=leftSeparateBottomBtn.sx; sy=leftSeparateBottomBtn.sy; text="BACK"; font_group=2; txt_dy = 9/768; state = SQSH_ENABLED; sound = "mainmenu_button";image={texture="resource\\icons\\MainMenu\\tv.avi";dx=339/1024;dy=157/768;dsx=128/1024;dsy=128/768;hasResolutionVersion=0;};}

};

bgObjects = new BGObj[] {
Expand Down Expand Up @@ -5759,11 +5752,6 @@ sqshControlContainer _sqsh_controls[int _sqsh_control_count] = {
image_check={texture="";_ix = 478;_iy = 493; ix = 25; iy = 23;};
target = SQSH_MM_PARTICLE_RATE; },


{type = SQSH_SCALE_BUTTON_TYPE; id = SQSH_MM_RAMKA; x=171/1024; y=(ingameCustomUp + ingameCustomStep*10)/768; sx=680/1024; sy=64/768; ystart=64/768; hitTestMode = HITTEST_NONE; },
{type = SQSH_PUSH_BUTTON_TYPE; id = SQSH_MM_GRAPHICS_COMPRESS; x=188/1024; y=(ingameCustomUp + ingameCustomStep*10)/768; sx=406/1024; sy=64/768; text="COMPRESS TEXTURES"; font_group=2; txt_dy = 16/768; txt_align = SHELL_ALIGN_LEFT; state = SQSH_ENABLED; sound = "mainmenu_button"; target = SQSH_MM_GRAPHICS_COMPRESS_COMBO;},
{type = SQSH_COMBO_TYPE; id = SQSH_MM_GRAPHICS_COMPRESS_COMBO; x=635/1024; y=(ingameCustomUp + ingameCustomStep*10 + 18)/768; sx=(249+2*14)/1024; sy=32/768; target=SQSH_MM_GRAPHICS_COMPRESS;},

{type = SQSH_SCALE_BUTTON_TYPE; id = SQSH_MM_RAMKA; x=97/1024; y=619/768; sx=145/1024; sy=45/768; image={texture="resource\\icons\\MainMenu\\new_menu.tga";_ix = 340; _iy = 291; ix = 145; iy = 45;}; ystart=45/768; hitTestMode = HITTEST_NONE; },
{type = SQSH_PUSH_BUTTON_TYPE; id = SQSH_MM_BACK_FROM_INGAME_CUSTOM; x=104/1024; y=621/768; sx=131/1024; sy=41/768; text="BACK"; font_group=2; txt_dy = 11/768; sound = "mainmenu_button"; state = SQSH_ENABLED; }

Expand Down
4 changes: 2 additions & 2 deletions Source/Scripts/SquadShellEnums.inl
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,8 @@ enum ShellControlID
SQSH_MM_GRAPHICS_BUMP_COMBO,
SQSH_MM_GRAPHICS_BUMP_CHAOS,
SQSH_MM_GRAPHICS_BUMP_CHAOS_COMBO,
SQSH_MM_GRAPHICS_COMPRESS,
SQSH_MM_GRAPHICS_COMPRESS_COMBO,
SQSH_MM_GRAPHICS_COMPRESS, // Unused
SQSH_MM_GRAPHICS_COMPRESS_COMBO, // Unused
SQSH_MM_BACK_FROM_CUSTOM_BTN,

//game
Expand Down
6 changes: 0 additions & 6 deletions Source/UserInterface/GraphicsOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ void CustomGraphOptions::load(const char* sectionName, const char* iniFileName)
bumpMapping = terVisGeneric->PossibilityBump() ? iniManager.getInt(sectionName, "EnableBump") : 0;
bumpChaos = terVisGeneric->PossibilityBumpChaos() ? iniManager.getInt(sectionName, "EnableBumpChaos") : 0;
particleRate = iniManager.getFloat(sectionName, "ParticleRate");

compressedTextures = iniManager.getFloat(sectionName, "FavoriteLoadDDS");
}

void CustomGraphOptions::save(const char* iniFileName) {
Expand All @@ -72,8 +70,6 @@ void CustomGraphOptions::save(const char* iniFileName) {
iniManager.putInt("Graphics", "EnableBump", bumpMapping);
iniManager.putInt("Graphics", "EnableBumpChaos", bumpChaos);
iniManager.putFloat("Graphics", "ParticleRate", particleRate);

iniManager.putInt("Graphics", "FavoriteLoadDDS", compressedTextures);
}

void CustomGraphOptions::apply() {
Expand Down Expand Up @@ -108,8 +104,6 @@ void CustomGraphOptions::apply() {
}

terVisGeneric->SetGlobalParticleRate(particleRate);

gb_VisGeneric->SetFavoriteLoadDDS(compressedTextures);
}

void GraphOptions::load(const char* sectionName, const char* iniFileName) {
Expand Down
3 changes: 0 additions & 3 deletions Source/UserInterface/GraphicsOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ class CustomGraphOptions : public Options {
bool bumpChaos;
float particleRate;

bool compressedTextures;

bool operator == (const CustomGraphOptions &cgo) const {
return (
landscapeDetails == cgo.landscapeDetails
Expand All @@ -97,7 +95,6 @@ class CustomGraphOptions : public Options {
&& bumpMapping == cgo.bumpMapping
&& bumpChaos == cgo.bumpChaos
&& particleRate == cgo.particleRate
&& compressedTextures == cgo.compressedTextures
);
};
bool operator != (const CustomGraphOptions &cgo) const {
Expand Down
15 changes: 0 additions & 15 deletions Source/UserInterface/OptionsMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ void OnIngameGraphicsCustomBtn(CShellWindow* pWnd, InterfaceEventCode code, int
onSamplesCombo(_shellIconManager.GetWnd(SQSH_MM_GRAPHICS_SHADOWS_SAMPLES_COMBO), EVENT_CREATEWND, -1);
onBumpCombo(_shellIconManager.GetWnd(SQSH_MM_GRAPHICS_BUMP_COMBO), EVENT_CREATEWND, -1);
onBumpChaosCombo(_shellIconManager.GetWnd(SQSH_MM_GRAPHICS_BUMP_CHAOS_COMBO), EVENT_CREATEWND, -1);
onCompressCombo(_shellIconManager.GetWnd(SQSH_MM_GRAPHICS_COMPRESS_COMBO), EVENT_CREATEWND, -1);
OnComboGraphicsFurrows(_shellIconManager.GetWnd(SQSH_MM_GRAPHICS_FURROWS_COMBO), EVENT_CREATEWND, -1);
OnComboGraphicsShadows(_shellIconManager.GetWnd(SQSH_MM_GRAPHICS_SHADOWS_COMBO), EVENT_CREATEWND, -1);
OnComboGraphicsReflection(_shellIconManager.GetWnd(SQSH_MM_GRAPHICS_REFLECTION_COMBO), EVENT_CREATEWND, -1);
Expand Down Expand Up @@ -189,7 +188,6 @@ void OnGraphicsCustomBtn(CShellWindow* pWnd, InterfaceEventCode code, int param)
onSamplesCombo(_shellIconManager.GetWnd(SQSH_MM_GRAPHICS_SHADOWS_SAMPLES_COMBO), EVENT_CREATEWND, -1);
onBumpCombo(_shellIconManager.GetWnd(SQSH_MM_GRAPHICS_BUMP_COMBO), EVENT_CREATEWND, -1);
onBumpChaosCombo(_shellIconManager.GetWnd(SQSH_MM_GRAPHICS_BUMP_CHAOS_COMBO), EVENT_CREATEWND, -1);
onCompressCombo(_shellIconManager.GetWnd(SQSH_MM_GRAPHICS_COMPRESS_COMBO), EVENT_CREATEWND, -1);
OnComboGraphicsFurrows(_shellIconManager.GetWnd(SQSH_MM_GRAPHICS_FURROWS_COMBO), EVENT_CREATEWND, -1);
OnComboGraphicsShadows(_shellIconManager.GetWnd(SQSH_MM_GRAPHICS_SHADOWS_COMBO), EVENT_CREATEWND, -1);
OnComboGraphicsReflection(_shellIconManager.GetWnd(SQSH_MM_GRAPHICS_REFLECTION_COMBO), EVENT_CREATEWND, -1);
Expand Down Expand Up @@ -362,19 +360,6 @@ void onBumpChaosCombo(CShellWindow* pWnd, InterfaceEventCode code, int param) {
GraphOptionsManager::getInstance().getGraphicsOptions().customOptions.bumpChaos = pCombo->pos;
}
}
void onCompressCombo(CShellWindow* pWnd, InterfaceEventCode code, int param) {
CComboWindow *pCombo = (CComboWindow*) pWnd;
if ( code == EVENT_CREATEWND ) {
if (param != -1) {
pCombo->Array.push_back( getItemTextFromBase("Off").c_str() );
pCombo->Array.push_back( getItemTextFromBase("On").c_str() );
pCombo->size = 2;
}
pCombo->pos = GraphOptionsManager::getInstance().getGraphicsOptions().customOptions.compressedTextures;
} else if ( code == EVENT_UNPRESSED || code == EVENT_RUNPRESSED ) {
GraphOptionsManager::getInstance().getGraphicsOptions().customOptions.compressedTextures = pCombo->pos;
}
}

void OnComboGraphicsFurrows(CShellWindow* pWnd, InterfaceEventCode code, int param)
{
Expand Down
1 change: 0 additions & 1 deletion Source/UserInterface/PerimeterShellDisp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ _handlertbl[] = {
{SQSH_MM_GRAPHICS_SHADOWS_SAMPLES_COMBO, onSamplesCombo},
{SQSH_MM_GRAPHICS_BUMP_COMBO, onBumpCombo},
{SQSH_MM_GRAPHICS_BUMP_CHAOS_COMBO, onBumpChaosCombo},
{SQSH_MM_GRAPHICS_COMPRESS_COMBO, onCompressCombo},
{SQSH_MM_BACK_FROM_CUSTOM_BTN, onMMBackButton},

//sound
Expand Down
1 change: 0 additions & 1 deletion Source/UserInterface/PerimeterShellUI.h
Original file line number Diff line number Diff line change
Expand Up @@ -2109,7 +2109,6 @@ void onPointLightCombo(CShellWindow* pWnd, InterfaceEventCode code, int param);
void onSamplesCombo(CShellWindow* pWnd, InterfaceEventCode code, int param);
void onBumpCombo(CShellWindow* pWnd, InterfaceEventCode code, int param);
void onBumpChaosCombo(CShellWindow* pWnd, InterfaceEventCode code, int param);
void onCompressCombo(CShellWindow* pWnd, InterfaceEventCode code, int param);
void OnComboGraphicsFurrows(CShellWindow* pWnd, InterfaceEventCode code, int param);
void OnComboGraphicsShadows(CShellWindow* pWnd, InterfaceEventCode code, int param);
void OnComboGraphicsReflection(CShellWindow* pWnd, InterfaceEventCode code, int param);
Expand Down

0 comments on commit c50f6ba

Please sign in to comment.