[Scummvm-cvs-logs] CVS: scummvm/scumm dialogs.cpp,1.85,1.86 dialogs.h,1.30,1.31 saveload.cpp,1.116,1.117 script_v8.cpp,2.202,2.203 scummvm.cpp,2.475,2.476 sound.cpp,1.269,1.270 sound.h,1.52,1.53
Max Horn
fingolfin at users.sourceforge.net
Mon Nov 10 16:41:35 CET 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/common config-manager.cpp,1.13,1.14 config-manager.h,1.8,1.9
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sword2/driver _mouse.cpp,1.26,1.27 d_draw.cpp,1.43,1.44 d_draw.h,1.14,1.15 d_sound.cpp,1.80,1.81 driver96.h,1.57,1.58 keyboard.cpp,1.12,1.13 menu.cpp,1.20,1.21 palette.cpp,1.23,1.24 rdwin.cpp,1.36,1.37 render.cpp,1.40,1.41 sprite.cpp,1.31,1.32
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv28851
Modified Files:
dialogs.cpp dialogs.h saveload.cpp script_v8.cpp scummvm.cpp
sound.cpp sound.h
Log Message:
made Scumm::OptionsDialog subclass GUI::OptionsDialog (code reuse); replaced Sound::_sound_volume_master and friends by ConfMan.get() calls; some whitespace cleanup
Index: dialogs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/dialogs.cpp,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -d -r1.85 -r1.86
--- dialogs.cpp 10 Nov 2003 23:40:48 -0000 1.85
+++ dialogs.cpp 11 Nov 2003 00:40:35 -0000 1.86
@@ -47,6 +47,8 @@
extern void load_key_mapping();
#endif
+using namespace GUI;
+
namespace Scumm {
struct ResString {
@@ -389,11 +391,7 @@
#pragma mark -
enum {
- kMasterVolumeChanged = 'mavc',
- kMusicVolumeChanged = 'muvc',
- kSfxVolumeChanged = 'sfvc',
- kOKCmd = 'ok ',
- kCancelCmd = 'cncl'
+ kOKCmd = 'ok '
};
enum {
@@ -402,46 +400,29 @@
#ifndef _WIN32_WCE
OptionsDialog::OptionsDialog(ScummEngine *scumm)
- : ScummDialog(scumm, 40, 30, 240, 124) {
+ : GUI::OptionsDialog("", 40, 30, 240, 124), _scumm(scumm) {
#else
OptionsDialog::OptionsDialog(ScummEngine *scumm)
- : ScummDialog(scumm, 40, 30, 240, 124 + kButtonHeight + 4) {
+ : GUI::OptionsDialog("", 40, 30, 240, 124 + kButtonHeight + 4), _scumm(scumm) {
#endif
//
// Add the buttons
//
#ifdef _WIN32_WCE
- addButton(_w - kButtonWidth - 8, _h - 24 - kButtonHeight - 4, "OK", kOKCmd, 'O');
- addButton(_w - 2 * kButtonWidth - 12, _h - 24 - kButtonHeight - 4, "Cancel", kCancelCmd, 'C');
+ addButton(_w - kButtonWidth - 8, _h - 24 - kButtonHeight - 4, "OK", GUI::OptionsDialog::kOKCmd, 'O');
+ addButton(_w - 2 * kButtonWidth - 12, _h - 24 - kButtonHeight - 4, "Cancel", kCloseCmd, 'C');
addButton(kButtonWidth+12, _h - 24, "Keys", kKeysCmd, 'K');
#else
- addButton(_w - kButtonWidth-8, _h - 24, "OK", kOKCmd, 'O');
- addButton(_w - 2 * kButtonWidth-12, _h - 24, "Cancel", kCancelCmd, 'C');
+ addButton(_w - kButtonWidth-8, _h - 24, "OK", GUI::OptionsDialog::kOKCmd, 'O');
+ addButton(_w - 2 * kButtonWidth-12, _h - 24, "Cancel", kCloseCmd, 'C');
#endif
//
// Sound controllers
//
int yoffset = 8;
-
- _masterVolumeSlider = new SliderWidget(this, 5, yoffset, 185, 12, "Master volume: ", 100, kMasterVolumeChanged);
- _masterVolumeLabel = new StaticTextWidget(this, 200, yoffset + 2, 24, 16, "100%", kTextAlignLeft);
- _masterVolumeSlider->setMinValue(0); _masterVolumeSlider->setMaxValue(255);
- _masterVolumeLabel->setFlags(WIDGET_CLEARBG);
- yoffset += 16;
-
- _musicVolumeSlider = new SliderWidget(this, 5, yoffset, 185, 12, "Music volume: ", 100, kMusicVolumeChanged);
- _musicVolumeLabel = new StaticTextWidget(this, 200, yoffset+2, 24, 16, "100%", kTextAlignLeft);
- _musicVolumeSlider->setMinValue(0); _musicVolumeSlider->setMaxValue(255);
- _musicVolumeLabel->setFlags(WIDGET_CLEARBG);
- yoffset += 16;
-
- _sfxVolumeSlider = new SliderWidget(this, 5, yoffset, 185, 12, "SFX volume: ", 100, kSfxVolumeChanged);
- _sfxVolumeLabel = new StaticTextWidget(this, 200, yoffset + 2, 24, 16, "100%", kTextAlignLeft);
- _sfxVolumeSlider->setMinValue(0); _sfxVolumeSlider->setMaxValue(255);
- _sfxVolumeLabel->setFlags(WIDGET_CLEARBG);
- yoffset += 16;
+ yoffset = addVolumeControls(this, yoffset);
//
// Some misc options
@@ -463,25 +444,41 @@
}
void OptionsDialog::open() {
- ScummDialog::open();
+ GUI::OptionsDialog::open();
- // display current sound settings
- _soundVolumeMaster = _scumm->_sound->_sound_volume_master;
- _soundVolumeMusic = _scumm->_sound->_sound_volume_music;
- _soundVolumeSfx = _scumm->_sound->_sound_volume_sfx;
+ // update checkboxes, too
+ subtitlesCheckbox->setState(_scumm->_noSubtitles == false);
+}
- _masterVolumeSlider->setValue(_soundVolumeMaster);
- _musicVolumeSlider->setValue(_soundVolumeMusic);
- _sfxVolumeSlider->setValue(_soundVolumeSfx);
+void OptionsDialog::close() {
+
+ if (getResult()) {
+ // Subtitles
+ ConfMan.set("nosubtitles", !subtitlesCheckbox->getState(), _domain);
+ }
+ GUI::OptionsDialog::close();
- _masterVolumeLabel->setValue(_soundVolumeMaster);
- _musicVolumeLabel->setValue(_soundVolumeMusic);
- _sfxVolumeLabel->setValue(_soundVolumeSfx);
- // update checkboxes, too
- subtitlesCheckbox->setState(_scumm->_noSubtitles == false);
+ // Sync the engine with the config manager
+ int soundVolumeMaster = ConfMan.getInt("master_volume");
+ int soundVolumeMusic = ConfMan.getInt("music_volume");
+ int soundVolumeSfx = ConfMan.getInt("sfx_volume");
+
+ if (_scumm->_imuse) {
+ _scumm->_imuse->set_music_volume(soundVolumeMusic);
+ }
+ if (_scumm->_musicEngine) {
+ _scumm->_musicEngine->setMasterVolume(soundVolumeMaster);
+ }
+
+ _scumm->_mixer->setVolume(soundVolumeSfx * soundVolumeMaster / 255);
+ _scumm->_mixer->setMusicVolume(soundVolumeMusic);
+
+ // Subtitles?
+ _scumm->_noSubtitles = ConfMan.getBool("nosubtitles");
}
+
void OptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
switch (cmd) {
case kKeysCmd:
@@ -489,53 +486,8 @@
_keysDialog->runModal();
#endif
break;
- case kMasterVolumeChanged:
- _soundVolumeMaster = _masterVolumeSlider->getValue();
- _masterVolumeLabel->setValue(_soundVolumeMaster);
- _masterVolumeLabel->draw();
- break;
- case kMusicVolumeChanged:
- _soundVolumeMusic = _musicVolumeSlider->getValue();
- _musicVolumeLabel->setValue(_soundVolumeMusic);
- _musicVolumeLabel->draw();
- break;
- case kSfxVolumeChanged:
- _soundVolumeSfx = _sfxVolumeSlider->getValue();
- _sfxVolumeLabel->setValue(_soundVolumeSfx);
- _sfxVolumeLabel->draw();
- break;
- case kOKCmd: {
- // Update the sound settings
- _scumm->_sound->_sound_volume_master = _soundVolumeMaster; // Master
- _scumm->_sound->_sound_volume_music = _soundVolumeMusic; // Music
- _scumm->_sound->_sound_volume_sfx = _soundVolumeSfx; // SFX
-
- if (_scumm->_imuse) {
- _scumm->_imuse->set_music_volume(_soundVolumeMusic);
- }
- if (_scumm->_musicEngine) {
- _scumm->_musicEngine->setMasterVolume(_soundVolumeMaster);
- }
-
- _scumm->_mixer->setVolume(_soundVolumeSfx * _soundVolumeMaster / 255);
- _scumm->_mixer->setMusicVolume(_soundVolumeMusic);
-
- ConfMan.set("master_volume", _soundVolumeMaster);
- ConfMan.set("music_volume", _soundVolumeMusic);
- ConfMan.set("sfx_volume", _soundVolumeSfx);
-
- // Subtitles?
- _scumm->_noSubtitles = !subtitlesCheckbox->getState();
- ConfMan.set("nosubtitles", _scumm->_noSubtitles);
-
- // Finally flush the modified config
- ConfMan.flushToDisk();
- }
- case kCancelCmd:
- close();
- break;
default:
- ScummDialog::handleCommand(sender, cmd, data);
+ GUI::OptionsDialog::handleCommand(sender, cmd, data);
}
}
@@ -671,7 +623,7 @@
: ScummDialog(scumm, 30, 20, 260, 160) {
addButton(160, 20, "Map", kMapCmd, 'M'); // Map
addButton(160, 40, "OK", kOKCmd, 'O'); // OK
- addButton(160, 60, "Cancel", kCancelCmd, 'C'); // Cancel
+ addButton(160, 60, "Cancel", kCloseCmd, 'C'); // Cancel
_actionsList = new ListWidget(this, 10, 20, 140, 90);
_actionsList->setNumberingMode(kListNumberingZero);
@@ -727,7 +679,7 @@
save_key_mapping();
close();
break;
- case kCancelCmd:
+ case kCloseCmd:
load_key_mapping();
close();
break;
Index: dialogs.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/dialogs.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- dialogs.h 10 Nov 2003 23:40:48 -0000 1.30
+++ dialogs.h 11 Nov 2003 00:40:35 -0000 1.31
@@ -24,6 +24,7 @@
#include "common/str.h"
#include "gui/about.h"
#include "gui/dialog.h"
+#include "gui/options.h"
#include "gui/widget.h"
#ifndef DISABLE_HELP
@@ -33,17 +34,16 @@
namespace GUI {
class ListWidget;
}
-using namespace GUI; // FIXME: Bad style to use a using directive in a header
namespace Scumm {
class ScummEngine;
-class ScummDialog : public Dialog {
+class ScummDialog : public GUI::Dialog {
public:
ScummDialog(ScummEngine *scumm, int x, int y, int w, int h)
- : Dialog(x, y, w, h), _scumm(scumm) {}
+ : GUI::Dialog(x, y, w, h), _scumm(scumm) {}
protected:
typedef Common::String String;
@@ -58,14 +58,14 @@
public:
MainMenuDialog(ScummEngine *scumm);
~MainMenuDialog();
- virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
+ virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
virtual void open();
virtual void close();
protected:
- Dialog *_aboutDialog;
+ GUI::Dialog *_aboutDialog;
#ifndef DISABLE_HELP
- Dialog *_helpDialog;
+ GUI::Dialog *_helpDialog;
#endif
void save();
@@ -77,17 +77,17 @@
class HelpDialog : public ScummDialog {
public:
HelpDialog(ScummEngine *scumm);
- virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
+ virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
protected:
typedef Common::String String;
- ButtonWidget *_nextButton;
- ButtonWidget *_prevButton;
+ GUI::ButtonWidget *_nextButton;
+ GUI::ButtonWidget *_prevButton;
- StaticTextWidget *_title;
- StaticTextWidget *_key[HELP_NUM_LINES];
- StaticTextWidget *_dsc[HELP_NUM_LINES];
+ GUI::StaticTextWidget *_title;
+ GUI::StaticTextWidget *_key[HELP_NUM_LINES];
+ GUI::StaticTextWidget *_dsc[HELP_NUM_LINES];
int _page;
int _numPages;
@@ -97,10 +97,11 @@
#endif
-class OptionsDialog : public ScummDialog {
+class OptionsDialog : public GUI::OptionsDialog {
protected:
+ ScummEngine *_scumm;
#ifdef _WIN32_WCE
- Dialog *_keysDialog;
+ GUI::Dialog *_keysDialog;
#endif
public:
@@ -108,23 +109,11 @@
~OptionsDialog();
virtual void open();
- virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
+ virtual void close();
+ virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
protected:
-
- int _soundVolumeMaster;
- int _soundVolumeMusic;
- int _soundVolumeSfx;
-
- SliderWidget *_masterVolumeSlider;
- SliderWidget *_musicVolumeSlider;
- SliderWidget *_sfxVolumeSlider;
-
- StaticTextWidget *_masterVolumeLabel;
- StaticTextWidget *_musicVolumeLabel;
- StaticTextWidget *_sfxVolumeLabel;
-
- CheckboxWidget *subtitlesCheckbox;
+ GUI::CheckboxWidget *subtitlesCheckbox;
};
class InfoDialog : public ScummDialog {
@@ -170,14 +159,14 @@
public:
KeysDialog(ScummEngine *scumm);
- virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
+ virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
virtual void handleKeyDown(uint16 ascii, int keycode, int modifiers);
protected:
- ListWidget *_actionsList;
- StaticTextWidget *_actionTitle;
- StaticTextWidget *_keyMapping;
+ GUI::ListWidget *_actionsList;
+ GUI::StaticTextWidget *_actionTitle;
+ GUI::StaticTextWidget *_keyMapping;
int _actionSelected;
};
Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -d -r1.116 -r1.117
--- saveload.cpp 5 Nov 2003 11:37:04 -0000 1.116
+++ saveload.cpp 11 Nov 2003 00:40:35 -0000 1.117
@@ -677,8 +677,8 @@
if (_imuse && (_saveSound || !_saveLoadCompatible)) {
_imuse->save_or_load(s, this);
- _imuse->setMasterVolume(_sound->_sound_volume_master);
- _imuse->set_music_volume(_sound->_sound_volume_music);
+ _imuse->setMasterVolume(ConfMan.getInt("master_volume"));
+ _imuse->set_music_volume(ConfMan.getInt("music_volume"));
}
}
Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.202
retrieving revision 2.203
diff -u -d -r2.202 -r2.203
--- script_v8.cpp 10 Nov 2003 08:00:55 -0000 2.202
+++ script_v8.cpp 11 Nov 2003 00:40:35 -0000 2.203
@@ -20,6 +20,7 @@
*/
#include "stdafx.h"
+#include "common/config-manager.h"
#include "scumm/actor.h"
#include "scumm/akos.h"
#include "scumm/charset.h"
@@ -1472,13 +1473,13 @@
}
break;
case 0xDD: // getMasterSFXVol
- push(_sound->_sound_volume_sfx / 2);
+ push(ConfMan.getInt("sfx_volume") / 2);
break;
case 0xDE: // getMasterVoiceVol
- push(_sound->_sound_volume_sfx / 2);
+ push(ConfMan.getInt("sfx_volume") / 2);
break;
case 0xDF: // getMasterMusicVol
- push(_sound->_sound_volume_music / 2);
+ push(ConfMan.getInt("music_volume") / 2);
break;
case 0xE0: // readRegistryValue
{
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.475
retrieving revision 2.476
diff -u -d -r2.475 -r2.476
--- scummvm.cpp 10 Nov 2003 19:17:52 -0000 2.475
+++ scummvm.cpp 11 Nov 2003 00:40:35 -0000 2.476
@@ -654,9 +654,6 @@
_debugger = new ScummDebugger(this);
_sound = new Sound(this);
- _sound->_sound_volume_master = ConfMan.getInt("master_volume");
- _sound->_sound_volume_sfx = ConfMan.getInt("sfx_volume");
- _sound->_sound_volume_music = ConfMan.getInt("music_volume");
#ifndef __GP32__ //ph0x FIXME, "quick dirty hack"
/* Bind the mixer to the system => mixer will be invoked
@@ -673,8 +670,8 @@
_silentDigitalImuse = true;
_noDigitalSamples = true;
}
- _mixer->setVolume(_sound->_sound_volume_sfx * _sound->_sound_volume_master / 255);
- _mixer->setMusicVolume(_sound->_sound_volume_music);
+ _mixer->setVolume(ConfMan.getInt("sfx_volume") * ConfMan.getInt("master_volume") / 255);
+ _mixer->setMusicVolume(ConfMan.getInt("music_volume"));
// Init iMuse
if (_features & GF_DIGI_IMUSE) {
@@ -705,7 +702,7 @@
}
if (_features & GF_FMTOWNS)
_imuse->property(IMuse::PROP_DIRECT_PASSTHROUGH, 1);
- _imuse->set_music_volume(_sound->_sound_volume_music);
+ _imuse->set_music_volume(ConfMan.getInt("music_volume"));
}
}
#endif // ph0x-hack
@@ -1363,7 +1360,7 @@
#endif
sprintf(buf, "Successfully saved game state in file:\n\n%s", filename);
- TimedMessageDialog dialog(buf, 1500);
+ GUI::TimedMessageDialog dialog(buf, 1500);
runDialog(dialog);
}
if (success && _saveLoadFlag != 1)
@@ -1613,7 +1610,7 @@
break;
case OSystem::EVENT_QUIT:
- if(_confirmExit)
+ if (_confirmExit)
confirmexitDialog();
else
_quit = true;
@@ -1811,18 +1808,18 @@
stopTalk();
return;
} else if (_lastKeyHit == '[') { // [ Music volume down
- int vol = _sound->_sound_volume_music;
+ int vol = ConfMan.getInt("music_volume");
if (!(vol & 0xF) && vol)
vol -= 16;
vol = vol & 0xF0;
- _sound->_sound_volume_music = vol;
+ ConfMan.set("music_volume", vol);
if (_imuse)
_imuse->set_music_volume (vol);
} else if (_lastKeyHit == ']') { // ] Music volume up
- int vol = _sound->_sound_volume_music;
+ int vol = ConfMan.getInt("music_volume");
vol = (vol + 16) & 0xFF0;
if (vol > 255) vol = 255;
- _sound->_sound_volume_music = vol;
+ ConfMan.set("music_volume", vol);
if (_imuse)
_imuse->set_music_volume (vol);
} else if (_lastKeyHit == '-') { // - text speed down
@@ -2493,7 +2490,7 @@
vsprintf(buf, message, va);
va_end(va);
- MessageDialog dialog(buf, "OK", "Cancel");
+ GUI::MessageDialog dialog(buf, "OK", "Cancel");
return runDialog(dialog);
}
@@ -2503,70 +2500,74 @@
int SJIStoFMTChunk(int f, int s) //convert sjis code to fmt font offset
{
- enum {KANA = 0, KANJI = 1, EKANJI = 2};
+ enum {
+ KANA = 0,
+ KANJI = 1,
+ EKANJI = 2
+ };
int base = s - (s % 32) - 1;
int c = 0, p = 0, chunk_f = 0, chunk = 0, cr, kanjiType = KANA;
- if(f >= 0x81 && f <= 0x84) kanjiType = KANA;
- if(f >= 0x88 && f <= 0x9f) kanjiType = KANJI;
- if(f >= 0xe0 && f <= 0xea) kanjiType = EKANJI;
+ if (f >= 0x81 && f <= 0x84) kanjiType = KANA;
+ if (f >= 0x88 && f <= 0x9f) kanjiType = KANJI;
+ if (f >= 0xe0 && f <= 0xea) kanjiType = EKANJI;
- if((f > 0xe8 || (f == 0xe8 && base >= 0x9f)) || (f > 0x90 || (f == 0x90 && base >= 0x9f))) {
+ if ((f > 0xe8 || (f == 0xe8 && base >= 0x9f)) || (f > 0x90 || (f == 0x90 && base >= 0x9f))) {
c = 48; //correction
p = -8; //correction
}
- if(kanjiType == KANA) {//Kana
+ if (kanjiType == KANA) {//Kana
chunk_f = (f - 0x81) * 2;
- } else if(kanjiType == KANJI) {//Standard Kanji
+ } else if (kanjiType == KANJI) {//Standard Kanji
p += f - 0x88;
chunk_f = c + 2 * p;
- } else if(kanjiType == EKANJI) {//Enhanced Kanji
+ } else if (kanjiType == EKANJI) {//Enhanced Kanji
p += f - 0xe0;
chunk_f = c + 2 * p;
}
- if(base == 0x7f && s == 0x7f)
+ if (base == 0x7f && s == 0x7f)
base -= 0x20; //correction
- if((base == 0x7f && s == 0x9e) || (base == 0x9f && s == 0xbe) || (base == 0xbf && s == 0xde))
+ if ((base == 0x7f && s == 0x9e) || (base == 0x9f && s == 0xbe) || (base == 0xbf && s == 0xde))
base += 0x20; //correction
switch(base) {
case 0x3f:
cr = 0; //3f
- if(kanjiType == KANA) chunk = 1;
- else if(kanjiType == KANJI) chunk = 31;
- else if(kanjiType == EKANJI) chunk = 111;
+ if (kanjiType == KANA) chunk = 1;
+ else if (kanjiType == KANJI) chunk = 31;
+ else if (kanjiType == EKANJI) chunk = 111;
break;
case 0x5f:
cr = 0; //5f
- if(kanjiType == KANA) chunk = 17;
- else if(kanjiType == KANJI) chunk = 47;
- else if(kanjiType == EKANJI) chunk = 127;
+ if (kanjiType == KANA) chunk = 17;
+ else if (kanjiType == KANJI) chunk = 47;
+ else if (kanjiType == EKANJI) chunk = 127;
break;
case 0x7f:
cr = -1; //80
- if(kanjiType == KANA) chunk = 9;
- else if(kanjiType == KANJI) chunk = 63;
- else if(kanjiType == EKANJI) chunk = 143;
+ if (kanjiType == KANA) chunk = 9;
+ else if (kanjiType == KANJI) chunk = 63;
+ else if (kanjiType == EKANJI) chunk = 143;
break;
case 0x9f:
cr = 1; //9e
- if(kanjiType == KANA) chunk = 2;
- else if(kanjiType == KANJI) chunk = 32;
- else if(kanjiType == EKANJI) chunk = 112;
+ if (kanjiType == KANA) chunk = 2;
+ else if (kanjiType == KANJI) chunk = 32;
+ else if (kanjiType == EKANJI) chunk = 112;
break;
case 0xbf:
cr = 1; //be
- if(kanjiType == KANA) chunk = 18;
- else if(kanjiType == KANJI) chunk = 48;
- else if(kanjiType == EKANJI) chunk = 128;
+ if (kanjiType == KANA) chunk = 18;
+ else if (kanjiType == KANJI) chunk = 48;
+ else if (kanjiType == EKANJI) chunk = 128;
break;
case 0xdf:
cr = 1; //de
- if(kanjiType == KANA) chunk = 10;
- else if(kanjiType == KANJI) chunk = 64;
- else if(kanjiType == EKANJI) chunk = 144;
+ if (kanjiType == KANA) chunk = 10;
+ else if (kanjiType == KANJI) chunk = 64;
+ else if (kanjiType == EKANJI) chunk = 144;
break;
default:
return 0;
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.269
retrieving revision 1.270
diff -u -d -r1.269 -r1.270
--- sound.cpp 8 Nov 2003 21:59:32 -0000 1.269
+++ sound.cpp 11 Nov 2003 00:40:35 -0000 1.270
@@ -791,11 +791,11 @@
if (_scumm->_imuse) {
_scumm->_imuse->setBase(_scumm->res.address[rtSound]);
- _scumm->_imuse->setMasterVolume(_sound_volume_master);
- _scumm->_imuse->set_music_volume(_sound_volume_music);
+ _scumm->_imuse->setMasterVolume(ConfMan.getInt("master_volume"));
+ _scumm->_imuse->set_music_volume(ConfMan.getInt("music_volume"));
}
- _scumm->_mixer->setVolume(_sound_volume_sfx * _sound_volume_master / 255);
- _scumm->_mixer->setMusicVolume(_sound_volume_music);
+ _scumm->_mixer->setVolume(ConfMan.getInt("sfx_volume") * ConfMan.getInt("master_volume") / 255);
+ _scumm->_mixer->setMusicVolume(ConfMan.getInt("music_volume"));
delete _sfxFile;
_sfxFile = openSfxFile();
}
Index: sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.h,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- sound.h 17 Oct 2003 17:05:19 -0000 1.52
+++ sound.h 11 Nov 2003 00:40:35 -0000 1.53
@@ -101,10 +101,6 @@
bool _soundsPaused;
byte _sfxMode;
- // FIXME: Should add API to get/set volumes (and automatically
- // update iMuse/iMuseDigi/Player_v2/SoundMIxer, too
- int16 _sound_volume_master, _sound_volume_music, _sound_volume_sfx;
-
Bundle *_bundle; // FIXME: should be protected but is used by ScummEngine::askForDisk
public:
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/common config-manager.cpp,1.13,1.14 config-manager.h,1.8,1.9
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sword2/driver _mouse.cpp,1.26,1.27 d_draw.cpp,1.43,1.44 d_draw.h,1.14,1.15 d_sound.cpp,1.80,1.81 driver96.h,1.57,1.58 keyboard.cpp,1.12,1.13 menu.cpp,1.20,1.21 palette.cpp,1.23,1.24 rdwin.cpp,1.36,1.37 render.cpp,1.40,1.41 sprite.cpp,1.31,1.32
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list