mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-23 20:51:14 +00:00
TITANIC: Adding stub methods to CGameObject
This commit is contained in:
parent
e161a3d207
commit
c87a6e212a
@ -869,17 +869,6 @@ CMailMan *CGameObject::getMailMan() const {
|
||||
return dynamic_cast<CMailMan *>(getDontSaveChild(CMailMan::_type));
|
||||
}
|
||||
|
||||
CStarControl *CGameObject::getStarControl() const {
|
||||
CStarControl *starControl = static_cast<CStarControl *>(getDontSaveChild(CStarControl::_type));
|
||||
if (!starControl) {
|
||||
CViewItem *view = getGameManager()->getView();
|
||||
if (view)
|
||||
starControl = starControl = static_cast<CStarControl *>(view->findChildInstanceOf(CStarControl::_type));
|
||||
}
|
||||
|
||||
return starControl;
|
||||
}
|
||||
|
||||
CTreeItem *CGameObject::getDontSaveChild(ClassDef *classDef) const {
|
||||
CProjectItem *root = getRoot();
|
||||
if (!root)
|
||||
@ -892,11 +881,6 @@ CTreeItem *CGameObject::getDontSaveChild(ClassDef *classDef) const {
|
||||
return dontSave->findChildInstanceOf(classDef);
|
||||
}
|
||||
|
||||
CRoomItem *CGameObject::getRoom() const {
|
||||
CGameManager *gameManager = getGameManager();
|
||||
return gameManager ? gameManager->getRoom() : nullptr;
|
||||
}
|
||||
|
||||
CRoomItem *CGameObject::getHiddenRoom() const {
|
||||
CProjectItem *root = getRoot();
|
||||
return root ? root->findHiddenRoom() : nullptr;
|
||||
@ -1043,6 +1027,25 @@ void CGameObject::resetMail() {
|
||||
mailMan->resetValue();
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
CRoomItem *CGameObject::getRoom() const {
|
||||
CGameManager *gameManager = getGameManager();
|
||||
return gameManager ? gameManager->getRoom() : nullptr;
|
||||
}
|
||||
|
||||
CNodeItem *CGameObject::getNode() const {
|
||||
CGameManager *gameManager = getGameManager();
|
||||
return gameManager ? gameManager->getNode() : nullptr;
|
||||
}
|
||||
|
||||
CViewItem *CGameObject::getView() const {
|
||||
CGameManager *gameManager = getGameManager();
|
||||
return gameManager ? gameManager->getView() : nullptr;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
void CGameObject::petAddToCarryParcel(CGameObject *obj) {
|
||||
CPetControl *pet = getPetControl();
|
||||
if (pet) {
|
||||
@ -1150,6 +1153,31 @@ void CGameObject::petUnlockInput() {
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
CStarControl *CGameObject::getStarControl() const {
|
||||
CStarControl *starControl = static_cast<CStarControl *>(getDontSaveChild(CStarControl::_type));
|
||||
if (!starControl) {
|
||||
CViewItem *view = getGameManager()->getView();
|
||||
if (view)
|
||||
starControl = starControl = static_cast<CStarControl *>(view->findChildInstanceOf(CStarControl::_type));
|
||||
}
|
||||
|
||||
return starControl;
|
||||
}
|
||||
|
||||
void CGameObject::starFn1(int v) {
|
||||
CStarControl *starControl = getStarControl();
|
||||
if (starControl)
|
||||
starControl->fn1(v);
|
||||
}
|
||||
|
||||
void CGameObject::starFn2() {
|
||||
CStarControl *starControl = getStarControl();
|
||||
if (starControl)
|
||||
starControl->fn4();
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
void CGameObject::startTalking(const CString &npcName, uint id, CViewItem *view) {
|
||||
CTrueTalkNPC *npc = static_cast<CTrueTalkNPC *>(getRoot()->findByName(npcName));
|
||||
startTalking(npc, id, view);
|
||||
|
@ -289,11 +289,6 @@ protected:
|
||||
*/
|
||||
CTreeItem *getDontSaveChild(ClassDef *classDef) const;
|
||||
|
||||
/**
|
||||
* Return the current room
|
||||
*/
|
||||
CRoomItem *getRoom() const;
|
||||
|
||||
/**
|
||||
* Returns the special hidden room container
|
||||
*/
|
||||
@ -529,6 +524,23 @@ public:
|
||||
|
||||
bool compareRoomFlags(int mode, uint flags1, uint flags2);
|
||||
|
||||
/*--- CGameManager Methods ---*/
|
||||
|
||||
/**
|
||||
* Return the current room
|
||||
*/
|
||||
CRoomItem *getRoom() const;
|
||||
|
||||
/**
|
||||
* Return the current node
|
||||
*/
|
||||
CNodeItem *getNode() const;
|
||||
|
||||
/**
|
||||
* Return the current room
|
||||
*/
|
||||
CViewItem *getView() const;
|
||||
|
||||
/*--- CPetControl Methods ---*/
|
||||
|
||||
/**
|
||||
@ -624,6 +636,9 @@ public:
|
||||
*/
|
||||
CStarControl *getStarControl() const;
|
||||
|
||||
void starFn1(int v);
|
||||
void starFn2();
|
||||
|
||||
/*--- CTrueTalkManager Methods ---*/
|
||||
|
||||
/**
|
||||
|
@ -57,4 +57,12 @@ void CStarControl::fn3() {
|
||||
warning("CStarControl::fn3");
|
||||
}
|
||||
|
||||
void CStarControl::fn1(int v) {
|
||||
warning("CStarControl::fn1");
|
||||
}
|
||||
|
||||
void CStarControl::fn4() {
|
||||
warning("CStarControl::fn4");
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
@ -53,7 +53,9 @@ public:
|
||||
*/
|
||||
virtual void load(SimpleFile *file);
|
||||
|
||||
void fn1(int v);
|
||||
void fn3();
|
||||
void fn4();
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
Loading…
x
Reference in New Issue
Block a user