1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-06-30 08:24:05 +00:00

Separate "Dump" and "Reload" options Continuation of commit 7228d0d5db

This commit is contained in:
oddMLan 2020-06-14 09:14:29 -07:00 committed by Sergey Lipskiy
parent f7b6f158b3
commit 71afc19427
7 changed files with 29 additions and 12 deletions

Binary file not shown.

View File

@ -183,9 +183,11 @@ void loadDefaultStrings(void)
g_defaultStrings.insert(LANG_STRINGS::value_type(TEXTURE_USE_FULL_TRANSPARENCIES_TOOLTIP, "When this option is cleared, textures will be loaded as they are when using Rice Video: transparencies either on or off. When this option is selected, GlideN64 will check how the texture's alpha channel was designed and will select the most appropriate format. This gives texture pack designers freedom to use semi-transparent textures.\nClear this option for older or poorly designed texture packs.\n[Recommended: Texture pack dependent]"));
g_defaultStrings.insert(LANG_STRINGS::value_type(TEXTURE_ALTERNATIVE_CRC, "Alternative CRC calculation (for old Rice Video packs)"));
g_defaultStrings.insert(LANG_STRINGS::value_type(TEXTURE_ALTERNATIVE_CRC_TOOLTIP, "This option emulates a palette CRC calculation bug in Rice Video. If you have problems loading textures, try checking or unchecking this option.\n[Recommended: Mostly unchecked, checked for old texture packs]"));
g_defaultStrings.insert(LANG_STRINGS::value_type(TEXTURE_FILE_STORAGE, "Use file storage instead of memory cache"));
g_defaultStrings.insert(LANG_STRINGS::value_type(TEXTURE_DUMP_EDIT, "Dump/edit textures"));
g_defaultStrings.insert(LANG_STRINGS::value_type(TEXTURE_DUMP_EDIT_TOOLTIP, "This option dumps textures on screen to a texture pack folder. You can also reload textures while the game is running to see how they look instantly—big time saver!\nHotkeys:\nUse R to reload textures from the texture pack\nUse D to toggle texture dumping on or off"));
g_defaultStrings.insert(LANG_STRINGS::value_type(TEXTURE_USE_FILE_STORAGE_TOOLTIP, "This option enables alternative storage for hi-res textures. Normally memory cache is used. It keeps all hi-res textures in RAM and thus limited by available RAM size. File storage keeps texture cache on HDD. It is slower than memory cache, but has virtually no limits on cache size. Disable \"Compress texture cache\" option for better performance."));
g_defaultStrings.insert(LANG_STRINGS::value_type(TEXTURE_DUMP, "Press 'd' to dump N64 textures (for texture artists)"));
g_defaultStrings.insert(LANG_STRINGS::value_type(TEXTURE_DUMP_TOOLTIP, "This option dumps textures on screen to a texture pack folder.\nHotkey:\nUse D to toggle texture dumping on or off"));
g_defaultStrings.insert(LANG_STRINGS::value_type(TEXTURE_RELOAD, "Press 'r' to reload hi-res textures (for texture artists)"));
g_defaultStrings.insert(LANG_STRINGS::value_type(TEXTURE_RELOAD_TOOLTIP, "This option allows texture artists to reload hi-res textures while the game is running to instantly see how they look —big time saver\nHotkey:\nUse R to reload textures from the texture pack"));
g_defaultStrings.insert(LANG_STRINGS::value_type(TEXTURE_SIZE_OF_MEMORY_CACHE, "Size of memory cache for enhanced textures:"));
g_defaultStrings.insert(LANG_STRINGS::value_type(TEXTURE_SIZE_OF_MEMORY_CACHE_TOOLTIP, "Enhanced and filtered textures can be cached to improve performance. This option adjusts how much memory is dedicated to the texture cache. This can improve performance if there are many requests for the same texture, which is usually the case. Normally 128 MB should be more than enough, but the best option is different for each game. Super Mario 64 may not need more than 32 MB, but Conker's Bad Fur Day can take advantage of 256 MB+. Adjust accordingly if you are having performance problems. Setting this option to 0 disables the cache.\n[Recommended: PC and game dependent]"));
g_defaultStrings.insert(LANG_STRINGS::value_type(TEXTURE_SAVE_ENHANCED, "Save enhanced texture cache to hard disk"));

View File

