aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/he
diff options
context:
space:
mode:
authorMax Horn2006-02-20 16:51:30 +0000
committerMax Horn2006-02-20 16:51:30 +0000
commite389bcf497391cf4cde7d7b7a6f4023877205735 (patch)
treeb8314b1ad8bc19117c37df4d4ce27d9cce92a442 /engines/scumm/he
parenta6e5f6fd2cdb574e09fb3bd120b1e8efa034f0cb (diff)
downloadscummvm-rg350-e389bcf497391cf4cde7d7b7a6f4023877205735.tar.gz
scummvm-rg350-e389bcf497391cf4cde7d7b7a6f4023877205735.tar.bz2
scummvm-rg350-e389bcf497391cf4cde7d7b7a6f4023877205735.zip
Replaced _gameId, _version, _heversion, _features, _midi, _platform with a simple ScummGameSettings instance: _game
svn-id: r20795
Diffstat (limited to 'engines/scumm/he')
-rw-r--r--engines/scumm/he/palette_he.cpp2
-rw-r--r--engines/scumm/he/resource_he.cpp2
-rw-r--r--engines/scumm/he/script_v60he.cpp16
-rw-r--r--engines/scumm/he/script_v70he.cpp6
-rw-r--r--engines/scumm/he/script_v72he.cpp10
-rw-r--r--engines/scumm/he/script_v90he.cpp8
-rw-r--r--engines/scumm/he/sound_he.cpp8
-rw-r--r--engines/scumm/he/wiz_he.cpp14
8 files changed, 33 insertions, 33 deletions
diff --git a/engines/scumm/he/palette_he.cpp b/engines/scumm/he/palette_he.cpp
index 85df92cdb7..efe0f15017 100644
--- a/engines/scumm/he/palette_he.cpp
+++ b/engines/scumm/he/palette_he.cpp
@@ -35,7 +35,7 @@ void ScummEngine_v70he::remapHEPalette(const uint8 *src, uint8 *dst) {
uint8 *palPtr;
src += 30;
- if (_heversion >= 99) {
+ if (_game.heversion >= 99) {
palPtr = _hePalettes + 1024 + 30;
} else {
palPtr = _currentPalette + 30;
diff --git a/engines/scumm/he/resource_he.cpp b/engines/scumm/he/resource_he.cpp
index 7970068e99..8568449e6f 100644
--- a/engines/scumm/he/resource_he.cpp
+++ b/engines/scumm/he/resource_he.cpp
@@ -1722,7 +1722,7 @@ void ScummEngine_v90he::readMAXS(int blockSize) {
_numNewNames = 10;
_objectRoomTable = (byte *)calloc(_numGlobalObjects, 1);
- if (_features & GF_HE_985)
+ if (_game.features & GF_HE_985)
_numGlobalScripts = 2048;
else
_numGlobalScripts = 200;
diff --git a/engines/scumm/he/script_v60he.cpp b/engines/scumm/he/script_v60he.cpp
index 9d7de59450..1868d6b71e 100644
--- a/engines/scumm/he/script_v60he.cpp
+++ b/engines/scumm/he/script_v60he.cpp
@@ -406,7 +406,7 @@ void ScummEngine_v60he::o60_setState() {
if (state & 0x8000) {
state &= 0x7FFF;
putState(obj, state);
- if (_heversion >= 72)
+ if (_game.heversion >= 72)
removeObjectFromDrawQue(obj);
} else {
putState(obj, state);
@@ -440,7 +440,7 @@ void ScummEngine_v60he::o60_roomOps() {
case 174: // SO_ROOM_SCREEN
b = pop();
a = pop();
- if (_heversion >= 71)
+ if (_game.heversion >= 71)
initScreens(a, _screenHeight);
else
initScreens(a, b);
@@ -477,7 +477,7 @@ void ScummEngine_v60he::o60_roomOps() {
case 181: // SO_ROOM_FADE
a = pop();
- if (_heversion >= 70) {
+ if (_game.heversion >= 70) {
// Defaults to 1 but doesn't use fade effects
} else if (a) {
_switchRoomEffect = (byte)(a & 0xFF);
@@ -502,7 +502,7 @@ void ScummEngine_v60he::o60_roomOps() {
c = pop();
b = pop();
a = pop();
- if (_heversion == 60)
+ if (_game.heversion == 60)
setupShadowPalette(a, b, c, d, e, 0, 256);
break;
@@ -594,7 +594,7 @@ void ScummEngine_v60he::o60_actorOps() {
switch (subOp) {
case 30:
- // _heversion >= 70
+ // _game.heversion >= 70
_actorClipOverride.bottom = pop();
_actorClipOverride.right = pop();
_actorClipOverride.top = pop();
@@ -1051,7 +1051,7 @@ void ScummEngine_v60he::o60_readFile() {
int val;
// Fatty Bear uses positive values
- if ((_platform == Common::kPlatformPC) && (_gameId == GID_FBEAR))
+ if ((_game.platform == Common::kPlatformPC) && (_game.id == GID_FBEAR))
size = -size;
if (size == -2) {
@@ -1079,7 +1079,7 @@ void ScummEngine_v60he::o60_writeFile() {
int slot = pop();
// Fatty Bear uses positive values
- if ((_platform == Common::kPlatformPC) && (_gameId == GID_FBEAR))
+ if ((_game.platform == Common::kPlatformPC) && (_game.id == GID_FBEAR))
size = -size;
if (size == -2) {
@@ -1114,7 +1114,7 @@ void ScummEngine_v60he::o60_soundOps() {
}
void ScummEngine_v60he::localizeArray(int slot, byte scriptSlot) {
- if (_heversion >= 80)
+ if (_game.heversion >= 80)
slot &= ~0x33539000;
if (slot >= _numArray)
diff --git a/engines/scumm/he/script_v70he.cpp b/engines/scumm/he/script_v70he.cpp
index bd70845f67..3e71073f69 100644
--- a/engines/scumm/he/script_v70he.cpp
+++ b/engines/scumm/he/script_v70he.cpp
@@ -488,7 +488,7 @@ void ScummEngine_v70he::o70_pickupObject() {
addObjectToInventory(obj, room);
putOwner(obj, VAR(VAR_EGO));
- if (_heversion <= 70) {
+ if (_game.heversion <= 70) {
putClass(obj, kObjectClassUntouchable, 1);
putState(obj, 1);
markObjectRectAsDirty(obj);
@@ -563,7 +563,7 @@ void ScummEngine_v70he::o70_resourceRoutines() {
break;
case 111: // SO_LOCK_ROOM
resid = pop();
- if (_heversion <= 71 && resid > 0x7F)
+ if (_game.heversion <= 71 && resid > 0x7F)
resid = _resourceMapper[resid & 0x7F];
res.lock(rtRoom, resid);
res.lock(rtRoomImage, resid);
@@ -584,7 +584,7 @@ void ScummEngine_v70he::o70_resourceRoutines() {
break;
case 115: // SO_UNLOCK_ROOM
resid = pop();
- if (_heversion <= 71 && resid > 0x7F)
+ if (_game.heversion <= 71 && resid > 0x7F)
resid = _resourceMapper[resid & 0x7F];
res.unlock(rtRoom, resid);
res.unlock(rtRoomImage, resid);
diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp
index 605d490738..4c56703fa1 100644
--- a/engines/scumm/he/script_v72he.cpp
+++ b/engines/scumm/he/script_v72he.cpp
@@ -406,12 +406,12 @@ ScummEngine_v72he::ArrayHeader *ScummEngine_v72he::defineArray(int array, int ty
size = arrayDataSizes[type];
- if (_heversion >= 80)
+ if (_game.heversion >= 80)
id |= 0x33539000;
writeVar(array, id);
- if (_heversion >= 80)
+ if (_game.heversion >= 80)
id &= ~0x33539000;
size *= dim2end - dim2start + 1;
@@ -1749,10 +1749,10 @@ void ScummEngine_v72he::o72_openFile() {
debug(1,"Original filename %s", filename);
// There are Macintosh specific versions of HE7.2 games.
- if (_heversion >= 80 && _platform == Common::kPlatformMacintosh) {
+ if (_game.heversion >= 80 && _game.platform == Common::kPlatformMacintosh) {
// Work around for filename difference in HE7 file, needs to
// open 'Water (7)' instead of 'Water Worries (7)'.
- if (_gameId == GID_WATER && _heversion == 99 && !strcmp((char *)filename, "Water.he7")) {
+ if (_game.id == GID_WATER && _game.heversion == 99 && !strcmp((char *)filename, "Water.he7")) {
strcpy((char *)filename, "Water (7)");
} else {
char buf1[128];
@@ -2216,7 +2216,7 @@ void ScummEngine_v72he::o72_getResourceSize() {
int size, type;
int resid = pop();
- if (_heversion == 72) {
+ if (_game.heversion == 72) {
push(getSoundResourceSize(resid));
return;
}
diff --git a/engines/scumm/he/script_v90he.cpp b/engines/scumm/he/script_v90he.cpp
index a4fbd65053..2f6d0569c2 100644
--- a/engines/scumm/he/script_v90he.cpp
+++ b/engines/scumm/he/script_v90he.cpp
@@ -981,14 +981,14 @@ void ScummEngine_v90he::o90_getSpriteInfo() {
push(0);
break;
case 15:
- if (_heversion == 99) {
+ if (_game.heversion == 99) {
flags = getStackList(args, ARRAYSIZE(args));
type = pop();
groupId = pop();
y = pop();
x = pop();
push(_sprite->findSpriteWithClassOf(x, y, groupId, type, flags, args));
- } else if (_heversion == 98) {
+ } else if (_game.heversion == 98) {
type = pop();
groupId = pop();
y = pop();
@@ -1231,7 +1231,7 @@ void ScummEngine_v90he::o90_setSpriteInfo() {
_sprite->setSpriteAngle(spriteId, args[0]);
break;
case 23:
- if (_features & GF_HE_985 || _heversion >= 99) {
+ if (_game.features & GF_HE_985 || _game.heversion >= 99) {
_curMaxSpriteId = pop();
_curSpriteId = pop();
@@ -1876,7 +1876,7 @@ void ScummEngine_v90he::o90_getPolygonOverlap() {
if (dist >= 2) {
dist = (int)sqrt((double)(dist + 1));
}
- if (_heversion >= 98) {
+ if (_game.heversion >= 98) {
push((dist <= args1[2]) ? 1 : 0);
} else {
push((dist > args1[2]) ? 1 : 0);
diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp
index 5ed135cd8a..d687844d9d 100644
--- a/engines/scumm/he/sound_he.cpp
+++ b/engines/scumm/he/sound_he.cpp
@@ -114,7 +114,7 @@ int Sound::getSoundPos(int sound) {
}
int Sound::getSoundVar(int sound, int var) {
- if (_vm->_heversion >= 90 && var == 26) {
+ if (_vm->_game.heversion >= 90 && var == 26) {
return isSoundCodeUsed(sound);
}
@@ -171,7 +171,7 @@ void Sound::setupHEMusicFile() {
_heMusicTracks = musicFile.readUint32LE();
debug(5, "Total music tracks %d", _heMusicTracks);
- int musicStart = (_vm->_heversion >= 80) ? 56 : 20;
+ int musicStart = (_vm->_game.heversion >= 80) ? 56 : 20;
musicFile.seek(musicStart, SEEK_SET);
_heMusic = (HEMusic *)malloc((_heMusicTracks + 1) * sizeof(HEMusic));
@@ -180,7 +180,7 @@ void Sound::setupHEMusicFile() {
_heMusic[i].offset = musicFile.readUint32LE();
_heMusic[i].size = musicFile.readUint32LE();
- if (_vm->_heversion >= 80) {
+ if (_vm->_game.heversion >= 80) {
musicFile.seek(+9, SEEK_CUR);
} else {
musicFile.seek(+13, SEEK_CUR);
@@ -373,7 +373,7 @@ void Sound::playHESound(int soundID, int heOffset, int heChannel, int heFlags) {
musicFile.read(spoolPtr, size);
musicFile.close();
- if (_vm->_heversion == 70) {
+ if (_vm->_game.heversion == 70) {
_vm->_mixer->playRaw(&_heSoundChannels[heChannel], spoolPtr, size, 11025, flags, soundID);
return;
}
diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp
index f8de332dcf..aa35412587 100644
--- a/engines/scumm/he/wiz_he.cpp
+++ b/engines/scumm/he/wiz_he.cpp
@@ -121,7 +121,7 @@ void Wiz::polygonTransform(int resNum, int state, int po_x, int po_y, int angle,
getWizImageDim(resNum, state, w, h);
// set the transformation origin to the center of the image
- if (_vm->_heversion >= 99) {
+ if (_vm->_game.heversion >= 99) {
pts[0].x = pts[3].x = -(w / 2);
pts[1].x = pts[2].x = w / 2 - 1;
pts[0].y = pts[1].y = -(h / 2);
@@ -887,7 +887,7 @@ void Wiz::captureWizImage(int resNum, const Common::Rect& r, bool backBuffer, in
if (rCapt.intersects(r)) {
rCapt.clip(r);
const uint8 *palPtr;
- if (_vm->_heversion >= 99) {
+ if (_vm->_game.heversion >= 99) {
palPtr = _vm->_hePalettes + 1024;
} else {
palPtr = _vm->_currentPalette;
@@ -985,7 +985,7 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int x1, int y1, int zorder, int
uint8 *dst = NULL;
const uint8 *palPtr = NULL;
- if (_vm->_heversion >= 99) {
+ if (_vm->_game.heversion >= 99) {
if (palette) {
palPtr = _vm->_hePalettes + palette * 1024 + 768;
} else {
@@ -1024,7 +1024,7 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int x1, int y1, int zorder, int
if (flags & kWIFRemapPalette) {
rmap = _vm->findWrappedBlock(MKID('RMAP'), dataPtr, state, 0);
assert(rmap);
- if (_vm->_heversion <= 80 || READ_BE_UINT32(rmap) != 0x01234567) {
+ if (_vm->_game.heversion <= 80 || READ_BE_UINT32(rmap) != 0x01234567) {
uint8 *rgbs = _vm->findWrappedBlock(MKID('RGBS'), dataPtr, state, 0);
assert(rgbs);
_vm->remapHEPalette(rgbs, rmap + 4);
@@ -1533,7 +1533,7 @@ void Wiz::createWizEmptyImage(const WizParameters *params) {
res_size += 8 + img_w * img_h;
const uint8 *palPtr;
- if (_vm->_heversion >= 99) {
+ if (_vm->_game.heversion >= 99) {
palPtr = _vm->_hePalettes + 1024;
} else {
palPtr = _vm->_currentPalette;
@@ -1996,7 +1996,7 @@ int Wiz::isWizPixelNonTransparent(int resNum, int state, int x, int y, int flags
}
switch (c) {
case 0:
- if (_vm->_heversion >= 99) {
+ if (_vm->_game.heversion >= 99) {
ret = getRawWizPixelColor(wizd, x, y, w, h, _vm->VAR(_vm->VAR_WIZ_TCOLOR)) != _vm->VAR(_vm->VAR_WIZ_TCOLOR) ? 1 : 0;
} else {
ret = 0;
@@ -2030,7 +2030,7 @@ uint8 Wiz::getWizPixelColor(int resNum, int state, int x, int y, int flags) {
assert(wizd);
switch (c) {
case 0:
- if (_vm->_heversion >= 99) {
+ if (_vm->_game.heversion >= 99) {
color = getRawWizPixelColor(wizd, x, y, w, h, _vm->VAR(_vm->VAR_WIZ_TCOLOR));
} else {
color = _vm->VAR(_vm->VAR_WIZ_TCOLOR);