TITANIC: Rename CPetGraphic to CPetGfxElement to avoid naming clash

This commit is contained in:
Paul Gilbert 2016-03-31 13:05:17 -04:00
parent 6a1b452e16
commit 5c902685fc
10 changed files with 59 additions and 59 deletions

View File

@ -385,7 +385,7 @@ MODULE_OBJS := \
pet_control/pet_conversation_section.o \
pet_control/pet_element.o \
pet_control/pet_frame.o \
pet_control/pet_graphic.o \
pet_control/pet_gfx_element.o \
pet_control/pet_inventory_section.o \
pet_control/pet_rooms_section.o \
pet_control/pet_remote_section.o \

View File

@ -24,13 +24,13 @@
#define TITANIC_PET_CONTROL_LIST_ITEM_H
#include "titanic/core/list.h"
#include "titanic/pet_control/pet_graphic.h"
#include "titanic/pet_control/pet_gfx_element.h"
namespace Titanic {
class CPetControlListItem : public ListItem {
protected:
CPetGraphic _val;
CPetGfxElement _val;
int _field30;
public:
CPetControlListItem() : _field30(0) {}

View File

@ -37,9 +37,9 @@ protected:
int _field1C;
int _field20;
int _field24;
CPetGraphic _val1;
CPetGraphic _val2;
CPetGraphic _val3;
CPetGfxElement _val1;
CPetGfxElement _val2;
CPetGfxElement _val3;
public:
CPetControlSub10();

View File

@ -25,20 +25,20 @@
#include "titanic/pet_control/pet_section.h"
#include "titanic/pet_control/pet_control_sub12.h"
#include "titanic/pet_control/pet_graphic.h"
#include "titanic/pet_control/pet_gfx_element.h"
namespace Titanic {
class CPetControlSub5 : public CPetSection {
private:
CPetGraphic _val1;
CPetGraphic _val2;
CPetGraphic _val3;
CPetGraphic _val4;
CPetGfxElement _val1;
CPetGfxElement _val2;
CPetGfxElement _val3;
CPetGfxElement _val4;
int _field98;
int _field9C;
int _fieldA0;
CPetGraphic _valArray1[6];
CPetGfxElement _valArray1[6];
int _field17C;
int _field18C;
CPetControlSub12 _sub12;

View File

@ -25,24 +25,24 @@
#include "titanic/pet_control/pet_section.h"
#include "titanic/pet_control/pet_control_sub12.h"
#include "titanic/pet_control/pet_graphic.h"
#include "titanic/pet_control/pet_gfx_element.h"
namespace Titanic {
class CPetConversationSection : public CPetSection {
private:
CPetGraphic _val1;
CPetGraphic _val2;
CPetGraphic _val3;
CPetGraphic _valArray1[3];
CPetGraphic _val4;
CPetGraphic _val5;
CPetGraphic _val6;
CPetGfxElement _val1;
CPetGfxElement _val2;
CPetGfxElement _val3;
CPetGfxElement _valArray1[3];
CPetGfxElement _val4;
CPetGfxElement _val5;
CPetGfxElement _val6;
int _field14C;
CPetGraphic _val7;
CPetGraphic _val8;
CPetGraphic _val9;
CPetGraphic _valArray2[9];
CPetGfxElement _val7;
CPetGfxElement _val8;
CPetGfxElement _val9;
CPetGfxElement _valArray2[9];
int _field30C;
CPetControlSub12 _sub1;
CPetControlSub12 _sub2;

View File

@ -24,7 +24,7 @@
#define TITANIC_PET_FRAME_H
#include "titanic/pet_control/pet_section.h"
#include "titanic/pet_control/pet_graphic.h"
#include "titanic/pet_control/pet_gfx_element.h"
namespace Titanic {
@ -32,13 +32,13 @@ class CPetFrame : public CPetSection {
private:
static int _indexes[6];
CPetGraphic _modeButtons[6];
CPetGraphic _titles[6];
CPetGraphic _modeBackground;
CPetGraphic _val2;
CPetGraphic _val3;
CPetGraphic _background;
CPetGraphic _indent[7];
CPetGfxElement _modeButtons[6];
CPetGfxElement _titles[6];
CPetGfxElement _modeBackground;
CPetGfxElement _val2;
CPetGfxElement _val3;
CPetGfxElement _background;
CPetGfxElement _indent[7];
private:
/**
* Called to set the owning PET instance and set some initial state

View File

@ -22,12 +22,12 @@
#include "common/textconsole.h"
#include "titanic/core/game_object.h"
#include "titanic/pet_control/pet_graphic.h"
#include "titanic/pet_control/pet_element.h"
#include "titanic/pet_control/pet_control.h"
namespace Titanic {
void CPetGraphic::loadObject(PetElementMode mode, const CString &name,
void CPetGfxElement::setup(PetElementMode mode, const CString &name,
CPetControl *petControl) {
switch (mode) {
case MODE_0:
@ -44,15 +44,15 @@ void CPetGraphic::loadObject(PetElementMode mode, const CString &name,
}
}
void CPetGraphic::proc2() {
void CPetGfxElement::setup() {
error("TODO");
}
void CPetGraphic::draw(CScreenManager *screenManager) {
void CPetGfxElement::draw(CScreenManager *screenManager) {
draw(screenManager, Common::Point(_bounds.left, _bounds.top));
}
void CPetGraphic::draw(CScreenManager *screenManager, const Common::Point &destPos) {
void CPetGfxElement::draw(CScreenManager *screenManager, const Common::Point &destPos) {
CGameObject *obj = getObject();
if (!obj)
obj = _object0;
@ -61,7 +61,7 @@ void CPetGraphic::draw(CScreenManager *screenManager, const Common::Point &destP
obj->draw(screenManager, destPos);
}
void CPetGraphic::getBounds(Rect *rect) {
void CPetGfxElement::getBounds(Rect *rect) {
if (rect) {
CGameObject *obj = getObject();
if (!obj)
@ -74,7 +74,7 @@ void CPetGraphic::getBounds(Rect *rect) {
}
}
CGameObject *CPetGraphic::getObject() const {
CGameObject *CPetGfxElement::getObject() const {
switch (_mode) {
case MODE_0:
return _object0;

View File

@ -20,29 +20,29 @@
*
*/
#ifndef TITANIC_PET_GRAPHIC_H
#define TITANIC_PET_GRAPHIC_H
#ifndef TITANIC_PET_GFX_ELEMENT_H
#define TITANIC_PET_GFX_ELEMENT_H
#include "titanic/pet_control/pet_element.h"
namespace Titanic {
class CPetGraphic: public CPetElement {
class CPetGfxElement: public CPetElement {
protected:
CGameObject *_object0;
CGameObject *_object1;
CGameObject *_object2;
public:
CPetGraphic() : CPetElement(), _object0(nullptr), _object1(nullptr),
CPetGfxElement() : CPetElement(), _object0(nullptr), _object1(nullptr),
_object2(nullptr) {}
/**
* Load an object into the element
*/
virtual void loadObject(PetElementMode mode, const CString &name,
virtual void setup(PetElementMode mode, const CString &name,
CPetControl *petControl);
virtual void proc2();
virtual void setup();
/**
* Draw the item
@ -67,4 +67,4 @@ public:
} // End of namespace Titanic
#endif /* TITANIC_PET_GRAPHIC_H */
#endif /* TITANIC_PET_GFX_ELEMENT_H */

View File

@ -26,24 +26,24 @@
#include "titanic/pet_control/pet_section.h"
#include "titanic/pet_control/pet_control_sub10.h"
#include "titanic/pet_control/pet_control_sub12.h"
#include "titanic/pet_control/pet_graphic.h"
#include "titanic/pet_control/pet_gfx_element.h"
namespace Titanic {
class CPetRemoteSection : public CPetSection {
private:
CPetControlSub10 _sub10;
CPetGraphic _val1;
CPetGraphic _val2;
CPetGraphic _val3;
CPetGraphic _val4;
CPetGraphic _val5;
CPetGraphic _val6;
CPetGraphic _val7;
CPetGraphic _val8;
CPetGraphic _val9;
CPetGraphic _val10;
CPetGraphic _val11;
CPetGfxElement _val1;
CPetGfxElement _val2;
CPetGfxElement _val3;
CPetGfxElement _val4;
CPetGfxElement _val5;
CPetGfxElement _val6;
CPetGfxElement _val7;
CPetGfxElement _val8;
CPetGfxElement _val9;
CPetGfxElement _val10;
CPetGfxElement _val11;
CPetControlSub12 _sub12;
public:

View File

@ -42,7 +42,7 @@ private:
int _field114;
int _field118;
int _field11C;
CPetGraphic _val1;
CPetGfxElement _val1;
CPetControlSub12 _sub12;
int _field1C0;
int _field1C4;