@ -189,9 +189,9 @@ enum languageStringID
TEXTURE_USE_FULL_TRANSPARENCIES_TOOLTIP = 5025,
TEXTURE_ALTERNATIVE_CRC = 5026,
TEXTURE_ALTERNATIVE_CRC_TOOLTIP = 5027,
TEXTURE_FILE_STORAGE = 5028,
TEXTURE_DUMP_EDIT = 5029,
TEXTURE_DUMP_EDIT_TOOLTIP = 5030,
TEXTURE_USE_FILE_STORAGE_TOOLTIP = 5028,
TEXTURE_DUMP = 5029,
TEXTURE_DUMP_TOOLTIP = 5030,
TEXTURE_SIZE_OF_MEMORY_CACHE = 5031,
TEXTURE_SIZE_OF_MEMORY_CACHE_TOOLTIP = 5032,
TEXTURE_SAVE_ENHANCED = 5033,
@ -200,6 +200,8 @@ enum languageStringID
TEXTURE_COMPRESS_CACHE_TOOLTIP = 5036,
TEXTURE_CONVERT_16BPP = 5037,
TEXTURE_CONVERT_16BPP_TOOLTIP = 5038,
TEXTURE_RELOAD = 5039,
TEXTURE_RELOAD_TOOLTIP = 5040,
/*********************************************************************************
* On-screen display *

View File

@ -93,6 +93,7 @@ void _loadSettings(GlSettings & settings)
config.textureFilter.txHiresFullAlphaChannel = settings.value("txHiresFullAlphaChannel", config.textureFilter.txHiresFullAlphaChannel).toInt();
config.textureFilter.txHresAltCRC = settings.value("txHresAltCRC", config.textureFilter.txHresAltCRC).toInt();
config.textureFilter.txDump = settings.value("txDump", config.textureFilter.txDump).toInt();
config.textureFilter.txReloadHiresTex = settings.value("txReloadHiresTex", config.textureFilter.txReloadHiresTex).toInt();
config.textureFilter.txForce16bpp = settings.value("txForce16bpp", config.textureFilter.txForce16bpp).toInt();
config.textureFilter.txCacheCompression = settings.value("txCacheCompression", config.textureFilter.txCacheCompression).toInt();
config.textureFilter.txSaveCache = settings.value("txSaveCache", config.textureFilter.txSaveCache).toInt();
@ -274,6 +275,7 @@ void writeSettings(const char * _strIniFolder)
settings.setValue("txHiresFullAlphaChannel", config.textureFilter.txHiresFullAlphaChannel);
settings.setValue("txHresAltCRC", config.textureFilter.txHresAltCRC);
settings.setValue("txDump", config.textureFilter.txDump);
settings.setValue("txReloadHiresTex", config.textureFilter.txReloadHiresTex);
settings.setValue("txForce16bpp", config.textureFilter.txForce16bpp);
settings.setValue("txCacheCompression", config.textureFilter.txCacheCompression);
settings.setValue("txSaveCache", config.textureFilter.txSaveCache);
@ -474,6 +476,7 @@ void saveCustomRomSettings(const char * _strIniFolder, const char * _strRomName)
WriteCustomSetting(textureFilter, txHiresFullAlphaChannel);
WriteCustomSetting(textureFilter, txHresAltCRC);
WriteCustomSetting(textureFilter, txDump);
WriteCustomSetting(textureFilter, txReloadHiresTex);
WriteCustomSetting(textureFilter, txForce16bpp);
WriteCustomSetting(textureFilter, txCacheCompression);
WriteCustomSetting(textureFilter, txSaveCache);

View File

@ -62,8 +62,9 @@ void CTextureEnhancementTab::ApplyLanguage(void)
SetDlgItemTextW(IDC_TEX_DUMP_PATH_STATIC, wGS(TEXTURE_DUMP_PATH).c_str());
SetDlgItemTextW(IDC_CHK_ALPHA_CHANNEL, wGS(TEXTURE_USE_FULL_TRANSPARENCIES).c_str());
SetDlgItemTextW(IDC_CHK_ALTERNATIVE_CRC, wGS(TEXTURE_ALTERNATIVE_CRC).c_str());
SetDlgItemTextW(IDC_CHK_HIRES_TEX_FILESTORAGE, wGS(TEXTURE_FILE_STORAGE).c_str());
SetDlgItemTextW(IDC_CHK_TEXTURE_DUMP, wGS(TEXTURE_DUMP_EDIT).c_str());
SetDlgItemTextW(IDC_CHK_HIRES_TEX_FILESTORAGE, wGS(TEXTURE_USE_FILE_STORAGE).c_str());
SetDlgItemTextW(IDC_CHK_TEXTURE_DUMP, wGS(TEXTURE_DUMP).c_str());
SetDlgItemTextW(IDC_CHK_TEXTURE_RELOAD, wGS(TEXTURE_RELOAD).c_str());
SetDlgItemTextW(IDC_TEXTURE_FILTER_CACHE_STATIC, wGS(TEXTURE_SIZE_OF_MEMORY_CACHE).c_str());
SetDlgItemTextW(IDC_CHK_SAVE_TEXTURE_CACHE, wGS(TEXTURE_SAVE_ENHANCED).c_str());
SetDlgItemTextW(IDC_CHK_COMPRESS_CACHE, wGS(TEXTURE_COMPRESS_CACHE).c_str());
@ -86,8 +87,12 @@ void CTextureEnhancementTab::ApplyLanguage(void)
TTSetTxt(GetDlgItem(IDC_CHK_ALPHA_CHANNEL), tooltip.c_str());
tooltip = wGS(TEXTURE_ALTERNATIVE_CRC_TOOLTIP);
TTSetTxt(GetDlgItem(IDC_CHK_ALTERNATIVE_CRC), tooltip.c_str());
tooltip = wGS(TEXTURE_DUMP_EDIT_TOOLTIP);
tooltip = wGS(TEXTURE_USE_FILE_STORAGE_TOOLTIP);
TTSetTxt(GetDlgItem(IDC_CHK_HIRES_TEX_FILESTORAGE), tooltip.c_str());
tooltip = wGS(TEXTURE_DUMP_TOOLTIP);
TTSetTxt(GetDlgItem(IDC_CHK_TEXTURE_DUMP), tooltip.c_str());
tooltip = wGS(TEXTURE_RELOAD_TOOLTIP);
TTSetTxt(GetDlgItem(IDC_CHK_TEXTURE_RELOAD), tooltip.c_str());
tooltip = wGS(TEXTURE_SIZE_OF_MEMORY_CACHE_TOOLTIP);
TTSetTxt(GetDlgItem(IDC_TEXTURE_FILTER_CACHE_STATIC), tooltip.c_str());
TTSetTxt(GetDlgItem(IDC_TEXTURE_FILTER_CACHE_EDIT), tooltip.c_str());
@ -161,6 +166,7 @@ void CTextureEnhancementTab::OnTexturePack(UINT /*Code*/, int /*id*/, HWND /*ctl
CButton(GetDlgItem(IDC_CHK_ALTERNATIVE_CRC)).EnableWindow(UseTextPack);
CButton(GetDlgItem(IDC_CHK_HIRES_TEX_FILESTORAGE)).EnableWindow(UseTextPack);
CButton(GetDlgItem(IDC_CHK_TEXTURE_DUMP)).EnableWindow(UseTextPack);
CButton(GetDlgItem(IDC_CHK_TEXTURE_RELOAD)).EnableWindow(UseTextPack);
}
LRESULT CTextureEnhancementTab::OnScroll(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM lParam, BOOL& /*bHandled*/)
@ -190,6 +196,7 @@ void CTextureEnhancementTab::LoadSettings(bool /*blockCustomSettings*/)
CButton(GetDlgItem(IDC_CHK_ALTERNATIVE_CRC)).SetCheck(config.textureFilter.txHresAltCRC != 0 ? BST_CHECKED : BST_UNCHECKED);
CButton(GetDlgItem(IDC_CHK_HIRES_TEX_FILESTORAGE)).SetCheck(config.textureFilter.txHiresTextureFileStorage != 0 ? BST_CHECKED : BST_UNCHECKED);
CButton(GetDlgItem(IDC_CHK_TEXTURE_DUMP)).SetCheck(config.textureFilter.txDump != 0 ? BST_CHECKED : BST_UNCHECKED);
CButton(GetDlgItem(IDC_CHK_TEXTURE_RELOAD)).SetCheck(config.textureFilter.txReloadHiresTex != 0 ? BST_CHECKED : BST_UNCHECKED);
CButton(GetDlgItem(IDC_CHK_SAVE_TEXTURE_CACHE)).SetCheck(config.textureFilter.txSaveCache != 0 ? BST_CHECKED : BST_UNCHECKED);
CButton(GetDlgItem(IDC_CHK_COMPRESS_CACHE)).SetCheck(config.textureFilter.txCacheCompression != 0 ? BST_CHECKED : BST_UNCHECKED);
CButton(GetDlgItem(IDC_CHK_FORCE_16BPP)).SetCheck(config.textureFilter.txForce16bpp != 0 ? BST_CHECKED : BST_UNCHECKED);
@ -238,6 +245,7 @@ void CTextureEnhancementTab::SaveSettings()
config.textureFilter.txHresAltCRC = CButton(GetDlgItem(IDC_CHK_ALTERNATIVE_CRC)).GetCheck() == BST_CHECKED ? 1 : 0;
config.textureFilter.txHiresTextureFileStorage = CButton(GetDlgItem(IDC_CHK_HIRES_TEX_FILESTORAGE)).GetCheck() == BST_CHECKED ? 1 : 0;
config.textureFilter.txDump = CButton(GetDlgItem(IDC_CHK_TEXTURE_DUMP)).GetCheck() == BST_CHECKED ? 1 : 0;
config.textureFilter.txReloadHiresTex = CButton(GetDlgItem(IDC_CHK_TEXTURE_RELOAD)).GetCheck() == BST_CHECKED ? 1 : 0;
config.textureFilter.txCacheSize = m_TextureFilterCacheSpin.GetPos() * gc_uMegabyte * 50;
config.textureFilter.txSaveCache = CButton(GetDlgItem(IDC_CHK_SAVE_TEXTURE_CACHE)).GetCheck() == BST_CHECKED ? 1 : 0;
config.textureFilter.txCacheCompression = CButton(GetDlgItem(IDC_CHK_COMPRESS_CACHE)).GetCheck() == BST_CHECKED ? 1 : 0;

