mirror of
https://github.com/blawar/GLideN64.git
synced 2024-06-25 22:09:35 +00:00
Replace txFilterForce16bpp and txHiresForce16bpp options by one txForce16bpp option.
Replace txFilterCacheCompression and txHiresCacheCompression by one txCacheCompression option.
This commit is contained in:
parent
988300259c
commit
dc423a1b72
16
Config.h
16
Config.h
|
@ -52,18 +52,17 @@ struct Config
|
|||
{
|
||||
u32 txFilterMode; // Texture filtering mode, eg Sharpen
|
||||
u32 txEnhancementMode; // Texture enhancement mode, eg 2xSAI
|
||||
u32 txFilterForce16bpp; // Force use 16bit color textures
|
||||
u32 txFilterIgnoreBG; // Do not apply filtering to backgrounds textures
|
||||
u32 txCacheSize; // Cache size in Mbytes
|
||||
u32 txFilterCacheCompression; // Zip cache of filtered textures
|
||||
u32 txSaveCache; // Save texture cache to hard disk
|
||||
|
||||
u32 txHiresEnable; // Use high-resolution texture packs
|
||||
u32 txHiresForce16bpp; // Force use 16bit color textures
|
||||
u32 txHiresFullAlphaChannel; // Use alpha channel fully
|
||||
u32 txHresAltCRC; // Use alternative method of paletted textures CRC calculation
|
||||
u32 txHiresCacheCompression; // Zip cache of hires textures
|
||||
u32 txDump; // Dump textures
|
||||
|
||||
u32 txForce16bpp; // Force use 16bit color textures
|
||||
u32 txCacheCompression; // Zip textures cache
|
||||
u32 txSaveCache; // Save texture cache to hard disk
|
||||
} textureFilter;
|
||||
|
||||
struct
|
||||
|
@ -114,15 +113,14 @@ struct Config
|
|||
textureFilter.txCacheSize = 100 * gc_uMegabyte;
|
||||
textureFilter.txDump = 0;
|
||||
textureFilter.txEnhancementMode = 0;
|
||||
textureFilter.txFilterCacheCompression = 1;
|
||||
textureFilter.txFilterForce16bpp = 0;
|
||||
textureFilter.txFilterIgnoreBG = 0;
|
||||
textureFilter.txFilterMode = 0;
|
||||
textureFilter.txHiresCacheCompression = 1;
|
||||
textureFilter.txHiresEnable = 0;
|
||||
textureFilter.txHiresForce16bpp = 0;
|
||||
textureFilter.txHiresFullAlphaChannel = 0;
|
||||
textureFilter.txHresAltCRC = 0;
|
||||
|
||||
textureFilter.txCacheCompression = 1;
|
||||
textureFilter.txForce16bpp = 0;
|
||||
textureFilter.txSaveCache = 1;
|
||||
|
||||
#ifdef OS_WINDOWS
|
||||
|
|
|
@ -59,17 +59,15 @@ void loadSettings()
|
|||
settings.beginGroup("textureFilter");
|
||||
config.textureFilter.txFilterMode = settings.value("txFilterMode", 0).toInt();
|
||||
config.textureFilter.txEnhancementMode = settings.value("txEnhancementMode", 0).toInt();
|
||||
config.textureFilter.txFilterForce16bpp = settings.value("txFilterForce16bpp", 0).toInt();
|
||||
config.textureFilter.txFilterIgnoreBG = settings.value("txFilterIgnoreBG", 0).toInt();
|
||||
config.textureFilter.txFilterCacheCompression = settings.value("txFilterCacheCompression", 1).toInt();
|
||||
config.textureFilter.txSaveCache = settings.value("txSaveCache", 1).toInt();
|
||||
config.textureFilter.txCacheSize = settings.value("txCacheSize", 100 * gc_uMegabyte).toInt();
|
||||
config.textureFilter.txHiresEnable = settings.value("txHiresEnable", 0).toInt();
|
||||
config.textureFilter.txHiresForce16bpp = settings.value("txHiresForce16bpp", 0).toInt();
|
||||
config.textureFilter.txHiresFullAlphaChannel = settings.value("txHiresFullAlphaChannel", 0).toInt();
|
||||
config.textureFilter.txHresAltCRC = settings.value("txHresAltCRC", 0).toInt();
|
||||
config.textureFilter.txHiresCacheCompression = settings.value("txHiresCacheCompression", 1).toInt();
|
||||
config.textureFilter.txDump = settings.value("txDump", 0).toInt();
|
||||
config.textureFilter.txForce16bpp = settings.value("txForce16bpp", 0).toInt();
|
||||
config.textureFilter.txCacheCompression = settings.value("txCacheCompression", 1).toInt();
|
||||
config.textureFilter.txSaveCache = settings.value("txSaveCache", 1).toInt();
|
||||
settings.endGroup();
|
||||
|
||||
settings.beginGroup("font");
|
||||
|
@ -143,17 +141,15 @@ void writeSettings()
|
|||
settings.beginGroup("textureFilter");
|
||||
settings.setValue("txFilterMode", config.textureFilter.txFilterMode);
|
||||
settings.setValue("txEnhancementMode", config.textureFilter.txEnhancementMode);
|
||||
settings.setValue("txFilterForce16bpp", config.textureFilter.txFilterForce16bpp);
|
||||
settings.setValue("txFilterIgnoreBG", config.textureFilter.txFilterIgnoreBG);
|
||||
settings.setValue("txFilterCacheCompression", config.textureFilter.txFilterCacheCompression);
|
||||
settings.setValue("txSaveCache", config.textureFilter.txSaveCache);
|
||||
settings.setValue("txCacheSize", config.textureFilter.txCacheSize);
|
||||
settings.setValue("txHiresEnable", config.textureFilter.txHiresEnable);
|
||||
settings.setValue("txHiresForce16bpp", config.textureFilter.txHiresForce16bpp);
|
||||
settings.setValue("txHiresFullAlphaChannel", config.textureFilter.txHiresFullAlphaChannel);
|
||||
settings.setValue("txHresAltCRC", config.textureFilter.txHresAltCRC);
|
||||
settings.setValue("txHiresCacheCompression", config.textureFilter.txHiresCacheCompression);
|
||||
settings.setValue("txDump", config.textureFilter.txDump);
|
||||
settings.setValue("txForce16bpp", config.textureFilter.txForce16bpp);
|
||||
settings.setValue("txCacheCompression", config.textureFilter.txCacheCompression);
|
||||
settings.setValue("txSaveCache", config.textureFilter.txSaveCache);
|
||||
settings.endGroup();
|
||||
|
||||
settings.beginGroup("font");
|
||||
|
|
|
@ -132,16 +132,14 @@ void ConfigDialog::_init()
|
|||
ui->enhancementComboBox->setCurrentIndex(config.textureFilter.txEnhancementMode);
|
||||
|
||||
ui->textureFilterCacheSpinBox->setValue(config.textureFilter.txCacheSize / gc_uMegabyte);
|
||||
ui->filterForce16bppCheckBox->setChecked(config.textureFilter.txFilterForce16bpp != 0);
|
||||
ui->ignoreBackgroundsCheckBox->setChecked(config.textureFilter.txFilterIgnoreBG != 0);
|
||||
ui->compressFilterCacheCheckBox->setChecked(config.textureFilter.txFilterCacheCompression != 0);
|
||||
|
||||
ui->texturePackGroupBox->setChecked(config.textureFilter.txHiresEnable != 0);
|
||||
ui->hiresForce16bppCheckBox->setChecked(config.textureFilter.txHiresForce16bpp != 0);
|
||||
ui->alphaChannelCheckBox->setChecked(config.textureFilter.txHiresFullAlphaChannel != 0);
|
||||
ui->compressHDTexturesCacheCheckBox->setChecked(config.textureFilter.txHiresCacheCompression != 0);
|
||||
ui->alternativeCRCCheckBox->setChecked(config.textureFilter.txHresAltCRC != 0);
|
||||
ui->textureDumpCheckBox->setChecked(config.textureFilter.txDump != 0);
|
||||
ui->force16bppCheckBox->setChecked(config.textureFilter.txForce16bpp != 0);
|
||||
ui->compressCacheCheckBox->setChecked(config.textureFilter.txCacheCompression != 0);
|
||||
ui->saveTextureCacheCheckBox->setChecked(config.textureFilter.txSaveCache != 0);
|
||||
|
||||
QString fontName(config.font.name.c_str());
|
||||
|
@ -216,16 +214,15 @@ void ConfigDialog::accept()
|
|||
config.textureFilter.txEnhancementMode = ui->enhancementComboBox->currentIndex();
|
||||
|
||||
config.textureFilter.txCacheSize = ui->textureFilterCacheSpinBox->value() * gc_uMegabyte;
|
||||
config.textureFilter.txFilterForce16bpp = ui->filterForce16bppCheckBox->isChecked() ? 1 : 0;
|
||||
config.textureFilter.txFilterIgnoreBG = ui->ignoreBackgroundsCheckBox->isChecked() ? 1 : 0;
|
||||
config.textureFilter.txFilterCacheCompression = ui->compressFilterCacheCheckBox->isChecked() ? 1 : 0;
|
||||
|
||||
config.textureFilter.txHiresEnable = ui->texturePackGroupBox->isChecked() ? 1 : 0;
|
||||
config.textureFilter.txHiresForce16bpp = ui->hiresForce16bppCheckBox->isChecked() ? 1 : 0;
|
||||
config.textureFilter.txHiresFullAlphaChannel = ui->alphaChannelCheckBox->isChecked() ? 1 : 0;
|
||||
config.textureFilter.txHiresCacheCompression = ui->compressHDTexturesCacheCheckBox->isChecked() ? 1 : 0;
|
||||
config.textureFilter.txHresAltCRC = ui->alternativeCRCCheckBox->isChecked() ? 1 : 0;
|
||||
config.textureFilter.txDump = ui->textureDumpCheckBox->isChecked() ? 1 : 0;
|
||||
|
||||
config.textureFilter.txCacheCompression = ui->compressCacheCheckBox->isChecked() ? 1 : 0;
|
||||
config.textureFilter.txForce16bpp = ui->force16bppCheckBox->isChecked() ? 1 : 0;
|
||||
config.textureFilter.txSaveCache = ui->saveTextureCacheCheckBox->isChecked() ? 1 : 0;
|
||||
|
||||
config.font.size = m_font.pointSize();
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>372</width>
|
||||
<height>534</height>
|
||||
<height>488</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
|
@ -736,16 +736,6 @@
|
|||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_12">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="filterForce16bppCheckBox">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p><span style=" font-weight:600;">Force 16bpp textures:</span></p><p>The color of the textures will be reduced to 16bpp.This is space saver and performance enhancer. This halves the space used on the texture cache and the GFX hardware's texture RAM. Color reduction is done so that the original quality is preserved as much as possible. Depending on the texture, this usually is hardly noticeable. Sometimes though, it can be: skies are a good example.</p><p>[Recommended: <span style=" font-style:italic;">off</span>]</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Force 16bpp textures</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="ignoreBackgroundsCheckBox">
|
||||
<property name="toolTip">
|
||||
|
@ -756,16 +746,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="compressFilterCacheCheckBox">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p><span style=" font-weight:600;">Compress texture cache:</span></p><p>Memory will be compressed so that more textures can be held in the texture cache. The compression ratio varies with each texture, but 1/5 of the original size would be a modest approximation. They will be decompressed on-the-fly, before being downloaded to the gfx hardware.</p><p>[Recommended: <span style=" font-style:italic;">on</span>]</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Compress texture cache</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
@ -780,16 +760,6 @@
|
|||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_14">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="hiresForce16bppCheckBox">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p><span style=" font-weight:600;">Force 16bpp textures:</span></p><p>The color of the textures will be reduced to 16bpp.This is space saver and performance enhancer. This halves the space used on the texture cache and the GFX hardware's texture RAM. Color reduction is done so that the original quality is preserved as much as possible. Depending on the texture, this usually is hardly noticeable. Sometimes though, it can be: skies are a good example.</p><p>[Recommended: <span style=" font-style:italic;">off</span>]</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Force 16bpp textures</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="alphaChannelCheckBox">
|
||||
<property name="toolTip">
|
||||
|
@ -800,16 +770,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="compressHDTexturesCacheCheckBox">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p><span style=" font-weight:600;">Compress texture cache:</span></p><p>When game started, plugin loads all its hi-resolution textures into PC memory. Since hi-resolution textures are usually large, the whole pack can take hundreds megabytes of memory. Cache compression allows save memory space greatly. Textures will be decompressed on-the-fly, before being downloaded to the gfx hardware.</p><p>[Recommended: <span style=" font-style:italic;">on</span>]</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Compress texture cache</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="alternativeCRCCheckBox">
|
||||
<property name="toolTip">
|
||||
|
@ -961,6 +921,26 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="force16bppCheckBox">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p><span style=" font-weight:600;">Force 16bpp textures:</span></p><p>The color of the textures will be reduced to 16bpp.This is space saver and performance enhancer. This halves the space used on the texture cache and the GFX hardware's texture RAM. Color reduction is done so that the original quality is preserved as much as possible. Depending on the texture, this usually is hardly noticeable. Sometimes though, it can be: skies are a good example.</p><p>[Recommended: <span style=" font-style:italic;">off</span>]</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Force 16bpp textures</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="compressCacheCheckBox">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p><span style=" font-weight:600;">Compress texture cache:</span></p><p>Memory will be compressed so that more textures can be held in the texture cache. The compression ratio varies with each texture, but 1/5 of the original size would be a modest approximation. They will be decompressed on-the-fly, before being downloaded to the gfx hardware.</p><p>[Recommended: <span style=" font-style:italic;">on</span>]</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Compress texture cache</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="saveTextureCacheCheckBox">
|
||||
<property name="toolTip">
|
||||
|
|
12
OpenGL.cpp
12
OpenGL.cpp
|
@ -1388,14 +1388,10 @@ void TextureFilterHandler::init()
|
|||
u32 options = textureFilters[config.textureFilter.txFilterMode] | textureEnhancements[config.textureFilter.txEnhancementMode];
|
||||
if (config.textureFilter.txHiresEnable)
|
||||
options |= RICE_HIRESTEXTURES;
|
||||
if (config.textureFilter.txFilterForce16bpp)
|
||||
options |= FORCE16BPP_TEX;
|
||||
if (config.textureFilter.txHiresForce16bpp)
|
||||
options |= FORCE16BPP_HIRESTEX;
|
||||
if (config.textureFilter.txFilterCacheCompression)
|
||||
options |= GZ_TEXCACHE;
|
||||
if (config.textureFilter.txHiresCacheCompression)
|
||||
options |= GZ_HIRESTEXCACHE;
|
||||
if (config.textureFilter.txForce16bpp)
|
||||
options |= FORCE16BPP_TEX | FORCE16BPP_HIRESTEX;
|
||||
if (config.textureFilter.txCacheCompression)
|
||||
options |= GZ_TEXCACHE | GZ_HIRESTEXCACHE;
|
||||
if (config.textureFilter.txSaveCache)
|
||||
options |= (DUMP_TEXCACHE | DUMP_HIRESTEXCACHE);
|
||||
if (config.textureFilter.txHiresFullAlphaChannel)
|
||||
|
|
|
@ -78,28 +78,24 @@ bool Config_SetDefault()
|
|||
assert(res == M64ERR_SUCCESS);
|
||||
res = ConfigSetDefaultInt(g_configVideoGliden64, "txEnhancementMode", 0, "Texture Enhancement (0=none, 1=store as is, 2=X2, 3=X2SAI, 4=HQ2X, 5=HQ2XS, 6=LQ2X, 7=LQ2XS, 8=HQ4X, 9=2xBRZ, 10=3xBRZ, 11=4xBRZ, 12=5xBRZ)");
|
||||
assert(res == M64ERR_SUCCESS);
|
||||
res = ConfigSetDefaultBool(g_configVideoGliden64, "txFilterForce16bpp", 0, "Force use 16bit texture formats for filtered textures.");
|
||||
assert(res == M64ERR_SUCCESS);
|
||||
res = ConfigSetDefaultBool(g_configVideoGliden64, "txFilterIgnoreBG", 0, "Don't filter background textures.");
|
||||
assert(res == M64ERR_SUCCESS);
|
||||
res = ConfigSetDefaultInt(g_configVideoGliden64, "txCacheSize", 128, "Size of filtered textures cache in megabytes.");
|
||||
assert(res == M64ERR_SUCCESS);
|
||||
res = ConfigSetDefaultBool(g_configVideoGliden64, "txFilterCacheCompression", 0, "Zip cache of filtered textures.");
|
||||
assert(res == M64ERR_SUCCESS);
|
||||
res = ConfigSetDefaultBool(g_configVideoGliden64, "txSaveCache", 0, "Save texture cache to hard disk.");
|
||||
assert(res == M64ERR_SUCCESS);
|
||||
res = ConfigSetDefaultBool(g_configVideoGliden64, "txHiresEnable", 0, "Use high-resolution texture packs if available.");
|
||||
assert(res == M64ERR_SUCCESS);
|
||||
res = ConfigSetDefaultBool(g_configVideoGliden64, "txHiresForce16bpp", 0, "Force use 16bit texture formats for high-res textures.");
|
||||
assert(res == M64ERR_SUCCESS);
|
||||
res = ConfigSetDefaultBool(g_configVideoGliden64, "txHiresFullAlphaChannel", 0, "Allow to use alpha channel of high-res texture fully.");
|
||||
assert(res == M64ERR_SUCCESS);
|
||||
res = ConfigSetDefaultBool(g_configVideoGliden64, "txHresAltCRC", 0, "Use alternative method of paletted textures CRC calculation.");
|
||||
assert(res == M64ERR_SUCCESS);
|
||||
res = ConfigSetDefaultBool(g_configVideoGliden64, "txHiresCacheCompression", 0, "Zip cache of high-res textures.");
|
||||
assert(res == M64ERR_SUCCESS);
|
||||
res = ConfigSetDefaultBool(g_configVideoGliden64, "txDump", 0, "Enable dump of loaded N64 textures.");
|
||||
assert(res == M64ERR_SUCCESS);
|
||||
res = ConfigSetDefaultBool(g_configVideoGliden64, "txCacheCompression", 0, "Zip textures cache.");
|
||||
assert(res == M64ERR_SUCCESS);
|
||||
res = ConfigSetDefaultBool(g_configVideoGliden64, "txForce16bpp", 0, "Force use 16bit texture formats for HD textures.");
|
||||
assert(res == M64ERR_SUCCESS);
|
||||
res = ConfigSetDefaultBool(g_configVideoGliden64, "txSaveCache", 0, "Save texture cache to hard disk.");
|
||||
assert(res == M64ERR_SUCCESS);
|
||||
|
||||
#ifdef OS_WINDOWS
|
||||
res = ConfigSetDefaultString(g_configVideoGliden64, "fontName", "arial.ttf", "File name of True Type Font for text messages.");
|
||||
|
@ -158,17 +154,15 @@ void Config_LoadConfig()
|
|||
//#Texture filter settings
|
||||
config.textureFilter.txFilterMode = ConfigGetParamInt(g_configVideoGliden64, "txFilterMode");
|
||||
config.textureFilter.txEnhancementMode = ConfigGetParamInt(g_configVideoGliden64, "txEnhancementMode");
|
||||
config.textureFilter.txFilterForce16bpp = ConfigGetParamBool(g_configVideoGliden64, "txFilterForce16bpp");
|
||||
config.textureFilter.txFilterIgnoreBG = ConfigGetParamBool(g_configVideoGliden64, "txFilterIgnoreBG");
|
||||
config.textureFilter.txCacheSize = ConfigGetParamInt(g_configVideoGliden64, "txCacheSize") * uMegabyte;
|
||||
config.textureFilter.txFilterCacheCompression = ConfigGetParamBool(g_configVideoGliden64, "txFilterCacheCompression");
|
||||
config.textureFilter.txSaveCache = ConfigGetParamBool(g_configVideoGliden64, "txSaveCache");
|
||||
config.textureFilter.txHiresEnable = ConfigGetParamBool(g_configVideoGliden64, "txHiresEnable");
|
||||
config.textureFilter.txHiresForce16bpp = ConfigGetParamBool(g_configVideoGliden64, "txHiresForce16bpp");
|
||||
config.textureFilter.txHiresFullAlphaChannel = ConfigGetParamBool(g_configVideoGliden64, "txHiresFullAlphaChannel");
|
||||
config.textureFilter.txHresAltCRC = ConfigGetParamBool(g_configVideoGliden64, "txHresAltCRC");
|
||||
config.textureFilter.txHiresCacheCompression = ConfigGetParamBool(g_configVideoGliden64, "txHiresCacheCompression");
|
||||
config.textureFilter.txDump = ConfigGetParamBool(g_configVideoGliden64, "txDump");
|
||||
config.textureFilter.txForce16bpp = ConfigGetParamBool(g_configVideoGliden64, "txForce16bpp");
|
||||
config.textureFilter.txCacheCompression = ConfigGetParamBool(g_configVideoGliden64, "txCacheCompression");
|
||||
config.textureFilter.txSaveCache = ConfigGetParamBool(g_configVideoGliden64, "txSaveCache");
|
||||
//#Font settings
|
||||
config.font.name = ConfigGetParamString(g_configVideoGliden64, "fontName");
|
||||
if (config.font.name.empty())
|
||||
|
|
Loading…
Reference in New Issue
Block a user