aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/supernova/imageid.h2
-rw-r--r--engines/supernova/msn_def.h20
-rw-r--r--engines/supernova/rooms.cpp14
-rw-r--r--engines/supernova/rooms.h40
-rw-r--r--engines/supernova/screen.cpp9
-rw-r--r--engines/supernova/screen.h8
-rw-r--r--engines/supernova/state.cpp24
-rw-r--r--engines/supernova/state.h18
-rw-r--r--engines/supernova/supernova.cpp6
-rw-r--r--engines/supernova/supernova.h6
10 files changed, 74 insertions, 73 deletions
diff --git a/engines/supernova/imageid.h b/engines/supernova/imageid.h
index 22928303cd..952f707b6e 100644
--- a/engines/supernova/imageid.h
+++ b/engines/supernova/imageid.h
@@ -25,7 +25,7 @@
namespace Supernova {
-enum ImageID {
+enum ImageId {
// file 0
kAxacussanShipBackground,
kAxacussanShipCenterMouthOpen,
diff --git a/engines/supernova/msn_def.h b/engines/supernova/msn_def.h
index 72ea7531ca..7738471dee 100644
--- a/engines/supernova/msn_def.h
+++ b/engines/supernova/msn_def.h
@@ -100,7 +100,7 @@ enum Action {
ACTION_GIVE
};
-enum RoomID {
+enum RoomId {
INTRO,CORRIDOR,HALL,SLEEP,COCKPIT,AIRLOCK,
HOLD,LANDINGMODULE,GENERATOR,OUTSIDE,
CABIN_R1,CABIN_R2,CABIN_R3,CABIN_L1,CABIN_L2,CABIN_L3,BATHROOM,
@@ -112,7 +112,7 @@ enum RoomID {
ELEVATOR,STATION,SIGN,OUTRO,NUMROOMS,NULLROOM
};
-enum ObjectID {
+enum ObjectId {
INVALIDOBJECT = -1,
NULLOBJECT = 0,
KEYCARD,KNIFE,WATCH,
@@ -156,7 +156,7 @@ enum ObjectID {
JUNGLE,STATION_SLOT,STATION_SIGN
};
-enum StringID {
+enum StringId {
kNoString = -1,
// 0
kStringCommandGo = 0, kStringCommandLook, kStringCommandTake, kStringCommandOpen, kStringCommandClose,
@@ -341,8 +341,8 @@ struct Object {
, _exitRoom(NULLROOM)
, _direction(0)
{}
- Object(byte roomId, StringID name, StringID description, ObjectID id, ObjectType type,
- byte click, byte click2, byte section = 0, RoomID exitRoom = NULLROOM, byte direction = 0)
+ Object(byte roomId, StringId name, StringId description, ObjectId id, ObjectType type,
+ byte click, byte click2, byte section = 0, RoomId exitRoom = NULLROOM, byte direction = 0)
: _name(name)
, _description(description)
, _id(id)
@@ -377,7 +377,7 @@ struct Object {
return _type & type;
}
- static bool combine(Object &obj1, Object &obj2, ObjectID id1, ObjectID id2) {
+ static bool combine(Object &obj1, Object &obj2, ObjectId id1, ObjectId id2) {
if (obj1.hasProperty(COMBINABLE))
return (((obj1._id == id1) && (obj2._id == id2)) ||
((obj1._id == id2) && (obj2._id == id1)));
@@ -386,14 +386,14 @@ struct Object {
}
byte _roomId;
- StringID _name;
- StringID _description;
- ObjectID _id;
+ StringId _name;
+ StringId _description;
+ ObjectId _id;
ObjectTypes _type;
byte _click;
byte _click2;
byte _section;
- RoomID _exitRoom;
+ RoomId _exitRoom;
byte _direction;
};
diff --git a/engines/supernova/rooms.cpp b/engines/supernova/rooms.cpp
index f1e1342bf2..9360d58aa1 100644
--- a/engines/supernova/rooms.cpp
+++ b/engines/supernova/rooms.cpp
@@ -80,15 +80,15 @@ bool Room::deserialize(Common::ReadStream *in, int version) {
int numObjects = in->readSint32LE();
for (int i = 0; i < numObjects; ++i) {
- _objectState[i]._name = static_cast<StringID>(in->readSint32LE());
- _objectState[i]._description = static_cast<StringID>(in->readSint32LE());
+ _objectState[i]._name = static_cast<StringId>(in->readSint32LE());
+ _objectState[i]._description = static_cast<StringId>(in->readSint32LE());
_objectState[i]._roomId = in->readByte();
- _objectState[i]._id = static_cast<ObjectID>(in->readSint32LE());
+ _objectState[i]._id = static_cast<ObjectId>(in->readSint32LE());
_objectState[i]._type = static_cast<ObjectType>(in->readSint32LE());
_objectState[i]._click = in->readByte();
_objectState[i]._click2 = in->readByte();
_objectState[i]._section = in->readByte();
- _objectState[i]._exitRoom = static_cast<RoomID>(in->readSint32LE());
+ _objectState[i]._exitRoom = static_cast<RoomId>(in->readSint32LE());
_objectState[i]._direction = in->readByte();
}
@@ -229,7 +229,7 @@ bool Intro::animate(int section1, int section2, int duration) {
}
bool Intro::animate(int section1, int section2, int duration,
- MessagePosition position, StringID textId) {
+ MessagePosition position, StringId textId) {
Common::KeyCode key = Common::KEYCODE_INVALID;
const Common::String& text = _vm->getGameString(textId);
_vm->renderMessage(text, position);
@@ -254,7 +254,7 @@ bool Intro::animate(int section1, int section2, int duration,
}
bool Intro::animate(int section1, int section2, int section3, int section4,
- int duration, MessagePosition position, StringID textId) {
+ int duration, MessagePosition position, StringId textId) {
Common::KeyCode key = Common::KEYCODE_INVALID;
const Common::String& text = _vm->getGameString(textId);
_vm->renderMessage(text, position);
@@ -333,7 +333,7 @@ void Intro::cutscene() {
exitOnEscape(28);
_vm->removeMessage();
- StringID textCounting[4] =
+ StringId textCounting[4] =
{kStringIntroCutscene7, kStringIntroCutscene8, kStringIntroCutscene9, kStringIntroCutscene10};
_vm->setCurrentImage(31);
_vm->renderImage(0);
diff --git a/engines/supernova/rooms.h b/engines/supernova/rooms.h
index 59cec07d60..5c9b283dcd 100644
--- a/engines/supernova/rooms.h
+++ b/engines/supernova/rooms.h
@@ -57,7 +57,7 @@ public:
int getFileNumber() const {
return _fileNumber;
}
- RoomID getId() const {
+ RoomId getId() const {
return _id;
}
@@ -117,7 +117,7 @@ protected:
bool _shown[kMaxSection];
byte _sentenceRemoved[kMaxDialog];
Object _objectState[kMaxObject];
- RoomID _id;
+ RoomId _id;
SupernovaEngine *_vm;
GameManager *_gm;
@@ -134,9 +134,9 @@ public:
private:
bool animate(int section1, int section2, int duration);
bool animate(int section1, int section2, int duration, MessagePosition position,
- StringID text);
+ StringId text);
bool animate(int section1, int section2, int section3, int section4, int duration,
- MessagePosition position, StringID text);
+ MessagePosition position, StringId text);
void titleScreen();
void titleFadeIn();
@@ -686,9 +686,9 @@ public:
virtual void animation();
private:
- StringID _dialog1[5];
- StringID _dialog2[5];
- StringID _dialog3[5];
+ StringId _dialog1[5];
+ StringId _dialog2[5];
+ StringId _dialog3[5];
byte _eyewitness;
};
class ArsanoRemaining : public Room {
@@ -747,7 +747,7 @@ public:
virtual bool interact(Action verb, Object &obj1, Object &obj2);
private:
- StringID _dialog1[4];
+ StringId _dialog1[4];
byte _eyewitness;
byte _hands;
};
@@ -814,10 +814,10 @@ public:
private:
// TODO: change to 6, fix initialization
- StringID _dialog1[2];
- StringID _dialog2[2];
- StringID _dialog3[4];
- StringID _dialog4[3];
+ StringId _dialog1[2];
+ StringId _dialog2[2];
+ StringId _dialog3[4];
+ StringId _dialog4[3];
bool _found;
bool _flug;
@@ -851,11 +851,11 @@ public:
virtual bool interact(Action verb, Object &obj1, Object &obj2);
private:
- StringID _dialog2[4];
- StringID _dialog3[2];
+ StringId _dialog2[4];
+ StringId _dialog3[2];
// TODO: Hack, to be move away and renamed when the other uses are found
- StringID _dialogsX[6];
+ StringId _dialogsX[6];
//
};
@@ -1030,9 +1030,9 @@ private:
bool handleMoneyDialog();
// TODO: Change to 6, or change struct, and fix initialization
- StringID _dialog1[2];
- StringID _dialog2[2];
- StringID _dialog3[4];
+ StringId _dialog1[2];
+ StringId _dialog2[2];
+ StringId _dialog3[4];
byte _rows[6];
};
@@ -1181,7 +1181,7 @@ public:
virtual bool interact(Action verb, Object &obj1, Object &obj2);
private:
- StringID _dialogsX[6];
+ StringId _dialogsX[6];
};
class AxacussExit : public Room {
@@ -1210,7 +1210,7 @@ public:
virtual bool interact(Action verb, Object &obj1, Object &obj2);
private:
- StringID _dialogsX[6];
+ StringId _dialogsX[6];
};
class AxacussOffice1 : public Room {
public:
diff --git a/engines/supernova/screen.cpp b/engines/supernova/screen.cpp
index a57e3af6d3..da940c32e0 100644
--- a/engines/supernova/screen.cpp
+++ b/engines/supernova/screen.cpp
@@ -27,6 +27,7 @@
#include "graphics/palette.h"
#include "graphics/surface.h"
+#include "supernova/imageid.h"
#include "supernova/resman.h"
#include "supernova/state.h"
#include "supernova/screen.h"
@@ -228,7 +229,7 @@ void Screen::setTextCursorColor(byte color) {
_textColor = color;
}
-void Screen::renderMessage(StringID stringId, MessagePosition position,
+void Screen::renderMessage(StringId stringId, MessagePosition position,
Common::String var1, Common::String var2) {
Common::String text = _vm->getGameString(stringId);
@@ -258,7 +259,7 @@ void Screen::renderText(const char *text) {
renderText(text, _textCursorX, _textCursorY, _textColor);
}
-void Screen::renderText(StringID stringId) {
+void Screen::renderText(StringId stringId) {
renderText(_vm->getGameString(stringId));
}
@@ -322,7 +323,7 @@ void Screen::renderText(const Common::String &text, int x, int y, byte color) {
renderText(text.c_str(), x, y, color);
}
-void Screen::renderText(StringID stringId, int x, int y, byte color) {
+void Screen::renderText(StringId stringId, int x, int y, byte color) {
renderText(_vm->getGameString(stringId), x, y, color);
}
@@ -372,7 +373,7 @@ void Screen::renderImageSection(int section) {
sectionRect.width(), sectionRect.height());
}
-void Screen::renderImage(ImageID id) {
+void Screen::renderImage(ImageId id) {
// TODO: include staticscreen.cpp and render section of filenumber
}
diff --git a/engines/supernova/screen.h b/engines/supernova/screen.h
index ff36fdc38b..84a5375112 100644
--- a/engines/supernova/screen.h
+++ b/engines/supernova/screen.h
@@ -118,7 +118,7 @@ public:
void paletteFadeIn();
void paletteFadeOut();
void paletteBrightness();
- void renderImage(ImageID id);
+ void renderImage(ImageId id);
void renderImage(int section);
void renderImageSection(int section);
bool setCurrentImage(int filenumber);
@@ -128,17 +128,17 @@ public:
void renderRoom(Room &room);
void renderMessage(const char *text, MessagePosition position = kMessageNormal);
void renderMessage(const Common::String &text, MessagePosition position = kMessageNormal);
- void renderMessage(StringID stringId, MessagePosition position = kMessageNormal,
+ void renderMessage(StringId stringId, MessagePosition position = kMessageNormal,
Common::String var1 = "", Common::String var2 = "");
void removeMessage();
void renderText(const uint16 character);
void renderText(const char *text);
void renderText(const Common::String &text);
- void renderText(StringID stringId);
+ void renderText(StringId stringId);
void renderText(const uint16 character, int x, int y, byte color);
void renderText(const char *text, int x, int y, byte color);
void renderText(const Common::String &text, int x, int y, byte color);
- void renderText(StringID stringId, int x, int y, byte color);
+ void renderText(StringId stringId, int x, int y, byte color);
void renderText(const GuiElement &guiElement);
void renderBox(int x, int y, int width, int height, byte color);
void renderBox(const GuiElement &guiElement);
diff --git a/engines/supernova/state.cpp b/engines/supernova/state.cpp
index 70a0767d49..51e0ee5c73 100644
--- a/engines/supernova/state.cpp
+++ b/engines/supernova/state.cpp
@@ -138,13 +138,13 @@ bool GameManager::deserialize(Common::ReadStream *in, int version) {
_inventoryScroll = in->readSint32LE();
_inventory.clear();
for (int i = 0; i < inventorySize; ++i) {
- RoomID objectRoom = static_cast<RoomID>(in->readSint32LE());
+ RoomId objectRoom = static_cast<RoomId>(in->readSint32LE());
int objectIndex = in->readSint32LE();
_inventory.add(*_rooms[objectRoom]->getObject(objectIndex));
}
// Rooms
- RoomID curRoomId = static_cast<RoomID>(in->readByte());
+ RoomId curRoomId = static_cast<RoomId>(in->readByte());
for (int i = 0; i < NUMROOMS; ++i) {
_rooms[i]->deserialize(in, version);
}
@@ -199,7 +199,7 @@ Object *Inventory::get(int index) const {
return const_cast<Object *>(&Object::nullObject);
}
-Object *Inventory::get(ObjectID id) const {
+Object *Inventory::get(ObjectId id) const {
for (int i = 0; i < _numObjects; ++i) {
if (_inventory[i]->_id == id)
return _inventory[i];
@@ -277,12 +277,12 @@ static Common::String timeToString(int msec) {
return Common::String(s);
}
-StringID GameManager::guiCommands[] = {
+StringId GameManager::guiCommands[] = {
kStringCommandGo, kStringCommandLook, kStringCommandTake, kStringCommandOpen, kStringCommandClose,
kStringCommandPress, kStringCommandPull, kStringCommandUse, kStringCommandTalk, kStringCommandGive
};
-StringID GameManager::guiStatusCommands[] = {
+StringId GameManager::guiStatusCommands[] = {
kStringStatusCommandGo, kStringStatusCommandLook, kStringStatusCommandTake, kStringStatusCommandOpen, kStringStatusCommandClose,
kStringStatusCommandPress, kStringStatusCommandPull, kStringStatusCommandUse, kStringStatusCommandTalk, kStringStatusCommandGive
};
@@ -838,7 +838,7 @@ void GameManager::telomat(int nr) {
"Alga Hurz Li"
};
- StringID dial1[4];
+ StringId dial1[4];
dial1[0] = kStringTelomat1;
dial1[1] = kNoString;
dial1[2] = kStringTelomat3;
@@ -846,7 +846,7 @@ void GameManager::telomat(int nr) {
static byte rows1[3] = {1, 2, 1};
- StringID dial2[4];
+ StringId dial2[4];
dial2[0] = kStringTelomat4;
dial2[1] = kStringTelomat5;
dial2[2] = kStringTelomat6;
@@ -1398,7 +1398,7 @@ void GameManager::sentence(int number, bool brightness) {
}
}
-void GameManager::say(StringID textId) {
+void GameManager::say(StringId textId) {
Common::String str = _vm->getGameString(textId);
if (!str.empty())
say(str.c_str());
@@ -1428,7 +1428,7 @@ void GameManager::say(const char *text) {
_vm->renderBox(0, 138, 320, 62, kColorBlack);
}
-void GameManager::reply(StringID textId, int aus1, int aus2) {
+void GameManager::reply(StringId textId, int aus1, int aus2) {
Common::String str = _vm->getGameString(textId);
if (!str.empty())
reply(str.c_str(), aus1, aus2);
@@ -1452,7 +1452,7 @@ void GameManager::reply(const char *text, int aus1, int aus2) {
_vm->removeMessage();
}
-int GameManager::dialog(int num, byte rowLength[6], StringID text[6], int number) {
+int GameManager::dialog(int num, byte rowLength[6], StringId text[6], int number) {
_vm->_allowLoadGame = false;
_guiEnabled = false;
@@ -1637,7 +1637,7 @@ void GameManager::roomBrightness() {
_vm->paletteBrightness();
}
-void GameManager::changeRoom(RoomID id) {
+void GameManager::changeRoom(RoomId id) {
_currentRoom = _rooms[id];
_newRoom = true;
}
@@ -1905,7 +1905,7 @@ void GameManager::closeLocker(const Room *room, Object *obj, Object *lock, int s
}
}
-void GameManager::dead(StringID messageId) {
+void GameManager::dead(StringId messageId) {
_vm->paletteFadeOut();
_guiEnabled = false;
_vm->setCurrentImage(11);
diff --git a/engines/supernova/state.h b/engines/supernova/state.h
index dc2ff378e1..e3de0eb94b 100644
--- a/engines/supernova/state.h
+++ b/engines/supernova/state.h
@@ -74,7 +74,7 @@ public:
void remove(Object &obj);
void clear();
Object *get(int index) const;
- Object *get(ObjectID id) const;
+ Object *get(ObjectId id) const;
int getSize() const { return _numObjects; }
private:
@@ -133,8 +133,8 @@ public:
bool serialize(Common::WriteStream *out);
bool deserialize(Common::ReadStream *in, int version);
- static StringID guiCommands[];
- static StringID guiStatusCommands[];
+ static StringId guiCommands[];
+ static StringId guiStatusCommands[];
SupernovaEngine *_vm;
Sound *_sound;
Common::KeyState _key;
@@ -170,7 +170,7 @@ public:
// Dialog
int _currentSentence;
int _sentenceNumber[6];
- StringID _texts[6];
+ StringId _texts[6];
byte _rows[6];
byte _rowsStart[6];
@@ -206,7 +206,7 @@ public:
void drawStatus();
void drawCommandBox();
void drawInventory();
- void changeRoom(RoomID id);
+ void changeRoom(RoomId id);
void resetInputState();
void handleInput();
void handleTime();
@@ -214,12 +214,12 @@ public:
void loadTime();
void saveTime();
void setAnimationTimer(int ticks);
- void dead(StringID messageId);
- int dialog(int num, byte rowLength[6], StringID text[6], int number);
+ void dead(StringId messageId);
+ int dialog(int num, byte rowLength[6], StringId text[6], int number);
void sentence(int number, bool brightness);
- void say(StringID textId);
+ void say(StringId textId);
void say(const char *text);
- void reply(StringID textId, int aus1, int aus2);
+ void reply(StringId textId, int aus1, int aus2);
void reply(const char *text, int aus1, int aus2);
void mousePosDialog(int x, int y);
void shot(int a, int b);
diff --git a/engines/supernova/supernova.cpp b/engines/supernova/supernova.cpp
index d9c6d6d392..a2b34bd6c5 100644
--- a/engines/supernova/supernova.cpp
+++ b/engines/supernova/supernova.cpp
@@ -282,7 +282,7 @@ void SupernovaEngine::renderMessage(const Common::String &text, MessagePosition
_screen->renderMessage(text, position);
}
-void SupernovaEngine::renderMessage(StringID stringId, MessagePosition position, Common::String var1, Common::String var2) {
+void SupernovaEngine::renderMessage(StringId stringId, MessagePosition position, Common::String var1, Common::String var2) {
_screen->renderMessage(stringId, position, var1, var2);
}
@@ -302,7 +302,7 @@ void SupernovaEngine::renderText(const Common::String &text) {
_screen->renderText(text);
}
-void SupernovaEngine::renderText(StringID stringId) {
+void SupernovaEngine::renderText(StringId stringId) {
_screen->renderText(stringId);
}
@@ -322,7 +322,7 @@ void SupernovaEngine::renderText(const Common::String &text, int x, int y, byte
_screen->renderText(text, x, y, color);
}
-void SupernovaEngine::renderText(StringID stringId, int x, int y, byte color) {
+void SupernovaEngine::renderText(StringId stringId, int x, int y, byte color) {
_screen->renderText(stringId, x, y, color);
}
diff --git a/engines/supernova/supernova.h b/engines/supernova/supernova.h
index 9544f075cb..cbd7c810b1 100644
--- a/engines/supernova/supernova.h
+++ b/engines/supernova/supernova.h
@@ -105,17 +105,17 @@ public:
void renderRoom(Room &room);
void renderMessage(const char *text, MessagePosition position = kMessageNormal);
void renderMessage(const Common::String &text, MessagePosition position = kMessageNormal);
- void renderMessage(StringID stringId, MessagePosition position = kMessageNormal,
+ void renderMessage(StringId stringId, MessagePosition position = kMessageNormal,
Common::String var1 = "", Common::String var2 = "");
void removeMessage();
void renderText(const uint16 character);
void renderText(const char *text);
void renderText(const Common::String &text);
- void renderText(StringID stringId);
+ void renderText(StringId stringId);
void renderText(const uint16 character, int x, int y, byte color);
void renderText(const char *text, int x, int y, byte color);
void renderText(const Common::String &text, int x, int y, byte color);
- void renderText(StringID stringId, int x, int y, byte color);
+ void renderText(StringId stringId, int x, int y, byte color);
void renderText(const GuiElement &guiElement);
void renderBox(int x, int y, int width, int height, byte color);
void renderBox(const GuiElement &guiElement);