aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2013-09-18 19:17:19 +0400
committerEugene Sandulenko2013-09-18 19:39:53 +0400
commit1ce1712b7ba5042ab88d1ad6d825d249836c7d7b (patch)
treec8f26018b410b6c86dbe18b82481df556f8f82ff /engines
parentc354981037621fd1bc7b44381d0e7d24d984d5a6 (diff)
downloadscummvm-rg350-1ce1712b7ba5042ab88d1ad6d825d249836c7d7b.tar.gz
scummvm-rg350-1ce1712b7ba5042ab88d1ad6d825d249836c7d7b.tar.bz2
scummvm-rg350-1ce1712b7ba5042ab88d1ad6d825d249836c7d7b.zip
FULLPIPE: Remove C* prefix from inventory classes
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/fullpipe.h4
-rw-r--r--engines/fullpipe/gameloader.cpp2
-rw-r--r--engines/fullpipe/gameloader.h4
-rw-r--r--engines/fullpipe/inventory.cpp50
-rw-r--r--engines/fullpipe/inventory.h8
5 files changed, 34 insertions, 34 deletions
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index 7cc1397394..24fa9db9aa 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -48,7 +48,7 @@ class CBaseModalObject;
class CGameLoader;
class CGameVar;
class InputController;
-class CInventory2;
+class Inventory2;
struct CursorInfo;
struct EntranceInfo;
class ExCommand;
@@ -190,7 +190,7 @@ public:
int32 _mapTable[200];
Scene *_inventoryScene;
- CInventory2 *_inventory;
+ Inventory2 *_inventory;
int _currSelectedInventoryItemId;
int32 _updateTicks;
diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp
index 7b68ff51ed..3f8255c28f 100644
--- a/engines/fullpipe/gameloader.cpp
+++ b/engines/fullpipe/gameloader.cpp
@@ -31,7 +31,7 @@
namespace Fullpipe {
-CInventory2 *getGameLoaderInventory() {
+Inventory2 *getGameLoaderInventory() {
return &g_fullpipe->_gameLoader->_inventory;
}
diff --git a/engines/fullpipe/gameloader.h b/engines/fullpipe/gameloader.h
index fe0ec95c4c..2fe8bf730f 100644
--- a/engines/fullpipe/gameloader.h
+++ b/engines/fullpipe/gameloader.h
@@ -92,7 +92,7 @@ class CGameLoader : public CObject {
GameProject *_gameProject;
InteractionController *_interactionController;
InputController *_inputController;
- CInventory2 _inventory;
+ Inventory2 _inventory;
Sc2Array _sc2array;
void *_sceneSwitcher;
bool (*_preloadCallback)(const PreloadItem &pre, int flag);
@@ -108,7 +108,7 @@ class CGameLoader : public CObject {
int _preloadEntranceId;
};
-CInventory2 *getGameLoaderInventory();
+Inventory2 *getGameLoaderInventory();
InteractionController *getGameLoaderInteractionController();
MctlCompound *getSc2MctlCompoundBySceneId(int16 sceneId);
diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp
index ccedb57ce2..18ef3c4d97 100644
--- a/engines/fullpipe/inventory.cpp
+++ b/engines/fullpipe/inventory.cpp
@@ -30,8 +30,8 @@
namespace Fullpipe {
-bool CInventory::load(MfcArchive &file) {
- debug(5, "CInventory::load()");
+bool Inventory::load(MfcArchive &file) {
+ debug(5, "Inventory::load()");
_sceneId = file.readUint16LE();
int numInvs = file.readUint32LE();
@@ -52,7 +52,7 @@ bool CInventory::load(MfcArchive &file) {
return true;
}
-int CInventory::getInventoryPoolItemIndexById(int itemId) {
+int Inventory::getInventoryPoolItemIndexById(int itemId) {
if (_itemsPool.size() <= 0)
return -1;
@@ -64,7 +64,7 @@ int CInventory::getInventoryPoolItemIndexById(int itemId) {
return 0;
}
-bool CInventory::setItemFlags(int itemId, int flags) {
+bool Inventory::setItemFlags(int itemId, int flags) {
int idx = getInventoryPoolItemIndexById(itemId);
if (idx < 0)
@@ -75,7 +75,7 @@ bool CInventory::setItemFlags(int itemId, int flags) {
return true;
}
-CInventory2::CInventory2() {
+Inventory2::Inventory2() {
_selectedId = -1;
_field_48 = -1;
_scene = 0;
@@ -85,7 +85,7 @@ CInventory2::CInventory2() {
_topOffset = -65;
}
-bool CInventory2::loadPartial(MfcArchive &file) { // CInventory2_SerializePartially
+bool Inventory2::loadPartial(MfcArchive &file) { // Inventory2_SerializePartially
int numInvs = file.readUint32LE();
for (int i = 0; i < numInvs; i++) {
@@ -98,27 +98,27 @@ bool CInventory2::loadPartial(MfcArchive &file) { // CInventory2_SerializePartia
return true;
}
-void CInventory2::addItem(int itemId, int count) {
+void Inventory2::addItem(int itemId, int count) {
if (getInventoryPoolItemIndexById(itemId) >= 0)
_inventoryItems.push_back(new InventoryItem(itemId, count));
}
-void CInventory2::addItem2(StaticANIObject *obj) {
+void Inventory2::addItem2(StaticANIObject *obj) {
if (getInventoryPoolItemIndexById(obj->_id) >= 0 && getInventoryPoolItemFieldCById(obj->_id) != 2) {
addItem(obj->_id, 1);
obj->hide();
}
}
-void CInventory2::removeItem(int itemId, int count) {
- warning("STUB: CInventory2::removeItem(%d, %d)", itemId, count);
+void Inventory2::removeItem(int itemId, int count) {
+ warning("STUB: Inventory2::removeItem(%d, %d)", itemId, count);
}
-void CInventory2::removeItem2(Scene *sceneObj, int itemId, int x, int y, int priority) {
+void Inventory2::removeItem2(Scene *sceneObj, int itemId, int x, int y, int priority) {
warning("STUB: void removeItem2(sc, %d, %d, %d, %d)", itemId, x, y, priority);
}
-int CInventory2::getCountItemsWithId(int itemId) {
+int Inventory2::getCountItemsWithId(int itemId) {
int res = 0;
for (uint i = 0; i < _inventoryItems.size(); i++) {
@@ -129,7 +129,7 @@ int CInventory2::getCountItemsWithId(int itemId) {
return res;
}
-int CInventory2::getInventoryItemIndexById(int itemId) {
+int Inventory2::getInventoryItemIndexById(int itemId) {
for (uint i = 0; i < _inventoryItems.size(); i++) {
if (_inventoryItems[i]->itemId == itemId)
return i;
@@ -138,11 +138,11 @@ int CInventory2::getInventoryItemIndexById(int itemId) {
return -1;
}
-int CInventory2::getInventoryPoolItemIdAtIndex(int itemId) {
+int Inventory2::getInventoryPoolItemIdAtIndex(int itemId) {
return _itemsPool[itemId]->id;
}
-int CInventory2::getInventoryPoolItemFieldCById(int itemId) {
+int Inventory2::getInventoryPoolItemFieldCById(int itemId) {
for (uint i = 0; i < _itemsPool.size(); i++) {
if (_itemsPool[i]->id == itemId)
return _itemsPool[i]->field_C;
@@ -151,7 +151,7 @@ int CInventory2::getInventoryPoolItemFieldCById(int itemId) {
return 0;
}
-int CInventory2::getItemFlags(int itemId) {
+int Inventory2::getItemFlags(int itemId) {
int idx = getInventoryPoolItemIndexById(itemId);
if (idx < 0)
@@ -160,7 +160,7 @@ int CInventory2::getItemFlags(int itemId) {
return _itemsPool[idx]->flags;
}
-void CInventory2::rebuildItemRects() {
+void Inventory2::rebuildItemRects() {
_scene = g_fullpipe->accessScene(_sceneId);
if (!_scene)
@@ -222,7 +222,7 @@ void CInventory2::rebuildItemRects() {
}
}
-void CInventory2::draw() {
+void Inventory2::draw() {
if (!_scene)
return;
@@ -295,7 +295,7 @@ reset:
}
-void CInventory2::slideIn() {
+void Inventory2::slideIn() {
_isInventoryOut = false;
ExCommand *ex = new ExCommand(0, 17, 65, 0, 0, 0, 1, 0, 0, 0);
@@ -307,7 +307,7 @@ void CInventory2::slideIn() {
ex->postMessage();
}
-void CInventory2::slideOut() {
+void Inventory2::slideOut() {
_isInventoryOut = true;
ExCommand *ex = new ExCommand(0, 17, 65, 0, 0, 0, 1, 0, 0, 0);
@@ -319,7 +319,7 @@ void CInventory2::slideOut() {
ex->postMessage();
}
-bool CInventory2::handleLeftClick(ExCommand *cmd) {
+bool Inventory2::handleLeftClick(ExCommand *cmd) {
if (!_isInventoryOut)
return false;
@@ -353,7 +353,7 @@ bool CInventory2::handleLeftClick(ExCommand *cmd) {
return res;
}
-int CInventory2::selectItem(int itemId) {
+int Inventory2::selectItem(int itemId) {
if (getInventoryItemIndexById(itemId) < 0)
return -1;
@@ -371,7 +371,7 @@ int CInventory2::selectItem(int itemId) {
return _selectedId;
}
-bool CInventory2::unselectItem(bool flag) {
+bool Inventory2::unselectItem(bool flag) {
if (_selectedId < 0)
return false;
@@ -387,7 +387,7 @@ bool CInventory2::unselectItem(bool flag) {
return true;
}
-int CInventory2::getHoveredItem(Common::Point *point) {
+int Inventory2::getHoveredItem(Common::Point *point) {
int selId = getSelectedItemId();
if (point->y <= 20 && !_isInventoryOut && !_isLocked)
@@ -422,7 +422,7 @@ int CInventory2::getHoveredItem(Common::Point *point) {
}
void FullpipeEngine::getAllInventory() {
- CInventory2 *inv = getGameLoaderInventory();
+ Inventory2 *inv = getGameLoaderInventory();
for (uint i = 0; i < inv->getItemsPoolCount(); ++i ) {
int id = inv->getInventoryPoolItemIdAtIndex(i);
diff --git a/engines/fullpipe/inventory.h b/engines/fullpipe/inventory.h
index 5f1030398c..6d07f069bd 100644
--- a/engines/fullpipe/inventory.h
+++ b/engines/fullpipe/inventory.h
@@ -42,13 +42,13 @@ struct InventoryPoolItem {
typedef Common::Array<InventoryPoolItem *> InventoryPoolItems;
-class CInventory : public CObject {
+class Inventory : public CObject {
protected:
int16 _sceneId;
InventoryPoolItems _itemsPool;
public:
- CInventory() { _sceneId = 0; }
+ Inventory() { _sceneId = 0; }
virtual bool load(MfcArchive &file);
int getInventoryPoolItemIndexById(int itemId);
@@ -83,7 +83,7 @@ struct InventoryIcon {
typedef Common::Array<InventoryIcon *> InventoryIcons;
-class CInventory2 : public CInventory {
+class Inventory2 : public Inventory {
InventoryItems _inventoryItems;
InventoryIcons _inventoryIcons;
int _selectedId;
@@ -95,7 +95,7 @@ class CInventory2 : public CInventory {
BigPicture *_picture;
public:
- CInventory2();
+ Inventory2();
bool loadPartial(MfcArchive &file);
void addItem(int itemId, int count);
void addItem2(StaticANIObject *obj);