LURE: Remove evil 'using namespace' from header files
svn-id: r47396
This commit is contained in:
parent
dc5e08e623
commit
bce959e046
16 changed files with 111 additions and 115 deletions
|
@ -45,12 +45,12 @@ Common::Platform LureEngine::getPlatform() const { return _gameDescription->desc
|
||||||
|
|
||||||
LureLanguage LureEngine::getLureLanguage() const {
|
LureLanguage LureEngine::getLureLanguage() const {
|
||||||
switch (_gameDescription->desc.language) {
|
switch (_gameDescription->desc.language) {
|
||||||
case IT_ITA: return LANG_IT_ITA;
|
case Common::IT_ITA: return LANG_IT_ITA;
|
||||||
case FR_FRA: return LANG_FR_FRA;
|
case Common::FR_FRA: return LANG_FR_FRA;
|
||||||
case DE_DEU: return LANG_DE_DEU;
|
case Common::DE_DEU: return LANG_DE_DEU;
|
||||||
case ES_ESP: return LANG_ES_ESP;
|
case Common::ES_ESP: return LANG_ES_ESP;
|
||||||
case EN_ANY: return LANG_EN_ANY;
|
case Common::EN_ANY: return LANG_EN_ANY;
|
||||||
case UNK_LANG: return LANG_UNKNOWN;
|
case Common::UNK_LANG: return LANG_UNKNOWN;
|
||||||
default:
|
default:
|
||||||
error("Unknown game language");
|
error("Unknown game language");
|
||||||
}
|
}
|
||||||
|
|
|
@ -224,7 +224,7 @@ void FightsManager::checkEvents() {
|
||||||
_keyDown = KS_UP;
|
_keyDown = KS_UP;
|
||||||
|
|
||||||
} else if (events.type() == Common::EVENT_MOUSEMOVE) {
|
} else if (events.type() == Common::EVENT_MOUSEMOVE) {
|
||||||
Point mPos = events.event().mouse;
|
Common::Point mPos = events.event().mouse;
|
||||||
if (mPos.x < rec.fwtrue_x - 12)
|
if (mPos.x < rec.fwtrue_x - 12)
|
||||||
mouse.setCursorNum(CURSOR_LEFT_ARROW);
|
mouse.setCursorNum(CURSOR_LEFT_ARROW);
|
||||||
else if (mPos.x > rec.fwtrue_x + player->width())
|
else if (mPos.x > rec.fwtrue_x + player->width())
|
||||||
|
|
|
@ -349,7 +349,7 @@ void Game::playerChangeRoom() {
|
||||||
|
|
||||||
uint16 roomNum = fields.playerNewPos().roomNumber;
|
uint16 roomNum = fields.playerNewPos().roomNumber;
|
||||||
fields.playerNewPos().roomNumber = 0;
|
fields.playerNewPos().roomNumber = 0;
|
||||||
Point &newPos = fields.playerNewPos().position;
|
Common::Point &newPos = fields.playerNewPos().position;
|
||||||
|
|
||||||
delayList.clear();
|
delayList.clear();
|
||||||
|
|
||||||
|
@ -991,9 +991,9 @@ bool Game::getYN() {
|
||||||
|
|
||||||
Common::Language l = LureEngine::getReference().getLanguage();
|
Common::Language l = LureEngine::getReference().getLanguage();
|
||||||
Common::KeyCode y = Common::KEYCODE_y;
|
Common::KeyCode y = Common::KEYCODE_y;
|
||||||
if (l == FR_FRA) y = Common::KEYCODE_o;
|
if (l == Common::FR_FRA) y = Common::KEYCODE_o;
|
||||||
else if ((l == DE_DEU) || (l == NL_NLD)) y = Common::KEYCODE_j;
|
else if ((l == Common::DE_DEU) || (l == Common::NL_NLD)) y = Common::KEYCODE_j;
|
||||||
else if ((l == ES_ESP) || (l == IT_ITA)) y = Common::KEYCODE_s;
|
else if ((l == Common::ES_ESP) || (l == Common::IT_ITA)) y = Common::KEYCODE_s;
|
||||||
|
|
||||||
bool vKbdFlag = g_system->hasFeature(OSystem::kFeatureVirtualKeyboard);
|
bool vKbdFlag = g_system->hasFeature(OSystem::kFeatureVirtualKeyboard);
|
||||||
if (!vKbdFlag)
|
if (!vKbdFlag)
|
||||||
|
@ -1055,12 +1055,12 @@ bool Game::isMenuAvailable() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Game::saveToStream(WriteStream *stream) {
|
void Game::saveToStream(Common::WriteStream *stream) {
|
||||||
stream->writeByte(_fastTextFlag);
|
stream->writeByte(_fastTextFlag);
|
||||||
stream->writeByte(_soundFlag);
|
stream->writeByte(_soundFlag);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Game::loadFromStream(ReadStream *stream) {
|
void Game::loadFromStream(Common::ReadStream *stream) {
|
||||||
Menu &menu = Menu::getReference();
|
Menu &menu = Menu::getReference();
|
||||||
StringList &sl = Resources::getReference().stringList();
|
StringList &sl = Resources::getReference().stringList();
|
||||||
|
|
||||||
|
|
|
@ -75,8 +75,8 @@ public:
|
||||||
|
|
||||||
static bool isCreated();
|
static bool isCreated();
|
||||||
static Game &getReference();
|
static Game &getReference();
|
||||||
void saveToStream(WriteStream *stream);
|
void saveToStream(Common::WriteStream *stream);
|
||||||
void loadFromStream(ReadStream *stream);
|
void loadFromStream(Common::ReadStream *stream);
|
||||||
|
|
||||||
void tick();
|
void tick();
|
||||||
void tickCheck();
|
void tickCheck();
|
||||||
|
|
|
@ -375,7 +375,7 @@ void Hotspot::copyTo(Surface *dest) {
|
||||||
uint16 hWidth = _frameWidth;
|
uint16 hWidth = _frameWidth;
|
||||||
uint16 hHeight = _height;
|
uint16 hHeight = _height;
|
||||||
|
|
||||||
Rect r(_frameNumber * hWidth, 0, (_frameNumber + 1) * hWidth - 1, hHeight - 1);
|
Common::Rect r(_frameNumber * hWidth, 0, (_frameNumber + 1) * hWidth - 1, hHeight - 1);
|
||||||
if (_frameStartsUsed) {
|
if (_frameStartsUsed) {
|
||||||
assert(_frameNumber < MAX_NUM_FRAMES);
|
assert(_frameNumber < MAX_NUM_FRAMES);
|
||||||
r.left = _frameStarts[_frameNumber];
|
r.left = _frameStarts[_frameNumber];
|
||||||
|
@ -1153,7 +1153,7 @@ bool Hotspot::doorCloseCheck(uint16 doorId) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Rect bounds(doorHotspot->x(), doorHotspot->y() + doorHotspot->heightCopy()
|
Common::Rect bounds(doorHotspot->x(), doorHotspot->y() + doorHotspot->heightCopy()
|
||||||
- doorHotspot->yCorrection() - doorHotspot->charRectY(),
|
- doorHotspot->yCorrection() - doorHotspot->charRectY(),
|
||||||
doorHotspot->x() + doorHotspot->widthCopy(),
|
doorHotspot->x() + doorHotspot->widthCopy(),
|
||||||
doorHotspot->y() + doorHotspot->heightCopy() + doorHotspot->charRectY());
|
doorHotspot->y() + doorHotspot->heightCopy() + doorHotspot->charRectY());
|
||||||
|
@ -2226,7 +2226,7 @@ uint16 Hotspot::getTalkId(HotspotData *charHotspot) {
|
||||||
Resources &res = Resources::getReference();
|
Resources &res = Resources::getReference();
|
||||||
uint16 talkIndex;
|
uint16 talkIndex;
|
||||||
TalkHeaderData *headerEntry;
|
TalkHeaderData *headerEntry;
|
||||||
bool isEnglish = LureEngine::getReference().getLanguage() == EN_ANY;
|
bool isEnglish = LureEngine::getReference().getLanguage() == Common::EN_ANY;
|
||||||
|
|
||||||
// If the hotspot has a talk data override, return it
|
// If the hotspot has a talk data override, return it
|
||||||
if (charHotspot->talkOverride != 0) {
|
if (charHotspot->talkOverride != 0) {
|
||||||
|
@ -3397,7 +3397,7 @@ void HotspotTickHandlers::talkAnimHandler(Hotspot &h) {
|
||||||
TalkEntryList &entries = data->entries;
|
TalkEntryList &entries = data->entries;
|
||||||
Hotspot *charHotspot;
|
Hotspot *charHotspot;
|
||||||
char buffer[MAX_DESC_SIZE];
|
char buffer[MAX_DESC_SIZE];
|
||||||
Rect r;
|
Common::Rect r;
|
||||||
int lineNum, numLines;
|
int lineNum, numLines;
|
||||||
int selectedLine, responseNumber;
|
int selectedLine, responseNumber;
|
||||||
bool showSelections, keepTalkingFlag;
|
bool showSelections, keepTalkingFlag;
|
||||||
|
@ -4518,7 +4518,7 @@ void PathFinder::loadFromStream(Common::ReadStream *stream) {
|
||||||
int Support::findIntersectingCharacters(Hotspot &h, uint16 *charList, int16 xp, int16 yp, int roomNumber) {
|
int Support::findIntersectingCharacters(Hotspot &h, uint16 *charList, int16 xp, int16 yp, int roomNumber) {
|
||||||
int numImpinging = 0;
|
int numImpinging = 0;
|
||||||
Resources &res = Resources::getReference();
|
Resources &res = Resources::getReference();
|
||||||
Rect r;
|
Common::Rect r;
|
||||||
uint16 hotspotY;
|
uint16 hotspotY;
|
||||||
|
|
||||||
// If a specific x/y/room isn't provided, use the specified hotspot's current location
|
// If a specific x/y/room isn't provided, use the specified hotspot's current location
|
||||||
|
@ -4658,7 +4658,7 @@ bool Support::isCharacterInList(uint16 *lst, int numEntries, uint16 charId) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HotspotList::saveToStream(WriteStream *stream) {
|
void HotspotList::saveToStream(Common::WriteStream *stream) {
|
||||||
HotspotList::iterator i;
|
HotspotList::iterator i;
|
||||||
for (i = begin(); i != end(); ++i) {
|
for (i = begin(); i != end(); ++i) {
|
||||||
Hotspot *hotspot = (*i).get();
|
Hotspot *hotspot = (*i).get();
|
||||||
|
@ -4674,7 +4674,7 @@ void HotspotList::saveToStream(WriteStream *stream) {
|
||||||
stream->writeUint16LE(0);
|
stream->writeUint16LE(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HotspotList::loadFromStream(ReadStream *stream) {
|
void HotspotList::loadFromStream(Common::ReadStream *stream) {
|
||||||
Resources &res = Resources::getReference();
|
Resources &res = Resources::getReference();
|
||||||
Hotspot *hotspot;
|
Hotspot *hotspot;
|
||||||
|
|
||||||
|
|
|
@ -176,7 +176,7 @@ enum BarPlaceResult {BP_KEEP_TRYING, BP_GOT_THERE, BP_FAIL};
|
||||||
|
|
||||||
struct DestStructure {
|
struct DestStructure {
|
||||||
uint8 counter;
|
uint8 counter;
|
||||||
Point position;
|
Common::Point position;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -487,8 +487,8 @@ public:
|
||||||
|
|
||||||
class HotspotList: public Common::List<Common::SharedPtr<Hotspot> > {
|
class HotspotList: public Common::List<Common::SharedPtr<Hotspot> > {
|
||||||
public:
|
public:
|
||||||
void saveToStream(WriteStream *stream);
|
void saveToStream(Common::WriteStream *stream);
|
||||||
void loadFromStream(ReadStream *stream);
|
void loadFromStream(Common::ReadStream *stream);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // End of namespace Lure
|
} // End of namespace Lure
|
||||||
|
|
|
@ -126,7 +126,7 @@ public:
|
||||||
return loadGame(slot) ? Common::kReadingFailed : Common::kNoError;
|
return loadGame(slot) ? Common::kReadingFailed : Common::kNoError;
|
||||||
}
|
}
|
||||||
virtual Common::Error saveGameState(int slot, const char *desc) {
|
virtual Common::Error saveGameState(int slot, const char *desc) {
|
||||||
String s(desc);
|
Common::String s(desc);
|
||||||
return saveGame(slot, s) ? Common::kReadingFailed : Common::kNoError;
|
return saveGame(slot, s) ? Common::kReadingFailed : Common::kNoError;
|
||||||
}
|
}
|
||||||
virtual bool canLoadGameStateCurrently() {
|
virtual bool canLoadGameStateCurrently() {
|
||||||
|
|
|
@ -72,12 +72,12 @@ const char *MenuRecord::getEntry(uint8 index) {
|
||||||
static Menu *int_menu = NULL;
|
static Menu *int_menu = NULL;
|
||||||
|
|
||||||
const MenuRecordLanguage menuList[] = {
|
const MenuRecordLanguage menuList[] = {
|
||||||
{EN_ANY, {{40, 87, 3, 7}, {127, 179, 13, 12}, {224, 281, 27, 10}}},
|
{Common::EN_ANY, {{40, 87, 3, 7}, {127, 179, 13, 12}, {224, 281, 27, 10}}},
|
||||||
{IT_ITA, {{40, 98, 4, 6}, {120, 195, 14, 11}, {208, 281, 24, 13}}},
|
{Common::IT_ITA, {{40, 98, 4, 6}, {120, 195, 14, 11}, {208, 281, 24, 13}}},
|
||||||
{FR_FRA, {{40, 90, 3, 7}, {120, 195, 13, 11}, {232, 273, 23, 13}}},
|
{Common::FR_FRA, {{40, 90, 3, 7}, {120, 195, 13, 11}, {232, 273, 23, 13}}},
|
||||||
{DE_DEU, {{44, 95, 1, 11}, {135, 178, 8, 23}, {232, 273, 22, 15}}},
|
{Common::DE_DEU, {{44, 95, 1, 11}, {135, 178, 8, 23}, {232, 273, 22, 15}}},
|
||||||
{ES_ESP, {{40, 90, 3, 8}, {120, 195, 11, 13}, {208, 281, 17, 18}}},
|
{Common::ES_ESP, {{40, 90, 3, 8}, {120, 195, 11, 13}, {208, 281, 17, 18}}},
|
||||||
{UNK_LANG, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}}
|
{Common::UNK_LANG, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}}
|
||||||
};
|
};
|
||||||
|
|
||||||
Menu::Menu() {
|
Menu::Menu() {
|
||||||
|
@ -91,9 +91,9 @@ Menu::Menu() {
|
||||||
delete data;
|
delete data;
|
||||||
|
|
||||||
const MenuRecordLanguage *rec = &menuList[0];
|
const MenuRecordLanguage *rec = &menuList[0];
|
||||||
while ((rec->language != UNK_LANG) && (rec->language != language))
|
while ((rec->language != Common::UNK_LANG) && (rec->language != language))
|
||||||
++rec;
|
++rec;
|
||||||
if (rec->language == UNK_LANG)
|
if (rec->language == Common::UNK_LANG)
|
||||||
error("Unknown language encountered in top line handler");
|
error("Unknown language encountered in top line handler");
|
||||||
|
|
||||||
_menus[0] = new MenuRecord(&rec->menus[0], 1, sl.getString(S_CREDITS));
|
_menus[0] = new MenuRecord(&rec->menus[0], 1, sl.getString(S_CREDITS));
|
||||||
|
@ -473,7 +473,7 @@ uint16 PopupMenu::Show(int numEntries, const char *actions[]) {
|
||||||
Mouse &mouse = Mouse::getReference();
|
Mouse &mouse = Mouse::getReference();
|
||||||
OSystem &system = *g_system;
|
OSystem &system = *g_system;
|
||||||
Screen &screen = Screen::getReference();
|
Screen &screen = Screen::getReference();
|
||||||
Rect r;
|
Common::Rect r;
|
||||||
bool isEGA = LureEngine::getReference().isEGA();
|
bool isEGA = LureEngine::getReference().isEGA();
|
||||||
byte bgColour = isEGA ? EGA_DIALOG_BG_COLOUR : 0;
|
byte bgColour = isEGA ? EGA_DIALOG_BG_COLOUR : 0;
|
||||||
byte textColour = isEGA ? EGA_DIALOG_TEXT_COLOUR : VGA_DIALOG_TEXT_COLOUR;
|
byte textColour = isEGA ? EGA_DIALOG_TEXT_COLOUR : VGA_DIALOG_TEXT_COLOUR;
|
||||||
|
|
|
@ -281,7 +281,7 @@ void RoomPathsData::decompress(RoomPathsDecompressedData &dataOut, int character
|
||||||
|
|
||||||
// Room data class
|
// Room data class
|
||||||
|
|
||||||
void RoomDataList::saveToStream(WriteStream *stream) {
|
void RoomDataList::saveToStream(Common::WriteStream *stream) {
|
||||||
RoomDataList::iterator i;
|
RoomDataList::iterator i;
|
||||||
|
|
||||||
for (i = begin(); i != end(); ++i) {
|
for (i = begin(); i != end(); ++i) {
|
||||||
|
@ -292,7 +292,7 @@ void RoomDataList::saveToStream(WriteStream *stream) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RoomDataList::loadFromStream(ReadStream *stream) {
|
void RoomDataList::loadFromStream(Common::ReadStream *stream) {
|
||||||
RoomDataList::iterator i;
|
RoomDataList::iterator i;
|
||||||
byte data[ROOM_PATHS_HEIGHT * ROOM_PATHS_WIDTH];
|
byte data[ROOM_PATHS_HEIGHT * ROOM_PATHS_WIDTH];
|
||||||
|
|
||||||
|
@ -320,7 +320,7 @@ RoomExitJoinData::RoomExitJoinData(RoomExitJoinResource *rec) {
|
||||||
blocked = rec->blocked;
|
blocked = rec->blocked;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RoomExitJoinList::saveToStream(WriteStream *stream) {
|
void RoomExitJoinList::saveToStream(Common::WriteStream *stream) {
|
||||||
for (RoomExitJoinList::iterator i = begin(); i != end(); ++i) {
|
for (RoomExitJoinList::iterator i = begin(); i != end(); ++i) {
|
||||||
RoomExitJoinData *rec = (*i).get();
|
RoomExitJoinData *rec = (*i).get();
|
||||||
|
|
||||||
|
@ -337,7 +337,7 @@ void RoomExitJoinList::saveToStream(WriteStream *stream) {
|
||||||
stream->writeUint16LE(0xffff);
|
stream->writeUint16LE(0xffff);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RoomExitJoinList::loadFromStream(ReadStream *stream) {
|
void RoomExitJoinList::loadFromStream(Common::ReadStream *stream) {
|
||||||
for (RoomExitJoinList::iterator i = begin(); i != end(); ++i) {
|
for (RoomExitJoinList::iterator i = begin(); i != end(); ++i) {
|
||||||
RoomExitJoinData *rec = (*i).get();
|
RoomExitJoinData *rec = (*i).get();
|
||||||
|
|
||||||
|
@ -438,7 +438,7 @@ HotspotData::HotspotData(HotspotResource *rec) {
|
||||||
npcScheduleId = READ_LE_UINT16(&rec->npcSchedule);
|
npcScheduleId = READ_LE_UINT16(&rec->npcSchedule);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HotspotData::saveToStream(WriteStream *stream) {
|
void HotspotData::saveToStream(Common::WriteStream *stream) {
|
||||||
// Write out the basic fields
|
// Write out the basic fields
|
||||||
stream->writeUint16LE(nameId);
|
stream->writeUint16LE(nameId);
|
||||||
stream->writeUint16LE(descId);
|
stream->writeUint16LE(descId);
|
||||||
|
@ -484,7 +484,7 @@ void HotspotData::saveToStream(WriteStream *stream) {
|
||||||
stream->writeUint16LE(talkOverride);
|
stream->writeUint16LE(talkOverride);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HotspotData::loadFromStream(ReadStream *stream) {
|
void HotspotData::loadFromStream(Common::ReadStream *stream) {
|
||||||
// Read in the basic fields
|
// Read in the basic fields
|
||||||
nameId = stream->readUint16LE();
|
nameId = stream->readUint16LE();
|
||||||
descId = stream->readUint16LE();
|
descId = stream->readUint16LE();
|
||||||
|
@ -537,7 +537,7 @@ void HotspotData::loadFromStream(ReadStream *stream) {
|
||||||
|
|
||||||
// Hotspot data list
|
// Hotspot data list
|
||||||
|
|
||||||
void HotspotDataList::saveToStream(WriteStream *stream) {
|
void HotspotDataList::saveToStream(Common::WriteStream *stream) {
|
||||||
iterator i;
|
iterator i;
|
||||||
for (i = begin(); i != end(); ++i) {
|
for (i = begin(); i != end(); ++i) {
|
||||||
HotspotData *hotspot = (*i).get();
|
HotspotData *hotspot = (*i).get();
|
||||||
|
@ -547,7 +547,7 @@ void HotspotDataList::saveToStream(WriteStream *stream) {
|
||||||
stream->writeUint16LE(0);
|
stream->writeUint16LE(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HotspotDataList::loadFromStream(ReadStream *stream) {
|
void HotspotDataList::loadFromStream(Common::ReadStream *stream) {
|
||||||
Resources &res = Resources::getReference();
|
Resources &res = Resources::getReference();
|
||||||
uint16 hotspotId = stream->readUint16LE();
|
uint16 hotspotId = stream->readUint16LE();
|
||||||
while (hotspotId != 0) {
|
while (hotspotId != 0) {
|
||||||
|
@ -702,7 +702,7 @@ TalkEntryData *TalkData::getResponse(int index) {
|
||||||
|
|
||||||
// The following class acts as a container for all the NPC conversations
|
// The following class acts as a container for all the NPC conversations
|
||||||
|
|
||||||
void TalkDataList::saveToStream(WriteStream *stream) {
|
void TalkDataList::saveToStream(Common::WriteStream *stream) {
|
||||||
TalkDataList::iterator i;
|
TalkDataList::iterator i;
|
||||||
for (i = begin(); i != end(); ++i) {
|
for (i = begin(); i != end(); ++i) {
|
||||||
TalkData *rec = (*i).get();
|
TalkData *rec = (*i).get();
|
||||||
|
@ -715,7 +715,7 @@ void TalkDataList::saveToStream(WriteStream *stream) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TalkDataList::loadFromStream(ReadStream *stream) {
|
void TalkDataList::loadFromStream(Common::ReadStream *stream) {
|
||||||
TalkDataList::iterator i;
|
TalkDataList::iterator i;
|
||||||
for (i = begin(); i != end(); ++i) {
|
for (i = begin(); i != end(); ++i) {
|
||||||
TalkData *rec = (*i).get();
|
TalkData *rec = (*i).get();
|
||||||
|
@ -815,7 +815,7 @@ void SequenceDelayList::clear(bool forceClear) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SequenceDelayList::saveToStream(WriteStream *stream) {
|
void SequenceDelayList::saveToStream(Common::WriteStream *stream) {
|
||||||
SequenceDelayList::iterator i;
|
SequenceDelayList::iterator i;
|
||||||
|
|
||||||
for (i = begin(); i != end(); ++i) {
|
for (i = begin(); i != end(); ++i) {
|
||||||
|
@ -828,7 +828,7 @@ void SequenceDelayList::saveToStream(WriteStream *stream) {
|
||||||
stream->writeUint16LE(0);
|
stream->writeUint16LE(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SequenceDelayList::loadFromStream(ReadStream *stream) {
|
void SequenceDelayList::loadFromStream(Common::ReadStream *stream) {
|
||||||
clear(true);
|
clear(true);
|
||||||
uint16 seqOffset;
|
uint16 seqOffset;
|
||||||
|
|
||||||
|
@ -1374,7 +1374,7 @@ void CurrentActionEntry::setSupportData(uint16 entryId) {
|
||||||
setSupportData(newEntry);
|
setSupportData(newEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CurrentActionEntry::saveToStream(WriteStream *stream) {
|
void CurrentActionEntry::saveToStream(Common::WriteStream *stream) {
|
||||||
debugC(ERROR_DETAILED, kLureDebugAnimations, "Saving hotspot action entry dyn=%d id=%d",
|
debugC(ERROR_DETAILED, kLureDebugAnimations, "Saving hotspot action entry dyn=%d id=%d",
|
||||||
hasSupportData(), hasSupportData() ? supportData().id() : 0);
|
hasSupportData(), hasSupportData() ? supportData().id() : 0);
|
||||||
stream->writeByte((uint8) _action);
|
stream->writeByte((uint8) _action);
|
||||||
|
@ -1397,7 +1397,7 @@ void CurrentActionEntry::saveToStream(WriteStream *stream) {
|
||||||
debugC(ERROR_DETAILED, kLureDebugAnimations, "Finished saving hotspot action entry");
|
debugC(ERROR_DETAILED, kLureDebugAnimations, "Finished saving hotspot action entry");
|
||||||
}
|
}
|
||||||
|
|
||||||
CurrentActionEntry *CurrentActionEntry::loadFromStream(ReadStream *stream) {
|
CurrentActionEntry *CurrentActionEntry::loadFromStream(Common::ReadStream *stream) {
|
||||||
Resources &res = Resources::getReference();
|
Resources &res = Resources::getReference();
|
||||||
uint8 actionNum = stream->readByte();
|
uint8 actionNum = stream->readByte();
|
||||||
if (actionNum == 0xff) return NULL;
|
if (actionNum == 0xff) return NULL;
|
||||||
|
@ -1503,7 +1503,7 @@ void CurrentActionStack::list(char *buffer) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CurrentActionStack::saveToStream(WriteStream *stream) {
|
void CurrentActionStack::saveToStream(Common::WriteStream *stream) {
|
||||||
ActionsList::iterator i;
|
ActionsList::iterator i;
|
||||||
|
|
||||||
debugC(ERROR_DETAILED, kLureDebugAnimations, "Saving hotspot action stack");
|
debugC(ERROR_DETAILED, kLureDebugAnimations, "Saving hotspot action stack");
|
||||||
|
@ -1519,7 +1519,7 @@ void CurrentActionStack::saveToStream(WriteStream *stream) {
|
||||||
debugC(ERROR_DETAILED, kLureDebugAnimations, "Finished saving hotspot action stack");
|
debugC(ERROR_DETAILED, kLureDebugAnimations, "Finished saving hotspot action stack");
|
||||||
}
|
}
|
||||||
|
|
||||||
void CurrentActionStack::loadFromStream(ReadStream *stream) {
|
void CurrentActionStack::loadFromStream(Common::ReadStream *stream) {
|
||||||
CurrentActionEntry *rec;
|
CurrentActionEntry *rec;
|
||||||
|
|
||||||
_actions.clear();
|
_actions.clear();
|
||||||
|
|
|
@ -33,8 +33,6 @@
|
||||||
|
|
||||||
namespace Lure {
|
namespace Lure {
|
||||||
|
|
||||||
using namespace Common;
|
|
||||||
|
|
||||||
/*-------------------------------------------------------------------------*/
|
/*-------------------------------------------------------------------------*/
|
||||||
/* Structure definitions */
|
/* Structure definitions */
|
||||||
/* */
|
/* */
|
||||||
|
@ -337,8 +335,8 @@ public:
|
||||||
|
|
||||||
class RoomDataList: public Common::List<Common::SharedPtr<RoomData> > {
|
class RoomDataList: public Common::List<Common::SharedPtr<RoomData> > {
|
||||||
public:
|
public:
|
||||||
void saveToStream(WriteStream *stream);
|
void saveToStream(Common::WriteStream *stream);
|
||||||
void loadFromStream(ReadStream *stream);
|
void loadFromStream(Common::ReadStream *stream);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RoomExitJoinStruct {
|
struct RoomExitJoinStruct {
|
||||||
|
@ -360,8 +358,8 @@ public:
|
||||||
|
|
||||||
class RoomExitJoinList: public Common::List<Common::SharedPtr<RoomExitJoinData> > {
|
class RoomExitJoinList: public Common::List<Common::SharedPtr<RoomExitJoinData> > {
|
||||||
public:
|
public:
|
||||||
void saveToStream(WriteStream *stream);
|
void saveToStream(Common::WriteStream *stream);
|
||||||
void loadFromStream(ReadStream *stream);
|
void loadFromStream(Common::ReadStream *stream);
|
||||||
};
|
};
|
||||||
|
|
||||||
class HotspotActionData {
|
class HotspotActionData {
|
||||||
|
@ -451,8 +449,8 @@ public:
|
||||||
}
|
}
|
||||||
void setSupportData(uint16 entryId);
|
void setSupportData(uint16 entryId);
|
||||||
|
|
||||||
void saveToStream(WriteStream *stream);
|
void saveToStream(Common::WriteStream *stream);
|
||||||
static CurrentActionEntry *loadFromStream(ReadStream *stream);
|
static CurrentActionEntry *loadFromStream(Common::ReadStream *stream);
|
||||||
};
|
};
|
||||||
|
|
||||||
class CurrentActionStack {
|
class CurrentActionStack {
|
||||||
|
@ -500,8 +498,8 @@ public:
|
||||||
validateStack();
|
validateStack();
|
||||||
}
|
}
|
||||||
|
|
||||||
void saveToStream(WriteStream *stream);
|
void saveToStream(Common::WriteStream *stream);
|
||||||
void loadFromStream(ReadStream *stream);
|
void loadFromStream(Common::ReadStream *stream);
|
||||||
void copyFrom(CurrentActionStack &stack);
|
void copyFrom(CurrentActionStack &stack);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -564,14 +562,14 @@ public:
|
||||||
void enable() { flags |= 0x80; }
|
void enable() { flags |= 0x80; }
|
||||||
void disable() { flags &= 0x7F; }
|
void disable() { flags &= 0x7F; }
|
||||||
Direction nonVisualDirection() { return (Direction) scriptLoadFlag; }
|
Direction nonVisualDirection() { return (Direction) scriptLoadFlag; }
|
||||||
void saveToStream(WriteStream *stream);
|
void saveToStream(Common::WriteStream *stream);
|
||||||
void loadFromStream(ReadStream *stream);
|
void loadFromStream(Common::ReadStream *stream);
|
||||||
};
|
};
|
||||||
|
|
||||||
class HotspotDataList: public Common::List<Common::SharedPtr<HotspotData> > {
|
class HotspotDataList: public Common::List<Common::SharedPtr<HotspotData> > {
|
||||||
public:
|
public:
|
||||||
void saveToStream(WriteStream *stream);
|
void saveToStream(Common::WriteStream *stream);
|
||||||
void loadFromStream(ReadStream *stream);
|
void loadFromStream(Common::ReadStream *stream);
|
||||||
};
|
};
|
||||||
|
|
||||||
class HotspotOverrideData {
|
class HotspotOverrideData {
|
||||||
|
@ -658,8 +656,8 @@ public:
|
||||||
|
|
||||||
class TalkDataList: public Common::List<Common::SharedPtr<TalkData> > {
|
class TalkDataList: public Common::List<Common::SharedPtr<TalkData> > {
|
||||||
public:
|
public:
|
||||||
void saveToStream(WriteStream *stream);
|
void saveToStream(Common::WriteStream *stream);
|
||||||
void loadFromStream(ReadStream *stream);
|
void loadFromStream(Common::ReadStream *stream);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RoomExitCoordinateData {
|
struct RoomExitCoordinateData {
|
||||||
|
@ -717,8 +715,8 @@ public:
|
||||||
void tick();
|
void tick();
|
||||||
void clear(bool forceClear = false);
|
void clear(bool forceClear = false);
|
||||||
|
|
||||||
void saveToStream(WriteStream *stream);
|
void saveToStream(Common::WriteStream *stream);
|
||||||
void loadFromStream(ReadStream *stream);
|
void loadFromStream(Common::ReadStream *stream);
|
||||||
};
|
};
|
||||||
|
|
||||||
// The following classes holds the data for NPC schedules
|
// The following classes holds the data for NPC schedules
|
||||||
|
@ -739,7 +737,7 @@ public:
|
||||||
CharacterScheduleEntry *getEntry(uint16 id, CharacterScheduleSet *currentSet = NULL);
|
CharacterScheduleEntry *getEntry(uint16 id, CharacterScheduleSet *currentSet = NULL);
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef List<uint16> CharacterScheduleOffsets;
|
typedef Common::List<uint16> CharacterScheduleOffsets;
|
||||||
|
|
||||||
// The follow classes are used to store the NPC schedule Ids for the random actions a follower can do in each room
|
// The follow classes are used to store the NPC schedule Ids for the random actions a follower can do in each room
|
||||||
|
|
||||||
|
@ -889,7 +887,7 @@ enum FieldName {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PlayerNewPosition {
|
struct PlayerNewPosition {
|
||||||
Point position;
|
Common::Point position;
|
||||||
uint16 roomNumber;
|
uint16 roomNumber;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -445,8 +445,8 @@ void Room::update() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle second layer (layer 1) - do in order of Y axis
|
// Handle second layer (layer 1) - do in order of Y axis
|
||||||
List<Hotspot *> tempList;
|
Common::List<Hotspot *> tempList;
|
||||||
List<Hotspot *>::iterator iTemp;
|
Common::List<Hotspot *>::iterator iTemp;
|
||||||
for (i = hotspots.begin(); i != hotspots.end(); ++i) {
|
for (i = hotspots.begin(); i != hotspots.end(); ++i) {
|
||||||
Hotspot *h = (i.operator*()).get();
|
Hotspot *h = (i.operator*()).get();
|
||||||
if ((h->layer() != 1) || (h->roomNumber() != _roomNumber) ||
|
if ((h->layer() != 1) || (h->roomNumber() != _roomNumber) ||
|
||||||
|
@ -526,7 +526,7 @@ void Room::update() {
|
||||||
s.writeString(xctr * 8, yctr * 8 + 8, buffer, true);
|
s.writeString(xctr * 8, yctr * 8 + 8, buffer, true);
|
||||||
// } else if (v == 0xffff) {
|
// } else if (v == 0xffff) {
|
||||||
} else if (_roomData->paths.isOccupied(xctr, yctr)) {
|
} else if (_roomData->paths.isOccupied(xctr, yctr)) {
|
||||||
s.fillRect(Rect(xctr * 8, yctr * 8 + 8, xctr * 8 + 7, yctr * 8 + 15), 255);
|
s.fillRect(Common::Rect(xctr * 8, yctr * 8 + 8, xctr * 8 + 7, yctr * 8 + 15), 255);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,7 @@ SoundManager::~SoundManager() {
|
||||||
g_system->deleteMutex(_soundMutex);
|
g_system->deleteMutex(_soundMutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SoundManager::saveToStream(WriteStream *stream) {
|
void SoundManager::saveToStream(Common::WriteStream *stream) {
|
||||||
debugC(ERROR_BASIC, kLureDebugSounds, "SoundManager::saveToStream");
|
debugC(ERROR_BASIC, kLureDebugSounds, "SoundManager::saveToStream");
|
||||||
SoundListIterator i;
|
SoundListIterator i;
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ void SoundManager::saveToStream(WriteStream *stream) {
|
||||||
stream->writeByte(0xff);
|
stream->writeByte(0xff);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SoundManager::loadFromStream(ReadStream *stream) {
|
void SoundManager::loadFromStream(Common::ReadStream *stream) {
|
||||||
// Stop any existing sounds playing
|
// Stop any existing sounds playing
|
||||||
killSounds();
|
killSounds();
|
||||||
|
|
||||||
|
|
|
@ -133,8 +133,8 @@ public:
|
||||||
SoundManager();
|
SoundManager();
|
||||||
~SoundManager();
|
~SoundManager();
|
||||||
|
|
||||||
void saveToStream(WriteStream *stream);
|
void saveToStream(Common::WriteStream *stream);
|
||||||
void loadFromStream(ReadStream *stream);
|
void loadFromStream(Common::ReadStream *stream);
|
||||||
|
|
||||||
void loadSection(uint16 sectionId);
|
void loadSection(uint16 sectionId);
|
||||||
void killSounds();
|
void killSounds();
|
||||||
|
|
|
@ -235,7 +235,7 @@ void StringData::getString(uint16 stringId, char *dest, const char *hotspotName,
|
||||||
|
|
||||||
// WORKAROUND: Italian version had an unterminated Look description for Prisoner after cutting sack
|
// WORKAROUND: Italian version had an unterminated Look description for Prisoner after cutting sack
|
||||||
if ((charOffset == 0x1a08) && (charBitMask == 1) &&
|
if ((charOffset == 0x1a08) && (charBitMask == 1) &&
|
||||||
(LureEngine::getReference().getLanguage() == IT_ITA))
|
(LureEngine::getReference().getLanguage() == Common::IT_ITA))
|
||||||
// Hardcode for end of string
|
// Hardcode for end of string
|
||||||
ch = '\0';
|
ch = '\0';
|
||||||
else
|
else
|
||||||
|
|
|
@ -53,7 +53,7 @@ void Surface::initialise() {
|
||||||
int_font = disk.getEntry(FONT_RESOURCE_ID);
|
int_font = disk.getEntry(FONT_RESOURCE_ID);
|
||||||
int_dialog_frame = disk.getEntry(DIALOG_RESOURCE_ID);
|
int_dialog_frame = disk.getEntry(DIALOG_RESOURCE_ID);
|
||||||
|
|
||||||
if (LureEngine::getReference().getLanguage() == IT_ITA) {
|
if (LureEngine::getReference().getLanguage() == Common::IT_ITA) {
|
||||||
Common::copy(&char8A[0], &char8A[8], int_font->data() + (0x8A - 32) * 8);
|
Common::copy(&char8A[0], &char8A[8], int_font->data() + (0x8A - 32) * 8);
|
||||||
Common::copy(&char8D[0], &char8D[8], int_font->data() + (0x8D - 32) * 8);
|
Common::copy(&char8D[0], &char8D[8], int_font->data() + (0x8D - 32) * 8);
|
||||||
Common::copy(&char95[0], &char95[8], int_font->data() + (0x95 - 32) * 8);
|
Common::copy(&char95[0], &char95[8], int_font->data() + (0x95 - 32) * 8);
|
||||||
|
@ -189,7 +189,7 @@ void Surface::vgaCreateDialog(bool blackFlag) {
|
||||||
|
|
||||||
// Final processing - if black flag set, clear dialog inside area
|
// Final processing - if black flag set, clear dialog inside area
|
||||||
if (blackFlag) {
|
if (blackFlag) {
|
||||||
Rect r = Rect(VGA_DIALOG_EDGE_WIDTH, VGA_DIALOG_EDGE_WIDTH,
|
Common::Rect r = Common::Rect(VGA_DIALOG_EDGE_WIDTH, VGA_DIALOG_EDGE_WIDTH,
|
||||||
_width - VGA_DIALOG_EDGE_WIDTH, _height-VGA_DIALOG_EDGE_WIDTH);
|
_width - VGA_DIALOG_EDGE_WIDTH, _height-VGA_DIALOG_EDGE_WIDTH);
|
||||||
fillRect(r, 0);
|
fillRect(r, 0);
|
||||||
}
|
}
|
||||||
|
@ -304,14 +304,14 @@ void Surface::copyTo(Surface *dest, uint16 x, uint16 y) {
|
||||||
dest->data().copyFrom(_data, 0, y * _width, dataSize);
|
dest->data().copyFrom(_data, 0, y * _width, dataSize);
|
||||||
} else {
|
} else {
|
||||||
// Use slower transfer
|
// Use slower transfer
|
||||||
Rect rect;
|
Common::Rect rect;
|
||||||
rect.left = 0; rect.top = 0;
|
rect.left = 0; rect.top = 0;
|
||||||
rect.right = _width-1; rect.bottom = _height-1;
|
rect.right = _width-1; rect.bottom = _height-1;
|
||||||
copyTo(dest, rect, x, y);
|
copyTo(dest, rect, x, y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Surface::copyTo(Surface *dest, const Rect &srcBounds,
|
void Surface::copyTo(Surface *dest, const Common::Rect &srcBounds,
|
||||||
uint16 destX, uint16 destY, int transparentColour) {
|
uint16 destX, uint16 destY, int transparentColour) {
|
||||||
int numBytes = srcBounds.right - srcBounds.left + 1;
|
int numBytes = srcBounds.right - srcBounds.left + 1;
|
||||||
if (destX + numBytes > dest->width())
|
if (destX + numBytes > dest->width())
|
||||||
|
@ -349,7 +349,7 @@ void Surface::copyFrom(MemoryBlock *src, uint32 destOffset) {
|
||||||
// fillRect
|
// fillRect
|
||||||
// Fills a rectangular area with a colour
|
// Fills a rectangular area with a colour
|
||||||
|
|
||||||
void Surface::fillRect(const Rect &r, uint8 colour) {
|
void Surface::fillRect(const Common::Rect &r, uint8 colour) {
|
||||||
for (int yp = r.top; yp <= r.bottom; ++yp) {
|
for (int yp = r.top; yp <= r.bottom; ++yp) {
|
||||||
byte *const addr = _data->data() + (yp * _width) + r.left;
|
byte *const addr = _data->data() + (yp * _width) + r.left;
|
||||||
memset(addr, colour, r.width());
|
memset(addr, colour, r.width());
|
||||||
|
@ -465,7 +465,7 @@ void Surface::wordWrap(char *text, uint16 width, char **&lines, uint8 &numLines)
|
||||||
|
|
||||||
Surface *Surface::newDialog(uint16 width, uint8 numLines, const char **lines, bool varLength,
|
Surface *Surface::newDialog(uint16 width, uint8 numLines, const char **lines, bool varLength,
|
||||||
int colour, bool squashedLines) {
|
int colour, bool squashedLines) {
|
||||||
Point size;
|
Common::Point size;
|
||||||
Surface::getDialogBounds(size, 0, numLines, squashedLines);
|
Surface::getDialogBounds(size, 0, numLines, squashedLines);
|
||||||
|
|
||||||
Surface *s = new Surface(width, size.y);
|
Surface *s = new Surface(width, size.y);
|
||||||
|
@ -511,7 +511,7 @@ bool Surface::getString(Common::String &line, int maxSize, bool isNumeric, bool
|
||||||
Events &events = Events::getReference();
|
Events &events = Events::getReference();
|
||||||
Screen &screen = Screen::getReference();
|
Screen &screen = Screen::getReference();
|
||||||
uint8 bgColour = *(screen.screen().data().data() + (y * FULL_SCREEN_WIDTH) + x);
|
uint8 bgColour = *(screen.screen().data().data() + (y * FULL_SCREEN_WIDTH) + x);
|
||||||
String newLine(line);
|
Common::String newLine(line);
|
||||||
bool abortFlag = false;
|
bool abortFlag = false;
|
||||||
bool refreshFlag = false;
|
bool refreshFlag = false;
|
||||||
|
|
||||||
|
@ -545,7 +545,7 @@ bool Surface::getString(Common::String &line, int maxSize, bool isNumeric, bool
|
||||||
if ((keycode == Common::KEYCODE_RETURN) || (keycode == Common::KEYCODE_KP_ENTER)) {
|
if ((keycode == Common::KEYCODE_RETURN) || (keycode == Common::KEYCODE_KP_ENTER)) {
|
||||||
// Return character
|
// Return character
|
||||||
screen.screen().fillRect(
|
screen.screen().fillRect(
|
||||||
Rect(x, y, x + maxSize - 1, y + FONT_HEIGHT), bgColour);
|
Common::Rect(x, y, x + maxSize - 1, y + FONT_HEIGHT), bgColour);
|
||||||
screen.update();
|
screen.update();
|
||||||
newLine.deleteLastChar();
|
newLine.deleteLastChar();
|
||||||
line = newLine;
|
line = newLine;
|
||||||
|
@ -556,7 +556,7 @@ bool Surface::getString(Common::String &line, int maxSize, bool isNumeric, bool
|
||||||
else if (keycode == Common::KEYCODE_ESCAPE) {
|
else if (keycode == Common::KEYCODE_ESCAPE) {
|
||||||
// Escape character
|
// Escape character
|
||||||
screen.screen().fillRect(
|
screen.screen().fillRect(
|
||||||
Rect(x, y, x + maxSize - 1, y + FONT_HEIGHT), bgColour);
|
Common::Rect(x, y, x + maxSize - 1, y + FONT_HEIGHT), bgColour);
|
||||||
screen.update();
|
screen.update();
|
||||||
abortFlag = true;
|
abortFlag = true;
|
||||||
} else if (keycode == Common::KEYCODE_BACKSPACE) {
|
} else if (keycode == Common::KEYCODE_BACKSPACE) {
|
||||||
|
@ -564,14 +564,14 @@ bool Surface::getString(Common::String &line, int maxSize, bool isNumeric, bool
|
||||||
if (newLine.size() == 1) continue;
|
if (newLine.size() == 1) continue;
|
||||||
|
|
||||||
screen.screen().fillRect(
|
screen.screen().fillRect(
|
||||||
Rect(x, y, x + maxSize - 1, y + FONT_HEIGHT), bgColour);
|
Common::Rect(x, y, x + maxSize - 1, y + FONT_HEIGHT), bgColour);
|
||||||
newLine.deleteChar(newLine.size() - 2);
|
newLine.deleteChar(newLine.size() - 2);
|
||||||
refreshFlag = true;
|
refreshFlag = true;
|
||||||
|
|
||||||
} else if ((ch >= ' ') && (stringSize + 8 < maxSize)) {
|
} else if ((ch >= ' ') && (stringSize + 8 < maxSize)) {
|
||||||
if (((ch >= '0') && (ch <= '9')) || !isNumeric) {
|
if (((ch >= '0') && (ch <= '9')) || !isNumeric) {
|
||||||
screen.screen().fillRect(
|
screen.screen().fillRect(
|
||||||
Rect(x, y, x + maxSize - 1, y + FONT_HEIGHT), bgColour);
|
Common::Rect(x, y, x + maxSize - 1, y + FONT_HEIGHT), bgColour);
|
||||||
newLine.insertChar(ch, newLine.size() - 1);
|
newLine.insertChar(ch, newLine.size() - 1);
|
||||||
refreshFlag = true;
|
refreshFlag = true;
|
||||||
}
|
}
|
||||||
|
@ -663,7 +663,7 @@ int TalkDialog::getArticle(uint16 msgId, uint16 objId) {
|
||||||
Common::Language language = LureEngine::getReference().getLanguage();
|
Common::Language language = LureEngine::getReference().getLanguage();
|
||||||
int id = objId & 0xe000;
|
int id = objId & 0xe000;
|
||||||
|
|
||||||
if (language == DE_DEU) {
|
if (language == Common::DE_DEU) {
|
||||||
// Special handling for German language
|
// Special handling for German language
|
||||||
|
|
||||||
for (int sectionIndex = 0; sectionIndex < 4; ++sectionIndex) {
|
for (int sectionIndex = 0; sectionIndex < 4; ++sectionIndex) {
|
||||||
|
@ -689,7 +689,7 @@ int TalkDialog::getArticle(uint16 msgId, uint16 objId) {
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
} else if (language == ES_ESP) {
|
} else if (language == Common::ES_ESP) {
|
||||||
// Special handling for Spanish langugae
|
// Special handling for Spanish langugae
|
||||||
const uint16 *tlData = (msgId == 158) ? spanish_pre_e1_type_tl : spanish_others_tl;
|
const uint16 *tlData = (msgId == 158) ? spanish_pre_e1_type_tl : spanish_others_tl;
|
||||||
|
|
||||||
|
@ -928,7 +928,7 @@ bool SaveRestoreDialog::show(bool saveDialog) {
|
||||||
int index;
|
int index;
|
||||||
|
|
||||||
// Figure out a list of present savegames
|
// Figure out a list of present savegames
|
||||||
String **saveNames = (String **)Memory::alloc(sizeof(String *) * MAX_SAVEGAME_SLOTS);
|
Common::String **saveNames = (Common::String **)Memory::alloc(sizeof(Common::String *) * MAX_SAVEGAME_SLOTS);
|
||||||
int numSaves = 0;
|
int numSaves = 0;
|
||||||
while ((numSaves < MAX_SAVEGAME_SLOTS) &&
|
while ((numSaves < MAX_SAVEGAME_SLOTS) &&
|
||||||
((saveNames[numSaves] = engine.detectSave(numSaves + 1)) != NULL))
|
((saveNames[numSaves] = engine.detectSave(numSaves + 1)) != NULL))
|
||||||
|
@ -937,7 +937,7 @@ bool SaveRestoreDialog::show(bool saveDialog) {
|
||||||
// For the save dialog, if all the slots have not been used up, create a
|
// For the save dialog, if all the slots have not been used up, create a
|
||||||
// blank entry for a new savegame
|
// blank entry for a new savegame
|
||||||
if (saveDialog && (numSaves < MAX_SAVEGAME_SLOTS))
|
if (saveDialog && (numSaves < MAX_SAVEGAME_SLOTS))
|
||||||
saveNames[numSaves++] = new String();
|
saveNames[numSaves++] = new Common::String();
|
||||||
|
|
||||||
// For the restore dialog, if there are no savegames, return immediately
|
// For the restore dialog, if there are no savegames, return immediately
|
||||||
if (!saveDialog && (numSaves == 0)) {
|
if (!saveDialog && (numSaves == 0)) {
|
||||||
|
@ -1114,9 +1114,9 @@ struct RestartRecord {
|
||||||
};
|
};
|
||||||
|
|
||||||
static const RestartRecord buttonBounds[] = {
|
static const RestartRecord buttonBounds[] = {
|
||||||
{ EN_ANY, 48, 14, { 118, 152 }, { 168, 152 } },
|
{ Common::EN_ANY, 48, 14, { 118, 152 }, { 168, 152 } },
|
||||||
{ DE_DEU, 48, 14, { 106, 152 }, { 168, 152 } },
|
{ Common::DE_DEU, 48, 14, { 106, 152 }, { 168, 152 } },
|
||||||
{ UNK_LANG, 48, 14, { 112, 152 }, { 168, 152 } }
|
{ Common::UNK_LANG, 48, 14, { 112, 152 }, { 168, 152 } }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -1132,7 +1132,7 @@ bool RestartRestoreDialog::show() {
|
||||||
mouse.setCursorNum(CURSOR_ARROW);
|
mouse.setCursorNum(CURSOR_ARROW);
|
||||||
|
|
||||||
// See if there are any savegames that can be restored
|
// See if there are any savegames that can be restored
|
||||||
String *firstSave = engine.detectSave(1);
|
Common::String *firstSave = engine.detectSave(1);
|
||||||
bool restartFlag = (firstSave == NULL);
|
bool restartFlag = (firstSave == NULL);
|
||||||
int highlightedButton = -1;
|
int highlightedButton = -1;
|
||||||
|
|
||||||
|
@ -1142,7 +1142,7 @@ bool RestartRestoreDialog::show() {
|
||||||
// Get the correct button bounds record to use
|
// Get the correct button bounds record to use
|
||||||
const RestartRecord *btnRecord = &buttonBounds[0];
|
const RestartRecord *btnRecord = &buttonBounds[0];
|
||||||
while ((btnRecord->Language != engine.getLanguage()) &&
|
while ((btnRecord->Language != engine.getLanguage()) &&
|
||||||
(btnRecord->Language != UNK_LANG))
|
(btnRecord->Language != Common::UNK_LANG))
|
||||||
++btnRecord;
|
++btnRecord;
|
||||||
|
|
||||||
// Fade out the screen
|
// Fade out the screen
|
||||||
|
@ -1256,21 +1256,21 @@ struct ItemDesc {
|
||||||
#define NUMBER_HEADER 0x1842
|
#define NUMBER_HEADER 0x1842
|
||||||
|
|
||||||
static const ItemDesc copyProtectElements[] = {
|
static const ItemDesc copyProtectElements[] = {
|
||||||
{UNK_LANG, 104, 96, 32, 48, PROT_SPR_HEADER, 0},
|
{Common::UNK_LANG, 104, 96, 32, 48, PROT_SPR_HEADER, 0},
|
||||||
{UNK_LANG, 179, 96, 32, 48, PROT_SPR_HEADER, 0},
|
{Common::UNK_LANG, 179, 96, 32, 48, PROT_SPR_HEADER, 0},
|
||||||
|
|
||||||
{EN_ANY, 57, 40, 208, 40, WORDING_HEADER, 32},
|
{Common::EN_ANY, 57, 40, 208, 40, WORDING_HEADER, 32},
|
||||||
{FR_FRA, 57, 40, 208, 40, WORDING_HEADER, 32},
|
{Common::FR_FRA, 57, 40, 208, 40, WORDING_HEADER, 32},
|
||||||
{DE_DEU, 39, 30, 240, 53, WORDING_HEADER, 32},
|
{Common::DE_DEU, 39, 30, 240, 53, WORDING_HEADER, 32},
|
||||||
{NL_NLD, 57, 40, 208, 40, WORDING_HEADER, 32},
|
{Common::NL_NLD, 57, 40, 208, 40, WORDING_HEADER, 32},
|
||||||
{ES_ESP, 57, 40, 208, 40, WORDING_HEADER, 32},
|
{Common::ES_ESP, 57, 40, 208, 40, WORDING_HEADER, 32},
|
||||||
{IT_ITA, 57, 40, 208, 40, WORDING_HEADER, 32},
|
{Common::IT_ITA, 57, 40, 208, 40, WORDING_HEADER, 32},
|
||||||
|
|
||||||
{UNK_LANG, 138, 168, 16, 8, NUMBER_HEADER, 32},
|
{Common::UNK_LANG, 138, 168, 16, 8, NUMBER_HEADER, 32},
|
||||||
{UNK_LANG, 145, 168, 16, 8, NUMBER_HEADER, 32},
|
{Common::UNK_LANG, 145, 168, 16, 8, NUMBER_HEADER, 32},
|
||||||
{UNK_LANG, 164, 168, 16, 8, NUMBER_HEADER, 32},
|
{Common::UNK_LANG, 164, 168, 16, 8, NUMBER_HEADER, 32},
|
||||||
{UNK_LANG, 171, 168, 16, 8, NUMBER_HEADER, 32},
|
{Common::UNK_LANG, 171, 168, 16, 8, NUMBER_HEADER, 32},
|
||||||
{UNK_LANG, 0, 0, 0, 0, 0, 0}
|
{Common::UNK_LANG, 0, 0, 0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
int pageNumbers[20] = {
|
int pageNumbers[20] = {
|
||||||
|
@ -1282,7 +1282,7 @@ CopyProtectionDialog::CopyProtectionDialog() {
|
||||||
|
|
||||||
const ItemDesc *ptr = ©ProtectElements[0];
|
const ItemDesc *ptr = ©ProtectElements[0];
|
||||||
while ((ptr->width != 0) || (ptr->height != 0)) {
|
while ((ptr->width != 0) || (ptr->height != 0)) {
|
||||||
if ((ptr->language == UNK_LANG) || (ptr->language == engine.getLanguage())) {
|
if ((ptr->language == Common::UNK_LANG) || (ptr->language == engine.getLanguage())) {
|
||||||
Hotspot *h = new Hotspot();
|
Hotspot *h = new Hotspot();
|
||||||
h->setPosition(ptr->x, ptr->y);
|
h->setPosition(ptr->x, ptr->y);
|
||||||
h->setSize(ptr->width, ptr->height);
|
h->setSize(ptr->width, ptr->height);
|
||||||
|
|
|
@ -32,8 +32,6 @@
|
||||||
#include "lure/disk.h"
|
#include "lure/disk.h"
|
||||||
#include "lure/luredefs.h"
|
#include "lure/luredefs.h"
|
||||||
|
|
||||||
using namespace Common;
|
|
||||||
|
|
||||||
namespace Lure {
|
namespace Lure {
|
||||||
|
|
||||||
#define DEFAULT_TEXT_COLOUR -1
|
#define DEFAULT_TEXT_COLOUR -1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue