mirror of
https://github.com/blawar/GLideN64.git
synced 2024-06-25 22:09:35 +00:00
Move Config::resetToDefaults() to Config.cpp
Set default value for textureFilter.txPath as %plugin path%/hires_texture
This commit is contained in:
parent
7368949d30
commit
d9f3785b1d
|
@ -6,6 +6,7 @@ set(GLideN64_SOURCES
|
|||
3DMath.cpp
|
||||
Combiner.cpp
|
||||
CommonPluginAPI.cpp
|
||||
Config.cpp
|
||||
CRC.cpp
|
||||
DepthBuffer.cpp
|
||||
F3D.cpp
|
||||
|
|
73
Config.cpp
Normal file
73
Config.cpp
Normal file
|
@ -0,0 +1,73 @@
|
|||
#ifdef OS_WINDOWS
|
||||
# include <windows.h>
|
||||
#else
|
||||
# include "winlnxdefs.h"
|
||||
#endif // OS_WINDOWS
|
||||
#include "RSP.h"
|
||||
#include "PluginAPI.h"
|
||||
#include "Config.h"
|
||||
|
||||
void Config::resetToDefaults()
|
||||
{
|
||||
version = CONFIG_VERSION_CURRENT;
|
||||
|
||||
video.fullscreen = 0;
|
||||
video.fullscreenWidth = video.windowedWidth = 640;
|
||||
video.fullscreenHeight = video.windowedHeight = 480;
|
||||
video.fullscreenRefresh = 60;
|
||||
video.multisampling = 0;
|
||||
video.verticalSync = 0;
|
||||
|
||||
texture.maxAnisotropy = 0;
|
||||
texture.bilinearMode = BILINEAR_STANDARD;
|
||||
texture.maxBytes = 500 * gc_uMegabyte;
|
||||
texture.screenShotFormat = 0;
|
||||
|
||||
generalEmulation.enableFog = 1;
|
||||
generalEmulation.enableLOD = 1;
|
||||
generalEmulation.enableNoise = 1;
|
||||
generalEmulation.enableHWLighting = 0;
|
||||
generalEmulation.hacks = 0;
|
||||
|
||||
frameBufferEmulation.enable = 1;
|
||||
frameBufferEmulation.copyDepthToRDRAM = 1;
|
||||
frameBufferEmulation.copyFromRDRAM = 0;
|
||||
frameBufferEmulation.copyToRDRAM = 0;
|
||||
frameBufferEmulation.ignoreCFB = 0;
|
||||
frameBufferEmulation.N64DepthCompare = 0;
|
||||
|
||||
textureFilter.txCacheSize = 100 * gc_uMegabyte;
|
||||
textureFilter.txDump = 0;
|
||||
textureFilter.txEnhancementMode = 0;
|
||||
textureFilter.txFilterIgnoreBG = 0;
|
||||
textureFilter.txFilterMode = 0;
|
||||
textureFilter.txHiresEnable = 0;
|
||||
textureFilter.txHiresFullAlphaChannel = 0;
|
||||
textureFilter.txHresAltCRC = 0;
|
||||
|
||||
textureFilter.txCacheCompression = 1;
|
||||
textureFilter.txForce16bpp = 0;
|
||||
textureFilter.txSaveCache = 1;
|
||||
|
||||
api().FindPluginPath(textureFilter.txPath);
|
||||
wcscat(textureFilter.txPath, L"/hires_texture");
|
||||
|
||||
#ifdef OS_WINDOWS
|
||||
font.name = "arial.ttf";
|
||||
#else
|
||||
font.name = "FreeSans.ttf";
|
||||
#endif
|
||||
font.size = 18;
|
||||
font.color[0] = 0xB5;
|
||||
font.color[1] = 0xE6;
|
||||
font.color[2] = 0x1D;
|
||||
font.color[3] = 0xFF;
|
||||
for (int i = 0; i < 4; ++i)
|
||||
font.colorf[i] = font.color[i] / 255.0f;
|
||||
|
||||
bloomFilter.enable = 0;
|
||||
bloomFilter.thresholdLevel = 4;
|
||||
bloomFilter.blendMode = 0;
|
||||
bloomFilter.blurAmount = 10;
|
||||
bloomFilter.blurStrength = 20;
|
||||
}
|
64
Config.h
64
Config.h
|
@ -88,69 +88,7 @@ struct Config
|
|||
u32 blurStrength;
|
||||
} bloomFilter;
|
||||
|
||||
void resetToDefaults()
|
||||
{
|
||||
version = CONFIG_VERSION_CURRENT;
|
||||
|
||||
video.fullscreen = 0;
|
||||
video.fullscreenWidth = video.windowedWidth = 640;
|
||||
video.fullscreenHeight = video.windowedHeight = 480;
|
||||
video.fullscreenRefresh = 60;
|
||||
video.multisampling = 0;
|
||||
video.verticalSync = 0;
|
||||
|
||||
texture.maxAnisotropy = 0;
|
||||
texture.bilinearMode = BILINEAR_STANDARD;
|
||||
texture.maxBytes = 500 * gc_uMegabyte;
|
||||
texture.screenShotFormat = 0;
|
||||
|
||||
generalEmulation.enableFog = 1;
|
||||
generalEmulation.enableLOD = 1;
|
||||
generalEmulation.enableNoise = 1;
|
||||
generalEmulation.enableHWLighting = 0;
|
||||
generalEmulation.hacks = 0;
|
||||
|
||||
frameBufferEmulation.enable = 1;
|
||||
frameBufferEmulation.copyDepthToRDRAM = 1;
|
||||
frameBufferEmulation.copyFromRDRAM = 0;
|
||||
frameBufferEmulation.copyToRDRAM = 0;
|
||||
frameBufferEmulation.ignoreCFB = 0;
|
||||
frameBufferEmulation.N64DepthCompare = 0;
|
||||
|
||||
textureFilter.txCacheSize = 100 * gc_uMegabyte;
|
||||
textureFilter.txDump = 0;
|
||||
textureFilter.txEnhancementMode = 0;
|
||||
textureFilter.txFilterIgnoreBG = 0;
|
||||
textureFilter.txFilterMode = 0;
|
||||
textureFilter.txHiresEnable = 0;
|
||||
textureFilter.txHiresFullAlphaChannel = 0;
|
||||
textureFilter.txHresAltCRC = 0;
|
||||
|
||||
textureFilter.txCacheCompression = 1;
|
||||
textureFilter.txForce16bpp = 0;
|
||||
textureFilter.txSaveCache = 1;
|
||||
|
||||
textureFilter.txPath[0] = '\0';
|
||||
|
||||
#ifdef OS_WINDOWS
|
||||
font.name = "arial.ttf";
|
||||
#else
|
||||
font.name = "FreeSans.ttf";
|
||||
#endif
|
||||
font.size = 18;
|
||||
font.color[0] = 0xB5;
|
||||
font.color[1] = 0xE6;
|
||||
font.color[2] = 0x1D;
|
||||
font.color[3] = 0xFF;
|
||||
for (int i = 0; i < 4; ++i)
|
||||
font.colorf[i] = font.color[i] /255.0f;
|
||||
|
||||
bloomFilter.enable = 0;
|
||||
bloomFilter.thresholdLevel = 4;
|
||||
bloomFilter.blendMode = 0;
|
||||
bloomFilter.blurAmount = 10;
|
||||
bloomFilter.blurStrength = 20;
|
||||
}
|
||||
void resetToDefaults();
|
||||
};
|
||||
|
||||
#define hack_Ogre64 (1<<0) //Ogre Battle 64 background copy
|
||||
|
|
|
@ -258,6 +258,7 @@
|
|||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_mupenplus|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_mupenplus|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Config.cpp" />
|
||||
<ClCompile Include="CRC.cpp" />
|
||||
<ClCompile Include="DepthBuffer.cpp" />
|
||||
<ClCompile Include="F3DEX2CBFD.cpp" />
|
||||
|
|
|
@ -192,6 +192,9 @@
|
|||
<ClCompile Include="glState.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Config.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="3DMath.h">
|
||||
|
|
|
@ -151,9 +151,7 @@ void writeSettings()
|
|||
settings.setValue("txForce16bpp", config.textureFilter.txForce16bpp);
|
||||
settings.setValue("txCacheCompression", config.textureFilter.txCacheCompression);
|
||||
settings.setValue("txSaveCache", config.textureFilter.txSaveCache);
|
||||
QString txPath = QString::fromWCharArray(config.textureFilter.txPath);
|
||||
if (!txPath.isEmpty())
|
||||
settings.setValue("txPath", txPath);
|
||||
settings.setValue("txPath", QString::fromWCharArray(config.textureFilter.txPath));
|
||||
settings.endGroup();
|
||||
|
||||
settings.beginGroup("font");
|
||||
|
|
Loading…
Reference in New Issue
Block a user