[Scummvm-cvs-logs] SF.net SVN: scummvm:[52340] scummvm/trunk/engines/kyra
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Tue Aug 24 15:41:25 CEST 2010
Revision: 52340
http://scummvm.svn.sourceforge.net/scummvm/?rev=52340&view=rev
Author: lordhoto
Date: 2010-08-24 13:41:24 +0000 (Tue, 24 Aug 2010)
Log Message:
-----------
KYRA: Cleanup.
Modified Paths:
--------------
scummvm/trunk/engines/kyra/debugger.cpp
scummvm/trunk/engines/kyra/gui.cpp
scummvm/trunk/engines/kyra/screen.cpp
scummvm/trunk/engines/kyra/screen_v2.cpp
scummvm/trunk/engines/kyra/script_tim.cpp
scummvm/trunk/engines/kyra/sound_adlib.cpp
scummvm/trunk/engines/kyra/sound_midi.cpp
Modified: scummvm/trunk/engines/kyra/debugger.cpp
===================================================================
--- scummvm/trunk/engines/kyra/debugger.cpp 2010-08-24 13:37:24 UTC (rev 52339)
+++ scummvm/trunk/engines/kyra/debugger.cpp 2010-08-24 13:41:24 UTC (rev 52340)
@@ -76,7 +76,7 @@
return true;
}
- if (_vm->gameFlags().gameID != GI_KYRA1 && _vm->resource()->getFileSize(argv[1]) != 768) {
+ if (_vm->game() != GI_KYRA1 && _vm->resource()->getFileSize(argv[1]) != 768) {
uint8 buffer[320*200];
_vm->screen()->copyRegionToBuffer(5, 0, 0, 320, 200, buffer);
_vm->screen()->loadBitmap(argv[1], 5, 5, 0);
Modified: scummvm/trunk/engines/kyra/gui.cpp
===================================================================
--- scummvm/trunk/engines/kyra/gui.cpp 2010-08-24 13:37:24 UTC (rev 52339)
+++ scummvm/trunk/engines/kyra/gui.cpp 2010-08-24 13:41:24 UTC (rev 52340)
@@ -92,7 +92,7 @@
textY = menu.y + menu.titleY;
- if (_vm->gameFlags().gameID == GI_LOL) {
+ if (_vm->game() == GI_LOL) {
printMenuText(getMenuTitle(menu), textX, textY, menu.textColor, 0, 9);
} else {
if (_vm->gameFlags().platform != Common::kPlatformAmiga)
@@ -136,7 +136,7 @@
textX = getMenuCenterStringX(getMenuItemTitle(menu.item[i]), x1, x2);
textY = y1 + 2;
- if (_vm->gameFlags().gameID == GI_LOL) {
+ if (_vm->game() == GI_LOL) {
textY++;
if (i == menu.highlightedItem)
printMenuText(getMenuItemTitle(menu.item[i]), textX, textY, menu.item[i].highlightColor, 0, 8);
@@ -162,7 +162,7 @@
for (int i = 0; i < menu.numberOfItems; ++i) {
if (getMenuItemLabel(menu.item[i])) {
- if (_vm->gameFlags().gameID == GI_LOL) {
+ if (_vm->game() == GI_LOL) {
menu.item[i].labelX = menu.item[i].x - 1;
menu.item[i].labelY = menu.item[i].y + 3;
printMenuText(getMenuItemLabel(menu.item[i]), menu.x + menu.item[i].labelX, menu.y + menu.item[i].labelY, menu.item[i].textColor, 0, 10);
@@ -206,7 +206,7 @@
int mouseX = p.x;
int mouseY = p.y;
- if (_vm->_flags.gameID == GI_LOL && menu.highlightedItem != 255) {
+ if (_vm->game() == GI_LOL && menu.highlightedItem != 255) {
// LoL doesnt't have default highlighted items.
// We use a highlightedItem value of 255 for this.
@@ -230,8 +230,8 @@
if (mouseX > x1 && mouseX < x2 &&
mouseY > y1 && mouseY < y2) {
- if (menu.highlightedItem != i || _vm->_flags.gameID == GI_LOL) {
- if (_vm->_flags.gameID != GI_LOL) {
+ if (menu.highlightedItem != i || _vm->game() == GI_LOL) {
+ if (_vm->game() != GI_LOL) {
if (menu.item[menu.highlightedItem].enabled)
redrawText(menu);
}
@@ -260,7 +260,7 @@
textX = getMenuCenterStringX(getMenuItemTitle(menu.item[i]), x1, x2);
int textY = y1 + 2;
- if (_vm->gameFlags().gameID == GI_LOL) {
+ if (_vm->game() == GI_LOL) {
textY++;
printMenuText(getMenuItemTitle(menu.item[i]), textX, textY, menu.item[i].textColor, 0, 8);
} else {
@@ -290,7 +290,7 @@
int textY = y1 + 2;
- if (_vm->gameFlags().gameID == GI_LOL) {
+ if (_vm->game() == GI_LOL) {
textY++;
printMenuText(getMenuItemTitle(menu.item[i]), textX, textY, menu.item[i].highlightColor, 0, 8);
} else {
@@ -399,7 +399,7 @@
int GUI::getNextSavegameSlot() {
Common::InSaveFile *in;
- int start = _vm->gameFlags().gameID == GI_LOL ? 0 : 1;
+ int start = _vm->game() == GI_LOL ? 0 : 1;
for (int i = start; i < 990; i++) {
if ((in = _vm->_saveFileMan->openForLoading(_vm->getSavegameFilename(i))))
Modified: scummvm/trunk/engines/kyra/screen.cpp
===================================================================
--- scummvm/trunk/engines/kyra/screen.cpp 2010-08-24 13:37:24 UTC (rev 52339)
+++ scummvm/trunk/engines/kyra/screen.cpp 2010-08-24 13:41:24 UTC (rev 52340)
@@ -40,7 +40,7 @@
Screen::Screen(KyraEngine_v1 *vm, OSystem *system)
: _system(system), _vm(vm), _sjisInvisibleColor(0),
- _cursorColorKey((vm->gameFlags().gameID == GI_KYRA1) ? 0xFF : 0x00) {
+ _cursorColorKey((vm->game() == GI_KYRA1) ? 0xFF : 0x00) {
_debugEnabled = false;
_maskMinY = _maskMaxY = -1;
@@ -86,7 +86,7 @@
if (_vm->gameFlags().useHiResOverlay) {
_useOverlays = true;
_useSJIS = (_vm->gameFlags().lang == Common::JA_JPN);
- _sjisInvisibleColor = (_vm->gameFlags().gameID == GI_KYRA1) ? 0x80 : 0xF6;
+ _sjisInvisibleColor = (_vm->game() == GI_KYRA1) ? 0x80 : 0xF6;
for (int i = 0; i < SCREEN_OVLS_NUM; ++i) {
if (!_sjisOverlayPtrs[i]) {
@@ -1300,7 +1300,7 @@
_dsScaleH = 0x100;
}
- if ((flags & 0x2000) && _vm->gameFlags().gameID != GI_KYRA1)
+ if ((flags & 0x2000) && _vm->game() != GI_KYRA1)
_dsTable5 = va_arg(args, uint8 *);
static const DsMarginSkipFunc dsMarginFunc[] = {
@@ -1436,7 +1436,7 @@
uint16 frameSize = READ_LE_UINT16(src); src += 2;
- int colorTableColors = ((_vm->gameFlags().gameID != GI_KYRA1) && (shapeFlags & 4)) ? *src++ : 16;
+ int colorTableColors = ((_vm->game() != GI_KYRA1) && (shapeFlags & 4)) ? *src++ : 16;
if (!(flags & 0x8000) && (shapeFlags & 1))
_dsTable2 = src;
@@ -3016,10 +3016,10 @@
else if (page == 2 || page == 3)
return _sjisOverlayPtrs[2];
- if (_vm->gameFlags().gameID == GI_KYRA2) {
+ if (_vm->game() == GI_KYRA2) {
if (page == 12 || page == 13)
return _sjisOverlayPtrs[3];
- } else if (_vm->gameFlags().gameID == GI_LOL) {
+ } else if (_vm->game() == GI_LOL) {
if (page == 4 || page == 5)
return _sjisOverlayPtrs[3];
if (page == 6 || page == 7)
Modified: scummvm/trunk/engines/kyra/screen_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/screen_v2.cpp 2010-08-24 13:37:24 UTC (rev 52339)
+++ scummvm/trunk/engines/kyra/screen_v2.cpp 2010-08-24 13:41:24 UTC (rev 52340)
@@ -53,7 +53,7 @@
int maxIndex = maxColor;
if (maxIndex == -1) {
- if (_vm->gameFlags().gameID == GI_LOL) {
+ if (_vm->game() == GI_LOL) {
if (_use16ColorMode)
maxIndex = 255;
else
Modified: scummvm/trunk/engines/kyra/script_tim.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script_tim.cpp 2010-08-24 13:37:24 UTC (rev 52339)
+++ scummvm/trunk/engines/kyra/script_tim.cpp 2010-08-24 13:41:24 UTC (rev 52340)
@@ -95,7 +95,7 @@
_textDisplayed = false;
_textAreaBuffer = new uint8[320*40];
assert(_textAreaBuffer);
- if ((_vm->gameFlags().platform == Common::kPlatformPC98 || _vm->gameFlags().isDemo) && _vm->gameFlags().gameID == GI_LOL)
+ if ((_vm->gameFlags().platform == Common::kPlatformPC98 || _vm->gameFlags().isDemo) && _vm->game() == GI_LOL)
_drawPage2 = 0;
else
_drawPage2 = 8;
@@ -176,7 +176,7 @@
Common::strlcpy(_tim->filename, filename, 13);
- _tim->isLoLOutro = (_vm->gameFlags().gameID == GI_LOL) && !scumm_stricmp(filename, "LOLFINAL.TIM");
+ _tim->isLoLOutro = (_vm->game() == GI_LOL) && !scumm_stricmp(filename, "LOLFINAL.TIM");
_tim->lolCharacter = 0;
TIM *r = _tim;
@@ -467,7 +467,7 @@
int TIMInterpreter::initAnimStruct(int index, const char *filename, int x, int y, int, int offscreenBuffer, uint16 wsaFlags) {
Movie *wsa = 0;
- const bool isLoLDemo = _vm->gameFlags().isDemo && _vm->gameFlags().gameID == GI_LOL;
+ const bool isLoLDemo = _vm->gameFlags().isDemo && _vm->game() == GI_LOL;
if (isLoLDemo || _vm->gameFlags().platform == Common::kPlatformPC98 || _currentTim->isLoLOutro)
_drawPage2 = 0;
@@ -755,7 +755,7 @@
const char *file = (const char *)(_currentTim->text + READ_LE_UINT16(_currentTim->text + (param[0]<<1)));
_vm->sound()->loadSoundFile(file);
- if (_vm->gameFlags().gameID == GI_LOL)
+ if (_vm->game() == GI_LOL)
_vm->sound()->loadSfxFile(file);
return 1;
Modified: scummvm/trunk/engines/kyra/sound_adlib.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound_adlib.cpp 2010-08-24 13:37:24 UTC (rev 52339)
+++ scummvm/trunk/engines/kyra/sound_adlib.cpp 2010-08-24 13:41:24 UTC (rev 52340)
@@ -2241,7 +2241,7 @@
SoundAdLibPC::SoundAdLibPC(KyraEngine_v1 *vm, Audio::Mixer *mixer)
: Sound(vm, mixer), _driver(0), _trackEntries(), _soundDataPtr(0) {
memset(_trackEntries, 0, sizeof(_trackEntries));
- _v2 = (_vm->gameFlags().gameID == GI_KYRA2) || (_vm->gameFlags().gameID == GI_LOL && !_vm->gameFlags().isDemo);
+ _v2 = (_vm->game() == GI_KYRA2) || (_vm->game() == GI_LOL && !_vm->gameFlags().isDemo);
_driver = new AdLibDriver(mixer, _v2);
assert(_driver);
Modified: scummvm/trunk/engines/kyra/sound_midi.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound_midi.cpp 2010-08-24 13:37:24 UTC (rev 52339)
+++ scummvm/trunk/engines/kyra/sound_midi.cpp 2010-08-24 13:41:24 UTC (rev 52340)
@@ -519,12 +519,12 @@
if (_nativeMT32 && _type == kMidiMT32) {
const char *midiFile = 0;
const char *pakFile = 0;
- if (_vm->gameFlags().gameID == GI_KYRA1) {
+ if (_vm->game() == GI_KYRA1) {
midiFile = "INTRO";
- } else if (_vm->gameFlags().gameID == GI_KYRA2) {
+ } else if (_vm->game() == GI_KYRA2) {
midiFile = "HOF_SYX";
pakFile = "AUDIO.PAK";
- } else if (_vm->gameFlags().gameID == GI_LOL) {
+ } else if (_vm->game() == GI_LOL) {
midiFile = "LOREINTR";
if (_vm->gameFlags().isDemo) {
@@ -618,7 +618,7 @@
// Since KYRA1 uses the same file for SFX and Music
// we setup sfx to play from music file as well
- if (_vm->gameFlags().gameID == GI_KYRA1) {
+ if (_vm->game() == GI_KYRA1) {
for (int i = 0; i < 3; ++i) {
_output->setSoundSource(i+1);
_sfx[i]->loadMusic(_musicFile, fileSize);
@@ -631,7 +631,7 @@
Common::StackLock lock(_mutex);
// Kyrandia 1 doesn't use a special sfx file
- if (_vm->gameFlags().gameID == GI_KYRA1)
+ if (_vm->game() == GI_KYRA1)
return;
file = getFileName(file);
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