aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorathrxx2011-12-12 16:23:01 +0100
committerJohannes Schickel2011-12-26 16:18:16 +0100
commit0aa32385230dbe1ab62bb2d02d04ca5cc46d928c (patch)
tree35be56542ceac10e0cb3707a502c7437fefde665 /engines
parent4e4f4164be57d66610eac570e048c9ade07f42ea (diff)
downloadscummvm-rg350-0aa32385230dbe1ab62bb2d02d04ca5cc46d928c.tar.gz
scummvm-rg350-0aa32385230dbe1ab62bb2d02d04ca5cc46d928c.tar.bz2
scummvm-rg350-0aa32385230dbe1ab62bb2d02d04ca5cc46d928c.zip
KYRA: (EOB/LOL) - rename some vars
(all cases of Eob to EoB, all cases of Lol to LoL, all cases of LolEobCommon to RpgCommon)
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/chargen.cpp60
-rw-r--r--engines/kyra/darkmoon.cpp14
-rw-r--r--engines/kyra/darkmoon.h16
-rw-r--r--engines/kyra/debugger.cpp2
-rw-r--r--engines/kyra/debugger.h8
-rw-r--r--engines/kyra/detection.cpp2
-rw-r--r--engines/kyra/eob.cpp44
-rw-r--r--engines/kyra/eob.h8
-rw-r--r--engines/kyra/eobcommon.cpp248
-rw-r--r--engines/kyra/eobcommon.h140
-rw-r--r--engines/kyra/gui_eob.cpp224
-rw-r--r--engines/kyra/gui_eob.h18
-rw-r--r--engines/kyra/items_eob.cpp86
-rw-r--r--engines/kyra/kyra_hof.cpp2
-rw-r--r--engines/kyra/kyra_hof.h24
-rw-r--r--engines/kyra/kyra_rpg.cpp2
-rw-r--r--engines/kyra/kyra_rpg.h2
-rw-r--r--engines/kyra/lol.cpp26
-rw-r--r--engines/kyra/lol.h48
-rw-r--r--engines/kyra/magic_eob.cpp256
-rw-r--r--engines/kyra/resource.h954
-rw-r--r--engines/kyra/saveload_eob.cpp56
-rw-r--r--engines/kyra/saveload_lol.cpp16
-rw-r--r--engines/kyra/saveload_rpg.cpp12
-rw-r--r--engines/kyra/scene_eob.cpp60
-rw-r--r--engines/kyra/scene_lol.cpp6
-rw-r--r--engines/kyra/screen_eob.cpp72
-rw-r--r--engines/kyra/screen_eob.h10
-rw-r--r--engines/kyra/script_eob.cpp110
-rw-r--r--engines/kyra/script_eob.h12
-rw-r--r--engines/kyra/script_lol.cpp16
-rw-r--r--engines/kyra/sequences_darkmoon.cpp14
-rw-r--r--engines/kyra/sequences_eob.cpp38
-rw-r--r--engines/kyra/sequences_lol.cpp6
-rw-r--r--engines/kyra/sound_adlib.cpp4
-rw-r--r--engines/kyra/sprites_eob.cpp128
-rw-r--r--engines/kyra/sprites_lol.cpp38
-rw-r--r--engines/kyra/staticres.cpp42
-rw-r--r--engines/kyra/staticres_eob.cpp704
-rw-r--r--engines/kyra/staticres_lol.cpp152
-rw-r--r--engines/kyra/staticres_rpg.cpp28
-rw-r--r--engines/kyra/text_rpg.cpp16
-rw-r--r--engines/kyra/timer_eob.cpp42
43 files changed, 1883 insertions, 1883 deletions
diff --git a/engines/kyra/chargen.cpp b/engines/kyra/chargen.cpp
index b190e111c7..2990c6eca6 100644
--- a/engines/kyra/chargen.cpp
+++ b/engines/kyra/chargen.cpp
@@ -30,10 +30,10 @@ namespace Kyra {
class CharacterGenerator {
public:
- CharacterGenerator(EobCoreEngine *vm, Screen_Eob *screen);
+ CharacterGenerator(EoBCoreEngine *vm, Screen_EoB *screen);
~CharacterGenerator();
- bool start(EobCharacter *characters, uint8 ***faceShapes);
+ bool start(EoBCharacter *characters, uint8 ***faceShapes);
private:
void init();
@@ -89,9 +89,9 @@ private:
const uint8 *_chargenRaceMinStats;
const uint16 *_chargenRaceMaxStats;
- static const EobChargenButtonDef _chargenButtonDefs[];
+ static const EoBChargenButtonDef _chargenButtonDefs[];
static const CreatePartyModButton _chargenModButtons[];
- static const EobRect8 _chargenButtonBodyCoords[];
+ static const EoBRect8 _chargenButtonBodyCoords[];
static const int16 _chargenBoxX[];
static const int16 _chargenBoxY[];
static const int16 _chargenNameFieldX[];
@@ -102,14 +102,14 @@ private:
static const int16 _raceModifiers[];
- EobCharacter *_characters;
+ EoBCharacter *_characters;
uint8 **_faceShapes;
- EobCoreEngine *_vm;
- Screen_Eob *_screen;
+ EoBCoreEngine *_vm;
+ Screen_EoB *_screen;
};
-CharacterGenerator::CharacterGenerator(EobCoreEngine *vm, Screen_Eob *screen) : _vm(vm), _screen(screen),
+CharacterGenerator::CharacterGenerator(EoBCoreEngine *vm, Screen_EoB *screen) : _vm(vm), _screen(screen),
_characters(0), _faceShapes(0), _chargenMagicShapes(0), _chargenButtonLabels(0), _chargenMagicShapeTimer(0),
_updateBoxShapesIndex(0), _lastUpdateBoxShapesIndex(0), _magicShapesBox(6), _activeBox(0) {
@@ -124,13 +124,13 @@ CharacterGenerator::CharacterGenerator(EobCoreEngine *vm, Screen_Eob *screen) :
memset(_chargenMaxStats, 0, sizeof(_chargenMaxStats));
int temp;
- _chargenStrings1 = _vm->staticres()->loadStrings(kEobBaseChargenStrings1, temp);
- _chargenStrings2 = _vm->staticres()->loadStrings(kEobBaseChargenStrings2, temp);
- _chargenStartLevels = _vm->staticres()->loadRawData(kEobBaseChargenStartLevels, temp);
- _chargenEnterGameStrings = _vm->staticres()->loadStrings(kEobBaseChargenEnterGameStrings, temp);
- _chargenClassMinStats = _vm->staticres()->loadRawData(kEobBaseChargenClassMinStats, temp);
- _chargenRaceMinStats = _vm->staticres()->loadRawData(kEobBaseChargenRaceMinStats, temp);
- _chargenRaceMaxStats = _vm->staticres()->loadRawDataBe16(kEobBaseChargenRaceMaxStats, temp);
+ _chargenStrings1 = _vm->staticres()->loadStrings(kEoBBaseChargenStrings1, temp);
+ _chargenStrings2 = _vm->staticres()->loadStrings(kEoBBaseChargenStrings2, temp);
+ _chargenStartLevels = _vm->staticres()->loadRawData(kEoBBaseChargenStartLevels, temp);
+ _chargenEnterGameStrings = _vm->staticres()->loadStrings(kEoBBaseChargenEnterGameStrings, temp);
+ _chargenClassMinStats = _vm->staticres()->loadRawData(kEoBBaseChargenClassMinStats, temp);
+ _chargenRaceMinStats = _vm->staticres()->loadRawData(kEoBBaseChargenRaceMinStats, temp);
+ _chargenRaceMaxStats = _vm->staticres()->loadRawDataBe16(kEoBBaseChargenRaceMaxStats, temp);
}
CharacterGenerator::~CharacterGenerator() {
@@ -147,7 +147,7 @@ CharacterGenerator::~CharacterGenerator() {
}
}
-bool CharacterGenerator::start(EobCharacter *characters, uint8 ***faceShapes) {
+bool CharacterGenerator::start(EoBCharacter *characters, uint8 ***faceShapes) {
if (!characters && !faceShapes)
return true;
@@ -244,7 +244,7 @@ void CharacterGenerator::init() {
_faceShapes[i] = _screen->encodeShape((i % 10) << 2, (i / 10) << 5, 4, 32, true);
_screen->_curPage = 0;
- _screen->loadEobBitmap("CHARGEN", 0, 3, 3, 0);
+ _screen->loadEoBBitmap("CHARGEN", 0, 3, 3, 0);
_screen->loadShapeSetBitmap("CHARGENB", 3, 3);
if (_chargenMagicShapes) {
for (int i = 0; i < 10; i++)
@@ -272,7 +272,7 @@ void CharacterGenerator::initButtonsFromList(int first, int numButtons) {
_vm->gui_resetButtonList();
for (int i = 0; i < numButtons; i++) {
- const EobChargenButtonDef *e = &_chargenButtonDefs[first + i];
+ const EoBChargenButtonDef *e = &_chargenButtonDefs[first + i];
initButton(i, e->x, e->y, e->w, e->h, e->keyCode);
}
@@ -343,7 +343,7 @@ void CharacterGenerator::toggleSpecialButton(int index, int bodyCustom, int page
return;
const CreatePartyModButton *c = &_chargenModButtons[index];
- const EobRect8 *p = &_chargenButtonBodyCoords[c->bodyIndex + bodyCustom];
+ const EoBRect8 *p = &_chargenButtonBodyCoords[c->bodyIndex + bodyCustom];
int x2 = 20;
int y2 = 0;
@@ -627,7 +627,7 @@ void CharacterGenerator::updateMagicShapes() {
}
void CharacterGenerator::generateStats(int index) {
- EobCharacter *c = &_characters[index];
+ EoBCharacter *c = &_characters[index];
for (int i = 0; i < 3; i++) {
c->level[i] = _chargenStartLevels[(c->cClass << 2) + i];
@@ -674,7 +674,7 @@ void CharacterGenerator::modifyMenu() {
_vm->removeInputTop();
printStats(_activeBox, 3);
- EobCharacter *c = &_characters[_activeBox];
+ EoBCharacter *c = &_characters[_activeBox];
int8 hpLO = c->hitPointsCur;
for (int i = 0; i >= 0 && i < 7; ) {
@@ -874,7 +874,7 @@ void CharacterGenerator::printStats(int index, int mode) {
_screen->copyRegion(0, 0, 160, 0, 160, 128, 2, 2, Screen::CR_NO_P_CHECK);
_screen->_curPage = 2;
- EobCharacter *c = &_characters[index];
+ EoBCharacter *c = &_characters[index];
if (mode != 4)
_screen->drawShape(2, c->faceShape, 224, 2, 0);
@@ -973,7 +973,7 @@ int CharacterGenerator::modifyStat(int index, int8 *stat1, int8 *stat2) {
_screen->printShadedText(statStr.c_str(), b->x + 32, b->y, 6, 0);
_screen->updateScreen();
- EobCharacter *c = &_characters[_activeBox];
+ EoBCharacter *c = &_characters[_activeBox];
int ci = index;
uint8 v2 = s2 ? *s2 : 0;
@@ -1145,7 +1145,7 @@ void CharacterGenerator::finish() {
_characters[0].inventory[2] = _vm->duplicateItem(35);
for (int i = 0; i < 4; i++) {
- EobCharacter *c = &_characters[i];
+ EoBCharacter *c = &_characters[i];
c->flags = 1;
c->food = 100;
c->id = i;
@@ -1193,7 +1193,7 @@ void CharacterGenerator::finish() {
static const int8 *itemList[] = { itemList0, itemList1, itemList2, itemList3 };
for (int i = 0; i < 4; i++) {
- EobCharacter *c = &_characters[i];
+ EoBCharacter *c = &_characters[i];
c->flags = 1;
c->food = 100;
c->id = i;
@@ -1283,7 +1283,7 @@ void CharacterGenerator::finish() {
}
for (int i = 0; i < 4; i++) {
- EobCharacter *c = &_characters[i];
+ EoBCharacter *c = &_characters[i];
c->strengthMax = c->strengthCur;
c->strengthExtMax = c->strengthExtCur;
c->intelligenceMax = c->intelligenceCur;
@@ -1325,7 +1325,7 @@ void CharacterGenerator::finish() {
}
}
-const EobChargenButtonDef CharacterGenerator::_chargenButtonDefs[] = {
+const EoBChargenButtonDef CharacterGenerator::_chargenButtonDefs[] = {
{ 0x01, 0x37, 0x31, 0x32, 0x70 },
{ 0x09, 0x37, 0x31, 0x32, 0x71 },
{ 0x01, 0x77, 0x31, 0x32, 0x72 },
@@ -1389,7 +1389,7 @@ const CreatePartyModButton CharacterGenerator::_chargenModButtons[] = {
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x1C, 0xAC }
};
-const EobRect8 CharacterGenerator::_chargenButtonBodyCoords[] = {
+const EoBRect8 CharacterGenerator::_chargenButtonBodyCoords[] = {
{ 0x00, 0x80, 0x04, 0x20 },
{ 0x04, 0x80, 0x04, 0x20 },
{ 0x08, 0x80, 0x04, 0x20 },
@@ -1426,11 +1426,11 @@ const int16 CharacterGenerator::_raceModifiers[] = {
0, 0, 0, 0, 1, -1, 0, 1, -1, 0, 0, 0, -1, 0, 0, 1, 0, 0
};
-bool EobCoreEngine::startCharacterGeneration() {
+bool EoBCoreEngine::startCharacterGeneration() {
return CharacterGenerator(this, _screen).start(_characters, &_faceShapes);
}
-bool EobCoreEngine::transferParty() {
+bool EoBCoreEngine::transferParty() {
return false;
}
diff --git a/engines/kyra/darkmoon.cpp b/engines/kyra/darkmoon.cpp
index e44040b0d5..304e5c9537 100644
--- a/engines/kyra/darkmoon.cpp
+++ b/engines/kyra/darkmoon.cpp
@@ -28,7 +28,7 @@
namespace Kyra {
-DarkMoonEngine::DarkMoonEngine(OSystem *system, const GameFlags &flags) : EobCoreEngine(system, flags) {
+DarkMoonEngine::DarkMoonEngine(OSystem *system, const GameFlags &flags) : EoBCoreEngine(system, flags) {
_seqIntro = _seqFinale = 0;
_shapesIntro = _shapesFinale = 0;
_dscDoorType5Offs = 0;
@@ -50,13 +50,13 @@ DarkMoonEngine::~DarkMoonEngine() {
}
Common::Error DarkMoonEngine::init() {
- Common::Error err = EobCoreEngine::init();
+ Common::Error err = EoBCoreEngine::init();
if (err.getCode() != Common::kNoError)
return err;
initStaticResource();
- _monsterProps = new EobMonsterProperty[10];
+ _monsterProps = new EoBMonsterProperty[10];
static const uint16 wX[] = { 221, 76 };
static const uint8 wY[] = { 189, 162 };
@@ -93,7 +93,7 @@ void DarkMoonEngine::startupNew() {
_currentBlock = 171;
_currentDirection = 2;
setHandItem(0);
- EobCoreEngine::startupNew();
+ EoBCoreEngine::startupNew();
}
void DarkMoonEngine::drawNpcScene(int npcIndex) {
@@ -149,7 +149,7 @@ void DarkMoonEngine::runNpcDialogue(int npcIndex) {
}
void DarkMoonEngine::updateUsedCharacterHandItem(int charIndex, int slot) {
- EobItem *itm = &_items[_characters[charIndex].inventory[slot]];
+ EoBItem *itm = &_items[_characters[charIndex].inventory[slot]];
if (itm->type == 48 || itm->type == 62) {
if (itm->value == 5)
return;
@@ -278,7 +278,7 @@ void DarkMoonEngine::replaceMonster(int unit, uint16 block, int pos, int dir, in
initMonster(index, unit, block, pos, dir, type, shpIndex, mode, h2, randItem, fixedItem);
}
-bool DarkMoonEngine::killMonsterExtra(EobMonsterInPlay *m) {
+bool DarkMoonEngine::killMonsterExtra(EoBMonsterInPlay *m) {
if (_currentLevel == 16 && _currentSub == 1 && (_monsterProps[m->type].capsFlags & 4)) {
if (m->type) {
_playFinale = true;
@@ -464,7 +464,7 @@ int DarkMoonEngine::charSelectDialogue() {
}
void DarkMoonEngine::characterLevelGain(int charIndex) {
- EobCharacter *c = &_characters[charIndex];
+ EoBCharacter *c = &_characters[charIndex];
int s = _numLevelsPerClass[c->cClass];
for (int i = 0; i < s; i++) {
uint32 er = getRequiredExperience(c->cClass, i, c->level[i] + 1);
diff --git a/engines/kyra/darkmoon.h b/engines/kyra/darkmoon.h
index 35eb90a9dc..590b2f4ea1 100644
--- a/engines/kyra/darkmoon.h
+++ b/engines/kyra/darkmoon.h
@@ -31,7 +31,7 @@ namespace Kyra {
class DarkmoonSequenceHelper;
-struct EobSequenceStep {
+struct EoBSequenceStep {
uint8 command;
uint8 obj;
int16 x1;
@@ -44,8 +44,8 @@ struct EobSequenceStep {
uint8 h;
};
-class DarkMoonEngine : public EobCoreEngine {
-friend class GUI_Eob;
+class DarkMoonEngine : public EoBCoreEngine {
+friend class GUI_EoB;
friend class DarkmoonSequenceHelper;
public:
DarkMoonEngine(OSystem *system, const GameFlags &flags);
@@ -74,14 +74,14 @@ private:
const char * const *_introStrings;
const char * const *_cpsFilesIntro;
- const EobSequenceStep **_seqIntro;
- const EobShapeDef **_shapesIntro;
+ const EoBSequenceStep **_seqIntro;
+ const EoBShapeDef **_shapesIntro;
const char * const *_finaleStrings;
const uint8 *_creditsData;
const char * const *_cpsFilesFinale;
- const EobSequenceStep **_seqFinale;
- const EobShapeDef **_shapesFinale;
+ const EoBSequenceStep **_seqFinale;
+ const EoBShapeDef **_shapesFinale;
static const char *_palFilesIntro[];
static const char *_palFilesFinale[];
@@ -108,7 +108,7 @@ private:
void generateMonsterPalettes(const char *file, int16 monsterIndex);
void loadMonsterDecoration(const char *file, int16 monsterIndex);
void replaceMonster(int unit, uint16 block, int d, int dir, int type, int shpIndex, int mode, int h2, int randItem, int fixedItem);
- bool killMonsterExtra(EobMonsterInPlay *m);
+ bool killMonsterExtra(EoBMonsterInPlay *m);
// Level
const uint8 *loadDoorShapes(const char *filename, int doorIndex, const uint8 *shapeDefs);
diff --git a/engines/kyra/debugger.cpp b/engines/kyra/debugger.cpp
index 6a4b88c77a..96003d9e99 100644
--- a/engines/kyra/debugger.cpp
+++ b/engines/kyra/debugger.cpp
@@ -472,7 +472,7 @@ Debugger_LoL::Debugger_LoL(LoLEngine *vm) : Debugger(vm), _vm(vm) {
#endif // ENABLE_LOL
#ifdef ENABLE_EOB
-Debugger_Eob::Debugger_Eob(EobCoreEngine *vm) : Debugger(vm), _vm(vm) {
+Debugger_EoB::Debugger_EoB(EoBCoreEngine *vm) : Debugger(vm), _vm(vm) {
}
#endif // ENABLE_EOB
diff --git a/engines/kyra/debugger.h b/engines/kyra/debugger.h
index 1bd8363612..77f1a9a550 100644
--- a/engines/kyra/debugger.h
+++ b/engines/kyra/debugger.h
@@ -109,14 +109,14 @@ protected:
#endif // ENABLE_LOL
#ifdef ENABLE_EOB
-class EobCoreEngine;
+class EoBCoreEngine;
-class Debugger_Eob : public Debugger {
+class Debugger_EoB : public Debugger {
public:
- Debugger_Eob(EobCoreEngine *vm);
+ Debugger_EoB(EoBCoreEngine *vm);
protected:
- EobCoreEngine *_vm;
+ EoBCoreEngine *_vm;
};
#endif // ENABLE_EOB
diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp
index e021a3a4c2..56ad42773c 100644
--- a/engines/kyra/detection.cpp
+++ b/engines/kyra/detection.cpp
@@ -134,7 +134,7 @@ bool KyraMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGame
#endif // ENABLE_LOL
#ifdef ENABLE_EOB
case Kyra::GI_EOB1:
- *engine = new Kyra::EobEngine(syst, flags);
+ *engine = new Kyra::EoBEngine(syst, flags);
break;
case Kyra::GI_EOB2:
*engine = new Kyra::DarkMoonEngine(syst, flags);
diff --git a/engines/kyra/eob.cpp b/engines/kyra/eob.cpp
index d90a3caa74..0010a51779 100644
--- a/engines/kyra/eob.cpp
+++ b/engines/kyra/eob.cpp
@@ -28,7 +28,7 @@
namespace Kyra {
-EobEngine::EobEngine(OSystem *system, const GameFlags &flags) : EobCoreEngine(system, flags) {
+EoBEngine::EoBEngine(OSystem *system, const GameFlags &flags) : EoBCoreEngine(system, flags) {
_numSpells = 53;
_menuChoiceInit = 4;
@@ -42,12 +42,12 @@ EobEngine::EobEngine(OSystem *system, const GameFlags &flags) : EobCoreEngine(sy
_dscDoorCoordsExt = 0;
}
-EobEngine::~EobEngine() {
+EoBEngine::~EoBEngine() {
delete[] _itemsOverlay;
}
-Common::Error EobEngine::init() {
- Common::Error err = EobCoreEngine::init();
+Common::Error EoBEngine::init() {
+ Common::Error err = EoBCoreEngine::init();
if (err.getCode() != Common::kNoError)
return err;
@@ -90,21 +90,21 @@ Common::Error EobEngine::init() {
return Common::kNoError;
}
-void EobEngine::startupNew() {
+void EoBEngine::startupNew() {
_currentLevel = 1;
_currentSub = 0;
loadLevel(1, 0);
_currentBlock = 490;
_currentDirection = 0;
setHandItem(0);
- EobCoreEngine::startupNew();
+ EoBCoreEngine::startupNew();
}
-void EobEngine::startupLoad() {
+void EoBEngine::startupLoad() {
_sound->loadSoundFile("ADLIB");
}
-void EobEngine::drawNpcScene(int npcIndex) {
+void EoBEngine::drawNpcScene(int npcIndex) {
_screen->copyRegion(0, 0, 0, 0, 176, 120, 6, 0, Screen::CR_NO_P_CHECK);
switch (npcIndex) {
case 0:
@@ -155,7 +155,7 @@ void EobEngine::drawNpcScene(int npcIndex) {
}
}
-void EobEngine::encodeDrawNpcSeqShape(int npcIndex, int drawX, int drawY) {
+void EoBEngine::encodeDrawNpcSeqShape(int npcIndex, int drawX, int drawY) {
const uint8 *shpDef = &_npcShpData[npcIndex << 2];
_screen->_curPage = 2;
const uint8 *shp = _screen->encodeShape(shpDef[0], shpDef[1], shpDef[2], shpDef[3]);
@@ -169,7 +169,7 @@ void EobEngine::encodeDrawNpcSeqShape(int npcIndex, int drawX, int drawY) {
#define DLG2A3(cond, txt, buttonstr1, buttonstr2) ((cond) ? (DLG2(txt, buttonstr1) ? 2 : 0) : DLG3(txt, buttonstr2))
#define TXT(txt) _txt->printDialogueText(txt, _moreStrings[0])
-void EobEngine::runNpcDialogue(int npcIndex) {
+void EoBEngine::runNpcDialogue(int npcIndex) {
int r = 0;
int a = 0;
Item itm = 0;
@@ -327,8 +327,8 @@ void EobEngine::runNpcDialogue(int npcIndex) {
#undef DLG3
#undef DLG2A3
-void EobEngine::updateUsedCharacterHandItem(int charIndex, int slot) {
- EobItem *itm = &_items[_characters[charIndex].inventory[slot]];
+void EoBEngine::updateUsedCharacterHandItem(int charIndex, int slot) {
+ EoBItem *itm = &_items[_characters[charIndex].inventory[slot]];
if (itm->type == 48) {
int charges = itm->flags & 0x3f;
if (--charges)
@@ -340,7 +340,7 @@ void EobEngine::updateUsedCharacterHandItem(int charIndex, int slot) {
}
}
-void EobEngine::replaceMonster(int unit, uint16 block, int pos, int dir, int type, int shpIndex, int mode, int h2, int randItem, int fixedItem) {
+void EoBEngine::replaceMonster(int unit, uint16 block, int pos, int dir, int type, int shpIndex, int mode, int h2, int randItem, int fixedItem) {
if (_levelBlockProperties[block].flags & 7)
return;
@@ -352,7 +352,7 @@ void EobEngine::replaceMonster(int unit, uint16 block, int pos, int dir, int typ
}
}
-void EobEngine::updateScriptTimersExtra() {
+void EoBEngine::updateScriptTimersExtra() {
int cnt = 0;
for (int i = 1; i < 30; i++) {
if (_monsters[i].hitPointsCur <= 0)
@@ -369,7 +369,7 @@ void EobEngine::updateScriptTimersExtra() {
}
}
-void EobEngine::loadDoorShapes(int doorType1, int shapeId1, int doorType2, int shapeId2) {
+void EoBEngine::loadDoorShapes(int doorType1, int shapeId1, int doorType2, int shapeId2) {
_screen->loadShapeSetBitmap("DOOR", 5, 3);
_screen->_curPage = 2;
@@ -398,7 +398,7 @@ void EobEngine::loadDoorShapes(int doorType1, int shapeId1, int doorType2, int s
_screen->_curPage = 0;
}
-void EobEngine::drawDoorIntern(int type, int index, int x, int y, int w, int wall, int mDim, int16 y1, int16 y2) {
+void EoBEngine::drawDoorIntern(int type, int index, int x, int y, int w, int wall, int mDim, int16 y1, int16 y2) {
int shapeIndex = type + 2 - mDim;
uint8 *shp = _doorShapes[shapeIndex];
@@ -467,7 +467,7 @@ void EobEngine::drawDoorIntern(int type, int index, int x, int y, int w, int wal
}
}
-void EobEngine::turnUndeadAuto() {
+void EoBEngine::turnUndeadAuto() {
if (_currentLevel != 2 && _currentLevel != 7)
return;
@@ -477,7 +477,7 @@ void EobEngine::turnUndeadAuto() {
if (!testCharacter(i, 0x0d))
continue;
- EobCharacter *c = &_characters[i];
+ EoBCharacter *c = &_characters[i];
if (_itemTypes[_items[c->inventory[0]].type].extraProperties != 6 && _itemTypes[_items[c->inventory[1]].type].extraProperties != 6)
continue;
@@ -506,12 +506,12 @@ void EobEngine::turnUndeadAuto() {
_openBookCasterLevel = 0;
}
-void EobEngine::turnUndeadAutoHit() {
+void EoBEngine::turnUndeadAutoHit() {
_txt->printMessage(_turnUndeadString[0], -1, _characters[_openBookChar].name);
sparkEffectOffensive();
}
-bool EobEngine::checkPartyStatusExtra() {
+bool EoBEngine::checkPartyStatusExtra() {
_screen->copyPage(0, 10);
int cd = _screen->curDimIndex();
gui_drawBox(0, 121, 320, 80, _color1_1, _color2_1, _bkgColor_1);
@@ -529,7 +529,7 @@ bool EobEngine::checkPartyStatusExtra() {
return true;
}
-int EobEngine::resurrectionSelectDialogue() {
+int EoBEngine::resurrectionSelectDialogue() {
gui_drawDialogueBox();
_txt->printDialogueText(_npcStrings[0][1]);
@@ -548,7 +548,7 @@ int EobEngine::resurrectionSelectDialogue() {
return 1;
}
-void EobEngine::healParty() {
+void EoBEngine::healParty() {
int cnt = rollDice(1, 3, 2);
for (int i = 0; i < 6 && cnt; i++) {
if (testCharacter(i, 3))
diff --git a/engines/kyra/eob.h b/engines/kyra/eob.h
index 2dfccca94e..0f83c47b03 100644
--- a/engines/kyra/eob.h
+++ b/engines/kyra/eob.h
@@ -29,11 +29,11 @@
namespace Kyra {
-class EobEngine : public EobCoreEngine {
-friend class GUI_Eob;
+class EoBEngine : public EoBCoreEngine {
+friend class GUI_EoB;
public:
- EobEngine(OSystem *system, const GameFlags &flags);
- ~EobEngine();
+ EoBEngine(OSystem *system, const GameFlags &flags);
+ ~EoBEngine();
private:
// Init / Release
diff --git a/engines/kyra/eobcommon.cpp b/engines/kyra/eobcommon.cpp
index dfa465c789..ebd26d3c18 100644
--- a/engines/kyra/eobcommon.cpp
+++ b/engines/kyra/eobcommon.cpp
@@ -36,7 +36,7 @@
namespace Kyra {
-EobCoreEngine::EobCoreEngine(OSystem *system, const GameFlags &flags) : KyraRpgEngine(system, flags), _numLargeItemShapes(flags.gameID == GI_EOB1 ? 14 : 11),
+EoBCoreEngine::EoBCoreEngine(OSystem *system, const GameFlags &flags) : KyraRpgEngine(system, flags), _numLargeItemShapes(flags.gameID == GI_EOB1 ? 14 : 11),
_numSmallItemShapes(flags.gameID == GI_EOB1 ? 23 : 26), _numThrownItemShapes(flags.gameID == GI_EOB1 ? 12 : 9), _numItemIconShapes(flags.gameID == GI_EOB1 ? 89 : 112),
_teleporterWallId(flags.gameID == GI_EOB1 ? 52 : 44) {
_screen = 0;
@@ -212,7 +212,7 @@ EobCoreEngine::EobCoreEngine(OSystem *system, const GameFlags &flags) : KyraRpgE
#undef DWM0
}
-EobCoreEngine::~EobCoreEngine() {
+EoBCoreEngine::~EoBCoreEngine() {
releaseItemsAndDecorationsShapes();
releaseTempData();
@@ -292,12 +292,12 @@ EobCoreEngine::~EobCoreEngine() {
_txt = 0;
}
-Common::Error EobCoreEngine::init() {
+Common::Error EoBCoreEngine::init() {
// In EOB the timer proc is directly invoked via interrupt 0x1c, 18.2 times per second.
// This makes a tick length of 54.94.
_tickLength = 55;
- _screen = new Screen_Eob(this, _system);
+ _screen = new Screen_EoB(this, _system);
assert(_screen);
_screen->setResolution();
@@ -333,13 +333,13 @@ Common::Error EobCoreEngine::init() {
}
setupKeyMap();
- _gui = new GUI_Eob(this);
+ _gui = new GUI_EoB(this);
assert(_gui);
_txt = new TextDisplayer_rpg(this, _screen);
assert(_txt);
- _inf = new EobInfProcessor(this, _screen);
+ _inf = new EoBInfProcessor(this, _screen);
assert(_inf);
- _debugger = new Debugger_Eob(this);
+ _debugger = new Debugger_EoB(this);
assert(_debugger);
_screen->loadFont(Screen::FID_6_FNT, "FONT6.FNT");
@@ -375,14 +375,14 @@ Common::Error EobCoreEngine::init() {
_wllVcnOffset = 16;
- _monsters = new EobMonsterInPlay[30];
- memset(_monsters, 0, 30 * sizeof(EobMonsterInPlay));
+ _monsters = new EoBMonsterInPlay[30];
+ memset(_monsters, 0, 30 * sizeof(EoBMonsterInPlay));
- _characters = new EobCharacter[6];
- memset(_characters, 0, sizeof(EobCharacter) * 6);
+ _characters = new EoBCharacter[6];
+ memset(_characters, 0, sizeof(EoBCharacter) * 6);
- _items = new EobItem[600];
- memset(_items, 0, sizeof(EobItem) * 600);
+ _items = new EoBItem[600];
+ memset(_items, 0, sizeof(EoBItem) * 600);
_itemNames = new char*[130];
for (int i = 0; i < 130; i++) {
@@ -390,9 +390,9 @@ Common::Error EobCoreEngine::init() {
memset(_itemNames[i], 0, 35);
}
- _flyingObjects = new EobFlyingObject[_numFlyingObjects];
+ _flyingObjects = new EoBFlyingObject[_numFlyingObjects];
_flyingObjectsPtr = _flyingObjects;
- memset(_flyingObjects, 0, _numFlyingObjects * sizeof(EobFlyingObject));
+ memset(_flyingObjects, 0, _numFlyingObjects * sizeof(EoBFlyingObject));
_spellAnimBuffer = new uint8[4096];
memset(_spellAnimBuffer, 0, 4096);
@@ -426,7 +426,7 @@ Common::Error EobCoreEngine::init() {
return Common::kNoError;
}
-Common::Error EobCoreEngine::go() {
+Common::Error EoBCoreEngine::go() {
_txt->removePageBreakFlag();
_screen->loadPalette("palette.col", _screen->getPalette(0));
_screen->setScreenPalette(_screen->getPalette(0));
@@ -482,12 +482,12 @@ Common::Error EobCoreEngine::go() {
return Common::kNoError;
}
-void EobCoreEngine::registerDefaultSettings() {
+void EoBCoreEngine::registerDefaultSettings() {
KyraEngine_v1::registerDefaultSettings();
ConfMan.registerDefault("hpbargraphs", true);
}
-void EobCoreEngine::readSettings() {
+void EoBCoreEngine::readSettings() {
_configHpBarGraphs = ConfMan.getBool("hpbargraphs");
_configSounds = ConfMan.getBool("sfx_mute") ? 0 : 1;
_configMusic = _configSounds ? 1 : 0;
@@ -496,7 +496,7 @@ void EobCoreEngine::readSettings() {
_sound->enableSFX(_configSounds);
}
-void EobCoreEngine::writeSettings() {
+void EoBCoreEngine::writeSettings() {
ConfMan.setBool("hpbargraphs", _configHpBarGraphs);
ConfMan.setBool("sfx_mute", _configSounds == 0);
@@ -510,7 +510,7 @@ void EobCoreEngine::writeSettings() {
ConfMan.flushToDisk();
}
-void EobCoreEngine::startupNew() {
+void EoBCoreEngine::startupNew() {
gui_setPlayFieldButtons();
_screen->_curPage = 0;
gui_drawPlayField(false);
@@ -521,7 +521,7 @@ void EobCoreEngine::startupNew() {
_updateCharNum = 0;
}
-void EobCoreEngine::runLoop() {
+void EoBCoreEngine::runLoop() {
_envAudioTimer = _system->getMillis() + (rollDice(1, 10, 3) * 18 * _tickLength);
_flashShapeTimer = 0;
_drawSceneTimer = _system->getMillis();
@@ -556,7 +556,7 @@ void EobCoreEngine::runLoop() {
}
}
-bool EobCoreEngine::checkPartyStatus(bool handleDeath) {
+bool EoBCoreEngine::checkPartyStatus(bool handleDeath) {
int numChars = 0;
for (int i = 0; i < 6; i++)
numChars += testCharacter(i, 13);
@@ -582,7 +582,7 @@ bool EobCoreEngine::checkPartyStatus(bool handleDeath) {
return false;
}
-void EobCoreEngine::loadItemsAndDecorationsShapes() {
+void EoBCoreEngine::loadItemsAndDecorationsShapes() {
releaseItemsAndDecorationsShapes();
_screen->setCurPage(2);
@@ -653,7 +653,7 @@ void EobCoreEngine::loadItemsAndDecorationsShapes() {
}
}
-void EobCoreEngine::releaseItemsAndDecorationsShapes() {
+void EoBCoreEngine::releaseItemsAndDecorationsShapes() {
if (_largeItemShapes) {
for (int i = 0; i < _numLargeItemShapes; i++) {
if (_largeItemShapes[i])
@@ -745,7 +745,7 @@ void EobCoreEngine::releaseItemsAndDecorationsShapes() {
delete[] _lightningColumnShape;
}
-void EobCoreEngine::setHandItem(Item itemIndex) {
+void EoBCoreEngine::setHandItem(Item itemIndex) {
if (itemIndex == -1)
return;
@@ -771,13 +771,13 @@ void EobCoreEngine::setHandItem(Item itemIndex) {
_screen->setMouseCursor(mouseOffs, mouseOffs, shp);
}
-int EobCoreEngine::getDexterityArmorClassModifier(int dexterity) {
+int EoBCoreEngine::getDexterityArmorClassModifier(int dexterity) {
static const int8 mod[] = { 5, 5, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, -2, -3, -4, -4, -5, -5, -5, -6, -6 };
return mod[dexterity];
}
-int EobCoreEngine::generateCharacterHitpointsByLevel(int charIndex, int levelIndex) {
- EobCharacter *c = &_characters[charIndex];
+int EoBCoreEngine::generateCharacterHitpointsByLevel(int charIndex, int levelIndex) {
+ EoBCharacter *c = &_characters[charIndex];
int m = getClassAndConstHitpointsModifier(c->cClass, c->constitutionCur);
int h = 0;
@@ -804,7 +804,7 @@ int EobCoreEngine::generateCharacterHitpointsByLevel(int charIndex, int levelInd
return h;
}
-int EobCoreEngine::getClassAndConstHitpointsModifier(int cclass, int constitution) {
+int EoBCoreEngine::getClassAndConstHitpointsModifier(int cclass, int constitution) {
int res = _hpConstModifiers[constitution];
// This also applies to EOB1 despite being coded differently there
if (res <= 2 || (_classModifierFlags[cclass] & 0x31))
@@ -813,11 +813,11 @@ int EobCoreEngine::getClassAndConstHitpointsModifier(int cclass, int constitutio
return 2;
}
-int EobCoreEngine::getCharacterClassType(int cclass, int levelIndex) {
+int EoBCoreEngine::getCharacterClassType(int cclass, int levelIndex) {
return _characterClassType[cclass * 3 + levelIndex];
}
-int EobCoreEngine::getModifiedHpLimits(int hpModifier, int constModifier, int level, bool mode) {
+int EoBCoreEngine::getModifiedHpLimits(int hpModifier, int constModifier, int level, bool mode) {
int s = _hpIncrPerLevel[6 + hpModifier] > level ? level : _hpIncrPerLevel[6 + hpModifier];
int res = s;
@@ -835,7 +835,7 @@ int EobCoreEngine::getModifiedHpLimits(int hpModifier, int constModifier, int le
return res;
}
-Common::String EobCoreEngine::getCharStrength(int str, int strExt) {
+Common::String EoBCoreEngine::getCharStrength(int str, int strExt) {
if (strExt) {
if (strExt == 100)
strExt = 0;
@@ -847,11 +847,11 @@ Common::String EobCoreEngine::getCharStrength(int str, int strExt) {
return _strenghtStr;
}
-int EobCoreEngine::testCharacter(int index, int flags) {
+int EoBCoreEngine::testCharacter(int index, int flags) {
if (index == -1)
return 0;
- EobCharacter *c = &_characters[index];
+ EoBCharacter *c = &_characters[index];
int res = 1;
if (flags & 1)
@@ -878,7 +878,7 @@ int EobCoreEngine::testCharacter(int index, int flags) {
return res;
}
-int EobCoreEngine::getNextValidCharIndex(int curCharIndex, int searchStep) {
+int EoBCoreEngine::getNextValidCharIndex(int curCharIndex, int searchStep) {
do {
curCharIndex += searchStep;
if (curCharIndex < 0)
@@ -890,8 +890,8 @@ int EobCoreEngine::getNextValidCharIndex(int curCharIndex, int searchStep) {
return curCharIndex;
}
-void EobCoreEngine::recalcArmorClass(int index) {
- EobCharacter *c = &_characters[index];
+void EoBCoreEngine::recalcArmorClass(int index) {
+ EoBCharacter *c = &_characters[index];
int acm = getDexterityArmorClassModifier(c->dexterityCur);
c->armorClass = 10 + acm;
@@ -958,8 +958,8 @@ void EobCoreEngine::recalcArmorClass(int index) {
c->armorClass = -10;
}
-int EobCoreEngine::validateWeaponSlotItem(int index, int slot) {
- EobCharacter *c = &_characters[index];
+int EoBCoreEngine::validateWeaponSlotItem(int index, int slot) {
+ EoBCharacter *c = &_characters[index];
int itm1 = c->inventory[0];
int r = itemUsableByCharacter(index, itm1);
int tp1 = _items[itm1].type;
@@ -987,7 +987,7 @@ int EobCoreEngine::validateWeaponSlotItem(int index, int slot) {
return r;
}
-int EobCoreEngine::getClericPaladinLevel(int index) {
+int EoBCoreEngine::getClericPaladinLevel(int index) {
if (_castScrollSlot)
return 9;
@@ -1007,7 +1007,7 @@ int EobCoreEngine::getClericPaladinLevel(int index) {
return 1;
}
-int EobCoreEngine::getMageLevel(int index) {
+int EoBCoreEngine::getMageLevel(int index) {
if (_castScrollSlot)
return 9;
@@ -1018,7 +1018,7 @@ int EobCoreEngine::getMageLevel(int index) {
return (l > -1) ? _characters[index].level[l] : 1;
}
-int EobCoreEngine::getCharacterLevelIndex(int type, int cClass) {
+int EoBCoreEngine::getCharacterLevelIndex(int type, int cClass) {
if (getCharacterClassType(cClass, 0) == type)
return 0;
@@ -1031,7 +1031,7 @@ int EobCoreEngine::getCharacterLevelIndex(int type, int cClass) {
return -1;
}
-int EobCoreEngine::countCharactersWithSpecificItems(int16 itemType, int16 itemValue) {
+int EoBCoreEngine::countCharactersWithSpecificItems(int16 itemType, int16 itemValue) {
int res = 0;
for (int i = 0; i < 6; i++) {
if (!testCharacter(i, 1))
@@ -1042,7 +1042,7 @@ int EobCoreEngine::countCharactersWithSpecificItems(int16 itemType, int16 itemVa
return res;
}
-int EobCoreEngine::checkInventoryForItem(int character, int16 itemType, int16 itemValue) {
+int EoBCoreEngine::checkInventoryForItem(int character, int16 itemType, int16 itemValue) {
for (int i = 0; i < 27; i++) {
uint16 inv = _characters[character].inventory[i];
if (!inv)
@@ -1055,11 +1055,11 @@ int EobCoreEngine::checkInventoryForItem(int character, int16 itemType, int16 it
return -1;
}
-void EobCoreEngine::modifyCharacterHitpoints(int character, int16 points) {
+void EoBCoreEngine::modifyCharacterHitpoints(int character, int16 points) {
if (!testCharacter(character, 3))
return;
- EobCharacter *c = &_characters[character];
+ EoBCharacter *c = &_characters[character];
c->hitPointsCur += points;
if (c->hitPointsCur > c->hitPointsMax)
c->hitPointsCur = c->hitPointsMax;
@@ -1068,14 +1068,14 @@ void EobCoreEngine::modifyCharacterHitpoints(int character, int16 points) {
gui_drawCharPortraitWithStats(character);
}
-void EobCoreEngine::neutralizePoison(int character) {
+void EoBCoreEngine::neutralizePoison(int character) {
_characters[character].flags &= ~2;
_characters[character].effectFlags &= ~0x2000;
deleteCharEventTimer(character, -34);
gui_drawCharPortraitWithStats(character);
}
-void EobCoreEngine::npcSequence(int npcIndex) {
+void EoBCoreEngine::npcSequence(int npcIndex) {
_screen->loadShapeSetBitmap("OUTTAKE", 5, 3);
_screen->copyRegion(0, 0, 0, 0, 176, 120, 0, 6, Screen::CR_NO_P_CHECK);
@@ -1095,8 +1095,8 @@ void EobCoreEngine::npcSequence(int npcIndex) {
gui_restorePlayField();
}
-void EobCoreEngine::initNpc(int npcIndex) {
- EobCharacter *c = _characters;
+void EoBCoreEngine::initNpc(int npcIndex) {
+ EoBCharacter *c = _characters;
int i = 0;
for (; i < 6; i++) {
if (!(_characters[i].flags & 1)) {
@@ -1106,7 +1106,7 @@ void EobCoreEngine::initNpc(int npcIndex) {
}
delete[] c->faceShape;
- memcpy(c, &_npcPreset[npcIndex], sizeof(EobCharacter));
+ memcpy(c, &_npcPreset[npcIndex], sizeof(EoBCharacter));
recalcArmorClass(i);
for (i = 0; i < 25; i++) {
@@ -1121,7 +1121,7 @@ void EobCoreEngine::initNpc(int npcIndex) {
_screen->_curPage = 0;
}
-int EobCoreEngine::npcJoinDialogue(int npcIndex, int queryJoinTextId, int confirmJoinTextId, int noJoinTextId) {
+int EoBCoreEngine::npcJoinDialogue(int npcIndex, int queryJoinTextId, int confirmJoinTextId, int noJoinTextId) {
gui_drawDialogueBox();
_txt->printDialogueText(queryJoinTextId, 0);
@@ -1144,7 +1144,7 @@ int EobCoreEngine::npcJoinDialogue(int npcIndex, int queryJoinTextId, int confir
return r ^ 1;
}
-int EobCoreEngine::prepareForNewPartyMember(int16 itemType, int16 itemValue) {
+int EoBCoreEngine::prepareForNewPartyMember(int16 itemType, int16 itemValue) {
int numChars = 0;
for (int i = 0; i < 6; i++)
numChars += (_characters[i].flags & 1);
@@ -1167,7 +1167,7 @@ int EobCoreEngine::prepareForNewPartyMember(int16 itemType, int16 itemValue) {
return 1;
}
-void EobCoreEngine::dropCharacter(int charIndex) {
+void EoBCoreEngine::dropCharacter(int charIndex) {
if (!testCharacter(charIndex, 1))
return;
@@ -1181,8 +1181,8 @@ void EobCoreEngine::dropCharacter(int charIndex) {
setupCharacterTimers();
}
-void EobCoreEngine::removeCharacterFromParty(int charIndex) {
- EobCharacter *c = &_characters[charIndex];
+void EoBCoreEngine::removeCharacterFromParty(int charIndex) {
+ EoBCharacter *c = &_characters[charIndex];
c->flags = 0;
for (int i = 0; i < 27; i++) {
@@ -1204,14 +1204,14 @@ void EobCoreEngine::removeCharacterFromParty(int charIndex) {
setupCharacterTimers();
}
-void EobCoreEngine::exchangeCharacters(int charIndex1, int charIndex2) {
- EobCharacter temp;
- memcpy(&temp, &_characters[charIndex1], sizeof(EobCharacter));
- memcpy(&_characters[charIndex1], &_characters[charIndex2], sizeof(EobCharacter));
- memcpy(&_characters[charIndex2], &temp, sizeof(EobCharacter));
+void EoBCoreEngine::exchangeCharacters(int charIndex1, int charIndex2) {
+ EoBCharacter temp;
+ memcpy(&temp, &_characters[charIndex1], sizeof(EoBCharacter));
+ memcpy(&_characters[charIndex1], &_characters[charIndex2], sizeof(EoBCharacter));
+ memcpy(&_characters[charIndex2], &temp, sizeof(EoBCharacter));
}
-void EobCoreEngine::increasePartyExperience(int16 points) {
+void EoBCoreEngine::increasePartyExperience(int16 points) {
int cnt = 0;
for (int i = 0; i < 6; i++) {
if (testCharacter(i, 3))
@@ -1230,7 +1230,7 @@ void EobCoreEngine::increasePartyExperience(int16 points) {
}
}
-void EobCoreEngine::increaseCharacterExperience(int charIndex, int32 points) {
+void EoBCoreEngine::increaseCharacterExperience(int charIndex, int32 points) {
int cl = _characters[charIndex].cClass;
points /= _numLevelsPerClass[cl];
@@ -1248,7 +1248,7 @@ void EobCoreEngine::increaseCharacterExperience(int charIndex, int32 points) {
}
}
-uint32 EobCoreEngine::getRequiredExperience(int cClass, int levelIndex, int level) {
+uint32 EoBCoreEngine::getRequiredExperience(int cClass, int levelIndex, int level) {
cClass = getCharacterClassType(cClass, levelIndex);
if (cClass == -1)
return 0xffffffff;
@@ -1257,7 +1257,7 @@ uint32 EobCoreEngine::getRequiredExperience(int cClass, int levelIndex, int leve
return tbl[level - 1];
}
-void EobCoreEngine::increaseCharacterLevel(int charIndex, int levelIndex) {
+void EoBCoreEngine::increaseCharacterLevel(int charIndex, int levelIndex) {
_characters[charIndex].level[levelIndex]++;
int hpInc = generateCharacterHitpointsByLevel(charIndex, 1 << levelIndex);
_characters[charIndex].hitPointsCur += hpInc;
@@ -1268,7 +1268,7 @@ void EobCoreEngine::increaseCharacterLevel(int charIndex, int levelIndex) {
snd_playSoundEffect(23);
}
-void EobCoreEngine::setWeaponSlotStatus(int charIndex, int mode, int slot) {
+void EoBCoreEngine::setWeaponSlotStatus(int charIndex, int mode, int slot) {
if (mode == 0 || mode == 2)
_characters[charIndex].disabledSlots ^= (1 << slot);
else if (mode != 1)
@@ -1278,7 +1278,7 @@ void EobCoreEngine::setWeaponSlotStatus(int charIndex, int mode, int slot) {
gui_drawCharPortraitWithStats(charIndex);
}
-void EobCoreEngine::setupDialogueButtons(int presetfirst, int numStr, va_list &args) {
+void EoBCoreEngine::setupDialogueButtons(int presetfirst, int numStr, va_list &args) {
_dialogueNumButtons = numStr;
_dialogueHighlightedButton = 0;
@@ -1306,7 +1306,7 @@ void EobCoreEngine::setupDialogueButtons(int presetfirst, int numStr, va_list &a
removeInputTop();
}
-void EobCoreEngine::initDialogueSequence() {
+void EoBCoreEngine::initDialogueSequence() {
_npcSequenceSub = -1;
_txt->setWaitButtonMode(0);
_dialogueField = true;
@@ -1324,7 +1324,7 @@ void EobCoreEngine::initDialogueSequence() {
delete s;
}
-void EobCoreEngine::restoreAfterDialogueSequence() {
+void EoBCoreEngine::restoreAfterDialogueSequence() {
_txt->allowPageBreak(false);
_dialogueField = false;
@@ -1340,7 +1340,7 @@ void EobCoreEngine::restoreAfterDialogueSequence() {
_sceneUpdateRequired = true;
}
-void EobCoreEngine::drawSequenceBitmap(const char *file, int destRect, int x1, int y1, int flags) {
+void EoBCoreEngine::drawSequenceBitmap(const char *file, int destRect, int x1, int y1, int flags) {
static const uint8 frameX[] = { 1, 0 };
static const uint8 frameY[] = { 8, 0 };
static const uint8 frameW[] = { 20, 40 };
@@ -1351,7 +1351,7 @@ void EobCoreEngine::drawSequenceBitmap(const char *file, int destRect, int x1, i
if (scumm_stricmp(_dialogueLastBitmap, file)) {
if (!destRect) {
if (!(flags & 1)) {
- _screen->loadEobBitmap("BORDER", 0, 3, 3, 2);
+ _screen->loadEoBBitmap("BORDER", 0, 3, 3, 2);
_screen->copyRegion(0, 0, 0, 0, 184, 121, 2, page, Screen::CR_NO_P_CHECK);
} else {
_screen->copyRegion(0, 0, 0, 0, 184, 121, 0, page, Screen::CR_NO_P_CHECK);
@@ -1361,7 +1361,7 @@ void EobCoreEngine::drawSequenceBitmap(const char *file, int destRect, int x1, i
_screen->copyRegion(0, 0, 0, 0, 184, 121, 2, 6, Screen::CR_NO_P_CHECK);
}
- _screen->loadEobBitmap(file, 0, 3, 3, 2);
+ _screen->loadEoBBitmap(file, 0, 3, 3, 2);
strcpy(_dialogueLastBitmap, file);
}
@@ -1376,7 +1376,7 @@ void EobCoreEngine::drawSequenceBitmap(const char *file, int destRect, int x1, i
_screen->updateScreen();
}
-int EobCoreEngine::runDialogue(int dialogueTextId, int numStr, ...) {
+int EoBCoreEngine::runDialogue(int dialogueTextId, int numStr, ...) {
if (dialogueTextId != -1)
txt()->printDialogueText(dialogueTextId, 0);
@@ -1397,7 +1397,7 @@ int EobCoreEngine::runDialogue(int dialogueTextId, int numStr, ...) {
return res;
}
-void EobCoreEngine::restParty_displayWarning(const char *str) {
+void EoBCoreEngine::restParty_displayWarning(const char *str) {
int od = _screen->curDimIndex();
_screen->setScreenDim(7);
Screen::FontId of = _screen->setFont(Screen::FID_6_FNT);
@@ -1409,7 +1409,7 @@ void EobCoreEngine::restParty_displayWarning(const char *str) {
_screen->setScreenDim(od);
}
-bool EobCoreEngine::restParty_updateMonsters() {
+bool EoBCoreEngine::restParty_updateMonsters() {
bool sfxEnabled = _sound->sfxEnabled();
bool musicEnabled = _sound->musicEnabled();
_sound->enableSFX(false);
@@ -1445,7 +1445,7 @@ bool EobCoreEngine::restParty_updateMonsters() {
return false;
}
-int EobCoreEngine::restParty_getCharacterWithLowestHp() {
+int EoBCoreEngine::restParty_getCharacterWithLowestHp() {
int lhp = 900;
int res = -1;
@@ -1463,7 +1463,7 @@ int EobCoreEngine::restParty_getCharacterWithLowestHp() {
return res + 1;
}
-bool EobCoreEngine::restParty_checkHealSpells(int charIndex) {
+bool EoBCoreEngine::restParty_checkHealSpells(int charIndex) {
static const uint8 eob1healSpells[] = { 2, 15, 20 };
static const uint8 eob2healSpells[] = { 3, 16, 20 };
const uint8 *spells = _flags.gameID == GI_EOB1 ? eob1healSpells : eob2healSpells;
@@ -1478,7 +1478,7 @@ bool EobCoreEngine::restParty_checkHealSpells(int charIndex) {
return false;
}
-bool EobCoreEngine::restParty_checkSpellsToLearn() {
+bool EoBCoreEngine::restParty_checkSpellsToLearn() {
for (int i = 0; i < 6; i++) {
if (!testCharacter(i, 0x43))
continue;
@@ -1501,11 +1501,11 @@ bool EobCoreEngine::restParty_checkSpellsToLearn() {
return false;
}
-bool EobCoreEngine::restParty_extraAbortCondition() {
+bool EoBCoreEngine::restParty_extraAbortCondition() {
return false;
}
-void EobCoreEngine::delay(uint32 millis, bool, bool) {
+void EoBCoreEngine::delay(uint32 millis, bool, bool) {
while (millis && !shouldQuit() && !(_allowSkip && skipFlag())) {
updateInput();
uint32 step = MIN<uint32>(millis, (_tickLength / 5));
@@ -1514,7 +1514,7 @@ void EobCoreEngine::delay(uint32 millis, bool, bool) {
}
}
-void EobCoreEngine::displayParchment(int id) {
+void EoBCoreEngine::displayParchment(int id) {
_txt->setWaitButtonMode(1);
_txt->resetPageBreakString();
gui_updateControls();
@@ -1549,7 +1549,7 @@ void EobCoreEngine::displayParchment(int id) {
restoreAfterDialogueSequence();
}
-int EobCoreEngine::countResurrectionCandidates() {
+int EoBCoreEngine::countResurrectionCandidates() {
_rrCount = 0;
memset(_rrNames, 0, 10 * sizeof(const char*));
@@ -1590,7 +1590,7 @@ int EobCoreEngine::countResurrectionCandidates() {
return _rrCount;
}
-void EobCoreEngine::seq_portal() {
+void EoBCoreEngine::seq_portal() {
uint8 *shapes1[5];
uint8 *shapes2[5];
uint8 *shapes3[5];
@@ -1605,7 +1605,7 @@ void EobCoreEngine::seq_portal() {
}
shape0 = _screen->encodeShape(30, 0, 8, 77);
- _screen->loadEobBitmap("PORTALB", 0, 5, 3, 2);
+ _screen->loadEoBBitmap("PORTALB", 0, 5, 3, 2);
snd_playSoundEffect(33);
snd_playSoundEffect(19);
@@ -1659,7 +1659,7 @@ void EobCoreEngine::seq_portal() {
}
}
-bool EobCoreEngine::checkPassword() {
+bool EoBCoreEngine::checkPassword() {
char answ[20];
Screen::FontId of = _screen->setFont(Screen::FID_8_FNT);
_screen->copyPage(0, 10);
@@ -1693,8 +1693,8 @@ bool EobCoreEngine::checkPassword() {
return true;
}
-void EobCoreEngine::useSlotWeapon(int charIndex, int slotIndex, Item item) {
- EobCharacter *c = &_characters[charIndex];
+void EoBCoreEngine::useSlotWeapon(int charIndex, int slotIndex, Item item) {
+ EoBCharacter *c = &_characters[charIndex];
int tp = item ? _items[item].type : 0;
if (c->effectFlags & 0x40)
@@ -1734,7 +1734,7 @@ void EobCoreEngine::useSlotWeapon(int charIndex, int slotIndex, Item item) {
setCharEventTimer(charIndex, 18, inflict >= -2 ? slotIndex + 2 : slotIndex, 1);
}
-int EobCoreEngine::closeDistanceAttack(int charIndex, Item item) {
+int EoBCoreEngine::closeDistanceAttack(int charIndex, Item item) {
if (charIndex > 1)
return -3;
@@ -1784,7 +1784,7 @@ int EobCoreEngine::closeDistanceAttack(int charIndex, Item item) {
return 0;
}
-int EobCoreEngine::thrownAttack(int charIndex, int slotIndex, Item item) {
+int EoBCoreEngine::thrownAttack(int charIndex, int slotIndex, Item item) {
int d = charIndex > 3 ? charIndex - 2 : charIndex;
if (!launchObject(charIndex, item, _currentBlock, _dropItemDirIndex[(_currentDirection << 2) + d], _currentDirection, _items[item].type))
return 0;
@@ -1796,7 +1796,7 @@ int EobCoreEngine::thrownAttack(int charIndex, int slotIndex, Item item) {
return 0;
}
-int EobCoreEngine::projectileWeaponAttack(int charIndex, Item item) {
+int EoBCoreEngine::projectileWeaponAttack(int charIndex, Item item) {
int tp = _items[item].type;
if (_flags.gameID == GI_EOB1)
@@ -1839,7 +1839,7 @@ int EobCoreEngine::projectileWeaponAttack(int charIndex, Item item) {
return 0;
}
-void EobCoreEngine::inflictMonsterDamage(EobMonsterInPlay *m, int damage, bool giveExperience) {
+void EoBCoreEngine::inflictMonsterDamage(EoBMonsterInPlay *m, int damage, bool giveExperience) {
m->hitPointsCur -= damage;
m->flags = (m->flags & 0xf7) | 1;
@@ -1862,21 +1862,21 @@ void EobCoreEngine::inflictMonsterDamage(EobMonsterInPlay *m, int damage, bool g
m->dest = _currentBlock;
}
-void EobCoreEngine::calcAndInflictMonsterDamage(EobMonsterInPlay *m, int times, int pips, int offs, int flags, int savingThrowType, int savingThrowEffect) {
+void EoBCoreEngine::calcAndInflictMonsterDamage(EoBMonsterInPlay *m, int times, int pips, int offs, int flags, int savingThrowType, int savingThrowEffect) {
int dmg = calcMonsterDamage(m, times, pips, offs, flags, savingThrowType, savingThrowEffect);
if (dmg > 0)
inflictMonsterDamage(m, dmg, flags & 0x800 ? true : false);
}
-void EobCoreEngine::calcAndInflictCharacterDamage(int charIndex, int times, int itemOrPips, int useStrModifierOrBase, int flags, int savingThrowType, int savingThrowEffect) {
+void EoBCoreEngine::calcAndInflictCharacterDamage(int charIndex, int times, int itemOrPips, int useStrModifierOrBase, int flags, int savingThrowType, int savingThrowEffect) {
int dmg = calcCharacterDamage(charIndex, times, itemOrPips, useStrModifierOrBase, flags, savingThrowType, savingThrowEffect);
if (dmg)
inflictCharacterDamage(charIndex, dmg);
}
-int EobCoreEngine::calcCharacterDamage(int charIndex, int times, int itemOrPips, int useStrModifierOrBase, int flags, int savingThrowType, int savingThrowEffect) {
+int EoBCoreEngine::calcCharacterDamage(int charIndex, int times, int itemOrPips, int useStrModifierOrBase, int flags, int savingThrowType, int savingThrowEffect) {
int s = (flags & 0x100) ? calcDamageModifers(times, 0, itemOrPips, _items[itemOrPips].type, useStrModifierOrBase) : rollDice(times, itemOrPips, useStrModifierOrBase);
- EobCharacter *c = &_characters[charIndex];
+ EoBCharacter *c = &_characters[charIndex];
if (savingThrowType != 5) {
if (trySavingThrow(c, _charClassModifier[c->cClass], c->level[0], savingThrowType, c->raceSex >> 1 /*fix bug in original code by adding a right shift*/))
@@ -1903,8 +1903,8 @@ int EobCoreEngine::calcCharacterDamage(int charIndex, int times, int itemOrPips,
return s;
}
-void EobCoreEngine::inflictCharacterDamage(int charIndex, int damage) {
- EobCharacter *c = &_characters[charIndex];
+void EoBCoreEngine::inflictCharacterDamage(int charIndex, int damage) {
+ EoBCharacter *c = &_characters[charIndex];
if (!testCharacter(charIndex, 3))
return;
@@ -1943,7 +1943,7 @@ void EobCoreEngine::inflictCharacterDamage(int charIndex, int damage) {
setCharEventTimer(charIndex, 18, 6, 1);
}
-bool EobCoreEngine::characterAttackHitTest(int charIndex, int monsterIndex, int item, int attackType) {
+bool EoBCoreEngine::characterAttackHitTest(int charIndex, int monsterIndex, int item, int attackType) {
if (charIndex < 0)
return true;
@@ -1983,9 +1983,9 @@ bool EobCoreEngine::characterAttackHitTest(int charIndex, int monsterIndex, int
return s < m ? false : true;
}
-bool EobCoreEngine::monsterAttackHitTest(EobMonsterInPlay *m, int charIndex) {
+bool EoBCoreEngine::monsterAttackHitTest(EoBMonsterInPlay *m, int charIndex) {
int tp = m->type;
- EobMonsterProperty *p = &_monsterProps[tp];
+ EoBMonsterProperty *p = &_monsterProps[tp];
int r = rollDice(1, 20);
if (r != 20) {
@@ -2003,7 +2003,7 @@ bool EobCoreEngine::monsterAttackHitTest(EobMonsterInPlay *m, int charIndex) {
return ((r == 20) || (r >= (p->hitChance - _characters[charIndex].armorClass)));
}
-bool EobCoreEngine::flyingObjectMonsterHit(EobFlyingObject *fo, int monsterIndex) {
+bool EoBCoreEngine::flyingObjectMonsterHit(EoBFlyingObject *fo, int monsterIndex) {
if (fo->attackerId != -1) {
if (!characterAttackHitTest(fo->attackerId, monsterIndex, fo->item, 0))
return false;
@@ -2012,7 +2012,7 @@ bool EobCoreEngine::flyingObjectMonsterHit(EobFlyingObject *fo, int monsterIndex
return true;
}
-bool EobCoreEngine::flyingObjectPartyHit(EobFlyingObject *fo) {
+bool EoBCoreEngine::flyingObjectPartyHit(EoBFlyingObject *fo) {
int ps = _dscItemPosIndex[(_currentDirection << 2) + (_items[fo->item].pos & 3)];
bool res = false;
@@ -2037,7 +2037,7 @@ bool EobCoreEngine::flyingObjectPartyHit(EobFlyingObject *fo) {
return res;
}
-void EobCoreEngine::monsterCloseAttack(EobMonsterInPlay *m) {
+void EoBCoreEngine::monsterCloseAttack(EoBMonsterInPlay *m) {
int first = _monsterCloseAttDstTable1[(_currentDirection << 2) + m->dir] * 12;
int v = (m->pos == 4) ? rollDice(1, 2, -1) : _monsterCloseAttChkTable2[(m->dir << 2) + m->pos];
if (!v)
@@ -2104,13 +2104,13 @@ void EobCoreEngine::monsterCloseAttack(EobMonsterInPlay *m) {
}
}
-void EobCoreEngine::monsterSpellCast(EobMonsterInPlay *m, int type) {
+void EoBCoreEngine::monsterSpellCast(EoBMonsterInPlay *m, int type) {
launchMagicObject(-1, type, m->block, m->pos, m->dir);
snd_processEnvironmentalSoundEffect(_spells[_magicFlightObjectProperties[type << 2]].sound, m->block);
}
-void EobCoreEngine::statusAttack(int charIndex, int attackStatusFlags, const char *attackStatusString, int savingThrowType, uint32 effectDuration, int restoreEvent, int noRefresh) {
- EobCharacter *c = &_characters[charIndex];
+void EoBCoreEngine::statusAttack(int charIndex, int attackStatusFlags, const char *attackStatusString, int savingThrowType, uint32 effectDuration, int restoreEvent, int noRefresh) {
+ EoBCharacter *c = &_characters[charIndex];
if ((c->flags & attackStatusFlags) && noRefresh)
return;
if (!testCharacter(charIndex, 3))
@@ -2138,9 +2138,9 @@ void EobCoreEngine::statusAttack(int charIndex, int attackStatusFlags, const cha
_txt->printMessage(_characterStatusStrings13[0], -1, c->name, attackStatusString);
}
-int EobCoreEngine::calcMonsterDamage(EobMonsterInPlay *m, int times, int pips, int offs, int flags, int savingThrowType, int savingThrowEffect) {
+int EoBCoreEngine::calcMonsterDamage(EoBMonsterInPlay *m, int times, int pips, int offs, int flags, int savingThrowType, int savingThrowEffect) {
int s = flags & 0x100 ? calcDamageModifers(times, m, pips, _items[pips].type, offs) : rollDice(times, pips, offs);
- EobMonsterProperty *p = &_monsterProps[m->type];
+ EoBMonsterProperty *p = &_monsterProps[m->type];
if (savingThrowType != 5) {
if (trySavingThrow(m, 0, p->level, savingThrowType, 6))
@@ -2188,10 +2188,10 @@ int EobCoreEngine::calcMonsterDamage(EobMonsterInPlay *m, int times, int pips, i
return s;
}
-int EobCoreEngine::calcDamageModifers(int charIndex, EobMonsterInPlay *m, int item, int itemType, int useStrModifier) {
+int EoBCoreEngine::calcDamageModifers(int charIndex, EoBMonsterInPlay *m, int item, int itemType, int useStrModifier) {
int s = (useStrModifier && (charIndex != -1)) ? getStrDamageModifier(charIndex) : 0;
if (item) {
- EobItemType *p = &_itemTypes[itemType];
+ EoBItemType *p = &_itemTypes[itemType];
int t = m ? m->type : 0;
s += ((m && (_monsterProps[t].capsFlags & 1)) ? rollDice(p->dmgNumDiceL, p->dmgNumPipsL, p->dmgIncS /* bug in original code ? */) :
rollDice(p->dmgNumDiceS, p->dmgNumPipsS, p->dmgIncS));
@@ -2203,7 +2203,7 @@ int EobCoreEngine::calcDamageModifers(int charIndex, EobMonsterInPlay *m, int it
return (s < 0) ? 0 : s;
}
-bool EobCoreEngine::trySavingThrow(void *target, int hpModifier, int level, int type, int race) {
+bool EoBCoreEngine::trySavingThrow(void *target, int hpModifier, int level, int type, int race) {
static const int8 constMod[] = { 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5 };
if (type == 5)
@@ -2211,18 +2211,18 @@ bool EobCoreEngine::trySavingThrow(void *target, int hpModifier, int level, int
int s = getSaveThrowModifier(hpModifier, level, type);
if (((race == 3 || race == 5) && (type == 4 || type == 1 || type == 0)) || (race == 4 && (type == 4 || type == 1))) {
- EobCharacter *c = (EobCharacter*)target;
+ EoBCharacter *c = (EoBCharacter*)target;
s -= constMod[c->constitutionCur];
}
return rollDice(1, 20) < s ? false : true;
}
-bool EobCoreEngine::specialAttackSavingThrow(int charIndex, int type) {
+bool EoBCoreEngine::specialAttackSavingThrow(int charIndex, int type) {
return trySavingThrow(&_characters[charIndex], _charClassModifier[_characters[charIndex].cClass], _characters[charIndex].level[0], type, _characters[charIndex].raceSex >> 1);
}
-int EobCoreEngine::getSaveThrowModifier(int hpModifier, int level, int type) {
+int EoBCoreEngine::getSaveThrowModifier(int hpModifier, int level, int type) {
const uint8 *tbl = _saveThrowTables[hpModifier];
if (_saveThrowLevelIndex[hpModifier] < level)
level = _saveThrowLevelIndex[hpModifier];
@@ -2232,12 +2232,12 @@ int EobCoreEngine::getSaveThrowModifier(int hpModifier, int level, int type) {
return tbl[level];
}
-bool EobCoreEngine::calcDamageCheckItemType(int itemType) {
+bool EoBCoreEngine::calcDamageCheckItemType(int itemType) {
itemType = _itemTypes[itemType].extraProperties & 0x7f;
return (itemType == 2 || itemType == 3) ? true : false;
}
-int EobCoreEngine::savingThrowReduceDamage(int savingThrowEffect, int damage) {
+int EoBCoreEngine::savingThrowReduceDamage(int savingThrowEffect, int damage) {
if (savingThrowEffect == 3)
return 0;
@@ -2247,11 +2247,11 @@ int EobCoreEngine::savingThrowReduceDamage(int savingThrowEffect, int damage) {
return damage;
}
-bool EobCoreEngine::tryMonsterAttackEvasion(EobMonsterInPlay *m) {
+bool EoBCoreEngine::tryMonsterAttackEvasion(EoBMonsterInPlay *m) {
return rollDice(1, 100) < _monsterProps[m->type].dmgModifierEvade ? true : false;
}
-int EobCoreEngine::getStrHitChanceModifier(int charIndex) {
+int EoBCoreEngine::getStrHitChanceModifier(int charIndex) {
static const int8 strExtLimit[] = { 1, 51, 76, 91, 100 };
static const int8 strExtMod[] = { 1, 2, 2, 2, 3 };
static const int8 strMod[] = { -4, -3, -3, -2, -2, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 3, 4, 4, 5, 6, 7 };
@@ -2267,7 +2267,7 @@ int EobCoreEngine::getStrHitChanceModifier(int charIndex) {
return r;
}
-int EobCoreEngine::getStrDamageModifier(int charIndex) {
+int EoBCoreEngine::getStrDamageModifier(int charIndex) {
static const int8 strExtLimit[] = { 1, 51, 76, 91, 100 };
static const int8 strExtMod[] = { 3, 3, 4, 5, 6 };
static const int8 strMod[] = { -3, -2, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 7, 8, 9, 10, 11, 12, 14 };
@@ -2283,12 +2283,12 @@ int EobCoreEngine::getStrDamageModifier(int charIndex) {
return r;
}
-int EobCoreEngine::getDexHitChanceModifier(int charIndex) {
+int EoBCoreEngine::getDexHitChanceModifier(int charIndex) {
static const int8 dexMod[] = { -5, -4, -3, -2, -1, 0, 0, 0, 0, 0, 0, 1, 2, 2, 3, 3, 4, 4, 4 };
return dexMod[_characters[charIndex].dexterityCur - 1];
}
-int EobCoreEngine::getMonsterAcHitChanceModifier(int charIndex, int monsterAc) {
+int EoBCoreEngine::getMonsterAcHitChanceModifier(int charIndex, int monsterAc) {
static const uint8 mod1[] = { 1, 3, 3, 2 };
static const uint8 mod2[] = { 1, 1, 2, 1 };
@@ -2298,7 +2298,7 @@ int EobCoreEngine::getMonsterAcHitChanceModifier(int charIndex, int monsterAc) {
return (20 - ((l / mod1[cm]) * mod2[cm])) - monsterAc;
}
-void EobCoreEngine::explodeMonster(EobMonsterInPlay *m) {
+void EoBCoreEngine::explodeMonster(EoBMonsterInPlay *m) {
m->flags |= 2;
if (getBlockDistance(m->block, _currentBlock) < 2) {
explodeObject(0, _currentBlock, 2);
@@ -2310,14 +2310,14 @@ void EobCoreEngine::explodeMonster(EobMonsterInPlay *m) {
m->flags &= ~2;
}
-void EobCoreEngine::snd_playSoundEffect(int id, int volume) {
+void EoBCoreEngine::snd_playSoundEffect(int id, int volume) {
if ((id < 1) || (_flags.gameID == GI_EOB2 && id > 119) || shouldQuit())
return;
_sound->playSoundEffect(id, volume);
}
-void EobCoreEngine::snd_stopSound() {
+void EoBCoreEngine::snd_stopSound() {
_sound->playSoundEffect(0);
}
diff --git a/engines/kyra/eobcommon.h b/engines/kyra/eobcommon.h
index 3b1230830e..77a8198abd 100644
--- a/engines/kyra/eobcommon.h
+++ b/engines/kyra/eobcommon.h
@@ -31,7 +31,7 @@
namespace Kyra {
-struct EobShapeDef {
+struct EoBShapeDef {
int16 index;
uint8 x, y, w, h;
};
@@ -48,14 +48,14 @@ struct CreatePartyModButton {
uint8 destY;
};
-struct EobRect8 {
+struct EoBRect8 {
uint8 x;
uint8 y;
uint8 w;
uint8 h;
};
-struct EobChargenButtonDef {
+struct EoBChargenButtonDef {
uint8 x;
uint8 y;
uint8 w;
@@ -63,7 +63,7 @@ struct EobChargenButtonDef {
uint8 keyCode;
};
-struct EobGuiButtonDef {
+struct EoBGuiButtonDef {
uint16 keyCode;
uint16 keyCode2;
uint16 flags;
@@ -74,7 +74,7 @@ struct EobGuiButtonDef {
uint16 arg;
};
-struct EobCharacter {
+struct EoBCharacter {
uint8 id;
uint8 flags;
char name[11];
@@ -118,7 +118,7 @@ struct EobCharacter {
int8 slotStatus[5];
};
-struct EobItem {
+struct EoBItem {
uint8 nameUnid;
uint8 nameId;
uint8 flags;
@@ -132,7 +132,7 @@ struct EobItem {
int8 value;
};
-struct EobItemType {
+struct EoBItemType {
uint16 invFlags;
uint16 handFlags;
int8 armorClass;
@@ -154,7 +154,7 @@ struct SpriteDecoration {
int16 y;
};
-struct EobMonsterProperty {
+struct EoBMonsterProperty {
int8 armorClass;
int8 hitChance;
int8 level;
@@ -187,7 +187,7 @@ struct EobMonsterProperty {
uint8 decorations[3];
};
-struct EobMonsterInPlay {
+struct EoBMonsterInPlay {
uint8 type;
uint8 unit;
uint16 block;
@@ -220,14 +220,14 @@ struct ScriptTimer {
uint32 next;
};
-struct EobMenuDef {
+struct EoBMenuDef {
int8 titleStrId;
uint8 dim;
uint8 firstButtonStrId;
int8 numButtons;
int8 titleCol;
};
-struct EobMenuButtonDef {
+struct EoBMenuButtonDef {
int8 labelId;
int16 x;
int8 y;
@@ -237,17 +237,17 @@ struct EobMenuButtonDef {
int16 flags;
};
-class EobInfProcessor;
+class EoBInfProcessor;
-class EobCoreEngine : public KyraRpgEngine {
+class EoBCoreEngine : public KyraRpgEngine {
friend class TextDisplayer_rpg;
-friend class GUI_Eob;
-friend class EobInfProcessor;
+friend class GUI_EoB;
+friend class EoBInfProcessor;
friend class DarkmoonSequenceHelper;
friend class CharacterGenerator;
public:
- EobCoreEngine(OSystem *system, const GameFlags &flags);
- virtual ~EobCoreEngine();
+ EoBCoreEngine(OSystem *system, const GameFlags &flags);
+ virtual ~EoBCoreEngine();
Screen *screen() { return _screen; }
GUI *gui() const { return _gui; }
@@ -397,7 +397,7 @@ protected:
void setWeaponSlotStatus(int charIndex, int mode, int slot);
- EobCharacter *_characters;
+ EoBCharacter *_characters;
Common::String _strenghtStr;
int _castScrollSlot;
int _exchangeCharacterId;
@@ -410,7 +410,7 @@ protected:
const uint8 *_saveThrowModDiv;
const uint8 *_saveThrowModExt;
- const EobCharacter *_npcPreset;
+ const EoBCharacter *_npcPreset;
int _npcSequenceSub;
bool _partyResting;
bool _loading;
@@ -420,7 +420,7 @@ protected:
Item duplicateItem(Item itemIndex);
void setItemPosition(Item *itemQueue, int block, Item item, int pos);
Item createItemOnCurrentBlock(Item itemIndex);
- void createInventoryItem(EobCharacter *c, Item itemIndex, int16 itemValue, int preferedInventorySlot);
+ void createInventoryItem(EoBCharacter *c, Item itemIndex, int16 itemValue, int preferedInventorySlot);
int deleteInventoryItem(int charIndex, int slot);
void deleteBlockItem(uint16 block, int type);
int validateInventorySlotForItem(Item item, int charIndex, int slot);
@@ -439,17 +439,17 @@ protected:
bool launchObject(int charIndex, Item item, uint16 startBlock, int startPos, int dir, int type);
void launchMagicObject(int charIndex, int type, uint16 startBlock, int startPos, int dir);
- bool updateObjectFlight(EobFlyingObject *fo, int block, int pos);
- bool updateFlyingObjectHitTest(EobFlyingObject *fo, int block, int pos);
- void explodeObject(EobFlyingObject *fo, int block, Item item);
- void endObjectFlight(EobFlyingObject *fo);
+ bool updateObjectFlight(EoBFlyingObject *fo, int block, int pos);
+ bool updateFlyingObjectHitTest(EoBFlyingObject *fo, int block, int pos);
+ void explodeObject(EoBFlyingObject *fo, int block, Item item);
+ void endObjectFlight(EoBFlyingObject *fo);
void checkFlyingObjects();
void reloadWeaponSlot(int charIndex, int slotIndex, int itemType, int arrowOrDagger);
- EobItem *_items;
+ EoBItem *_items;
uint16 _numItems;
- EobItemType *_itemTypes;
+ EoBItemType *_itemTypes;
char **_itemNames;
uint16 _numItemNames;
uint32 _partyEffectFlags;
@@ -459,7 +459,7 @@ protected:
const int8 *_projectileWeaponAmmoTypes;
const uint8 *_wandTypes;
- EobFlyingObject *_flyingObjects;
+ EoBFlyingObject *_flyingObjects;
const uint8 *_drawObjPosIndex;
const uint8 *_flightObjFlipIndex;
const int8 *_flightObjShpMap;
@@ -483,10 +483,10 @@ protected:
const uint8 *loadMonsterProperties(const uint8 *data);
const uint8 *loadActiveMonsterData(const uint8 *data, int level);
void initMonster(int index, int unit, uint16 block, int pos, int dir, int type, int shpIndex, int mode, int i, int randItem, int fixedItem);
- void placeMonster(EobMonsterInPlay *m, uint16 block, int dir);
+ void placeMonster(EoBMonsterInPlay *m, uint16 block, int dir);
virtual void replaceMonster(int b, uint16 block, int pos, int dir, int type, int shpIndex, int mode, int h2, int randItem, int fixedItem) = 0;
- void killMonster(EobMonsterInPlay *m, bool giveExperience);
- virtual bool killMonsterExtra(EobMonsterInPlay *m);
+ void killMonster(EoBMonsterInPlay *m, bool giveExperience);
+ virtual bool killMonsterExtra(EoBMonsterInPlay *m);
int countSpecificMonsters(int type);
void updateAttackingMonsterFlags();
@@ -494,12 +494,12 @@ protected:
int getClosestMonster(int charIndex, int block);
bool blockHasMonsters(uint16 block);
- bool isMonsterOnPos(EobMonsterInPlay *m, uint16 block, int pos, int checkPos4);
+ bool isMonsterOnPos(EoBMonsterInPlay *m, uint16 block, int pos, int checkPos4);
const int16 *findBlockMonsters(uint16 block, int pos, int dir, int blockDamage, int singleTargetCheckAdjacent);
void drawBlockObject(int flipped, int page, const uint8 *shape, int x, int y, int sd, uint8 *ovl = 0);
void drawMonsterShape(const uint8 *shape, int x, int y, int flipped, int flags, int palIndex);
- void flashMonsterShape(EobMonsterInPlay *m);
+ void flashMonsterShape(EoBMonsterInPlay *m);
void updateAllMonsterShapes();
void drawBlockItems(int index);
void drawDoor(int index);
@@ -510,30 +510,30 @@ protected:
void drawTeleporter(int index);
void updateMonsters(int unit);
- void updateMonsterDest(EobMonsterInPlay *m);
- void updateMonsterAttackMode(EobMonsterInPlay *m);
+ void updateMonsterDest(EoBMonsterInPlay *m);
+ void updateMonsterAttackMode(EoBMonsterInPlay *m);
void updateAllMonsterDests();
void turnFriendlyMonstersHostile();
int getNextMonsterDirection(int curBlock, int destBlock);
- int getNextMonsterPos(EobMonsterInPlay *m, int block);
+ int getNextMonsterPos(EoBMonsterInPlay *m, int block);
int findFreeMonsterPos(int block, int size);
- void updateMoveMonster(EobMonsterInPlay *m);
- bool updateMonsterTryDistanceAttack(EobMonsterInPlay *m);
- bool updateMonsterTryCloseAttack(EobMonsterInPlay *m, int block);
- void walkMonster(EobMonsterInPlay *m, int destBlock);
- bool walkMonsterNextStep(EobMonsterInPlay *m, int destBlock, int direction);
- void updateMonsterFollowPath(EobMonsterInPlay *m, int turnSteps);
- void updateMonstersStraying(EobMonsterInPlay *m, int a);
- void updateMonstersSpellStatus(EobMonsterInPlay *m);
+ void updateMoveMonster(EoBMonsterInPlay *m);
+ bool updateMonsterTryDistanceAttack(EoBMonsterInPlay *m);
+ bool updateMonsterTryCloseAttack(EoBMonsterInPlay *m, int block);
+ void walkMonster(EoBMonsterInPlay *m, int destBlock);
+ bool walkMonsterNextStep(EoBMonsterInPlay *m, int destBlock, int direction);
+ void updateMonsterFollowPath(EoBMonsterInPlay *m, int turnSteps);
+ void updateMonstersStraying(EoBMonsterInPlay *m, int a);
+ void updateMonstersSpellStatus(EoBMonsterInPlay *m);
void setBlockMonsterDirection(int block, int dir);
uint8 *_monsterOvl1;
uint8 *_monsterOvl2;
SpriteDecoration *_monsterDecorations;
- EobMonsterProperty *_monsterProps;
+ EoBMonsterProperty *_monsterProps;
- EobMonsterInPlay *_monsters;
+ EoBMonsterInPlay *_monsters;
const int8 *_monsterStepTable0;
const int8 *_monsterStepTable1;
@@ -608,7 +608,7 @@ protected:
int16 _doorType[2];
int16 _noDoorSwitch[2];
- EobRect8 *_levelDecorationRects;
+ EoBRect8 *_levelDecorationRects;
SpriteDecoration *_doorSwitches;
int8 _currentSub;
@@ -651,7 +651,7 @@ protected:
void updateScriptTimers();
virtual void updateScriptTimersExtra() {}
- EobInfProcessor *_inf;
+ EoBInfProcessor *_inf;
int _stepCounter;
int _stepsUntilScriptCall;
ScriptTimer _scriptTimers[5];
@@ -736,7 +736,7 @@ protected:
static const int16 _buttonList8[];
int _buttonList8Size;
- const EobGuiButtonDef *_buttonDefs;
+ const EoBGuiButtonDef *_buttonDefs;
const char *const *_characterGuiStringsHp;
const char *const *_characterGuiStringsWp;
@@ -863,8 +863,8 @@ protected:
bool _allowSkip;
- Screen_Eob *_screen;
- GUI_Eob *_gui;
+ Screen_EoB *_screen;
+ GUI_EoB *_gui;
// fight
void useSlotWeapon(int charIndex, int slotIndex, Item item);
@@ -872,34 +872,34 @@ protected:
int thrownAttack(int charIndex, int slotIndex, Item item);
int projectileWeaponAttack(int charIndex, Item item);
- void inflictMonsterDamage(EobMonsterInPlay *m, int damage, bool giveExperience);
- void calcAndInflictMonsterDamage(EobMonsterInPlay *m, int times, int pips, int offs, int flags, int savingThrowType, int savingThrowEffect);
+ void inflictMonsterDamage(EoBMonsterInPlay *m, int damage, bool giveExperience);
+ void calcAndInflictMonsterDamage(EoBMonsterInPlay *m, int times, int pips, int offs, int flags, int savingThrowType, int savingThrowEffect);
void calcAndInflictCharacterDamage(int charIndex, int times, int itemOrPips, int useStrModifierOrBase, int flags, int savingThrowType, int savingThrowEffect);
int calcCharacterDamage(int charIndex, int times, int itemOrPips, int useStrModifierOrBase, int flags, int savingThrowType, int damageType) ;
void inflictCharacterDamage(int charIndex, int damage);
bool characterAttackHitTest(int charIndex, int monsterIndex, int item, int attackType);
- bool monsterAttackHitTest(EobMonsterInPlay *m, int charIndex);
- bool flyingObjectMonsterHit(EobFlyingObject *fo, int monsterIndex);
- bool flyingObjectPartyHit(EobFlyingObject *fo);
+ bool monsterAttackHitTest(EoBMonsterInPlay *m, int charIndex);
+ bool flyingObjectMonsterHit(EoBFlyingObject *fo, int monsterIndex);
+ bool flyingObjectPartyHit(EoBFlyingObject *fo);
- void monsterCloseAttack(EobMonsterInPlay *m);
- void monsterSpellCast(EobMonsterInPlay *m, int type);
+ void monsterCloseAttack(EoBMonsterInPlay *m);
+ void monsterSpellCast(EoBMonsterInPlay *m, int type);
void statusAttack(int charIndex, int attackStatusFlags, const char *attackStatusString, int savingThrowType, uint32 effectDuration, int restoreEvent, int noRefresh);
- int calcMonsterDamage(EobMonsterInPlay *m, int times, int pips, int offs, int flags, int savingThrowType, int savingThrowEffect);
- int calcDamageModifers(int charIndex, EobMonsterInPlay *m, int item, int itemType, int useStrModifier);
+ int calcMonsterDamage(EoBMonsterInPlay *m, int times, int pips, int offs, int flags, int savingThrowType, int savingThrowEffect);
+ int calcDamageModifers(int charIndex, EoBMonsterInPlay *m, int item, int itemType, int useStrModifier);
bool trySavingThrow(void *target, int hpModifier, int level, int type, int race);
bool specialAttackSavingThrow(int charIndex, int type);
int getSaveThrowModifier(int hpModifier, int level, int type);
bool calcDamageCheckItemType(int itemType);
int savingThrowReduceDamage(int savingThrowEffect, int damage);
- bool tryMonsterAttackEvasion(EobMonsterInPlay *m);
+ bool tryMonsterAttackEvasion(EoBMonsterInPlay *m);
int getStrHitChanceModifier(int charIndex);
int getStrDamageModifier(int charIndex);
int getDexHitChanceModifier(int charIndex);
int getMonsterAcHitChanceModifier(int charIndex, int monsterAc);
- void explodeMonster(EobMonsterInPlay *m);
+ void explodeMonster(EoBMonsterInPlay *m);
int _dstMonsterIndex;
bool _preventMonsterFlash;
@@ -926,9 +926,9 @@ protected:
void setSpellEventTimer(int spell, int timerBaseFactor, int timerLength, int timerLevelFactor, int updateExistingTimer);
void sortCharacterSpellList(int charIndex);
- bool magicObjectDamageHit(EobFlyingObject *fo, int dcTimes, int dcPips, int dcOffs, int level);
- bool magicObjectStatusHit(EobMonsterInPlay *m, int type, bool tryEvade, int mod);
- bool turnUndeadHit(EobMonsterInPlay *m, int hitChance, int casterLevel);
+ bool magicObjectDamageHit(EoBFlyingObject *fo, int dcTimes, int dcPips, int dcOffs, int level);
+ bool magicObjectStatusHit(EoBMonsterInPlay *m, int type, bool tryEvade, int mod);
+ bool turnUndeadHit(EoBMonsterInPlay *m, int hitChance, int casterLevel);
void causeWounds(int dcTimes, int dcPips, int dcOffs);
int getMagicWeaponSlot(int charIndex);
@@ -1033,10 +1033,10 @@ protected:
int _characterSpellTarget;
bool _returnAfterSpellCallback;
- typedef void (EobCoreEngine::*SpellStartCallback)();
- typedef bool (EobCoreEngine::*SpellEndCallback)(void *obj);
+ typedef void (EoBCoreEngine::*SpellStartCallback)();
+ typedef bool (EoBCoreEngine::*SpellEndCallback)(void *obj);
- struct EobSpell {
+ struct EoBSpell {
const char *name;
SpellStartCallback startCallback;
uint16 flags;
@@ -1047,7 +1047,7 @@ protected:
uint16 damageFlags;
};
- EobSpell *_spells;
+ EoBSpell *_spells;
int _numSpells;
struct WallOfForce {
@@ -1096,8 +1096,8 @@ protected:
int _coneOfColdGfxTblSize;
// Menu
- EobMenuDef *_menuDefs;
- const EobMenuButtonDef *_menuButtonDefs;
+ EoBMenuDef *_menuDefs;
+ const EoBMenuButtonDef *_menuButtonDefs;
bool _configMouse;
diff --git a/engines/kyra/gui_eob.cpp b/engines/kyra/gui_eob.cpp
index 6d13b17a5f..76b4b35b08 100644
--- a/engines/kyra/gui_eob.cpp
+++ b/engines/kyra/gui_eob.cpp
@@ -35,7 +35,7 @@
namespace Kyra {
-Button *EobCoreEngine::gui_getButton(Button *buttonList, int index) {
+Button *EoBCoreEngine::gui_getButton(Button *buttonList, int index) {
while (buttonList) {
if (buttonList->index == index)
return buttonList;
@@ -45,8 +45,8 @@ Button *EobCoreEngine::gui_getButton(Button *buttonList, int index) {
return 0;
}
-void EobCoreEngine::gui_drawPlayField(bool refresh) {
- _screen->loadEobBitmap("PLAYFLD", 0, 5, 3, 2);
+void EoBCoreEngine::gui_drawPlayField(bool refresh) {
+ _screen->loadEoBBitmap("PLAYFLD", 0, 5, 3, 2);
int cp = _screen->setCurPage(2);
gui_drawCompass(true);
@@ -59,29 +59,29 @@ void EobCoreEngine::gui_drawPlayField(bool refresh) {
if (!_loading)
_screen->updateScreen();
- _screen->loadEobBitmap("INVENT", 0, 5, 3, 2);
+ _screen->loadEoBBitmap("INVENT", 0, 5, 3, 2);
}
-void EobCoreEngine::gui_restorePlayField() {
+void EoBCoreEngine::gui_restorePlayField() {
loadVcnData(0, 0);
_screen->_curPage = 0;
gui_drawPlayField(true);
gui_drawAllCharPortraitsWithStats();
}
-void EobCoreEngine::gui_drawAllCharPortraitsWithStats() {
+void EoBCoreEngine::gui_drawAllCharPortraitsWithStats() {
for (int i = 0; i < 6; i++)
gui_drawCharPortraitWithStats(i);
}
-void EobCoreEngine::gui_drawCharPortraitWithStats(int index) {
+void EoBCoreEngine::gui_drawCharPortraitWithStats(int index) {
if (!testCharacter(index, 1))
return;
static const uint16 charPortraitPosX[] = { 8, 80, 184, 256 };
static const uint16 charPortraitPosY[] = { 2, 54, 106 };
- EobCharacter *c = &_characters[index];
+ EoBCharacter *c = &_characters[index];
int txtCol1 = 12;
int txtCol2 = 15;
@@ -200,7 +200,7 @@ void EobCoreEngine::gui_drawCharPortraitWithStats(int index) {
}
}
-void EobCoreEngine::gui_drawFaceShape(int index) {
+void EoBCoreEngine::gui_drawFaceShape(int index) {
if (!testCharacter(index, 1))
return;
@@ -221,7 +221,7 @@ void EobCoreEngine::gui_drawFaceShape(int index) {
y = 3;
}
- EobCharacter *c = &_characters[index];
+ EoBCharacter *c = &_characters[index];
if (c->hitPointsCur == -10) {
_screen->drawShape(_screen->_curPage, _deadCharShape, x, y, 0);
@@ -261,7 +261,7 @@ void EobCoreEngine::gui_drawFaceShape(int index) {
//}
}
-void EobCoreEngine::gui_drawWeaponSlot(int charIndex, int slot) {
+void EoBCoreEngine::gui_drawWeaponSlot(int charIndex, int slot) {
static const uint8 xCoords[] = { 40, 112 };
static const uint8 yCoords[] = { 11, 27, 63, 79, 115, 131 };
@@ -290,7 +290,7 @@ void EobCoreEngine::gui_drawWeaponSlot(int charIndex, int slot) {
_screen->drawShape(_screen->_curPage, _weaponSlotGrid, x, y, 0);
}
-void EobCoreEngine::gui_drawWeaponSlotStatus(int x, int y, int status) {
+void EoBCoreEngine::gui_drawWeaponSlotStatus(int x, int y, int status) {
Common::String tmpStr;
Common::String tmpStr2;
@@ -330,7 +330,7 @@ void EobCoreEngine::gui_drawWeaponSlotStatus(int x, int y, int status) {
}
}
-void EobCoreEngine::gui_drawHitpoints(int index) {
+void EoBCoreEngine::gui_drawHitpoints(int index) {
if (!testCharacter(index, 1))
return;
@@ -356,7 +356,7 @@ void EobCoreEngine::gui_drawHitpoints(int index) {
h = 5;
}
- EobCharacter *c = &_characters[index];
+ EoBCharacter *c = &_characters[index];
if (_configHpBarGraphs) {
int bgCur = c->hitPointsCur + 10;
@@ -383,14 +383,14 @@ void EobCoreEngine::gui_drawHitpoints(int index) {
}
}
-void EobCoreEngine::gui_drawFoodStatusGraph(int index) {
+void EoBCoreEngine::gui_drawFoodStatusGraph(int index) {
if (!_currentControlMode)
return;
if (!testCharacter(index, 1))
return;
- EobCharacter *c = &_characters[index];
+ EoBCharacter *c = &_characters[index];
if (!(c->flags & 1))
return;
@@ -401,12 +401,12 @@ void EobCoreEngine::gui_drawFoodStatusGraph(int index) {
gui_drawHorizontalBarGraph(250, 25, 51, 5, c->food, 100, col, _color5);
}
-void EobCoreEngine::gui_drawHorizontalBarGraph(int x, int y, int w, int h, int32 curVal, int32 maxVal, int col1, int col2) {
+void EoBCoreEngine::gui_drawHorizontalBarGraph(int x, int y, int w, int h, int32 curVal, int32 maxVal, int col1, int col2) {
gui_drawBox(x - 1, y - 1, w + 3, h + 2, _color2_1, _color1_1, -1);
KyraRpgEngine::gui_drawHorizontalBarGraph(x, y, w + 2, h, curVal, maxVal, col1, col2);
}
-void EobCoreEngine::gui_drawCharPortraitStatusFrame(int index) {
+void EoBCoreEngine::gui_drawCharPortraitStatusFrame(int index) {
uint8 redGreenColor = (_partyEffectFlags & 0x20000) ? 4 : 6;
static const uint8 xCoords[] = { 8, 80 };
@@ -417,7 +417,7 @@ void EobCoreEngine::gui_drawCharPortraitStatusFrame(int index) {
if (!_screen->_curPage)
x += 176;
- EobCharacter *c = &_characters[index];
+ EoBCharacter *c = &_characters[index];
bool redGreen = ((c->effectFlags & 0x4818) || (_partyEffectFlags & 0x20000) || c->effectsRemainder[0] || c->effectsRemainder[1]) ? true : false;
bool yellow = ((c->effectFlags & 0x13000) || (_partyEffectFlags & 0x8420)) ? true : false;
@@ -471,7 +471,7 @@ void EobCoreEngine::gui_drawCharPortraitStatusFrame(int index) {
}
}
-void EobCoreEngine::gui_drawInventoryItem(int slot, int special, int pageNum) {
+void EoBCoreEngine::gui_drawInventoryItem(int slot, int special, int pageNum) {
int x = _inventorySlotsX[slot];
int y = _inventorySlotsY[slot];
@@ -502,7 +502,7 @@ void EobCoreEngine::gui_drawInventoryItem(int slot, int special, int pageNum) {
_screen->updateScreen();
}
-void EobCoreEngine::gui_drawCompass(bool force) {
+void EoBCoreEngine::gui_drawCompass(bool force) {
if (_currentDirection == _compassDirection && !force)
return;
@@ -516,12 +516,12 @@ void EobCoreEngine::gui_drawCompass(bool force) {
_compassDirection = _currentDirection;
}
-void EobCoreEngine::gui_drawDialogueBox() {
+void EoBCoreEngine::gui_drawDialogueBox() {
gui_drawBox(0, 121, 320, 79, _color1_1, _color2_1, _bkgColor_1);
txt()->clearCurDim();
}
-void EobCoreEngine::gui_drawSpellbook() {
+void EoBCoreEngine::gui_drawSpellbook() {
_screen->setCurPage(2);
int numTab = (_flags.gameID == GI_EOB1) ? 5 : 6;
_screen->copyRegion(64, 121, 64, 121, 112, 56, 0, 2, Screen::CR_NO_P_CHECK);
@@ -608,7 +608,7 @@ void EobCoreEngine::gui_drawSpellbook() {
_screen->updateScreen();
}
-void EobCoreEngine::gui_drawSpellbookScrollArrow(int x, int y, int direction) {
+void EoBCoreEngine::gui_drawSpellbookScrollArrow(int x, int y, int direction) {
static const uint8 x1[] = { 0, 2, 1, 0, 2, 2 };
static const uint8 x2[] = { 2, 4, 5, 6, 4, 4 };
if (direction) {
@@ -622,7 +622,7 @@ void EobCoreEngine::gui_drawSpellbookScrollArrow(int x, int y, int direction) {
}
}
-void EobCoreEngine::gui_updateSlotAfterScrollUse() {
+void EoBCoreEngine::gui_updateSlotAfterScrollUse() {
_characters[_openBookChar].disabledSlots ^= (1 << (--_castScrollSlot));
setCharEventTimer(_openBookChar, 18, _castScrollSlot + 2, 1);
gui_drawCharPortraitWithStats(_openBookChar);
@@ -632,7 +632,7 @@ void EobCoreEngine::gui_updateSlotAfterScrollUse() {
gui_toggleButtons();
}
-void EobCoreEngine::gui_updateControls() {
+void EoBCoreEngine::gui_updateControls() {
Button b;
if (_currentControlMode)
clickedPortraitRestore(&b);
@@ -640,7 +640,7 @@ void EobCoreEngine::gui_updateControls() {
clickedSpellbookAbort(&b);
}
-void EobCoreEngine::gui_toggleButtons() {
+void EoBCoreEngine::gui_toggleButtons() {
if (_currentControlMode == 0)
gui_setPlayFieldButtons();
else if (_currentControlMode == 1)
@@ -649,32 +649,32 @@ void EobCoreEngine::gui_toggleButtons() {
gui_setStatsListButtons();
}
-void EobCoreEngine::gui_setPlayFieldButtons() {
+void EoBCoreEngine::gui_setPlayFieldButtons() {
gui_resetButtonList();
gui_initButtonsFromList(_updateFlags ? _buttonList2 : _buttonList1);
}
-void EobCoreEngine::gui_setInventoryButtons() {
+void EoBCoreEngine::gui_setInventoryButtons() {
gui_resetButtonList();
gui_initButtonsFromList(_updateFlags ? _buttonList5 : _buttonList3);
}
-void EobCoreEngine::gui_setStatsListButtons() {
+void EoBCoreEngine::gui_setStatsListButtons() {
gui_resetButtonList();
gui_initButtonsFromList(_updateFlags ? _buttonList6 : _buttonList4);
}
-void EobCoreEngine::gui_setSwapCharacterButtons() {
+void EoBCoreEngine::gui_setSwapCharacterButtons() {
gui_resetButtonList();
gui_initButtonsFromList(_buttonList7);
}
-void EobCoreEngine::gui_setCastOnWhomButtons() {
+void EoBCoreEngine::gui_setCastOnWhomButtons() {
gui_resetButtonList();
gui_initButtonsFromList(_buttonList8);
}
-void EobCoreEngine::gui_initButton(int index, int, int, int) {
+void EoBCoreEngine::gui_initButton(int index, int, int, int) {
Button *b = 0;
int cnt = 1;
@@ -702,7 +702,7 @@ void EobCoreEngine::gui_initButton(int index, int, int, int) {
b->index = index + 1;
- const EobGuiButtonDef *d = &_buttonDefs[index];
+ const EoBGuiButtonDef *d = &_buttonDefs[index];
b->buttonCallback = _buttonCallbacks[index];
if (_flags.gameID == GI_EOB1) {
@@ -731,7 +731,7 @@ void EobCoreEngine::gui_initButton(int index, int, int, int) {
b->arg = d->arg;
}
-int EobCoreEngine::clickedCharPortraitDefault(Button *button) {
+int EoBCoreEngine::clickedCharPortraitDefault(Button *button) {
if (!testCharacter(button->arg, 1))
return 1;
@@ -739,7 +739,7 @@ int EobCoreEngine::clickedCharPortraitDefault(Button *button) {
return 0;
}
-int EobCoreEngine::clickedCamp(Button *button) {
+int EoBCoreEngine::clickedCamp(Button *button) {
gui_updateControls();
disableSysTimer(2);
int cd = _screen->curDimIndex();
@@ -779,7 +779,7 @@ int EobCoreEngine::clickedCamp(Button *button) {
return button->arg;
}
-int EobCoreEngine::clickedSceneDropPickupItem(Button *button) {
+int EoBCoreEngine::clickedSceneDropPickupItem(Button *button) {
uint16 block = _currentBlock;
if (button->arg > 1) {
block = calcNewBlockPosition(_currentBlock, _currentDirection);
@@ -805,7 +805,7 @@ int EobCoreEngine::clickedSceneDropPickupItem(Button *button) {
return 1;
}
-int EobCoreEngine::clickedCharPortrait2(Button *button) {
+int EoBCoreEngine::clickedCharPortrait2(Button *button) {
if (!_gui->_progress) {
if (!testCharacter(button->arg, 1))
return button->index;
@@ -822,7 +822,7 @@ int EobCoreEngine::clickedCharPortrait2(Button *button) {
return button->index;
}
-int EobCoreEngine::clickedWeaponSlot(Button *button) {
+int EoBCoreEngine::clickedWeaponSlot(Button *button) {
if (!testCharacter(button->arg, 1))
return 1;
@@ -840,7 +840,7 @@ int EobCoreEngine::clickedWeaponSlot(Button *button) {
return 1;
}
-int EobCoreEngine::clickedCharNameLabelRight(Button *button) {
+int EoBCoreEngine::clickedCharNameLabelRight(Button *button) {
if (!testCharacter(button->arg, 1))
return button->index;
@@ -870,17 +870,17 @@ int EobCoreEngine::clickedCharNameLabelRight(Button *button) {
return button->index;
}
-int EobCoreEngine::clickedInventorySlot(Button *button) {
+int EoBCoreEngine::clickedInventorySlot(Button *button) {
gui_processInventorySlotClick(button->arg);
return button->index;
}
-int EobCoreEngine::clickedEatItem(Button *button) {
+int EoBCoreEngine::clickedEatItem(Button *button) {
eatItemInHand(_updateCharNum);
return button->index;
}
-int EobCoreEngine::clickedInventoryPrevChar(Button *button) {
+int EoBCoreEngine::clickedInventoryPrevChar(Button *button) {
if (_gui->_progress == 1)
_updateCharNum = 0;
else if (_gui->_progress == 2)
@@ -892,7 +892,7 @@ int EobCoreEngine::clickedInventoryPrevChar(Button *button) {
return button->index;
}
-int EobCoreEngine::clickedInventoryNextChar(Button *button) {
+int EoBCoreEngine::clickedInventoryNextChar(Button *button) {
int oldVal = _updateCharNum;
int v = button->arg == 2 ? 2 : 0;
@@ -912,7 +912,7 @@ int EobCoreEngine::clickedInventoryNextChar(Button *button) {
return button->index;
}
-int EobCoreEngine::clickedSpellbookTab(Button *button) {
+int EoBCoreEngine::clickedSpellbookTab(Button *button) {
_openBookSpellLevel = button->arg;
_openBookSpellListOffset = 0;
@@ -930,7 +930,7 @@ int EobCoreEngine::clickedSpellbookTab(Button *button) {
return button->index;
}
-int EobCoreEngine::clickedSpellbookList(Button *button) {
+int EoBCoreEngine::clickedSpellbookList(Button *button) {
int listIndex = button->arg;
bool spellLevelAvailable = false;
@@ -1006,7 +1006,7 @@ int EobCoreEngine::clickedSpellbookList(Button *button) {
return button->index;
}
-int EobCoreEngine::clickedCastSpellOnCharacter(Button *button) {
+int EoBCoreEngine::clickedCastSpellOnCharacter(Button *button) {
_activeSpellCharId = button->arg & 0xff;
if (_activeSpellCharId == 0xff) {
@@ -1025,7 +1025,7 @@ int EobCoreEngine::clickedCastSpellOnCharacter(Button *button) {
return button->index;
}
-int EobCoreEngine::clickedInventoryNextPage(Button *button) {
+int EoBCoreEngine::clickedInventoryNextPage(Button *button) {
if (_currentControlMode == 2) {
gui_setInventoryButtons();
_currentControlMode = 1;
@@ -1038,7 +1038,7 @@ int EobCoreEngine::clickedInventoryNextPage(Button *button) {
return button->index;
}
-int EobCoreEngine::clickedPortraitRestore(Button *button) {
+int EoBCoreEngine::clickedPortraitRestore(Button *button) {
_currentControlMode = 0;
_screen->_curPage = 2;
_screen->copyRegion(0, 0, 0, 0, 144, 168, 5, _screen->_curPage, Screen::CR_NO_P_CHECK);
@@ -1050,7 +1050,7 @@ int EobCoreEngine::clickedPortraitRestore(Button *button) {
return button->index;
}
-int EobCoreEngine::clickedUpArrow(Button *button) {
+int EoBCoreEngine::clickedUpArrow(Button *button) {
int b = calcNewBlockPositionAndTestPassability(_currentBlock, _currentDirection);
if (b == -1) {
@@ -1063,7 +1063,7 @@ int EobCoreEngine::clickedUpArrow(Button *button) {
return button->index;
}
-int EobCoreEngine::clickedDownArrow(Button *button) {
+int EoBCoreEngine::clickedDownArrow(Button *button) {
int b = calcNewBlockPositionAndTestPassability(_currentBlock, (_currentDirection + 2) & 3);
if (b == -1) {
@@ -1076,7 +1076,7 @@ int EobCoreEngine::clickedDownArrow(Button *button) {
return button->index;
}
-int EobCoreEngine::clickedLeftArrow(Button *button) {
+int EoBCoreEngine::clickedLeftArrow(Button *button) {
int b = calcNewBlockPositionAndTestPassability(_currentBlock, (_currentDirection - 1) & 3);
if (b == -1) {
@@ -1089,7 +1089,7 @@ int EobCoreEngine::clickedLeftArrow(Button *button) {
return button->index;
}
-int EobCoreEngine::clickedRightArrow(Button *button) {
+int EoBCoreEngine::clickedRightArrow(Button *button) {
int b = calcNewBlockPositionAndTestPassability(_currentBlock, (_currentDirection + 1) & 3);
if (b == -1) {
@@ -1102,7 +1102,7 @@ int EobCoreEngine::clickedRightArrow(Button *button) {
return button->index;
}
-int EobCoreEngine::clickedTurnLeftArrow(Button *button) {
+int EoBCoreEngine::clickedTurnLeftArrow(Button *button) {
_currentDirection = (_currentDirection - 1) & 3;
//_keybControlUnk = -1;
_sceneDefaultUpdate = 1;
@@ -1110,7 +1110,7 @@ int EobCoreEngine::clickedTurnLeftArrow(Button *button) {
return button->index;
}
-int EobCoreEngine::clickedTurnRightArrow(Button *button) {
+int EoBCoreEngine::clickedTurnRightArrow(Button *button) {
_currentDirection = (_currentDirection + 1) & 3;
//_keybControlUnk = -1;
_sceneDefaultUpdate = 1;
@@ -1118,7 +1118,7 @@ int EobCoreEngine::clickedTurnRightArrow(Button *button) {
return button->index;
}
-int EobCoreEngine::clickedAbortCharSwitch(Button *button) {
+int EoBCoreEngine::clickedAbortCharSwitch(Button *button) {
_timer->disable(0);
int c = _exchangeCharacterId;
_exchangeCharacterId = -1;
@@ -1127,7 +1127,7 @@ int EobCoreEngine::clickedAbortCharSwitch(Button *button) {
return button->index;
}
-int EobCoreEngine::clickedSceneThrowItem(Button *button) {
+int EoBCoreEngine::clickedSceneThrowItem(Button *button) {
if (!_itemInHand)
return button->index;
@@ -1139,12 +1139,12 @@ int EobCoreEngine::clickedSceneThrowItem(Button *button) {
return button->index;
}
-int EobCoreEngine::clickedSceneSpecial(Button *button) {
+int EoBCoreEngine::clickedSceneSpecial(Button *button) {
_clickedSpecialFlag = 0x40;
return specialWallAction(calcNewBlockPosition(_currentBlock, _currentDirection), _currentDirection);
}
-int EobCoreEngine::clickedSpellbookAbort(Button *button) {
+int EoBCoreEngine::clickedSpellbookAbort(Button *button) {
_updateFlags = 0;
_screen->copyRegion(0, 0, 64, 121, 112, 56, 10, 0, Screen::CR_NO_P_CHECK);
_screen->updateScreen();
@@ -1153,7 +1153,7 @@ int EobCoreEngine::clickedSpellbookAbort(Button *button) {
return button->index;
}
-int EobCoreEngine::clickedSpellbookScroll(Button *button) {
+int EoBCoreEngine::clickedSpellbookScroll(Button *button) {
if (_openBookAvailableSpells[_openBookSpellLevel * 10] > 0) {
_openBookSpellListOffset ^= 6;
_openBookSpellSelectedItem = 0;
@@ -1169,11 +1169,11 @@ int EobCoreEngine::clickedSpellbookScroll(Button *button) {
return button->index;
}
-int EobCoreEngine::clickedUnk(Button *button) {
+int EoBCoreEngine::clickedUnk(Button *button) {
return button->index;
}
-void EobCoreEngine::gui_processCharPortraitClick(int index) {
+void EoBCoreEngine::gui_processCharPortraitClick(int index) {
if (index == _updateCharNum)
return;
@@ -1184,7 +1184,7 @@ void EobCoreEngine::gui_processCharPortraitClick(int index) {
gui_drawCharPortraitWithStats(index);
}
-void EobCoreEngine::gui_processWeaponSlotClickLeft(int charIndex, int slotIndex) {
+void EoBCoreEngine::gui_processWeaponSlotClickLeft(int charIndex, int slotIndex) {
int itm = _characters[charIndex].inventory[slotIndex];
if (_items[itm].flags & 0x20)
return;
@@ -1202,7 +1202,7 @@ void EobCoreEngine::gui_processWeaponSlotClickLeft(int charIndex, int slotIndex)
recalcArmorClass(charIndex);
}
-void EobCoreEngine::gui_processWeaponSlotClickRight(int charIndex, int slotIndex) {
+void EoBCoreEngine::gui_processWeaponSlotClickRight(int charIndex, int slotIndex) {
if (!testCharacter(charIndex, 0x0d))
return;
@@ -1308,7 +1308,7 @@ void EobCoreEngine::gui_processWeaponSlotClickRight(int charIndex, int slotIndex
_lastUsedItem = 0;
}
-void EobCoreEngine::gui_processInventorySlotClick(int slot) {
+void EoBCoreEngine::gui_processInventorySlotClick(int slot) {
int itm = _characters[_updateCharNum].inventory[slot];
int ih = _itemInHand;
if (!validateInventorySlotForItem(ih, _updateCharNum, slot))
@@ -1334,7 +1334,7 @@ void EobCoreEngine::gui_processInventorySlotClick(int slot) {
}
}
-GUI_Eob::GUI_Eob(EobCoreEngine *vm) : GUI(vm), _vm(vm), _screen(vm->_screen) {
+GUI_EoB::GUI_EoB(EoBCoreEngine *vm) : GUI(vm), _vm(vm), _screen(vm->_screen) {
_menuStringsPrefsTemp = new char*[4];
memset(_menuStringsPrefsTemp, 0, 4 * sizeof(char*));
@@ -1374,7 +1374,7 @@ GUI_Eob::GUI_Eob(EobCoreEngine *vm) : GUI(vm), _vm(vm), _screen(vm->_screen) {
_needRest = false;
}
-GUI_Eob::~GUI_Eob() {
+GUI_EoB::~GUI_EoB() {
if (_menuStringsPrefsTemp) {
for (int i = 0; i < 4; i++)
delete[] _menuStringsPrefsTemp[i];
@@ -1392,7 +1392,7 @@ GUI_Eob::~GUI_Eob() {
delete[] _numAssignedSpellsOfType;
}
-void GUI_Eob::processButton(Button *button) {
+void GUI_EoB::processButton(Button *button) {
if (!button->data0Val1 && !button->data2Val1 && !button->data1Val1)
return;
@@ -1496,7 +1496,7 @@ void GUI_Eob::processButton(Button *button) {
}
}
-int GUI_Eob::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8 mouseWheel) {
+int GUI_EoB::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8 mouseWheel) {
_progress = 0;
uint16 in = inputFlags & 0xff;
uint16 buttonReleaseFlag = 0;
@@ -1878,7 +1878,7 @@ int GUI_Eob::processButtonList(Kyra::Button *buttonList, uint16 inputFlags, int8
return result;
}
-void GUI_Eob::simpleMenu_setup(int sd, int maxItem, const char *const *strings, int32 menuItemsMask, int itemOffset, int lineSpacing) {
+void GUI_EoB::simpleMenu_setup(int sd, int maxItem, const char *const *strings, int32 menuItemsMask, int itemOffset, int lineSpacing) {
simpleMenu_initMenuItemsMask(sd, maxItem, menuItemsMask, itemOffset);
const ScreenDim *dm = _screen->getScreenDim(19 + sd);
@@ -1901,7 +1901,7 @@ void GUI_Eob::simpleMenu_setup(int sd, int maxItem, const char *const *strings,
_vm->removeInputTop();
}
-int GUI_Eob::simpleMenu_process(int sd, const char *const *strings, void *b, int32 menuItemsMask, int itemOffset) {
+int GUI_EoB::simpleMenu_process(int sd, const char *const *strings, void *b, int32 menuItemsMask, int itemOffset) {
const ScreenDim *dm = _screen->getScreenDim(19 + sd);
int h = _menuNumItems - 1;
int currentItem = _menuCur % _menuNumItems;
@@ -1958,7 +1958,7 @@ int GUI_Eob::simpleMenu_process(int sd, const char *const *strings, void *b, int
return result;
}
-int GUI_Eob::simpleMenu_getMenuItem(int index, int32 menuItemsMask, int itemOffset) {
+int GUI_EoB::simpleMenu_getMenuItem(int index, int32 menuItemsMask, int itemOffset) {
if (menuItemsMask == -1)
return index;
@@ -1976,7 +1976,7 @@ int GUI_Eob::simpleMenu_getMenuItem(int index, int32 menuItemsMask, int itemOffs
return res;
}
-void GUI_Eob::simpleMenu_flashSelection(const char *str, int x, int y, int color1, int color2, int color3) {
+void GUI_EoB::simpleMenu_flashSelection(const char *str, int x, int y, int color1, int color2, int color3) {
for (int i = 0; i < 3; i++) {
_screen->printText(str, x, y, color2, color3);
_screen->updateScreen();
@@ -1987,7 +1987,7 @@ void GUI_Eob::simpleMenu_flashSelection(const char *str, int x, int y, int color
}
}
-void GUI_Eob::runCampMenu() {
+void GUI_EoB::runCampMenu() {
Screen::FontId of = _screen->setFont(Screen::FID_8_FNT);
Button *highlightButton = 0;
@@ -2211,7 +2211,7 @@ void GUI_Eob::runCampMenu() {
_vm->writeSettings();
}
-bool GUI_Eob::runLoadMenu(int x, int y) {
+bool GUI_EoB::runLoadMenu(int x, int y) {
const ScreenDim *dm = _screen->getScreenDim(11);
int xo = dm->sx;
int yo = dm->sy;
@@ -2239,7 +2239,7 @@ bool GUI_Eob::runLoadMenu(int x, int y) {
return result;
}
-bool GUI_Eob::confirmDialogue2(int dim, int id, int deflt) {
+bool GUI_EoB::confirmDialogue2(int dim, int id, int deflt) {
int od = _screen->curDimIndex();
Screen::FontId of = _screen->setFont(Screen::FID_8_FNT);
_screen->setScreenDim(dim);
@@ -2307,7 +2307,7 @@ bool GUI_Eob::confirmDialogue2(int dim, int id, int deflt) {
return newHighlight ? false : true;
}
-void GUI_Eob::messageDialogue2(int dim, int id, int buttonTextCol) {
+void GUI_EoB::messageDialogue2(int dim, int id, int buttonTextCol) {
drawMenuButtonBox(_screen->_curDim->sx << 3, _screen->_curDim->sy, _screen->_curDim->w << 3, _screen->_curDim->h, false, false);
_screen->_curPage = 2;
@@ -2345,7 +2345,7 @@ void GUI_Eob::messageDialogue2(int dim, int id, int buttonTextCol) {
}
-void GUI_Eob::updateBoxFrameHighLight(int box) {
+void GUI_EoB::updateBoxFrameHighLight(int box) {
static const uint8 colorTable[] = { 0x0F, 0xB0, 0xB2, 0xB4, 0xB6, 0xB8, 0xBA, 0xBC, 0x0C, 0xBC, 0xBA, 0xB8, 0xB6, 0xB4, 0xB2, 0xB0, 0x00 };
if (_updateBoxIndex == box) {
@@ -2358,7 +2358,7 @@ void GUI_Eob::updateBoxFrameHighLight(int box) {
if (!colorTable[_updateBoxColorIndex])
_updateBoxColorIndex = 0;
- const EobRect16 *r = &_updateBoxFrameHighLights[_updateBoxIndex];
+ const EoBRect16 *r = &_updateBoxFrameHighLights[_updateBoxIndex];
_screen->drawBox(r->x1, r->y1, r->x2, r->y2, colorTable[_updateBoxColorIndex++]);
_screen->updateScreen();
@@ -2366,7 +2366,7 @@ void GUI_Eob::updateBoxFrameHighLight(int box) {
} else {
if (_updateBoxIndex != -1) {
- const EobRect16 *r = &_updateBoxFrameHighLights[_updateBoxIndex];
+ const EoBRect16 *r = &_updateBoxFrameHighLights[_updateBoxIndex];
_screen->drawBox(r->x1, r->y1, r->x2, r->y2, 12);
_screen->updateScreen();
}
@@ -2377,7 +2377,7 @@ void GUI_Eob::updateBoxFrameHighLight(int box) {
}
}
-int GUI_Eob::getTextInput(char *dest, int x, int y, int destMaxLen, int textColor1, int textColor2, int cursorColor) {
+int GUI_EoB::getTextInput(char *dest, int x, int y, int destMaxLen, int textColor1, int textColor2, int cursorColor) {
uint8 cursorState = 1;
char sufx[] = " ";
@@ -2495,14 +2495,14 @@ int GUI_Eob::getTextInput(char *dest, int x, int y, int destMaxLen, int textColo
return _keyPressed.keycode == Common::KEYCODE_ESCAPE ? -1 : len;
}
-void GUI_Eob::createScreenThumbnail(Graphics::Surface &dst) {
+void GUI_EoB::createScreenThumbnail(Graphics::Surface &dst) {
uint8 *screenPal = new uint8[768];
_screen->getRealPalette(0, screenPal);
::createThumbnail(&dst, _screen->getCPagePtr(7), Screen::SCREEN_W, Screen::SCREEN_H, screenPal);
delete[] screenPal;
}
-void GUI_Eob::simpleMenu_initMenuItemsMask(int menuId, int maxItem, int32 menuItemsMask, int itemOffset) {
+void GUI_EoB::simpleMenu_initMenuItemsMask(int menuId, int maxItem, int32 menuItemsMask, int itemOffset) {
if (menuItemsMask == -1) {
_menuNumItems = _screen->getScreenDim(19 + menuId)->h;
_menuCur = _screen->getScreenDim(19 + menuId)->unk8;
@@ -2519,7 +2519,7 @@ void GUI_Eob::simpleMenu_initMenuItemsMask(int menuId, int maxItem, int32 menuIt
_menuCur = 0;
}
-bool GUI_Eob::runSaveMenu(int x, int y) {
+bool GUI_EoB::runSaveMenu(int x, int y) {
const ScreenDim *dm = _screen->getScreenDim(11);
int xo = dm->sx;
int yo = dm->sy;
@@ -2574,7 +2574,7 @@ bool GUI_Eob::runSaveMenu(int x, int y) {
return result;
}
-int GUI_Eob::selectSaveSlotDialogue(int x, int y, int id) {
+int GUI_EoB::selectSaveSlotDialogue(int x, int y, int id) {
assert (id < 2);
_saveSlotX = _saveSlotY = 0;
@@ -2685,7 +2685,7 @@ int GUI_Eob::selectSaveSlotDialogue(int x, int y, int id) {
return newHighlight;
}
-void GUI_Eob::runMemorizePrayMenu(int charIndex, int spellType) {
+void GUI_EoB::runMemorizePrayMenu(int charIndex, int spellType) {
if (charIndex == -1)
return;
@@ -2695,7 +2695,7 @@ void GUI_Eob::runMemorizePrayMenu(int charIndex, int spellType) {
int li = 0;
int lv = 0;
- EobCharacter *c = &_vm->_characters[charIndex];
+ EoBCharacter *c = &_vm->_characters[charIndex];
int8 wm = c->wisdomCur - 12;
if (wm < 0)
wm = 0;
@@ -2963,7 +2963,7 @@ void GUI_Eob::runMemorizePrayMenu(int charIndex, int spellType) {
}
-void GUI_Eob::scribeScrollDialogue() {
+void GUI_EoB::scribeScrollDialogue() {
int16 *scrollInvSlot = new int16[32];
int16 *scrollCharacter = new int16[32];
int16 *menuItems = new int16[6];
@@ -2984,7 +2984,7 @@ void GUI_Eob::scribeScrollDialogue() {
int csel = selectCharacterDialogue(49);
if (csel != -1) {
- EobCharacter *c = &_vm->_characters[csel];
+ EoBCharacter *c = &_vm->_characters[csel];
int s = 0;
for (int i = 0; i < 32 && s < 6; i++) {
@@ -3085,7 +3085,7 @@ void GUI_Eob::scribeScrollDialogue() {
delete[] scrollInvSlot;
}
-bool GUI_Eob::restParty() {
+bool GUI_EoB::restParty() {
static const int8 eob1healSpells[] = { 2, 15, 20, 24 };
static const int8 eob2healSpells[] = { 3, 16, 20, 28 };
const int8 *spells = _vm->game() == GI_EOB1 ? eob1healSpells : eob2healSpells;
@@ -3366,7 +3366,7 @@ bool GUI_Eob::restParty() {
return res;
}
-bool GUI_Eob::confirmDialogue(int id) {
+bool GUI_EoB::confirmDialogue(int id) {
int od = _screen->curDimIndex();
Screen::FontId of = _screen->setFont(Screen::FID_8_FNT);
@@ -3428,7 +3428,7 @@ bool GUI_Eob::confirmDialogue(int id) {
return result;
}
-void GUI_Eob::messageDialogue(int dim, int id, int buttonTextCol) {
+void GUI_EoB::messageDialogue(int dim, int id, int buttonTextCol) {
int od = _screen->curDimIndex();
_screen->setScreenDim(dim);
Screen::FontId of = _screen->setFont(Screen::FID_8_FNT);
@@ -3468,7 +3468,7 @@ void GUI_Eob::messageDialogue(int dim, int id, int buttonTextCol) {
dm = _screen->getScreenDim(dim);
}
-int GUI_Eob::selectCharacterDialogue(int id) {
+int GUI_EoB::selectCharacterDialogue(int id) {
uint8 flags = (id == 26) ? (_vm->game() == GI_EOB1 ? 0x04 : 0x14) : 0x02;
_vm->removeInputTop();
@@ -3619,7 +3619,7 @@ int GUI_Eob::selectCharacterDialogue(int id) {
return result;
}
-void GUI_Eob::displayTextBox(int id) {
+void GUI_EoB::displayTextBox(int id) {
int op = _screen->setCurPage(2);
int od = _screen->curDimIndex();
Screen::FontId of = _screen->setFont(Screen::FID_8_FNT);
@@ -3644,10 +3644,10 @@ void GUI_Eob::displayTextBox(int id) {
_screen->setScreenDim(od);
}
-Button *GUI_Eob::initMenu(int id) {
+Button *GUI_EoB::initMenu(int id) {
_screen->setCurPage(2);
- EobMenuDef *m = &_vm->_menuDefs[id];
+ EoBMenuDef *m = &_vm->_menuDefs[id];
if (m->dim) {
const ScreenDim *dm = _screen->getScreenDim(m->dim);
@@ -3660,7 +3660,7 @@ Button *GUI_Eob::initMenu(int id) {
Button *buttons = 0;
for (int i = 0; i < m->numButtons; i++) {
- const EobMenuButtonDef *df = &_vm->_menuButtonDefs[m->firstButtonStrId + i];
+ const EoBMenuButtonDef *df = &_vm->_menuButtonDefs[m->firstButtonStrId + i];
Button *b = new Button;
b->index = m->firstButtonStrId + i + 1;
if (id == 4 && _vm->game() == GI_EOB1)
@@ -3691,11 +3691,11 @@ Button *GUI_Eob::initMenu(int id) {
return buttons;
}
-void GUI_Eob::drawMenuButton(Button *b, bool clicked, bool highlight, bool noFill) {
+void GUI_EoB::drawMenuButton(Button *b, bool clicked, bool highlight, bool noFill) {
if (!b)
return;
- EobMenuButtonDef *d = (EobMenuButtonDef*)b->extButtonDef;
+ EoBMenuButtonDef *d = (EoBMenuButtonDef*)b->extButtonDef;
if (d->flags & 1)
drawMenuButtonBox(b->x, b->y, b->width, b->height, clicked, noFill);
@@ -3718,7 +3718,7 @@ void GUI_Eob::drawMenuButton(Button *b, bool clicked, bool highlight, bool noFil
}
}
-void GUI_Eob::drawMenuButtonBox(int x, int y, int w, int h, bool clicked, bool noFill) {
+void GUI_EoB::drawMenuButtonBox(int x, int y, int w, int h, bool clicked, bool noFill) {
uint8 col1 = _vm->_color1_1;
uint8 col2 = _vm->_color2_1;
@@ -3729,7 +3729,7 @@ void GUI_Eob::drawMenuButtonBox(int x, int y, int w, int h, bool clicked, bool n
_vm->gui_drawBox(x + 1, y + 1, w - 2, h - 2, _vm->_color1_1, _vm->_color2_1, noFill ? -1 : _vm->_bkgColor_1);
}
-void GUI_Eob::drawTextBox(int dim, int id) {
+void GUI_EoB::drawTextBox(int dim, int id) {
int od = _screen->curDimIndex();
_screen->setScreenDim(dim);
const ScreenDim *dm = _screen->getScreenDim(dim);
@@ -3750,7 +3750,7 @@ void GUI_Eob::drawTextBox(int dim, int id) {
_screen->setFont(of);
}
-void GUI_Eob::drawSaveSlotButton(int slot, int redrawBox, int textCol) {
+void GUI_EoB::drawSaveSlotButton(int slot, int redrawBox, int textCol) {
if (slot < 0)
return;
@@ -3771,7 +3771,7 @@ void GUI_Eob::drawSaveSlotButton(int slot, int redrawBox, int textCol) {
_screen->printShadedText(s, x + 4, y + 3, textCol, 0);
}
-void GUI_Eob::memorizePrayMenuPrintString(int spellId, int bookPageIndex, int spellType, bool noFill, bool highLight) {
+void GUI_EoB::memorizePrayMenuPrintString(int spellId, int bookPageIndex, int spellType, bool noFill, bool highLight) {
if (bookPageIndex < 0)
return;
@@ -3789,7 +3789,7 @@ void GUI_Eob::memorizePrayMenuPrintString(int spellId, int bookPageIndex, int sp
}
}
-void GUI_Eob::updateOptionsStrings() {
+void GUI_EoB::updateOptionsStrings() {
for (int i = 0; i < 4; i++) {
delete[] _menuStringsPrefsTemp[i];
_menuStringsPrefsTemp[i] = new char[strlen(_vm->_menuStringsPrefs[i]) + 8];
@@ -3801,7 +3801,7 @@ void GUI_Eob::updateOptionsStrings() {
Common::strlcpy(_menuStringsPrefsTemp[3], Common::String::format(_vm->_menuStringsPrefs[3], _vm->_menuStringsOnOff[_vm->_configMouse ? 0 : 1]).c_str(), strlen(_vm->_menuStringsPrefs[3]) + 8);
}
-const char *GUI_Eob::getMenuString(int id) {
+const char *GUI_EoB::getMenuString(int id) {
static const char empty[] = "";
if (id >= 69)
@@ -3849,7 +3849,7 @@ const char *GUI_Eob::getMenuString(int id) {
return empty;
}
-Button *GUI_Eob::linkButton(Button *list, Button *newbt) {
+Button *GUI_EoB::linkButton(Button *list, Button *newbt) {
if (!list) {
list = newbt;
return list;
@@ -3867,7 +3867,7 @@ Button *GUI_Eob::linkButton(Button *list, Button *newbt) {
return resList;
}
-void GUI_Eob::releaseButtons(Button *list) {
+void GUI_EoB::releaseButtons(Button *list) {
while (list) {
Button *n = list->nextButton;
delete list;
@@ -3876,7 +3876,7 @@ void GUI_Eob::releaseButtons(Button *list) {
_vm->gui_notifyButtonListChanged();
}
-void GUI_Eob::setupSaveMenuSlots() {
+void GUI_EoB::setupSaveMenuSlots() {
for (int i = 0; i < 6; ++i) {
if (_savegameOffset + i < _savegameListSize) {
if (_savegameList[i + _savegameOffset]) {
@@ -3890,7 +3890,7 @@ void GUI_Eob::setupSaveMenuSlots() {
}
}
-int GUI_Eob::getHighlightSlot() {
+int GUI_EoB::getHighlightSlot() {
int res = -1;
Common::Point p = _vm->getMousePos();
@@ -3908,11 +3908,11 @@ int GUI_Eob::getHighlightSlot() {
return res;
}
-void GUI_Eob::sortSaveSlots() {
+void GUI_EoB::sortSaveSlots() {
Common::sort(_saveSlots.begin(), _saveSlots.end(), Common::Less<int>());
}
-void GUI_Eob::restParty_updateRestTime(int hours, bool init) {
+void GUI_EoB::restParty_updateRestTime(int hours, bool init) {
Screen::FontId of = _screen->setFont(Screen::FID_8_FNT);
int od = _screen->curDimIndex();
_screen->setScreenDim(10);
@@ -3937,7 +3937,7 @@ void GUI_Eob::restParty_updateRestTime(int hours, bool init) {
_screen->setFont(of);
}
-const EobRect16 GUI_Eob::_updateBoxFrameHighLights[] = {
+const EoBRect16 GUI_EoB::_updateBoxFrameHighLights[] = {
{ 0x00B7, 0x0001, 0x00F7, 0x0034 },
{ 0x00FF, 0x0001, 0x013F, 0x0034 },
{ 0x00B7, 0x0035, 0x00F7, 0x0068 },
diff --git a/engines/kyra/gui_eob.h b/engines/kyra/gui_eob.h
index 46d36b97b7..95dedcf418 100644
--- a/engines/kyra/gui_eob.h
+++ b/engines/kyra/gui_eob.h
@@ -31,7 +31,7 @@
namespace Kyra {
-struct EobRect16 {
+struct EoBRect16 {
int16 x1;
int16 y1;
uint16 x2;
@@ -39,14 +39,14 @@ struct EobRect16 {
};
class DarkMoonEngine;
-class Screen_Eob;
+class Screen_EoB;
-class GUI_Eob : public GUI {
- friend class EobCoreEngine;
+class GUI_EoB : public GUI {
+ friend class EoBCoreEngine;
friend class CharacterGenerator;
public:
- GUI_Eob(EobCoreEngine *vm);
- virtual ~GUI_Eob();
+ GUI_EoB(EoBCoreEngine *vm);
+ virtual ~GUI_EoB();
void initStaticData() {}
@@ -113,8 +113,8 @@ private:
int16 _saveSlotX;
int16 _saveSlotY;
- EobCoreEngine *_vm;
- Screen_Eob *_screen;
+ EoBCoreEngine *_vm;
+ Screen_EoB *_screen;
bool _pressFlag;
@@ -145,7 +145,7 @@ private:
int _updateBoxColorIndex;
uint32 _highLightBoxTimer;
- static const EobRect16 _updateBoxFrameHighLights[];
+ static const EoBRect16 _updateBoxFrameHighLights[];
};
} // End of namespace Kyra
diff --git a/engines/kyra/items_eob.cpp b/engines/kyra/items_eob.cpp
index 454e56a845..8ade6e1935 100644
--- a/engines/kyra/items_eob.cpp
+++ b/engines/kyra/items_eob.cpp
@@ -28,7 +28,7 @@
namespace Kyra {
-void EobCoreEngine::loadItemDefs() {
+void EoBCoreEngine::loadItemDefs() {
Common::SeekableReadStream *s = _res->createReadStream("item.dat");
_numItems = s->readUint16LE();
@@ -58,8 +58,8 @@ void EobCoreEngine::loadItemDefs() {
s = _res->createReadStream("itemtype.dat");
uint16 numTypes = s->readUint16LE();
- _itemTypes = new EobItemType[65];
- memset(_itemTypes, 0, sizeof(EobItemType) * 65);
+ _itemTypes = new EoBItemType[65];
+ memset(_itemTypes, 0, sizeof(EoBItemType) * 65);
for (int i = 0; i < numTypes; i++) {
_itemTypes[i].invFlags = s->readUint16LE();
@@ -80,8 +80,8 @@ void EobCoreEngine::loadItemDefs() {
delete s;
}
-Kyra::Item EobCoreEngine::duplicateItem(Item itemIndex) {
- EobItem *itm = &_items[itemIndex];
+Kyra::Item EoBCoreEngine::duplicateItem(Item itemIndex) {
+ EoBItem *itm = &_items[itemIndex];
if (itm->block == -1)
return 0;
@@ -99,21 +99,21 @@ Kyra::Item EobCoreEngine::duplicateItem(Item itemIndex) {
if (!foundSlot)
return 0;
- memcpy(&_items[i], itm, sizeof(EobItem));
+ memcpy(&_items[i], itm, sizeof(EoBItem));
return i;
}
-Item EobCoreEngine::createItemOnCurrentBlock(Item itemIndex) {
+Item EoBCoreEngine::createItemOnCurrentBlock(Item itemIndex) {
Item itm = duplicateItem(itemIndex);
setItemPosition((Item*)&_levelBlockProperties[_currentBlock].drawObjects, _currentBlock, itm, _dropItemDirIndex[(_currentDirection << 2) + rollDice(1, 2, -1)]);
return itm;
}
-void EobCoreEngine::setItemPosition(Item *itemQueue, int block, Item item, int pos) {
+void EoBCoreEngine::setItemPosition(Item *itemQueue, int block, Item item, int pos) {
if (!item)
return;
- EobItem *itm = &_items[item];
+ EoBItem *itm = &_items[item];
itm->pos = pos;
itm->block = block;
itm->level = block < 0 ? 0xff : _currentLevel;
@@ -121,15 +121,15 @@ void EobCoreEngine::setItemPosition(Item *itemQueue, int block, Item item, int p
if (!*itemQueue) {
*itemQueue = itm->next = itm->prev = item;
} else {
- EobItem *itmQ = &_items[*itemQueue];
- EobItem *itmQN = &_items[itmQ->next];
+ EoBItem *itmQ = &_items[*itemQueue];
+ EoBItem *itmQN = &_items[itmQ->next];
itm->prev = itmQN->prev;
itm->next = itmQ->next;
*itemQueue = itmQN->prev = itmQ->next = item;
}
}
-void EobCoreEngine::createInventoryItem(EobCharacter *c, Item itemIndex, int16 itemValue, int preferedInventorySlot) {
+void EoBCoreEngine::createInventoryItem(EoBCharacter *c, Item itemIndex, int16 itemValue, int preferedInventorySlot) {
if (itemIndex <= 0)
return;
@@ -154,7 +154,7 @@ void EobCoreEngine::createInventoryItem(EobCharacter *c, Item itemIndex, int16 i
}
}
-int EobCoreEngine::deleteInventoryItem(int charIndex, int slot) {
+int EoBCoreEngine::deleteInventoryItem(int charIndex, int slot) {
int itm = (slot == -1) ? _itemInHand : _characters[charIndex].inventory[slot];
_items[itm].block = -1;
@@ -173,7 +173,7 @@ int EobCoreEngine::deleteInventoryItem(int charIndex, int slot) {
return _items[itm].value;
}
-void EobCoreEngine::deleteBlockItem(uint16 block, int type) {
+void EoBCoreEngine::deleteBlockItem(uint16 block, int type) {
uint16 itm = _levelBlockProperties[block].drawObjects;
if (!itm)
return;
@@ -196,7 +196,7 @@ void EobCoreEngine::deleteBlockItem(uint16 block, int type) {
}
}
-int EobCoreEngine::validateInventorySlotForItem(Item item, int charIndex, int slot) {
+int EoBCoreEngine::validateInventorySlotForItem(Item item, int charIndex, int slot) {
if (item < 0)
return 0;
@@ -222,7 +222,7 @@ int EobCoreEngine::validateInventorySlotForItem(Item item, int charIndex, int sl
return 0;
}
-int EobCoreEngine::stripPartyItems(int16 itemType, int16 itemValue, int handleValueMode, int numItems) {
+int EoBCoreEngine::stripPartyItems(int16 itemType, int16 itemValue, int handleValueMode, int numItems) {
int itemsLeft = numItems;
for (bool runloop = true; runloop && itemsLeft; ) {
@@ -249,13 +249,13 @@ int EobCoreEngine::stripPartyItems(int16 itemType, int16 itemValue, int handleVa
return numItems - itemsLeft;
}
-bool EobCoreEngine::deletePartyItems(int16 itemType, int16 itemValue) {
+bool EoBCoreEngine::deletePartyItems(int16 itemType, int16 itemValue) {
bool res = false;
for (int i = 0; i < 6; i++) {
if (!testCharacter(i, 1))
continue;
- EobCharacter *c = &_characters[i];
+ EoBCharacter *c = &_characters[i];
for (int slot = checkInventoryForItem(i, itemType, itemValue); slot != -1; slot = checkInventoryForItem(i, itemType, itemValue)) {
int itm = c->inventory[slot];
_items[itm].block = -1;
@@ -283,14 +283,14 @@ bool EobCoreEngine::deletePartyItems(int16 itemType, int16 itemValue) {
return res;
}
-int EobCoreEngine::itemUsableByCharacter(int charIndex, Item item) {
+int EoBCoreEngine::itemUsableByCharacter(int charIndex, Item item) {
if (!item)
return 1;
return (_itemTypes[_items[item].type].allowedClasses & _classModifierFlags[_characters[charIndex].cClass]);
}
-int EobCoreEngine::countQueuedItems(Item itemQueue, int16 id, int16 type, int count, int includeFlyingItems) {
+int EoBCoreEngine::countQueuedItems(Item itemQueue, int16 id, int16 type, int count, int includeFlyingItems) {
uint16 o1 = itemQueue;
uint16 o2 = o1;
@@ -300,7 +300,7 @@ int EobCoreEngine::countQueuedItems(Item itemQueue, int16 id, int16 type, int co
int res = 0;
for (bool forceLoop = true; o1 != o2 || forceLoop; o1 = _items[o1].prev) {
- EobItem *itm = &_items[o1];
+ EoBItem *itm = &_items[o1];
forceLoop = false;
if (id != -1 || type != -1) {
if (((id != -1) || (id == -1 && type != itm->type)) && ((type != -1) || (type == -1 && id != o1)))
@@ -321,14 +321,14 @@ int EobCoreEngine::countQueuedItems(Item itemQueue, int16 id, int16 type, int co
return res;
}
-int EobCoreEngine::getQueuedItem(Item *items, int pos, int id) {
+int EoBCoreEngine::getQueuedItem(Item *items, int pos, int id) {
Item o1 = *items;
Item o2 = o1;
if (!o1)
return 0;
- EobItem *itm = &_items[o1];
+ EoBItem *itm = &_items[o1];
for (bool forceLoop = true; o1 != o2 || forceLoop; o1 = itm->prev) {
itm = &_items[o1];
@@ -353,8 +353,8 @@ int EobCoreEngine::getQueuedItem(Item *items, int pos, int id) {
return 0;
}
-void EobCoreEngine::printFullItemName(Item item) {
- EobItem *itm = &_items[item];
+void EoBCoreEngine::printFullItemName(Item item) {
+ EoBItem *itm = &_items[item];
const char *nameUnid = _itemNames[itm->nameUnid];
const char *nameId = _itemNames[itm->nameId];
uint8 f = _itemTypes[itm->type].extraProperties & 0x7f;
@@ -445,7 +445,7 @@ void EobCoreEngine::printFullItemName(Item item) {
_txt->printMessage(tmpString.c_str());
}
-void EobCoreEngine::identifyQueuedItems(Item itemQueue) {
+void EoBCoreEngine::identifyQueuedItems(Item itemQueue) {
if (!itemQueue)
return;
@@ -457,7 +457,7 @@ void EobCoreEngine::identifyQueuedItems(Item itemQueue) {
} while (first != itemQueue);
}
-void EobCoreEngine::drawItemIconShape(int pageNum, Item itemId, int x, int y) {
+void EoBCoreEngine::drawItemIconShape(int pageNum, Item itemId, int x, int y) {
int icn = _items[itemId].icon;
bool applyBluePal = ((_partyEffectFlags & 2) && (_items[itemId].flags & 0x80)) ? true : false;
@@ -480,11 +480,11 @@ void EobCoreEngine::drawItemIconShape(int pageNum, Item itemId, int x, int y) {
}
}
-bool EobCoreEngine::isMagicEffectItem(Item itemIndex) {
+bool EoBCoreEngine::isMagicEffectItem(Item itemIndex) {
return (itemIndex > 10 && itemIndex < 18);
}
-bool EobCoreEngine::checkInventoryForRings(int charIndex, int itemValue) {
+bool EoBCoreEngine::checkInventoryForRings(int charIndex, int itemValue) {
for (int i = 25; i <= 26; i++) {
int itm = _characters[charIndex].inventory[i];
if (itm && _items[itm].type == 47 && _items[itm].value == itemValue)
@@ -493,8 +493,8 @@ bool EobCoreEngine::checkInventoryForRings(int charIndex, int itemValue) {
return false;
}
-void EobCoreEngine::eatItemInHand(int charIndex) {
- EobCharacter *c = &_characters[charIndex];
+void EoBCoreEngine::eatItemInHand(int charIndex) {
+ EoBCharacter *c = &_characters[charIndex];
if (!testCharacter(charIndex, 5)) {
_txt->printMessage(_warningStrings[1], -1, c->name);
} else if (_itemInHand && _items[_itemInHand].type != 31 && !(_flags.gameID == GI_EOB1 && _items[_itemInHand].type == 49)) {
@@ -514,8 +514,8 @@ void EobCoreEngine::eatItemInHand(int charIndex) {
}
}
-bool EobCoreEngine::launchObject(int charIndex, Item item, uint16 startBlock, int startPos, int dir, int type) {
- EobFlyingObject *t = _flyingObjects;
+bool EoBCoreEngine::launchObject(int charIndex, Item item, uint16 startBlock, int startPos, int dir, int type) {
+ EoBFlyingObject *t = _flyingObjects;
int slot = 0;
for (; slot < 10; slot++) {
if (!t->enable)
@@ -544,8 +544,8 @@ bool EobCoreEngine::launchObject(int charIndex, Item item, uint16 startBlock, in
return true;
}
-void EobCoreEngine::launchMagicObject(int charIndex, int type, uint16 startBlock, int startPos, int dir) {
- EobFlyingObject *t = _flyingObjects;
+void EoBCoreEngine::launchMagicObject(int charIndex, int type, uint16 startBlock, int startPos, int dir) {
+ EoBFlyingObject *t = _flyingObjects;
int slot = 0;
for (; slot < 10; slot++) {
if (!t->enable)
@@ -571,7 +571,7 @@ void EobCoreEngine::launchMagicObject(int charIndex, int type, uint16 startBlock
_sceneUpdateRequired = true;
}
-bool EobCoreEngine::updateObjectFlight(EobFlyingObject *fo, int block, int pos) {
+bool EoBCoreEngine::updateObjectFlight(EoBFlyingObject *fo, int block, int pos) {
uint8 wallFlags = _wllWallFlags[_levelBlockProperties[block].walls[fo->direction ^ 2]];
if (fo->enable == 1) {
if ((wallFlags & 1) || (fo->u2) || ((wallFlags & 2) && (_dscItemShapeMap[_items[fo->item].icon] >= 15))) {
@@ -599,7 +599,7 @@ bool EobCoreEngine::updateObjectFlight(EobFlyingObject *fo, int block, int pos)
return true;
}
-bool EobCoreEngine::updateFlyingObjectHitTest(EobFlyingObject *fo, int block, int pos) {
+bool EoBCoreEngine::updateFlyingObjectHitTest(EoBFlyingObject *fo, int block, int pos) {
if (fo->u2 && (fo->curBlock != _currentBlock || fo->attackerId >= 0) && (!blockHasMonsters(block) || fo->attackerId < 0))
return false;
@@ -623,7 +623,7 @@ bool EobCoreEngine::updateFlyingObjectHitTest(EobFlyingObject *fo, int block, in
return false;
}
-void EobCoreEngine::explodeObject(EobFlyingObject *fo, int block, Item item) {
+void EoBCoreEngine::explodeObject(EoBFlyingObject *fo, int block, Item item) {
if (_partyResting) {
snd_processEnvironmentalSoundEffect(35, _currentBlock);
return;
@@ -688,21 +688,21 @@ void EobCoreEngine::explodeObject(EobFlyingObject *fo, int block, Item item) {
enableSysTimer(2);
}
-void EobCoreEngine::endObjectFlight(EobFlyingObject *fo) {
+void EoBCoreEngine::endObjectFlight(EoBFlyingObject *fo) {
if (fo->enable == 1) {
_items[fo->item].pos &= 3;
runLevelScript(fo->curBlock, 4);
updateEnvironmentalSfx(18);
}
- memset(fo, 0, sizeof(EobFlyingObject));
+ memset(fo, 0, sizeof(EoBFlyingObject));
}
-void EobCoreEngine::checkFlyingObjects() {
+void EoBCoreEngine::checkFlyingObjects() {
if (!_runFlag)
return;
for (int i = 0; i < 10; i++) {
- EobFlyingObject *fo = &_flyingObjects[i];
+ EoBFlyingObject *fo = &_flyingObjects[i];
if (!fo->enable)
continue;
if (updateFlyingObjectHitTest(fo, fo->curBlock, fo->curPos))
@@ -710,7 +710,7 @@ void EobCoreEngine::checkFlyingObjects() {
}
}
-void EobCoreEngine::reloadWeaponSlot(int charIndex, int slotIndex, int itemType, int arrowOrDagger) {
+void EoBCoreEngine::reloadWeaponSlot(int charIndex, int slotIndex, int itemType, int arrowOrDagger) {
if (arrowOrDagger && _characters[charIndex].inventory[16]) {
_characters[charIndex].inventory[slotIndex] = getQueuedItem(&_characters[charIndex].inventory[16], 0, -1);
} else {
diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp
index df595b6ffa..c3c4e6083c 100644
--- a/engines/kyra/kyra_hof.cpp
+++ b/engines/kyra/kyra_hof.cpp
@@ -286,7 +286,7 @@ Common::Error KyraEngine_HoF::go() {
if (_flags.isDemo && !_flags.isTalkie) {
#ifdef ENABLE_LOL
if (_flags.gameID == GI_LOL)
- seq_playSequences(kSequenceLolDemoScene1, kSequenceLolDemoScene6);
+ seq_playSequences(kSequenceLoLDemoScene1, kSequenceLoLDemoScene6);
else
#endif // ENABLE_LOL
seq_playSequences(kSequenceDemoVirgin, kSequenceDemoFisher);
diff --git a/engines/kyra/kyra_hof.h b/engines/kyra/kyra_hof.h
index a6add505cb..4b8303b2e4 100644
--- a/engines/kyra/kyra_hof.h
+++ b/engines/kyra/kyra_hof.h
@@ -95,18 +95,18 @@ enum NestedSequencesDemo {
};
#ifdef ENABLE_LOL
-enum SequencesLolDemo {
- kSequenceLolDemoScene1 = 0,
- kSequenceLolDemoText1,
- kSequenceLolDemoScene2,
- kSequenceLolDemoText2,
- kSequenceLolDemoScene3,
- kSequenceLolDemoText3,
- kSequenceLolDemoScene4,
- kSequenceLolDemoText4,
- kSequenceLolDemoScene5,
- kSequenceLolDemoText5,
- kSequenceLolDemoScene6
+enum SequencesLoLDemo {
+ kSequenceLoLDemoScene1 = 0,
+ kSequenceLoLDemoText1,
+ kSequenceLoLDemoScene2,
+ kSequenceLoLDemoText2,
+ kSequenceLoLDemoScene3,
+ kSequenceLoLDemoText3,
+ kSequenceLoLDemoScene4,
+ kSequenceLoLDemoText4,
+ kSequenceLoLDemoScene5,
+ kSequenceLoLDemoText5,
+ kSequenceLoLDemoScene6
};
#endif // ENABLE_LOL
diff --git a/engines/kyra/kyra_rpg.cpp b/engines/kyra/kyra_rpg.cpp
index 4a0db7b78d..a4c92b6125 100644
--- a/engines/kyra/kyra_rpg.cpp
+++ b/engines/kyra/kyra_rpg.cpp
@@ -78,7 +78,7 @@ KyraRpgEngine::KyraRpgEngine(OSystem *system, const GameFlags &flags) : KyraEngi
_sceneUpdateRequired = false;
_flyingObjectsPtr = 0;
- _flyingObjectStructSize = sizeof(EobFlyingObject);
+ _flyingObjectStructSize = sizeof(EoBFlyingObject);
_clickedShapeXOffs = _clickedShapeYOffs = 0;
diff --git a/engines/kyra/kyra_rpg.h b/engines/kyra/kyra_rpg.h
index 9acc6ff0dc..31fb9bc8d7 100644
--- a/engines/kyra/kyra_rpg.h
+++ b/engines/kyra/kyra_rpg.h
@@ -64,7 +64,7 @@ struct LevelTempData {
uint8 monsterDifficulty;
};
-struct EobFlyingObject {
+struct EoBFlyingObject {
uint8 enable;
uint8 objectType;
int16 attackerId;
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index 8561b5e071..01b1bdf065 100644
--- a/engines/kyra/lol.cpp
+++ b/engines/kyra/lol.cpp
@@ -414,10 +414,10 @@ Common::Error LoLEngine::init() {
_wllAutomapData = new uint8[80];
memset(_wllAutomapData, 0, 80);
- _monsters = new LolMonsterInPlay[30];
- memset(_monsters, 0, 30 * sizeof(LolMonsterInPlay));
- _monsterProperties = new LolMonsterProperty[5];
- memset(_monsterProperties, 0, 5 * sizeof(LolMonsterProperty));
+ _monsters = new LoLMonsterInPlay[30];
+ memset(_monsters, 0, 30 * sizeof(LoLMonsterInPlay));
+ _monsterProperties = new LoLMonsterProperty[5];
+ memset(_monsterProperties, 0, 5 * sizeof(LoLMonsterProperty));
_tempBuffer5120 = new uint8[5120];
memset(_tempBuffer5120, 0, 5120);
@@ -1956,7 +1956,7 @@ void LoLEngine::setupDialogueButtons(int numStr, const char *s1, const char *s2,
removeInputTop();
}
-void LoLEngine::giveItemToMonster(LolMonsterInPlay *monster, Item item) {
+void LoLEngine::giveItemToMonster(LoLMonsterInPlay *monster, Item item) {
uint16 *c = &monster->assignedItems;
while (*c)
c = &_itemsInPlay[*c].nextAssignedObject;
@@ -2403,7 +2403,7 @@ int LoLEngine::processMagicIce(int charNum, int spellLevel) {
int might = rollDice(iceDamageMin[spellLevel], iceDamageMax[spellLevel]) + iceDamageAdd[spellLevel];
int dmg = calcInflictableDamagePerItem(charNum, 0, might, 3, 2);
- LolMonsterInPlay *m = &_monsters[o & 0x7fff];
+ LoLMonsterInPlay *m = &_monsters[o & 0x7fff];
if (m->hitPoints <= dmg) {
increaseExperience(charNum, 2, m->hitPoints);
o = m->nextAssignedObject;
@@ -2482,7 +2482,7 @@ int LoLEngine::processMagicFireball(int charNum, int spellLevel) {
while (o & 0x8000) {
static const uint8 fireballDamage[] = { 20, 40, 80, 100 };
int dmg = calcInflictableDamagePerItem(charNum, o, fireballDamage[spellLevel], 4, 1);
- LolMonsterInPlay *m = &_monsters[o & 0x7fff];
+ LoLMonsterInPlay *m = &_monsters[o & 0x7fff];
o = m->nextAssignedObject;
_envSfxUseQueue = true;
inflictDamage(m->id | 0x8000, dmg, charNum, 2, 4);
@@ -2647,7 +2647,7 @@ int LoLEngine::processMagicHandOfFate(int spellLevel) {
uint16 o = _levelBlockProperties[b1].assignedObjects;
while (o & 0x8000) {
uint16 o2 = o;
- LolMonsterInPlay *m = &_monsters[o & 0x7fff];
+ LoLMonsterInPlay *m = &_monsters[o & 0x7fff];
o = findObject(o)->nextAssignedObject;
int nX = 0;
int nY = 0;
@@ -2916,7 +2916,7 @@ int LoLEngine::processMagicVaelansCube() {
uint16 o = _levelBlockProperties[bl].assignedObjects;
while (o & 0x8000) {
- LolMonsterInPlay *m = &_monsters[o & 0x7fff];
+ LoLMonsterInPlay *m = &_monsters[o & 0x7fff];
if (m->properties->flags & 0x1000) {
inflictDamage(o, 100, 0xffff, 0, 0x80);
v = 1;
@@ -3396,7 +3396,7 @@ int LoLEngine::calcInflictableDamage(int16 attacker, int16 target, int hitType)
}
int LoLEngine::inflictDamage(uint16 target, int damage, uint16 attacker, int skill, int flags) {
- LolMonsterInPlay *m = 0;
+ LoLMonsterInPlay *m = 0;
LoLCharacter *c = 0;
if (target & 0x8000) {
@@ -3613,7 +3613,7 @@ void LoLEngine::checkForPartyDeath() {
}
}
-void LoLEngine::applyMonsterAttackSkill(LolMonsterInPlay *monster, int16 target, int16 damage) {
+void LoLEngine::applyMonsterAttackSkill(LoLMonsterInPlay *monster, int16 target, int16 damage) {
if (rollDice(1, 100) > monster->properties->attackSkillChance)
return;
@@ -3683,7 +3683,7 @@ void LoLEngine::applyMonsterAttackSkill(LolMonsterInPlay *monster, int16 target,
}
}
-void LoLEngine::applyMonsterDefenseSkill(LolMonsterInPlay *monster, int16 attacker, int flags, int skill, int damage) {
+void LoLEngine::applyMonsterDefenseSkill(LoLMonsterInPlay *monster, int16 attacker, int flags, int skill, int damage) {
if (rollDice(1, 100) > monster->properties->defenseSkillChance)
return;
@@ -3942,7 +3942,7 @@ uint16 LoLEngine::getNearestMonsterFromCharacterForBlock(uint16 block, int charN
int o = _levelBlockProperties[block].assignedObjects;
while (o & 0x8000) {
- LolMonsterInPlay *m = &_monsters[o & 0x7fff];
+ LoLMonsterInPlay *m = &_monsters[o & 0x7fff];
if (m->mode >= 13) {
o = m->nextAssignedObject;
continue;
diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h
index dabc141775..eeaa1b51ad 100644
--- a/engines/kyra/lol.h
+++ b/engines/kyra/lol.h
@@ -86,7 +86,7 @@ struct SpellProperty {
uint16 flags;
};
-struct LolMonsterProperty {
+struct LoLMonsterProperty {
uint8 shapeIndex;
uint8 maxWidth;
uint16 fightingStats[9];
@@ -108,7 +108,7 @@ struct LolMonsterProperty {
uint8 sounds[3];
};
-struct LolMonsterInPlay {
+struct LoLMonsterInPlay {
uint16 nextAssignedObject;
uint16 nextDrawObject;
uint8 flyingHeight;
@@ -134,7 +134,7 @@ struct LolMonsterInPlay {
int16 hitPoints;
uint8 speedTick;
uint8 type;
- LolMonsterProperty *properties;
+ LoLMonsterProperty *properties;
uint8 numDistAttacks;
uint8 curDistWeapon;
int8 distAttackTick;
@@ -1089,16 +1089,16 @@ private:
void loadMonsterShapes(const char *file, int monsterIndex, int b);
void releaseMonsterShapes(int monsterIndex);
int deleteMonstersFromBlock(int block);
- void setMonsterMode(LolMonsterInPlay *monster, int mode);
- bool updateMonsterAdjustBlocks(LolMonsterInPlay *monster);
- void placeMonster(LolMonsterInPlay *monster, uint16 x, uint16 y);
+ void setMonsterMode(LoLMonsterInPlay *monster, int mode);
+ bool updateMonsterAdjustBlocks(LoLMonsterInPlay *monster);
+ void placeMonster(LoLMonsterInPlay *monster, uint16 x, uint16 y);
int calcMonsterDirection(uint16 x1, uint16 y1, uint16 x2, uint16 y2);
- void setMonsterDirection(LolMonsterInPlay *monster, int dir);
- void monsterDropItems(LolMonsterInPlay *monster);
+ void setMonsterDirection(LoLMonsterInPlay *monster, int dir);
+ void monsterDropItems(LoLMonsterInPlay *monster);
void removeAssignedObjectFromBlock(LevelBlockProperty *l, uint16 id);
void removeDrawObjectFromBlock(LevelBlockProperty *l, uint16 id);
void assignMonsterToBlock(uint16 *assignedBlockObjects, uint16 id);
- void giveItemToMonster(LolMonsterInPlay *monster, Item item);
+ void giveItemToMonster(LoLMonsterInPlay *monster, Item item);
int checkBlockBeforeObjectPlacement(uint16 x, uint16 y, uint16 objectWidth, uint16 testFlag, uint16 wallFlag);
int checkBlockForWallsAndSufficientSpace(int block, int x, int y, int objectWidth, int testFlag, int wallFlag);
int calcMonsterSkillLevel(int id, int a);
@@ -1109,7 +1109,7 @@ private:
void drawBlockObjects(int blockArrayIndex);
void drawMonster(uint16 id);
- int getMonsterCurFrame(LolMonsterInPlay *m, uint16 dirFlags);
+ int getMonsterCurFrame(LoLMonsterInPlay *m, uint16 dirFlags);
void reassignDrawObjects(uint16 direction, uint16 itemIndex, LevelBlockProperty *l, bool flag);
void redrawSceneItem();
int calcItemMonsterPosition(ItemInPlay *i, uint16 direction);
@@ -1119,21 +1119,21 @@ private:
uint8 *drawItemOrMonster(uint8 *shape, uint8 *monsterPalette, int x, int y, int fineX, int fineY, int flags, int tblValue, bool vflip);
int calcDrawingLayerParameters(int srcX, int srcY, int &x2, int &y2, uint16 &w, uint16 &h, uint8 *shape, int vflip);
- void updateMonster(LolMonsterInPlay *monster);
- void moveMonster(LolMonsterInPlay *monster);
- void walkMonster(LolMonsterInPlay *monster);
- bool chasePartyWithDistanceAttacks(LolMonsterInPlay *monster);
- void chasePartyWithCloseAttacks(LolMonsterInPlay *monster);
- int walkMonsterCalcNextStep(LolMonsterInPlay *monster);
+ void updateMonster(LoLMonsterInPlay *monster);
+ void moveMonster(LoLMonsterInPlay *monster);
+ void walkMonster(LoLMonsterInPlay *monster);
+ bool chasePartyWithDistanceAttacks(LoLMonsterInPlay *monster);
+ void chasePartyWithCloseAttacks(LoLMonsterInPlay *monster);
+ int walkMonsterCalcNextStep(LoLMonsterInPlay *monster);
int checkForPossibleDistanceAttack(uint16 monsterBlock, int direction, int distance, uint16 curBlock);
- int walkMonsterCheckDest(int x, int y, LolMonsterInPlay *monster, int unk);
+ int walkMonsterCheckDest(int x, int y, LoLMonsterInPlay *monster, int unk);
void getNextStepCoords(int16 monsterX, int16 monsterY, int &newX, int &newY, uint16 direction);
- void rearrangeAttackingMonster(LolMonsterInPlay *monster);
- void moveStrayingMonster(LolMonsterInPlay *monster);
- void killMonster(LolMonsterInPlay *monster);
+ void rearrangeAttackingMonster(LoLMonsterInPlay *monster);
+ void moveStrayingMonster(LoLMonsterInPlay *monster);
+ void killMonster(LoLMonsterInPlay *monster);
- LolMonsterInPlay *_monsters;
- LolMonsterProperty *_monsterProperties;
+ LoLMonsterInPlay *_monsters;
+ LoLMonsterProperty *_monsterProperties;
uint8 **_monsterDecorationShapes;
uint8 _monsterAnimType[3];
uint16 _monsterCurBlock;
@@ -1242,8 +1242,8 @@ private:
int calcInflictableDamagePerItem(int16 attacker, int16 target, uint16 itemMight, int index, int hitType);
void checkForPartyDeath();
- void applyMonsterAttackSkill(LolMonsterInPlay *monster, int16 target, int16 damage);
- void applyMonsterDefenseSkill(LolMonsterInPlay *monster, int16 attacker, int flags, int skill, int damage);
+ void applyMonsterAttackSkill(LoLMonsterInPlay *monster, int16 target, int16 damage);
+ void applyMonsterDefenseSkill(LoLMonsterInPlay *monster, int16 attacker, int flags, int skill, int damage);
int removeCharacterItem(int charNum, int itemFlags);
int paralyzePoisonCharacter(int charNum, int typeFlag, int immunityFlags, int hitChance, int redraw);
void paralyzePoisonAllCharacters(int typeFlag, int immunityFlags, int hitChance);
diff --git a/engines/kyra/magic_eob.cpp b/engines/kyra/magic_eob.cpp
index e3428fb3c7..c1b0327df2 100644
--- a/engines/kyra/magic_eob.cpp
+++ b/engines/kyra/magic_eob.cpp
@@ -28,8 +28,8 @@
namespace Kyra {
-void EobCoreEngine::useMagicBookOrSymbol(int charIndex, int type) {
- EobCharacter *c = &_characters[charIndex];
+void EoBCoreEngine::useMagicBookOrSymbol(int charIndex, int type) {
+ EoBCharacter *c = &_characters[charIndex];
_openBookSpellLevel = c->slotStatus[3];
_openBookSpellSelectedItem = c->slotStatus[2];
_openBookSpellListOffset = c->slotStatus[4];
@@ -66,7 +66,7 @@ void EobCoreEngine::useMagicBookOrSymbol(int charIndex, int type) {
gui_drawSpellbook();
}
-void EobCoreEngine::useMagicScroll(int charIndex, int type, int weaponSlot) {
+void EoBCoreEngine::useMagicScroll(int charIndex, int type, int weaponSlot) {
_openBookCharBackup = _openBookChar;
_openBookTypeBackup = _openBookType;
_castScrollSlot = weaponSlot + 1;
@@ -75,8 +75,8 @@ void EobCoreEngine::useMagicScroll(int charIndex, int type, int weaponSlot) {
castSpell(type, weaponSlot);
}
-void EobCoreEngine::usePotion(int charIndex, int weaponSlot) {
- EobCharacter *c = &_characters[charIndex];
+void EoBCoreEngine::usePotion(int charIndex, int weaponSlot) {
+ EoBCharacter *c = &_characters[charIndex];
int val = deleteInventoryItem(charIndex, weaponSlot);
snd_playSoundEffect(10);
@@ -142,7 +142,7 @@ void EobCoreEngine::usePotion(int charIndex, int weaponSlot) {
_txt->printMessage(_potionStrings[1], -1, c->name, _potionEffectStrings[val]);
}
-void EobCoreEngine::useWand(int charIndex, int weaponSlot) {
+void EoBCoreEngine::useWand(int charIndex, int weaponSlot) {
int v = _items[_characters[charIndex].inventory[weaponSlot]].value;
if (!v) {
_txt->printMessage(_wandStrings[0]);
@@ -172,9 +172,9 @@ void EobCoreEngine::useWand(int charIndex, int weaponSlot) {
}
}
-void EobCoreEngine::castSpell(int spell, int weaponSlot) {
- EobSpell *s = &_spells[spell];
- EobCharacter *c = &_characters[_openBookChar];
+void EoBCoreEngine::castSpell(int spell, int weaponSlot) {
+ EoBSpell *s = &_spells[spell];
+ EoBCharacter *c = &_characters[_openBookChar];
_activeSpell = spell;
if ((s->flags & 0x100) && (c->effectFlags & 0x40))
@@ -231,10 +231,10 @@ void EobCoreEngine::castSpell(int spell, int weaponSlot) {
startSpell(spell);
}
-void EobCoreEngine::removeCharacterEffect(int spell, int charIndex, int showWarning) {
+void EoBCoreEngine::removeCharacterEffect(int spell, int charIndex, int showWarning) {
assert(spell >= 0);
- EobCharacter *c = &_characters[charIndex];
- EobSpell *s = &_spells[spell];
+ EoBCharacter *c = &_characters[charIndex];
+ EoBSpell *s = &_spells[spell];
if (showWarning) {
int od = _screen->curDimIndex();
@@ -275,8 +275,8 @@ void EobCoreEngine::removeCharacterEffect(int spell, int charIndex, int showWarn
}
}
-void EobCoreEngine::removeAllCharacterEffects(int charIndex) {
- EobCharacter *c = &_characters[charIndex];
+void EoBCoreEngine::removeAllCharacterEffects(int charIndex) {
+ EoBCharacter *c = &_characters[charIndex];
c->effectFlags = 0;
memset(c->effectsRemainder, 0, 4);
@@ -298,14 +298,14 @@ void EobCoreEngine::removeAllCharacterEffects(int charIndex) {
gui_drawAllCharPortraitsWithStats();
}
-void EobCoreEngine::castOnWhomDialogue() {
+void EoBCoreEngine::castOnWhomDialogue() {
printWarning(_magicStrings3[0]);
gui_setCastOnWhomButtons();
}
-void EobCoreEngine::startSpell(int spell) {
- EobSpell *s = &_spells[spell];
- EobCharacter *c = &_characters[_activeSpellCharId];
+void EoBCoreEngine::startSpell(int spell) {
+ EoBSpell *s = &_spells[spell];
+ EoBCharacter *c = &_characters[_activeSpellCharId];
snd_playSoundEffect(s->sound);
if (s->flags & 0xa0)
@@ -379,7 +379,7 @@ void EobCoreEngine::startSpell(int spell) {
}
}
-void EobCoreEngine::sparkEffectDefensive(int charIndex) {
+void EoBCoreEngine::sparkEffectDefensive(int charIndex) {
int first = charIndex;
int last = charIndex;
if (charIndex == -1) {
@@ -418,7 +418,7 @@ void EobCoreEngine::sparkEffectDefensive(int charIndex) {
gui_drawCharPortraitWithStats(i);
}
-void EobCoreEngine::sparkEffectOffensive() {
+void EoBCoreEngine::sparkEffectOffensive() {
disableSysTimer(2);
_screen->copyRegion(0, 0, 0, 0, 176, 120, 0, 2, Screen::CR_NO_P_CHECK);
@@ -447,14 +447,14 @@ void EobCoreEngine::sparkEffectOffensive() {
enableSysTimer(2);
}
-void EobCoreEngine::setSpellEventTimer(int spell, int timerBaseFactor, int timerLength, int timerLevelFactor, int updateExistingTimer) {
+void EoBCoreEngine::setSpellEventTimer(int spell, int timerBaseFactor, int timerLength, int timerLevelFactor, int updateExistingTimer) {
assert (spell >= 0);
int l = _openBookType == 1 ? getClericPaladinLevel(_openBookChar) : getMageLevel(_openBookChar);
uint32 countdown = timerLength * timerBaseFactor + timerLength * l * timerLevelFactor;
setCharEventTimer(_activeSpellCharId, countdown, -spell, updateExistingTimer);
}
-void EobCoreEngine::sortCharacterSpellList(int charIndex) {
+void EoBCoreEngine::sortCharacterSpellList(int charIndex) {
int8 *list = _characters[charIndex].mageSpells;
for (int i = 0; i < 16; ) {
@@ -490,7 +490,7 @@ void EobCoreEngine::sortCharacterSpellList(int charIndex) {
}
}
-bool EobCoreEngine::magicObjectDamageHit(EobFlyingObject *fo, int dcTimes, int dcPips, int dcOffs, int level) {
+bool EoBCoreEngine::magicObjectDamageHit(EoBFlyingObject *fo, int dcTimes, int dcPips, int dcOffs, int level) {
int ignoreAttackerId = fo->flags & 0x10;
int singleTargetCheckAdjacent = fo->flags & 1;
int blockDamage = fo->flags & 2;
@@ -565,8 +565,8 @@ bool EobCoreEngine::magicObjectDamageHit(EobFlyingObject *fo, int dcTimes, int d
return res;
}
-bool EobCoreEngine::magicObjectStatusHit(EobMonsterInPlay *m, int type, bool tryEvade, int mod) {
- EobMonsterProperty *p = &_monsterProps[m->type];
+bool EoBCoreEngine::magicObjectStatusHit(EoBMonsterInPlay *m, int type, bool tryEvade, int mod) {
+ EoBMonsterProperty *p = &_monsterProps[m->type];
if (tryEvade) {
if (tryMonsterAttackEvasion(m) || (p->immunityFlags & 0x10))
return true;
@@ -619,7 +619,7 @@ bool EobCoreEngine::magicObjectStatusHit(EobMonsterInPlay *m, int type, bool try
return true;
}
-bool EobCoreEngine::turnUndeadHit(EobMonsterInPlay *m, int hitChance, int casterLevel) {
+bool EoBCoreEngine::turnUndeadHit(EoBMonsterInPlay *m, int hitChance, int casterLevel) {
assert(_monsterProps[m->type].tuResist > 0);
uint8 e = _turnUndeadEffect[_monsterProps[m->type].tuResist * 14 + MIN(casterLevel, 14)];
@@ -637,11 +637,11 @@ bool EobCoreEngine::turnUndeadHit(EobMonsterInPlay *m, int hitChance, int caster
return true;
}
-int EobCoreEngine::getMagicWeaponSlot(int charIndex) {
+int EoBCoreEngine::getMagicWeaponSlot(int charIndex) {
return _characters[charIndex].inventory[1] ? 0 : 1;
}
-void EobCoreEngine::causeWounds(int dcTimes, int dcPips, int dcOffs) {
+void EoBCoreEngine::causeWounds(int dcTimes, int dcPips, int dcOffs) {
if (_openBookChar == 0 || _openBookChar == 1) {
int d = getClosestMonster(_openBookChar, calcNewBlockPosition(_currentBlock, _currentDirection));
if (d != -1) {
@@ -661,7 +661,7 @@ void EobCoreEngine::causeWounds(int dcTimes, int dcPips, int dcOffs) {
}
}
-int EobCoreEngine::createMagicWeaponType(int invFlags, int handFlags, int armorClass, int allowedClasses, int dmgNumDice, int dmgPips, int dmgInc, int extraProps) {
+int EoBCoreEngine::createMagicWeaponType(int invFlags, int handFlags, int armorClass, int allowedClasses, int dmgNumDice, int dmgPips, int dmgInc, int extraProps) {
int i = 51;
for (; i < 57; i++) {
if (_itemTypes[i].armorClass == -30)
@@ -671,7 +671,7 @@ int EobCoreEngine::createMagicWeaponType(int invFlags, int handFlags, int armorC
if (i == 57)
return -1;
- EobItemType *tp = &_itemTypes[i];
+ EoBItemType *tp = &_itemTypes[i];
tp->invFlags = invFlags;
tp->requiredHands = 0;
tp->handFlags = handFlags;
@@ -685,7 +685,7 @@ int EobCoreEngine::createMagicWeaponType(int invFlags, int handFlags, int armorC
return i;
}
-Item EobCoreEngine::createMagicWeaponItem(int flags, int icon, int value, int type) {
+Item EoBCoreEngine::createMagicWeaponItem(int flags, int icon, int value, int type) {
Item i = 11;
for (; i < 17; i++) {
if (_items[i].block == -2)
@@ -695,7 +695,7 @@ Item EobCoreEngine::createMagicWeaponItem(int flags, int icon, int value, int ty
if (i == 17)
return -1;
- EobItem *itm = &_items[i];
+ EoBItem *itm = &_items[i];
itm->flags = 0x20 | flags;
itm->icon = icon;
itm->value = value;
@@ -708,13 +708,13 @@ Item EobCoreEngine::createMagicWeaponItem(int flags, int icon, int value, int ty
return i;
}
-void EobCoreEngine::removeMagicWeaponItem(Item item) {
+void EoBCoreEngine::removeMagicWeaponItem(Item item) {
_itemTypes[_items[item].type].armorClass = -30;
_items[item].block = -2;
_items[item].level = -1;
}
-void EobCoreEngine::updateWallOfForceTimers() {
+void EoBCoreEngine::updateWallOfForceTimers() {
uint32 ct = _system->getMillis();
for (int i = 0; i < 5; i++) {
if (!_wallsOfForce[i].block)
@@ -724,13 +724,13 @@ void EobCoreEngine::updateWallOfForceTimers() {
}
}
-void EobCoreEngine::destroyWallOfForce(int index) {
+void EoBCoreEngine::destroyWallOfForce(int index) {
memset(_levelBlockProperties[_wallsOfForce[index].block].walls, 0, 4);
_wallsOfForce[index].block = 0;
_sceneUpdateRequired = true;
}
-int EobCoreEngine::findSingleSpellTarget(int dist) {
+int EoBCoreEngine::findSingleSpellTarget(int dist) {
uint16 bl = _currentBlock;
int res = -1;
@@ -746,7 +746,7 @@ int EobCoreEngine::findSingleSpellTarget(int dist) {
return res;
}
-int EobCoreEngine::findFirstCharacterSpellTarget() {
+int EoBCoreEngine::findFirstCharacterSpellTarget() {
int curCharIndex = rollDice(1, 6, -1);
for (_characterSpellTarget = 0; _characterSpellTarget < 6; _characterSpellTarget++) {
if (testCharacter(curCharIndex, 3))
@@ -757,7 +757,7 @@ int EobCoreEngine::findFirstCharacterSpellTarget() {
return -1;
}
-int EobCoreEngine::findNextCharacterSpellTarget(int curCharIndex) {
+int EoBCoreEngine::findNextCharacterSpellTarget(int curCharIndex) {
for (_characterSpellTarget++; _characterSpellTarget < 6; ) {
if (++curCharIndex == 6)
curCharIndex = 0;
@@ -767,7 +767,7 @@ int EobCoreEngine::findNextCharacterSpellTarget(int curCharIndex) {
return -1;
}
-int EobCoreEngine::charDeathSavingThrow(int charIndex, int div) {
+int EoBCoreEngine::charDeathSavingThrow(int charIndex, int div) {
bool _beholderOrgBhv = true;
// Due to a bug in the original code the saving throw result is completely ignored
// here. The Beholders' disintegrate spell will alway succeed while their flesh to
@@ -779,22 +779,22 @@ int EobCoreEngine::charDeathSavingThrow(int charIndex, int div) {
return div;
}
-void EobCoreEngine::printWarning(const char *str) {
+void EoBCoreEngine::printWarning(const char *str) {
_txt->printMessage(str);
snd_playSoundEffect(79);
}
-void EobCoreEngine::printNoEffectWarning() {
+void EoBCoreEngine::printNoEffectWarning() {
printWarning(_magicStrings4[0]);
}
-void EobCoreEngine::spellCallback_start_armor() {
+void EoBCoreEngine::spellCallback_start_armor() {
_characters[_activeSpellCharId].effectsRemainder[0] = getMageLevel(_openBookChar) + 8;
if ((getDexterityArmorClassModifier(_characters[_activeSpellCharId].dexterityCur) + 6) >= _characters[_activeSpellCharId].armorClass)
printWarning(Common::String::format(_magicStrings6[0], _characters[_activeSpellCharId].name).c_str());
}
-void EobCoreEngine::spellCallback_start_burningHands() {
+void EoBCoreEngine::spellCallback_start_burningHands() {
static const int16 bX[] = { 0, 152, 24, 120, 56, 88 };
static const int8 bY[] = { 64, 64, 56, 56, 56, 56 };
@@ -822,25 +822,25 @@ void EobCoreEngine::spellCallback_start_burningHands() {
_sceneUpdateRequired = true;
}
-void EobCoreEngine::spellCallback_start_detectMagic() {
+void EoBCoreEngine::spellCallback_start_detectMagic() {
setHandItem(_itemInHand);
}
-bool EobCoreEngine::spellCallback_end_detectMagic(void*) {
+bool EoBCoreEngine::spellCallback_end_detectMagic(void*) {
setHandItem(_itemInHand);
return true;
}
-void EobCoreEngine::spellCallback_start_magicMissile() {
+void EoBCoreEngine::spellCallback_start_magicMissile() {
launchMagicObject(_openBookChar, 0, _currentBlock, _activeSpellCharacterPos, _currentDirection);
}
-bool EobCoreEngine::spellCallback_end_magicMissile(void *obj) {
- EobFlyingObject *fo = (EobFlyingObject*)obj;
+bool EoBCoreEngine::spellCallback_end_magicMissile(void *obj) {
+ EoBFlyingObject *fo = (EoBFlyingObject*)obj;
return magicObjectDamageHit(fo, 1, 4, 1, (getMageLevel(fo->attackerId) - 1) >> 1);
}
-void EobCoreEngine::spellCallback_start_shockingGrasp() {
+void EoBCoreEngine::spellCallback_start_shockingGrasp() {
int t = createMagicWeaponType(0, 0, 0, 0x0f, 1, 8, getMageLevel(_openBookChar), 1);
Item i = (t != -1) ? createMagicWeaponItem(0x10, 82, 0, t) : -1;
if (t == -1 || i == -1) {
@@ -854,8 +854,8 @@ void EobCoreEngine::spellCallback_start_shockingGrasp() {
}
}
-bool EobCoreEngine::spellCallback_end_shockingGraspFlameBlade(void *obj) {
- EobCharacter *c = (EobCharacter*)obj;
+bool EoBCoreEngine::spellCallback_end_shockingGraspFlameBlade(void *obj) {
+ EoBCharacter *c = (EoBCharacter*)obj;
for (int i = 0; i < 2; i++) {
if (isMagicEffectItem(c->inventory[i])) {
removeMagicWeaponItem(c->inventory[i]);
@@ -865,7 +865,7 @@ bool EobCoreEngine::spellCallback_end_shockingGraspFlameBlade(void *obj) {
return true;
}
-void EobCoreEngine::spellCallback_start_improvedIdentify() {
+void EoBCoreEngine::spellCallback_start_improvedIdentify() {
for (int i = 0; i < 2; i++) {
Item itm = _characters[_activeSpellCharId].inventory[i];
if (itm)
@@ -873,47 +873,47 @@ void EobCoreEngine::spellCallback_start_improvedIdentify() {
}
}
-void EobCoreEngine::spellCallback_start_melfsAcidArrow() {
+void EoBCoreEngine::spellCallback_start_melfsAcidArrow() {
launchMagicObject(_openBookChar, 1, _currentBlock, _activeSpellCharacterPos, _currentDirection);
}
-bool EobCoreEngine::spellCallback_end_melfsAcidArrow(void *obj) {
- EobFlyingObject *fo = (EobFlyingObject*)obj;
+bool EoBCoreEngine::spellCallback_end_melfsAcidArrow(void *obj) {
+ EoBFlyingObject *fo = (EoBFlyingObject*)obj;
assert(fo);
return magicObjectDamageHit(fo, 2, 4, 0, getMageLevel(fo->attackerId) / 3);
}
-void EobCoreEngine::spellCallback_start_dispelMagic() {
+void EoBCoreEngine::spellCallback_start_dispelMagic() {
for (int i = 0; i < 6; i++) {
if (testCharacter(i, 1))
removeAllCharacterEffects(i);
}
}
-void EobCoreEngine::spellCallback_start_fireball() {
+void EoBCoreEngine::spellCallback_start_fireball() {
launchMagicObject(_openBookChar, 2, _currentBlock, _activeSpellCharacterPos, _currentDirection);
}
-bool EobCoreEngine::spellCallback_end_fireball(void *obj) {
- EobFlyingObject *fo = (EobFlyingObject*)obj;
+bool EoBCoreEngine::spellCallback_end_fireball(void *obj) {
+ EoBFlyingObject *fo = (EoBFlyingObject*)obj;
return magicObjectDamageHit(fo, 1, 6, 0, getMageLevel(fo->attackerId));
}
-void EobCoreEngine::spellCallback_start_flameArrow() {
+void EoBCoreEngine::spellCallback_start_flameArrow() {
launchMagicObject(_openBookChar, 3, _currentBlock, _activeSpellCharacterPos, _currentDirection);
}
-bool EobCoreEngine::spellCallback_end_flameArrow(void *obj) {
- EobFlyingObject *fo = (EobFlyingObject*)obj;
+bool EoBCoreEngine::spellCallback_end_flameArrow(void *obj) {
+ EoBFlyingObject *fo = (EoBFlyingObject*)obj;
return magicObjectDamageHit(fo, 5, 6, 0, getMageLevel(fo->attackerId));
}
-void EobCoreEngine::spellCallback_start_holdPerson() {
+void EoBCoreEngine::spellCallback_start_holdPerson() {
launchMagicObject(_openBookChar, _flags.gameID == GI_EOB1 ? 4 : 3, _currentBlock, _activeSpellCharacterPos, _currentDirection);
}
-bool EobCoreEngine::spellCallback_end_holdPerson(void *obj) {
- EobFlyingObject *fo = (EobFlyingObject*)obj;
+bool EoBCoreEngine::spellCallback_end_holdPerson(void *obj) {
+ EoBFlyingObject *fo = (EoBFlyingObject*)obj;
bool res = false;
if (_flags.gameID == GI_EOB2 && fo->curBlock == _currentBlock) {
@@ -938,16 +938,16 @@ bool EobCoreEngine::spellCallback_end_holdPerson(void *obj) {
return res;
}
-void EobCoreEngine::spellCallback_start_lightningBolt() {
+void EoBCoreEngine::spellCallback_start_lightningBolt() {
launchMagicObject(_openBookChar, _flags.gameID == GI_EOB1 ? 5 : 4, _currentBlock, _activeSpellCharacterPos, _currentDirection);
}
-bool EobCoreEngine::spellCallback_end_lightningBolt(void *obj) {
- EobFlyingObject *fo = (EobFlyingObject*)obj;
+bool EoBCoreEngine::spellCallback_end_lightningBolt(void *obj) {
+ EoBFlyingObject *fo = (EoBFlyingObject*)obj;
return magicObjectDamageHit(fo, 1, 6, 0, getMageLevel(fo->attackerId));
}
-void EobCoreEngine::spellCallback_start_vampiricTouch() {
+void EoBCoreEngine::spellCallback_start_vampiricTouch() {
int t = createMagicWeaponType(0, 0, 0, 0x0f, getMageLevel(_openBookChar) >> 1, 6, 0, 1);
Item i = (t != -1) ? createMagicWeaponItem(0x18, 83, 0, t) : -1;
if (t == -1 || i == -1) {
@@ -961,15 +961,15 @@ void EobCoreEngine::spellCallback_start_vampiricTouch() {
}
}
-bool EobCoreEngine::spellCallback_end_vampiricTouch(void *obj) {
- EobCharacter *c = (EobCharacter*)obj;
+bool EoBCoreEngine::spellCallback_end_vampiricTouch(void *obj) {
+ EoBCharacter *c = (EoBCharacter*)obj;
if (c->hitPointsCur > c->hitPointsMax)
c->hitPointsCur = c->hitPointsMax;
spellCallback_end_shockingGraspFlameBlade(obj);
return true;
}
-void EobCoreEngine::spellCallback_start_fear() {
+void EoBCoreEngine::spellCallback_start_fear() {
sparkEffectOffensive();
uint16 bl = calcNewBlockPosition(_currentBlock, _currentDirection);
for (int i = 0; i < 30; i++) {
@@ -978,12 +978,12 @@ void EobCoreEngine::spellCallback_start_fear() {
}
}
-void EobCoreEngine::spellCallback_start_iceStorm() {
+void EoBCoreEngine::spellCallback_start_iceStorm() {
launchMagicObject(_openBookChar, _flags.gameID == GI_EOB1 ? 6 : 5, _currentBlock, _activeSpellCharacterPos, _currentDirection);
}
-bool EobCoreEngine::spellCallback_end_iceStorm(void *obj) {
- EobFlyingObject *fo = (EobFlyingObject*)obj;
+bool EoBCoreEngine::spellCallback_end_iceStorm(void *obj) {
+ EoBFlyingObject *fo = (EoBFlyingObject*)obj;
static int8 blockAdv[] = { -32, 32, 1, -1 };
bool res = magicObjectDamageHit(fo, 1, 6, 0, getMageLevel(fo->attackerId));
if (res) {
@@ -997,11 +997,11 @@ bool EobCoreEngine::spellCallback_end_iceStorm(void *obj) {
return res;
}
-void EobCoreEngine::spellCallback_start_stoneSkin() {
+void EoBCoreEngine::spellCallback_start_stoneSkin() {
_characters[_activeSpellCharId].effectsRemainder[1] = (getMageLevel(_openBookChar) >> 1) + rollDice(1, 4);
}
-void EobCoreEngine::spellCallback_start_removeCurse() {
+void EoBCoreEngine::spellCallback_start_removeCurse() {
for (int i = 0; i < 27; i++) {
Item itm = _characters[_activeSpellCharId].inventory[i];
if (itm && (_items[itm].flags & 0x20) && !isMagicEffectItem(itm))
@@ -1009,7 +1009,7 @@ void EobCoreEngine::spellCallback_start_removeCurse() {
}
}
-void EobCoreEngine::spellCallback_start_coneOfCold() {
+void EoBCoreEngine::spellCallback_start_coneOfCold() {
const int8 *dirTables[] = { _coneOfColdDest1, _coneOfColdDest2, _coneOfColdDest3, _coneOfColdDest4 };
int cl = getMageLevel(_openBookChar);
@@ -1034,19 +1034,19 @@ void EobCoreEngine::spellCallback_start_coneOfCold() {
updateAllMonsterShapes();
}
-void EobCoreEngine::spellCallback_start_holdMonster() {
+void EoBCoreEngine::spellCallback_start_holdMonster() {
launchMagicObject(_openBookChar, _flags.gameID == GI_EOB1 ? 7 : 6, _currentBlock, _activeSpellCharacterPos, _currentDirection);
}
-bool EobCoreEngine::spellCallback_end_holdMonster(void *obj) {
- EobFlyingObject *fo = (EobFlyingObject*)obj;
+bool EoBCoreEngine::spellCallback_end_holdMonster(void *obj) {
+ EoBFlyingObject *fo = (EoBFlyingObject*)obj;
bool res = false;
for (const int16 *m = findBlockMonsters(fo->curBlock, fo->curPos, fo->direction, 1, 1); *m != -1; m++)
res |= magicObjectStatusHit(&_monsters[*m], 1, true, 4);
return res;
}
-void EobCoreEngine::spellCallback_start_wallOfForce() {
+void EoBCoreEngine::spellCallback_start_wallOfForce() {
uint16 bl = calcNewBlockPosition(_currentBlock, _currentDirection);
LevelBlockProperty *l = &_levelBlockProperties[bl];
if (l->walls[0] || l->walls[1] || l->walls[2] || l->walls[3] || (l->flags & 7)) {
@@ -1076,7 +1076,7 @@ void EobCoreEngine::spellCallback_start_wallOfForce() {
_sceneUpdateRequired = true;
}
-void EobCoreEngine::spellCallback_start_disintegrate() {
+void EoBCoreEngine::spellCallback_start_disintegrate() {
int d = findSingleSpellTarget(1);
if (d != -1)
magicObjectStatusHit(&_monsters[d], 4, true, 4);
@@ -1084,7 +1084,7 @@ void EobCoreEngine::spellCallback_start_disintegrate() {
_sceneUpdateRequired = true;
}
-void EobCoreEngine::spellCallback_start_fleshToStone() {
+void EoBCoreEngine::spellCallback_start_fleshToStone() {
sparkEffectOffensive();
int t = getClosestMonster(_openBookChar, calcNewBlockPosition(_currentBlock, _currentDirection));
if (t != -1)
@@ -1093,23 +1093,23 @@ void EobCoreEngine::spellCallback_start_fleshToStone() {
printWarning(_magicStrings8[4]);
}
-void EobCoreEngine::spellCallback_start_stoneToFlesh() {
+void EoBCoreEngine::spellCallback_start_stoneToFlesh() {
if (_characters[_activeSpellCharId].flags & 8)
_characters[_activeSpellCharId].flags &= ~8;
else
printNoEffectWarning();
}
-void EobCoreEngine::spellCallback_start_trueSeeing() {
+void EoBCoreEngine::spellCallback_start_trueSeeing() {
_wllVmpMap[46] = 0;
}
-bool EobCoreEngine::spellCallback_end_trueSeeing(void*) {
+bool EoBCoreEngine::spellCallback_end_trueSeeing(void*) {
_wllVmpMap[46] = 1;
return true;
}
-void EobCoreEngine::spellCallback_start_slayLiving() {
+void EoBCoreEngine::spellCallback_start_slayLiving() {
int d = findSingleSpellTarget(2);
if (d != -1) {
if (!magicObjectStatusHit(&_monsters[d], 3, true, 4))
@@ -1117,7 +1117,7 @@ void EobCoreEngine::spellCallback_start_slayLiving() {
}
}
-void EobCoreEngine::spellCallback_start_powerWordStun() {
+void EoBCoreEngine::spellCallback_start_powerWordStun() {
int d = findSingleSpellTarget(2);
if (d != -1) {
if (_monsters[d].hitPointsCur < 90)
@@ -1125,15 +1125,15 @@ void EobCoreEngine::spellCallback_start_powerWordStun() {
}
}
-void EobCoreEngine::spellCallback_start_causeLightWounds() {
+void EoBCoreEngine::spellCallback_start_causeLightWounds() {
causeWounds(1, 8, 0);
}
-void EobCoreEngine::spellCallback_start_cureLightWounds() {
+void EoBCoreEngine::spellCallback_start_cureLightWounds() {
modifyCharacterHitpoints(_activeSpellCharId, rollDice(1, 8));
}
-void EobCoreEngine::spellCallback_start_aid() {
+void EoBCoreEngine::spellCallback_start_aid() {
if (!testCharacter(_activeSpellCharId, 3)) {
printNoEffectWarning();
} else if (_characters[_activeSpellCharId].effectsRemainder[3]) {
@@ -1149,15 +1149,15 @@ void EobCoreEngine::spellCallback_start_aid() {
deleteCharEventTimer(_activeSpellCharId, -_activeSpell);
}
-bool EobCoreEngine::spellCallback_end_aid(void *obj) {
- EobCharacter *c = (EobCharacter*)obj;
+bool EoBCoreEngine::spellCallback_end_aid(void *obj) {
+ EoBCharacter *c = (EoBCharacter*)obj;
c->hitPointsCur -= c->effectsRemainder[3];
c->effectsRemainder[3] = 0;
c->effectFlags &= ~0x1000;
return true;
}
-void EobCoreEngine::spellCallback_start_flameBlade() {
+void EoBCoreEngine::spellCallback_start_flameBlade() {
int t = createMagicWeaponType(0, 0, 0, 0x0f, 1, 4, 4, 1);
Item i = (t != -1) ? createMagicWeaponItem(0, 84, 0, t) : -1;
if (t == -1 || i == -1) {
@@ -1171,7 +1171,7 @@ void EobCoreEngine::spellCallback_start_flameBlade() {
}
}
-void EobCoreEngine::spellCallback_start_slowPoison() {
+void EoBCoreEngine::spellCallback_start_slowPoison() {
if (_characters[_activeSpellCharId].flags & 2) {
_characters[_activeSpellCharId].effectFlags |= 0x2000;
setSpellEventTimer(_activeSpell, 1, 32760, 1, 1);
@@ -1180,13 +1180,13 @@ void EobCoreEngine::spellCallback_start_slowPoison() {
}
}
-bool EobCoreEngine::spellCallback_end_slowPoison(void *obj) {
- EobCharacter *c = (EobCharacter*)obj;
+bool EoBCoreEngine::spellCallback_end_slowPoison(void *obj) {
+ EoBCharacter *c = (EoBCharacter*)obj;
c->effectFlags &= ~0x2000;
return true;
}
-void EobCoreEngine::spellCallback_start_createFood() {
+void EoBCoreEngine::spellCallback_start_createFood() {
for (int i = 0; i < 6; i++) {
if (!testCharacter(i, 3))
continue;
@@ -1194,7 +1194,7 @@ void EobCoreEngine::spellCallback_start_createFood() {
}
}
-void EobCoreEngine::spellCallback_start_removeParalysis() {
+void EoBCoreEngine::spellCallback_start_removeParalysis() {
int numChar = 4;
for (int i = 0; i < 6; i++) {
if (!(_characters[i].flags & 4) || !numChar)
@@ -1204,39 +1204,39 @@ void EobCoreEngine::spellCallback_start_removeParalysis() {
}
}
-void EobCoreEngine::spellCallback_start_causeSeriousWounds() {
+void EoBCoreEngine::spellCallback_start_causeSeriousWounds() {
causeWounds(2, 8, 1);
}
-void EobCoreEngine::spellCallback_start_cureSeriousWounds() {
+void EoBCoreEngine::spellCallback_start_cureSeriousWounds() {
modifyCharacterHitpoints(_activeSpellCharId, rollDice(2, 8, 1));
}
-void EobCoreEngine::spellCallback_start_neutralizePoison() {
+void EoBCoreEngine::spellCallback_start_neutralizePoison() {
if (_characters[_activeSpellCharId].flags & 2)
neutralizePoison(_activeSpellCharId);
else
printNoEffectWarning();
}
-void EobCoreEngine::spellCallback_start_causeCriticalWounds() {
+void EoBCoreEngine::spellCallback_start_causeCriticalWounds() {
causeWounds(3, 8, 3);
}
-void EobCoreEngine::spellCallback_start_cureCriticalWounds() {
+void EoBCoreEngine::spellCallback_start_cureCriticalWounds() {
modifyCharacterHitpoints(_activeSpellCharId, rollDice(3, 8, 3));
}
-void EobCoreEngine::spellCallback_start_flameStrike() {
+void EoBCoreEngine::spellCallback_start_flameStrike() {
launchMagicObject(_openBookChar, _flags.gameID == GI_EOB1 ? 8 : 7, _currentBlock, _activeSpellCharacterPos, _currentDirection);
}
-bool EobCoreEngine::spellCallback_end_flameStrike(void *obj) {
- EobFlyingObject *fo = (EobFlyingObject*)obj;
+bool EoBCoreEngine::spellCallback_end_flameStrike(void *obj) {
+ EoBFlyingObject *fo = (EoBFlyingObject*)obj;
return magicObjectDamageHit(fo, 6, 8, 0, 0);
}
-void EobCoreEngine::spellCallback_start_raiseDead() {
+void EoBCoreEngine::spellCallback_start_raiseDead() {
if (_characters[_activeSpellCharId].hitPointsCur == -10 && ((_characters[_activeSpellCharId].raceSex >> 1) != 1)) {
_characters[_activeSpellCharId].hitPointsCur = 1;
gui_drawCharPortraitWithStats(_activeSpellCharId);
@@ -1245,23 +1245,23 @@ void EobCoreEngine::spellCallback_start_raiseDead() {
}
}
-void EobCoreEngine::spellCallback_start_harm() {
+void EoBCoreEngine::spellCallback_start_harm() {
causeWounds(-1, -1, -1);
}
-void EobCoreEngine::spellCallback_start_heal() {
- EobCharacter *c = &_characters[_activeSpellCharId];
+void EoBCoreEngine::spellCallback_start_heal() {
+ EoBCharacter *c = &_characters[_activeSpellCharId];
if (c->hitPointsMax <= c->hitPointsCur)
printWarning(_magicStrings4[0]);
else
modifyCharacterHitpoints(_activeSpellCharId, c->hitPointsMax - c->hitPointsCur);
}
-void EobCoreEngine::spellCallback_start_layOnHands() {
+void EoBCoreEngine::spellCallback_start_layOnHands() {
modifyCharacterHitpoints(_activeSpellCharId, _characters[_openBookChar].level[0] << 1);
}
-void EobCoreEngine::spellCallback_start_turnUndead() {
+void EoBCoreEngine::spellCallback_start_turnUndead() {
uint16 bl = calcNewBlockPosition(_currentBlock, _currentDirection);
if (!(_levelBlockProperties[bl].flags & 7))
return;
@@ -1287,13 +1287,13 @@ void EobCoreEngine::spellCallback_start_turnUndead() {
_preventMonsterFlash = false;
}
-bool EobCoreEngine::spellCallback_end_monster_lightningBolt(void *obj) {
- EobFlyingObject *fo = (EobFlyingObject*)obj;
+bool EoBCoreEngine::spellCallback_end_monster_lightningBolt(void *obj) {
+ EoBFlyingObject *fo = (EoBFlyingObject*)obj;
return magicObjectDamageHit(fo, 0, 0, 12, 1);
}
-bool EobCoreEngine::spellCallback_end_monster_fireball1(void *obj) {
- EobFlyingObject *fo = (EobFlyingObject*)obj;
+bool EoBCoreEngine::spellCallback_end_monster_fireball1(void *obj) {
+ EoBFlyingObject *fo = (EoBFlyingObject*)obj;
bool res = false;
if (_partyEffectFlags & 0x20000) {
res = magicObjectDamageHit(fo, 4, 10, 6, 0);
@@ -1307,13 +1307,13 @@ bool EobCoreEngine::spellCallback_end_monster_fireball1(void *obj) {
return res;
}
-bool EobCoreEngine::spellCallback_end_monster_fireball2(void *obj) {
- EobFlyingObject *fo = (EobFlyingObject*)obj;
+bool EoBCoreEngine::spellCallback_end_monster_fireball2(void *obj) {
+ EoBFlyingObject *fo = (EoBFlyingObject*)obj;
return magicObjectDamageHit(fo, 0, 0, 18, 0);
}
-bool EobCoreEngine::spellCallback_end_monster_deathSpell(void *obj) {
- EobFlyingObject *fo = (EobFlyingObject*)obj;
+bool EoBCoreEngine::spellCallback_end_monster_deathSpell(void *obj) {
+ EoBFlyingObject *fo = (EoBFlyingObject*)obj;
if (fo->curBlock != _currentBlock)
return false;
@@ -1329,8 +1329,8 @@ bool EobCoreEngine::spellCallback_end_monster_deathSpell(void *obj) {
return true;
}
-bool EobCoreEngine::spellCallback_end_monster_disintegrate(void *obj) {
- EobFlyingObject *fo = (EobFlyingObject*)obj;
+bool EoBCoreEngine::spellCallback_end_monster_disintegrate(void *obj) {
+ EoBFlyingObject *fo = (EoBFlyingObject*)obj;
if (fo->curBlock != _currentBlock)
return false;
@@ -1345,8 +1345,8 @@ bool EobCoreEngine::spellCallback_end_monster_disintegrate(void *obj) {
return true;
}
-bool EobCoreEngine::spellCallback_end_monster_causeCriticalWounds(void *obj) {
- EobFlyingObject *fo = (EobFlyingObject*)obj;
+bool EoBCoreEngine::spellCallback_end_monster_causeCriticalWounds(void *obj) {
+ EoBFlyingObject *fo = (EoBFlyingObject*)obj;
if (fo->curBlock != _currentBlock)
return false;
@@ -1359,8 +1359,8 @@ bool EobCoreEngine::spellCallback_end_monster_causeCriticalWounds(void *obj) {
return true;
}
-bool EobCoreEngine::spellCallback_end_monster_fleshToStone(void *obj) {
- EobFlyingObject *fo = (EobFlyingObject*)obj;
+bool EoBCoreEngine::spellCallback_end_monster_fleshToStone(void *obj) {
+ EoBFlyingObject *fo = (EoBFlyingObject*)obj;
if (fo->curBlock != _currentBlock)
return false;
diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h
index 072b4187c1..f5d70e084c 100644
--- a/engines/kyra/resource.h
+++ b/engines/kyra/resource.h
@@ -252,464 +252,464 @@ enum KyraResources {
k3ItemStringMap,
#if defined(ENABLE_EOB) || defined(ENABLE_LOL)
- kLolEobCommonMoreStrings,
- kLolEobCommonDscShapeIndex,
- kLolEobCommonDscX,
- kLolEobCommonDscTileIndex,
- kLolEobCommonDscUnk2,
- kLolEobCommonDscDoorShapeIndex,
- kLolEobCommonDscDimData1,
- kLolEobCommonDscDimData2,
- kLolEobCommonDscBlockMap,
- kLolEobCommonDscDimMap,
- kLolEobCommonDscDoorY2,
- kLolEobCommonDscBlockIndex,
-
- kEobBaseChargenStrings1,
- kEobBaseChargenStrings2,
- kEobBaseChargenStartLevels,
- kEobBaseChargenStatStrings,
- kEobBaseChargenRaceSexStrings,
- kEobBaseChargenClassStrings,
- kEobBaseChargenAlignmentStrings,
- kEobBaseChargenEnterGameStrings,
- kEobBaseChargenClassMinStats,
- kEobBaseChargenRaceMinStats,
- kEobBaseChargenRaceMaxStats,
-
- kEobBaseSaveThrowTable1,
- kEobBaseSaveThrowTable2,
- kEobBaseSaveThrowTable3,
- kEobBaseSaveThrowTable4,
- kEobBaseSaveThrwLvlIndex,
- kEobBaseSaveThrwModDiv,
- kEobBaseSaveThrwModExt,
-
- kEobBasePryDoorStrings,
- kEobBaseWarningStrings,
-
- kEobBaseItemSuffixStringsRings,
- kEobBaseItemSuffixStringsPotions,
- kEobBaseItemSuffixStringsWands,
+ kRpgCommonMoreStrings,
+ kRpgCommonDscShapeIndex,
+ kRpgCommonDscX,
+ kRpgCommonDscTileIndex,
+ kRpgCommonDscUnk2,
+ kRpgCommonDscDoorShapeIndex,
+ kRpgCommonDscDimData1,
+ kRpgCommonDscDimData2,
+ kRpgCommonDscBlockMap,
+ kRpgCommonDscDimMap,
+ kRpgCommonDscDoorY2,
+ kRpgCommonDscBlockIndex,
+
+ kEoBBaseChargenStrings1,
+ kEoBBaseChargenStrings2,
+ kEoBBaseChargenStartLevels,
+ kEoBBaseChargenStatStrings,
+ kEoBBaseChargenRaceSexStrings,
+ kEoBBaseChargenClassStrings,
+ kEoBBaseChargenAlignmentStrings,
+ kEoBBaseChargenEnterGameStrings,
+ kEoBBaseChargenClassMinStats,
+ kEoBBaseChargenRaceMinStats,
+ kEoBBaseChargenRaceMaxStats,
+
+ kEoBBaseSaveThrowTable1,
+ kEoBBaseSaveThrowTable2,
+ kEoBBaseSaveThrowTable3,
+ kEoBBaseSaveThrowTable4,
+ kEoBBaseSaveThrwLvlIndex,
+ kEoBBaseSaveThrwModDiv,
+ kEoBBaseSaveThrwModExt,
+
+ kEoBBasePryDoorStrings,
+ kEoBBaseWarningStrings,
+
+ kEoBBaseItemSuffixStringsRings,
+ kEoBBaseItemSuffixStringsPotions,
+ kEoBBaseItemSuffixStringsWands,
- kEobBaseRipItemStrings,
- kEobBaseCursedString,
- kEobBaseEnchantedString,
- kEobBaseMagicObjectStrings,
- kEobBaseMagicObjectString5,
- kEobBasePatternSuffix,
- kEobBasePatternGrFix1,
- kEobBasePatternGrFix2,
- kEobBaseValidateArmorString,
- kEobBaseValidateCursedString,
- kEobBaseValidateNoDropString,
- kEobBasePotionStrings,
- kEobBaseWandStrings,
- kEobBaseItemMisuseStrings,
-
- kEobBaseTakenStrings,
- kEobBasePotionEffectStrings,
-
- kEobBaseYesNoStrings,
- kEobBaseNpcMaxStrings,
- kEobBaseOkStrings,
- kEobBaseNpcJoinStrings,
- kEobBaseCancelStrings,
- kEobBaseAbortStrings,
-
- kEobBaseMenuStringsMain,
- kEobBaseMenuStringsSaveLoad,
- kEobBaseMenuStringsOnOff,
- kEobBaseMenuStringsSpells,
- kEobBaseMenuStringsRest,
- kEobBaseMenuStringsDrop,
- kEobBaseMenuStringsExit,
- kEobBaseMenuStringsStarve,
- kEobBaseMenuStringsScribe,
- kEobBaseMenuStringsDrop2,
- kEobBaseMenuStringsHead,
- kEobBaseMenuStringsPoison,
- kEobBaseMenuStringsMgc,
- kEobBaseMenuStringsPrefs,
- kEobBaseMenuStringsRest2,
- kEobBaseMenuStringsRest3,
- kEobBaseMenuStringsRest4,
- kEobBaseMenuStringsDefeat,
- kEobBaseMenuStringsTransfer,
- kEobBaseMenuStringsSpec,
- kEobBaseMenuStringsSpellNo,
- kEobBaseMenuYesNoStrings,
-
- kEobBaseSpellLevelsMage,
- kEobBaseSpellLevelsCleric,
- kEobBaseNumSpellsCleric,
- kEobBaseNumSpellsWisAdj,
- kEobBaseNumSpellsPal,
- kEobBaseNumSpellsMage,
-
- kEobBaseCharGuiStringsHp,
- kEobBaseCharGuiStringsWp1,
- kEobBaseCharGuiStringsWp2,
- kEobBaseCharGuiStringsWr,
- kEobBaseCharGuiStringsSt1,
- kEobBaseCharGuiStringsSt2,
- kEobBaseCharGuiStringsIn,
-
- kEobBaseCharStatusStrings7,
- kEobBaseCharStatusStrings81,
- kEobBaseCharStatusStrings82,
- kEobBaseCharStatusStrings9,
- kEobBaseCharStatusStrings12,
- kEobBaseCharStatusStrings131,
- kEobBaseCharStatusStrings132,
-
- kEobBaseLevelGainStrings,
- kEobBaseExperienceTable0,
- kEobBaseExperienceTable1,
- kEobBaseExperienceTable2,
- kEobBaseExperienceTable3,
- kEobBaseExperienceTable4,
-
- kEobBaseClassModifierFlags,
-
- kEobBaseMonsterStepTable01,
- kEobBaseMonsterStepTable02,
- kEobBaseMonsterStepTable1,
- kEobBaseMonsterStepTable2,
- kEobBaseMonsterStepTable3,
- kEobBaseMonsterCloseAttPosTable1,
- kEobBaseMonsterCloseAttPosTable21,
- kEobBaseMonsterCloseAttPosTable22,
- kEobBaseMonsterCloseAttUnkTable,
- kEobBaseMonsterCloseAttChkTable1,
- kEobBaseMonsterCloseAttChkTable2,
- kEobBaseMonsterCloseAttDstTable1,
- kEobBaseMonsterCloseAttDstTable2,
-
- kEobBaseMonsterProximityTable,
- kEobBaseFindBlockMonstersTable,
- kEobBaseMonsterDirChangeTable,
- kEobBaseMonsterDistAttStrings,
-
- kEobBaseEncodeMonsterDefs,
- kEobBaseNpcPresets,
-
- kEobBaseWllFlagPreset,
- kEobBaseDscShapeCoords,
-
- kEobBaseDscDoorScaleOffs,
- kEobBaseDscDoorScaleMult1,
- kEobBaseDscDoorScaleMult2,
- kEobBaseDscDoorScaleMult3,
- kEobBaseDscDoorScaleMult4,
- kEobBaseDscDoorScaleMult5,
- kEobBaseDscDoorScaleMult6,
- kEobBaseDscDoorType5Offs,
- kEobBaseDscDoorXE,
- kEobBaseDscDoorY1,
- kEobBaseDscDoorY3,
- kEobBaseDscDoorY4,
- kEobBaseDscDoorY5,
- kEobBaseDscDoorY6,
- kEobBaseDscDoorY7,
- kEobBaseDscDoorCoordsExt,
-
- kEobBaseDscItemPosIndex,
- kEobBaseDscItemShpX,
- kEobBaseDscItemScaleIndex,
- kEobBaseDscItemTileIndex,
- kEobBaseDscItemShapeMap,
-
- kEobBaseDscMonsterFrmOffsTbl1,
- kEobBaseDscMonsterFrmOffsTbl2,
-
- kEobBaseInvSlotX,
- kEobBaseInvSlotY,
- kEobBaseSlotValidationFlags,
-
- kEobBaseProjectileWeaponTypes,
- kEobBaseWandTypes,
-
- kEobBaseDrawObjPosIndex,
- kEobBaseFlightObjFlipIndex,
- kEobBaseFlightObjShpMap,
- kEobBaseFlightObjSclIndex,
-
- kEobBaseDscTelptrShpCoords,
-
- kEobBasePortalSeqData,
- kEobBaseManDef,
- kEobBaseManWord,
- kEobBaseManPrompt,
-
- kEobBaseBookNumbers,
- kEobBaseMageSpellsList,
- kEobBaseClericSpellsList,
- kEobBaseSpellNames,
- kEobBaseMagicStrings1,
- kEobBaseMagicStrings2,
- kEobBaseMagicStrings3,
- kEobBaseMagicStrings4,
- kEobBaseMagicStrings6,
- kEobBaseMagicStrings7,
- kEobBaseMagicStrings8,
-
- kEobBaseExpObjectTlMode,
- kEobBaseExpObjectTblIndex,
- kEobBaseExpObjectShpStart,
- kEobBaseExpObjectTbl1,
- kEobBaseExpObjectTbl2,
- kEobBaseExpObjectTbl3,
- kEobBaseExpObjectY,
-
- kEobBaseSparkDefSteps,
- kEobBaseSparkDefSubSteps,
- kEobBaseSparkDefShift,
- kEobBaseSparkDefAdd,
- kEobBaseSparkDefX,
- kEobBaseSparkDefY,
- kEobBaseSparkOfFlags1,
- kEobBaseSparkOfFlags2,
- kEobBaseSparkOfShift,
- kEobBaseSparkOfX,
- kEobBaseSparkOfY,
-
- kEobBaseSpellProperties,
- kEobBaseMagicFlightProps,
- kEobBaseTurnUndeadEffect,
- kEobBaseBurningHandsDest,
- kEobBaseConeOfColdDest1,
- kEobBaseConeOfColdDest2,
- kEobBaseConeOfColdDest3,
- kEobBaseConeOfColdDest4,
- kEobBaseConeOfColdGfxTbl,
-
- kEob1MainMenuStrings,
- kEob1BonusStrings,
-
- kEob1IntroFilesOpening,
- kEob1IntroFilesTower,
- kEob1IntroFilesOrb,
- kEob1IntroFilesWdEntry,
- kEob1IntroFilesKing,
- kEob1IntroFilesHands,
- kEob1IntroFilesWdExit,
- kEob1IntroFilesTunnel,
- kEob1IntroOpeningFrmDelay,
- kEob1IntroWdEncodeX,
- kEob1IntroWdEncodeY,
- kEob1IntroWdEncodeWH,
- kEob1IntroWdDsX,
- kEob1IntroWdDsY,
- kEob1IntroTvlX1,
- kEob1IntroTvlY1,
- kEob1IntroTvlX2,
- kEob1IntroTvlY2,
- kEob1IntroTvlW,
- kEob1IntroTvlH,
-
- kEob1DoorShapeDefs,
- kEob1DoorSwitchShapeDefs,
- kEob1DoorSwitchCoords,
- kEob1MonsterProperties,
-
- kEob1EnemyMageSpellList,
- kEob1EnemyMageSfx,
- kEob1BeholderSpellList,
- kEob1BeholderSfx,
-
- kEob1TurnUndeadString,
-
- kEob1NpcShpData,
- kEob1NpcSubShpIndex1,
- kEob1NpcSubShpIndex2,
- kEob1NpcSubShpY,
- kEob1Npc0Strings,
- kEob1Npc11Strings,
- kEob1Npc12Strings,
- kEob1Npc21Strings,
- kEob1Npc22Strings,
- kEob1Npc31Strings,
- kEob1Npc32Strings,
- kEob1Npc4Strings,
- kEob1Npc5Strings,
- kEob1Npc6Strings,
- kEob1Npc7Strings,
-
- kEob2MainMenuStrings,
- kEob2TransferConvertTable,
- kEob2TransferExpTable,
-
- kEob2IntroStrings,
- kEob2IntroCPSFiles,
- kEob2IntroSeqData00,
- kEob2IntroSeqData01,
- kEob2IntroSeqData02,
- kEob2IntroSeqData03,
- kEob2IntroSeqData04,
- kEob2IntroSeqData05,
- kEob2IntroSeqData06,
- kEob2IntroSeqData07,
- kEob2IntroSeqData08,
- kEob2IntroSeqData09,
- kEob2IntroSeqData10,
- kEob2IntroSeqData11,
- kEob2IntroSeqData12,
- kEob2IntroSeqData13,
- kEob2IntroSeqData14,
- kEob2IntroSeqData15,
- kEob2IntroSeqData16,
- kEob2IntroSeqData17,
- kEob2IntroSeqData18,
- kEob2IntroSeqData19,
- kEob2IntroSeqData20,
- kEob2IntroSeqData21,
- kEob2IntroSeqData22,
- kEob2IntroSeqData23,
- kEob2IntroSeqData24,
- kEob2IntroSeqData25,
- kEob2IntroSeqData26,
- kEob2IntroSeqData27,
- kEob2IntroSeqData28,
- kEob2IntroSeqData29,
- kEob2IntroSeqData30,
- kEob2IntroSeqData31,
- kEob2IntroSeqData32,
- kEob2IntroSeqData33,
- kEob2IntroSeqData34,
- kEob2IntroSeqData35,
- kEob2IntroSeqData36,
- kEob2IntroSeqData37,
- kEob2IntroSeqData38,
- kEob2IntroSeqData39,
- kEob2IntroSeqData40,
- kEob2IntroSeqData41,
- kEob2IntroSeqData42,
- kEob2IntroSeqData43,
- kEob2IntroShapes00,
- kEob2IntroShapes01,
- kEob2IntroShapes04,
- kEob2IntroShapes07,
-
- kEob2FinaleStrings,
- kEob2CreditsData,
- kEob2FinaleCPSFiles,
- kEob2FinaleSeqData00,
- kEob2FinaleSeqData01,
- kEob2FinaleSeqData02,
- kEob2FinaleSeqData03,
- kEob2FinaleSeqData04,
- kEob2FinaleSeqData05,
- kEob2FinaleSeqData06,
- kEob2FinaleSeqData07,
- kEob2FinaleSeqData08,
- kEob2FinaleSeqData09,
- kEob2FinaleSeqData10,
- kEob2FinaleSeqData11,
- kEob2FinaleSeqData12,
- kEob2FinaleSeqData13,
- kEob2FinaleSeqData14,
- kEob2FinaleSeqData15,
- kEob2FinaleSeqData16,
- kEob2FinaleSeqData17,
- kEob2FinaleSeqData18,
- kEob2FinaleSeqData19,
- kEob2FinaleSeqData20,
- kEob2FinaleShapes00,
- kEob2FinaleShapes03,
- kEob2FinaleShapes07,
- kEob2FinaleShapes09,
- kEob2FinaleShapes10,
-
- kEob2NpcShapeData,
- kEob2Npc1Strings,
- kEob2Npc2Strings,
- kEob2MonsterDustStrings,
-
- kEob2DreamSteps,
- kEob2KheldranStrings,
- kEob2HornStrings,
- kEob2HornSounds,
-
- kEob2WallOfForceDsX,
- kEob2WallOfForceDsY,
- kEob2WallOfForceNumW,
- kEob2WallOfForceNumH,
- kEob2WallOfForceShpId,
-
- kLolIngamePakFiles,
- kLolCharacterDefs,
- kLolIngameSfxFiles,
- kLolIngameSfxIndex,
- kLolMusicTrackMap,
- kLolIngameGMSfxIndex,
- kLolIngameMT32SfxIndex,
- kLolIngamePcSpkSfxIndex,
- kLolSpellProperties,
- kLolGameShapeMap,
- kLolSceneItemOffs,
- kLolCharInvIndex,
- kLolCharInvDefs,
- kLolCharDefsMan,
- kLolCharDefsWoman,
- kLolCharDefsKieran,
- kLolCharDefsAkshel,
- kLolExpRequirements,
- kLolMonsterModifiers,
- kLolMonsterShiftOffsets,
- kLolMonsterDirFlags,
- kLolMonsterScaleY,
- kLolMonsterScaleX,
- kLolMonsterScaleWH,
- kLolFlyingObjectShp,
- kLolInventoryDesc,
-
- kLolLevelShpList,
- kLolLevelDatList,
- kLolCompassDefs,
- kLolItemPrices,
- kLolStashSetup,
-
- kLolDscWalls,
- kLolDscOvlMap,
- kLolDscScaleWidthData,
- kLolDscScaleHeightData,
- kLolBaseDscY,
-
- kLolDscDoorScale,
- kLolDscDoor4,
- kLolDscDoorX,
- kLolDscDoorY,
- kLolDscOvlIndex,
-
- kLolScrollXTop,
- kLolScrollYTop,
- kLolScrollXBottom,
- kLolScrollYBottom,
-
- kLolButtonDefs,
- kLolButtonList1,
- kLolButtonList2,
- kLolButtonList3,
- kLolButtonList4,
- kLolButtonList5,
- kLolButtonList6,
- kLolButtonList7,
- kLolButtonList8,
-
- kLolLegendData,
- kLolMapCursorOvl,
- kLolMapStringId,
-
- kLolSpellbookAnim,
- kLolSpellbookCoords,
- kLolHealShapeFrames,
- kLolLightningDefs,
- kLolFireballCoords,
-
- kLolCredits,
-
- kLolHistory,
+ kEoBBaseRipItemStrings,
+ kEoBBaseCursedString,
+ kEoBBaseEnchantedString,
+ kEoBBaseMagicObjectStrings,
+ kEoBBaseMagicObjectString5,
+ kEoBBasePatternSuffix,
+ kEoBBasePatternGrFix1,
+ kEoBBasePatternGrFix2,
+ kEoBBaseValidateArmorString,
+ kEoBBaseValidateCursedString,
+ kEoBBaseValidateNoDropString,
+ kEoBBasePotionStrings,
+ kEoBBaseWandStrings,
+ kEoBBaseItemMisuseStrings,
+
+ kEoBBaseTakenStrings,
+ kEoBBasePotionEffectStrings,
+
+ kEoBBaseYesNoStrings,
+ kEoBBaseNpcMaxStrings,
+ kEoBBaseOkStrings,
+ kEoBBaseNpcJoinStrings,
+ kEoBBaseCancelStrings,
+ kEoBBaseAbortStrings,
+
+ kEoBBaseMenuStringsMain,
+ kEoBBaseMenuStringsSaveLoad,
+ kEoBBaseMenuStringsOnOff,
+ kEoBBaseMenuStringsSpells,
+ kEoBBaseMenuStringsRest,
+ kEoBBaseMenuStringsDrop,
+ kEoBBaseMenuStringsExit,
+ kEoBBaseMenuStringsStarve,
+ kEoBBaseMenuStringsScribe,
+ kEoBBaseMenuStringsDrop2,
+ kEoBBaseMenuStringsHead,
+ kEoBBaseMenuStringsPoison,
+ kEoBBaseMenuStringsMgc,
+ kEoBBaseMenuStringsPrefs,
+ kEoBBaseMenuStringsRest2,
+ kEoBBaseMenuStringsRest3,
+ kEoBBaseMenuStringsRest4,
+ kEoBBaseMenuStringsDefeat,
+ kEoBBaseMenuStringsTransfer,
+ kEoBBaseMenuStringsSpec,
+ kEoBBaseMenuStringsSpellNo,
+ kEoBBaseMenuYesNoStrings,
+
+ kEoBBaseSpellLevelsMage,
+ kEoBBaseSpellLevelsCleric,
+ kEoBBaseNumSpellsCleric,
+ kEoBBaseNumSpellsWisAdj,
+ kEoBBaseNumSpellsPal,
+ kEoBBaseNumSpellsMage,
+
+ kEoBBaseCharGuiStringsHp,
+ kEoBBaseCharGuiStringsWp1,
+ kEoBBaseCharGuiStringsWp2,
+ kEoBBaseCharGuiStringsWr,
+ kEoBBaseCharGuiStringsSt1,
+ kEoBBaseCharGuiStringsSt2,
+ kEoBBaseCharGuiStringsIn,
+
+ kEoBBaseCharStatusStrings7,
+ kEoBBaseCharStatusStrings81,
+ kEoBBaseCharStatusStrings82,
+ kEoBBaseCharStatusStrings9,
+ kEoBBaseCharStatusStrings12,
+ kEoBBaseCharStatusStrings131,
+ kEoBBaseCharStatusStrings132,
+
+ kEoBBaseLevelGainStrings,
+ kEoBBaseExperienceTable0,
+ kEoBBaseExperienceTable1,
+ kEoBBaseExperienceTable2,
+ kEoBBaseExperienceTable3,
+ kEoBBaseExperienceTable4,
+
+ kEoBBaseClassModifierFlags,
+
+ kEoBBaseMonsterStepTable01,
+ kEoBBaseMonsterStepTable02,
+ kEoBBaseMonsterStepTable1,
+ kEoBBaseMonsterStepTable2,
+ kEoBBaseMonsterStepTable3,
+ kEoBBaseMonsterCloseAttPosTable1,
+ kEoBBaseMonsterCloseAttPosTable21,
+ kEoBBaseMonsterCloseAttPosTable22,
+ kEoBBaseMonsterCloseAttUnkTable,
+ kEoBBaseMonsterCloseAttChkTable1,
+ kEoBBaseMonsterCloseAttChkTable2,
+ kEoBBaseMonsterCloseAttDstTable1,
+ kEoBBaseMonsterCloseAttDstTable2,
+
+ kEoBBaseMonsterProximityTable,
+ kEoBBaseFindBlockMonstersTable,
+ kEoBBaseMonsterDirChangeTable,
+ kEoBBaseMonsterDistAttStrings,
+
+ kEoBBaseEncodeMonsterDefs,
+ kEoBBaseNpcPresets,
+
+ kEoBBaseWllFlagPreset,
+ kEoBBaseDscShapeCoords,
+
+ kEoBBaseDscDoorScaleOffs,
+ kEoBBaseDscDoorScaleMult1,
+ kEoBBaseDscDoorScaleMult2,
+ kEoBBaseDscDoorScaleMult3,
+ kEoBBaseDscDoorScaleMult4,
+ kEoBBaseDscDoorScaleMult5,
+ kEoBBaseDscDoorScaleMult6,
+ kEoBBaseDscDoorType5Offs,
+ kEoBBaseDscDoorXE,
+ kEoBBaseDscDoorY1,
+ kEoBBaseDscDoorY3,
+ kEoBBaseDscDoorY4,
+ kEoBBaseDscDoorY5,
+ kEoBBaseDscDoorY6,
+ kEoBBaseDscDoorY7,
+ kEoBBaseDscDoorCoordsExt,
+
+ kEoBBaseDscItemPosIndex,
+ kEoBBaseDscItemShpX,
+ kEoBBaseDscItemScaleIndex,
+ kEoBBaseDscItemTileIndex,
+ kEoBBaseDscItemShapeMap,
+
+ kEoBBaseDscMonsterFrmOffsTbl1,
+ kEoBBaseDscMonsterFrmOffsTbl2,
+
+ kEoBBaseInvSlotX,
+ kEoBBaseInvSlotY,
+ kEoBBaseSlotValidationFlags,
+
+ kEoBBaseProjectileWeaponTypes,
+ kEoBBaseWandTypes,
+
+ kEoBBaseDrawObjPosIndex,
+ kEoBBaseFlightObjFlipIndex,
+ kEoBBaseFlightObjShpMap,
+ kEoBBaseFlightObjSclIndex,
+
+ kEoBBaseDscTelptrShpCoords,
+
+ kEoBBasePortalSeqData,
+ kEoBBaseManDef,
+ kEoBBaseManWord,
+ kEoBBaseManPrompt,
+
+ kEoBBaseBookNumbers,
+ kEoBBaseMageSpellsList,
+ kEoBBaseClericSpellsList,
+ kEoBBaseSpellNames,
+ kEoBBaseMagicStrings1,
+ kEoBBaseMagicStrings2,
+ kEoBBaseMagicStrings3,
+ kEoBBaseMagicStrings4,
+ kEoBBaseMagicStrings6,
+ kEoBBaseMagicStrings7,
+ kEoBBaseMagicStrings8,
+
+ kEoBBaseExpObjectTlMode,
+ kEoBBaseExpObjectTblIndex,
+ kEoBBaseExpObjectShpStart,
+ kEoBBaseExpObjectTbl1,
+ kEoBBaseExpObjectTbl2,
+ kEoBBaseExpObjectTbl3,
+ kEoBBaseExpObjectY,
+
+ kEoBBaseSparkDefSteps,
+ kEoBBaseSparkDefSubSteps,
+ kEoBBaseSparkDefShift,
+ kEoBBaseSparkDefAdd,
+ kEoBBaseSparkDefX,
+ kEoBBaseSparkDefY,
+ kEoBBaseSparkOfFlags1,
+ kEoBBaseSparkOfFlags2,
+ kEoBBaseSparkOfShift,
+ kEoBBaseSparkOfX,
+ kEoBBaseSparkOfY,
+
+ kEoBBaseSpellProperties,
+ kEoBBaseMagicFlightProps,
+ kEoBBaseTurnUndeadEffect,
+ kEoBBaseBurningHandsDest,
+ kEoBBaseConeOfColdDest1,
+ kEoBBaseConeOfColdDest2,
+ kEoBBaseConeOfColdDest3,
+ kEoBBaseConeOfColdDest4,
+ kEoBBaseConeOfColdGfxTbl,
+
+ kEoB1MainMenuStrings,
+ kEoB1BonusStrings,
+
+ kEoB1IntroFilesOpening,
+ kEoB1IntroFilesTower,
+ kEoB1IntroFilesOrb,
+ kEoB1IntroFilesWdEntry,
+ kEoB1IntroFilesKing,
+ kEoB1IntroFilesHands,
+ kEoB1IntroFilesWdExit,
+ kEoB1IntroFilesTunnel,
+ kEoB1IntroOpeningFrmDelay,
+ kEoB1IntroWdEncodeX,
+ kEoB1IntroWdEncodeY,
+ kEoB1IntroWdEncodeWH,
+ kEoB1IntroWdDsX,
+ kEoB1IntroWdDsY,
+ kEoB1IntroTvlX1,
+ kEoB1IntroTvlY1,
+ kEoB1IntroTvlX2,
+ kEoB1IntroTvlY2,
+ kEoB1IntroTvlW,
+ kEoB1IntroTvlH,
+
+ kEoB1DoorShapeDefs,
+ kEoB1DoorSwitchShapeDefs,
+ kEoB1DoorSwitchCoords,
+ kEoB1MonsterProperties,
+
+ kEoB1EnemyMageSpellList,
+ kEoB1EnemyMageSfx,
+ kEoB1BeholderSpellList,
+ kEoB1BeholderSfx,
+
+ kEoB1TurnUndeadString,
+
+ kEoB1NpcShpData,
+ kEoB1NpcSubShpIndex1,
+ kEoB1NpcSubShpIndex2,
+ kEoB1NpcSubShpY,
+ kEoB1Npc0Strings,
+ kEoB1Npc11Strings,
+ kEoB1Npc12Strings,
+ kEoB1Npc21Strings,
+ kEoB1Npc22Strings,
+ kEoB1Npc31Strings,
+ kEoB1Npc32Strings,
+ kEoB1Npc4Strings,
+ kEoB1Npc5Strings,
+ kEoB1Npc6Strings,
+ kEoB1Npc7Strings,
+
+ kEoB2MainMenuStrings,
+ kEoB2TransferConvertTable,
+ kEoB2TransferExpTable,
+
+ kEoB2IntroStrings,
+ kEoB2IntroCPSFiles,
+ kEoB2IntroSeqData00,
+ kEoB2IntroSeqData01,
+ kEoB2IntroSeqData02,
+ kEoB2IntroSeqData03,
+ kEoB2IntroSeqData04,
+ kEoB2IntroSeqData05,
+ kEoB2IntroSeqData06,
+ kEoB2IntroSeqData07,
+ kEoB2IntroSeqData08,
+ kEoB2IntroSeqData09,
+ kEoB2IntroSeqData10,
+ kEoB2IntroSeqData11,
+ kEoB2IntroSeqData12,
+ kEoB2IntroSeqData13,
+ kEoB2IntroSeqData14,
+ kEoB2IntroSeqData15,
+ kEoB2IntroSeqData16,
+ kEoB2IntroSeqData17,
+ kEoB2IntroSeqData18,
+ kEoB2IntroSeqData19,
+ kEoB2IntroSeqData20,
+ kEoB2IntroSeqData21,
+ kEoB2IntroSeqData22,
+ kEoB2IntroSeqData23,
+ kEoB2IntroSeqData24,
+ kEoB2IntroSeqData25,
+ kEoB2IntroSeqData26,
+ kEoB2IntroSeqData27,
+ kEoB2IntroSeqData28,
+ kEoB2IntroSeqData29,
+ kEoB2IntroSeqData30,
+ kEoB2IntroSeqData31,
+ kEoB2IntroSeqData32,
+ kEoB2IntroSeqData33,
+ kEoB2IntroSeqData34,
+ kEoB2IntroSeqData35,
+ kEoB2IntroSeqData36,
+ kEoB2IntroSeqData37,
+ kEoB2IntroSeqData38,
+ kEoB2IntroSeqData39,
+ kEoB2IntroSeqData40,
+ kEoB2IntroSeqData41,
+ kEoB2IntroSeqData42,
+ kEoB2IntroSeqData43,
+ kEoB2IntroShapes00,
+ kEoB2IntroShapes01,
+ kEoB2IntroShapes04,
+ kEoB2IntroShapes07,
+
+ kEoB2FinaleStrings,
+ kEoB2CreditsData,
+ kEoB2FinaleCPSFiles,
+ kEoB2FinaleSeqData00,
+ kEoB2FinaleSeqData01,
+ kEoB2FinaleSeqData02,
+ kEoB2FinaleSeqData03,
+ kEoB2FinaleSeqData04,
+ kEoB2FinaleSeqData05,
+ kEoB2FinaleSeqData06,
+ kEoB2FinaleSeqData07,
+ kEoB2FinaleSeqData08,
+ kEoB2FinaleSeqData09,
+ kEoB2FinaleSeqData10,
+ kEoB2FinaleSeqData11,
+ kEoB2FinaleSeqData12,
+ kEoB2FinaleSeqData13,
+ kEoB2FinaleSeqData14,
+ kEoB2FinaleSeqData15,
+ kEoB2FinaleSeqData16,
+ kEoB2FinaleSeqData17,
+ kEoB2FinaleSeqData18,
+ kEoB2FinaleSeqData19,
+ kEoB2FinaleSeqData20,
+ kEoB2FinaleShapes00,
+ kEoB2FinaleShapes03,
+ kEoB2FinaleShapes07,
+ kEoB2FinaleShapes09,
+ kEoB2FinaleShapes10,
+
+ kEoB2NpcShapeData,
+ kEoB2Npc1Strings,
+ kEoB2Npc2Strings,
+ kEoB2MonsterDustStrings,
+
+ kEoB2DreamSteps,
+ kEoB2KheldranStrings,
+ kEoB2HornStrings,
+ kEoB2HornSounds,
+
+ kEoB2WallOfForceDsX,
+ kEoB2WallOfForceDsY,
+ kEoB2WallOfForceNumW,
+ kEoB2WallOfForceNumH,
+ kEoB2WallOfForceShpId,
+
+ kLoLIngamePakFiles,
+ kLoLCharacterDefs,
+ kLoLIngameSfxFiles,
+ kLoLIngameSfxIndex,
+ kLoLMusicTrackMap,
+ kLoLIngameGMSfxIndex,
+ kLoLIngameMT32SfxIndex,
+ kLoLIngamePcSpkSfxIndex,
+ kLoLSpellProperties,
+ kLoLGameShapeMap,
+ kLoLSceneItemOffs,
+ kLoLCharInvIndex,
+ kLoLCharInvDefs,
+ kLoLCharDefsMan,
+ kLoLCharDefsWoman,
+ kLoLCharDefsKieran,
+ kLoLCharDefsAkshel,
+ kLoLExpRequirements,
+ kLoLMonsterModifiers,
+ kLoLMonsterShiftOffsets,
+ kLoLMonsterDirFlags,
+ kLoLMonsterScaleY,
+ kLoLMonsterScaleX,
+ kLoLMonsterScaleWH,
+ kLoLFlyingObjectShp,
+ kLoLInventoryDesc,
+
+ kLoLLevelShpList,
+ kLoLLevelDatList,
+ kLoLCompassDefs,
+ kLoLItemPrices,
+ kLoLStashSetup,
+
+ kLoLDscWalls,
+ kLoLDscOvlMap,
+ kLoLDscScaleWidthData,
+ kLoLDscScaleHeightData,
+ kLoLBaseDscY,
+
+ kLoLDscDoorScale,
+ kLoLDscDoor4,
+ kLoLDscDoorX,
+ kLoLDscDoorY,
+ kLoLDscOvlIndex,
+
+ kLoLScrollXTop,
+ kLoLScrollYTop,
+ kLoLScrollXBottom,
+ kLoLScrollYBottom,
+
+ kLoLButtonDefs,
+ kLoLButtonList1,
+ kLoLButtonList2,
+ kLoLButtonList3,
+ kLoLButtonList4,
+ kLoLButtonList5,
+ kLoLButtonList6,
+ kLoLButtonList7,
+ kLoLButtonList8,
+
+ kLoLLegendData,
+ kLoLMapCursorOvl,
+ kLoLMapStringId,
+
+ kLoLSpellbookAnim,
+ kLoLSpellbookCoords,
+ kLoLHealShapeFrames,
+ kLoLLightningDefs,
+ kLoLFireballCoords,
+
+ kLoLCredits,
+
+ kLoLHistory,
#endif // ENABLE_EOB || ENABLE_LOL
kMaxResIDs
@@ -751,9 +751,9 @@ public:
const LoLButtonDef *loadButtonDefs(int id, int &entries);
#endif // ENABLE_LOL
#ifdef ENABLE_EOB
- const EobSequenceStep *loadEob2SeqData(int id, int &entries);
- const EobShapeDef *loadEob2ShapeData(int id, int &entries);
- const EobCharacter *loadEobNpcData(int id, int &entries);
+ const EoBSequenceStep *loadEoB2SeqData(int id, int &entries);
+ const EoBShapeDef *loadEoB2ShapeData(int id, int &entries);
+ const EoBCharacter *loadEoBNpcData(int id, int &entries);
#endif // ENABLE_EOB
// use '-1' to prefetch/unload all ids
@@ -794,9 +794,9 @@ private:
bool loadButtonDefs(Common::SeekableReadStream &stream, void *&ptr, int &size);
#endif // ENABLE_LOL
#ifdef ENABLE_EOB
- bool loadEob2SeqData(Common::SeekableReadStream &stream, void *&ptr, int &size);
- bool loadEob2ShapeData(Common::SeekableReadStream &stream, void *&ptr, int &size);
- bool loadEobNpcData(Common::SeekableReadStream &stream, void *&ptr, int &size);
+ bool loadEoB2SeqData(Common::SeekableReadStream &stream, void *&ptr, int &size);
+ bool loadEoB2ShapeData(Common::SeekableReadStream &stream, void *&ptr, int &size);
+ bool loadEoBNpcData(Common::SeekableReadStream &stream, void *&ptr, int &size);
#endif // ENABLE_EOB
void freeDummy(void *&ptr, int &size);
@@ -820,9 +820,9 @@ private:
void freeButtonDefs(void *&ptr, int &size);
#endif // ENABLE_LOL
#ifdef ENABLE_EOB
- void freeEob2SeqData(void *&ptr, int &size);
- void freeEob2ShapeData(void *&ptr, int &size);
- void freeEobNpcData(void *&ptr, int &size);
+ void freeEoB2SeqData(void *&ptr, int &size);
+ void freeEoB2ShapeData(void *&ptr, int &size);
+ void freeEoBNpcData(void *&ptr, int &size);
#endif // ENABLE_EOB
enum ResTypes {
@@ -836,17 +836,17 @@ private:
k2ShpAnimDataV1 = 6,
k2ShpAnimDataV2 = 7,
- kLolCharData = 8,
- kLolSpellData = 9,
- kLolCompassData = 10,
- kLolFlightShpData = 11,
- kLolButtonData = 12,
- kLolRawDataBe16 = 13,
- kLolRawDataBe32 = 14,
-
- kEob2SequenceData = 15,
- kEob2ShapeData = 16,
- kEobNpcData = 17
+ kLoLCharData = 8,
+ kLoLSpellData = 9,
+ kLoLCompassData = 10,
+ kLoLFlightShpData = 11,
+ kLoLButtonData = 12,
+ kLoLRawDataBe16 = 13,
+ kLoLRawDataBe32 = 14,
+
+ kEoB2SequenceData = 15,
+ kEoB2ShapeData = 16,
+ kEoBNpcData = 17
};
struct FileType {
diff --git a/engines/kyra/saveload_eob.cpp b/engines/kyra/saveload_eob.cpp
index 091b3201bd..31f202362a 100644
--- a/engines/kyra/saveload_eob.cpp
+++ b/engines/kyra/saveload_eob.cpp
@@ -31,7 +31,7 @@
namespace Kyra {
-Common::Error EobCoreEngine::loadGameState(int slot) {
+Common::Error EoBCoreEngine::loadGameState(int slot) {
const char *fileName = 0;
if (slot == -1) {
@@ -51,7 +51,7 @@ Common::Error EobCoreEngine::loadGameState(int slot) {
_screen->fadeToBlack(10);
for (int i = 0; i < 6; i++) {
- EobCharacter *c = &_characters[i];
+ EoBCharacter *c = &_characters[i];
c->id = in.readByte();
c->flags = in.readByte();
in.read(c->name, 11);
@@ -105,7 +105,7 @@ Common::Error EobCoreEngine::loadGameState(int slot) {
_screen->loadShapeSetBitmap("CHARGENA", 3, 3);
for (int i = 0; i < 6; i++) {
- EobCharacter *c = &_characters[i];
+ EoBCharacter *c = &_characters[i];
if (!c->flags || c->portrait < 0)
continue;
c->faceShape = _screen->encodeShape((c->portrait % 10) << 2, (c->portrait / 10) << 5, 4, 32, true);
@@ -113,7 +113,7 @@ Common::Error EobCoreEngine::loadGameState(int slot) {
_screen->loadShapeSetBitmap(_flags.gameID == GI_EOB2 ? "OUTPORTS" : "OUTTAKE", 3, 3);
for (int i = 0; i < 6; i++) {
- EobCharacter *c = &_characters[i];
+ EoBCharacter *c = &_characters[i];
if (!c->flags || c->portrait >= 0)
continue;
c->faceShape = _screen->encodeShape((-(c->portrait + 1)) << 2, _flags.gameID == GI_EOB2 ? 0 : 160, 4, 32, true);
@@ -147,7 +147,7 @@ Common::Error EobCoreEngine::loadGameState(int slot) {
_inf->loadState(in);
for (int i = 0; i < 600; i++) {
- EobItem *t = &_items[i];
+ EoBItem *t = &_items[i];
t->nameUnid = in.readByte();
t->nameId = in.readByte();
t->flags = in.readByte();
@@ -162,7 +162,7 @@ Common::Error EobCoreEngine::loadGameState(int slot) {
}
for (int i = 51; i < 65; i++) {
- EobItemType *t = &_itemTypes[i];
+ EoBItemType *t = &_itemTypes[i];
t->invFlags = in.readUint16BE();
t->handFlags = in.readUint16BE();
t->armorClass = in.readSByte();
@@ -195,9 +195,9 @@ Common::Error EobCoreEngine::loadGameState(int slot) {
LevelTempData *l = _lvlTempData[i];
l->wallsXorData = new uint8[4096];
l->flags = new uint16[1024];
- EobMonsterInPlay *lm = new EobMonsterInPlay[30];
+ EoBMonsterInPlay *lm = new EoBMonsterInPlay[30];
l->monsters = lm;
- EobFlyingObject *lf = new EobFlyingObject[_numFlyingObjects];
+ EoBFlyingObject *lf = new EoBFlyingObject[_numFlyingObjects];
l->flyingObjects = lf;
WallOfForce *lw = new WallOfForce[5];
l->wallsOfForce = lw;
@@ -207,7 +207,7 @@ Common::Error EobCoreEngine::loadGameState(int slot) {
l->flags[ii] = in.readByte();
for (int ii = 0; ii < 30; ii++) {
- EobMonsterInPlay *m = &lm[ii];
+ EoBMonsterInPlay *m = &lm[ii];
m->type = in.readByte();
m->unit = in.readByte();
m->block = in.readUint16BE();
@@ -235,7 +235,7 @@ Common::Error EobCoreEngine::loadGameState(int slot) {
}
for (int ii = 0; ii < _numFlyingObjects; ii++) {
- EobFlyingObject *m = &lf[ii];
+ EoBFlyingObject *m = &lf[ii];
m->enable = in.readByte();
m->objectType = in.readByte();
m->attackerId = in.readSint16BE();
@@ -299,7 +299,7 @@ Common::Error EobCoreEngine::loadGameState(int slot) {
return Common::kNoError;
}
-Common::Error EobCoreEngine::saveGameStateIntern(int slot, const char *saveName, const Graphics::Surface *thumbnail) {
+Common::Error EoBCoreEngine::saveGameStateIntern(int slot, const char *saveName, const Graphics::Surface *thumbnail) {
Common::String saveNameTmp;
const char *fileName = 0;
@@ -326,7 +326,7 @@ Common::Error EobCoreEngine::saveGameStateIntern(int slot, const char *saveName,
timerSpecialCharacterUpdate(0x30 + i);
for (int i = 0; i < 6; i++) {
- EobCharacter *c = &_characters[i];
+ EoBCharacter *c = &_characters[i];
out->writeByte(c->id);
out->writeByte(c->flags);
@@ -400,7 +400,7 @@ Common::Error EobCoreEngine::saveGameStateIntern(int slot, const char *saveName,
_inf->saveState(out);
for (int i = 0; i < 600; i++) {
- EobItem *t = &_items[i];
+ EoBItem *t = &_items[i];
out->writeByte(t->nameUnid);
out->writeByte(t->nameId);
out->writeByte(t->flags);
@@ -415,7 +415,7 @@ Common::Error EobCoreEngine::saveGameStateIntern(int slot, const char *saveName,
}
for (int i = 51; i < 65; i++) {
- EobItemType *t = &_itemTypes[i];
+ EoBItemType *t = &_itemTypes[i];
out->writeUint16BE(t->invFlags);
out->writeUint16BE(t->handFlags);
out->writeSByte(t->armorClass);
@@ -440,12 +440,12 @@ Common::Error EobCoreEngine::saveGameStateIntern(int slot, const char *saveName,
for (int ii = 0; ii < 1024; ii++)
out->writeByte(l->flags[ii] & 0xff);
- EobMonsterInPlay *lm = (EobMonsterInPlay*)_lvlTempData[i]->monsters;
- EobFlyingObject *lf = (EobFlyingObject*)_lvlTempData[i]->flyingObjects;
+ EoBMonsterInPlay *lm = (EoBMonsterInPlay*)_lvlTempData[i]->monsters;
+ EoBFlyingObject *lf = (EoBFlyingObject*)_lvlTempData[i]->flyingObjects;
WallOfForce *lw = (WallOfForce*)_lvlTempData[i]->wallsOfForce;
for (int ii = 0; ii < 30; ii++) {
- EobMonsterInPlay *m = &lm[ii];
+ EoBMonsterInPlay *m = &lm[ii];
out->writeByte(m->type);
out->writeByte(m->unit);
out->writeUint16BE(m->block);
@@ -473,7 +473,7 @@ Common::Error EobCoreEngine::saveGameStateIntern(int slot, const char *saveName,
}
for (int ii = 0; ii < _numFlyingObjects; ii++) {
- EobFlyingObject *m = &lf[ii];
+ EoBFlyingObject *m = &lf[ii];
out->writeByte(m->enable);
out->writeByte(m->objectType);
out->writeSint16BE(m->attackerId);
@@ -513,22 +513,22 @@ Common::Error EobCoreEngine::saveGameStateIntern(int slot, const char *saveName,
return Common::kNoError;
}
-void *EobCoreEngine::generateMonsterTempData(LevelTempData *tmp) {
- EobMonsterInPlay *m = new EobMonsterInPlay[30];
- memcpy(m, _monsters, sizeof(EobMonsterInPlay) * 30);
+void *EoBCoreEngine::generateMonsterTempData(LevelTempData *tmp) {
+ EoBMonsterInPlay *m = new EoBMonsterInPlay[30];
+ memcpy(m, _monsters, sizeof(EoBMonsterInPlay) * 30);
return m;
}
-void EobCoreEngine::restoreMonsterTempData(LevelTempData *tmp) {
- memcpy(_monsters, tmp->monsters, sizeof(EobMonsterInPlay) * 30);
+void EoBCoreEngine::restoreMonsterTempData(LevelTempData *tmp) {
+ memcpy(_monsters, tmp->monsters, sizeof(EoBMonsterInPlay) * 30);
}
-void EobCoreEngine::releaseMonsterTempData(LevelTempData *tmp) {
- EobMonsterInPlay *p = (EobMonsterInPlay*)tmp->monsters;
+void EoBCoreEngine::releaseMonsterTempData(LevelTempData *tmp) {
+ EoBMonsterInPlay *p = (EoBMonsterInPlay*)tmp->monsters;
delete[] p;
}
-void *EobCoreEngine::generateWallOfForceTempData(LevelTempData *tmp) {
+void *EoBCoreEngine::generateWallOfForceTempData(LevelTempData *tmp) {
WallOfForce *w = new WallOfForce[5];
memcpy(w, _wallsOfForce, sizeof(WallOfForce) * 5);
uint32 ct = _system->getMillis();
@@ -537,14 +537,14 @@ void *EobCoreEngine::generateWallOfForceTempData(LevelTempData *tmp) {
return w;
}
-void EobCoreEngine::restoreWallOfForceTempData(LevelTempData *tmp) {
+void EoBCoreEngine::restoreWallOfForceTempData(LevelTempData *tmp) {
memcpy(_wallsOfForce, tmp->wallsOfForce, sizeof(WallOfForce) * 5);
uint32 ct = _system->getMillis();
for (int i = 0; i < 5; i++)
_wallsOfForce[i].duration += ct;
}
-void EobCoreEngine::releaseWallOfForceTempData(LevelTempData *tmp) {
+void EoBCoreEngine::releaseWallOfForceTempData(LevelTempData *tmp) {
WallOfForce *p = (WallOfForce*)tmp->wallsOfForce;
delete[] p;
}
diff --git a/engines/kyra/saveload_lol.cpp b/engines/kyra/saveload_lol.cpp
index c7fb107f35..c4262c0edd 100644
--- a/engines/kyra/saveload_lol.cpp
+++ b/engines/kyra/saveload_lol.cpp
@@ -194,7 +194,7 @@ Common::Error LoLEngine::loadGameState(int slot) {
_lvlTempData[i] = new LevelTempData;
_lvlTempData[i]->wallsXorData = new uint8[4096];
_lvlTempData[i]->flags = new uint16[1024];
- LolMonsterInPlay *lm = new LolMonsterInPlay[30];
+ LoLMonsterInPlay *lm = new LoLMonsterInPlay[30];
_lvlTempData[i]->monsters = lm;
FlyingObject *lf = new FlyingObject[_numFlyingObjects];
_lvlTempData[i]->flyingObjects = lf;
@@ -205,7 +205,7 @@ Common::Error LoLEngine::loadGameState(int slot) {
l->flags[ii] = in.readByte();
for (int ii = 0; ii < 30; ii++) {
- LolMonsterInPlay *m = &lm[ii];
+ LoLMonsterInPlay *m = &lm[ii];
m->nextAssignedObject = in.readUint16BE();
m->nextDrawObject = in.readUint16BE();
m->flyingHeight = in.readByte();
@@ -386,11 +386,11 @@ Common::Error LoLEngine::saveGameStateIntern(int slot, const char *saveName, con
for (int ii = 0; ii < 1024; ii++)
out->writeByte(l->flags[ii] & 0xff);
- LolMonsterInPlay *lm = (LolMonsterInPlay*)_lvlTempData[i]->monsters;
+ LoLMonsterInPlay *lm = (LoLMonsterInPlay*)_lvlTempData[i]->monsters;
FlyingObject *lf = (FlyingObject*)_lvlTempData[i]->flyingObjects;
for (int ii = 0; ii < 30; ii++) {
- LolMonsterInPlay *m = &lm[ii];
+ LoLMonsterInPlay *m = &lm[ii];
out->writeUint16BE(m->nextAssignedObject);
out->writeUint16BE(m->nextDrawObject);
out->writeByte(m->flyingHeight);
@@ -484,8 +484,8 @@ void LoLEngine::restoreBlockTempData(int levelIndex) {
}
void *LoLEngine::generateMonsterTempData(LevelTempData *tmp) {
- LolMonsterInPlay *m = new LolMonsterInPlay[30];
- memcpy(m, _monsters, sizeof(LolMonsterInPlay) * 30);
+ LoLMonsterInPlay *m = new LoLMonsterInPlay[30];
+ memcpy(m, _monsters, sizeof(LoLMonsterInPlay) * 30);
tmp->monsterDifficulty = _monsterDifficulty;
return m;
}
@@ -509,7 +509,7 @@ void LoLEngine::restoreTempDataAdjustMonsterStrength(int index) {
}
void LoLEngine::restoreMonsterTempData(LevelTempData *tmp) {
- memcpy(_monsters, tmp->monsters, sizeof(LolMonsterInPlay) * 30);
+ memcpy(_monsters, tmp->monsters, sizeof(LoLMonsterInPlay) * 30);
for (int i = 0; i < 30; i++) {
if (_monsters[i].block) {
@@ -521,7 +521,7 @@ void LoLEngine::restoreMonsterTempData(LevelTempData *tmp) {
}
void LoLEngine::releaseMonsterTempData(LevelTempData *tmp) {
- LolMonsterInPlay *p = (LolMonsterInPlay*)tmp->monsters;
+ LoLMonsterInPlay *p = (LoLMonsterInPlay*)tmp->monsters;
delete[] p;
}
diff --git a/engines/kyra/saveload_rpg.cpp b/engines/kyra/saveload_rpg.cpp
index 4553570f46..2e9f0228cf 100644
--- a/engines/kyra/saveload_rpg.cpp
+++ b/engines/kyra/saveload_rpg.cpp
@@ -106,19 +106,19 @@ void KyraRpgEngine::releaseTempData() {
}
void *KyraRpgEngine::generateFlyingObjectTempData(LevelTempData *tmp) {
- assert(_flyingObjectStructSize == sizeof(EobFlyingObject));
- EobFlyingObject *f = new EobFlyingObject[_numFlyingObjects];
- memcpy(f, _flyingObjectsPtr, sizeof(EobFlyingObject) * _numFlyingObjects);
+ assert(_flyingObjectStructSize == sizeof(EoBFlyingObject));
+ EoBFlyingObject *f = new EoBFlyingObject[_numFlyingObjects];
+ memcpy(f, _flyingObjectsPtr, sizeof(EoBFlyingObject) * _numFlyingObjects);
return f;
}
void KyraRpgEngine::restoreFlyingObjectTempData(LevelTempData *tmp) {
- assert(_flyingObjectStructSize == sizeof(EobFlyingObject));
- memcpy(_flyingObjectsPtr, tmp->flyingObjects, sizeof(EobFlyingObject) * _numFlyingObjects);
+ assert(_flyingObjectStructSize == sizeof(EoBFlyingObject));
+ memcpy(_flyingObjectsPtr, tmp->flyingObjects, sizeof(EoBFlyingObject) * _numFlyingObjects);
}
void KyraRpgEngine::releaseFlyingObjectTempData(LevelTempData *tmp) {
- EobFlyingObject *p = (EobFlyingObject*)tmp->flyingObjects;
+ EoBFlyingObject *p = (EoBFlyingObject*)tmp->flyingObjects;
delete[] p;
}
diff --git a/engines/kyra/scene_eob.cpp b/engines/kyra/scene_eob.cpp
index 1927df79c1..e82442a117 100644
--- a/engines/kyra/scene_eob.cpp
+++ b/engines/kyra/scene_eob.cpp
@@ -33,7 +33,7 @@
namespace Kyra {
-void EobCoreEngine::loadLevel(int level, int sub) {
+void EoBCoreEngine::loadLevel(int level, int sub) {
_currentLevel = level;
_currentSub = sub;
uint32 end = _system->getMillis() + 500;
@@ -80,7 +80,7 @@ void EobCoreEngine::loadLevel(int level, int sub) {
if (*pos++ == 0xEC)
pos = loadActiveMonsterData(pos, level);
else if (!(_hasTempDataFlags & (1 << (level - 1))))
- memset(_monsters, 0, 30 * sizeof(EobMonsterInPlay));
+ memset(_monsters, 0, 30 * sizeof(EoBMonsterInPlay));
len2 = len - (pos - data);
_inf->loadData(pos, len2);
@@ -111,7 +111,7 @@ void EobCoreEngine::loadLevel(int level, int sub) {
}
loadVcnData(gfxFile.c_str(), 0);
- _screen->loadEobBitmap("INVENT", 0, 5, 3, 2);
+ _screen->loadEoBBitmap("INVENT", 0, 5, 3, 2);
delayUntil(end);
snd_stopSound();
@@ -121,7 +121,7 @@ void EobCoreEngine::loadLevel(int level, int sub) {
_screen->setCurPage(0);
}
-Common::String EobCoreEngine::initLevelData(int sub){
+Common::String EoBCoreEngine::initLevelData(int sub){
const uint8 *data = _screen->getCPagePtr(5) + 2;
const uint8 *pos = data;
@@ -252,7 +252,7 @@ Common::String EobCoreEngine::initLevelData(int sub){
return _curGfxFile;
}
-void EobCoreEngine::addLevelItems() {
+void EoBCoreEngine::addLevelItems() {
for (int i = 0; i < 1024; i++)
_levelBlockProperties[i].drawObjects = 0;
@@ -263,7 +263,7 @@ void EobCoreEngine::addLevelItems() {
}
}
-void EobCoreEngine::loadVcnData(const char *file, const char*/*nextFile*/) {
+void EoBCoreEngine::loadVcnData(const char *file, const char*/*nextFile*/) {
if (file)
strcpy(_lastBlockDataFile, file);
@@ -278,7 +278,7 @@ void EobCoreEngine::loadVcnData(const char *file, const char*/*nextFile*/) {
memcpy(_vcnBlocks, v, tlen);
}
-void EobCoreEngine::loadBlockProperties(const char *mazFile) {
+void EoBCoreEngine::loadBlockProperties(const char *mazFile) {
memset(_levelBlockProperties, 0, 1024 * sizeof(LevelBlockProperty));
const uint8 *p = getBlockFileData(mazFile) + 6;
@@ -293,19 +293,19 @@ void EobCoreEngine::loadBlockProperties(const char *mazFile) {
}
}
-const uint8 *EobCoreEngine::getBlockFileData(int) {
+const uint8 *EoBCoreEngine::getBlockFileData(int) {
Common::SeekableReadStream *s = _res->createReadStream(_curBlockFile);
_screen->loadFileDataToPage(s, 15, s->size());
delete s;
return _screen->getCPagePtr(14);
}
-const uint8 *EobCoreEngine::getBlockFileData(const char *mazFile) {
+const uint8 *EoBCoreEngine::getBlockFileData(const char *mazFile) {
_curBlockFile = mazFile;
return getBlockFileData(0);
}
-void EobCoreEngine::loadDecorations(const char *cpsFile, const char *decFile) {
+void EoBCoreEngine::loadDecorations(const char *cpsFile, const char *decFile) {
_screen->loadShapeSetBitmap(cpsFile, 3, 3);
Common::SeekableReadStream *s = _res->createReadStream(decFile);
@@ -331,9 +331,9 @@ void EobCoreEngine::loadDecorations(const char *cpsFile, const char *decFile) {
int len = s->readUint16LE();
delete[] _levelDecorationRects;
- _levelDecorationRects = new EobRect8[len];
+ _levelDecorationRects = new EoBRect8[len];
for (int i = 0; i < len; i++) {
- EobRect8 *l = &_levelDecorationRects[i];
+ EoBRect8 *l = &_levelDecorationRects[i];
l->x = s->readUint16LE();
l->y = s->readUint16LE();
l->w = s->readUint16LE();
@@ -343,7 +343,7 @@ void EobCoreEngine::loadDecorations(const char *cpsFile, const char *decFile) {
delete s;
}
-void EobCoreEngine::assignWallsAndDecorations(int wallIndex, int vmpIndex, int decIndex, int specialType, int flags) {
+void EoBCoreEngine::assignWallsAndDecorations(int wallIndex, int vmpIndex, int decIndex, int specialType, int flags) {
_wllVmpMap[wallIndex] = vmpIndex;
for (int i = 0; i < 6; i++) {
for (int ii = 0; ii < 10; ii++) {
@@ -372,7 +372,7 @@ void EobCoreEngine::assignWallsAndDecorations(int wallIndex, int vmpIndex, int d
if (_levelDecorationShapes[t])
continue;
- EobRect8 *r = &_levelDecorationRects[t];
+ EoBRect8 *r = &_levelDecorationRects[t];
if (r->w == 0 || r->h == 0)
error("Error trying to make decoration %d (x: %d, y: %d, w: %d, h: %d)", decIndex, r->x, r->y, r->w, r->h);
@@ -389,7 +389,7 @@ void EobCoreEngine::assignWallsAndDecorations(int wallIndex, int vmpIndex, int d
} while (decIndex != -1);
}
-void EobCoreEngine::releaseDecorations() {
+void EoBCoreEngine::releaseDecorations() {
if (_levelDecorationShapes) {
for (int i = 0; i < 400; i++) {
delete[] _levelDecorationShapes[i];
@@ -399,7 +399,7 @@ void EobCoreEngine::releaseDecorations() {
_mappedDecorationsCount = 0;
}
-void EobCoreEngine::releaseDoorShapes() {
+void EoBCoreEngine::releaseDoorShapes() {
for (int i = 0; i < 6; i++) {
delete[] _doorShapes[i];
_doorShapes[i] = 0;
@@ -408,7 +408,7 @@ void EobCoreEngine::releaseDoorShapes() {
}
}
-void EobCoreEngine::toggleWallState(int wall, int toggle) {
+void EoBCoreEngine::toggleWallState(int wall, int toggle) {
wall = wall * 10 + 3;
for (int i = 0; i < 9 ; i++) {
@@ -422,7 +422,7 @@ void EobCoreEngine::toggleWallState(int wall, int toggle) {
}
}
-void EobCoreEngine::drawScene(int refresh) {
+void EoBCoreEngine::drawScene(int refresh) {
generateBlockDrawingBuffer();
drawVcnBlocks();
drawSceneShapes();
@@ -470,7 +470,7 @@ void EobCoreEngine::drawScene(int refresh) {
_sceneUpdateRequired = false;
}
-void EobCoreEngine::drawSceneShapes(int start) {
+void EoBCoreEngine::drawSceneShapes(int start) {
for (int i = start; i < 18; i++) {
uint8 t = _dscTileIndex[i];
uint8 s = _visibleBlocks[t]->walls[_sceneDrawVarDown];
@@ -512,7 +512,7 @@ void EobCoreEngine::drawSceneShapes(int start) {
}
}
-void EobCoreEngine::drawDecorations(int index) {
+void EoBCoreEngine::drawDecorations(int index) {
for (int i = 1; i >= 0; i--) {
int s = index * 2 + i;
if (_dscWallMapping[s]) {
@@ -563,7 +563,7 @@ void EobCoreEngine::drawDecorations(int index) {
}
}
-int EobCoreEngine::calcNewBlockPositionAndTestPassability(uint16 curBlock, uint16 direction) {
+int EoBCoreEngine::calcNewBlockPositionAndTestPassability(uint16 curBlock, uint16 direction) {
uint16 b = calcNewBlockPosition(curBlock, direction);
int w = _levelBlockProperties[b].walls[direction ^ 2];
int f = _wllWallFlags[w];
@@ -585,13 +585,13 @@ int EobCoreEngine::calcNewBlockPositionAndTestPassability(uint16 curBlock, uint1
return b;
}
-void EobCoreEngine::notifyBlockNotPassable() {
+void EoBCoreEngine::notifyBlockNotPassable() {
_txt->printMessage(_warningStrings[0]);
snd_playSoundEffect(29);
removeInputTop();
}
-void EobCoreEngine::moveParty(uint16 block) {
+void EoBCoreEngine::moveParty(uint16 block) {
updateAllMonsterDests();
uint16 old = _currentBlock;
_currentBlock = block;
@@ -616,7 +616,7 @@ void EobCoreEngine::moveParty(uint16 block) {
checkFlyingObjects();
}
-int EobCoreEngine::clickedDoorSwitch(uint16 block, uint16 direction) {
+int EoBCoreEngine::clickedDoorSwitch(uint16 block, uint16 direction) {
uint8 v = _visibleBlocks[13]->walls[_sceneDrawVarDown];
SpriteDecoration *d = &_doorSwitches[((v > 12 && v < 23) || v == 31) ? 3 : 0];
int x1 = d->x + _dscShapeCoords[138] - 4;
@@ -638,7 +638,7 @@ int EobCoreEngine::clickedDoorSwitch(uint16 block, uint16 direction) {
return 1;
}
-int EobCoreEngine::clickedNiche(uint16 block, uint16 direction) {
+int EoBCoreEngine::clickedNiche(uint16 block, uint16 direction) {
uint8 v = _wllShapeMap[_levelBlockProperties[block].walls[direction]];
if (!clickedShape(v))
return 0;
@@ -664,7 +664,7 @@ int EobCoreEngine::clickedNiche(uint16 block, uint16 direction) {
return 1;
}
-int EobCoreEngine::clickedDoorPry(uint16 block, uint16 direction) {
+int EoBCoreEngine::clickedDoorPry(uint16 block, uint16 direction) {
if (!posWithinRect(_mouseX, _mouseY, 40, 16, 136, 88) && (_clickedSpecialFlag == 0x40))
return 0;
@@ -702,7 +702,7 @@ int EobCoreEngine::clickedDoorPry(uint16 block, uint16 direction) {
return 1;
}
-int EobCoreEngine::clickedDoorNoPry(uint16 block, uint16 direction) {
+int EoBCoreEngine::clickedDoorNoPry(uint16 block, uint16 direction) {
if (!posWithinRect(_mouseX, _mouseY, 40, 16, 136, 88) && (_clickedSpecialFlag == 0x40))
return 0;
@@ -712,7 +712,7 @@ int EobCoreEngine::clickedDoorNoPry(uint16 block, uint16 direction) {
return 1;
}
-int EobCoreEngine::specialWallAction(int block, int direction) {
+int EoBCoreEngine::specialWallAction(int block, int direction) {
direction ^= 2;
uint8 type = _specialWallTypes[_levelBlockProperties[block].walls[direction]];
if (!type || !(_clickedSpecialFlag & (((_levelBlockProperties[block].flags & 0xf8) >> 3) | 0xe0)))
@@ -764,11 +764,11 @@ int EobCoreEngine::specialWallAction(int block, int direction) {
return res;
}
-void EobCoreEngine::openDoor(int block) {
+void EoBCoreEngine::openDoor(int block) {
openCloseDoor(block, 1);
}
-void EobCoreEngine::closeDoor(int block) {
+void EoBCoreEngine::closeDoor(int block) {
if (block == _currentBlock || _levelBlockProperties[block].flags & 7)
return;
openCloseDoor(block, -1);
diff --git a/engines/kyra/scene_lol.cpp b/engines/kyra/scene_lol.cpp
index e38e5ebc22..d8fb70a55f 100644
--- a/engines/kyra/scene_lol.cpp
+++ b/engines/kyra/scene_lol.cpp
@@ -474,10 +474,10 @@ void LoLEngine::resetItems(int flag) {
for (int i = 0; i < 1024; i++) {
_levelBlockProperties[i].direction = 5;
uint16 id = _levelBlockProperties[i].assignedObjects;
- LolMonsterInPlay *r = 0;
+ LoLMonsterInPlay *r = 0;
while (id & 0x8000) {
- r = (LolMonsterInPlay *)findObject(id);
+ r = (LoLMonsterInPlay *)findObject(id);
id = r->nextAssignedObject;
}
@@ -496,7 +496,7 @@ void LoLEngine::resetItems(int flag) {
}
void LoLEngine::disableMonsters() {
- memset(_monsters, 0, 30 * sizeof(LolMonsterInPlay));
+ memset(_monsters, 0, 30 * sizeof(LoLMonsterInPlay));
for (int i = 0; i < 30; i++)
_monsters[i].mode = 0x10;
}
diff --git a/engines/kyra/screen_eob.cpp b/engines/kyra/screen_eob.cpp
index 36af074ee0..869f4375ae 100644
--- a/engines/kyra/screen_eob.cpp
+++ b/engines/kyra/screen_eob.cpp
@@ -36,7 +36,7 @@
namespace Kyra {
-Screen_Eob::Screen_Eob(EobCoreEngine *vm, OSystem *system) : Screen(vm, system) {
+Screen_EoB::Screen_EoB(EoBCoreEngine *vm, OSystem *system) : Screen(vm, system) {
_shapeFadeMode[0] = _shapeFadeMode[1] = 0;
_shapeFadeInternal = 0;
_fadeData = 0;
@@ -53,7 +53,7 @@ Screen_Eob::Screen_Eob(EobCoreEngine *vm, OSystem *system) : Screen(vm, system)
_gfxMaxY = 0;
}
-Screen_Eob::~Screen_Eob() {
+Screen_EoB::~Screen_EoB() {
delete[] _fadeData;
if (_customDimTable) {
for (int i = 0; i < _screenDimTableCount; i++)
@@ -63,13 +63,13 @@ Screen_Eob::~Screen_Eob() {
delete[] _dsTempPage;
}
-bool Screen_Eob::init() {
+bool Screen_EoB::init() {
if (Screen::init()) {
_customDimTable = new ScreenDim*[_screenDimTableCount];
memset(_customDimTable, 0, sizeof(ScreenDim*) * _screenDimTableCount);
int temp;
- _gfxMaxY = _vm->staticres()->loadRawData(kEobBaseExpObjectY, temp);
+ _gfxMaxY = _vm->staticres()->loadRawData(kEoBBaseExpObjectY, temp);
_fadeData = _vm->resource()->fileData("FADING.DAT", 0);
if (!_fadeData) {
@@ -88,18 +88,18 @@ bool Screen_Eob::init() {
return false;
}
-void Screen_Eob::setScreenDim(int dim) {
+void Screen_EoB::setScreenDim(int dim) {
assert(dim < _screenDimTableCount);
_curDim = _customDimTable[dim] ? (const ScreenDim *)_customDimTable[dim] : &_screenDimTable[dim];
_curDimIndex = dim;
}
-const ScreenDim *Screen_Eob::getScreenDim(int dim) {
+const ScreenDim *Screen_EoB::getScreenDim(int dim) {
assert(dim < _screenDimTableCount);
return _customDimTable[dim] ? (const ScreenDim *)_customDimTable[dim] : &_screenDimTable[dim];
}
-void Screen_Eob::modifyScreenDim(int dim, int x, int y, int w, int h) {
+void Screen_EoB::modifyScreenDim(int dim, int x, int y, int w, int h) {
if (!_customDimTable[dim])
_customDimTable[dim] = new ScreenDim;
@@ -112,16 +112,16 @@ void Screen_Eob::modifyScreenDim(int dim, int x, int y, int w, int h) {
setScreenDim(dim);
}
-void Screen_Eob::setClearScreenDim(int dim) {
+void Screen_EoB::setClearScreenDim(int dim) {
setScreenDim(dim);
clearCurDim();
}
-void Screen_Eob::clearCurDim() {
+void Screen_EoB::clearCurDim() {
fillRect(_curDim->sx << 3, _curDim->sy, ((_curDim->sx + _curDim->w) << 3) - 1, (_curDim->sy + _curDim->h) - 1, _curDim->unkA);
}
-void Screen_Eob::setMouseCursor(int x, int y, const byte *shape) {
+void Screen_EoB::setMouseCursor(int x, int y, const byte *shape) {
if (!shape)
return;
int mouseW = shape[2] << 3;
@@ -143,23 +143,23 @@ void Screen_Eob::setMouseCursor(int x, int y, const byte *shape) {
_system->updateScreen();
}
-void Screen_Eob::loadFileDataToPage(Common::SeekableReadStream *s, int pageNum, uint32 size) {
+void Screen_EoB::loadFileDataToPage(Common::SeekableReadStream *s, int pageNum, uint32 size) {
s->read(_pagePtrs[pageNum], size);
}
-void Screen_Eob::printShadedText(const char *string, int x, int y, int col1, int col2) {
+void Screen_EoB::printShadedText(const char *string, int x, int y, int col1, int col2) {
printText(string, x - 1, y, 12, col2);
printText(string, x, y + 1, 12, 0);
printText(string, x - 1, y + 1, 12, 0);
printText(string, x, y, col1, 0);
}
-void Screen_Eob::loadShapeSetBitmap(const char *file, int tempPage, int destPage) {
- loadEobBitmap(file, 0, tempPage, destPage, -1);
+void Screen_EoB::loadShapeSetBitmap(const char *file, int tempPage, int destPage) {
+ loadEoBBitmap(file, 0, tempPage, destPage, -1);
_curPage = 2;
}
-void Screen_Eob::loadEobBitmap(const char *file, const uint8 *ditheringData, int tempPage, int destPage, int copyToPage) {
+void Screen_EoB::loadEoBBitmap(const char *file, const uint8 *ditheringData, int tempPage, int destPage, int copyToPage) {
Common::String tmp = Common::String::format("%s.CPS", file);
Common::SeekableReadStream *s = _vm->resource()->createReadStream(tmp);
bool loadAlternative = false;
@@ -183,7 +183,7 @@ void Screen_Eob::loadEobBitmap(const char *file, const uint8 *ditheringData, int
tmp.setChar('X', 0);
s = _vm->resource()->createReadStream(tmp);
if (!s)
- error("Screen_Eob::loadEobBitmap(): CPS file loading failed.");
+ error("Screen_EoB::loadEoBBitmap(): CPS file loading failed.");
s->seek(768);
loadFileDataToPage(s, destPage, 64000);
delete s;
@@ -200,7 +200,7 @@ void Screen_Eob::loadEobBitmap(const char *file, const uint8 *ditheringData, int
}
}
-uint8 *Screen_Eob::encodeShape(uint16 x, uint16 y, uint16 w, uint16 h, bool no4bitEncoding) {
+uint8 *Screen_EoB::encodeShape(uint16 x, uint16 y, uint16 w, uint16 h, bool no4bitEncoding) {
uint8 *shp = 0;
uint16 shapesize = 0;
@@ -325,7 +325,7 @@ uint8 *Screen_Eob::encodeShape(uint16 x, uint16 y, uint16 w, uint16 h, bool no4b
return shp;
}
-void Screen_Eob::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int sd, int flags, ...) {
+void Screen_EoB::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int sd, int flags, ...) {
uint8 *dst = getPagePtr(pageNum);
const uint8 *src = shapeData;
@@ -642,7 +642,7 @@ void Screen_Eob::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y,
}
}
-const uint8 *Screen_Eob::scaleShape(const uint8 *shapeData, int steps) {
+const uint8 *Screen_EoB::scaleShape(const uint8 *shapeData, int steps) {
setShapeFadeMode(1, steps ? true : false);
while (shapeData && steps--)
@@ -651,7 +651,7 @@ const uint8 *Screen_Eob::scaleShape(const uint8 *shapeData, int steps) {
return shapeData;
}
-const uint8 *Screen_Eob::scaleShapeStep(const uint8 *shp) {
+const uint8 *Screen_EoB::scaleShapeStep(const uint8 *shp) {
uint8 *d = _dsTempPage;
*d++ = *shp++;
@@ -701,14 +701,14 @@ const uint8 *Screen_Eob::scaleShapeStep(const uint8 *shp) {
return (const uint8 *) _dsTempPage;
}
-void Screen_Eob::replaceShapePalette(uint8 *shp, const uint8 *pal) {
+void Screen_EoB::replaceShapePalette(uint8 *shp, const uint8 *pal) {
if (*shp != 1)
return;
shp += 4;
memcpy(shp, pal, 16);
}
-void Screen_Eob::applyShapeOverlay(uint8 *shp, int ovlIndex) {
+void Screen_EoB::applyShapeOverlay(uint8 *shp, int ovlIndex) {
if (*shp != 1)
return;
shp += 4;
@@ -717,25 +717,25 @@ void Screen_Eob::applyShapeOverlay(uint8 *shp, int ovlIndex) {
shp[i] = ovl[shp[i]];
}
-void Screen_Eob::setShapeFrame(int x1, int y1, int x2, int y2) {
+void Screen_EoB::setShapeFrame(int x1, int y1, int x2, int y2) {
_dsX1 = x1;
_dsY1 = y1;
_dsX2 = x2;
_dsY2 = y2;
}
-void Screen_Eob::setShapeFadeMode (uint8 i, bool b) {
+void Screen_EoB::setShapeFadeMode (uint8 i, bool b) {
if (!i || i == 1)
_shapeFadeMode[i] = b;
}
-void Screen_Eob::setGfxParameters(int x, int y, int col) {
+void Screen_EoB::setGfxParameters(int x, int y, int col) {
_gfxX = x;
_gfxY = y;
_gfxCol = col;
}
-void Screen_Eob::drawExplosion(int scale, int radius, int numElements, int stepSize, int aspectRatio, const uint8 *colorTable, int colorTableSize) {
+void Screen_EoB::drawExplosion(int scale, int radius, int numElements, int stepSize, int aspectRatio, const uint8 *colorTable, int colorTableSize) {
int ymin = 0;
int ymax = _gfxMaxY[scale];
int xmin = -100;
@@ -837,7 +837,7 @@ void Screen_Eob::drawExplosion(int scale, int radius, int numElements, int stepS
showMouse();
}
-void Screen_Eob::drawVortex(int numElements, int radius, int stepSize, int, int disorder, const uint8 *colorTable, int colorTableSize) {
+void Screen_EoB::drawVortex(int numElements, int radius, int stepSize, int, int disorder, const uint8 *colorTable, int colorTableSize) {
int16 *xCoords = (int16*)_dsTempPage;
int16 *yCoords = (int16*)&_dsTempPage[300];
int16 *xMod = (int16*)&_dsTempPage[600];
@@ -973,7 +973,7 @@ void Screen_Eob::drawVortex(int numElements, int radius, int stepSize, int, int
showMouse();
}
-void Screen_Eob::fadeTextColor(Palette *pal, int color1, int rate) {
+void Screen_EoB::fadeTextColor(Palette *pal, int color1, int rate) {
uint8 *col = pal->getData();
for (bool loop = true; loop; ) {
@@ -1002,7 +1002,7 @@ void Screen_Eob::fadeTextColor(Palette *pal, int color1, int rate) {
}
}
-bool Screen_Eob::delayedFadePalStep(Palette *fadePal, Palette *destPal, int rate) {
+bool Screen_EoB::delayedFadePalStep(Palette *fadePal, Palette *destPal, int rate) {
bool res = false;
uint8 *s = fadePal->getData();
@@ -1031,15 +1031,15 @@ bool Screen_Eob::delayedFadePalStep(Palette *fadePal, Palette *destPal, int rate
return res;
}
-int Screen_Eob::getRectSize(int w, int h) {
+int Screen_EoB::getRectSize(int w, int h) {
return w * h;
}
-void Screen_Eob::setFadeTableIndex(int index) {
+void Screen_EoB::setFadeTableIndex(int index) {
_fadeDataIndex = (CLIP(index, 0, 7) << 8);
}
-void Screen_Eob::createFadeTable(uint8 *palData, uint8 *dst, uint8 rootColor, uint8 weight) {
+void Screen_EoB::createFadeTable(uint8 *palData, uint8 *dst, uint8 rootColor, uint8 weight) {
if (!palData)
return;
@@ -1082,11 +1082,11 @@ void Screen_Eob::createFadeTable(uint8 *palData, uint8 *dst, uint8 rootColor, ui
}
}
-uint8 *Screen_Eob::getFadeTable(int index) {
+uint8 *Screen_EoB::getFadeTable(int index) {
return (index >= 0 && index < 5) ? &_fadeData[index << 8] : 0;
}
-void Screen_Eob::drawShapeSetPixel(uint8 * dst, uint8 c) {
+void Screen_EoB::drawShapeSetPixel(uint8 * dst, uint8 c) {
if (_shapeFadeMode[0]) {
if (_shapeFadeMode[1]) {
c = *dst;
@@ -1105,7 +1105,7 @@ void Screen_Eob::drawShapeSetPixel(uint8 * dst, uint8 c) {
*dst = c;
}
-void Screen_Eob::scaleShapeProcessLine(uint8 *&dst, const uint8 *&src) {
+void Screen_EoB::scaleShapeProcessLine(uint8 *&dst, const uint8 *&src) {
for (int i = 0; i < _dsDiv; i++) {
*dst++ = *src++;
*dst++ = (READ_BE_UINT16(src) >> 4) & 0xff;
@@ -1124,7 +1124,7 @@ void Screen_Eob::scaleShapeProcessLine(uint8 *&dst, const uint8 *&src) {
}
}
-bool Screen_Eob::posWithinRect(int posX, int posY, int x1, int y1, int x2, int y2) {
+bool Screen_EoB::posWithinRect(int posX, int posY, int x1, int y1, int x2, int y2) {
if (posX < x1 || posX > x2 || posY < y1 || posY > y2)
return false;
return true;
diff --git a/engines/kyra/screen_eob.h b/engines/kyra/screen_eob.h
index 78361ebaa6..6406587980 100644
--- a/engines/kyra/screen_eob.h
+++ b/engines/kyra/screen_eob.h
@@ -29,11 +29,11 @@
namespace Kyra {
-class EobCoreEngine;
-class Screen_Eob : public Screen{
+class EoBCoreEngine;
+class Screen_EoB : public Screen{
public:
- Screen_Eob(EobCoreEngine *vm, OSystem *system);
- virtual ~Screen_Eob();
+ Screen_EoB(EoBCoreEngine *vm, OSystem *system);
+ virtual ~Screen_EoB();
bool init();
@@ -51,7 +51,7 @@ public:
void loadFileDataToPage(Common::SeekableReadStream *s, int pageNum, uint32 size);
void printShadedText(const char *string, int x, int y, int col1, int col2);
- void loadEobBitmap(const char *file, const uint8 *ditheringData, int tempPage, int destPage, int copyToPage);
+ void loadEoBBitmap(const char *file, const uint8 *ditheringData, int tempPage, int destPage, int copyToPage);
void loadShapeSetBitmap(const char *file, int tempPage, int destPage);
uint8 *encodeShape(uint16 x, uint16 y, uint16 w, uint16 h, bool no4bitEncoding = false);
diff --git a/engines/kyra/script_eob.cpp b/engines/kyra/script_eob.cpp
index c59c66b04f..ab22b4f0b6 100644
--- a/engines/kyra/script_eob.cpp
+++ b/engines/kyra/script_eob.cpp
@@ -32,23 +32,23 @@
namespace Kyra {
-void EobCoreEngine::runLevelScript(int block, int flags) {
+void EoBCoreEngine::runLevelScript(int block, int flags) {
_inf->run(block, flags);
}
-void EobCoreEngine::setScriptFlags(uint32 flags) {
+void EoBCoreEngine::setScriptFlags(uint32 flags) {
_inf->setFlags(flags);
}
-void EobCoreEngine::clearScriptFlags(uint32 flags) {
+void EoBCoreEngine::clearScriptFlags(uint32 flags) {
_inf->clearFlags(flags);
}
-bool EobCoreEngine::checkScriptFlags(uint32 flags) {
+bool EoBCoreEngine::checkScriptFlags(uint32 flags) {
return _inf->checkFlags(flags);
}
-const uint8 *EobCoreEngine::initScriptTimers(const uint8 *pos) {
+const uint8 *EoBCoreEngine::initScriptTimers(const uint8 *pos) {
_scriptTimersCount = 0;
while (((int16)READ_LE_UINT16(pos)) != -1) {
@@ -63,7 +63,7 @@ const uint8 *EobCoreEngine::initScriptTimers(const uint8 *pos) {
return pos;
}
-void EobCoreEngine::updateScriptTimers() {
+void EoBCoreEngine::updateScriptTimers() {
bool timerUpdate = false;
if ((_scriptTimersMode & 2) && _stepsUntilScriptCall && _stepCounter > _stepsUntilScriptCall) {
_inf->run(0, 0x20);
@@ -86,10 +86,10 @@ void EobCoreEngine::updateScriptTimers() {
updateScriptTimersExtra();
}
-EobInfProcessor::EobInfProcessor(EobCoreEngine *engine, Screen_Eob *screen) : _vm(engine), _screen(screen),
+EoBInfProcessor::EoBInfProcessor(EoBCoreEngine *engine, Screen_EoB *screen) : _vm(engine), _screen(screen),
_commandMin(engine->game() == GI_EOB1 ? -27 : -31) {
-#define Opcode(x) _opcodes.push_back(new InfOpcode(new InfProc(this, &EobInfProcessor::x), #x))
+#define Opcode(x) _opcodes.push_back(new InfOpcode(new InfProc(this, &EoBInfProcessor::x), #x))
#define OpcodeAlt(x) if (_vm->game() == GI_EOB1) { Opcode(x##_v1); } else { Opcode(x##_v2); }
Opcode(oeob_setWallType);
Opcode(oeob_toggleWallState);
@@ -152,7 +152,7 @@ EobInfProcessor::EobInfProcessor(EobCoreEngine *engine, Screen_Eob *screen) : _v
_activeCharacter = -1;
}
-EobInfProcessor::~EobInfProcessor() {
+EoBInfProcessor::~EoBInfProcessor() {
delete[] _subroutineStack;
delete[] _flagTable;
delete[] _stack;
@@ -164,14 +164,14 @@ EobInfProcessor::~EobInfProcessor() {
_opcodes.clear();
}
-void EobInfProcessor::loadData(const uint8 *data, uint32 dataSize) {
+void EoBInfProcessor::loadData(const uint8 *data, uint32 dataSize) {
delete[] _scriptData;
_scriptSize = dataSize;
_scriptData = new int8[_scriptSize];
memcpy(_scriptData, data, _scriptSize);
}
-void EobInfProcessor::run(int func, int flags) {
+void EoBInfProcessor::run(int func, int flags) {
int o = _vm->_levelBlockProperties[func].assignedObjects;
if (!o)
return;
@@ -196,40 +196,40 @@ void EobInfProcessor::run(int func, int flags) {
int8 cmd = *pos++;
if (cmd <= _commandMin || cmd >= 0)
continue;
- debugC(3, kDebugLevelScript, "[0x%.04X] EobInfProcessor::%s()", (uint32)(pos - _scriptData), _opcodes[-(cmd + 1)]->desc.c_str());
+ debugC(3, kDebugLevelScript, "[0x%.04X] EoBInfProcessor::%s()", (uint32)(pos - _scriptData), _opcodes[-(cmd + 1)]->desc.c_str());
pos += (*_opcodes[-(cmd + 1)]->proc)(pos);
} while (!_abortScript && !_abortAfterSubroutine);
}
-void EobInfProcessor::setFlags(uint32 flags) {
+void EoBInfProcessor::setFlags(uint32 flags) {
_flagTable[17] |= flags;
}
-void EobInfProcessor::clearFlags(uint32 flags) {
+void EoBInfProcessor::clearFlags(uint32 flags) {
_flagTable[17] &= ~flags;
}
-bool EobInfProcessor::checkFlags(uint32 flags) const {
+bool EoBInfProcessor::checkFlags(uint32 flags) const {
return ((_flagTable[17] & flags) == flags) ? true : false;
}
-bool EobInfProcessor::preventRest() const {
+bool EoBInfProcessor::preventRest() const {
return _preventRest ? true : false;
}
-void EobInfProcessor::loadState(Common::SeekableSubReadStreamEndian &in) {
+void EoBInfProcessor::loadState(Common::SeekableSubReadStreamEndian &in) {
_preventRest = in.readByte();
for (int i = 0; i < 18; i++)
_flagTable[i] = in.readUint32BE();
}
-void EobInfProcessor::saveState(Common::OutSaveFile *out) {
+void EoBInfProcessor::saveState(Common::OutSaveFile *out) {
out->writeByte(_preventRest);
for (int i = 0; i < 18; i++)
out->writeUint32BE(_flagTable[i]);
}
-const char *EobInfProcessor::getString(uint16 index) {
+const char *EoBInfProcessor::getString(uint16 index) {
if (index == 0xffff)
return 0;
@@ -244,7 +244,7 @@ const char *EobInfProcessor::getString(uint16 index) {
return (const char*)res;
}
-int EobInfProcessor::oeob_setWallType(int8 *data) {
+int EoBInfProcessor::oeob_setWallType(int8 *data) {
int8 *pos = data;
uint16 block = 0;
@@ -278,7 +278,7 @@ int EobInfProcessor::oeob_setWallType(int8 *data) {
return pos - data;
}
-int EobInfProcessor::oeob_toggleWallState(int8 *data) {
+int EoBInfProcessor::oeob_toggleWallState(int8 *data) {
int8 *pos = data;
uint16 block = 0;
@@ -320,28 +320,28 @@ int EobInfProcessor::oeob_toggleWallState(int8 *data) {
return pos - data;
}
-int EobInfProcessor::oeob_openDoor(int8 *data) {
+int EoBInfProcessor::oeob_openDoor(int8 *data) {
int8 *pos = data;
_vm->openDoor(READ_LE_UINT16(pos));
pos += 2;
return pos - data;
}
-int EobInfProcessor::oeob_closeDoor(int8 *data) {
+int EoBInfProcessor::oeob_closeDoor(int8 *data) {
int8 *pos = data;
_vm->closeDoor(READ_LE_UINT16(pos));
pos += 2;
return pos - data;
}
-int EobInfProcessor::oeob_replaceMonster(int8 *data) {
+int EoBInfProcessor::oeob_replaceMonster(int8 *data) {
int8 *pos = data;
_vm->replaceMonster(pos[1], READ_LE_UINT16(pos + 2), pos[4], pos[5], pos[6], pos[7], pos[8], pos[9], READ_LE_UINT16(pos + 10), READ_LE_UINT16(pos + 12));
pos += 14;
return pos - data;
}
-int EobInfProcessor::oeob_movePartyOrObject(int8 *data) {
+int EoBInfProcessor::oeob_movePartyOrObject(int8 *data) {
int8 *pos = data;
int8 a = *pos++;
@@ -454,7 +454,7 @@ int EobInfProcessor::oeob_movePartyOrObject(int8 *data) {
return pos - data;
}
-int EobInfProcessor::oeob_moveInventoryItemToBlock(int8 *data) {
+int EoBInfProcessor::oeob_moveInventoryItemToBlock(int8 *data) {
int8 *pos = data;
int8 c = *pos++;
uint16 block = READ_LE_UINT16(pos);
@@ -500,7 +500,7 @@ int EobInfProcessor::oeob_moveInventoryItemToBlock(int8 *data) {
return pos - data;
}
-int EobInfProcessor::oeob_printMessage_v1(int8 *data) {
+int EoBInfProcessor::oeob_printMessage_v1(int8 *data) {
static const char colorConfig[] = "\x6\x21\x2\x21";
char col[5];
int8 *pos = data;
@@ -522,7 +522,7 @@ int EobInfProcessor::oeob_printMessage_v1(int8 *data) {
return pos - data;
}
-int EobInfProcessor::oeob_printMessage_v2(int8 *data) {
+int EoBInfProcessor::oeob_printMessage_v2(int8 *data) {
int8 *pos = data;
uint16 str = READ_LE_UINT16(pos);
pos += 2;
@@ -544,7 +544,7 @@ int EobInfProcessor::oeob_printMessage_v2(int8 *data) {
return pos - data;
}
-int EobInfProcessor::oeob_setFlags(int8 *data) {
+int EoBInfProcessor::oeob_setFlags(int8 *data) {
int8 *pos = data;
int8 b = 0;
@@ -583,7 +583,7 @@ int EobInfProcessor::oeob_setFlags(int8 *data) {
return pos - data;
}
-int EobInfProcessor::oeob_playSoundEffect(int8 *data) {
+int EoBInfProcessor::oeob_playSoundEffect(int8 *data) {
int8 *pos = data;
uint16 block = READ_LE_UINT16(pos + 1);
@@ -597,7 +597,7 @@ int EobInfProcessor::oeob_playSoundEffect(int8 *data) {
return pos - data;
}
-int EobInfProcessor::oeob_removeFlags(int8 *data) {
+int EoBInfProcessor::oeob_removeFlags(int8 *data) {
int8 *pos = data;
int8 a = *pos++;
@@ -629,7 +629,7 @@ int EobInfProcessor::oeob_removeFlags(int8 *data) {
return pos - data;
}
-int EobInfProcessor::oeob_modifyCharacterHitPoints(int8 *data) {
+int EoBInfProcessor::oeob_modifyCharacterHitPoints(int8 *data) {
int8 *pos = data;
int8 c = *pos++;
int8 p = *pos++;
@@ -644,7 +644,7 @@ int EobInfProcessor::oeob_modifyCharacterHitPoints(int8 *data) {
return pos - data;
}
-int EobInfProcessor::oeob_calcAndInflictCharacterDamage(int8 *data) {
+int EoBInfProcessor::oeob_calcAndInflictCharacterDamage(int8 *data) {
int8 *pos = data;
int charIndex = *pos++;
int times = *pos++;
@@ -673,19 +673,19 @@ int EobInfProcessor::oeob_calcAndInflictCharacterDamage(int8 *data) {
return pos - data;
}
-int EobInfProcessor::oeob_jump(int8 *data) {
+int EoBInfProcessor::oeob_jump(int8 *data) {
int8 *pos = data;
pos = _scriptData + READ_LE_UINT16(pos);
return pos - data;
}
-int EobInfProcessor::oeob_end(int8 *data) {
+int EoBInfProcessor::oeob_end(int8 *data) {
_abortScript = 1;
_subroutineStackPos = 0;
return 0;
}
-int EobInfProcessor::oeob_returnFromSubroutine(int8 *data) {
+int EoBInfProcessor::oeob_returnFromSubroutine(int8 *data) {
int8 *pos = data;
if (_subroutineStackPos)
@@ -696,7 +696,7 @@ int EobInfProcessor::oeob_returnFromSubroutine(int8 *data) {
return pos - data;
}
-int EobInfProcessor::oeob_callSubroutine(int8 *data) {
+int EoBInfProcessor::oeob_callSubroutine(int8 *data) {
int8 *pos = data;
uint16 offs = READ_LE_UINT16(pos);
assert(offs < _scriptSize);
@@ -710,14 +710,14 @@ int EobInfProcessor::oeob_callSubroutine(int8 *data) {
return pos - data;
}
-int EobInfProcessor::oeob_eval_v1(int8 *data) {
+int EoBInfProcessor::oeob_eval_v1(int8 *data) {
int8 *pos = data;
int8 cmd = *pos++;
int a = 0;
int b = 0;
int i = 0;
- EobItem *itm = &_vm->_items[_vm->_itemInHand];
+ EoBItem *itm = &_vm->_items[_vm->_itemInHand];
Common::String tempString1;
Common::String tempString2;
@@ -930,14 +930,14 @@ int EobInfProcessor::oeob_eval_v1(int8 *data) {
return pos - data;
}
-int EobInfProcessor::oeob_eval_v2(int8 *data) {
+int EoBInfProcessor::oeob_eval_v2(int8 *data) {
int8 *pos = data;
int8 cmd = *pos++;
int a = 0;
int b = 0;
int i = 0;
- EobItem *itm = (_vm->_itemInHand != -1) ? &_vm->_items[_vm->_itemInHand] : 0;
+ EoBItem *itm = (_vm->_itemInHand != -1) ? &_vm->_items[_vm->_itemInHand] : 0;
Common::String tempString1;
Common::String tempString2;
@@ -1227,7 +1227,7 @@ int EobInfProcessor::oeob_eval_v2(int8 *data) {
return pos - data;
}
-int EobInfProcessor::oeob_deleteItem(int8 *data) {
+int EoBInfProcessor::oeob_deleteItem(int8 *data) {
int8 *pos = data;
int8 c = *pos++;
@@ -1243,7 +1243,7 @@ int EobInfProcessor::oeob_deleteItem(int8 *data) {
return pos - data;
}
-int EobInfProcessor::oeob_loadNewLevelOrMonsters(int8 *data) {
+int EoBInfProcessor::oeob_loadNewLevelOrMonsters(int8 *data) {
int8 *pos = data;
_vm->gui_updateControls();
@@ -1264,7 +1264,7 @@ int EobInfProcessor::oeob_loadNewLevelOrMonsters(int8 *data) {
_vm->_monsters[i].curAttackFrame = 0;
for (int i = 0; i < 10; i++) {
- EobFlyingObject *fo = &_vm->_flyingObjects[i];
+ EoBFlyingObject *fo = &_vm->_flyingObjects[i];
if (fo->enable == 1) {
_vm->_items[fo->item].pos &= 3;
run(_vm->_items[fo->item].block, 4);
@@ -1306,7 +1306,7 @@ int EobInfProcessor::oeob_loadNewLevelOrMonsters(int8 *data) {
return res;
}
-int EobInfProcessor::oeob_increasePartyExperience(int8 *data) {
+int EoBInfProcessor::oeob_increasePartyExperience(int8 *data) {
int8 *pos = data;
if (*pos++ == -30) {
_vm->increasePartyExperience((int16)READ_LE_UINT16(pos));
@@ -1316,7 +1316,7 @@ int EobInfProcessor::oeob_increasePartyExperience(int8 *data) {
return pos - data;
}
-int EobInfProcessor::oeob_createItem_v1(int8 *data) {
+int EoBInfProcessor::oeob_createItem_v1(int8 *data) {
int8 *pos = data;
uint16 itm = _vm->duplicateItem(READ_LE_UINT16(pos));
pos += 2;
@@ -1337,7 +1337,7 @@ int EobInfProcessor::oeob_createItem_v1(int8 *data) {
return pos - data;
}
-int EobInfProcessor::oeob_createItem_v2(int8 *data) {
+int EoBInfProcessor::oeob_createItem_v2(int8 *data) {
static const uint8 _itemPos[] = { 0, 1, 2, 3, 1, 3, 0, 2, 3, 2, 1, 0, 2, 0, 3, 1 };
int8 *pos = data;
@@ -1379,7 +1379,7 @@ int EobInfProcessor::oeob_createItem_v2(int8 *data) {
return pos - data;
}
-int EobInfProcessor::oeob_launchObject(int8 *data) {
+int EoBInfProcessor::oeob_launchObject(int8 *data) {
static const uint8 startPos[] = { 2, 3, 0, 2, 1, 0, 3, 1 };
int8 *pos = data;
@@ -1407,7 +1407,7 @@ int EobInfProcessor::oeob_launchObject(int8 *data) {
return pos - data;
}
-int EobInfProcessor::oeob_changeDirection(int8 *data) {
+int EoBInfProcessor::oeob_changeDirection(int8 *data) {
int8 *pos = data;
int8 cmd = *pos++;
@@ -1428,7 +1428,7 @@ int EobInfProcessor::oeob_changeDirection(int8 *data) {
return pos - data;
}
-int EobInfProcessor::oeob_identifyItems(int8 *data) {
+int EoBInfProcessor::oeob_identifyItems(int8 *data) {
int8 *pos = data;
uint16 block = READ_LE_UINT16(pos);
@@ -1451,7 +1451,7 @@ int EobInfProcessor::oeob_identifyItems(int8 *data) {
return pos - data;
}
-int EobInfProcessor::oeob_sequence(int8 *data) {
+int EoBInfProcessor::oeob_sequence(int8 *data) {
int8 *pos = data;
_vm->_npcSequenceSub = -1;
_vm->txt()->setWaitButtonMode(0);
@@ -1493,19 +1493,19 @@ int EobInfProcessor::oeob_sequence(int8 *data) {
return pos - data;
}
-int EobInfProcessor::oeob_delay(int8 *data) {
+int EoBInfProcessor::oeob_delay(int8 *data) {
int8 *pos = data;
_vm->delay(READ_LE_UINT16(pos) * _vm->tickLength());
pos += 2;
return pos - data;
}
-int EobInfProcessor::oeob_drawScene(int8 *data) {
+int EoBInfProcessor::oeob_drawScene(int8 *data) {
_vm->drawScene(1);
return 0;
}
-int EobInfProcessor::oeob_dialogue(int8 *data) {
+int EoBInfProcessor::oeob_dialogue(int8 *data) {
int8 *pos = data;
switch (*pos++) {
@@ -1543,7 +1543,7 @@ int EobInfProcessor::oeob_dialogue(int8 *data) {
return pos - data;
}
-int EobInfProcessor::oeob_specialEvent(int8 *data) {
+int EoBInfProcessor::oeob_specialEvent(int8 *data) {
int8 *pos = data;
uint16 cmd = READ_LE_UINT16(pos);
pos += 2;
diff --git a/engines/kyra/script_eob.h b/engines/kyra/script_eob.h
index a561568336..3804db07c6 100644
--- a/engines/kyra/script_eob.h
+++ b/engines/kyra/script_eob.h
@@ -34,10 +34,10 @@ namespace Kyra {
class KyraRpgEngine;
-class EobInfProcessor {
+class EoBInfProcessor {
public:
- EobInfProcessor(EobCoreEngine *engine, Screen_Eob *_screen);
- ~EobInfProcessor();
+ EoBInfProcessor(EoBCoreEngine *engine, Screen_EoB *_screen);
+ ~EoBInfProcessor();
void loadData(const uint8 *data, uint32 dataSize);
void run(int func, int flags);
@@ -87,10 +87,10 @@ private:
int oeob_dialogue(int8 *data);
int oeob_specialEvent(int8 *data);
- EobCoreEngine *_vm;
- Screen_Eob *_screen;
+ EoBCoreEngine *_vm;
+ Screen_EoB *_screen;
- typedef Common::Functor1Mem<int8*, int, EobInfProcessor> InfProc;
+ typedef Common::Functor1Mem<int8*, int, EoBInfProcessor> InfProc;
struct InfOpcode {
InfOpcode(InfProc *p, const char *d) : proc(p), desc(d) {}
InfProc *proc;
diff --git a/engines/kyra/script_lol.cpp b/engines/kyra/script_lol.cpp
index ead7e17f4c..342014bfed 100644
--- a/engines/kyra/script_lol.cpp
+++ b/engines/kyra/script_lol.cpp
@@ -811,11 +811,11 @@ int LoLEngine::olol_initMonster(EMCState *script) {
return -1;
for (uint8 i = 0; i < 30; i++) {
- LolMonsterInPlay *l = &_monsters[i];
+ LoLMonsterInPlay *l = &_monsters[i];
if (l->hitPoints || l->mode == 13)
continue;
- memset(l, 0, sizeof(LolMonsterInPlay));
+ memset(l, 0, sizeof(LoLMonsterInPlay));
l->id = i;
l->x = x;
l->y = y;
@@ -926,7 +926,7 @@ int LoLEngine::olol_loadMonsterProperties(EMCState *script) {
stackPos(28), stackPos(29), stackPos(30), stackPos(31), stackPos(32), stackPos(33), stackPos(34),
stackPos(35), stackPos(36), stackPos(37), stackPos(38), stackPos(39), stackPos(40), stackPos(41));
- LolMonsterProperty *l = &_monsterProperties[stackPos(0)];
+ LoLMonsterProperty *l = &_monsterProperties[stackPos(0)];
l->shapeIndex = stackPos(1) & 0xff;
int shpWidthMax = 0;
@@ -998,7 +998,7 @@ int LoLEngine::olol_inflictDamage(EMCState *script) {
int LoLEngine::olol_moveMonster(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_moveMonster(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4));
- LolMonsterInPlay *m = &_monsters[stackPos(0)];
+ LoLMonsterInPlay *m = &_monsters[stackPos(0)];
if (m->mode == 1 || m->mode == 2) {
calcCoordinates(m->destX, m->destY, stackPos(1), stackPos(2), stackPos(3));
@@ -1193,7 +1193,7 @@ int LoLEngine::olol_changeMonsterStat(EMCState *script) {
if (stackPos(0) == -1)
return 1;
- LolMonsterInPlay *m = &_monsters[stackPos(0) & 0x7fff];
+ LoLMonsterInPlay *m = &_monsters[stackPos(0) & 0x7fff];
int16 d = stackPos(2);
uint16 x = 0;
@@ -1234,7 +1234,7 @@ int LoLEngine::olol_getMonsterStat(EMCState *script) {
if (stackPos(0) == -1)
return 0;
- LolMonsterInPlay *m = &_monsters[stackPos(0) & 0x7fff];
+ LoLMonsterInPlay *m = &_monsters[stackPos(0) & 0x7fff];
int d = stackPos(1);
switch (d) {
@@ -1547,7 +1547,7 @@ int LoLEngine::olol_moveBlockObjects(EMCState *script) {
l &= 0x7fff;
- LolMonsterInPlay *m = &_monsters[l];
+ LoLMonsterInPlay *m = &_monsters[l];
setMonsterMode(m, 14);
checkSceneUpdateNeed(m->block);
@@ -1618,7 +1618,7 @@ int LoLEngine::olol_dummy1(EMCState *script) {
int LoLEngine::olol_suspendMonster(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_suspendMonster(%p) (%d)", (const void *)script, stackPos(0));
- LolMonsterInPlay *m = &_monsters[stackPos(0) & 0x7fff];
+ LoLMonsterInPlay *m = &_monsters[stackPos(0) & 0x7fff];
setMonsterMode(m, 14);
checkSceneUpdateNeed(m->block);
placeMonster(m, 0, 0);
diff --git a/engines/kyra/sequences_darkmoon.cpp b/engines/kyra/sequences_darkmoon.cpp
index 66d5329be9..fbe892120c 100644
--- a/engines/kyra/sequences_darkmoon.cpp
+++ b/engines/kyra/sequences_darkmoon.cpp
@@ -41,7 +41,7 @@ public:
kFinale
};
- DarkmoonSequenceHelper(OSystem *system, DarkMoonEngine *vm, Screen_Eob *screen, Mode mode, const char *const *strings, const char *const *cpsFiles, const char *const *palFiles, const EobShapeDef **shapeDefList, const EobSequenceStep **seqList);
+ DarkmoonSequenceHelper(OSystem *system, DarkMoonEngine *vm, Screen_EoB *screen, Mode mode, const char *const *strings, const char *const *cpsFiles, const char *const *palFiles, const EoBShapeDef **shapeDefList, const EoBSequenceStep **seqList);
~DarkmoonSequenceHelper();
void loadScene(int index, int pageNum);
@@ -67,14 +67,14 @@ private:
OSystem *_system;
DarkMoonEngine *_vm;
- Screen_Eob *_screen;
+ Screen_EoB *_screen;
Mode _mode;
const char *const *_strings;
const char *const *_cpsFiles;
const char *const *_palFiles;
- const EobShapeDef **_shapeDefs;
- const EobSequenceStep **_seqData;
+ const EoBShapeDef **_shapeDefs;
+ const EoBSequenceStep **_seqData;
Palette *_palettes[12];
@@ -910,7 +910,7 @@ void DarkMoonEngine::seq_playCredits(DarkmoonSequenceHelper *sq, const uint8 *da
delete[] items[i].str;
}
-DarkmoonSequenceHelper::DarkmoonSequenceHelper(OSystem *system, DarkMoonEngine *vm, Screen_Eob *screen, Mode mode, const char *const *strings, const char *const *cpsFiles, const char *const *palFiles, const EobShapeDef **shapeDefList, const EobSequenceStep **seqList) :
+DarkmoonSequenceHelper::DarkmoonSequenceHelper(OSystem *system, DarkMoonEngine *vm, Screen_EoB *screen, Mode mode, const char *const *strings, const char *const *cpsFiles, const char *const *palFiles, const EoBShapeDef **shapeDefList, const EoBSequenceStep **seqList) :
_system(system), _vm(vm), _screen(screen), _mode(mode), _strings(strings), _cpsFiles(cpsFiles), _palFiles(palFiles), _shapeDefs(shapeDefList), _seqData(seqList) {
for (int i = 0; _palFiles[i]; i++) {
@@ -991,7 +991,7 @@ void DarkmoonSequenceHelper::loadScene(int index, int pageNum) {
int cp = _screen->setCurPage(pageNum);
if (_shapeDefs[index]) {
- for (const EobShapeDef *df = _shapeDefs[index]; df->w; df++ ) {
+ for (const EoBShapeDef *df = _shapeDefs[index]; df->w; df++ ) {
uint16 shapeIndex = (df->index < 0) ? df->index * -1 : df->index;
if (_shapes[shapeIndex])
delete[] _shapes[shapeIndex];
@@ -1012,7 +1012,7 @@ void DarkmoonSequenceHelper::runSequence(int index, int del) {
uint32 end = 0;
- for (const EobSequenceStep *s = _seqData[index]; s->command != 0xff && !_vm->skipFlag() && !_vm->shouldQuit(); s++) {
+ for (const EoBSequenceStep *s = _seqData[index]; s->command != 0xff && !_vm->skipFlag() && !_vm->shouldQuit(); s++) {
int palIndex = _mode == kFinale ? (s->pal + 1) : s->pal;
int x = s->x1;
int y = s->y1;
diff --git a/engines/kyra/sequences_eob.cpp b/engines/kyra/sequences_eob.cpp
index e8526f2ba0..29386894f3 100644
--- a/engines/kyra/sequences_eob.cpp
+++ b/engines/kyra/sequences_eob.cpp
@@ -33,7 +33,7 @@
namespace Kyra {
-int EobEngine::mainMenu() {
+int EoBEngine::mainMenu() {
int menuChoice = _menuChoiceInit;
_menuChoiceInit = 0;
@@ -43,7 +43,7 @@ int EobEngine::mainMenu() {
switch (menuChoice) {
case 0:
_screen->loadPalette("EOBPAL.COL", _screen->getPalette(0));
- _screen->loadEobBitmap("INTRO", 0, 5, 3, 2);
+ _screen->loadEoBBitmap("INTRO", 0, 5, 3, 2);
_screen->setScreenPalette(_screen->getPalette(0));
_screen->_curPage = 2;
of = _screen->setFont(Screen::FID_6_FNT);
@@ -90,7 +90,7 @@ int EobEngine::mainMenu() {
return shouldQuit() ? -5 : menuChoice;
}
-int EobEngine::mainMenuLoop() {
+int EoBEngine::mainMenuLoop() {
int sel = -1;
do {
_screen->setScreenDim(28);
@@ -103,7 +103,7 @@ int EobEngine::mainMenuLoop() {
return sel + 1;
}
-void EobEngine::seq_playOpeningCredits() {
+void EoBEngine::seq_playOpeningCredits() {
_allowSkip = true;
loadSetIntroPalette(_introFilesOpening[5]);
@@ -124,7 +124,7 @@ void EobEngine::seq_playOpeningCredits() {
_allowSkip = false;
}
-void EobEngine::seq_playIntro() {
+void EoBEngine::seq_playIntro() {
_allowSkip = true;
if (!shouldQuit() && !skipFlag()) {
@@ -156,7 +156,7 @@ void EobEngine::seq_playIntro() {
_allowSkip = false;
}
-void EobEngine::seq_playFinale() {
+void EoBEngine::seq_playFinale() {
Common::SeekableReadStream *s = _res->createReadStream("TEXT.DAT");
_screen->loadFileDataToPage(s, 5, 32000);
delete s;
@@ -197,7 +197,7 @@ void EobEngine::seq_playFinale() {
_screen->fadeToBlack();
}
-void EobEngine::seq_tower() {
+void EoBEngine::seq_tower() {
if (shouldQuit() || skipFlag())
return;
@@ -272,7 +272,7 @@ void EobEngine::seq_tower() {
delete[] shp;
}
-void EobEngine::seq_orb() {
+void EoBEngine::seq_orb() {
if (shouldQuit() || skipFlag())
return;
@@ -329,7 +329,7 @@ void EobEngine::seq_orb() {
delete[] shp[i];
}
-void EobEngine::seq_waterdeepEntry() {
+void EoBEngine::seq_waterdeepEntry() {
if (shouldQuit() || skipFlag())
return;
@@ -429,7 +429,7 @@ void EobEngine::seq_waterdeepEntry() {
delete[] shp2[i];
}
-void EobEngine::seq_king() {
+void EoBEngine::seq_king() {
if (shouldQuit() || skipFlag())
return;
@@ -515,7 +515,7 @@ void EobEngine::seq_king() {
delete[] shp[i];
}
-void EobEngine::seq_hands() {
+void EoBEngine::seq_hands() {
if (shouldQuit() || skipFlag())
return;
@@ -655,7 +655,7 @@ void EobEngine::seq_hands() {
delay(48 * _tickLength);
}
-void EobEngine::seq_waterdeepExit() {
+void EoBEngine::seq_waterdeepExit() {
if (shouldQuit() || skipFlag())
return;
@@ -771,7 +771,7 @@ void EobEngine::seq_waterdeepExit() {
delay(50 * _tickLength);
}
-void EobEngine::seq_tunnel() {
+void EoBEngine::seq_tunnel() {
if (shouldQuit() || skipFlag())
return;
@@ -867,7 +867,7 @@ void EobEngine::seq_tunnel() {
delay(50 * _tickLength);
}
-void EobEngine::seq_xdeath() {
+void EoBEngine::seq_xdeath() {
uint8 *shapes1[5];
uint8 *shapes2;
@@ -876,7 +876,7 @@ void EobEngine::seq_xdeath() {
shapes1[i] = _screen->encodeShape(i / 2 * 14, i / 2 * 88, 14, 88, true);
_screen->loadShapeSetBitmap("XDEATH3", 5, 3);
shapes2 = _screen->encodeShape(22, 0, 16, 95, true);
- _screen->loadEobBitmap("XDEATH1", 0, 5, 3, -1);
+ _screen->loadEoBBitmap("XDEATH1", 0, 5, 3, -1);
_screen->setCurPage(0);
for (int i = 0; i < 10; i++) {
@@ -924,13 +924,13 @@ void EobEngine::seq_xdeath() {
gui_drawAllCharPortraitsWithStats();
}
-void EobEngine::loadSetIntroPalette(const char *filename) {
+void EoBEngine::loadSetIntroPalette(const char *filename) {
_screen->loadPalette(filename, _screen->getPalette(0));
_screen->getPalette(0).fill(0, 1, 0);
_screen->setScreenPalette(_screen->getPalette(0));
}
-void EobEngine::copyBlurRegion(int x1, int y1, int x2, int y2, int w, int h, int step) {
+void EoBEngine::copyBlurRegion(int x1, int y1, int x2, int y2, int w, int h, int step) {
const uint8 *ptr2 = _screen->getCPagePtr(3) + y1 * 320 + x1;
if (step == 1) {
@@ -990,7 +990,7 @@ void EobEngine::copyBlurRegion(int x1, int y1, int x2, int y2, int w, int h, int
}
}
-void EobEngine::boxMorphTransition(int targetDestX, int targetDestY, int targetFinalX, int targetFinalY, int targetSrcX, int targetSrcY, int targetFinalW, int targetFinalH, int originX1, int originY1, int originW, int originH) {
+void EoBEngine::boxMorphTransition(int targetDestX, int targetDestY, int targetFinalX, int targetFinalY, int targetSrcX, int targetSrcY, int targetFinalW, int targetFinalH, int originX1, int originY1, int originW, int originH) {
int originX2 = originX1 + originW;
int originY2 = originY1 + originH;
if (originY2 > 21)
@@ -1047,7 +1047,7 @@ void EobEngine::boxMorphTransition(int targetDestX, int targetDestY, int targetF
}
}
-void EobEngine::whirlTransition() {
+void EoBEngine::whirlTransition() {
for (int i = 0; i < 2; i++) {
for (int ii = 0; ii < 8; ii++) {
uint32 e = _system->getMillis() + 3;
diff --git a/engines/kyra/sequences_lol.cpp b/engines/kyra/sequences_lol.cpp
index 01db92c225..d5b3dd97c4 100644
--- a/engines/kyra/sequences_lol.cpp
+++ b/engines/kyra/sequences_lol.cpp
@@ -752,7 +752,7 @@ HistoryPlayer::~HistoryPlayer() {
void HistoryPlayer::play() {
int dataSize = 0;
- const char *data = (const char *)_vm->staticres()->loadRawData(kLolHistory, dataSize);
+ const char *data = (const char *)_vm->staticres()->loadRawData(kLoLHistory, dataSize);
if (!data)
error("Could not load history data");
@@ -1195,14 +1195,14 @@ void LoLEngine::showCredits() {
if (_flags.platform == Common::kPlatformPC98) {
int size = 0;
- const uint8 *internCredits = _staticres->loadRawData(kLolCredits, size);
+ const uint8 *internCredits = _staticres->loadRawData(kLoLCredits, size);
assert(size > 0);
credits = new char[size];
assert(credits);
memcpy(credits, internCredits, size);
- _staticres->unloadId(kLolCredits);
+ _staticres->unloadId(kLoLCredits);
} else {
credits = (char *)_res->fileData("CREDITS.TXT", 0);
}
diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp
index e99990e1e0..cce18b5ea4 100644
--- a/engines/kyra/sound_adlib.cpp
+++ b/engines/kyra/sound_adlib.cpp
@@ -479,7 +479,7 @@ void AdLibDriver::setMusicVolume(uint8 volume) {
writeOPL(0x43 + regOffset, calculateOpLevel2(chan));
}
- // For now we use the music volume for both sfx and music in Kyra1 and Eob
+ // For now we use the music volume for both sfx and music in Kyra1 and EoB
if (_version < 4) {
_sfxVolume = volume;
@@ -545,7 +545,7 @@ void AdLibDriver::queueTrack(int track, int volume) {
if (!trackData)
return;
- // Don't drop tracks in Eob. The queue is always full there if a couple of monsters are around.
+ // Don't drop tracks in EoB. The queue is always full there if a couple of monsters are around.
// If we drop the incoming tracks we get no sound effects, but tons of warnings instead.
if (_version >= 3 && _programQueueEnd == _programQueueStart && _programQueue[_programQueueEnd].data != 0) {
warning("AdLibDriver: Program queue full, dropping track %d", track);
diff --git a/engines/kyra/sprites_eob.cpp b/engines/kyra/sprites_eob.cpp
index 9adf84d1ad..e3cc8ebec2 100644
--- a/engines/kyra/sprites_eob.cpp
+++ b/engines/kyra/sprites_eob.cpp
@@ -32,7 +32,7 @@
namespace Kyra {
-void EobCoreEngine::loadMonsterShapes(const char *filename, int monsterIndex, bool hasDecorations, int encodeTableIndex) {
+void EoBCoreEngine::loadMonsterShapes(const char *filename, int monsterIndex, bool hasDecorations, int encodeTableIndex) {
_screen->loadShapeSetBitmap(filename, 3, 3);
const uint16 *enc = &_encodeMonsterShpTable[encodeTableIndex << 2];
@@ -47,7 +47,7 @@ void EobCoreEngine::loadMonsterShapes(const char *filename, int monsterIndex, bo
_screen->_curPage = 0;
}
-void EobCoreEngine::releaseMonsterShapes(int first, int num) {
+void EoBCoreEngine::releaseMonsterShapes(int first, int num) {
for (int i = first; i < first + num; i++) {
delete[] _monsterShapes[i];
_monsterShapes[i] = 0;
@@ -56,10 +56,10 @@ void EobCoreEngine::releaseMonsterShapes(int first, int num) {
}
}
-const uint8 *EobCoreEngine::loadMonsterProperties(const uint8 *data) {
+const uint8 *EoBCoreEngine::loadMonsterProperties(const uint8 *data) {
uint8 cmd = *data++;
while (cmd != 0xff) {
- EobMonsterProperty *d = &_monsterProps[cmd];
+ EoBMonsterProperty *d = &_monsterProps[cmd];
d->armorClass = (int8)*data++;
d->hitChance = (int8)*data++;
d->level = (int8)*data++;
@@ -112,7 +112,7 @@ const uint8 *EobCoreEngine::loadMonsterProperties(const uint8 *data) {
return data;
}
-const uint8 *EobCoreEngine::loadActiveMonsterData(const uint8 *data, int level) {
+const uint8 *EoBCoreEngine::loadActiveMonsterData(const uint8 *data, int level) {
for (uint8 p = *data++; p != 0xff; p = *data++) {
uint8 v = *data++;
_timer->setCountdown(0x20 + (p << 1), v);
@@ -129,7 +129,7 @@ const uint8 *EobCoreEngine::loadActiveMonsterData(const uint8 *data, int level)
if (_hasTempDataFlags & (1 << (level - 1)))
return data + 420;
- memset(_monsters, 0, 30 * sizeof(EobMonsterInPlay));
+ memset(_monsters, 0, 30 * sizeof(EoBMonsterInPlay));
for (int i = 0; i < 30; i++, data += 14) {
if (*data == 0xff)
@@ -142,10 +142,10 @@ const uint8 *EobCoreEngine::loadActiveMonsterData(const uint8 *data, int level)
return data;
}
-void EobCoreEngine::initMonster(int index, int unit, uint16 block, int pos, int dir, int type, int shpIndex, int mode, int i, int randItem, int fixedItem) {
- EobMonsterInPlay *m = &_monsters[index];
- EobMonsterProperty *p = &_monsterProps[type];
- memset(m, 0, sizeof(EobMonsterInPlay));
+void EoBCoreEngine::initMonster(int index, int unit, uint16 block, int pos, int dir, int type, int shpIndex, int mode, int i, int randItem, int fixedItem) {
+ EoBMonsterInPlay *m = &_monsters[index];
+ EoBMonsterProperty *p = &_monsterProps[type];
+ memset(m, 0, sizeof(EoBMonsterInPlay));
if (!block)
return;
@@ -173,7 +173,7 @@ void EobCoreEngine::initMonster(int index, int unit, uint16 block, int pos, int
placeMonster(m, block, dir);
}
-void EobCoreEngine::placeMonster(EobMonsterInPlay *m, uint16 block, int dir) {
+void EoBCoreEngine::placeMonster(EoBMonsterInPlay *m, uint16 block, int dir) {
if (block != 0xffff){
checkSceneUpdateNeed(m->block);
if (_levelBlockProperties[m->block].flags & 7) {
@@ -195,7 +195,7 @@ void EobCoreEngine::placeMonster(EobMonsterInPlay *m, uint16 block, int dir) {
checkSceneUpdateNeed(block);
}
-void EobCoreEngine::killMonster(EobMonsterInPlay *m, bool giveExperience) {
+void EoBCoreEngine::killMonster(EoBMonsterInPlay *m, bool giveExperience) {
m->hitPointsCur = -1;
int pos = (m->pos == 4) ? rollDice(1, 4, -1) : m->pos;
@@ -223,11 +223,11 @@ void EobCoreEngine::killMonster(EobMonsterInPlay *m, bool giveExperience) {
}
}
-bool EobCoreEngine::killMonsterExtra(EobMonsterInPlay*) {
+bool EoBCoreEngine::killMonsterExtra(EoBMonsterInPlay*) {
return true;
}
-int EobCoreEngine::countSpecificMonsters(int type) {
+int EoBCoreEngine::countSpecificMonsters(int type) {
int res = 0;
for (int i = 0; i < 30; i++) {
if (_monsters[i].type != type || _monsters[i].sub != _currentSub || _monsters[i].hitPointsCur < 0)
@@ -237,9 +237,9 @@ int EobCoreEngine::countSpecificMonsters(int type) {
return res;
}
-void EobCoreEngine::updateAttackingMonsterFlags() {
- EobMonsterInPlay *m2 = 0;
- for (EobMonsterInPlay *m = _monsters; m < &_monsters[30]; m++) {
+void EoBCoreEngine::updateAttackingMonsterFlags() {
+ EoBMonsterInPlay *m2 = 0;
+ for (EoBMonsterInPlay *m = _monsters; m < &_monsters[30]; m++) {
if (m->mode != 8)
continue;
m->mode = 0;
@@ -254,7 +254,7 @@ void EobCoreEngine::updateAttackingMonsterFlags() {
setScriptFlags(0x800);
}
-const int8 *EobCoreEngine::getMonstersOnBlockPositions(uint16 block) {
+const int8 *EoBCoreEngine::getMonstersOnBlockPositions(uint16 block) {
memset(_monsterBlockPosArray, -1, sizeof(_monsterBlockPosArray));
for (int8 i = 0; i < 30; i++) {
if (_monsters[i].block != block)
@@ -265,7 +265,7 @@ const int8 *EobCoreEngine::getMonstersOnBlockPositions(uint16 block) {
return _monsterBlockPosArray;
}
-int EobCoreEngine::getClosestMonster(int charIndex, int block) {
+int EoBCoreEngine::getClosestMonster(int charIndex, int block) {
const int8 *pos = getMonstersOnBlockPositions(block);
if (pos[4] != -1)
return pos[4];
@@ -278,15 +278,15 @@ int EobCoreEngine::getClosestMonster(int charIndex, int block) {
return -1;
}
-bool EobCoreEngine::blockHasMonsters(uint16 block) {
+bool EoBCoreEngine::blockHasMonsters(uint16 block) {
return _levelBlockProperties[block].flags & 7 ? true : false;
}
-bool EobCoreEngine::isMonsterOnPos(EobMonsterInPlay *m, uint16 block, int pos, int checkPos4) {
+bool EoBCoreEngine::isMonsterOnPos(EoBMonsterInPlay *m, uint16 block, int pos, int checkPos4) {
return (m->block == block && (m->pos == pos || (m->pos == 4 && checkPos4))) ? true : false;
}
-const int16 *EobCoreEngine::findBlockMonsters(uint16 block, int pos, int dir, int blockDamage, int singleTargetCheckAdjacent) {
+const int16 *EoBCoreEngine::findBlockMonsters(uint16 block, int pos, int dir, int blockDamage, int singleTargetCheckAdjacent) {
static const uint8 cpos4[] = { 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1 };
int include4 = (pos < 4) ? cpos4[(dir << 2) + pos] : 1;
int16 *dst = _foundMonstersArray;
@@ -333,12 +333,12 @@ const int16 *EobCoreEngine::findBlockMonsters(uint16 block, int pos, int dir, in
return _foundMonstersArray;
}
-void EobCoreEngine::drawBlockObject(int flipped, int page, const uint8 *shape, int x, int y, int sd, uint8 *ovl) {
+void EoBCoreEngine::drawBlockObject(int flipped, int page, const uint8 *shape, int x, int y, int sd, uint8 *ovl) {
const ScreenDim *d = _screen->getScreenDim(sd);
_screen->drawShape(page, shape, x - (d->sx << 3), y - d->sy, sd, flipped | (ovl ? 2 : 0), ovl);
}
-void EobCoreEngine::drawMonsterShape(const uint8 *shape, int x, int y, int flipped, int flags, int palIndex) {
+void EoBCoreEngine::drawMonsterShape(const uint8 *shape, int x, int y, int flipped, int flags, int palIndex) {
uint8 *ovl = 0;
if (flags & 2)
@@ -351,7 +351,7 @@ void EobCoreEngine::drawMonsterShape(const uint8 *shape, int x, int y, int flipp
drawBlockObject(flipped, 2, shape, x, y, 5, ovl);
}
-void EobCoreEngine::flashMonsterShape(EobMonsterInPlay *m) {
+void EoBCoreEngine::flashMonsterShape(EoBMonsterInPlay *m) {
disableSysTimer(2);
_flashShapeTimer = 0;
drawScene(1);
@@ -362,11 +362,11 @@ void EobCoreEngine::flashMonsterShape(EobMonsterInPlay *m) {
_sceneUpdateRequired = true;
}
-void EobCoreEngine::updateAllMonsterShapes() {
+void EoBCoreEngine::updateAllMonsterShapes() {
drawScene(1);
bool updateShp = false;
- for (EobMonsterInPlay *m = _monsters; m < &_monsters[30]; m++) {
+ for (EoBMonsterInPlay *m = _monsters; m < &_monsters[30]; m++) {
if (m->flags & 2) {
m->flags &= ~2;
updateShp = true;
@@ -384,7 +384,7 @@ void EobCoreEngine::updateAllMonsterShapes() {
_preventMonsterFlash = false;
}
-void EobCoreEngine::drawBlockItems(int index) {
+void EoBCoreEngine::drawBlockItems(int index) {
uint16 o = _visibleBlocks[index]->drawObjects;
uint8 w = _visibleBlocks[index]->walls[_sceneDrawVarDown];
uint8 flg = (index == 16) ? 0x80 : _wllWallFlags[w];
@@ -399,7 +399,7 @@ void EobCoreEngine::drawBlockItems(int index) {
int tile2 = 0;
while (o != o2 || forceLoop) {
- EobItem *itm = &_items[o];
+ EoBItem *itm = &_items[o];
if (itm->pos == 8 || itm->pos < 4) {
tile2 = -1;
@@ -444,7 +444,7 @@ void EobCoreEngine::drawBlockItems(int index) {
}
}
-void EobCoreEngine::drawDoor(int index) {
+void EoBCoreEngine::drawDoor(int index) {
int s = _visibleBlocks[index]->walls[_sceneDrawVarDown];
if (_flags.gameID == GI_EOB1 && s == 0x85)
@@ -467,7 +467,7 @@ void EobCoreEngine::drawDoor(int index) {
drawLevelModifyScreenDim(5, _shpDmX1, 0, _shpDmX2, 15);
}
-void EobCoreEngine::drawMonsters(int index) {
+void EoBCoreEngine::drawMonsters(int index) {
static const uint8 distMap[] = { 2, 1, 0, 4 };
static const uint8 yAdd[] = { 20, 12, 4, 4, 2, 0, 0 };
@@ -480,8 +480,8 @@ void EobCoreEngine::drawMonsters(int index) {
int drawObjDirIndex = _currentDirection * 5;
int cDirOffs = _currentDirection << 2;
- EobMonsterInPlay *drawObj[5];
- memset(drawObj, 0, 5 * sizeof(EobMonsterInPlay*));
+ EoBMonsterInPlay *drawObj[5];
+ memset(drawObj, 0, 5 * sizeof(EoBMonsterInPlay*));
for (int i = 0; i < 30; i++) {
if (_monsters[i].block != bl)
@@ -490,11 +490,11 @@ void EobCoreEngine::drawMonsters(int index) {
}
for (int i = 0; i < 5; i++) {
- EobMonsterInPlay *d = drawObj[i];
+ EoBMonsterInPlay *d = drawObj[i];
if (!d)
continue;
- EobMonsterProperty *p = &_monsterProps[d->type];
+ EoBMonsterProperty *p = &_monsterProps[d->type];
if (_flags.gameID == GI_EOB2 && (p->capsFlags & 0x100) && !(_partyEffectFlags & 0x220) && !(d->flags & 2))
continue;
@@ -569,7 +569,7 @@ void EobCoreEngine::drawMonsters(int index) {
}
}
-void EobCoreEngine::drawWallOfForce(int index) {
+void EoBCoreEngine::drawWallOfForce(int index) {
int d = _dscDimMap[index];
assert(d < 3);
int dH = _wallOfForceDsNumH[d];
@@ -590,7 +590,7 @@ void EobCoreEngine::drawWallOfForce(int index) {
}
}
-void EobCoreEngine::drawFlyingObjects(int index) {
+void EoBCoreEngine::drawFlyingObjects(int index) {
LevelBlockProperty *bl = _visibleBlocks[index];
int blockIndex = _visibleBlockIndex[index];
int w = bl->walls[_sceneDrawVarDown];
@@ -598,8 +598,8 @@ void EobCoreEngine::drawFlyingObjects(int index) {
if (_wllVmpMap[w] && !(_wllWallFlags[w] & 0x80))
return;
- EobFlyingObject *drawObj[5];
- memset(drawObj, 0, 5 * sizeof(EobFlyingObject*));
+ EoBFlyingObject *drawObj[5];
+ memset(drawObj, 0, 5 * sizeof(EoBFlyingObject*));
for (int i = 0; i < 10; i++) {
if (!_flyingObjects[i].enable || blockIndex != _flyingObjects[i].curBlock)
@@ -608,7 +608,7 @@ void EobCoreEngine::drawFlyingObjects(int index) {
}
for (int i = 0; i < 5; i++) {
- EobFlyingObject *fo = drawObj[i];
+ EoBFlyingObject *fo = drawObj[i];
if (!fo)
continue;
@@ -665,7 +665,7 @@ void EobCoreEngine::drawFlyingObjects(int index) {
}
}
-void EobCoreEngine::drawTeleporter(int index) {
+void EoBCoreEngine::drawTeleporter(int index) {
static const uint8 telprtX[] = { 0x28, 0x1C, 0x12 };
static const uint8 telprtY[] = { 0x0D, 0x15, 0x1A };
@@ -691,9 +691,9 @@ void EobCoreEngine::drawTeleporter(int index) {
}
}
-void EobCoreEngine::updateMonsters(int unit) {
+void EoBCoreEngine::updateMonsters(int unit) {
for (int i = 0; i < 30; i++) {
- EobMonsterInPlay *m = &_monsters[i];
+ EoBMonsterInPlay *m = &_monsters[i];
if (m->unit == unit) {
if (m->hitPointsCur <= 0 || m->flags & 0x20)
continue;
@@ -744,7 +744,7 @@ void EobCoreEngine::updateMonsters(int unit) {
checkFlyingObjects();
}
-void EobCoreEngine::updateMonsterDest(EobMonsterInPlay *m) {
+void EoBCoreEngine::updateMonsterDest(EoBMonsterInPlay *m) {
if (m->mode >= 7 && m->mode <= 10)
return;
int dist = getBlockDistance(m->block, _currentBlock);
@@ -763,7 +763,7 @@ void EobCoreEngine::updateMonsterDest(EobMonsterInPlay *m) {
m->dest = _currentBlock;
}
-void EobCoreEngine::updateMonsterAttackMode(EobMonsterInPlay *m) {
+void EoBCoreEngine::updateMonsterAttackMode(EoBMonsterInPlay *m) {
if (!(m->flags & 1) || m->mode == 10)
return;
if (m->mode == 8) {
@@ -774,13 +774,13 @@ void EobCoreEngine::updateMonsterAttackMode(EobMonsterInPlay *m) {
m->dest = _currentBlock;
}
-void EobCoreEngine::updateAllMonsterDests() {
+void EoBCoreEngine::updateAllMonsterDests() {
for (int i = 0; i < 30; i++)
updateMonsterDest(&_monsters[i]);
}
-void EobCoreEngine::turnFriendlyMonstersHostile() {
- EobMonsterInPlay *m = 0;
+void EoBCoreEngine::turnFriendlyMonstersHostile() {
+ EoBMonsterInPlay *m = 0;
for (int i = 0; i < 30; i++) {
if (_monsters[i].mode == 8) {
_monsters[i].mode = 0;
@@ -797,7 +797,7 @@ void EobCoreEngine::turnFriendlyMonstersHostile() {
}
}
-int EobCoreEngine::getNextMonsterDirection(int curBlock, int destBlock) {
+int EoBCoreEngine::getNextMonsterDirection(int curBlock, int destBlock) {
uint8 c = destBlock % 32;
uint8 d = destBlock / 32;
uint8 e = curBlock % 32;
@@ -824,7 +824,7 @@ int EobCoreEngine::getNextMonsterDirection(int curBlock, int destBlock) {
return _monsterDirChangeTable[r];
}
-int EobCoreEngine::getNextMonsterPos(EobMonsterInPlay *m, int block) {
+int EoBCoreEngine::getNextMonsterPos(EoBMonsterInPlay *m, int block) {
if ((_flags.gameID == GI_EOB1 && _monsterProps[m->type].u30 != 0) || (_flags.gameID == GI_EOB2 && _monsterProps[m->type].u30 == 2))
return -1;
int d = findFreeMonsterPos(block, _monsterProps[m->type].u30);
@@ -856,7 +856,7 @@ int EobCoreEngine::getNextMonsterPos(EobMonsterInPlay *m, int block) {
return -1;
}
-int EobCoreEngine::findFreeMonsterPos(int block, int size) {
+int EoBCoreEngine::findFreeMonsterPos(int block, int size) {
int nm = _levelBlockProperties[block].flags & 7;
if (nm == 4)
return -2;
@@ -864,7 +864,7 @@ int EobCoreEngine::findFreeMonsterPos(int block, int size) {
int res = 0;
for (int i = 0; i < 30; i++) {
- EobMonsterInPlay *m = &_monsters[i];
+ EoBMonsterInPlay *m = &_monsters[i];
if (m->block != block)
continue;
if (_monsterProps[m->type].u30 != size)
@@ -881,8 +881,8 @@ int EobCoreEngine::findFreeMonsterPos(int block, int size) {
return res;
}
-void EobCoreEngine::updateMoveMonster(EobMonsterInPlay *m) {
- EobMonsterProperty *p = &_monsterProps[m->type];
+void EoBCoreEngine::updateMoveMonster(EoBMonsterInPlay *m) {
+ EoBMonsterProperty *p = &_monsterProps[m->type];
int d = getNextMonsterDirection(m->block, _currentBlock);
if ((_flags.gameID == GI_EOB2) && (p->capsFlags & 0x800) && !(d & 1))
@@ -910,8 +910,8 @@ void EobCoreEngine::updateMoveMonster(EobMonsterInPlay *m) {
updateMonsterTryCloseAttack(m, -1);
}
-bool EobCoreEngine::updateMonsterTryDistanceAttack(EobMonsterInPlay *m) {
- EobMonsterProperty *p = &_monsterProps[m->type];
+bool EoBCoreEngine::updateMonsterTryDistanceAttack(EoBMonsterInPlay *m) {
+ EoBMonsterProperty *p = &_monsterProps[m->type];
if (!m->numRemoteAttacks || ((_flags.gameID == GI_EOB1) && !(p->capsFlags & 0x40)))
return false;
@@ -1014,7 +1014,7 @@ bool EobCoreEngine::updateMonsterTryDistanceAttack(EobMonsterInPlay *m) {
return true;
}
-bool EobCoreEngine::updateMonsterTryCloseAttack(EobMonsterInPlay *m, int block) {
+bool EoBCoreEngine::updateMonsterTryCloseAttack(EoBMonsterInPlay *m, int block) {
if (block == -1)
block = calcNewBlockPosition(m->block, m->dir);
@@ -1070,7 +1070,7 @@ bool EobCoreEngine::updateMonsterTryCloseAttack(EobMonsterInPlay *m, int block)
return true;
}
-void EobCoreEngine::walkMonster(EobMonsterInPlay *m, int destBlock) {
+void EoBCoreEngine::walkMonster(EoBMonsterInPlay *m, int destBlock) {
if (++_monsterStepCounter > 10) {
_monsterStepCounter = 0;
_monsterStepMode ^= 1;
@@ -1141,8 +1141,8 @@ void EobCoreEngine::walkMonster(EobMonsterInPlay *m, int destBlock) {
}
}
-bool EobCoreEngine::walkMonsterNextStep(EobMonsterInPlay *m, int destBlock, int direction) {
- EobMonsterProperty *p = &_monsterProps[m->type];
+bool EoBCoreEngine::walkMonsterNextStep(EoBMonsterInPlay *m, int destBlock, int direction) {
+ EoBMonsterProperty *p = &_monsterProps[m->type];
int obl = m->block;
if (destBlock != m->block && destBlock != -1) {
@@ -1199,14 +1199,14 @@ bool EobCoreEngine::walkMonsterNextStep(EobMonsterInPlay *m, int destBlock, int
return true;
}
-void EobCoreEngine::updateMonsterFollowPath(EobMonsterInPlay *m, int turnSteps) {
+void EoBCoreEngine::updateMonsterFollowPath(EoBMonsterInPlay *m, int turnSteps) {
if (!walkMonsterNextStep(m, calcNewBlockPosition(m->block, m->dir), -1)) {
m->dir = (m->dir + turnSteps) & 3;
walkMonsterNextStep(m, -1, m->dir);
}
}
-void EobCoreEngine::updateMonstersStraying(EobMonsterInPlay *m, int a) {
+void EoBCoreEngine::updateMonstersStraying(EoBMonsterInPlay *m, int a) {
if (m->f_9 >= 0) {
if (m->f_9 == 0)
updateMonsterFollowPath(m, -a);
@@ -1236,14 +1236,14 @@ void EobCoreEngine::updateMonstersStraying(EobMonsterInPlay *m, int a) {
}
}
-void EobCoreEngine::updateMonstersSpellStatus(EobMonsterInPlay *m) {
+void EoBCoreEngine::updateMonstersSpellStatus(EoBMonsterInPlay *m) {
if (m->spellStatusLeft) {
if (!--m->spellStatusLeft)
m->mode = 0;
}
}
-void EobCoreEngine::setBlockMonsterDirection(int block, int dir) {
+void EoBCoreEngine::setBlockMonsterDirection(int block, int dir) {
for (int i = 0; i < 30; i++) {
if (_monsters[i].block != block || _monsters[i].dir == dir)
continue;
diff --git a/engines/kyra/sprites_lol.cpp b/engines/kyra/sprites_lol.cpp
index 9f7e05627b..06d781328e 100644
--- a/engines/kyra/sprites_lol.cpp
+++ b/engines/kyra/sprites_lol.cpp
@@ -159,7 +159,7 @@ int LoLEngine::deleteMonstersFromBlock(int block) {
continue;
}
- LolMonsterInPlay *m = &_monsters[i & 0x7fff];
+ LoLMonsterInPlay *m = &_monsters[i & 0x7fff];
cnt++;
setMonsterMode(m, 14);
@@ -173,7 +173,7 @@ int LoLEngine::deleteMonstersFromBlock(int block) {
return cnt;
}
-void LoLEngine::setMonsterMode(LolMonsterInPlay *monster, int mode) {
+void LoLEngine::setMonsterMode(LoLMonsterInPlay *monster, int mode) {
if (monster->mode == 13 && mode != 14)
return;
@@ -210,7 +210,7 @@ void LoLEngine::setMonsterMode(LolMonsterInPlay *monster, int mode) {
}
}
-bool LoLEngine::updateMonsterAdjustBlocks(LolMonsterInPlay *monster) {
+bool LoLEngine::updateMonsterAdjustBlocks(LoLMonsterInPlay *monster) {
static const uint8 dims[] = { 0, 13, 9, 3 };
if (monster->properties->flags & 8)
return true;
@@ -251,7 +251,7 @@ bool LoLEngine::updateMonsterAdjustBlocks(LolMonsterInPlay *monster) {
return (fx1 >= fx2) ? false : true;
}
-void LoLEngine::placeMonster(LolMonsterInPlay *monster, uint16 x, uint16 y) {
+void LoLEngine::placeMonster(LoLMonsterInPlay *monster, uint16 x, uint16 y) {
bool cont = true;
int t = monster->block;
if (monster->block) {
@@ -329,7 +329,7 @@ int LoLEngine::calcMonsterDirection(uint16 x1, uint16 y1, uint16 x2, uint16 y2)
return retVal[r];
}
-void LoLEngine::setMonsterDirection(LolMonsterInPlay *monster, int dir) {
+void LoLEngine::setMonsterDirection(LoLMonsterInPlay *monster, int dir) {
monster->direction = dir;
if (!(dir & 1) || ((monster->direction - (monster->facing << 1)) >= 2))
@@ -338,7 +338,7 @@ void LoLEngine::setMonsterDirection(LolMonsterInPlay *monster, int dir) {
checkSceneUpdateNeed(monster->block);
}
-void LoLEngine::monsterDropItems(LolMonsterInPlay *monster) {
+void LoLEngine::monsterDropItems(LoLMonsterInPlay *monster) {
uint16 a = monster->assignedItems;
while (a) {
uint16 b = a;
@@ -503,7 +503,7 @@ int LoLEngine::checkBlockForWallsAndSufficientSpace(int block, int x, int y, int
uint16 b = _levelBlockProperties[block].assignedObjects;
while (b & 0x8000) {
- LolMonsterInPlay *monster = &_monsters[b & 0x7fff];
+ LoLMonsterInPlay *monster = &_monsters[b & 0x7fff];
if (monster->mode < 13) {
int r = checkDrawObjectSpace(x, y, monster->x, monster->y);
@@ -645,7 +645,7 @@ void LoLEngine::drawBlockObjects(int blockArrayIndex) {
}
void LoLEngine::drawMonster(uint16 id) {
- LolMonsterInPlay *m = &_monsters[id];
+ LoLMonsterInPlay *m = &_monsters[id];
int16 flg = _monsterDirFlags[(_currentDirection << 2) + m->facing];
int curFrm = getMonsterCurFrame(m, flg & 0xffef);
uint8 *shp = 0;
@@ -721,7 +721,7 @@ void LoLEngine::drawMonster(uint16 id) {
delete[] tbl;
}
-int LoLEngine::getMonsterCurFrame(LolMonsterInPlay *m, uint16 dirFlags) {
+int LoLEngine::getMonsterCurFrame(LoLMonsterInPlay *m, uint16 dirFlags) {
int tmp = 0;
switch (_monsterAnimType[m->properties->shapeIndex]) {
case 0:
@@ -1080,7 +1080,7 @@ int LoLEngine::calcDrawingLayerParameters(int x1, int y1, int &x2, int &y2, uint
return l;
}
-void LoLEngine::updateMonster(LolMonsterInPlay *monster) {
+void LoLEngine::updateMonster(LoLMonsterInPlay *monster) {
static const uint8 flags[] = { 1, 0, 1, 3, 3, 0, 0, 3, 4, 1, 0, 0, 4, 0, 0 };
if (monster->mode > 14)
return;
@@ -1228,7 +1228,7 @@ void LoLEngine::updateMonster(LolMonsterInPlay *monster) {
monster->flags &= 0xffef;
}
-void LoLEngine::moveMonster(LolMonsterInPlay *monster) {
+void LoLEngine::moveMonster(LoLMonsterInPlay *monster) {
static const int8 turnPos[] = { 0, 2, 6, 6, 0, 2, 4, 4, 2, 2, 4, 6, 0, 0, 4, 6, 0 };
if (monster->x != monster->destX || monster->y != monster->destY) {
walkMonster(monster);
@@ -1238,7 +1238,7 @@ void LoLEngine::moveMonster(LolMonsterInPlay *monster) {
}
}
-void LoLEngine::walkMonster(LolMonsterInPlay *monster) {
+void LoLEngine::walkMonster(LoLMonsterInPlay *monster) {
if (monster->properties->flags & 0x400)
return;
@@ -1269,7 +1269,7 @@ void LoLEngine::walkMonster(LolMonsterInPlay *monster) {
placeMonster(monster, fx, fy);
}
-bool LoLEngine::chasePartyWithDistanceAttacks(LolMonsterInPlay *monster) {
+bool LoLEngine::chasePartyWithDistanceAttacks(LoLMonsterInPlay *monster) {
if (!monster->numDistAttacks)
return false;
@@ -1347,7 +1347,7 @@ bool LoLEngine::chasePartyWithDistanceAttacks(LolMonsterInPlay *monster) {
return true;
}
-void LoLEngine::chasePartyWithCloseAttacks(LolMonsterInPlay *monster) {
+void LoLEngine::chasePartyWithCloseAttacks(LoLMonsterInPlay *monster) {
if (!(monster->flags & 8)) {
int dir = calcMonsterDirection(monster->x & 0xff00, monster->y & 0xff00, _partyPosX & 0xff00, _partyPosY & 0xff00);
int x1 = _partyPosX;
@@ -1389,7 +1389,7 @@ void LoLEngine::chasePartyWithCloseAttacks(LolMonsterInPlay *monster) {
}
}
-int LoLEngine::walkMonsterCalcNextStep(LolMonsterInPlay *monster) {
+int LoLEngine::walkMonsterCalcNextStep(LoLMonsterInPlay *monster) {
static const int8 walkMonsterTable1[] = { 7, -6, 5, -4, 3, -2, 1, 0 };
static const int8 walkMonsterTable2[] = { -7, 6, -5, 4, -3, 2, -1, 0 };
@@ -1479,7 +1479,7 @@ int LoLEngine::checkForPossibleDistanceAttack(uint16 monsterBlock, int direction
return 5;
}
-int LoLEngine::walkMonsterCheckDest(int x, int y, LolMonsterInPlay *monster, int unk) {
+int LoLEngine::walkMonsterCheckDest(int x, int y, LoLMonsterInPlay *monster, int unk) {
uint8 m = monster->mode;
monster->mode = 15;
@@ -1497,7 +1497,7 @@ void LoLEngine::getNextStepCoords(int16 srcX, int16 srcY, int &newX, int &newY,
newY = (srcY + shiftTableY[direction]) & 0x1fff;
}
-void LoLEngine::rearrangeAttackingMonster(LolMonsterInPlay *monster) {
+void LoLEngine::rearrangeAttackingMonster(LoLMonsterInPlay *monster) {
int t = (monster->direction >> 1);
uint16 mx = monster->x;
uint16 my = monster->y;
@@ -1564,7 +1564,7 @@ void LoLEngine::rearrangeAttackingMonster(LolMonsterInPlay *monster) {
placeMonster(monster, mx, my);
}
-void LoLEngine::moveStrayingMonster(LolMonsterInPlay *monster) {
+void LoLEngine::moveStrayingMonster(LoLMonsterInPlay *monster) {
int x = 0;
int y = 0;
@@ -1601,7 +1601,7 @@ void LoLEngine::moveStrayingMonster(LolMonsterInPlay *monster) {
}
}
-void LoLEngine::killMonster(LolMonsterInPlay *monster) {
+void LoLEngine::killMonster(LoLMonsterInPlay *monster) {
setMonsterMode(monster, 14);
monsterDropItems(monster);
checkSceneUpdateNeed(monster->block);
diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp
index 092a4cc1e9..888b515fd9 100644
--- a/engines/kyra/staticres.cpp
+++ b/engines/kyra/staticres.cpp
@@ -250,27 +250,27 @@ bool StaticResource::init() {
{ k2ShpAnimDataV2, proc(loadShapeAnimData_v2), proc(freeHofShapeAnimDataV2) },
#ifdef ENABLE_LOL
- { kLolCharData, proc(loadCharData), proc(freeCharData) },
- { kLolSpellData, proc(loadSpellData), proc(freeSpellData) },
- { kLolCompassData, proc(loadCompassData), proc(freeCompassData) },
- { kLolFlightShpData, proc(loadFlyingObjectData), proc(freeFlyingObjectData) },
- { kLolRawDataBe16, proc(loadRawDataBe16), proc(freeRawDataBe16) },
- { kLolRawDataBe32, proc(loadRawDataBe32), proc(freeRawDataBe32) },
- { kLolButtonData, proc(loadButtonDefs), proc(freeButtonDefs) },
+ { kLoLCharData, proc(loadCharData), proc(freeCharData) },
+ { kLoLSpellData, proc(loadSpellData), proc(freeSpellData) },
+ { kLoLCompassData, proc(loadCompassData), proc(freeCompassData) },
+ { kLoLFlightShpData, proc(loadFlyingObjectData), proc(freeFlyingObjectData) },
+ { kLoLRawDataBe16, proc(loadRawDataBe16), proc(freeRawDataBe16) },
+ { kLoLRawDataBe32, proc(loadRawDataBe32), proc(freeRawDataBe32) },
+ { kLoLButtonData, proc(loadButtonDefs), proc(freeButtonDefs) },
#else
- { kLolCharData, proc(loadDummy), proc(freeDummy) },
- { kLolSpellData, proc(loadDummy), proc(freeDummy) },
- { kLolCompassData, proc(loadDummy), proc(freeDummy) },
- { kLolFlightShpData, proc(loadDummy), proc(freeDummy) },
- { kLolRawDataBe16, proc(loadDummy), proc(freeDummy) },
- { kLolRawDataBe32, proc(loadDummy), proc(freeDummy) },
- { kLolButtonData, proc(loadDummy), proc(freeDummy) },
+ { kLoLCharData, proc(loadDummy), proc(freeDummy) },
+ { kLoLSpellData, proc(loadDummy), proc(freeDummy) },
+ { kLoLCompassData, proc(loadDummy), proc(freeDummy) },
+ { kLoLFlightShpData, proc(loadDummy), proc(freeDummy) },
+ { kLoLRawDataBe16, proc(loadDummy), proc(freeDummy) },
+ { kLoLRawDataBe32, proc(loadDummy), proc(freeDummy) },
+ { kLoLButtonData, proc(loadDummy), proc(freeDummy) },
#endif // ENABLE_LOL
#ifdef ENABLE_EOB
- { kEob2SequenceData, proc(loadEob2SeqData), proc(freeEob2SeqData) },
- { kEob2ShapeData, proc(loadEob2ShapeData), proc(freeEob2ShapeData) },
- { kEobNpcData, proc(loadEobNpcData), proc(freeEobNpcData) },
+ { kEoB2SequenceData, proc(loadEoB2SeqData), proc(freeEoB2SeqData) },
+ { kEoB2ShapeData, proc(loadEoB2ShapeData), proc(freeEoB2ShapeData) },
+ { kEoBNpcData, proc(loadEoBNpcData), proc(freeEoBNpcData) },
#endif // ENABLE_EOB
{ 0, 0, 0 }
@@ -1110,24 +1110,24 @@ void KyraEngine_HoF::initStaticResource() {
};
#ifdef ENABLE_LOL
- static const SeqProc kLolDemoSequenceCallbacks[] = {
+ static const SeqProc kLoLDemoSequenceCallbacks[] = {
&KyraEngine_HoF::seq_lolDemoScene1, 0, &KyraEngine_HoF::seq_lolDemoScene2, 0,
&KyraEngine_HoF::seq_lolDemoScene3, 0, &KyraEngine_HoF::seq_lolDemoScene4, 0,
&KyraEngine_HoF::seq_lolDemoScene5, &KyraEngine_HoF::seq_lolDemoText5,
&KyraEngine_HoF::seq_lolDemoScene6, 0
};
- static const SeqProc kLolDemoNestedSequenceCallbacks[] = { 0 };
+ static const SeqProc kLoLDemoNestedSequenceCallbacks[] = { 0 };
#endif // ENABLE_LOL
_callbackS =
#ifdef ENABLE_LOL
- _flags.gameID == GI_LOL ? kLolDemoSequenceCallbacks :
+ _flags.gameID == GI_LOL ? kLoLDemoSequenceCallbacks :
#endif // ENABLE_LOL
((_flags.isDemo && !_flags.isTalkie) ? hofDemoSequenceCallbacks : hofSequenceCallbacks);
_callbackN =
#ifdef ENABLE_LOL
- _flags.gameID == GI_LOL ? kLolDemoNestedSequenceCallbacks :
+ _flags.gameID == GI_LOL ? kLoLDemoNestedSequenceCallbacks :
#endif // ENABLE_LOL
((_flags.isDemo && !_flags.isTalkie) ? hofDemoNestedSequenceCallbacks : hofNestedSequenceCallbacks);
}
diff --git a/engines/kyra/staticres_eob.cpp b/engines/kyra/staticres_eob.cpp
index 2594828fdf..f3460bc9c5 100644
--- a/engines/kyra/staticres_eob.cpp
+++ b/engines/kyra/staticres_eob.cpp
@@ -28,22 +28,22 @@
namespace Kyra {
#ifdef ENABLE_EOB
-const EobSequenceStep *StaticResource::loadEob2SeqData(int id, int &entries) {
- return (const EobSequenceStep *)getData(id, kEob2SequenceData, entries);
+const EoBSequenceStep *StaticResource::loadEoB2SeqData(int id, int &entries) {
+ return (const EoBSequenceStep *)getData(id, kEoB2SequenceData, entries);
}
-const EobShapeDef *StaticResource::loadEob2ShapeData(int id, int &entries) {
- return (const EobShapeDef *)getData(id, kEob2ShapeData, entries);
+const EoBShapeDef *StaticResource::loadEoB2ShapeData(int id, int &entries) {
+ return (const EoBShapeDef *)getData(id, kEoB2ShapeData, entries);
}
-const EobCharacter *StaticResource::loadEobNpcData(int id, int &entries) {
- return (const EobCharacter *)getData(id, kEobNpcData, entries);
+const EoBCharacter *StaticResource::loadEoBNpcData(int id, int &entries) {
+ return (const EoBCharacter *)getData(id, kEoBNpcData, entries);
}
-bool StaticResource::loadEob2SeqData(Common::SeekableReadStream &stream, void *&ptr, int &size) {
+bool StaticResource::loadEoB2SeqData(Common::SeekableReadStream &stream, void *&ptr, int &size) {
size = stream.size() / 11;
- EobSequenceStep *s = new EobSequenceStep[size];
+ EoBSequenceStep *s = new EoBSequenceStep[size];
for (int i = 0; i < size; i++) {
s[i].command = stream.readByte();
@@ -62,10 +62,10 @@ bool StaticResource::loadEob2SeqData(Common::SeekableReadStream &stream, void *&
return true;
}
-bool StaticResource::loadEob2ShapeData(Common::SeekableReadStream &stream, void *&ptr, int &size) {
+bool StaticResource::loadEoB2ShapeData(Common::SeekableReadStream &stream, void *&ptr, int &size) {
size = stream.size() / 6;
- EobShapeDef *s = new EobShapeDef[size];
+ EoBShapeDef *s = new EoBShapeDef[size];
for (int i = 0; i < size; i++) {
s[i].index = stream.readSint16BE();
@@ -79,12 +79,12 @@ bool StaticResource::loadEob2ShapeData(Common::SeekableReadStream &stream, void
return true;
}
-bool StaticResource::loadEobNpcData(Common::SeekableReadStream &stream, void *&ptr, int &size) {
+bool StaticResource::loadEoBNpcData(Common::SeekableReadStream &stream, void *&ptr, int &size) {
size = stream.readUint16BE();
- EobCharacter *e = new EobCharacter[size];
- memset(e, 0, size * sizeof(EobCharacter));
- EobCharacter *s = e;
+ EoBCharacter *e = new EoBCharacter[size];
+ memset(e, 0, size * sizeof(EoBCharacter));
+ EoBCharacter *s = e;
for (int i = 0; i < size; i++, s++) {
s->id = stream.readByte();
@@ -126,28 +126,28 @@ bool StaticResource::loadEobNpcData(Common::SeekableReadStream &stream, void *&p
return true;
}
-void StaticResource::freeEob2SeqData(void *&ptr, int &size) {
- EobSequenceStep *d = (EobSequenceStep *)ptr;
+void StaticResource::freeEoB2SeqData(void *&ptr, int &size) {
+ EoBSequenceStep *d = (EoBSequenceStep *)ptr;
delete[] d;
ptr = 0;
size = 0;
}
-void StaticResource::freeEob2ShapeData(void *&ptr, int &size) {
- EobShapeDef *d = (EobShapeDef *)ptr;
+void StaticResource::freeEoB2ShapeData(void *&ptr, int &size) {
+ EoBShapeDef *d = (EoBShapeDef *)ptr;
delete[] d;
ptr = 0;
size = 0;
}
-void StaticResource::freeEobNpcData(void *&ptr, int &size) {
- EobCharacter *d = (EobCharacter *)ptr;
+void StaticResource::freeEoBNpcData(void *&ptr, int &size) {
+ EoBCharacter *d = (EoBCharacter *)ptr;
delete[] d;
ptr = 0;
size = 0;
}
-const ScreenDim Screen_Eob::_screenDimTable[] = {
+const ScreenDim Screen_EoB::_screenDimTable[] = {
{ 0x00, 0x00, 0x28, 0xC8, 0x0F, 0x0C, 0x00, 0x00 },
{ 0x08, 0x48, 0x18, 0x38, 0x0E, 0x0C, 0x00, 0x00 },
{ 0x13, 0x40, 0x14, 0x80, 0x06, 0x0C, 0x00, 0x00 },
@@ -179,26 +179,26 @@ const ScreenDim Screen_Eob::_screenDimTable[] = {
{ 0x0A, 0xA8, 0x15, 0x18, 0x0F, 0x0C, 0x00, 0x00 }
};
-const int Screen_Eob::_screenDimTableCount = ARRAYSIZE(Screen_Eob::_screenDimTable);
+const int Screen_EoB::_screenDimTableCount = ARRAYSIZE(Screen_EoB::_screenDimTable);
-const uint8 EobCoreEngine::_hpIncrPerLevel[] = { 10, 4, 8, 6, 10, 10, 9, 10, 9, 10, 9, 9, 3, 1, 2, 2, 3, 3 };
+const uint8 EoBCoreEngine::_hpIncrPerLevel[] = { 10, 4, 8, 6, 10, 10, 9, 10, 9, 10, 9, 9, 3, 1, 2, 2, 3, 3 };
-const uint8 EobCoreEngine::_numLevelsPerClass[] = { 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 2, 2, 3, 2, 2 };
+const uint8 EoBCoreEngine::_numLevelsPerClass[] = { 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 2, 2, 3, 2, 2 };
-const int8 EobCoreEngine::_characterClassType[] = {
+const int8 EoBCoreEngine::_characterClassType[] = {
0, -1, -1, 5, -1, -1, 4, -1, -1, 1, -1, -1, 2, -1, -1, 3, -1, -1, 0,
2, -1, 0, 3, -1, 0, 1, -1, 0, 1, 3, 3, 1, -1, 2, 3, -1, 0, 2, 1, 5,
2, -1, 2, 1, -1
};
-const int16 EobCoreEngine::_hpConstModifiers[] = { -1, -3, -2, -2, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 6, 6, 7, 7 };
+const int16 EoBCoreEngine::_hpConstModifiers[] = { -1, -3, -2, -2, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 6, 6, 7, 7 };
-const uint8 EobCoreEngine::_charClassModifier[] = {
+const uint8 EoBCoreEngine::_charClassModifier[] = {
0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x03, 0x02,
0x00, 0x00, 0x02
};
-const uint8 EobCoreEngine::_teleporterShapeDefs[] = {
+const uint8 EoBCoreEngine::_teleporterShapeDefs[] = {
0x0C, 0x58, 0x02, 0x0E,
0x0C, 0x67, 0x01, 0x07,
0x0C, 0x6F, 0x01, 0x07,
@@ -207,7 +207,7 @@ const uint8 EobCoreEngine::_teleporterShapeDefs[] = {
0x0C, 0x83, 0x01, 0x03
};
-const uint8 EobCoreEngine::_wallOfForceShapeDefs[] = {
+const uint8 EoBCoreEngine::_wallOfForceShapeDefs[] = {
0x00, 0x00, 0x04, 0x08,
0x00, 0x08, 0x04, 0x08,
0x04, 0x00, 0x04, 0x08,
@@ -216,246 +216,246 @@ const uint8 EobCoreEngine::_wallOfForceShapeDefs[] = {
0x0C, 0x00, 0x05, 0x10
};
-const int16 EobCoreEngine::_buttonList1[] = {
+const int16 EoBCoreEngine::_buttonList1[] = {
58, 0, 1, 2, 3, 90, 91, 4, 5, 6, 7, 8, 9, 10, 11, 12, 78, 79, 13, 14, 15, 16,
80, 81, 17, 18, 19, 20, 82, 83, 49, 50, 51, 52, 53, 54, 56, 57, -1
};
-const int16 EobCoreEngine::_buttonList2[] = {
+const int16 EoBCoreEngine::_buttonList2[] = {
58, 61, 62, 63, 64, 65, 93, 94, 66, 67, 68, 69, 70, 71, 76, 77, 88, 0, 1, 2, 3,
90, 91, 4, 5, 6, 7, 8, 9, 10, 11, 12, 78, 79, 13, 14, 15, 16, 80, 81, 17, 18,
19, 20, 82, 83, 49, 50, 51, 52, 53, 54, 56, 57, -1
};
-const int16 EobCoreEngine::_buttonList3[] = {
+const int16 EoBCoreEngine::_buttonList3[] = {
58, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
40, 41, 42, 43, 44, 45, 84, 85, 46, 47, 48, 60, 59, 92, 4, 5, 6, 7, 8, 49, 50,
51, 52, 53, 54, 56, 57, -1
};
-const int16 EobCoreEngine::_buttonList4[] = {
+const int16 EoBCoreEngine::_buttonList4[] = {
58, 47, 48, 60, 59, 92, 4, 5, 6, 7, 8, 49, 50, 51, 52, 53, 54, 56, 57, -1
};
-const int16 EobCoreEngine::_buttonList5[] = {
+const int16 EoBCoreEngine::_buttonList5[] = {
58, 61, 62, 63, 64, 65, 93, 66, 67, 68, 69, 70, 71, 88, 21, 22, 23, 24, 25, 26,
27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 84,
85, 46, 47, 48, 60, 59, 92, 4, 5, 6, 7, 8, 49, 50, 51, 52, 53, 54, 56, 57, -1
};
-const int16 EobCoreEngine::_buttonList6[] = {
+const int16 EoBCoreEngine::_buttonList6[] = {
58, 61, 62, 63, 64, 65, 93, 66, 67, 68, 69, 70, 71, 88, 46, 47, 48, 60, 59, 92,
4, 5, 6, 7, 8, 49, 50, 51, 52, 53, 54, 56, 57, -1
};
-const int16 EobCoreEngine::_buttonList7[] = {
+const int16 EoBCoreEngine::_buttonList7[] = {
17, 18, 19, 20, 82, 83, 55, -1
};
-const int16 EobCoreEngine::_buttonList8[] = {
+const int16 EoBCoreEngine::_buttonList8[] = {
72, 73, 74, 75, 86, 87, 89, -1
};
-const uint8 EobCoreEngine::_clock2Timers[] = {
+const uint8 EoBCoreEngine::_clock2Timers[] = {
0x00, 0x01, 0x20, 0x21, 0x22, 0x22,
0x30, 0x31, 0x32, 0x33, 0x34, 0x35,
0x04, 0x05, 0x06, 0x07
};
-const uint8 EobCoreEngine::_numClock2Timers = ARRAYSIZE(EobCoreEngine::_clock2Timers);
+const uint8 EoBCoreEngine::_numClock2Timers = ARRAYSIZE(EoBCoreEngine::_clock2Timers);
-void EobCoreEngine::initStaticResource() {
+void EoBCoreEngine::initStaticResource() {
int temp;
- _chargenStatStrings = _staticres->loadStrings(kEobBaseChargenStatStrings, temp);
- _chargenRaceSexStrings = _staticres->loadStrings(kEobBaseChargenRaceSexStrings, temp);
- _chargenClassStrings = _staticres->loadStrings(kEobBaseChargenClassStrings, temp);
- _chargenAlignmentStrings = _staticres->loadStrings(kEobBaseChargenAlignmentStrings, temp);
-
- _pryDoorStrings = _staticres->loadStrings(kEobBasePryDoorStrings, temp);
- _warningStrings = _staticres->loadStrings(kEobBaseWarningStrings, temp);
-
- _suffixStringsRings = _staticres->loadStrings(kEobBaseItemSuffixStringsRings, temp);
- _suffixStringsPotions = _staticres->loadStrings(kEobBaseItemSuffixStringsPotions, temp);
- _suffixStringsWands = _staticres->loadStrings(kEobBaseItemSuffixStringsWands, temp);
-
- _ripItemStrings = _staticres->loadStrings(kEobBaseRipItemStrings, temp);
- _cursedString = _staticres->loadStrings(kEobBaseCursedString, temp);
- _enchantedString = _staticres->loadStrings(kEobBaseEnchantedString, temp);
- _magicObjectStrings = _staticres->loadStrings(kEobBaseMagicObjectStrings, temp);
- _magicObjectString5 = _staticres->loadStrings(kEobBaseMagicObjectString5, temp);
- _patternSuffix = _staticres->loadStrings(kEobBasePatternSuffix, temp);
- _patternGrFix1 = _staticres->loadStrings(kEobBasePatternGrFix1, temp);
- _patternGrFix2 = _staticres->loadStrings(kEobBasePatternGrFix2, temp);
- _validateArmorString = _staticres->loadStrings(kEobBaseValidateArmorString, temp);
- _validateCursedString = _staticres->loadStrings(kEobBaseValidateCursedString, temp);
- _validateNoDropString = _staticres->loadStrings(kEobBaseValidateNoDropString, temp);
- _potionStrings = _staticres->loadStrings(kEobBasePotionStrings, temp);
- _wandStrings = _staticres->loadStrings(kEobBaseWandStrings, temp);
- _itemMisuseStrings = _staticres->loadStrings(kEobBaseItemMisuseStrings, temp);
-
- _takenStrings = _staticres->loadStrings(kEobBaseTakenStrings, temp);
- _potionEffectStrings = _staticres->loadStrings(kEobBasePotionEffectStrings, temp);
-
- _yesNoStrings = _staticres->loadStrings(kEobBaseYesNoStrings, temp);
- _npcMaxStrings = _staticres->loadStrings(kEobBaseNpcMaxStrings, temp);
- _okStrings = _staticres->loadStrings(_flags.gameID == GI_EOB2 ? kEobBaseOkStrings : kLolEobCommonMoreStrings, temp);
- _npcJoinStrings = _staticres->loadStrings(kEobBaseNpcJoinStrings, temp);
- _cancelStrings = _staticres->loadStrings(kEobBaseCancelStrings, temp);
- _abortStrings = _staticres->loadStrings(_flags.gameID == GI_EOB2 ? kEobBaseAbortStrings : kEobBaseCancelStrings, temp);
-
- _menuStringsMain = _staticres->loadStrings(kEobBaseMenuStringsMain, temp);
- _menuStringsSaveLoad = _staticres->loadStrings(kEobBaseMenuStringsSaveLoad, temp);
- _menuStringsOnOff = _staticres->loadStrings(kEobBaseMenuStringsOnOff, temp);
- _menuStringsSpells = _staticres->loadStrings(kEobBaseMenuStringsSpells, temp);
- _menuStringsRest = _staticres->loadStrings(kEobBaseMenuStringsRest, temp);
- _menuStringsDrop = _staticres->loadStrings(kEobBaseMenuStringsDrop, temp);
- _menuStringsExit = _staticres->loadStrings(kEobBaseMenuStringsExit, temp);
- _menuStringsStarve = _staticres->loadStrings(kEobBaseMenuStringsStarve, temp);
- _menuStringsScribe = _staticres->loadStrings(kEobBaseMenuStringsScribe, temp);
- _menuStringsDrop2 = _staticres->loadStrings(kEobBaseMenuStringsDrop2, temp);
- _menuStringsHead = _staticres->loadStrings(kEobBaseMenuStringsHead, temp);
- _menuStringsPoison = _staticres->loadStrings(kEobBaseMenuStringsPoison, temp);
- _menuStringsMgc = _staticres->loadStrings(kEobBaseMenuStringsMgc, temp);
- _menuStringsPrefs = _staticres->loadStrings(kEobBaseMenuStringsPrefs, temp);
- _menuStringsRest2 = _staticres->loadStrings(kEobBaseMenuStringsRest2, temp);
- _menuStringsRest3 = _staticres->loadStrings(kEobBaseMenuStringsRest3, temp);
- _menuStringsRest4 = _staticres->loadStrings(kEobBaseMenuStringsRest4, temp);
- _menuStringsDefeat = _staticres->loadStrings(kEobBaseMenuStringsDefeat, temp);
- _menuStringsTransfer = _staticres->loadStrings(kEobBaseMenuStringsTransfer, temp);
- _menuStringsSpec = _staticres->loadStrings(kEobBaseMenuStringsSpec, temp);
- _menuStringsSpellNo = _staticres->loadStrings(kEobBaseMenuStringsSpellNo, temp);
- _menuYesNoStrings = _staticres->loadStrings(kEobBaseMenuYesNoStrings, temp);
-
- _spellLevelsMage = _staticres->loadRawData(kEobBaseSpellLevelsMage, _spellLevelsMageSize);
- _spellLevelsCleric = _staticres->loadRawData(kEobBaseSpellLevelsCleric, _spellLevelsClericSize);
- _numSpellsCleric = _staticres->loadRawData(kEobBaseNumSpellsCleric, temp);
- _numSpellsWisAdj = _staticres->loadRawData(kEobBaseNumSpellsWisAdj, temp);
- _numSpellsPal = _staticres->loadRawData(kEobBaseNumSpellsPal, temp);
- _numSpellsMage = _staticres->loadRawData(kEobBaseNumSpellsMage, temp);
-
- _characterGuiStringsHp = _staticres->loadStrings(kEobBaseCharGuiStringsHp, temp);
- _characterGuiStringsWp = _staticres->loadStrings(_flags.gameID == GI_EOB2 ? kEobBaseCharGuiStringsWp2 : kEobBaseCharGuiStringsWp1, temp);
- _characterGuiStringsWr = _staticres->loadStrings(kEobBaseCharGuiStringsWr, temp);
- _characterGuiStringsSt = _staticres->loadStrings(_flags.gameID == GI_EOB2 ? kEobBaseCharGuiStringsSt2 : kEobBaseCharGuiStringsSt1, temp);
- _characterGuiStringsIn = _staticres->loadStrings(kEobBaseCharGuiStringsIn, temp);
-
- _characterStatusStrings7 = _staticres->loadStrings(kEobBaseCharStatusStrings7, temp);
- _characterStatusStrings8 = _staticres->loadStrings(_flags.gameID == GI_EOB2 ? kEobBaseCharStatusStrings82 : kEobBaseCharStatusStrings81, temp);
- _characterStatusStrings9 = _staticres->loadStrings(kEobBaseCharStatusStrings9, temp);
- _characterStatusStrings12 = _staticres->loadStrings(kEobBaseCharStatusStrings12, temp);
- _characterStatusStrings13 = _staticres->loadStrings(_flags.gameID == GI_EOB2 ? kEobBaseCharStatusStrings132 : kEobBaseCharStatusStrings131, temp);
-
- _levelGainStrings = _staticres->loadStrings(kEobBaseLevelGainStrings, temp);
+ _chargenStatStrings = _staticres->loadStrings(kEoBBaseChargenStatStrings, temp);
+ _chargenRaceSexStrings = _staticres->loadStrings(kEoBBaseChargenRaceSexStrings, temp);
+ _chargenClassStrings = _staticres->loadStrings(kEoBBaseChargenClassStrings, temp);
+ _chargenAlignmentStrings = _staticres->loadStrings(kEoBBaseChargenAlignmentStrings, temp);
+
+ _pryDoorStrings = _staticres->loadStrings(kEoBBasePryDoorStrings, temp);
+ _warningStrings = _staticres->loadStrings(kEoBBaseWarningStrings, temp);
+
+ _suffixStringsRings = _staticres->loadStrings(kEoBBaseItemSuffixStringsRings, temp);
+ _suffixStringsPotions = _staticres->loadStrings(kEoBBaseItemSuffixStringsPotions, temp);
+ _suffixStringsWands = _staticres->loadStrings(kEoBBaseItemSuffixStringsWands, temp);
+
+ _ripItemStrings = _staticres->loadStrings(kEoBBaseRipItemStrings, temp);
+ _cursedString = _staticres->loadStrings(kEoBBaseCursedString, temp);
+ _enchantedString = _staticres->loadStrings(kEoBBaseEnchantedString, temp);
+ _magicObjectStrings = _staticres->loadStrings(kEoBBaseMagicObjectStrings, temp);
+ _magicObjectString5 = _staticres->loadStrings(kEoBBaseMagicObjectString5, temp);
+ _patternSuffix = _staticres->loadStrings(kEoBBasePatternSuffix, temp);
+ _patternGrFix1 = _staticres->loadStrings(kEoBBasePatternGrFix1, temp);
+ _patternGrFix2 = _staticres->loadStrings(kEoBBasePatternGrFix2, temp);
+ _validateArmorString = _staticres->loadStrings(kEoBBaseValidateArmorString, temp);
+ _validateCursedString = _staticres->loadStrings(kEoBBaseValidateCursedString, temp);
+ _validateNoDropString = _staticres->loadStrings(kEoBBaseValidateNoDropString, temp);
+ _potionStrings = _staticres->loadStrings(kEoBBasePotionStrings, temp);
+ _wandStrings = _staticres->loadStrings(kEoBBaseWandStrings, temp);
+ _itemMisuseStrings = _staticres->loadStrings(kEoBBaseItemMisuseStrings, temp);
+
+ _takenStrings = _staticres->loadStrings(kEoBBaseTakenStrings, temp);
+ _potionEffectStrings = _staticres->loadStrings(kEoBBasePotionEffectStrings, temp);
+
+ _yesNoStrings = _staticres->loadStrings(kEoBBaseYesNoStrings, temp);
+ _npcMaxStrings = _staticres->loadStrings(kEoBBaseNpcMaxStrings, temp);
+ _okStrings = _staticres->loadStrings(_flags.gameID == GI_EOB2 ? kEoBBaseOkStrings : kRpgCommonMoreStrings, temp);
+ _npcJoinStrings = _staticres->loadStrings(kEoBBaseNpcJoinStrings, temp);
+ _cancelStrings = _staticres->loadStrings(kEoBBaseCancelStrings, temp);
+ _abortStrings = _staticres->loadStrings(_flags.gameID == GI_EOB2 ? kEoBBaseAbortStrings : kEoBBaseCancelStrings, temp);
+
+ _menuStringsMain = _staticres->loadStrings(kEoBBaseMenuStringsMain, temp);
+ _menuStringsSaveLoad = _staticres->loadStrings(kEoBBaseMenuStringsSaveLoad, temp);
+ _menuStringsOnOff = _staticres->loadStrings(kEoBBaseMenuStringsOnOff, temp);
+ _menuStringsSpells = _staticres->loadStrings(kEoBBaseMenuStringsSpells, temp);
+ _menuStringsRest = _staticres->loadStrings(kEoBBaseMenuStringsRest, temp);
+ _menuStringsDrop = _staticres->loadStrings(kEoBBaseMenuStringsDrop, temp);
+ _menuStringsExit = _staticres->loadStrings(kEoBBaseMenuStringsExit, temp);
+ _menuStringsStarve = _staticres->loadStrings(kEoBBaseMenuStringsStarve, temp);
+ _menuStringsScribe = _staticres->loadStrings(kEoBBaseMenuStringsScribe, temp);
+ _menuStringsDrop2 = _staticres->loadStrings(kEoBBaseMenuStringsDrop2, temp);
+ _menuStringsHead = _staticres->loadStrings(kEoBBaseMenuStringsHead, temp);
+ _menuStringsPoison = _staticres->loadStrings(kEoBBaseMenuStringsPoison, temp);
+ _menuStringsMgc = _staticres->loadStrings(kEoBBaseMenuStringsMgc, temp);
+ _menuStringsPrefs = _staticres->loadStrings(kEoBBaseMenuStringsPrefs, temp);
+ _menuStringsRest2 = _staticres->loadStrings(kEoBBaseMenuStringsRest2, temp);
+ _menuStringsRest3 = _staticres->loadStrings(kEoBBaseMenuStringsRest3, temp);
+ _menuStringsRest4 = _staticres->loadStrings(kEoBBaseMenuStringsRest4, temp);
+ _menuStringsDefeat = _staticres->loadStrings(kEoBBaseMenuStringsDefeat, temp);
+ _menuStringsTransfer = _staticres->loadStrings(kEoBBaseMenuStringsTransfer, temp);
+ _menuStringsSpec = _staticres->loadStrings(kEoBBaseMenuStringsSpec, temp);
+ _menuStringsSpellNo = _staticres->loadStrings(kEoBBaseMenuStringsSpellNo, temp);
+ _menuYesNoStrings = _staticres->loadStrings(kEoBBaseMenuYesNoStrings, temp);
+
+ _spellLevelsMage = _staticres->loadRawData(kEoBBaseSpellLevelsMage, _spellLevelsMageSize);
+ _spellLevelsCleric = _staticres->loadRawData(kEoBBaseSpellLevelsCleric, _spellLevelsClericSize);
+ _numSpellsCleric = _staticres->loadRawData(kEoBBaseNumSpellsCleric, temp);
+ _numSpellsWisAdj = _staticres->loadRawData(kEoBBaseNumSpellsWisAdj, temp);
+ _numSpellsPal = _staticres->loadRawData(kEoBBaseNumSpellsPal, temp);
+ _numSpellsMage = _staticres->loadRawData(kEoBBaseNumSpellsMage, temp);
+
+ _characterGuiStringsHp = _staticres->loadStrings(kEoBBaseCharGuiStringsHp, temp);
+ _characterGuiStringsWp = _staticres->loadStrings(_flags.gameID == GI_EOB2 ? kEoBBaseCharGuiStringsWp2 : kEoBBaseCharGuiStringsWp1, temp);
+ _characterGuiStringsWr = _staticres->loadStrings(kEoBBaseCharGuiStringsWr, temp);
+ _characterGuiStringsSt = _staticres->loadStrings(_flags.gameID == GI_EOB2 ? kEoBBaseCharGuiStringsSt2 : kEoBBaseCharGuiStringsSt1, temp);
+ _characterGuiStringsIn = _staticres->loadStrings(kEoBBaseCharGuiStringsIn, temp);
+
+ _characterStatusStrings7 = _staticres->loadStrings(kEoBBaseCharStatusStrings7, temp);
+ _characterStatusStrings8 = _staticres->loadStrings(_flags.gameID == GI_EOB2 ? kEoBBaseCharStatusStrings82 : kEoBBaseCharStatusStrings81, temp);
+ _characterStatusStrings9 = _staticres->loadStrings(kEoBBaseCharStatusStrings9, temp);
+ _characterStatusStrings12 = _staticres->loadStrings(kEoBBaseCharStatusStrings12, temp);
+ _characterStatusStrings13 = _staticres->loadStrings(_flags.gameID == GI_EOB2 ? kEoBBaseCharStatusStrings132 : kEoBBaseCharStatusStrings131, temp);
+
+ _levelGainStrings = _staticres->loadStrings(kEoBBaseLevelGainStrings, temp);
for (int i = 0; i < 5; i++)
- _expRequirementTables[i] = _staticres->loadRawDataBe32(kEobBaseExperienceTable0 + i, temp);
- _expRequirementTables[5] = _staticres->loadRawDataBe32(kEobBaseExperienceTable4, temp);
-
- _classModifierFlags = _staticres->loadRawData(kEobBaseClassModifierFlags, temp);
-
- _saveThrowTables[0] = _saveThrowTables[4] = _saveThrowTables[5] = _staticres->loadRawData(kEobBaseSaveThrowTable1, temp);
- _saveThrowTables[1] = _staticres->loadRawData(kEobBaseSaveThrowTable2, temp);
- _saveThrowTables[2] = _staticres->loadRawData(kEobBaseSaveThrowTable3, temp);
- _saveThrowTables[3] = _staticres->loadRawData(kEobBaseSaveThrowTable4, temp);
- _saveThrowLevelIndex = _staticres->loadRawData(kEobBaseSaveThrwLvlIndex, temp);
- _saveThrowModDiv = _staticres->loadRawData(kEobBaseSaveThrwModDiv, temp);
- _saveThrowModExt = _staticres->loadRawData(kEobBaseSaveThrwModExt, temp);
-
- _encodeMonsterShpTable = _staticres->loadRawDataBe16(kEobBaseEncodeMonsterDefs, temp);
- _npcPreset = _staticres->loadEobNpcData(kEobBaseNpcPresets, temp);
-
- _teleporterShapeCoords = _staticres->loadRawData(kEobBaseDscTelptrShpCoords, temp);
- _portalSeq = (const int8*)_staticres->loadRawData(kEobBasePortalSeqData, temp);
- _mnDef = _staticres->loadRawData(kEobBaseManDef, temp);
- _mnWord = _staticres->loadStrings(kEobBaseManWord, _mnNumWord);
- _mnPrompt = _staticres->loadStrings(kEobBaseManPrompt, temp);
-
- _monsterStepTable0 = (int8*) _staticres->loadRawData(_flags.gameID == GI_EOB2 ? kEobBaseMonsterStepTable02 : kEobBaseMonsterStepTable01, temp);
- _monsterStepTable1 = (int8*)_staticres->loadRawData(kEobBaseMonsterStepTable1, temp);
- _monsterStepTable2 = (int8*)_staticres->loadRawData(kEobBaseMonsterStepTable2, temp);
- _monsterStepTable3 = (int8*)_staticres->loadRawData(kEobBaseMonsterStepTable3, temp);
- _monsterCloseAttPosTable1 = _staticres->loadRawData(kEobBaseMonsterCloseAttPosTable1, temp);
- _monsterCloseAttPosTable2 = _staticres->loadRawData(_flags.gameID == GI_EOB2 ? kEobBaseMonsterCloseAttPosTable22 : kEobBaseMonsterCloseAttPosTable21, temp);
- _monsterCloseAttUnkTable = (int8*)_staticres->loadRawData(kEobBaseMonsterCloseAttUnkTable, temp);
- _monsterCloseAttChkTable1 = _staticres->loadRawData(kEobBaseMonsterCloseAttChkTable1, temp);
- _monsterCloseAttChkTable2 = _staticres->loadRawData(kEobBaseMonsterCloseAttChkTable2, temp);
- _monsterCloseAttDstTable1 = _staticres->loadRawData(kEobBaseMonsterCloseAttDstTable1, temp);
- _monsterCloseAttDstTable2 = _staticres->loadRawData(kEobBaseMonsterCloseAttDstTable2, temp);
-
- _monsterProximityTable = _staticres->loadRawData(kEobBaseMonsterProximityTable, temp);
- _findBlockMonstersTable = _staticres->loadRawData(kEobBaseFindBlockMonstersTable, temp);
- _monsterDirChangeTable = (const int8*)_staticres->loadRawData(kEobBaseMonsterDirChangeTable, temp);
- _monsterSpecAttStrings = _staticres->loadStrings(kEobBaseMonsterDistAttStrings, temp);
-
- _monsterFrmOffsTable1 = (const int8*)_staticres->loadRawData(kEobBaseDscMonsterFrmOffsTbl1, temp);
- _monsterFrmOffsTable2 = (const int8*)_staticres->loadRawData(kEobBaseDscMonsterFrmOffsTbl2, temp);
-
- _inventorySlotsX = _staticres->loadRawDataBe16(kEobBaseInvSlotX, temp);
- _inventorySlotsY = _staticres->loadRawData(kEobBaseInvSlotY, temp);
- _slotValidationFlags = _staticres->loadRawDataBe16(kEobBaseSlotValidationFlags, temp);
-
- _projectileWeaponAmmoTypes = (const int8*)_staticres->loadRawData(kEobBaseProjectileWeaponTypes, temp);
- _wandTypes = _staticres->loadRawData(kEobBaseWandTypes, temp);
-
- _drawObjPosIndex = _staticres->loadRawData(kEobBaseDrawObjPosIndex, temp);
- _flightObjFlipIndex = _staticres->loadRawData(kEobBaseFlightObjFlipIndex, temp);
- _flightObjShpMap = (const int8*)_staticres->loadRawData(kEobBaseFlightObjShpMap, temp);
- _flightObjSclIndex = (const int8*)_staticres->loadRawData(kEobBaseFlightObjSclIndex, temp);
-
- _wllFlagPreset = _staticres->loadRawData(kEobBaseWllFlagPreset, _wllFlagPresetSize);
- _dscShapeCoords = (const int16*)_staticres->loadRawDataBe16(kEobBaseDscShapeCoords, temp);
-
- _dscDoorScaleOffs = _staticres->loadRawData(kEobBaseDscDoorScaleOffs, temp);
- _dscDoorScaleMult1 = _staticres->loadRawData(kEobBaseDscDoorScaleMult1, temp);
- _dscDoorScaleMult2 = _staticres->loadRawData(kEobBaseDscDoorScaleMult2, temp);
- _dscDoorScaleMult3 = _staticres->loadRawData(kEobBaseDscDoorScaleMult3, temp);
- _dscDoorY1 = _staticres->loadRawData(kEobBaseDscDoorY1, temp);
- _dscDoorXE = _staticres->loadRawData(kEobBaseDscDoorXE, temp);
-
- _dscItemPosIndex= _staticres->loadRawData(kEobBaseDscItemPosIndex, temp);
- _dscItemShpX = (const int16*)_staticres->loadRawDataBe16(kEobBaseDscItemShpX, temp);
- _dscItemScaleIndex = _staticres->loadRawData(kEobBaseDscItemScaleIndex, temp);
- _dscItemTileIndex = _staticres->loadRawData(kEobBaseDscItemTileIndex, temp);
- _dscItemShapeMap = _staticres->loadRawData(kEobBaseDscItemShapeMap, temp);
-
- _bookNumbers = _staticres->loadStrings(kEobBaseBookNumbers, temp);
- _mageSpellList = _staticres->loadStrings(kEobBaseMageSpellsList, _mageSpellListSize);
- _clericSpellList = _staticres->loadStrings(kEobBaseClericSpellsList, temp);
- _spellNames = _staticres->loadStrings(kEobBaseSpellNames, temp);
-
- _magicStrings1 = _staticres->loadStrings(kEobBaseMagicStrings1, temp);
- _magicStrings2 = _staticres->loadStrings(kEobBaseMagicStrings2, temp);
- _magicStrings3 = _staticres->loadStrings(kEobBaseMagicStrings3, temp);
- _magicStrings4 = _staticres->loadStrings(kEobBaseMagicStrings4, temp);
- _magicStrings6 = _staticres->loadStrings(kEobBaseMagicStrings6, temp);
- _magicStrings7 = _staticres->loadStrings(kEobBaseMagicStrings7, temp);
- _magicStrings8 = _staticres->loadStrings(kEobBaseMagicStrings8, temp);
-
- _expObjectTlMode = _staticres->loadRawData(kEobBaseExpObjectTlMode, temp);
- _expObjectTblIndex = _staticres->loadRawData(kEobBaseExpObjectTblIndex, temp);
- _expObjectShpStart = _staticres->loadRawData(kEobBaseExpObjectShpStart, temp);
- _expObjectAnimTbl1 = _staticres->loadRawData(kEobBaseExpObjectTbl1, _expObjectAnimTbl1Size);
- _expObjectAnimTbl2 = _staticres->loadRawData(kEobBaseExpObjectTbl2, _expObjectAnimTbl2Size);
- _expObjectAnimTbl3 = _staticres->loadRawData(kEobBaseExpObjectTbl3, _expObjectAnimTbl3Size);
-
- _sparkEffectDefSteps = _staticres->loadRawData(kEobBaseSparkDefSteps, temp);
- _sparkEffectDefSubSteps = _staticres->loadRawData(kEobBaseSparkDefSubSteps, temp);
- _sparkEffectDefShift = _staticres->loadRawData(kEobBaseSparkDefShift, temp);
- _sparkEffectDefAdd = _staticres->loadRawData(kEobBaseSparkDefAdd, temp);
- _sparkEffectDefX = _staticres->loadRawData(kEobBaseSparkDefX, temp);
- _sparkEffectDefY = _staticres->loadRawData(kEobBaseSparkDefY, temp);
- _sparkEffectOfFlags1 = _staticres->loadRawDataBe32(kEobBaseSparkOfFlags1, temp);
- _sparkEffectOfFlags2 = _staticres->loadRawDataBe32(kEobBaseSparkOfFlags2, temp);
- _sparkEffectOfShift = _staticres->loadRawData(kEobBaseSparkOfShift, temp);
- _sparkEffectOfX = _staticres->loadRawData(kEobBaseSparkOfX, temp);
- _sparkEffectOfY = _staticres->loadRawData(kEobBaseSparkOfY, temp);
- _magicFlightObjectProperties = _staticres->loadRawData(kEobBaseMagicFlightProps, temp);
- _turnUndeadEffect = _staticres->loadRawData(kEobBaseTurnUndeadEffect, temp);
- _burningHandsDest = _staticres->loadRawData(kEobBaseBurningHandsDest, temp);
- _coneOfColdDest1 = (const int8*)_staticres->loadRawData(kEobBaseConeOfColdDest1, temp);
- _coneOfColdDest2 = (const int8*)_staticres->loadRawData(kEobBaseConeOfColdDest2, temp);
- _coneOfColdDest3 = (const int8*)_staticres->loadRawData(kEobBaseConeOfColdDest3, temp);
- _coneOfColdDest4 = (const int8*)_staticres->loadRawData(kEobBaseConeOfColdDest4, temp);
- _coneOfColdGfxTbl = _staticres->loadRawData(kEobBaseConeOfColdGfxTbl, _coneOfColdGfxTblSize);
+ _expRequirementTables[i] = _staticres->loadRawDataBe32(kEoBBaseExperienceTable0 + i, temp);
+ _expRequirementTables[5] = _staticres->loadRawDataBe32(kEoBBaseExperienceTable4, temp);
+
+ _classModifierFlags = _staticres->loadRawData(kEoBBaseClassModifierFlags, temp);
+
+ _saveThrowTables[0] = _saveThrowTables[4] = _saveThrowTables[5] = _staticres->loadRawData(kEoBBaseSaveThrowTable1, temp);
+ _saveThrowTables[1] = _staticres->loadRawData(kEoBBaseSaveThrowTable2, temp);
+ _saveThrowTables[2] = _staticres->loadRawData(kEoBBaseSaveThrowTable3, temp);
+ _saveThrowTables[3] = _staticres->loadRawData(kEoBBaseSaveThrowTable4, temp);
+ _saveThrowLevelIndex = _staticres->loadRawData(kEoBBaseSaveThrwLvlIndex, temp);
+ _saveThrowModDiv = _staticres->loadRawData(kEoBBaseSaveThrwModDiv, temp);
+ _saveThrowModExt = _staticres->loadRawData(kEoBBaseSaveThrwModExt, temp);
+
+ _encodeMonsterShpTable = _staticres->loadRawDataBe16(kEoBBaseEncodeMonsterDefs, temp);
+ _npcPreset = _staticres->loadEoBNpcData(kEoBBaseNpcPresets, temp);
+
+ _teleporterShapeCoords = _staticres->loadRawData(kEoBBaseDscTelptrShpCoords, temp);
+ _portalSeq = (const int8*)_staticres->loadRawData(kEoBBasePortalSeqData, temp);
+ _mnDef = _staticres->loadRawData(kEoBBaseManDef, temp);
+ _mnWord = _staticres->loadStrings(kEoBBaseManWord, _mnNumWord);
+ _mnPrompt = _staticres->loadStrings(kEoBBaseManPrompt, temp);
+
+ _monsterStepTable0 = (int8*) _staticres->loadRawData(_flags.gameID == GI_EOB2 ? kEoBBaseMonsterStepTable02 : kEoBBaseMonsterStepTable01, temp);
+ _monsterStepTable1 = (int8*)_staticres->loadRawData(kEoBBaseMonsterStepTable1, temp);
+ _monsterStepTable2 = (int8*)_staticres->loadRawData(kEoBBaseMonsterStepTable2, temp);
+ _monsterStepTable3 = (int8*)_staticres->loadRawData(kEoBBaseMonsterStepTable3, temp);
+ _monsterCloseAttPosTable1 = _staticres->loadRawData(kEoBBaseMonsterCloseAttPosTable1, temp);
+ _monsterCloseAttPosTable2 = _staticres->loadRawData(_flags.gameID == GI_EOB2 ? kEoBBaseMonsterCloseAttPosTable22 : kEoBBaseMonsterCloseAttPosTable21, temp);
+ _monsterCloseAttUnkTable = (int8*)_staticres->loadRawData(kEoBBaseMonsterCloseAttUnkTable, temp);
+ _monsterCloseAttChkTable1 = _staticres->loadRawData(kEoBBaseMonsterCloseAttChkTable1, temp);
+ _monsterCloseAttChkTable2 = _staticres->loadRawData(kEoBBaseMonsterCloseAttChkTable2, temp);
+ _monsterCloseAttDstTable1 = _staticres->loadRawData(kEoBBaseMonsterCloseAttDstTable1, temp);
+ _monsterCloseAttDstTable2 = _staticres->loadRawData(kEoBBaseMonsterCloseAttDstTable2, temp);
+
+ _monsterProximityTable = _staticres->loadRawData(kEoBBaseMonsterProximityTable, temp);
+ _findBlockMonstersTable = _staticres->loadRawData(kEoBBaseFindBlockMonstersTable, temp);
+ _monsterDirChangeTable = (const int8*)_staticres->loadRawData(kEoBBaseMonsterDirChangeTable, temp);
+ _monsterSpecAttStrings = _staticres->loadStrings(kEoBBaseMonsterDistAttStrings, temp);
+
+ _monsterFrmOffsTable1 = (const int8*)_staticres->loadRawData(kEoBBaseDscMonsterFrmOffsTbl1, temp);
+ _monsterFrmOffsTable2 = (const int8*)_staticres->loadRawData(kEoBBaseDscMonsterFrmOffsTbl2, temp);
+
+ _inventorySlotsX = _staticres->loadRawDataBe16(kEoBBaseInvSlotX, temp);
+ _inventorySlotsY = _staticres->loadRawData(kEoBBaseInvSlotY, temp);
+ _slotValidationFlags = _staticres->loadRawDataBe16(kEoBBaseSlotValidationFlags, temp);
+
+ _projectileWeaponAmmoTypes = (const int8*)_staticres->loadRawData(kEoBBaseProjectileWeaponTypes, temp);
+ _wandTypes = _staticres->loadRawData(kEoBBaseWandTypes, temp);
+
+ _drawObjPosIndex = _staticres->loadRawData(kEoBBaseDrawObjPosIndex, temp);
+ _flightObjFlipIndex = _staticres->loadRawData(kEoBBaseFlightObjFlipIndex, temp);
+ _flightObjShpMap = (const int8*)_staticres->loadRawData(kEoBBaseFlightObjShpMap, temp);
+ _flightObjSclIndex = (const int8*)_staticres->loadRawData(kEoBBaseFlightObjSclIndex, temp);
+
+ _wllFlagPreset = _staticres->loadRawData(kEoBBaseWllFlagPreset, _wllFlagPresetSize);
+ _dscShapeCoords = (const int16*)_staticres->loadRawDataBe16(kEoBBaseDscShapeCoords, temp);
+
+ _dscDoorScaleOffs = _staticres->loadRawData(kEoBBaseDscDoorScaleOffs, temp);
+ _dscDoorScaleMult1 = _staticres->loadRawData(kEoBBaseDscDoorScaleMult1, temp);
+ _dscDoorScaleMult2 = _staticres->loadRawData(kEoBBaseDscDoorScaleMult2, temp);
+ _dscDoorScaleMult3 = _staticres->loadRawData(kEoBBaseDscDoorScaleMult3, temp);
+ _dscDoorY1 = _staticres->loadRawData(kEoBBaseDscDoorY1, temp);
+ _dscDoorXE = _staticres->loadRawData(kEoBBaseDscDoorXE, temp);
+
+ _dscItemPosIndex= _staticres->loadRawData(kEoBBaseDscItemPosIndex, temp);
+ _dscItemShpX = (const int16*)_staticres->loadRawDataBe16(kEoBBaseDscItemShpX, temp);
+ _dscItemScaleIndex = _staticres->loadRawData(kEoBBaseDscItemScaleIndex, temp);
+ _dscItemTileIndex = _staticres->loadRawData(kEoBBaseDscItemTileIndex, temp);
+ _dscItemShapeMap = _staticres->loadRawData(kEoBBaseDscItemShapeMap, temp);
+
+ _bookNumbers = _staticres->loadStrings(kEoBBaseBookNumbers, temp);
+ _mageSpellList = _staticres->loadStrings(kEoBBaseMageSpellsList, _mageSpellListSize);
+ _clericSpellList = _staticres->loadStrings(kEoBBaseClericSpellsList, temp);
+ _spellNames = _staticres->loadStrings(kEoBBaseSpellNames, temp);
+
+ _magicStrings1 = _staticres->loadStrings(kEoBBaseMagicStrings1, temp);
+ _magicStrings2 = _staticres->loadStrings(kEoBBaseMagicStrings2, temp);
+ _magicStrings3 = _staticres->loadStrings(kEoBBaseMagicStrings3, temp);
+ _magicStrings4 = _staticres->loadStrings(kEoBBaseMagicStrings4, temp);
+ _magicStrings6 = _staticres->loadStrings(kEoBBaseMagicStrings6, temp);
+ _magicStrings7 = _staticres->loadStrings(kEoBBaseMagicStrings7, temp);
+ _magicStrings8 = _staticres->loadStrings(kEoBBaseMagicStrings8, temp);
+
+ _expObjectTlMode = _staticres->loadRawData(kEoBBaseExpObjectTlMode, temp);
+ _expObjectTblIndex = _staticres->loadRawData(kEoBBaseExpObjectTblIndex, temp);
+ _expObjectShpStart = _staticres->loadRawData(kEoBBaseExpObjectShpStart, temp);
+ _expObjectAnimTbl1 = _staticres->loadRawData(kEoBBaseExpObjectTbl1, _expObjectAnimTbl1Size);
+ _expObjectAnimTbl2 = _staticres->loadRawData(kEoBBaseExpObjectTbl2, _expObjectAnimTbl2Size);
+ _expObjectAnimTbl3 = _staticres->loadRawData(kEoBBaseExpObjectTbl3, _expObjectAnimTbl3Size);
+
+ _sparkEffectDefSteps = _staticres->loadRawData(kEoBBaseSparkDefSteps, temp);
+ _sparkEffectDefSubSteps = _staticres->loadRawData(kEoBBaseSparkDefSubSteps, temp);
+ _sparkEffectDefShift = _staticres->loadRawData(kEoBBaseSparkDefShift, temp);
+ _sparkEffectDefAdd = _staticres->loadRawData(kEoBBaseSparkDefAdd, temp);
+ _sparkEffectDefX = _staticres->loadRawData(kEoBBaseSparkDefX, temp);
+ _sparkEffectDefY = _staticres->loadRawData(kEoBBaseSparkDefY, temp);
+ _sparkEffectOfFlags1 = _staticres->loadRawDataBe32(kEoBBaseSparkOfFlags1, temp);
+ _sparkEffectOfFlags2 = _staticres->loadRawDataBe32(kEoBBaseSparkOfFlags2, temp);
+ _sparkEffectOfShift = _staticres->loadRawData(kEoBBaseSparkOfShift, temp);
+ _sparkEffectOfX = _staticres->loadRawData(kEoBBaseSparkOfX, temp);
+ _sparkEffectOfY = _staticres->loadRawData(kEoBBaseSparkOfY, temp);
+ _magicFlightObjectProperties = _staticres->loadRawData(kEoBBaseMagicFlightProps, temp);
+ _turnUndeadEffect = _staticres->loadRawData(kEoBBaseTurnUndeadEffect, temp);
+ _burningHandsDest = _staticres->loadRawData(kEoBBaseBurningHandsDest, temp);
+ _coneOfColdDest1 = (const int8*)_staticres->loadRawData(kEoBBaseConeOfColdDest1, temp);
+ _coneOfColdDest2 = (const int8*)_staticres->loadRawData(kEoBBaseConeOfColdDest2, temp);
+ _coneOfColdDest3 = (const int8*)_staticres->loadRawData(kEoBBaseConeOfColdDest3, temp);
+ _coneOfColdDest4 = (const int8*)_staticres->loadRawData(kEoBBaseConeOfColdDest4, temp);
+ _coneOfColdGfxTbl = _staticres->loadRawData(kEoBBaseConeOfColdGfxTbl, _coneOfColdGfxTblSize);
// Hard code the following strings, since EOB I doesn't have them in the original.
// EOB I doesn't have load and save menus, because there is only one single
@@ -485,8 +485,8 @@ void EobCoreEngine::initStaticResource() {
_menuOkString = "OK";
}
-void EobCoreEngine::initButtonData() {
- static const EobGuiButtonDef buttonDefs[] = {
+void EoBCoreEngine::initButtonData() {
+ static const EoBGuiButtonDef buttonDefs[] = {
{ 112, 0, 0x1100, 184, 2, 63, 50, 0 },
{ 113, 0, 0x1100, 256, 2, 63, 50, 1 },
{ 114, 0, 0x1100, 184, 54, 63, 50, 2 },
@@ -596,7 +596,7 @@ void EobCoreEngine::initButtonData() {
_buttonCallbacks.clear();
_buttonCallbacks.reserve(ARRAYSIZE(buttonDefs));
-#define EOB_CBN(x, y) _buttonCallbacks.push_back(BUTTON_FUNCTOR(EobCoreEngine, this, &EobCoreEngine::y)); for (int l = 0; l < (x - 1); l++) { _buttonCallbacks.push_back(_buttonCallbacks[_buttonCallbacks.size() - 1 - l]); }
+#define EOB_CBN(x, y) _buttonCallbacks.push_back(BUTTON_FUNCTOR(EoBCoreEngine, this, &EoBCoreEngine::y)); for (int l = 0; l < (x - 1); l++) { _buttonCallbacks.push_back(_buttonCallbacks[_buttonCallbacks.size() - 1 - l]); }
#define EOB_CBI(x, y) for (int l = x; l; l--) { _buttonCallbacks.push_back(_buttonCallbacks[y]); }
EOB_CBN(4, clickedCharPortraitDefault);
EOB_CBN(1, clickedCamp);
@@ -640,8 +640,8 @@ void EobCoreEngine::initButtonData() {
#undef EOB_CBN
}
-void EobCoreEngine::initMenus() {
- static const EobMenuButtonDef buttonDefs[] = {
+void EoBCoreEngine::initMenus() {
+ static const EoBMenuButtonDef buttonDefs[] = {
{ 2, 12, 20, 158, 14, 20, 3 },
{ 3, 12, 37, 158, 14, 52, 3 },
{ 4, 12, 54, 158, 14, 26, 3 },
@@ -691,7 +691,7 @@ void EobCoreEngine::initMenus() {
_menuButtonDefs = buttonDefs;
- static const EobMenuDef menuDefs[] = {
+ static const EoBMenuDef menuDefs[] = {
{ 1, 10, 0, 7, 9 },
{ 1, 10, 7, 5, 9 },
{ 1, 10, 12, 3, 9 },
@@ -702,7 +702,7 @@ void EobCoreEngine::initMenus() {
};
delete[] _menuDefs;
- _menuDefs = new EobMenuDef[ARRAYSIZE(menuDefs)];
+ _menuDefs = new EoBMenuDef[ARRAYSIZE(menuDefs)];
memcpy(_menuDefs, menuDefs, sizeof(menuDefs));
if (_flags.gameID == GI_EOB1) {
@@ -713,7 +713,7 @@ void EobCoreEngine::initMenus() {
}
-void EobCoreEngine::initSpells() {
+void EoBCoreEngine::initSpells() {
#define mpn magicTimingParaAssign.push_back(0);
#define mp1n if (_flags.gameID == GI_EOB1) magicTimingParaAssign.push_back(0);
#define mp2n if (_flags.gameID == GI_EOB2) magicTimingParaAssign.push_back(0);
@@ -721,12 +721,12 @@ void EobCoreEngine::initSpells() {
#define mp1(x) if (_flags.gameID == GI_EOB1) magicTimingParaAssign.push_back(&magicTimingPara[x << 2]);
#define mp2(x) if (_flags.gameID == GI_EOB2) magicTimingParaAssign.push_back(&magicTimingPara[x << 2]);
-#define sc(x) startCallback.push_back(&EobCoreEngine::spellCallback_start_##x);
-#define sc1(x) if (_flags.gameID == GI_EOB1) startCallback.push_back(&EobCoreEngine::spellCallback_start_##x);
-#define sc2(x) if (_flags.gameID == GI_EOB2) startCallback.push_back(&EobCoreEngine::spellCallback_start_##x);
-#define ec(x) endCallback.push_back(&EobCoreEngine::spellCallback_end_##x);
-#define ec1(x) if (_flags.gameID == GI_EOB1) endCallback.push_back(&EobCoreEngine::spellCallback_end_##x);
-#define ec2(x) if (_flags.gameID == GI_EOB2) endCallback.push_back(&EobCoreEngine::spellCallback_end_##x);
+#define sc(x) startCallback.push_back(&EoBCoreEngine::spellCallback_start_##x);
+#define sc1(x) if (_flags.gameID == GI_EOB1) startCallback.push_back(&EoBCoreEngine::spellCallback_start_##x);
+#define sc2(x) if (_flags.gameID == GI_EOB2) startCallback.push_back(&EoBCoreEngine::spellCallback_start_##x);
+#define ec(x) endCallback.push_back(&EoBCoreEngine::spellCallback_end_##x);
+#define ec1(x) if (_flags.gameID == GI_EOB1) endCallback.push_back(&EoBCoreEngine::spellCallback_end_##x);
+#define ec2(x) if (_flags.gameID == GI_EOB2) endCallback.push_back(&EoBCoreEngine::spellCallback_end_##x);
static const uint16 magicTimingPara[] = {
0, 546, 2, 1, // 0 detect magic
@@ -979,13 +979,13 @@ void EobCoreEngine::initSpells() {
ec2(monster_causeCriticalWounds);
ec2(monster_fleshToStone);
- _spells = new EobSpell[_numSpells];
- memset(_spells, 0, _numSpells * sizeof(EobSpell));
+ _spells = new EoBSpell[_numSpells];
+ memset(_spells, 0, _numSpells * sizeof(EoBSpell));
for (int i = 0, n = 0; i < _numSpells; i++, n++) {
- EobSpell *s = &_spells[i];
+ EoBSpell *s = &_spells[i];
- // Fix Eob 1 spell names
+ // Fix EoB 1 spell names
bool skip = false;
if (i == 5 || i == 9) {
n--;
@@ -1018,67 +1018,67 @@ void EobCoreEngine::initSpells() {
#undef ec2
}
-void EobEngine::initStaticResource() {
+void EoBEngine::initStaticResource() {
int temp;
- _mainMenuStrings = _staticres->loadStrings(kEob1MainMenuStrings, temp);
- _finBonusStrings = _staticres->loadStrings(kEob1BonusStrings, temp);
-
- _introFilesOpening = _staticres->loadStrings(kEob1IntroFilesOpening, temp);
- _introFilesTower = _staticres->loadStrings(kEob1IntroFilesTower, temp);
- _introFilesOrb = _staticres->loadStrings(kEob1IntroFilesOrb, temp);
- _introFilesWdEntry = _staticres->loadStrings(kEob1IntroFilesWdEntry, temp);
- _introFilesKing = _staticres->loadStrings(kEob1IntroFilesKing, temp);
- _introFilesHands = _staticres->loadStrings(kEob1IntroFilesHands, temp);
- _introFilesWdExit = _staticres->loadStrings(kEob1IntroFilesWdExit, temp);
- _introFilesTunnel = _staticres->loadStrings(kEob1IntroFilesTunnel, temp);
- _introOpeningFrmDelay = _staticres->loadRawData(kEob1IntroOpeningFrmDelay, temp);
- _introWdEncodeX = _staticres->loadRawData(kEob1IntroWdEncodeX, temp);
- _introWdEncodeY = _staticres->loadRawData(kEob1IntroWdEncodeY, temp);
- _introWdEncodeWH = _staticres->loadRawData(kEob1IntroWdEncodeWH, temp);
- _introWdDsX = _staticres->loadRawDataBe16(kEob1IntroWdDsX, temp);
- _introWdDsY = _staticres->loadRawData(kEob1IntroWdDsY, temp);
- _introTvlX1 = _staticres->loadRawData(kEob1IntroTvlX1, temp);
- _introTvlY1 = _staticres->loadRawData(kEob1IntroTvlY1, temp);
- _introTvlX2 = _staticres->loadRawData(kEob1IntroTvlX2, temp);
- _introTvlY2 = _staticres->loadRawData(kEob1IntroTvlY2, temp);
- _introTvlW = _staticres->loadRawData(kEob1IntroTvlW, temp);
- _introTvlH = _staticres->loadRawData(kEob1IntroTvlH, temp);
-
- _doorShapeEncodeDefs = _staticres->loadRawData(kEob1DoorShapeDefs, temp);
- _doorSwitchShapeEncodeDefs = _staticres->loadRawData(kEob1DoorSwitchShapeDefs, temp);
- _doorSwitchCoords = _staticres->loadRawData(kEob1DoorSwitchCoords, temp);
-
- _dscDoorScaleMult4 = _staticres->loadRawData(kEobBaseDscDoorScaleMult4, temp);
- _dscDoorScaleMult5 = _staticres->loadRawData(kEobBaseDscDoorScaleMult5, temp);
- _dscDoorScaleMult6 = _staticres->loadRawData(kEobBaseDscDoorScaleMult6, temp);
- _dscDoorY3 = _staticres->loadRawData(kEobBaseDscDoorY3, temp);
- _dscDoorY4 = _staticres->loadRawData(kEobBaseDscDoorY4, temp);
- _dscDoorY5 = _staticres->loadRawData(kEobBaseDscDoorY5, temp);
- _dscDoorY6 = _staticres->loadRawData(kEobBaseDscDoorY6, temp);
- _dscDoorY7 = _staticres->loadRawData(kEobBaseDscDoorY7, temp);
- _dscDoorCoordsExt = (const int16*)_staticres->loadRawDataBe16(kEobBaseDscDoorCoordsExt, temp);
-
- _enemyMageSpellList = _staticres->loadRawData(kEob1EnemyMageSpellList, temp);
- _enemyMageSfx = _staticres->loadRawData(kEob1EnemyMageSfx, temp);
- _beholderSpellList = _staticres->loadRawData(kEob1BeholderSpellList, temp);
- _beholderSfx = _staticres->loadRawData(kEob1BeholderSfx, temp);
-
- _turnUndeadString = _staticres->loadStrings(kEob1TurnUndeadString, temp);
-
- _npcShpData = _staticres->loadRawData(kEob1NpcShpData, temp);
- _npcSubShpIndex1 = _staticres->loadRawData(kEob1NpcSubShpIndex1, temp);
- _npcSubShpIndex2 = _staticres->loadRawData(kEob1NpcSubShpIndex2, temp);
- _npcSubShpY = _staticres->loadRawData(kEob1NpcSubShpY, temp);
+ _mainMenuStrings = _staticres->loadStrings(kEoB1MainMenuStrings, temp);
+ _finBonusStrings = _staticres->loadStrings(kEoB1BonusStrings, temp);
+
+ _introFilesOpening = _staticres->loadStrings(kEoB1IntroFilesOpening, temp);
+ _introFilesTower = _staticres->loadStrings(kEoB1IntroFilesTower, temp);
+ _introFilesOrb = _staticres->loadStrings(kEoB1IntroFilesOrb, temp);
+ _introFilesWdEntry = _staticres->loadStrings(kEoB1IntroFilesWdEntry, temp);
+ _introFilesKing = _staticres->loadStrings(kEoB1IntroFilesKing, temp);
+ _introFilesHands = _staticres->loadStrings(kEoB1IntroFilesHands, temp);
+ _introFilesWdExit = _staticres->loadStrings(kEoB1IntroFilesWdExit, temp);
+ _introFilesTunnel = _staticres->loadStrings(kEoB1IntroFilesTunnel, temp);
+ _introOpeningFrmDelay = _staticres->loadRawData(kEoB1IntroOpeningFrmDelay, temp);
+ _introWdEncodeX = _staticres->loadRawData(kEoB1IntroWdEncodeX, temp);
+ _introWdEncodeY = _staticres->loadRawData(kEoB1IntroWdEncodeY, temp);
+ _introWdEncodeWH = _staticres->loadRawData(kEoB1IntroWdEncodeWH, temp);
+ _introWdDsX = _staticres->loadRawDataBe16(kEoB1IntroWdDsX, temp);
+ _introWdDsY = _staticres->loadRawData(kEoB1IntroWdDsY, temp);
+ _introTvlX1 = _staticres->loadRawData(kEoB1IntroTvlX1, temp);
+ _introTvlY1 = _staticres->loadRawData(kEoB1IntroTvlY1, temp);
+ _introTvlX2 = _staticres->loadRawData(kEoB1IntroTvlX2, temp);
+ _introTvlY2 = _staticres->loadRawData(kEoB1IntroTvlY2, temp);
+ _introTvlW = _staticres->loadRawData(kEoB1IntroTvlW, temp);
+ _introTvlH = _staticres->loadRawData(kEoB1IntroTvlH, temp);
+
+ _doorShapeEncodeDefs = _staticres->loadRawData(kEoB1DoorShapeDefs, temp);
+ _doorSwitchShapeEncodeDefs = _staticres->loadRawData(kEoB1DoorSwitchShapeDefs, temp);
+ _doorSwitchCoords = _staticres->loadRawData(kEoB1DoorSwitchCoords, temp);
+
+ _dscDoorScaleMult4 = _staticres->loadRawData(kEoBBaseDscDoorScaleMult4, temp);
+ _dscDoorScaleMult5 = _staticres->loadRawData(kEoBBaseDscDoorScaleMult5, temp);
+ _dscDoorScaleMult6 = _staticres->loadRawData(kEoBBaseDscDoorScaleMult6, temp);
+ _dscDoorY3 = _staticres->loadRawData(kEoBBaseDscDoorY3, temp);
+ _dscDoorY4 = _staticres->loadRawData(kEoBBaseDscDoorY4, temp);
+ _dscDoorY5 = _staticres->loadRawData(kEoBBaseDscDoorY5, temp);
+ _dscDoorY6 = _staticres->loadRawData(kEoBBaseDscDoorY6, temp);
+ _dscDoorY7 = _staticres->loadRawData(kEoBBaseDscDoorY7, temp);
+ _dscDoorCoordsExt = (const int16*)_staticres->loadRawDataBe16(kEoBBaseDscDoorCoordsExt, temp);
+
+ _enemyMageSpellList = _staticres->loadRawData(kEoB1EnemyMageSpellList, temp);
+ _enemyMageSfx = _staticres->loadRawData(kEoB1EnemyMageSfx, temp);
+ _beholderSpellList = _staticres->loadRawData(kEoB1BeholderSpellList, temp);
+ _beholderSfx = _staticres->loadRawData(kEoB1BeholderSfx, temp);
+
+ _turnUndeadString = _staticres->loadStrings(kEoB1TurnUndeadString, temp);
+
+ _npcShpData = _staticres->loadRawData(kEoB1NpcShpData, temp);
+ _npcSubShpIndex1 = _staticres->loadRawData(kEoB1NpcSubShpIndex1, temp);
+ _npcSubShpIndex2 = _staticres->loadRawData(kEoB1NpcSubShpIndex2, temp);
+ _npcSubShpY = _staticres->loadRawData(kEoB1NpcSubShpY, temp);
for (int i = 0; i < 11; i++)
- _npcStrings[i] = _staticres->loadStrings(kEob1Npc0Strings + i, temp);
+ _npcStrings[i] = _staticres->loadStrings(kEoB1Npc0Strings + i, temp);
- const uint8 *ps = _staticres->loadRawData(kEob1MonsterProperties, temp);
+ const uint8 *ps = _staticres->loadRawData(kEoB1MonsterProperties, temp);
temp /= 27;
- _monsterProps = new EobMonsterProperty[temp];
- memset(_monsterProps, 0, temp * sizeof(EobMonsterProperty));
+ _monsterProps = new EoBMonsterProperty[temp];
+ memset(_monsterProps, 0, temp * sizeof(EoBMonsterProperty));
// Convert EOB1 (hard coded) monster properties to EOB2 type monster properties.
for (int i = 0; i < temp; i++) {
- EobMonsterProperty *p = &_monsterProps[i];
+ EoBMonsterProperty *p = &_monsterProps[i];
p->armorClass = (int8)*ps++;
p->hitChance = (int8)*ps++;
p->level = (int8)*ps++;
@@ -1109,8 +1109,8 @@ void EobEngine::initStaticResource() {
}
}
-void EobEngine::initSpells() {
- EobCoreEngine::initSpells();
+void EoBEngine::initSpells() {
+ EoBCoreEngine::initSpells();
struct FlagTableEntry {
uint16 typeFlag;
@@ -1175,11 +1175,11 @@ void EobEngine::initSpells() {
};
int temp;
- const uint8 *src = _staticres->loadRawData(kEobBaseSpellProperties, temp);
+ const uint8 *src = _staticres->loadRawData(kEoBBaseSpellProperties, temp);
_clericSpellOffset -= 1;
for (int i = 0; i < _numSpells; i++) {
- EobSpell *s = &_spells[i];
+ EoBSpell *s = &_spells[i];
src += 4;
s->flags = flagTable[i].typeFlag;
s->damageFlags = flagTable[i].damageFlag;
@@ -1191,66 +1191,66 @@ void EobEngine::initSpells() {
void DarkMoonEngine::initStaticResource() {
int temp;
- _mainMenuStrings = _staticres->loadStrings(kEob2MainMenuStrings, temp);
- _transferConvertTable = _staticres->loadRawData(kEob2TransferConvertTable, temp);
- _transferExpTable = _staticres->loadRawDataBe32(kEob2TransferExpTable, temp);
+ _mainMenuStrings = _staticres->loadStrings(kEoB2MainMenuStrings, temp);
+ _transferConvertTable = _staticres->loadRawData(kEoB2TransferConvertTable, temp);
+ _transferExpTable = _staticres->loadRawDataBe32(kEoB2TransferExpTable, temp);
- _introStrings = _staticres->loadStrings(kEob2IntroStrings, temp);
- _cpsFilesIntro = _staticres->loadStrings(kEob2IntroCPSFiles, temp);
+ _introStrings = _staticres->loadStrings(kEoB2IntroStrings, temp);
+ _cpsFilesIntro = _staticres->loadStrings(kEoB2IntroCPSFiles, temp);
- _seqIntro = new const EobSequenceStep*[44];
+ _seqIntro = new const EoBSequenceStep*[44];
for (int i = 0; i < 44; i++)
- _seqIntro[i] = _staticres->loadEob2SeqData(kEob2IntroSeqData00 + i, temp);
+ _seqIntro[i] = _staticres->loadEoB2SeqData(kEoB2IntroSeqData00 + i, temp);
- _shapesIntro = new const EobShapeDef*[13];
- memset(_shapesIntro, 0, sizeof(EobShapeDef*) * 13);
- _shapesIntro[0] = _staticres->loadEob2ShapeData(kEob2IntroShapes00, temp);
- _shapesIntro[1] = _staticres->loadEob2ShapeData(kEob2IntroShapes01, temp);
- _shapesIntro[4] = _staticres->loadEob2ShapeData(kEob2IntroShapes04, temp);
- _shapesIntro[7] = _staticres->loadEob2ShapeData(kEob2IntroShapes07, temp);
+ _shapesIntro = new const EoBShapeDef*[13];
+ memset(_shapesIntro, 0, sizeof(EoBShapeDef*) * 13);
+ _shapesIntro[0] = _staticres->loadEoB2ShapeData(kEoB2IntroShapes00, temp);
+ _shapesIntro[1] = _staticres->loadEoB2ShapeData(kEoB2IntroShapes01, temp);
+ _shapesIntro[4] = _staticres->loadEoB2ShapeData(kEoB2IntroShapes04, temp);
+ _shapesIntro[7] = _staticres->loadEoB2ShapeData(kEoB2IntroShapes07, temp);
- _finaleStrings = _staticres->loadStrings(kEob2FinaleStrings, temp);
- _creditsData = _staticres->loadRawData(kEob2CreditsData, temp);
- _cpsFilesFinale = _staticres->loadStrings(kEob2FinaleCPSFiles, temp);
+ _finaleStrings = _staticres->loadStrings(kEoB2FinaleStrings, temp);
+ _creditsData = _staticres->loadRawData(kEoB2CreditsData, temp);
+ _cpsFilesFinale = _staticres->loadStrings(kEoB2FinaleCPSFiles, temp);
- _seqFinale = new const EobSequenceStep*[21];
+ _seqFinale = new const EoBSequenceStep*[21];
for (int i = 0; i < 21; i++)
- _seqFinale[i] = _staticres->loadEob2SeqData(kEob2FinaleSeqData00 + i, temp);
-
- _shapesFinale = new const EobShapeDef*[13];
- memset(_shapesFinale, 0, sizeof(EobShapeDef*) * 13);
- _shapesFinale[0] = _staticres->loadEob2ShapeData(kEob2FinaleShapes00, temp);
- _shapesFinale[3] = _staticres->loadEob2ShapeData(kEob2FinaleShapes03, temp);
- _shapesFinale[7] = _staticres->loadEob2ShapeData(kEob2FinaleShapes07, temp);
- _shapesFinale[9] = _staticres->loadEob2ShapeData(kEob2FinaleShapes09, temp);
- _shapesFinale[10] = _staticres->loadEob2ShapeData(kEob2FinaleShapes10, temp);
-
- _dscDoorType5Offs = _staticres->loadRawData(kEobBaseDscDoorType5Offs, temp);
-
- _npcShpData = _staticres->loadRawData(kEob2NpcShapeData, temp);
- _npcStrings[0] = _staticres->loadStrings(kEob2Npc1Strings, temp);
- _npcStrings[1] = _staticres->loadStrings(kEob2Npc2Strings, temp);
- _monsterDustStrings = _staticres->loadStrings(kEob2MonsterDustStrings, temp);
- _dreamSteps = (const int8*)_staticres->loadRawData(kEob2DreamSteps, temp);
- _kheldranStrings = _staticres->loadStrings(kEob2KheldranStrings, temp);
- _hornStrings = _staticres->loadStrings(kEob2HornStrings, temp);
- _hornSounds = _staticres->loadRawData(kEob2HornSounds, temp);
-
- _wallOfForceDsX = (const int16*)_staticres->loadRawDataBe16(kEob2WallOfForceDsX, temp);
- _wallOfForceDsY = _staticres->loadRawData(kEob2WallOfForceDsY, temp);
- _wallOfForceDsNumW = _staticres->loadRawData(kEob2WallOfForceNumW, temp);
- _wallOfForceDsNumH = _staticres->loadRawData(kEob2WallOfForceNumH, temp);
- _wallOfForceShpId = _staticres->loadRawData(kEob2WallOfForceShpId, temp);
+ _seqFinale[i] = _staticres->loadEoB2SeqData(kEoB2FinaleSeqData00 + i, temp);
+
+ _shapesFinale = new const EoBShapeDef*[13];
+ memset(_shapesFinale, 0, sizeof(EoBShapeDef*) * 13);
+ _shapesFinale[0] = _staticres->loadEoB2ShapeData(kEoB2FinaleShapes00, temp);
+ _shapesFinale[3] = _staticres->loadEoB2ShapeData(kEoB2FinaleShapes03, temp);
+ _shapesFinale[7] = _staticres->loadEoB2ShapeData(kEoB2FinaleShapes07, temp);
+ _shapesFinale[9] = _staticres->loadEoB2ShapeData(kEoB2FinaleShapes09, temp);
+ _shapesFinale[10] = _staticres->loadEoB2ShapeData(kEoB2FinaleShapes10, temp);
+
+ _dscDoorType5Offs = _staticres->loadRawData(kEoBBaseDscDoorType5Offs, temp);
+
+ _npcShpData = _staticres->loadRawData(kEoB2NpcShapeData, temp);
+ _npcStrings[0] = _staticres->loadStrings(kEoB2Npc1Strings, temp);
+ _npcStrings[1] = _staticres->loadStrings(kEoB2Npc2Strings, temp);
+ _monsterDustStrings = _staticres->loadStrings(kEoB2MonsterDustStrings, temp);
+ _dreamSteps = (const int8*)_staticres->loadRawData(kEoB2DreamSteps, temp);
+ _kheldranStrings = _staticres->loadStrings(kEoB2KheldranStrings, temp);
+ _hornStrings = _staticres->loadStrings(kEoB2HornStrings, temp);
+ _hornSounds = _staticres->loadRawData(kEoB2HornSounds, temp);
+
+ _wallOfForceDsX = (const int16*)_staticres->loadRawDataBe16(kEoB2WallOfForceDsX, temp);
+ _wallOfForceDsY = _staticres->loadRawData(kEoB2WallOfForceDsY, temp);
+ _wallOfForceDsNumW = _staticres->loadRawData(kEoB2WallOfForceNumW, temp);
+ _wallOfForceDsNumH = _staticres->loadRawData(kEoB2WallOfForceNumH, temp);
+ _wallOfForceShpId = _staticres->loadRawData(kEoB2WallOfForceShpId, temp);
}
void DarkMoonEngine::initSpells() {
- EobCoreEngine::initSpells();
+ EoBCoreEngine::initSpells();
int temp;
- const uint8 *src = _staticres->loadRawData(kEobBaseSpellProperties, temp);
+ const uint8 *src = _staticres->loadRawData(kEoBBaseSpellProperties, temp);
for (int i = 0; i < _numSpells; i++) {
- EobSpell *s = &_spells[i];
+ EoBSpell *s = &_spells[i];
src += 8;
s->flags = READ_LE_UINT16(src);
src += 10;
diff --git a/engines/kyra/staticres_lol.cpp b/engines/kyra/staticres_lol.cpp
index 44b82ceb00..3faef7b981 100644
--- a/engines/kyra/staticres_lol.cpp
+++ b/engines/kyra/staticres_lol.cpp
@@ -30,23 +30,23 @@
namespace Kyra {
const LoLCharacter *StaticResource::loadCharData(int id, int &entries) {
- return (const LoLCharacter *)getData(id, kLolCharData, entries);
+ return (const LoLCharacter *)getData(id, kLoLCharData, entries);
}
const SpellProperty *StaticResource::loadSpellData(int id, int &entries) {
- return (const SpellProperty *)getData(id, kLolSpellData, entries);
+ return (const SpellProperty *)getData(id, kLoLSpellData, entries);
}
const CompassDef *StaticResource::loadCompassData(int id, int &entries) {
- return (const CompassDef *)getData(id, kLolCompassData, entries);
+ return (const CompassDef *)getData(id, kLoLCompassData, entries);
}
const FlyingObjectShape *StaticResource::loadFlyingObjectData(int id, int &entries) {
- return (const FlyingObjectShape *)getData(id, kLolFlightShpData, entries);
+ return (const FlyingObjectShape *)getData(id, kLoLFlightShpData, entries);
}
const LoLButtonDef *StaticResource::loadButtonDefs(int id, int &entries) {
- return (const LoLButtonDef *)getData(id, kLolButtonData, entries);
+ return (const LoLButtonDef *)getData(id, kLoLButtonData, entries);
}
bool StaticResource::loadCharData(Common::SeekableReadStream &stream, void *&ptr, int &size) {
@@ -243,78 +243,78 @@ void LoLEngine::initStaticResource() {
return;
int tempSize;
- _pakFileList = _staticres->loadStrings(kLolIngamePakFiles, _pakFileListSize);
- _charDefaults = _staticres->loadCharData(kLolCharacterDefs, _charDefaultsSize);
- _ingameSoundIndex = (const uint16 *)_staticres->loadRawData(kLolIngameSfxIndex, tempSize);
- _musicTrackMap = _staticres->loadRawData(kLolMusicTrackMap, tempSize);
- _ingameGMSoundIndex = _staticres->loadRawData(kLolIngameGMSfxIndex, _ingameGMSoundIndexSize);
- _ingameMT32SoundIndex = _staticres->loadRawData(kLolIngameMT32SfxIndex, _ingameMT32SoundIndexSize);
- _ingamePCSpeakerSoundIndex = _staticres->loadRawData(kLolIngamePcSpkSfxIndex, _ingamePCSpeakerSoundIndexSize);
- _spellProperties = _staticres->loadSpellData(kLolSpellProperties, tempSize);
- _gameShapeMap = (const int8 *)_staticres->loadRawData(kLolGameShapeMap, tempSize);
- _sceneItemOffs = (const int8 *)_staticres->loadRawData(kLolSceneItemOffs, tempSize);
- _charInvIndex = _staticres->loadRawData(kLolCharInvIndex, tempSize);
- _charInvDefs = _staticres->loadRawData(kLolCharInvDefs, tempSize);
- _charDefsMan = _staticres->loadRawDataBe16(kLolCharDefsMan, tempSize);
- _charDefsWoman = _staticres->loadRawDataBe16(kLolCharDefsWoman, tempSize);
- _charDefsKieran = _staticres->loadRawDataBe16(kLolCharDefsKieran, tempSize);
- _charDefsAkshel = _staticres->loadRawDataBe16(kLolCharDefsAkshel, tempSize);
- _expRequirements = (const int32 *)_staticres->loadRawDataBe32(kLolExpRequirements, tempSize);
- _monsterModifiers = _staticres->loadRawDataBe16(kLolMonsterModifiers, tempSize);
- _monsterShiftOffs = (const int8 *)_staticres->loadRawData(kLolMonsterShiftOffsets, tempSize);
- _monsterDirFlags = _staticres->loadRawData(kLolMonsterDirFlags, tempSize);
- _monsterScaleX = _staticres->loadRawData(kLolMonsterScaleX, tempSize);
- _monsterScaleY = _staticres->loadRawData(kLolMonsterScaleY, tempSize);
- _monsterScaleWH = _staticres->loadRawDataBe16(kLolMonsterScaleWH, tempSize);
- _inventorySlotDesc = _staticres->loadRawDataBe16(kLolInventoryDesc, tempSize);
- _levelShpList = _staticres->loadStrings(kLolLevelShpList, tempSize);
- _levelDatList = _staticres->loadStrings(kLolLevelDatList, tempSize);
- _compassDefs = _staticres->loadCompassData(kLolCompassDefs, tempSize);
- _flyingItemShapes = _staticres->loadFlyingObjectData(kLolFlyingObjectShp, tempSize);
- _itemCost = _staticres->loadRawDataBe16(kLolItemPrices, tempSize);
- _stashSetupData = _staticres->loadRawData(kLolStashSetup, tempSize);
-
- _dscWalls = (const int8 *)_staticres->loadRawData(kLolDscWalls, tempSize);
-
- _dscOvlMap = _staticres->loadRawData(kLolDscOvlMap, tempSize);
- _dscShapeOvlIndex = _staticres->loadRawData(kLolDscOvlIndex, tempSize);
- _dscShapeScaleW = _staticres->loadRawDataBe16(kLolDscScaleWidthData, tempSize);
- _dscShapeScaleH = _staticres->loadRawDataBe16(kLolDscScaleHeightData, tempSize);
- _dscShapeY = (const int8 *)_staticres->loadRawData(kLolBaseDscY, tempSize);
-
- _dscDoorMonsterScaleTable = _staticres->loadRawDataBe16(kLolDscDoorScale, tempSize);
- _dscDoor4 = _staticres->loadRawDataBe16(kLolDscDoor4, tempSize);
- _dscDoorMonsterX = (const int16 *)_staticres->loadRawDataBe16(kLolDscDoorX, tempSize);
- _dscDoorMonsterY = (const int16 *)_staticres->loadRawDataBe16(kLolDscDoorY, tempSize);
-
- _scrollXTop = _staticres->loadRawData(kLolScrollXTop, tempSize);
- _scrollYTop = _staticres->loadRawData(kLolScrollYTop, tempSize);
- _scrollXBottom = _staticres->loadRawData(kLolScrollXBottom, tempSize);
- _scrollYBottom = _staticres->loadRawData(kLolScrollYBottom, tempSize);
-
- const char *const *tmpSndList = _staticres->loadStrings(kLolIngameSfxFiles, _ingameSoundListSize);
+ _pakFileList = _staticres->loadStrings(kLoLIngamePakFiles, _pakFileListSize);
+ _charDefaults = _staticres->loadCharData(kLoLCharacterDefs, _charDefaultsSize);
+ _ingameSoundIndex = (const uint16 *)_staticres->loadRawData(kLoLIngameSfxIndex, tempSize);
+ _musicTrackMap = _staticres->loadRawData(kLoLMusicTrackMap, tempSize);
+ _ingameGMSoundIndex = _staticres->loadRawData(kLoLIngameGMSfxIndex, _ingameGMSoundIndexSize);
+ _ingameMT32SoundIndex = _staticres->loadRawData(kLoLIngameMT32SfxIndex, _ingameMT32SoundIndexSize);
+ _ingamePCSpeakerSoundIndex = _staticres->loadRawData(kLoLIngamePcSpkSfxIndex, _ingamePCSpeakerSoundIndexSize);
+ _spellProperties = _staticres->loadSpellData(kLoLSpellProperties, tempSize);
+ _gameShapeMap = (const int8 *)_staticres->loadRawData(kLoLGameShapeMap, tempSize);
+ _sceneItemOffs = (const int8 *)_staticres->loadRawData(kLoLSceneItemOffs, tempSize);
+ _charInvIndex = _staticres->loadRawData(kLoLCharInvIndex, tempSize);
+ _charInvDefs = _staticres->loadRawData(kLoLCharInvDefs, tempSize);
+ _charDefsMan = _staticres->loadRawDataBe16(kLoLCharDefsMan, tempSize);
+ _charDefsWoman = _staticres->loadRawDataBe16(kLoLCharDefsWoman, tempSize);
+ _charDefsKieran = _staticres->loadRawDataBe16(kLoLCharDefsKieran, tempSize);
+ _charDefsAkshel = _staticres->loadRawDataBe16(kLoLCharDefsAkshel, tempSize);
+ _expRequirements = (const int32 *)_staticres->loadRawDataBe32(kLoLExpRequirements, tempSize);
+ _monsterModifiers = _staticres->loadRawDataBe16(kLoLMonsterModifiers, tempSize);
+ _monsterShiftOffs = (const int8 *)_staticres->loadRawData(kLoLMonsterShiftOffsets, tempSize);
+ _monsterDirFlags = _staticres->loadRawData(kLoLMonsterDirFlags, tempSize);
+ _monsterScaleX = _staticres->loadRawData(kLoLMonsterScaleX, tempSize);
+ _monsterScaleY = _staticres->loadRawData(kLoLMonsterScaleY, tempSize);
+ _monsterScaleWH = _staticres->loadRawDataBe16(kLoLMonsterScaleWH, tempSize);
+ _inventorySlotDesc = _staticres->loadRawDataBe16(kLoLInventoryDesc, tempSize);
+ _levelShpList = _staticres->loadStrings(kLoLLevelShpList, tempSize);
+ _levelDatList = _staticres->loadStrings(kLoLLevelDatList, tempSize);
+ _compassDefs = _staticres->loadCompassData(kLoLCompassDefs, tempSize);
+ _flyingItemShapes = _staticres->loadFlyingObjectData(kLoLFlyingObjectShp, tempSize);
+ _itemCost = _staticres->loadRawDataBe16(kLoLItemPrices, tempSize);
+ _stashSetupData = _staticres->loadRawData(kLoLStashSetup, tempSize);
+
+ _dscWalls = (const int8 *)_staticres->loadRawData(kLoLDscWalls, tempSize);
+
+ _dscOvlMap = _staticres->loadRawData(kLoLDscOvlMap, tempSize);
+ _dscShapeOvlIndex = _staticres->loadRawData(kLoLDscOvlIndex, tempSize);
+ _dscShapeScaleW = _staticres->loadRawDataBe16(kLoLDscScaleWidthData, tempSize);
+ _dscShapeScaleH = _staticres->loadRawDataBe16(kLoLDscScaleHeightData, tempSize);
+ _dscShapeY = (const int8 *)_staticres->loadRawData(kLoLBaseDscY, tempSize);
+
+ _dscDoorMonsterScaleTable = _staticres->loadRawDataBe16(kLoLDscDoorScale, tempSize);
+ _dscDoor4 = _staticres->loadRawDataBe16(kLoLDscDoor4, tempSize);
+ _dscDoorMonsterX = (const int16 *)_staticres->loadRawDataBe16(kLoLDscDoorX, tempSize);
+ _dscDoorMonsterY = (const int16 *)_staticres->loadRawDataBe16(kLoLDscDoorY, tempSize);
+
+ _scrollXTop = _staticres->loadRawData(kLoLScrollXTop, tempSize);
+ _scrollYTop = _staticres->loadRawData(kLoLScrollYTop, tempSize);
+ _scrollXBottom = _staticres->loadRawData(kLoLScrollXBottom, tempSize);
+ _scrollYBottom = _staticres->loadRawData(kLoLScrollYBottom, tempSize);
+
+ const char *const *tmpSndList = _staticres->loadStrings(kLoLIngameSfxFiles, _ingameSoundListSize);
if (tmpSndList) {
_ingameSoundList = new char*[_ingameSoundListSize];
for (int i = 0; i < _ingameSoundListSize; i++) {
_ingameSoundList[i] = new char[strlen(tmpSndList[i]) + 1];
strcpy(_ingameSoundList[i], tmpSndList[i]);
}
- _staticres->unloadId(kLolIngameSfxFiles);
+ _staticres->unloadId(kLoLIngameSfxFiles);
}
- _buttonData = _staticres->loadButtonDefs(kLolButtonDefs, tempSize);
- _buttonList1 = (const int16 *)_staticres->loadRawDataBe16(kLolButtonList1, tempSize);
- _buttonList2 = (const int16 *)_staticres->loadRawDataBe16(kLolButtonList2, tempSize);
- _buttonList3 = (const int16 *)_staticres->loadRawDataBe16(kLolButtonList3, tempSize);
- _buttonList4 = (const int16 *)_staticres->loadRawDataBe16(kLolButtonList4, tempSize);
- _buttonList5 = (const int16 *)_staticres->loadRawDataBe16(kLolButtonList5, tempSize);
- _buttonList6 = (const int16 *)_staticres->loadRawDataBe16(kLolButtonList6, tempSize);
- _buttonList7 = (const int16 *)_staticres->loadRawDataBe16(kLolButtonList7, tempSize);
- _buttonList8 = (const int16 *)_staticres->loadRawDataBe16(kLolButtonList8, tempSize);
+ _buttonData = _staticres->loadButtonDefs(kLoLButtonDefs, tempSize);
+ _buttonList1 = (const int16 *)_staticres->loadRawDataBe16(kLoLButtonList1, tempSize);
+ _buttonList2 = (const int16 *)_staticres->loadRawDataBe16(kLoLButtonList2, tempSize);
+ _buttonList3 = (const int16 *)_staticres->loadRawDataBe16(kLoLButtonList3, tempSize);
+ _buttonList4 = (const int16 *)_staticres->loadRawDataBe16(kLoLButtonList4, tempSize);
+ _buttonList5 = (const int16 *)_staticres->loadRawDataBe16(kLoLButtonList5, tempSize);
+ _buttonList6 = (const int16 *)_staticres->loadRawDataBe16(kLoLButtonList6, tempSize);
+ _buttonList7 = (const int16 *)_staticres->loadRawDataBe16(kLoLButtonList7, tempSize);
+ _buttonList8 = (const int16 *)_staticres->loadRawDataBe16(kLoLButtonList8, tempSize);
- _autoMapStrings = _staticres->loadRawDataBe16(kLolMapStringId, tempSize);
+ _autoMapStrings = _staticres->loadRawDataBe16(kLoLMapStringId, tempSize);
- const uint8 *tmp = _staticres->loadRawData(kLolLegendData, tempSize);
+ const uint8 *tmp = _staticres->loadRawData(kLoLLegendData, tempSize);
uint8 entrySize = tempSize / 12;
tempSize /= entrySize;
if (tempSize) {
@@ -326,21 +326,21 @@ void LoLEngine::initStaticResource() {
_defaultLegendData[i].stringId = READ_LE_UINT16(tmp);
tmp += 2;
}
- _staticres->unloadId(kLolLegendData);
+ _staticres->unloadId(kLoLLegendData);
}
- tmp = _staticres->loadRawData(kLolMapCursorOvl, tempSize);
+ tmp = _staticres->loadRawData(kLoLMapCursorOvl, tempSize);
if (tmp) {
_mapCursorOverlay = new uint8[tempSize];
memcpy(_mapCursorOverlay, tmp, tempSize);
- _staticres->unloadId(kLolMapCursorOvl);
+ _staticres->unloadId(kLoLMapCursorOvl);
}
- _updateSpellBookCoords = _staticres->loadRawData(kLolSpellbookCoords, tempSize);
- _updateSpellBookAnimData = _staticres->loadRawData(kLolSpellbookAnim, tempSize);
- _healShapeFrames = _staticres->loadRawData(kLolHealShapeFrames, tempSize);
+ _updateSpellBookCoords = _staticres->loadRawData(kLoLSpellbookCoords, tempSize);
+ _updateSpellBookAnimData = _staticres->loadRawData(kLoLSpellbookAnim, tempSize);
+ _healShapeFrames = _staticres->loadRawData(kLoLHealShapeFrames, tempSize);
- tmp = _staticres->loadRawData(kLolLightningDefs, tempSize);
+ tmp = _staticres->loadRawData(kLoLLightningDefs, tempSize);
if (tmp) {
_lightningProps = new LightningProperty[5];
for (int i = 0; i < 5; i++) {
@@ -348,10 +348,10 @@ void LoLEngine::initStaticResource() {
_lightningProps[i].frameDiv = tmp[(i << 2) + 1];
_lightningProps[i].sfxId = READ_LE_UINT16(&tmp[(i << 2) + 2]);
}
- _staticres->unloadId(kLolLightningDefs);
+ _staticres->unloadId(kLoLLightningDefs);
}
- _fireBallCoords = (const int16*)_staticres->loadRawDataBe16(kLolFireballCoords, tempSize);
+ _fireBallCoords = (const int16*)_staticres->loadRawDataBe16(kLoLFireballCoords, tempSize);
_buttonCallbacks.clear();
_buttonCallbacks.reserve(95);
diff --git a/engines/kyra/staticres_rpg.cpp b/engines/kyra/staticres_rpg.cpp
index 49a55fc9b8..0dfdb381ed 100644
--- a/engines/kyra/staticres_rpg.cpp
+++ b/engines/kyra/staticres_rpg.cpp
@@ -28,11 +28,11 @@ namespace Kyra {
#if defined(ENABLE_EOB) || defined(ENABLE_LOL)
const uint16 *StaticResource::loadRawDataBe16(int id, int &entries) {
- return (const uint16 *)getData(id, kLolRawDataBe16, entries);
+ return (const uint16 *)getData(id, kLoLRawDataBe16, entries);
}
const uint32 *StaticResource::loadRawDataBe32(int id, int &entries) {
- return (const uint32 *)getData(id, kLolRawDataBe32, entries);
+ return (const uint32 *)getData(id, kLoLRawDataBe32, entries);
}
bool StaticResource::loadRawDataBe16(Common::SeekableReadStream &stream, void *&ptr, int &size) {
@@ -77,18 +77,18 @@ const uint8 KyraRpgEngine::_dropItemDirIndex[] = { 0, 1, 2, 3, 1, 3, 0, 2, 3, 2,
void KyraRpgEngine::initStaticResource() {
int temp;
- _dscShapeX = (const int16 *)_staticres->loadRawDataBe16(kLolEobCommonDscX, temp);
- _dscShapeIndex = (const int8 *)_staticres->loadRawData(kLolEobCommonDscShapeIndex, temp);
- _dscTileIndex = _staticres->loadRawData(kLolEobCommonDscTileIndex, temp);
- _dscDim1 = (const int8 *)_staticres->loadRawData(kLolEobCommonDscDimData1, temp);
- _dscDim2 = (const int8 *)_staticres->loadRawData(kLolEobCommonDscDimData2, temp);
- _dscUnk2 = _staticres->loadRawData(kLolEobCommonDscUnk2, temp);
- _dscBlockMap = _staticres->loadRawData(kLolEobCommonDscBlockMap, temp);
- _dscBlockIndex = (const int8 *)_staticres->loadRawData(kLolEobCommonDscBlockIndex, temp);
- _dscDimMap = _staticres->loadRawData(kLolEobCommonDscDimMap, temp);
- _dscDoorShpIndex = _staticres->loadRawData(kLolEobCommonDscDoorShapeIndex, _dscDoorShpIndexSize);
- _dscDoorY2 = _staticres->loadRawData(kLolEobCommonDscDoorY2, temp);
- _moreStrings = _staticres->loadStrings(kLolEobCommonMoreStrings, temp);
+ _dscShapeX = (const int16 *)_staticres->loadRawDataBe16(kRpgCommonDscX, temp);
+ _dscShapeIndex = (const int8 *)_staticres->loadRawData(kRpgCommonDscShapeIndex, temp);
+ _dscTileIndex = _staticres->loadRawData(kRpgCommonDscTileIndex, temp);
+ _dscDim1 = (const int8 *)_staticres->loadRawData(kRpgCommonDscDimData1, temp);
+ _dscDim2 = (const int8 *)_staticres->loadRawData(kRpgCommonDscDimData2, temp);
+ _dscUnk2 = _staticres->loadRawData(kRpgCommonDscUnk2, temp);
+ _dscBlockMap = _staticres->loadRawData(kRpgCommonDscBlockMap, temp);
+ _dscBlockIndex = (const int8 *)_staticres->loadRawData(kRpgCommonDscBlockIndex, temp);
+ _dscDimMap = _staticres->loadRawData(kRpgCommonDscDimMap, temp);
+ _dscDoorShpIndex = _staticres->loadRawData(kRpgCommonDscDoorShapeIndex, _dscDoorShpIndexSize);
+ _dscDoorY2 = _staticres->loadRawData(kRpgCommonDscDoorY2, temp);
+ _moreStrings = _staticres->loadStrings(kRpgCommonMoreStrings, temp);
}
#endif // (ENABLE_EOB || ENABLE_LOL)
diff --git a/engines/kyra/text_rpg.cpp b/engines/kyra/text_rpg.cpp
index bbc3cdbd98..1201cdcb45 100644
--- a/engines/kyra/text_rpg.cpp
+++ b/engines/kyra/text_rpg.cpp
@@ -32,15 +32,15 @@
namespace Kyra {
enum {
- kEobTextBufferSize = 2048
+ kEoBTextBufferSize = 2048
};
TextDisplayer_rpg::TextDisplayer_rpg(KyraRpgEngine *engine, Screen *sScreen) : _vm(engine), _screen(sScreen),
_lineCount(0), _printFlag(false), _lineWidth(0), _numCharsTotal(0), _allowPageBreak(true),
_numCharsLeft(0), _numCharsPrinted(0), _sjisLineBreakFlag(false), _waitButtonMode(1) {
- _dialogueBuffer = new char[kEobTextBufferSize];
- memset(_dialogueBuffer, 0, kEobTextBufferSize);
+ _dialogueBuffer = new char[kEoBTextBufferSize];
+ memset(_dialogueBuffer, 0, kEoBTextBufferSize);
_currentLine = new char[85];
memset(_currentLine, 0, 85);
@@ -463,8 +463,8 @@ void TextDisplayer_rpg::printLine(char *str) {
void TextDisplayer_rpg::printDialogueText(int stringId, const char *pageBreakString) {
const char * str = (const char *)(screen()->getCPagePtr(5) + READ_LE_UINT16(&screen()->getCPagePtr(5)[(stringId - 1) << 1]));
- assert (strlen(str) < kEobTextBufferSize);
- Common::strlcpy(_dialogueBuffer, str, kEobTextBufferSize);
+ assert (strlen(str) < kEoBTextBufferSize);
+ Common::strlcpy(_dialogueBuffer, str, kEoBTextBufferSize);
displayText(_dialogueBuffer);
@@ -478,8 +478,8 @@ void TextDisplayer_rpg::printDialogueText(int stringId, const char *pageBreakStr
}
void TextDisplayer_rpg::printDialogueText(const char *str, bool wait) {
- assert (strlen(str) < kEobTextBufferSize);
- Common::strlcpy(_dialogueBuffer, str, kEobTextBufferSize);
+ assert (strlen(str) < kEoBTextBufferSize);
+ Common::strlcpy(_dialogueBuffer, str, kEoBTextBufferSize);
strcpy(_dialogueBuffer, str);
displayText(_dialogueBuffer);
@@ -495,7 +495,7 @@ void TextDisplayer_rpg::printMessage(const char *str, int textColor, ...) {
va_list args;
va_start(args, textColor);
- vsnprintf(_dialogueBuffer, kEobTextBufferSize - 1, str, args);
+ vsnprintf(_dialogueBuffer, kEoBTextBufferSize - 1, str, args);
va_end(args);
displayText(_dialogueBuffer);
diff --git a/engines/kyra/timer_eob.cpp b/engines/kyra/timer_eob.cpp
index b80563bd11..9cc08b9a78 100644
--- a/engines/kyra/timer_eob.cpp
+++ b/engines/kyra/timer_eob.cpp
@@ -29,9 +29,9 @@
namespace Kyra {
-#define TimerV2(x) new Common::Functor1Mem<int, void, EobCoreEngine>(this, &EobCoreEngine::x)
+#define TimerV2(x) new Common::Functor1Mem<int, void, EoBCoreEngine>(this, &EoBCoreEngine::x)
-void EobCoreEngine::setupTimers() {
+void EoBCoreEngine::setupTimers() {
_timer->addTimer(0, TimerV2(timerProcessCharacterExchange), 9, false);
_timer->addTimer(1, TimerV2(timerProcessFlyingObjects), 3, true);
_timer->addTimer(0x20, TimerV2(timerProcessMonsters), 20, true);
@@ -55,10 +55,10 @@ void EobCoreEngine::setupTimers() {
_timer->resetNextRun();
}
-void EobCoreEngine::setCharEventTimer(int charIndex, uint32 countdown, int evnt, int updateExistingTimer) {
+void EoBCoreEngine::setCharEventTimer(int charIndex, uint32 countdown, int evnt, int updateExistingTimer) {
uint32 ntime = _system->getMillis() + countdown * _tickLength;
uint8 timerId = 0x30 | (charIndex & 0x0f);
- EobCharacter *c = &_characters[charIndex];
+ EoBCharacter *c = &_characters[charIndex];
if (!_timer->isEnabled(timerId)) {
c->timers[0] = ntime;
@@ -101,8 +101,8 @@ void EobCoreEngine::setCharEventTimer(int charIndex, uint32 countdown, int evnt,
}
}
-void EobCoreEngine::deleteCharEventTimer(int charIndex, int evnt) {
- EobCharacter *c = &_characters[charIndex];
+void EoBCoreEngine::deleteCharEventTimer(int charIndex, int evnt) {
+ EoBCharacter *c = &_characters[charIndex];
for (int i = 0; i < 10; i++) {
if (c->events[i] == evnt) {
c->events[i] = 0;
@@ -112,9 +112,9 @@ void EobCoreEngine::deleteCharEventTimer(int charIndex, int evnt) {
setupCharacterTimers();
}
-void EobCoreEngine::setupCharacterTimers() {
+void EoBCoreEngine::setupCharacterTimers() {
for (int i = 0; i < 6; i++) {
- EobCharacter *c = &_characters[i];
+ EoBCharacter *c = &_characters[i];
if (!testCharacter(i, 1))
continue;
@@ -136,10 +136,10 @@ void EobCoreEngine::setupCharacterTimers() {
_timer->resetNextRun();
}
-void EobCoreEngine::advanceTimers(uint32 millis) {
+void EoBCoreEngine::advanceTimers(uint32 millis) {
uint32 ct = _system->getMillis();
for (int i = 0; i < 6; i++) {
- EobCharacter *c = &_characters[i];
+ EoBCharacter *c = &_characters[i];
for (int ii = 0; ii < 10; ii++) {
if (c->timers[ii] > ct) {
uint32 chrt = c->timers[ii] - ct;
@@ -167,7 +167,7 @@ void EobCoreEngine::advanceTimers(uint32 millis) {
}
}
-void EobCoreEngine::timerProcessCharacterExchange(int timerNum) {
+void EoBCoreEngine::timerProcessCharacterExchange(int timerNum) {
_charExchangeSwap ^= 1;
if (_charExchangeSwap) {
int index = _exchangeCharacterId;
@@ -179,10 +179,10 @@ void EobCoreEngine::timerProcessCharacterExchange(int timerNum) {
}
}
-void EobCoreEngine::timerProcessFlyingObjects(int timerNum) {
+void EoBCoreEngine::timerProcessFlyingObjects(int timerNum) {
static const uint8 dirPosIndex[] = { 0x82, 0x83, 0x00, 0x01, 0x01, 0x80, 0x03, 0x82, 0x02, 0x03, 0x80, 0x81, 0x81, 0x00, 0x83, 0x02 };
for (int i = 0; i < 10; i++) {
- EobFlyingObject *fo = &_flyingObjects[i];
+ EoBFlyingObject *fo = &_flyingObjects[i];
if (!fo->enable)
continue;
@@ -218,13 +218,13 @@ void EobCoreEngine::timerProcessFlyingObjects(int timerNum) {
}
}
-void EobCoreEngine::timerProcessMonsters(int timerNum) {
+void EoBCoreEngine::timerProcessMonsters(int timerNum) {
updateMonsters(timerNum & 0x0f);
}
-void EobCoreEngine::timerSpecialCharacterUpdate(int timerNum) {
+void EoBCoreEngine::timerSpecialCharacterUpdate(int timerNum) {
int charIndex = timerNum & 0x0f;
- EobCharacter *c = &_characters[charIndex];
+ EoBCharacter *c = &_characters[charIndex];
uint32 ctime = _system->getMillis();
for (int i = 0; i < 10; i++) {
@@ -321,7 +321,7 @@ void EobCoreEngine::timerSpecialCharacterUpdate(int timerNum) {
_timer->setCountdown(timerNum, (nextTimer - ctime) / _tickLength);
}
-void EobCoreEngine::timerUpdateTeleporters(int timerNum) {
+void EoBCoreEngine::timerUpdateTeleporters(int timerNum) {
_teleporterPulse ^= 1;
for (int i = 0; i < 18; i++) {
uint8 w = _visibleBlocks[i]->walls[_sceneDrawVarDown];
@@ -332,12 +332,12 @@ void EobCoreEngine::timerUpdateTeleporters(int timerNum) {
}
}
-void EobCoreEngine::timerUpdateFoodStatus(int timerNum) {
+void EoBCoreEngine::timerUpdateFoodStatus(int timerNum) {
for (int i = 0; i < 6; i++) {
// Ring of Sustenance check
if (checkInventoryForRings(i, 2))
continue;
- EobCharacter *c = &_characters[i];
+ EoBCharacter *c = &_characters[i];
if (c->food != 0 && c->flags & 1 && c->hitPointsCur > -10) {
c->food--;
gui_drawFoodStatusGraph(i);
@@ -345,9 +345,9 @@ void EobCoreEngine::timerUpdateFoodStatus(int timerNum) {
}
}
-void EobCoreEngine::timerUpdateMonsterIdleAnim(int timerNum) {
+void EoBCoreEngine::timerUpdateMonsterIdleAnim(int timerNum) {
for (int i = 0; i < 18; i++) {
- EobMonsterInPlay *m = &_monsters[i];
+ EoBMonsterInPlay *m = &_monsters[i];
if (m->mode == 7 || m->mode == 10 || (m->flags & 0x20) || (rollDice(1, 2, 0) != 1))
continue;
m->idleAnimState = (rollDice(1, 2, 0) << 4) | rollDice(1, 2, 0);