Binary file not shown.

View File

@ -182,9 +182,9 @@
#5025# "When this option is cleared, textures will be loaded as they are when using Rice Video: transparencies either on or off. When this option is selected, GlideN64 will check how the texture's alpha channel was designed and will select the most appropriate format. This gives texture pack designers freedom to use semi-transparent textures.\nClear this option for older or poorly designed texture packs.\n[Recommended: Texture pack dependent]"
#5026# "Alternative CRC calculation (for old Rice Video packs)"
#5027# "This option emulates a palette CRC calculation bug in Rice Video. If you have problems loading textures, try checking or unchecking this option.\n[Recommended: Mostly unchecked, checked for old texture packs]"
#5028# "Use file storage instead of memory cache"
#5029# "Dump/edit textures"
#5030# "This option dumps textures on screen to a texture pack folder. You can also reload textures while the game is running to see how they look instantly—big time saver!\nHotkeys:\nUse R to reload textures from the texture pack\nUse D to toggle texture dumping on or off"
#5028# "This option enables alternative storage for hi-res textures. Normally memory cache is used. It keeps all hi-res textures in RAM and thus limited by available RAM size. File storage keeps texture cache on HDD. It is slower than memory cache, but has virtually no limits on cache size. Disable \"Compress texture cache\" option for better performance."
#5029# "Press 'd' to dump N64 textures (for texture artists)"
#5030# "This option dumps textures on screen to a texture pack folder.\nHotkey:\nUse D to toggle texture dumping on or off"
#5031# "Size of memory cache for enhanced textures:"
#5032# "Enhanced and filtered textures can be cached to improve performance. This option adjusts how much memory is dedicated to the texture cache. This can improve performance if there are many requests for the same texture, which is usually the case. Normally 128 MB should be more than enough, but the best option is different for each game. Super Mario 64 may not need more than 32 MB, but Conker's Bad Fur Day can take advantage of 256 MB+. Adjust accordingly if you are having performance problems. Setting this option to 0 disables the cache.\n[Recommended: PC and game dependent]"
#5033# "Save enhanced texture cache to hard disk"
@ -193,6 +193,8 @@
#5036# "Textures will be compressed so more textures can be held in the cache. The compression ratio varies per texture, but the compression is typically 1/5 of the original size.\n[Recommended: Checked]"
#5037# "Convert textures to 16 bpp"
#5038# "This option halves the space used by textures in the texture cache and video card memory to improve performance. When reducing the color, GLideN64 tries to perserve the original quality as much as possible. On most textures it's hardly noticeable, but some textures, like skies, can look noticeably worse.\n[Recommended: Unchecked]"
#5039# "Press 'r' to reload hi-res textures (for texture artists)"
#5040# "This option allows texture artists to reload hi-res textures while the game is running to instantly see how they look —big time saver\nHotkey:\nUse R to reload textures from the texture pack"
/*********************************************************************************
* On-screen display *