aboutsummaryrefslogtreecommitdiff
path: root/engines/pegasus/items
diff options
context:
space:
mode:
Diffstat (limited to 'engines/pegasus/items')
-rwxr-xr-xengines/pegasus/items/biochips/aichip.cpp14
-rwxr-xr-xengines/pegasus/items/biochips/aichip.h4
-rwxr-xr-xengines/pegasus/items/biochips/biochipitem.cpp6
-rwxr-xr-xengines/pegasus/items/biochips/biochipitem.h4
-rwxr-xr-xengines/pegasus/items/biochips/mapchip.cpp6
-rwxr-xr-xengines/pegasus/items/biochips/mapchip.h4
-rwxr-xr-xengines/pegasus/items/biochips/mapimage.cpp26
-rwxr-xr-xengines/pegasus/items/biochips/mapimage.h2
-rwxr-xr-xengines/pegasus/items/biochips/opticalchip.cpp8
-rwxr-xr-xengines/pegasus/items/biochips/opticalchip.h6
-rwxr-xr-xengines/pegasus/items/biochips/pegasuschip.cpp6
-rwxr-xr-xengines/pegasus/items/biochips/pegasuschip.h2
-rwxr-xr-xengines/pegasus/items/biochips/retscanchip.cpp2
-rwxr-xr-xengines/pegasus/items/biochips/retscanchip.h2
-rwxr-xr-xengines/pegasus/items/biochips/shieldchip.cpp2
-rwxr-xr-xengines/pegasus/items/biochips/shieldchip.h2
-rwxr-xr-xengines/pegasus/items/inventory.cpp26
-rwxr-xr-xengines/pegasus/items/inventory.h28
-rwxr-xr-xengines/pegasus/items/inventory/airmask.cpp14
-rwxr-xr-xengines/pegasus/items/inventory/airmask.h4
-rwxr-xr-xengines/pegasus/items/inventory/gascanister.cpp2
-rwxr-xr-xengines/pegasus/items/inventory/gascanister.h2
-rwxr-xr-xengines/pegasus/items/inventory/inventoryitem.cpp6
-rwxr-xr-xengines/pegasus/items/inventory/inventoryitem.h6
-rwxr-xr-xengines/pegasus/items/inventory/keycard.cpp4
-rwxr-xr-xengines/pegasus/items/inventory/keycard.h4
-rwxr-xr-xengines/pegasus/items/inventorypicture.cpp28
-rwxr-xr-xengines/pegasus/items/inventorypicture.h16
-rwxr-xr-xengines/pegasus/items/item.cpp26
-rwxr-xr-xengines/pegasus/items/item.h332
-rwxr-xr-xengines/pegasus/items/itemlist.cpp4
-rwxr-xr-xengines/pegasus/items/itemlist.h2
32 files changed, 300 insertions, 300 deletions
diff --git a/engines/pegasus/items/biochips/aichip.cpp b/engines/pegasus/items/biochips/aichip.cpp
index d4e425921b..5e9fc9f8c3 100755
--- a/engines/pegasus/items/biochips/aichip.cpp
+++ b/engines/pegasus/items/biochips/aichip.cpp
@@ -33,7 +33,7 @@
namespace Pegasus {
// indexed by [number of hints][number of solves (0, 1, or 2)][which button to highlight]
-static const tItemState s_highlightState[4][3][7] = {
+static const ItemState s_highlightState[4][3][7] = {
{
{kAI000, -1, -1, -1, -1, kAI005, kAI006},
{kAI010, -1, -1, -1, -1, kAI015, kAI016},
@@ -58,7 +58,7 @@ static const tItemState s_highlightState[4][3][7] = {
AIChip *g_AIChip = 0;
-AIChip::AIChip(const tItemID id, const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction) :
+AIChip::AIChip(const ItemID id, const NeighborhoodID neighborhood, const RoomID room, const DirectionConstant direction) :
BiochipItem(id, neighborhood, room, direction), _briefingSpot(kAIBriefingSpotID), _scanSpot(kAIScanSpotID),
_hint1Spot(kAIHint1SpotID), _hint2Spot(kAIHint2SpotID), _hint3Spot(kAIHint3SpotID), _solveSpot(kAISolveSpotID) {
_briefingSpot.setArea(Common::Rect(kAIMiddleAreaLeft + 10, kAIMiddleAreaTop + 27, kAIMiddleAreaLeft + 10 + 81, kAIMiddleAreaTop + 27 + 31));
@@ -186,7 +186,7 @@ void AIChip::showBriefingClicked() {
numSolves = 0;
}
- tItemState newState = s_highlightState[vm->getNumHints()][numSolves][kAIBriefingSpotID - kAIHint1SpotID + 1];
+ ItemState newState = s_highlightState[vm->getNumHints()][numSolves][kAIBriefingSpotID - kAIHint1SpotID + 1];
if (newState != -1)
setItemState(newState);
}
@@ -206,7 +206,7 @@ void AIChip::showEnvScanClicked() {
numSolves = 0;
}
- tItemState newState = s_highlightState[vm->getNumHints()][numSolves][kAIScanSpotID - kAIHint1SpotID + 1];
+ ItemState newState = s_highlightState[vm->getNumHints()][numSolves][kAIScanSpotID - kAIHint1SpotID + 1];
if (newState != -1)
setItemState(newState);
@@ -217,7 +217,7 @@ void AIChip::clearClicked() {
setUpAIChip();
}
-void AIChip::clickInAIHotspot(tHotSpotID id) {
+void AIChip::clickInAIHotspot(HotSpotID id) {
PegasusEngine *vm = (PegasusEngine *)g_engine;
Common::String movieName;
@@ -243,7 +243,7 @@ void AIChip::clickInAIHotspot(tHotSpotID id) {
break;
}
- tItemState state = getItemState();
+ ItemState state = getItemState();
if (!movieName.empty()) {
_playingMovie = true;
@@ -258,7 +258,7 @@ void AIChip::clickInAIHotspot(tHotSpotID id) {
numSolves = 0;
}
- tItemState newState = s_highlightState[vm->getNumHints()][numSolves][id - kAIHint1SpotID + 1];
+ ItemState newState = s_highlightState[vm->getNumHints()][numSolves][id - kAIHint1SpotID + 1];
if (newState != -1)
setItemState(newState);
diff --git a/engines/pegasus/items/biochips/aichip.h b/engines/pegasus/items/biochips/aichip.h
index 96d2fb2c01..e0cbd994dd 100755
--- a/engines/pegasus/items/biochips/aichip.h
+++ b/engines/pegasus/items/biochips/aichip.h
@@ -33,7 +33,7 @@ namespace Pegasus {
class AIChip : public BiochipItem {
public:
- AIChip(const tItemID, const tNeighborhoodID, const tRoomID, const tDirectionConstant);
+ AIChip(const ItemID, const NeighborhoodID, const RoomID, const DirectionConstant);
virtual ~AIChip();
void select();
@@ -44,7 +44,7 @@ public:
// own the center area.
void setUpAIChipRude();
void activateAIHotspots();
- void clickInAIHotspot(tHotSpotID);
+ void clickInAIHotspot(HotSpotID);
void takeSharedArea();
diff --git a/engines/pegasus/items/biochips/biochipitem.cpp b/engines/pegasus/items/biochips/biochipitem.cpp
index 99e6050c85..5686948937 100755
--- a/engines/pegasus/items/biochips/biochipitem.cpp
+++ b/engines/pegasus/items/biochips/biochipitem.cpp
@@ -32,7 +32,7 @@
namespace Pegasus {
-BiochipItem::BiochipItem(const tItemID id, const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction) :
+BiochipItem::BiochipItem(const ItemID id, const NeighborhoodID neighborhood, const RoomID room, const DirectionConstant direction) :
Item(id, neighborhood, room, direction) {
PegasusEngine *vm = (PegasusEngine *)g_engine;
@@ -59,7 +59,7 @@ BiochipItem::~BiochipItem() {
delete[] _rightAreaInfo.entries;
}
-tItemType BiochipItem::getItemType() {
+ItemType BiochipItem::getItemType() {
return kBiochipItemType;
}
@@ -68,7 +68,7 @@ TimeValue BiochipItem::getRightAreaTime() const {
return 0xffffffff;
TimeValue time;
- tItemState state;
+ ItemState state;
findItemStateEntryByState(_rightAreaInfo, _itemState, time);
if (time == 0xffffffff)
diff --git a/engines/pegasus/items/biochips/biochipitem.h b/engines/pegasus/items/biochips/biochipitem.h
index 904c23b392..24b9ae699a 100755
--- a/engines/pegasus/items/biochips/biochipitem.h
+++ b/engines/pegasus/items/biochips/biochipitem.h
@@ -32,10 +32,10 @@ namespace Pegasus {
class BiochipItem : public Item {
public:
- BiochipItem(const tItemID, const tNeighborhoodID, const tRoomID, const tDirectionConstant);
+ BiochipItem(const ItemID, const NeighborhoodID, const RoomID, const DirectionConstant);
virtual ~BiochipItem();
- virtual tItemType getItemType();
+ virtual ItemType getItemType();
TimeValue getPanelTime() const { return _biochipInfoPanelTime; }
TimeValue getRightAreaTime() const;
diff --git a/engines/pegasus/items/biochips/mapchip.cpp b/engines/pegasus/items/biochips/mapchip.cpp
index de6d4e2dfe..69050d5193 100755
--- a/engines/pegasus/items/biochips/mapchip.cpp
+++ b/engines/pegasus/items/biochips/mapchip.cpp
@@ -32,7 +32,7 @@ namespace Pegasus {
MapChip *g_map = 0;
-MapChip::MapChip(const tItemID id, const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction) :
+MapChip::MapChip(const ItemID id, const NeighborhoodID neighborhood, const RoomID room, const DirectionConstant direction) :
BiochipItem(id, neighborhood, room, direction) {
g_map = this;
setItemState(kMapUnavailable);
@@ -69,8 +69,8 @@ void MapChip::deselect() {
_image.unloadImage();
}
-void MapChip::moveToMapLocation(const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant dir) {
- tAirQuality airQuality;
+void MapChip::moveToMapLocation(const NeighborhoodID neighborhood, const RoomID room, const DirectionConstant dir) {
+ AirQuality airQuality;
if (g_neighborhood)
airQuality = g_neighborhood->getAirQuality(room);
diff --git a/engines/pegasus/items/biochips/mapchip.h b/engines/pegasus/items/biochips/mapchip.h
index 69bfabc200..6690090aa4 100755
--- a/engines/pegasus/items/biochips/mapchip.h
+++ b/engines/pegasus/items/biochips/mapchip.h
@@ -38,7 +38,7 @@ namespace Pegasus {
class MapChip : public BiochipItem {
public:
- MapChip(const tItemID, const tNeighborhoodID, const tRoomID, const tDirectionConstant);
+ MapChip(const ItemID, const NeighborhoodID, const RoomID, const DirectionConstant);
virtual ~MapChip();
void select();
@@ -46,7 +46,7 @@ public:
void takeSharedArea();
void giveUpSharedArea();
- void moveToMapLocation(const tNeighborhoodID, const tRoomID, const tDirectionConstant);
+ void moveToMapLocation(const NeighborhoodID, const RoomID, const DirectionConstant);
void writeToStream(Common::WriteStream *);
void readFromStream(Common::ReadStream *);
diff --git a/engines/pegasus/items/biochips/mapimage.cpp b/engines/pegasus/items/biochips/mapimage.cpp
index 6e4a8ecd12..bd7b8ff910 100755
--- a/engines/pegasus/items/biochips/mapimage.cpp
+++ b/engines/pegasus/items/biochips/mapimage.cpp
@@ -55,20 +55,20 @@ static const int kGearRoomFlagHigh = ROOM_TO_FLAG(kMars39, kWest);
static const int kMazeFlagLow = ROOM_TO_FLAG(kMars60, kNorth);
static const int kMazeFlagHigh = ROOM_TO_FLAG(kMarsMaze200, kWest);
-static const tCoordType kGearRoomScreenOffsetX = 49;
-static const tCoordType kGearRoomScreenOffsetY = 47;
+static const CoordType kGearRoomScreenOffsetX = 49;
+static const CoordType kGearRoomScreenOffsetY = 47;
-static const tCoordType kGearRoomGridOriginX = 1;
-static const tCoordType kGearRoomGridOriginY = 4;
+static const CoordType kGearRoomGridOriginX = 1;
+static const CoordType kGearRoomGridOriginY = 4;
-static const tCoordType kMazeScreenOffsetX = 16;
-static const tCoordType kMazeScreenOffsetY = 20;
+static const CoordType kMazeScreenOffsetX = 16;
+static const CoordType kMazeScreenOffsetY = 20;
-static const tCoordType kMazeGridOriginX = 6;
-static const tCoordType kMazeGridOriginY = 1;
+static const CoordType kMazeGridOriginX = 6;
+static const CoordType kMazeGridOriginY = 1;
-static const tCoordType kGridWidth = 4;
-static const tCoordType kGridHeight = 4;
+static const CoordType kGridWidth = 4;
+static const CoordType kGridHeight = 4;
static const uint16 kMapOfMazePICTID = 906;
static const uint16 kMapOfGearRoomPICTID = 907;
@@ -318,7 +318,7 @@ void MapImage::unloadImage() {
_whichArea = kMapNoArea;
}
-void MapImage::moveToMapLocation(const tNeighborhoodID, const tRoomID room, const tDirectionConstant dir) {
+void MapImage::moveToMapLocation(const NeighborhoodID, const RoomID room, const DirectionConstant dir) {
GraphicsManager *gfx = ((PegasusEngine *)g_engine)->_gfx;
int flag = ROOM_TO_FLAG(room, dir);
@@ -346,7 +346,7 @@ void MapImage::addFlagToMask(const int flag) {
// This function can even be sensitive to open doors.
// clone2727 notices that it's not, though
void MapImage::getRevealedRects(const uint32 flag, Common::Rect &r1) {
- tCoordType gridX, gridY;
+ CoordType gridX, gridY;
switch (_whichArea) {
case kMapMaze:
@@ -371,7 +371,7 @@ void MapImage::getRevealedRects(const uint32 flag, Common::Rect &r1) {
void MapImage::drawPlayer() {
Graphics::Surface *screen = ((PegasusEngine *)g_engine)->_gfx->getCurSurface();
- tCoordType gridX, gridY;
+ CoordType gridX, gridY;
switch (_whichArea) {
case kMapMaze:
diff --git a/engines/pegasus/items/biochips/mapimage.h b/engines/pegasus/items/biochips/mapimage.h
index 359d67ca4c..d596b585c4 100755
--- a/engines/pegasus/items/biochips/mapimage.h
+++ b/engines/pegasus/items/biochips/mapimage.h
@@ -49,7 +49,7 @@ public:
void loadGearRoomIfNecessary();
void loadMazeIfNecessary();
void unloadImage();
- void moveToMapLocation(const tNeighborhoodID, const tRoomID, const tDirectionConstant);
+ void moveToMapLocation(const NeighborhoodID, const RoomID, const DirectionConstant);
void draw(const Common::Rect &);
diff --git a/engines/pegasus/items/biochips/opticalchip.cpp b/engines/pegasus/items/biochips/opticalchip.cpp
index f6519c7f61..6a9a41d573 100755
--- a/engines/pegasus/items/biochips/opticalchip.cpp
+++ b/engines/pegasus/items/biochips/opticalchip.cpp
@@ -30,7 +30,7 @@ namespace Pegasus {
OpticalChip *g_opticalChip = 0;
-OpticalChip::OpticalChip(const tItemID id, const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction) :
+OpticalChip::OpticalChip(const ItemID id, const NeighborhoodID neighborhood, const RoomID room, const DirectionConstant direction) :
BiochipItem(id, neighborhood, room, direction), _ariesHotspot(kAriesSpotID), _mercuryHotspot(kMercurySpotID),
_poseidonHotspot(kPoseidonSpotID) {
_ariesHotspot.setArea(Common::Rect(kAIMiddleAreaLeft + 60, kAIMiddleAreaTop + 27, kAIMiddleAreaLeft + 60 + 121, kAIMiddleAreaTop + 27 + 20));
@@ -118,11 +118,11 @@ void OpticalChip::activateOpticalHotspots() {
_poseidonHotspot.setActive();
}
-void OpticalChip::clickInOpticalHotspot(tHotSpotID id) {
+void OpticalChip::clickInOpticalHotspot(HotSpotID id) {
playOpMemMovie(id);
}
-void OpticalChip::playOpMemMovie(tHotSpotID id) {
+void OpticalChip::playOpMemMovie(HotSpotID id) {
Common::String movieName;
switch (id) {
case kAriesSpotID:
@@ -136,7 +136,7 @@ void OpticalChip::playOpMemMovie(tHotSpotID id) {
break;
}
- tItemState state = getItemState(), newState;
+ ItemState state = getItemState(), newState;
switch (state) {
case kOptical000:
// Can never happen.
diff --git a/engines/pegasus/items/biochips/opticalchip.h b/engines/pegasus/items/biochips/opticalchip.h
index c44a5eaf63..b1ea87bffc 100755
--- a/engines/pegasus/items/biochips/opticalchip.h
+++ b/engines/pegasus/items/biochips/opticalchip.h
@@ -34,7 +34,7 @@ namespace Pegasus {
class OpticalChip : public BiochipItem {
public:
- OpticalChip(const tItemID, const tNeighborhoodID, const tRoomID, const tDirectionConstant);
+ OpticalChip(const ItemID, const NeighborhoodID, const RoomID, const DirectionConstant);
virtual ~OpticalChip();
virtual void writeToStream(Common::WriteStream *);
@@ -45,8 +45,8 @@ public:
void addPoseidon();
void activateOpticalHotspots();
- void clickInOpticalHotspot(tHotSpotID);
- void playOpMemMovie(tHotSpotID);
+ void clickInOpticalHotspot(HotSpotID);
+ void playOpMemMovie(HotSpotID);
protected:
enum {
diff --git a/engines/pegasus/items/biochips/pegasuschip.cpp b/engines/pegasus/items/biochips/pegasuschip.cpp
index 8d369c1a17..1e3e0d7a88 100755
--- a/engines/pegasus/items/biochips/pegasuschip.cpp
+++ b/engines/pegasus/items/biochips/pegasuschip.cpp
@@ -32,7 +32,7 @@
namespace Pegasus {
-PegasusChip::PegasusChip(const tItemID id, const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction) :
+PegasusChip::PegasusChip(const ItemID id, const NeighborhoodID neighborhood, const RoomID room, const DirectionConstant direction) :
BiochipItem(id, neighborhood, room, direction), _recallSpot(kPegasusRecallSpotID) {
_recallSpot.setArea(Common::Rect(kAIMiddleAreaLeft + 116, kAIMiddleAreaTop + 63, kAIMiddleAreaLeft + 184, kAIMiddleAreaTop + 91));
_recallSpot.setHotspotFlags(kPegasusBiochipSpotFlag);
@@ -125,8 +125,8 @@ void PegasusChip::activatePegasusHotspots() {
void PegasusChip::clickInPegasusHotspot() {
PegasusEngine *vm = (PegasusEngine *)g_engine;
- tItemState thisState = getItemState();
- tItemState hiliteState;
+ ItemState thisState = getItemState();
+ ItemState hiliteState;
switch (thisState) {
case kPegasusPrehistoric00:
diff --git a/engines/pegasus/items/biochips/pegasuschip.h b/engines/pegasus/items/biochips/pegasuschip.h
index 1ee35b78a1..7597424821 100755
--- a/engines/pegasus/items/biochips/pegasuschip.h
+++ b/engines/pegasus/items/biochips/pegasuschip.h
@@ -33,7 +33,7 @@ namespace Pegasus {
class PegasusChip : public BiochipItem {
public:
- PegasusChip(const tItemID, const tNeighborhoodID, const tRoomID, const tDirectionConstant);
+ PegasusChip(const ItemID, const NeighborhoodID, const RoomID, const DirectionConstant);
virtual ~PegasusChip();
void select();
diff --git a/engines/pegasus/items/biochips/retscanchip.cpp b/engines/pegasus/items/biochips/retscanchip.cpp
index e9904056c1..84b74a63d2 100755
--- a/engines/pegasus/items/biochips/retscanchip.cpp
+++ b/engines/pegasus/items/biochips/retscanchip.cpp
@@ -28,7 +28,7 @@
namespace Pegasus {
-RetScanChip::RetScanChip(const tItemID id, const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction) :
+RetScanChip::RetScanChip(const ItemID id, const NeighborhoodID neighborhood, const RoomID room, const DirectionConstant direction) :
BiochipItem(id, neighborhood, room, direction) {
}
diff --git a/engines/pegasus/items/biochips/retscanchip.h b/engines/pegasus/items/biochips/retscanchip.h
index 7d8fe6d401..e72eaeddaf 100755
--- a/engines/pegasus/items/biochips/retscanchip.h
+++ b/engines/pegasus/items/biochips/retscanchip.h
@@ -32,7 +32,7 @@ namespace Pegasus {
class RetScanChip : public BiochipItem {
public:
- RetScanChip(const tItemID, const tNeighborhoodID, const tRoomID, const tDirectionConstant);
+ RetScanChip(const ItemID, const NeighborhoodID, const RoomID, const DirectionConstant);
virtual ~RetScanChip() {}
void searchForLaser();
diff --git a/engines/pegasus/items/biochips/shieldchip.cpp b/engines/pegasus/items/biochips/shieldchip.cpp
index 4bd05728b4..58cbfcc4ec 100755
--- a/engines/pegasus/items/biochips/shieldchip.cpp
+++ b/engines/pegasus/items/biochips/shieldchip.cpp
@@ -31,7 +31,7 @@ namespace Pegasus {
ShieldChip *g_shield = 0;
-ShieldChip::ShieldChip(const tItemID id, const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction) :
+ShieldChip::ShieldChip(const ItemID id, const NeighborhoodID neighborhood, const RoomID room, const DirectionConstant direction) :
BiochipItem(id, neighborhood, room, direction) {
g_shield = this;
}
diff --git a/engines/pegasus/items/biochips/shieldchip.h b/engines/pegasus/items/biochips/shieldchip.h
index c0b9cc5183..69c6369236 100755
--- a/engines/pegasus/items/biochips/shieldchip.h
+++ b/engines/pegasus/items/biochips/shieldchip.h
@@ -32,7 +32,7 @@ namespace Pegasus {
class ShieldChip : public BiochipItem {
public:
- ShieldChip(const tItemID, const tNeighborhoodID, const tRoomID, const tDirectionConstant);
+ ShieldChip(const ItemID, const NeighborhoodID, const RoomID, const DirectionConstant);
virtual ~ShieldChip() {}
void select();
diff --git a/engines/pegasus/items/inventory.cpp b/engines/pegasus/items/inventory.cpp
index 8f7eb46fd4..e30fcac368 100755
--- a/engines/pegasus/items/inventory.cpp
+++ b/engines/pegasus/items/inventory.cpp
@@ -38,13 +38,13 @@ Inventory::Inventory() {
Inventory::~Inventory() {
}
-void Inventory::setWeightLimit(tWeightType limit) {
+void Inventory::setWeightLimit(WeightType limit) {
_weightLimit = limit;
// *** What to do if the new weight limit is greater than the current weight?
}
-tWeightType Inventory::getWeight() {
- tWeightType result = 0;
+WeightType Inventory::getWeight() {
+ WeightType result = 0;
for (ItemIterator it = _inventoryList.begin(); it != _inventoryList.end(); it++)
result += (*it)->getItemWeight();
@@ -53,7 +53,7 @@ tWeightType Inventory::getWeight() {
}
// If the item already belongs, just return kInventoryOK.
-tInventoryResult Inventory::addItem(Item *item) {
+InventoryResult Inventory::addItem(Item *item) {
if (itemInInventory(item))
return kInventoryOK;
@@ -67,7 +67,7 @@ tInventoryResult Inventory::addItem(Item *item) {
return kInventoryOK;
}
-tInventoryResult Inventory::removeItem(Item *item) {
+InventoryResult Inventory::removeItem(Item *item) {
for (ItemIterator it = _inventoryList.begin(); it != _inventoryList.end(); it++) {
if (*it == item) {
_inventoryList.erase(it);
@@ -81,7 +81,7 @@ tInventoryResult Inventory::removeItem(Item *item) {
return kItemNotInInventory;
}
-tInventoryResult Inventory::removeItem(tItemID id) {
+InventoryResult Inventory::removeItem(ItemID id) {
Item *item = findItemByID(id);
if (item) {
@@ -108,7 +108,7 @@ bool Inventory::itemInInventory(Item *item) {
return false;
}
-bool Inventory::itemInInventory(tItemID id) {
+bool Inventory::itemInInventory(ItemID id) {
return findItemByID(id) != NULL;
}
@@ -121,7 +121,7 @@ Item *Inventory::getItemAt(int32 index) {
return 0;
}
-tItemID Inventory::getItemIDAt(int32 index) {
+ItemID Inventory::getItemIDAt(int32 index) {
Item *item = getItemAt(index);
if (item)
@@ -130,7 +130,7 @@ tItemID Inventory::getItemIDAt(int32 index) {
return kNoItemID;
}
-Item *Inventory::findItemByID(tItemID id) {
+Item *Inventory::findItemByID(ItemID id) {
return _inventoryList.findItemByID(id);
}
@@ -147,7 +147,7 @@ int32 Inventory::findIndexOf(Item *item) {
// Return -1 if not found.
-int32 Inventory::findIndexOf(tItemID id) {
+int32 Inventory::findIndexOf(ItemID id) {
uint32 i = 0;
for (ItemIterator it = _inventoryList.begin(); it != _inventoryList.end(); it++, i++)
if ((*it)->getObjectID() == id)
@@ -156,7 +156,7 @@ int32 Inventory::findIndexOf(tItemID id) {
return -1;
}
-tWeightType Inventory::getWeightLimit() {
+WeightType Inventory::getWeightLimit() {
return _weightLimit;
}
@@ -164,11 +164,11 @@ int32 Inventory::getNumItems() {
return _inventoryList.size();
}
-void Inventory::setOwnerID(const tActorID id) {
+void Inventory::setOwnerID(const ActorID id) {
_ownerID = id;
}
-tActorID Inventory::getOwnerID() const {
+ActorID Inventory::getOwnerID() const {
return _ownerID;
}
diff --git a/engines/pegasus/items/inventory.h b/engines/pegasus/items/inventory.h
index 7da782f00e..db872b1990 100755
--- a/engines/pegasus/items/inventory.h
+++ b/engines/pegasus/items/inventory.h
@@ -44,31 +44,31 @@ public:
Inventory();
virtual ~Inventory();
- tWeightType getWeightLimit();
- void setWeightLimit(tWeightType limit);
- tWeightType getWeight();
+ WeightType getWeightLimit();
+ void setWeightLimit(WeightType limit);
+ WeightType getWeight();
- virtual tInventoryResult addItem(Item *item);
- virtual tInventoryResult removeItem(Item *item);
- virtual tInventoryResult removeItem(tItemID id);
+ virtual InventoryResult addItem(Item *item);
+ virtual InventoryResult removeItem(Item *item);
+ virtual InventoryResult removeItem(ItemID id);
virtual bool itemInInventory(Item *item);
- virtual bool itemInInventory(tItemID id);
+ virtual bool itemInInventory(ItemID id);
virtual Item *getItemAt(int32 index);
- virtual tItemID getItemIDAt(int32 index);
- virtual Item *findItemByID(tItemID id);
+ virtual ItemID getItemIDAt(int32 index);
+ virtual Item *findItemByID(ItemID id);
virtual int32 findIndexOf(Item *item);
- virtual int32 findIndexOf(tItemID id);
+ virtual int32 findIndexOf(ItemID id);
int32 getNumItems();
virtual void removeAllItems();
- void setOwnerID(const tActorID id);
- tActorID getOwnerID() const;
+ void setOwnerID(const ActorID id);
+ ActorID getOwnerID() const;
uint32 getReferenceCount() { return _referenceCount; }
protected:
- tWeightType _weightLimit;
- tActorID _ownerID;
+ WeightType _weightLimit;
+ ActorID _ownerID;
ItemList _inventoryList;
private:
diff --git a/engines/pegasus/items/inventory/airmask.cpp b/engines/pegasus/items/inventory/airmask.cpp
index 682927deaf..56f9d6f62f 100755
--- a/engines/pegasus/items/inventory/airmask.cpp
+++ b/engines/pegasus/items/inventory/airmask.cpp
@@ -40,7 +40,7 @@ void AirMask::airMaskTimerExpired(FunctionPtr *, void *) {
g_neighborhood->checkAirMask();
}
-AirMask::AirMask(const tItemID id, const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction) :
+AirMask::AirMask(const ItemID id, const NeighborhoodID neighborhood, const RoomID room, const DirectionConstant direction) :
InventoryItem(id, neighborhood, room, direction), _toggleSpot(kAirMaskToggleSpotID) {
g_airMask = this;
_toggleSpot.setArea(Common::Rect(kAIMiddleAreaLeft + 10, kAIMiddleAreaTop + 17, kAIMiddleAreaLeft + 110, kAIMiddleAreaTop + 57));
@@ -68,7 +68,7 @@ void AirMask::readFromStream(Common::ReadStream *stream) {
}
void AirMask::putMaskOn() {
- tAirQuality airQuality;
+ AirQuality airQuality;
if (g_neighborhood)
airQuality = g_neighborhood->getAirQuality(GameState.getCurrentRoom());
@@ -76,8 +76,8 @@ void AirMask::putMaskOn() {
airQuality = kAirQualityGood;
uint airLevel = getAirLeft();
- tItemState newState = getItemState();
- tItemState oldState = newState;
+ ItemState newState = getItemState();
+ ItemState oldState = newState;
if (airLevel == 0) {
newState = kAirMaskEmptyFilter;
@@ -99,8 +99,8 @@ void AirMask::putMaskOn() {
void AirMask::takeMaskOff() {
uint airLevel = getAirLeft();
- tItemState newState = getItemState();
- tItemState oldState = newState;
+ ItemState newState = getItemState();
+ ItemState oldState = newState;
if (airLevel == 0)
newState = kAirMaskEmptyOff;
@@ -127,7 +127,7 @@ void AirMask::airQualityChanged() {
takeMaskOff();
}
-void AirMask::setItemState(const tItemState newState) {
+void AirMask::setItemState(const ItemState newState) {
if (newState != getItemState()) {
InventoryItem::setItemState(newState);
diff --git a/engines/pegasus/items/inventory/airmask.h b/engines/pegasus/items/inventory/airmask.h
index 0e71380baf..f207f3b82b 100755
--- a/engines/pegasus/items/inventory/airmask.h
+++ b/engines/pegasus/items/inventory/airmask.h
@@ -34,13 +34,13 @@ namespace Pegasus {
class AirMask : public InventoryItem, private Idler {
public:
- AirMask(const tItemID, const tNeighborhoodID, const tRoomID, const tDirectionConstant);
+ AirMask(const ItemID, const NeighborhoodID, const RoomID, const DirectionConstant);
virtual ~AirMask();
virtual void writeToStream(Common::WriteStream *);
virtual void readFromStream(Common::ReadStream *);
- virtual void setItemState(const tItemState);
+ virtual void setItemState(const ItemState);
void putMaskOn();
void takeMaskOff();
void toggleItemState();
diff --git a/engines/pegasus/items/inventory/gascanister.cpp b/engines/pegasus/items/inventory/gascanister.cpp
index b6cd883bec..bf63cc6542 100755
--- a/engines/pegasus/items/inventory/gascanister.cpp
+++ b/engines/pegasus/items/inventory/gascanister.cpp
@@ -28,7 +28,7 @@
namespace Pegasus {
-GasCanister::GasCanister(const tItemID id, const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction) :
+GasCanister::GasCanister(const ItemID id, const NeighborhoodID neighborhood, const RoomID room, const DirectionConstant direction) :
InventoryItem(id, neighborhood, room, direction) {
}
diff --git a/engines/pegasus/items/inventory/gascanister.h b/engines/pegasus/items/inventory/gascanister.h
index 437df1292f..dae72c12cb 100755
--- a/engines/pegasus/items/inventory/gascanister.h
+++ b/engines/pegasus/items/inventory/gascanister.h
@@ -32,7 +32,7 @@ namespace Pegasus {
class GasCanister : public InventoryItem {
public:
- GasCanister(const tItemID, const tNeighborhoodID, const tRoomID, const tDirectionConstant);
+ GasCanister(const ItemID, const NeighborhoodID, const RoomID, const DirectionConstant);
virtual ~GasCanister() {}
void select();
diff --git a/engines/pegasus/items/inventory/inventoryitem.cpp b/engines/pegasus/items/inventory/inventoryitem.cpp
index 17f07050b3..4399708879 100755
--- a/engines/pegasus/items/inventory/inventoryitem.cpp
+++ b/engines/pegasus/items/inventory/inventoryitem.cpp
@@ -31,7 +31,7 @@
namespace Pegasus {
-InventoryItem::InventoryItem(const tItemID id, const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction) :
+InventoryItem::InventoryItem(const ItemID id, const NeighborhoodID neighborhood, const RoomID room, const DirectionConstant direction) :
Item(id, neighborhood, room, direction) {
PegasusEngine *vm = (PegasusEngine *)g_engine;
@@ -61,7 +61,7 @@ InventoryItem::~InventoryItem() {
delete[] _leftAreaInfo.entries;
}
-tItemType InventoryItem::getItemType() {
+ItemType InventoryItem::getItemType() {
return kInventoryItemType;
}
@@ -70,7 +70,7 @@ TimeValue InventoryItem::getLeftAreaTime() const {
return 0xffffffff;
TimeValue time;
- tItemState state;
+ ItemState state;
findItemStateEntryByState(_leftAreaInfo, _itemState, time);
if (time == 0xffffffff)
diff --git a/engines/pegasus/items/inventory/inventoryitem.h b/engines/pegasus/items/inventory/inventoryitem.h
index d3247d651c..b526463b18 100755
--- a/engines/pegasus/items/inventory/inventoryitem.h
+++ b/engines/pegasus/items/inventory/inventoryitem.h
@@ -39,12 +39,12 @@ struct JMPInventoryInfo {
class InventoryItem : public Item {
public:
- InventoryItem(const tItemID, const tNeighborhoodID, const tRoomID, const tDirectionConstant);
+ InventoryItem(const ItemID, const NeighborhoodID, const RoomID, const DirectionConstant);
virtual ~InventoryItem();
- virtual tItemType getItemType();
+ virtual ItemType getItemType();
- void getPanelTimes(TimeValue&, TimeValue&) const;
+ void getPanelTimes(TimeValue &, TimeValue &) const;
TimeValue getLeftAreaTime() const;
void setAnimationTime(const TimeValue);
diff --git a/engines/pegasus/items/inventory/keycard.cpp b/engines/pegasus/items/inventory/keycard.cpp
index 53a3f67e00..c818b6675b 100755
--- a/engines/pegasus/items/inventory/keycard.cpp
+++ b/engines/pegasus/items/inventory/keycard.cpp
@@ -28,7 +28,7 @@
namespace Pegasus {
-KeyCard::KeyCard(const tItemID id, const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction) :
+KeyCard::KeyCard(const ItemID id, const NeighborhoodID neighborhood, const RoomID room, const DirectionConstant direction) :
InventoryItem(id, neighborhood, room, direction) {
setItemState(kFlashlightOff);
}
@@ -40,7 +40,7 @@ void KeyCard::toggleItemState() {
setItemState(kFlashlightOff);
}
-void KeyCard::setItemState(const tItemState newState) {
+void KeyCard::setItemState(const ItemState newState) {
if (newState != getItemState()) {
InventoryItem::setItemState(newState);
((PegasusEngine *)g_engine)->checkFlashlight();
diff --git a/engines/pegasus/items/inventory/keycard.h b/engines/pegasus/items/inventory/keycard.h
index 7fdb905d58..c30c789786 100755
--- a/engines/pegasus/items/inventory/keycard.h
+++ b/engines/pegasus/items/inventory/keycard.h
@@ -32,11 +32,11 @@ namespace Pegasus {
class KeyCard : public InventoryItem {
public:
- KeyCard(const tItemID, const tNeighborhoodID, const tRoomID, const tDirectionConstant);
+ KeyCard(const ItemID, const NeighborhoodID, const RoomID, const DirectionConstant);
virtual ~KeyCard() {}
virtual void toggleItemState();
- virtual void setItemState(const tItemState);
+ virtual void setItemState(const ItemState);
bool isFlashlightOn();
protected:
diff --git a/engines/pegasus/items/inventorypicture.cpp b/engines/pegasus/items/inventorypicture.cpp
index 04bac4472e..7be095c499 100755
--- a/engines/pegasus/items/inventorypicture.cpp
+++ b/engines/pegasus/items/inventorypicture.cpp
@@ -31,7 +31,7 @@
namespace Pegasus {
-InventoryPicture::InventoryPicture(const tDisplayElementID id, InputHandler *nextHandler, Inventory *inventory) :
+InventoryPicture::InventoryPicture(const DisplayElementID id, InputHandler *nextHandler, Inventory *inventory) :
InputHandler(nextHandler), Picture(id), _panelMovie(kNoDisplayElement){
_inventory = inventory;
_lastReferenceCount = 0xffffffff;
@@ -71,7 +71,7 @@ void InventoryPicture::throwAwayInventoryImage() {
}
}
-void InventoryPicture::getItemXY(uint32 index, tCoordType &x, tCoordType &y) {
+void InventoryPicture::getItemXY(uint32 index, CoordType &x, CoordType &y) {
x = (index % _itemsPerRow) * _itemWidth + _itemX;
y = (index / _itemsPerRow) * _itemHeight + _itemY;
}
@@ -130,14 +130,14 @@ void InventoryPicture::setCurrentItemIndex(int32 index) {
}
}
-void InventoryPicture::setCurrentItemID(tItemID id) {
+void InventoryPicture::setCurrentItemID(ItemID id) {
int32 index = _inventory->findIndexOf(id);
if (index >= 0)
setCurrentItemIndex(index);
}
-tInventoryResult InventoryPicture::addInventoryItem(Item *item) {
- tInventoryResult result = _inventory->addItem(item);
+InventoryResult InventoryPicture::addInventoryItem(Item *item) {
+ InventoryResult result = _inventory->addItem(item);
if (result == kInventoryOK)
setCurrentItemIndex(_inventory->findIndexOf(item));
@@ -145,8 +145,8 @@ tInventoryResult InventoryPicture::addInventoryItem(Item *item) {
return result;
}
-tInventoryResult InventoryPicture::removeInventoryItem(Item *item) {
- tInventoryResult result = _inventory->removeItem(item);
+InventoryResult InventoryPicture::removeInventoryItem(Item *item) {
+ InventoryResult result = _inventory->removeItem(item);
if (result == kInventoryOK)
setCurrentItemIndex(getCurrentItemIndex());
@@ -163,7 +163,7 @@ bool InventoryPicture::itemInInventory(Item *item) {
return _inventory->itemInInventory(item);
}
-bool InventoryPicture::itemInInventory(const tItemID id) {
+bool InventoryPicture::itemInInventory(const ItemID id) {
return _inventory->itemInInventory(id);
}
@@ -181,7 +181,7 @@ void InventoryPicture::activateInventoryPicture() {
if (_lastReferenceCount != _inventory->getReferenceCount()) {
uint32 numItems = _inventory->getNumItems();
- tCoordType x, y;
+ CoordType x, y;
getItemXY(0, x, y);
_panelMovie.moveMovieBoxTo(x, y);
_panelMovie.show();
@@ -251,12 +251,12 @@ void InventoryPicture::handleInput(const Input &input, const Hotspot *cursorSpot
}
void InventoryPicture::highlightCurrentItem() {
- tCoordType x, y;
+ CoordType x, y;
getItemXY(_currentItemIndex, x, y);
_highlightBounds.moveTo(x, y);
}
-InventoryItemsPicture::InventoryItemsPicture(const tDisplayElementID id, InputHandler *nextHandler, Inventory *inventory) :
+InventoryItemsPicture::InventoryItemsPicture(const DisplayElementID id, InputHandler *nextHandler, Inventory *inventory) :
InventoryPicture(id, nextHandler, inventory) {
_pictName = "Images/Items/Inventory/Inventory Panel";
_movieName = "Images/Items/Inventory/Inventory Panel Movie";
@@ -273,7 +273,7 @@ InventoryItemsPicture::InventoryItemsPicture(const tDisplayElementID id, InputHa
void InventoryItemsPicture::loopCurrentItem() {
if (_isLooping) {
- tCoordType x, y;
+ CoordType x, y;
getItemXY(_currentItemIndex, x, y);
_panelMovie.moveMovieBoxTo(x, y);
_highlightBounds.moveTo(x, y);
@@ -339,7 +339,7 @@ void InventoryItemsPicture::playEndMessage(DisplayElement *pushElement) {
endMessage.stop();
}
-BiochipPicture::BiochipPicture(const tDisplayElementID id, InputHandler *nextHandler, Inventory *inventory) :
+BiochipPicture::BiochipPicture(const DisplayElementID id, InputHandler *nextHandler, Inventory *inventory) :
InventoryPicture(id, nextHandler, inventory) {
_pictName = "Images/Items/Biochips/Biochip Panel";
_movieName = "Images/Items/Biochips/Biochip Panel Movie";
@@ -355,7 +355,7 @@ BiochipPicture::BiochipPicture(const tDisplayElementID id, InputHandler *nextHan
void BiochipPicture::unhighlightCurrentItem() {
InventoryPicture::unhighlightCurrentItem();
- tCoordType x, y;
+ CoordType x, y;
getItemXY(_currentItemIndex, x, y);
_panelMovie.show();
_panelMovie.moveMovieBoxTo(x, y);
diff --git a/engines/pegasus/items/inventorypicture.h b/engines/pegasus/items/inventorypicture.h
index 034354df09..18e85ef988 100755
--- a/engines/pegasus/items/inventorypicture.h
+++ b/engines/pegasus/items/inventorypicture.h
@@ -39,7 +39,7 @@ class Transition;
class InventoryPicture : public InputHandler, public Picture {
public:
- InventoryPicture(const tDisplayElementID, InputHandler *, Inventory *);
+ InventoryPicture(const DisplayElementID, InputHandler *, Inventory *);
virtual ~InventoryPicture() {}
void initInventoryImage(Transition *);
@@ -51,18 +51,18 @@ public:
void handleInput(const Input &, const Hotspot *);
bool wantsCursor() { return false; }
- tInventoryResult addInventoryItem(Item *);
- tInventoryResult removeInventoryItem(Item *);
+ InventoryResult addInventoryItem(Item *);
+ InventoryResult removeInventoryItem(Item *);
void removeAllItems();
Item *getCurrentItem() { return _currentItem; }
void setCurrentItemIndex(int32);
- void setCurrentItemID(tItemID);
+ void setCurrentItemID(ItemID);
int32 getCurrentItemIndex() { return _currentItemIndex; }
bool itemInInventory(Item *);
- bool itemInInventory(const tItemID);
+ bool itemInInventory(const ItemID);
protected:
- void getItemXY(uint32, tCoordType &, tCoordType &);
+ void getItemXY(uint32, CoordType &, CoordType &);
void draw(const Common::Rect &);
void drawItemHighlight(const Common::Rect &);
virtual void highlightCurrentItem();
@@ -91,7 +91,7 @@ protected:
class InventoryItemsPicture : public InventoryPicture {
public:
- InventoryItemsPicture(const tDisplayElementID, InputHandler *, Inventory *);
+ InventoryItemsPicture(const DisplayElementID, InputHandler *, Inventory *);
virtual ~InventoryItemsPicture() {}
void deactivateInventoryPicture();
@@ -112,7 +112,7 @@ protected:
class BiochipPicture : public InventoryPicture {
public:
- BiochipPicture(const tDisplayElementID, InputHandler *, Inventory *);
+ BiochipPicture(const DisplayElementID, InputHandler *, Inventory *);
virtual ~BiochipPicture() {}
protected:
diff --git a/engines/pegasus/items/item.cpp b/engines/pegasus/items/item.cpp
index bcb85defae..83e3b0231e 100755
--- a/engines/pegasus/items/item.cpp
+++ b/engines/pegasus/items/item.cpp
@@ -38,7 +38,7 @@
namespace Pegasus {
-Item::Item(const tItemID id, const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction) : IDObject(id) {
+Item::Item(const ItemID id, const NeighborhoodID neighborhood, const RoomID room, const DirectionConstant direction) : IDObject(id) {
_itemNeighborhood = neighborhood;
_itemRoom = room;
_itemDirection = direction;
@@ -147,11 +147,11 @@ void Item::readFromStream(Common::ReadStream *stream) {
_itemState = stream->readUint16BE();
}
-tActorID Item::getItemOwner() const {
+ActorID Item::getItemOwner() const {
return _itemOwnerID;
}
-void Item::setItemOwner(const tActorID owner) {
+void Item::setItemOwner(const ActorID owner) {
_itemOwnerID = owner;
if (owner == kNoActorID) {
@@ -163,15 +163,15 @@ void Item::setItemOwner(const tActorID owner) {
}
}
-tWeightType Item::getItemWeight() {
+WeightType Item::getItemWeight() {
return _itemWeight;
}
-tItemState Item::getItemState() const {
+ItemState Item::getItemState() const {
return _itemState;
}
-void Item::setItemState(const tItemState state) {
+void Item::setItemState(const ItemState state) {
if (state != _itemState) {
_itemState = state;
@@ -182,13 +182,13 @@ void Item::setItemState(const tItemState state) {
}
}
-void Item::getItemRoom(tNeighborhoodID &neighborhood, tRoomID &room, tDirectionConstant &direction) const {
+void Item::getItemRoom(NeighborhoodID &neighborhood, RoomID &room, DirectionConstant &direction) const {
neighborhood = _itemNeighborhood;
room = _itemRoom;
direction = _itemDirection;
}
-void Item::setItemRoom(const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction) {
+void Item::setItemRoom(const NeighborhoodID neighborhood, const RoomID room, const DirectionConstant direction) {
_itemNeighborhood = neighborhood;
_itemRoom = room;
_itemDirection = direction;
@@ -199,7 +199,7 @@ void Item::setItemRoom(const tNeighborhoodID neighborhood, const tRoomID room, c
dropped();
}
-tNeighborhoodID Item::getItemNeighborhood() const {
+NeighborhoodID Item::getItemNeighborhood() const {
return _itemNeighborhood;
}
@@ -208,7 +208,7 @@ TimeValue Item::getSharedAreaTime() const {
return 0xffffffff;
TimeValue time;
- tItemState state;
+ ItemState state;
findItemStateEntryByState(_sharedAreaInfo, _itemState, time);
if (time == 0xffffffff)
@@ -241,7 +241,7 @@ void Item::deselect() {
}
}
-void Item::getItemStateEntry(ItemStateInfo info, uint32 index, tItemState &state, TimeValue &time) {
+void Item::getItemStateEntry(ItemStateInfo info, uint32 index, ItemState &state, TimeValue &time) {
if (index < info.numEntries) {
state = info.entries[index].itemState;
time = info.entries[index].itemTime;
@@ -251,7 +251,7 @@ void Item::getItemStateEntry(ItemStateInfo info, uint32 index, tItemState &state
}
}
-void Item::findItemStateEntryByState(ItemStateInfo info, tItemState state, TimeValue &time) {
+void Item::findItemStateEntryByState(ItemStateInfo info, ItemState state, TimeValue &time) {
for (uint16 i = 0; i < info.numEntries; i++) {
if (info.entries[i].itemState == state) {
time = info.entries[i].itemTime;
@@ -275,7 +275,7 @@ ItemStateInfo Item::readItemState(Common::SeekableReadStream *stream) {
return info;
}
-Sprite *Item::getDragSprite(const tDisplayElementID id) const {
+Sprite *Item::getDragSprite(const DisplayElementID id) const {
PegasusEngine *vm = (PegasusEngine *)g_engine;
Sprite *result = new Sprite(id);
SpriteFrame *frame = new SpriteFrame();
diff --git a/engines/pegasus/items/item.h b/engines/pegasus/items/item.h
index b74dfc4e96..6d743c3408 100755
--- a/engines/pegasus/items/item.h
+++ b/engines/pegasus/items/item.h
@@ -55,7 +55,7 @@ struct JMPItemInfo {
// state of an inventory item.
struct ItemStateEntry {
- tItemState itemState;
+ ItemState itemState;
TimeValue itemTime;
};
@@ -100,158 +100,158 @@ const uint16 kItemBaseResID = 128;
// Item IDs.
-const tItemID kAirMask = 7;
-const tItemID kAntidote = 8;
-const tItemID kArgonCanister = 9;
-const tItemID kCardBomb = 10;
-const tItemID kCrowbar = 11;
-const tItemID kGasCanister = 12;
-const tItemID kHistoricalLog = 13;
-const tItemID kJourneymanKey = 14;
-const tItemID kKeyCard = 15;
-const tItemID kMachineGun = 16;
-const tItemID kMarsCard = 17;
-const tItemID kNitrogenCanister = 18;
-const tItemID kOrangeJuiceGlassFull = 19;
-const tItemID kOrangeJuiceGlassEmpty = 20;
-const tItemID kPoisonDart = 21;
-const tItemID kSinclairKey = 22;
-const tItemID kStunGun = 23;
-const tItemID kArgonPickup = 24;
+const ItemID kAirMask = 7;
+const ItemID kAntidote = 8;
+const ItemID kArgonCanister = 9;
+const ItemID kCardBomb = 10;
+const ItemID kCrowbar = 11;
+const ItemID kGasCanister = 12;
+const ItemID kHistoricalLog = 13;
+const ItemID kJourneymanKey = 14;
+const ItemID kKeyCard = 15;
+const ItemID kMachineGun = 16;
+const ItemID kMarsCard = 17;
+const ItemID kNitrogenCanister = 18;
+const ItemID kOrangeJuiceGlassFull = 19;
+const ItemID kOrangeJuiceGlassEmpty = 20;
+const ItemID kPoisonDart = 21;
+const ItemID kSinclairKey = 22;
+const ItemID kStunGun = 23;
+const ItemID kArgonPickup = 24;
// Biochips.
-const tItemID kAIBiochip = 0;
-const tItemID kInterfaceBiochip = 1;
-const tItemID kMapBiochip = 2;
-const tItemID kOpticalBiochip = 3;
-const tItemID kPegasusBiochip = 4;
-const tItemID kRetinalScanBiochip = 5;
-const tItemID kShieldBiochip = 6;
+const ItemID kAIBiochip = 0;
+const ItemID kInterfaceBiochip = 1;
+const ItemID kMapBiochip = 2;
+const ItemID kOpticalBiochip = 3;
+const ItemID kPegasusBiochip = 4;
+const ItemID kRetinalScanBiochip = 5;
+const ItemID kShieldBiochip = 6;
-const tItemID kNumItems = 25;
+const ItemID kNumItems = 25;
// Item States.
-const tItemState kAI000 = 0;
-const tItemState kAI005 = 1;
-const tItemState kAI006 = 2;
-const tItemState kAI010 = 3;
-const tItemState kAI015 = 4;
-const tItemState kAI016 = 5;
-const tItemState kAI020 = 6;
-const tItemState kAI024 = 7;
-const tItemState kAI100 = 8;
-const tItemState kAI101 = 9;
-const tItemState kAI105 = 10;
-const tItemState kAI106 = 11;
-const tItemState kAI110 = 12;
-const tItemState kAI111 = 13;
-const tItemState kAI115 = 14;
-const tItemState kAI116 = 15;
-const tItemState kAI120 = 16;
-const tItemState kAI121 = 17;
-const tItemState kAI124 = 18;
-const tItemState kAI125 = 19;
-const tItemState kAI126 = 20;
-const tItemState kAI200 = 21;
-const tItemState kAI201 = 22;
-const tItemState kAI202 = 23;
-const tItemState kAI205 = 24;
-const tItemState kAI206 = 25;
-const tItemState kAI210 = 26;
-const tItemState kAI211 = 27;
-const tItemState kAI212 = 28;
-const tItemState kAI215 = 29;
-const tItemState kAI216 = 30;
-const tItemState kAI220 = 31;
-const tItemState kAI221 = 32;
-const tItemState kAI222 = 33;
-const tItemState kAI224 = 34;
-const tItemState kAI225 = 35;
-const tItemState kAI226 = 36;
-const tItemState kAI300 = 37;
-const tItemState kAI301 = 38;
-const tItemState kAI302 = 39;
-const tItemState kAI303 = 40;
-const tItemState kAI305 = 41;
-const tItemState kAI306 = 42;
-const tItemState kAI310 = 43;
-const tItemState kAI311 = 44;
-const tItemState kAI312 = 45;
-const tItemState kAI313 = 46;
-const tItemState kAI315 = 47;
-const tItemState kAI316 = 48;
-const tItemState kAI320 = 49;
-const tItemState kAI321 = 50;
-const tItemState kAI322 = 51;
-const tItemState kAI323 = 52;
-const tItemState kAI324 = 53;
-const tItemState kAI325 = 54;
-const tItemState kAI326 = 55;
-const tItemState kNormalItem = 56;
-const tItemState kMapUnavailable = 57;
-const tItemState kMapEngaged = 58;
-const tItemState kOptical000 = 59;
-const tItemState kOptical001 = 60;
-const tItemState kOptical002 = 61;
-const tItemState kOptical010 = 62;
-const tItemState kOptical011 = 63;
-const tItemState kOptical012 = 64;
-const tItemState kOptical020 = 65;
-const tItemState kOptical021 = 66;
-const tItemState kOptical100 = 67;
-const tItemState kOptical101 = 68;
-const tItemState kOptical102 = 69;
-const tItemState kOptical110 = 70;
-const tItemState kOptical111 = 71;
-const tItemState kOptical112 = 72;
-const tItemState kOptical120 = 73;
-const tItemState kOptical121 = 74;
-const tItemState kOptical200 = 75;
-const tItemState kOptical201 = 76;
-const tItemState kOptical210 = 77;
-const tItemState kOptical211 = 78;
-const tItemState kPegasusTSA00 = 79;
-const tItemState kPegasusTSA10 = 80;
-const tItemState kPegasusPrehistoric00 = 81;
-const tItemState kPegasusPrehistoric01 = 82;
-const tItemState kPegasusPrehistoric10 = 83;
-const tItemState kPegasusPrehistoric11 = 84;
-const tItemState kPegasusMars00 = 85;
-const tItemState kPegasusMars01 = 86;
-const tItemState kPegasusMars10 = 87;
-const tItemState kPegasusMars11 = 88;
-const tItemState kPegasusNorad00 = 89;
-const tItemState kPegasusNorad01 = 90;
-const tItemState kPegasusNorad10 = 91;
-const tItemState kPegasusNorad11 = 92;
-const tItemState kPegasusWSC00 = 93;
-const tItemState kPegasusWSC01 = 94;
-const tItemState kPegasusWSC10 = 95;
-const tItemState kPegasusWSC11 = 96;
-const tItemState kPegasusCaldoria = 97;
-const tItemState kRetinalSimulating = 98;
-const tItemState kShieldNormal = 99;
-const tItemState kShieldRadiation = 100;
-const tItemState kShieldPlasma = 101;
-const tItemState kShieldCardBomb = 102;
-const tItemState kShieldDraining = 103;
-const tItemState kAirMaskEmptyOff = 104;
-const tItemState kAirMaskEmptyFilter = 105;
-const tItemState kAirMaskLowOff = 106;
-const tItemState kAirMaskLowFilter = 107;
-const tItemState kAirMaskLowOn = 108;
-const tItemState kAirMaskFullOff = 109;
-const tItemState kAirMaskFullFilter = 110;
-const tItemState kAirMaskFullOn = 111;
-const tItemState kArgonEmpty = 112;
-const tItemState kArgonFull = 113;
-const tItemState kFlashlightOff = 114;
-const tItemState kFlashlightOn = 115;
-const tItemState kNitrogenEmpty = 116;
-const tItemState kNitrogenFull = 117;
-const tItemState kFullGlass = 118;
+const ItemState kAI000 = 0;
+const ItemState kAI005 = 1;
+const ItemState kAI006 = 2;
+const ItemState kAI010 = 3;
+const ItemState kAI015 = 4;
+const ItemState kAI016 = 5;
+const ItemState kAI020 = 6;
+const ItemState kAI024 = 7;
+const ItemState kAI100 = 8;
+const ItemState kAI101 = 9;
+const ItemState kAI105 = 10;
+const ItemState kAI106 = 11;
+const ItemState kAI110 = 12;
+const ItemState kAI111 = 13;
+const ItemState kAI115 = 14;
+const ItemState kAI116 = 15;
+const ItemState kAI120 = 16;
+const ItemState kAI121 = 17;
+const ItemState kAI124 = 18;
+const ItemState kAI125 = 19;
+const ItemState kAI126 = 20;
+const ItemState kAI200 = 21;
+const ItemState kAI201 = 22;
+const ItemState kAI202 = 23;
+const ItemState kAI205 = 24;
+const ItemState kAI206 = 25;
+const ItemState kAI210 = 26;
+const ItemState kAI211 = 27;
+const ItemState kAI212 = 28;
+const ItemState kAI215 = 29;
+const ItemState kAI216 = 30;
+const ItemState kAI220 = 31;
+const ItemState kAI221 = 32;
+const ItemState kAI222 = 33;
+const ItemState kAI224 = 34;
+const ItemState kAI225 = 35;
+const ItemState kAI226 = 36;
+const ItemState kAI300 = 37;
+const ItemState kAI301 = 38;
+const ItemState kAI302 = 39;
+const ItemState kAI303 = 40;
+const ItemState kAI305 = 41;
+const ItemState kAI306 = 42;
+const ItemState kAI310 = 43;
+const ItemState kAI311 = 44;
+const ItemState kAI312 = 45;
+const ItemState kAI313 = 46;
+const ItemState kAI315 = 47;
+const ItemState kAI316 = 48;
+const ItemState kAI320 = 49;
+const ItemState kAI321 = 50;
+const ItemState kAI322 = 51;
+const ItemState kAI323 = 52;
+const ItemState kAI324 = 53;
+const ItemState kAI325 = 54;
+const ItemState kAI326 = 55;
+const ItemState kNormalItem = 56;
+const ItemState kMapUnavailable = 57;
+const ItemState kMapEngaged = 58;
+const ItemState kOptical000 = 59;
+const ItemState kOptical001 = 60;
+const ItemState kOptical002 = 61;
+const ItemState kOptical010 = 62;
+const ItemState kOptical011 = 63;
+const ItemState kOptical012 = 64;
+const ItemState kOptical020 = 65;
+const ItemState kOptical021 = 66;
+const ItemState kOptical100 = 67;
+const ItemState kOptical101 = 68;
+const ItemState kOptical102 = 69;
+const ItemState kOptical110 = 70;
+const ItemState kOptical111 = 71;
+const ItemState kOptical112 = 72;
+const ItemState kOptical120 = 73;
+const ItemState kOptical121 = 74;
+const ItemState kOptical200 = 75;
+const ItemState kOptical201 = 76;
+const ItemState kOptical210 = 77;
+const ItemState kOptical211 = 78;
+const ItemState kPegasusTSA00 = 79;
+const ItemState kPegasusTSA10 = 80;
+const ItemState kPegasusPrehistoric00 = 81;
+const ItemState kPegasusPrehistoric01 = 82;
+const ItemState kPegasusPrehistoric10 = 83;
+const ItemState kPegasusPrehistoric11 = 84;
+const ItemState kPegasusMars00 = 85;
+const ItemState kPegasusMars01 = 86;
+const ItemState kPegasusMars10 = 87;
+const ItemState kPegasusMars11 = 88;
+const ItemState kPegasusNorad00 = 89;
+const ItemState kPegasusNorad01 = 90;
+const ItemState kPegasusNorad10 = 91;
+const ItemState kPegasusNorad11 = 92;
+const ItemState kPegasusWSC00 = 93;
+const ItemState kPegasusWSC01 = 94;
+const ItemState kPegasusWSC10 = 95;
+const ItemState kPegasusWSC11 = 96;
+const ItemState kPegasusCaldoria = 97;
+const ItemState kRetinalSimulating = 98;
+const ItemState kShieldNormal = 99;
+const ItemState kShieldRadiation = 100;
+const ItemState kShieldPlasma = 101;
+const ItemState kShieldCardBomb = 102;
+const ItemState kShieldDraining = 103;
+const ItemState kAirMaskEmptyOff = 104;
+const ItemState kAirMaskEmptyFilter = 105;
+const ItemState kAirMaskLowOff = 106;
+const ItemState kAirMaskLowFilter = 107;
+const ItemState kAirMaskLowOn = 108;
+const ItemState kAirMaskFullOff = 109;
+const ItemState kAirMaskFullFilter = 110;
+const ItemState kAirMaskFullOn = 111;
+const ItemState kArgonEmpty = 112;
+const ItemState kArgonFull = 113;
+const ItemState kFlashlightOff = 114;
+const ItemState kFlashlightOn = 115;
+const ItemState kNitrogenEmpty = 116;
+const ItemState kNitrogenFull = 117;
+const ItemState kFullGlass = 118;
// Extra IDs.
@@ -269,7 +269,7 @@ const uint32 kRemoveGlass = 10;
const uint32 kRemoveDart = 11;
const uint32 kRemoveSinclairKey = 12;
-enum tItemType {
+enum ItemType {
kInventoryItemType,
kBiochipItemType
};
@@ -289,7 +289,7 @@ class Sprite;
class Item : public IDObject {
public:
- Item(const tItemID id, const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction);
+ Item(const ItemID id, const NeighborhoodID neighborhood, const RoomID room, const DirectionConstant direction);
virtual ~Item();
// WriteToStream writes everything EXCEPT the item's ID.
@@ -297,25 +297,25 @@ public:
virtual void writeToStream(Common::WriteStream *stream);
virtual void readFromStream(Common::ReadStream *stream);
- virtual tActorID getItemOwner() const;
- virtual void setItemOwner(const tActorID owner);
+ virtual ActorID getItemOwner() const;
+ virtual void setItemOwner(const ActorID owner);
- void getItemRoom(tNeighborhoodID &neighborhood, tRoomID &room, tDirectionConstant &direction) const;
- void setItemRoom(const tNeighborhoodID neighborhood, const tRoomID room, const tDirectionConstant direction);
- tNeighborhoodID getItemNeighborhood() const;
+ void getItemRoom(NeighborhoodID &neighborhood, RoomID &room, DirectionConstant &direction) const;
+ void setItemRoom(const NeighborhoodID neighborhood, const RoomID room, const DirectionConstant direction);
+ NeighborhoodID getItemNeighborhood() const;
- virtual tWeightType getItemWeight();
+ virtual WeightType getItemWeight();
- virtual void setItemState(const tItemState state);
- virtual tItemState getItemState() const;
+ virtual void setItemState(const ItemState state);
+ virtual ItemState getItemState() const;
- virtual tItemType getItemType() = 0;
+ virtual ItemType getItemType() = 0;
TimeValue getInfoLeftTime() const;
void getInfoRightTimes(TimeValue &, TimeValue &) const;
TimeValue getSharedAreaTime() const;
- Sprite *getDragSprite(const tDisplayElementID) const;
+ Sprite *getDragSprite(const DisplayElementID) const;
/*
select -- called when this item becomes current. Also called when the inventory
@@ -344,12 +344,12 @@ public:
void findItemExtra(const uint32 extraID, ItemExtraEntry &entry);
protected:
- tNeighborhoodID _itemNeighborhood;
- tRoomID _itemRoom;
- tDirectionConstant _itemDirection;
- tActorID _itemOwnerID;
- tWeightType _itemWeight;
- tItemState _itemState;
+ NeighborhoodID _itemNeighborhood;
+ RoomID _itemRoom;
+ DirectionConstant _itemDirection;
+ ActorID _itemOwnerID;
+ WeightType _itemWeight;
+ ItemState _itemState;
JMPItemInfo _itemInfo;
ItemStateInfo _sharedAreaInfo;
@@ -357,8 +357,8 @@ protected:
bool _isActive;
bool _isSelected;
- static void getItemStateEntry(ItemStateInfo, uint32, tItemState&, TimeValue&);
- static void findItemStateEntryByState(ItemStateInfo, tItemState, TimeValue&);
+ static void getItemStateEntry(ItemStateInfo, uint32, ItemState &, TimeValue &);
+ static void findItemStateEntryByState(ItemStateInfo, ItemState, TimeValue &);
static ItemStateInfo readItemState(Common::SeekableReadStream *stream);
};
diff --git a/engines/pegasus/items/itemlist.cpp b/engines/pegasus/items/itemlist.cpp
index cbe48285e9..4c30975589 100755
--- a/engines/pegasus/items/itemlist.cpp
+++ b/engines/pegasus/items/itemlist.cpp
@@ -53,12 +53,12 @@ void ItemList::readFromStream(Common::ReadStream *stream) {
uint32 itemCount = stream->readUint32BE();
for (uint32 i = 0; i < itemCount; i++) {
- tItemID itemID = stream->readUint16BE();
+ ItemID itemID = stream->readUint16BE();
g_allItems.findItemByID(itemID)->readFromStream(stream);
}
}
-Item *ItemList::findItemByID(const tItemID id) {
+Item *ItemList::findItemByID(const ItemID id) {
for (ItemIterator it = begin(); it != end(); it++)
if ((*it)->getObjectID() == id)
return *it;
diff --git a/engines/pegasus/items/itemlist.h b/engines/pegasus/items/itemlist.h
index df31b5c262..b5a1d489be 100755
--- a/engines/pegasus/items/itemlist.h
+++ b/engines/pegasus/items/itemlist.h
@@ -47,7 +47,7 @@ public:
virtual void writeToStream(Common::WriteStream *stream);
virtual void readFromStream(Common::ReadStream *stream);
- Item *findItemByID(const tItemID id);
+ Item *findItemByID(const ItemID id);
};
typedef ItemList::iterator ItemIterator;