mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 06:41:51 +00:00
LURE: Remove evil 'using namespace' from header files
svn-id: r47396
This commit is contained in:
parent
dc5e08e623
commit
bce959e046
@ -45,12 +45,12 @@ Common::Platform LureEngine::getPlatform() const { return _gameDescription->desc
|
||||
|
||||
LureLanguage LureEngine::getLureLanguage() const {
|
||||
switch (_gameDescription->desc.language) {
|
||||
case IT_ITA: return LANG_IT_ITA;
|
||||
case FR_FRA: return LANG_FR_FRA;
|
||||
case DE_DEU: return LANG_DE_DEU;
|
||||
case ES_ESP: return LANG_ES_ESP;
|
||||
case EN_ANY: return LANG_EN_ANY;
|
||||
case UNK_LANG: return LANG_UNKNOWN;
|
||||
case Common::IT_ITA: return LANG_IT_ITA;
|
||||
case Common::FR_FRA: return LANG_FR_FRA;
|
||||
case Common::DE_DEU: return LANG_DE_DEU;
|
||||
case Common::ES_ESP: return LANG_ES_ESP;
|
||||
case Common::EN_ANY: return LANG_EN_ANY;
|
||||
case Common::UNK_LANG: return LANG_UNKNOWN;
|
||||
default:
|
||||
error("Unknown game language");
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ void FightsManager::checkEvents() {
|
||||
_keyDown = KS_UP;
|
||||
|
||||
} 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)
|
||||
mouse.setCursorNum(CURSOR_LEFT_ARROW);
|
||||
else if (mPos.x > rec.fwtrue_x + player->width())
|
||||
|
@ -349,7 +349,7 @@ void Game::playerChangeRoom() {
|
||||
|
||||
uint16 roomNum = fields.playerNewPos().roomNumber;
|
||||
fields.playerNewPos().roomNumber = 0;
|
||||
Point &newPos = fields.playerNewPos().position;
|
||||
Common::Point &newPos = fields.playerNewPos().position;
|
||||
|
||||
delayList.clear();
|
||||
|
||||
@ -991,9 +991,9 @@ bool Game::getYN() {
|
||||
|
||||
Common::Language l = LureEngine::getReference().getLanguage();
|
||||
Common::KeyCode y = Common::KEYCODE_y;
|
||||
if (l == FR_FRA) y = Common::KEYCODE_o;
|
||||
else if ((l == DE_DEU) || (l == NL_NLD)) y = Common::KEYCODE_j;
|
||||
else if ((l == ES_ESP) || (l == IT_ITA)) y = Common::KEYCODE_s;
|
||||
if (l == Common::FR_FRA) y = Common::KEYCODE_o;
|
||||
else if ((l == Common::DE_DEU) || (l == Common::NL_NLD)) y = Common::KEYCODE_j;
|
||||
else if ((l == Common::ES_ESP) || (l == Common::IT_ITA)) y = Common::KEYCODE_s;
|
||||
|
||||
bool vKbdFlag = g_system->hasFeature(OSystem::kFeatureVirtualKeyboard);
|
||||
if (!vKbdFlag)
|
||||
@ -1055,12 +1055,12 @@ bool Game::isMenuAvailable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void Game::saveToStream(WriteStream *stream) {
|
||||
void Game::saveToStream(Common::WriteStream *stream) {
|
||||
stream->writeByte(_fastTextFlag);
|
||||
stream->writeByte(_soundFlag);
|
||||
}
|
||||
|
||||
void Game::loadFromStream(ReadStream *stream) {
|
||||
void Game::loadFromStream(Common::ReadStream *stream) {
|
||||
Menu &menu = Menu::getReference();
|
||||
StringList &sl = Resources::getReference().stringList();
|
||||
|
||||
|
@ -75,8 +75,8 @@ public:
|
||||
|
||||
static bool isCreated();
|
||||
static Game &getReference();
|
||||
void saveToStream(WriteStream *stream);
|
||||
void loadFromStream(ReadStream *stream);
|
||||
void saveToStream(Common::WriteStream *stream);
|
||||
void loadFromStream(Common::ReadStream *stream);
|
||||
|
||||
void tick();
|
||||
void tickCheck();
|
||||
|
@ -375,7 +375,7 @@ void Hotspot::copyTo(Surface *dest) {
|
||||
uint16 hWidth = _frameWidth;
|
||||
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) {
|
||||
assert(_frameNumber < MAX_NUM_FRAMES);
|
||||
r.left = _frameStarts[_frameNumber];
|
||||
@ -1153,7 +1153,7 @@ bool Hotspot::doorCloseCheck(uint16 doorId) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Rect bounds(doorHotspot->x(), doorHotspot->y() + doorHotspot->heightCopy()
|
||||
Common::Rect bounds(doorHotspot->x(), doorHotspot->y() + doorHotspot->heightCopy()
|
||||
- doorHotspot->yCorrection() - doorHotspot->charRectY(),
|
||||
doorHotspot->x() + doorHotspot->widthCopy(),
|
||||
doorHotspot->y() + doorHotspot->heightCopy() + doorHotspot->charRectY());
|
||||
@ -2226,7 +2226,7 @@ uint16 Hotspot::getTalkId(HotspotData *charHotspot) {
|
||||
Resources &res = Resources::getReference();
|
||||
uint16 talkIndex;
|
||||
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 (charHotspot->talkOverride != 0) {
|
||||
@ -3397,7 +3397,7 @@ void HotspotTickHandlers::talkAnimHandler(Hotspot &h) {
|
||||
TalkEntryList &entries = data->entries;
|
||||
Hotspot *charHotspot;
|
||||
char buffer[MAX_DESC_SIZE];
|
||||
Rect r;
|
||||
Common::Rect r;
|
||||
int lineNum, numLines;
|
||||
int selectedLine, responseNumber;
|
||||
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 numImpinging = 0;
|
||||
Resources &res = Resources::getReference();
|
||||
Rect r;
|
||||
Common::Rect r;
|
||||
uint16 hotspotY;
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
void HotspotList::saveToStream(WriteStream *stream) {
|
||||
void HotspotList::saveToStream(Common::WriteStream *stream) {
|
||||
HotspotList::iterator i;
|
||||
for (i = begin(); i != end(); ++i) {
|
||||
Hotspot *hotspot = (*i).get();
|
||||
@ -4674,7 +4674,7 @@ void HotspotList::saveToStream(WriteStream *stream) {
|
||||
stream->writeUint16LE(0);
|
||||
}
|
||||
|
||||
void HotspotList::loadFromStream(ReadStream *stream) {
|
||||
void HotspotList::loadFromStream(Common::ReadStream *stream) {
|
||||
Resources &res = Resources::getReference();
|
||||
Hotspot *hotspot;
|
||||
|
||||
|
@ -176,7 +176,7 @@ enum BarPlaceResult {BP_KEEP_TRYING, BP_GOT_THERE, BP_FAIL};
|
||||
|
||||
struct DestStructure {
|
||||
uint8 counter;
|
||||
Point position;
|
||||
Common::Point position;
|
||||
};
|
||||
|
||||
|
||||
@ -487,8 +487,8 @@ public:
|
||||
|
||||
class HotspotList: public Common::List<Common::SharedPtr<Hotspot> > {
|
||||
public:
|
||||
void saveToStream(WriteStream *stream);
|
||||
void loadFromStream(ReadStream *stream);
|
||||
void saveToStream(Common::WriteStream *stream);
|
||||
void loadFromStream(Common::ReadStream *stream);
|
||||
};
|
||||
|
||||
} // End of namespace Lure
|
||||
|
@ -126,7 +126,7 @@ public:
|
||||
return loadGame(slot) ? Common::kReadingFailed : Common::kNoError;
|
||||
}
|
||||
virtual Common::Error saveGameState(int slot, const char *desc) {
|
||||
String s(desc);
|
||||
Common::String s(desc);
|
||||
return saveGame(slot, s) ? Common::kReadingFailed : Common::kNoError;
|
||||
}
|
||||
virtual bool canLoadGameStateCurrently() {
|
||||
|
@ -72,12 +72,12 @@ const char *MenuRecord::getEntry(uint8 index) {
|
||||
static Menu *int_menu = NULL;
|
||||
|
||||
const MenuRecordLanguage menuList[] = {
|
||||
{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}}},
|
||||
{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}}},
|
||||
{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::EN_ANY, {{40, 87, 3, 7}, {127, 179, 13, 12}, {224, 281, 27, 10}}},
|
||||
{Common::IT_ITA, {{40, 98, 4, 6}, {120, 195, 14, 11}, {208, 281, 24, 13}}},
|
||||
{Common::FR_FRA, {{40, 90, 3, 7}, {120, 195, 13, 11}, {232, 273, 23, 13}}},
|
||||
{Common::DE_DEU, {{44, 95, 1, 11}, {135, 178, 8, 23}, {232, 273, 22, 15}}},
|
||||
{Common::ES_ESP, {{40, 90, 3, 8}, {120, 195, 11, 13}, {208, 281, 17, 18}}},
|
||||
{Common::UNK_LANG, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}}
|
||||
};
|
||||
|
||||
Menu::Menu() {
|
||||
@ -91,9 +91,9 @@ Menu::Menu() {
|
||||
delete data;
|
||||
|
||||
const MenuRecordLanguage *rec = &menuList[0];
|
||||
while ((rec->language != UNK_LANG) && (rec->language != language))
|
||||
while ((rec->language != Common::UNK_LANG) && (rec->language != language))
|
||||
++rec;
|
||||
if (rec->language == UNK_LANG)
|
||||
if (rec->language == Common::UNK_LANG)
|
||||
error("Unknown language encountered in top line handler");
|
||||
|
||||
_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();
|
||||
OSystem &system = *g_system;
|
||||
Screen &screen = Screen::getReference();
|
||||
Rect r;
|
||||
Common::Rect r;
|
||||
bool isEGA = LureEngine::getReference().isEGA();
|
||||
byte bgColour = isEGA ? EGA_DIALOG_BG_COLOUR : 0;
|
||||
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
|
||||
|
||||
void RoomDataList::saveToStream(WriteStream *stream) {
|
||||
void RoomDataList::saveToStream(Common::WriteStream *stream) {
|
||||
RoomDataList::iterator 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;
|
||||
byte data[ROOM_PATHS_HEIGHT * ROOM_PATHS_WIDTH];
|
||||
|
||||
@ -320,7 +320,7 @@ RoomExitJoinData::RoomExitJoinData(RoomExitJoinResource *rec) {
|
||||
blocked = rec->blocked;
|
||||
}
|
||||
|
||||
void RoomExitJoinList::saveToStream(WriteStream *stream) {
|
||||
void RoomExitJoinList::saveToStream(Common::WriteStream *stream) {
|
||||
for (RoomExitJoinList::iterator i = begin(); i != end(); ++i) {
|
||||
RoomExitJoinData *rec = (*i).get();
|
||||
|
||||
@ -337,7 +337,7 @@ void RoomExitJoinList::saveToStream(WriteStream *stream) {
|
||||
stream->writeUint16LE(0xffff);
|
||||
}
|
||||
|
||||
void RoomExitJoinList::loadFromStream(ReadStream *stream) {
|
||||
void RoomExitJoinList::loadFromStream(Common::ReadStream *stream) {
|
||||
for (RoomExitJoinList::iterator i = begin(); i != end(); ++i) {
|
||||
RoomExitJoinData *rec = (*i).get();
|
||||
|
||||
@ -438,7 +438,7 @@ HotspotData::HotspotData(HotspotResource *rec) {
|
||||
npcScheduleId = READ_LE_UINT16(&rec->npcSchedule);
|
||||
}
|
||||
|
||||
void HotspotData::saveToStream(WriteStream *stream) {
|
||||
void HotspotData::saveToStream(Common::WriteStream *stream) {
|
||||
// Write out the basic fields
|
||||
stream->writeUint16LE(nameId);
|
||||
stream->writeUint16LE(descId);
|
||||
@ -484,7 +484,7 @@ void HotspotData::saveToStream(WriteStream *stream) {
|
||||
stream->writeUint16LE(talkOverride);
|
||||
}
|
||||
|
||||
void HotspotData::loadFromStream(ReadStream *stream) {
|
||||
void HotspotData::loadFromStream(Common::ReadStream *stream) {
|
||||
// Read in the basic fields
|
||||
nameId = stream->readUint16LE();
|
||||
descId = stream->readUint16LE();
|
||||
@ -537,7 +537,7 @@ void HotspotData::loadFromStream(ReadStream *stream) {
|
||||
|
||||
// Hotspot data list
|
||||
|
||||
void HotspotDataList::saveToStream(WriteStream *stream) {
|
||||
void HotspotDataList::saveToStream(Common::WriteStream *stream) {
|
||||
iterator i;
|
||||
for (i = begin(); i != end(); ++i) {
|
||||
HotspotData *hotspot = (*i).get();
|
||||
@ -547,7 +547,7 @@ void HotspotDataList::saveToStream(WriteStream *stream) {
|
||||
stream->writeUint16LE(0);
|
||||
}
|
||||
|
||||
void HotspotDataList::loadFromStream(ReadStream *stream) {
|
||||
void HotspotDataList::loadFromStream(Common::ReadStream *stream) {
|
||||
Resources &res = Resources::getReference();
|
||||
uint16 hotspotId = stream->readUint16LE();
|
||||
while (hotspotId != 0) {
|
||||
@ -702,7 +702,7 @@ TalkEntryData *TalkData::getResponse(int index) {
|
||||
|
||||
// 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;
|
||||
for (i = begin(); i != end(); ++i) {
|
||||
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;
|
||||
for (i = begin(); i != end(); ++i) {
|
||||
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;
|
||||
|
||||
for (i = begin(); i != end(); ++i) {
|
||||
@ -828,7 +828,7 @@ void SequenceDelayList::saveToStream(WriteStream *stream) {
|
||||
stream->writeUint16LE(0);
|
||||
}
|
||||
|
||||
void SequenceDelayList::loadFromStream(ReadStream *stream) {
|
||||
void SequenceDelayList::loadFromStream(Common::ReadStream *stream) {
|
||||
clear(true);
|
||||
uint16 seqOffset;
|
||||
|
||||
@ -1374,7 +1374,7 @@ void CurrentActionEntry::setSupportData(uint16 entryId) {
|
||||
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",
|
||||
hasSupportData(), hasSupportData() ? supportData().id() : 0);
|
||||
stream->writeByte((uint8) _action);
|
||||
@ -1397,7 +1397,7 @@ void CurrentActionEntry::saveToStream(WriteStream *stream) {
|
||||
debugC(ERROR_DETAILED, kLureDebugAnimations, "Finished saving hotspot action entry");
|
||||
}
|
||||
|
||||
CurrentActionEntry *CurrentActionEntry::loadFromStream(ReadStream *stream) {
|
||||
CurrentActionEntry *CurrentActionEntry::loadFromStream(Common::ReadStream *stream) {
|
||||
Resources &res = Resources::getReference();
|
||||
uint8 actionNum = stream->readByte();
|
||||
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;
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
void CurrentActionStack::loadFromStream(ReadStream *stream) {
|
||||
void CurrentActionStack::loadFromStream(Common::ReadStream *stream) {
|
||||
CurrentActionEntry *rec;
|
||||
|
||||
_actions.clear();
|
||||
|
@ -33,8 +33,6 @@
|
||||
|
||||
namespace Lure {
|
||||
|
||||
using namespace Common;
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/* Structure definitions */
|
||||
/* */
|
||||
@ -337,8 +335,8 @@ public:
|
||||
|
||||
class RoomDataList: public Common::List<Common::SharedPtr<RoomData> > {
|
||||
public:
|
||||
void saveToStream(WriteStream *stream);
|
||||
void loadFromStream(ReadStream *stream);
|
||||
void saveToStream(Common::WriteStream *stream);
|
||||
void loadFromStream(Common::ReadStream *stream);
|
||||
};
|
||||
|
||||
struct RoomExitJoinStruct {
|
||||
@ -360,8 +358,8 @@ public:
|
||||
|
||||
class RoomExitJoinList: public Common::List<Common::SharedPtr<RoomExitJoinData> > {
|
||||
public:
|
||||
void saveToStream(WriteStream *stream);
|
||||
void loadFromStream(ReadStream *stream);
|
||||
void saveToStream(Common::WriteStream *stream);
|
||||
void loadFromStream(Common::ReadStream *stream);
|
||||
};
|
||||
|
||||
class HotspotActionData {
|
||||
@ -451,8 +449,8 @@ public:
|
||||
}
|
||||
void setSupportData(uint16 entryId);
|
||||
|
||||
void saveToStream(WriteStream *stream);
|
||||
static CurrentActionEntry *loadFromStream(ReadStream *stream);
|
||||
void saveToStream(Common::WriteStream *stream);
|
||||
static CurrentActionEntry *loadFromStream(Common::ReadStream *stream);
|
||||
};
|
||||
|
||||
class CurrentActionStack {
|
||||
@ -500,8 +498,8 @@ public:
|
||||
validateStack();
|
||||
}
|
||||
|
||||
void saveToStream(WriteStream *stream);
|
||||
void loadFromStream(ReadStream *stream);
|
||||
void saveToStream(Common::WriteStream *stream);
|
||||
void loadFromStream(Common::ReadStream *stream);
|
||||
void copyFrom(CurrentActionStack &stack);
|
||||
};
|
||||
|
||||
@ -564,14 +562,14 @@ public:
|
||||
void enable() { flags |= 0x80; }
|
||||
void disable() { flags &= 0x7F; }
|
||||
Direction nonVisualDirection() { return (Direction) scriptLoadFlag; }
|
||||
void saveToStream(WriteStream *stream);
|
||||
void loadFromStream(ReadStream *stream);
|
||||
void saveToStream(Common::WriteStream *stream);
|
||||
void loadFromStream(Common::ReadStream *stream);
|
||||
};
|
||||
|
||||
class HotspotDataList: public Common::List<Common::SharedPtr<HotspotData> > {
|
||||
public:
|
||||
void saveToStream(WriteStream *stream);
|
||||
void loadFromStream(ReadStream *stream);
|
||||
void saveToStream(Common::WriteStream *stream);
|
||||
void loadFromStream(Common::ReadStream *stream);
|
||||
};
|
||||
|
||||
class HotspotOverrideData {
|
||||
@ -658,8 +656,8 @@ public:
|
||||
|
||||
class TalkDataList: public Common::List<Common::SharedPtr<TalkData> > {
|
||||
public:
|
||||
void saveToStream(WriteStream *stream);
|
||||
void loadFromStream(ReadStream *stream);
|
||||
void saveToStream(Common::WriteStream *stream);
|
||||
void loadFromStream(Common::ReadStream *stream);
|
||||
};
|
||||
|
||||
struct RoomExitCoordinateData {
|
||||
@ -717,8 +715,8 @@ public:
|
||||
void tick();
|
||||
void clear(bool forceClear = false);
|
||||
|
||||
void saveToStream(WriteStream *stream);
|
||||
void loadFromStream(ReadStream *stream);
|
||||
void saveToStream(Common::WriteStream *stream);
|
||||
void loadFromStream(Common::ReadStream *stream);
|
||||
};
|
||||
|
||||
// The following classes holds the data for NPC schedules
|
||||
@ -739,7 +737,7 @@ public:
|
||||
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
|
||||
|
||||
@ -889,7 +887,7 @@ enum FieldName {
|
||||
};
|
||||
|
||||
struct PlayerNewPosition {
|
||||
Point position;
|
||||
Common::Point position;
|
||||
uint16 roomNumber;
|
||||
};
|
||||
|
||||
|
@ -445,8 +445,8 @@ void Room::update() {
|
||||
}
|
||||
|
||||
// Handle second layer (layer 1) - do in order of Y axis
|
||||
List<Hotspot *> tempList;
|
||||
List<Hotspot *>::iterator iTemp;
|
||||
Common::List<Hotspot *> tempList;
|
||||
Common::List<Hotspot *>::iterator iTemp;
|
||||
for (i = hotspots.begin(); i != hotspots.end(); ++i) {
|
||||
Hotspot *h = (i.operator*()).get();
|
||||
if ((h->layer() != 1) || (h->roomNumber() != _roomNumber) ||
|
||||
@ -526,7 +526,7 @@ void Room::update() {
|
||||
s.writeString(xctr * 8, yctr * 8 + 8, buffer, true);
|
||||
// } else if (v == 0xffff) {
|
||||
} 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);
|
||||
}
|
||||
|
||||
void SoundManager::saveToStream(WriteStream *stream) {
|
||||
void SoundManager::saveToStream(Common::WriteStream *stream) {
|
||||
debugC(ERROR_BASIC, kLureDebugSounds, "SoundManager::saveToStream");
|
||||
SoundListIterator i;
|
||||
|
||||
@ -104,7 +104,7 @@ void SoundManager::saveToStream(WriteStream *stream) {
|
||||
stream->writeByte(0xff);
|
||||
}
|
||||
|
||||
void SoundManager::loadFromStream(ReadStream *stream) {
|
||||
void SoundManager::loadFromStream(Common::ReadStream *stream) {
|
||||
// Stop any existing sounds playing
|
||||
killSounds();
|
||||
|
||||
|
@ -133,8 +133,8 @@ public:
|
||||
SoundManager();
|
||||
~SoundManager();
|
||||
|
||||
void saveToStream(WriteStream *stream);
|
||||
void loadFromStream(ReadStream *stream);
|
||||
void saveToStream(Common::WriteStream *stream);
|
||||
void loadFromStream(Common::ReadStream *stream);
|
||||
|
||||
void loadSection(uint16 sectionId);
|
||||
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
|
||||
if ((charOffset == 0x1a08) && (charBitMask == 1) &&
|
||||
(LureEngine::getReference().getLanguage() == IT_ITA))
|
||||
(LureEngine::getReference().getLanguage() == Common::IT_ITA))
|
||||
// Hardcode for end of string
|
||||
ch = '\0';
|
||||
else
|
||||
|
@ -53,7 +53,7 @@ void Surface::initialise() {
|
||||
int_font = disk.getEntry(FONT_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(&char8D[0], &char8D[8], int_font->data() + (0x8D - 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
|
||||
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);
|
||||
fillRect(r, 0);
|
||||
}
|
||||
@ -304,14 +304,14 @@ void Surface::copyTo(Surface *dest, uint16 x, uint16 y) {
|
||||
dest->data().copyFrom(_data, 0, y * _width, dataSize);
|
||||
} else {
|
||||
// Use slower transfer
|
||||
Rect rect;
|
||||
Common::Rect rect;
|
||||
rect.left = 0; rect.top = 0;
|
||||
rect.right = _width-1; rect.bottom = _height-1;
|
||||
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) {
|
||||
int numBytes = srcBounds.right - srcBounds.left + 1;
|
||||
if (destX + numBytes > dest->width())
|
||||
@ -349,7 +349,7 @@ void Surface::copyFrom(MemoryBlock *src, uint32 destOffset) {
|
||||
// fillRect
|
||||
// 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) {
|
||||
byte *const addr = _data->data() + (yp * _width) + r.left;
|
||||
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,
|
||||
int colour, bool squashedLines) {
|
||||
Point size;
|
||||
Common::Point size;
|
||||
Surface::getDialogBounds(size, 0, numLines, squashedLines);
|
||||
|
||||
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();
|
||||
Screen &screen = Screen::getReference();
|
||||
uint8 bgColour = *(screen.screen().data().data() + (y * FULL_SCREEN_WIDTH) + x);
|
||||
String newLine(line);
|
||||
Common::String newLine(line);
|
||||
bool abortFlag = 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)) {
|
||||
// Return character
|
||||
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();
|
||||
newLine.deleteLastChar();
|
||||
line = newLine;
|
||||
@ -556,7 +556,7 @@ bool Surface::getString(Common::String &line, int maxSize, bool isNumeric, bool
|
||||
else if (keycode == Common::KEYCODE_ESCAPE) {
|
||||
// Escape character
|
||||
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();
|
||||
abortFlag = true;
|
||||
} 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;
|
||||
|
||||
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);
|
||||
refreshFlag = true;
|
||||
|
||||
} else if ((ch >= ' ') && (stringSize + 8 < maxSize)) {
|
||||
if (((ch >= '0') && (ch <= '9')) || !isNumeric) {
|
||||
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);
|
||||
refreshFlag = true;
|
||||
}
|
||||
@ -663,7 +663,7 @@ int TalkDialog::getArticle(uint16 msgId, uint16 objId) {
|
||||
Common::Language language = LureEngine::getReference().getLanguage();
|
||||
int id = objId & 0xe000;
|
||||
|
||||
if (language == DE_DEU) {
|
||||
if (language == Common::DE_DEU) {
|
||||
// Special handling for German language
|
||||
|
||||
for (int sectionIndex = 0; sectionIndex < 4; ++sectionIndex) {
|
||||
@ -689,7 +689,7 @@ int TalkDialog::getArticle(uint16 msgId, uint16 objId) {
|
||||
|
||||
return 0;
|
||||
|
||||
} else if (language == ES_ESP) {
|
||||
} else if (language == Common::ES_ESP) {
|
||||
// Special handling for Spanish langugae
|
||||
const uint16 *tlData = (msgId == 158) ? spanish_pre_e1_type_tl : spanish_others_tl;
|
||||
|
||||
@ -928,7 +928,7 @@ bool SaveRestoreDialog::show(bool saveDialog) {
|
||||
int index;
|
||||
|
||||
// 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;
|
||||
while ((numSaves < MAX_SAVEGAME_SLOTS) &&
|
||||
((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
|
||||
// blank entry for a new savegame
|
||||
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
|
||||
if (!saveDialog && (numSaves == 0)) {
|
||||
@ -1114,9 +1114,9 @@ struct RestartRecord {
|
||||
};
|
||||
|
||||
static const RestartRecord buttonBounds[] = {
|
||||
{ EN_ANY, 48, 14, { 118, 152 }, { 168, 152 } },
|
||||
{ DE_DEU, 48, 14, { 106, 152 }, { 168, 152 } },
|
||||
{ UNK_LANG, 48, 14, { 112, 152 }, { 168, 152 } }
|
||||
{ Common::EN_ANY, 48, 14, { 118, 152 }, { 168, 152 } },
|
||||
{ Common::DE_DEU, 48, 14, { 106, 152 }, { 168, 152 } },
|
||||
{ Common::UNK_LANG, 48, 14, { 112, 152 }, { 168, 152 } }
|
||||
};
|
||||
|
||||
|
||||
@ -1132,7 +1132,7 @@ bool RestartRestoreDialog::show() {
|
||||
mouse.setCursorNum(CURSOR_ARROW);
|
||||
|
||||
// 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);
|
||||
int highlightedButton = -1;
|
||||
|
||||
@ -1142,7 +1142,7 @@ bool RestartRestoreDialog::show() {
|
||||
// Get the correct button bounds record to use
|
||||
const RestartRecord *btnRecord = &buttonBounds[0];
|
||||
while ((btnRecord->Language != engine.getLanguage()) &&
|
||||
(btnRecord->Language != UNK_LANG))
|
||||
(btnRecord->Language != Common::UNK_LANG))
|
||||
++btnRecord;
|
||||
|
||||
// Fade out the screen
|
||||
@ -1256,21 +1256,21 @@ struct ItemDesc {
|
||||
#define NUMBER_HEADER 0x1842
|
||||
|
||||
static const ItemDesc copyProtectElements[] = {
|
||||
{UNK_LANG, 104, 96, 32, 48, PROT_SPR_HEADER, 0},
|
||||
{UNK_LANG, 179, 96, 32, 48, PROT_SPR_HEADER, 0},
|
||||
{Common::UNK_LANG, 104, 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},
|
||||
{FR_FRA, 57, 40, 208, 40, WORDING_HEADER, 32},
|
||||
{DE_DEU, 39, 30, 240, 53, WORDING_HEADER, 32},
|
||||
{NL_NLD, 57, 40, 208, 40, WORDING_HEADER, 32},
|
||||
{ES_ESP, 57, 40, 208, 40, WORDING_HEADER, 32},
|
||||
{IT_ITA, 57, 40, 208, 40, WORDING_HEADER, 32},
|
||||
{Common::EN_ANY, 57, 40, 208, 40, WORDING_HEADER, 32},
|
||||
{Common::FR_FRA, 57, 40, 208, 40, WORDING_HEADER, 32},
|
||||
{Common::DE_DEU, 39, 30, 240, 53, WORDING_HEADER, 32},
|
||||
{Common::NL_NLD, 57, 40, 208, 40, WORDING_HEADER, 32},
|
||||
{Common::ES_ESP, 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},
|
||||
{UNK_LANG, 145, 168, 16, 8, NUMBER_HEADER, 32},
|
||||
{UNK_LANG, 164, 168, 16, 8, NUMBER_HEADER, 32},
|
||||
{UNK_LANG, 171, 168, 16, 8, NUMBER_HEADER, 32},
|
||||
{UNK_LANG, 0, 0, 0, 0, 0, 0}
|
||||
{Common::UNK_LANG, 138, 168, 16, 8, NUMBER_HEADER, 32},
|
||||
{Common::UNK_LANG, 145, 168, 16, 8, NUMBER_HEADER, 32},
|
||||
{Common::UNK_LANG, 164, 168, 16, 8, NUMBER_HEADER, 32},
|
||||
{Common::UNK_LANG, 171, 168, 16, 8, NUMBER_HEADER, 32},
|
||||
{Common::UNK_LANG, 0, 0, 0, 0, 0, 0}
|
||||
};
|
||||
|
||||
int pageNumbers[20] = {
|
||||
@ -1282,7 +1282,7 @@ CopyProtectionDialog::CopyProtectionDialog() {
|
||||
|
||||
const ItemDesc *ptr = ©ProtectElements[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();
|
||||
h->setPosition(ptr->x, ptr->y);
|
||||
h->setSize(ptr->width, ptr->height);
|
||||
|
@ -32,8 +32,6 @@
|
||||
#include "lure/disk.h"
|
||||
#include "lure/luredefs.h"
|
||||
|
||||
using namespace Common;
|
||||
|
||||
namespace Lure {
|
||||
|
||||
#define DEFAULT_TEXT_COLOUR -1
|
||||
|
Loading…
x
Reference in New Issue
Block a user