[Scummvm-cvs-logs] SF.net SVN: scummvm: [25561] scummvm/trunk/backends/platform/ds/arm9/source
Tramboi at users.sourceforge.net
Tramboi at users.sourceforge.net
Tue Feb 13 22:04:32 CET 2007
Revision: 25561
http://scummvm.svn.sourceforge.net/scummvm/?rev=25561&view=rev
Author: Tramboi
Date: 2007-02-13 13:04:31 -0800 (Tue, 13 Feb 2007)
Log Message:
-----------
NDS : Added the cpu scaler option in dsoptions (even seem to work dynamically, at least in Maniac Mansion)
Modified Paths:
--------------
scummvm/trunk/backends/platform/ds/arm9/source/dsmain.cpp
scummvm/trunk/backends/platform/ds/arm9/source/dsoptions.cpp
scummvm/trunk/backends/platform/ds/arm9/source/dsoptions.h
Modified: scummvm/trunk/backends/platform/ds/arm9/source/dsmain.cpp
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/dsmain.cpp 2007-02-13 20:58:20 UTC (rev 25560)
+++ scummvm/trunk/backends/platform/ds/arm9/source/dsmain.cpp 2007-02-13 21:04:31 UTC (rev 25561)
@@ -148,7 +148,6 @@
bool consoleEnable = true;
bool gameScreenSwap = false;
-bool cpuScaler = false;
bool isCpuScalerEnabled();
//#define HEAVY_LOGGING
@@ -249,8 +248,9 @@
TransferSound soundControl;
-bool isCpuScalerEnabled() {
- return cpuScaler;
+bool isCpuScalerEnabled()
+{
+ return (ConfMan.hasKey("cpu_scaler", "ds") && ConfMan.getBool("cpu_scaler", "ds"));
}
//plays an 8 bit mono sample at 11025Hz
@@ -651,7 +651,7 @@
BG3_CR = BG_BMP16_512x256;
highBuffer = false;
- BG3_XDX = cpuScaler ? 256 : (int) (1.25f * 256);
+ BG3_XDX = isCpuScalerEnabled() ? 256 : (int) (1.25f * 256);
BG3_XDY = 0;
BG3_YDX = 0;
BG3_YDY = (int) ((200.0f / 192.0f) * 256);
@@ -701,7 +701,7 @@
// highBuffer = !highBuffer;
// BG3_CR = BG_BMP16_512x256 | BG_BMP_RAM(highBuffer? 1: 0);
- if (cpuScaler)
+ if (isCpuScalerEnabled())
{
Rescale_320x256x1555_To_256x256x1555(BG_GFX, back, 512, 512);
}
@@ -750,7 +750,7 @@
}
u16* get8BitBackBuffer() {
- if (cpuScaler)
+ if (isCpuScalerEnabled())
return BG_GFX;
else
return BG_GFX + 0x10000; // 16bit qty!
@@ -1349,7 +1349,7 @@
SUB_BG3_YDX = 0;
SUB_BG3_YDY = y;
} else {
- if (cpuScaler && (x==320))
+ if (isCpuScalerEnabled() && (x==320))
{
BG3_XDX = 256;
BG3_XDY = 0;
Modified: scummvm/trunk/backends/platform/ds/arm9/source/dsoptions.cpp
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/dsoptions.cpp 2007-02-13 20:58:20 UTC (rev 25560)
+++ scummvm/trunk/backends/platform/ds/arm9/source/dsoptions.cpp 2007-02-13 21:04:31 UTC (rev 25561)
@@ -53,6 +53,7 @@
_twoHundredPercentCheckbox = new GUI::CheckboxWidget(this, 20, 70, 230, 20, "Zoomed screen at fixed 200% zoom", 0, 'T');
_highQualityAudioCheckbox = new GUI::CheckboxWidget(this, 20, 85, 250, 20, "High quality audio (slower) (reboot)", 0, 'T');
_disablePowerOff = new GUI::CheckboxWidget(this, 20, 100, 250, 20, "Disable power off on quit", 0, 'T');
+ _cpuScaler = new GUI::CheckboxWidget(this, 20, 115, 250, 20, "CPU scaler", 0, 'T');
new GUI::StaticTextWidget(this, 20, 130, 110, 15, "Touch X Offset", GUI::kTextAlignLeft);
_touchX = new GUI::SliderWidget(this, 130, 130, 130, 12, 1);
@@ -106,6 +107,12 @@
_disablePowerOff->setState(false);
}
+ if (ConfMan.hasKey("cpu_scaler", "ds")) {
+ _cpuScaler->setState(ConfMan.getBool("cpu_scaler", "ds"));
+ } else {
+ _cpuScaler->setState(false);
+ }
+
_indyFightCheckbox->setState(DS::getIndyFightState());
if (ConfMan.hasKey("xoffset", "ds")) {
@@ -128,6 +135,7 @@
ConfMan.setBool("twohundredpercent", _twoHundredPercentCheckbox->getState(), "ds");
ConfMan.setBool("22khzaudio", _highQualityAudioCheckbox->getState(), "ds");
ConfMan.setBool("disablepoweroff", _disablePowerOff->getState(), "ds");
+ ConfMan.setBool("cpu_scaler", _cpuScaler->getState(), "ds");
ConfMan.setInt("xoffset", _touchX->getValue(), "ds");
ConfMan.setInt("yoffset", _touchY->getValue(), "ds");
DS::setOptions();
Modified: scummvm/trunk/backends/platform/ds/arm9/source/dsoptions.h
===================================================================
--- scummvm/trunk/backends/platform/ds/arm9/source/dsoptions.h 2007-02-13 20:58:20 UTC (rev 25560)
+++ scummvm/trunk/backends/platform/ds/arm9/source/dsoptions.h 2007-02-13 21:04:31 UTC (rev 25561)
@@ -51,6 +51,8 @@
GUI::CheckboxWidget* _indyFightCheckbox;
GUI::CheckboxWidget* _highQualityAudioCheckbox;
GUI::CheckboxWidget* _disablePowerOff;
+ GUI::CheckboxWidget* _cpuScaler;
+
#ifdef DS_SCUMM_BUILD
Scumm::SaveLoadChooser* _delDialog;
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list