Skip to content

Commit

Permalink
GRAPHICS: Move _fileName and _name into Model
Browse files Browse the repository at this point in the history
  • Loading branch information
DrMcCoy committed Jan 29, 2014
1 parent c5b5a22 commit 09c2959
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 17 deletions.
4 changes: 3 additions & 1 deletion src/graphics/aurora/model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ Model::State::State(const Common::UString &n) : name(n), animation(0), animation
}


Model::Model(const Common::UString &scene) : Renderable(scene), _currentState(0) {
Model::Model(const Common::UString &file, const Common::UString &scene) : Renderable(scene),
_fileName(file), _currentState(0) {

}

Model::~Model() {
Expand Down
5 changes: 4 additions & 1 deletion src/graphics/aurora/model.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ namespace Aurora {

class Model : public Renderable {
public:
Model(const Common::UString &scene = "world");
Model(const Common::UString &file, const Common::UString &scene = "world");
~Model();

/** Return the name of every state in this model. */
Expand Down Expand Up @@ -119,6 +119,9 @@ class Model : public Renderable {
typedef std::map<Common::UString, Model *> ModelMap;


Common::UString _fileName;
Common::UString _name;

StateMap _states;
EntityList _entities;

Expand Down
2 changes: 1 addition & 1 deletion src/graphics/aurora/model_kotor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void Model_KotOR::ParserContext::newNode() {


Model_KotOR::Model_KotOR(const Common::UString &name, bool kotor2, const Common::UString &texture, const Common::UString &scene) :
Model(scene), _fileName(name) {
Model(name, scene) {

ParserContext ctx(name, kotor2, texture);

Expand Down
3 changes: 0 additions & 3 deletions src/graphics/aurora/model_kotor.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ class Model_KotOR : public Model {
void newNode();
};

Common::UString _fileName;
Common::UString _name;


void load(ParserContext &ctx);
void loadNode(ParserContext &ctx, Ogre::SceneNode *parent);
Expand Down
2 changes: 1 addition & 1 deletion src/graphics/aurora/model_nwn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ Model_NWN::MeshASCII::MeshASCII() : vCount(0), tCount(0), faceCount(0) {


Model_NWN::Model_NWN(const Common::UString &name, const Common::UString &texture, const Common::UString &scene) :
Model(scene), _fileName(name) {
Model(name, scene) {

ParserContext ctx(name, texture);

Expand Down
2 changes: 0 additions & 2 deletions src/graphics/aurora/model_nwn.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ class Model_NWN : public Model {
MeshASCII();
};

Common::UString _fileName;
Common::UString _name;

Common::UString _superModelName;

Expand Down
2 changes: 1 addition & 1 deletion src/graphics/aurora/model_nwn2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void Model_NWN2::ParserContext::newNode() {
}


Model_NWN2::Model_NWN2(const Common::UString &name, const Common::UString &scene) : Model(scene), _fileName(name) {
Model_NWN2::Model_NWN2(const Common::UString &name, const Common::UString &scene) : Model(name, scene) {
ParserContext ctx(name);

load(ctx);
Expand Down
3 changes: 0 additions & 3 deletions src/graphics/aurora/model_nwn2.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ class Model_NWN2 : public Model {
void newNode();
};

Common::UString _fileName;
Common::UString _name;


void load(ParserContext &ctx);
void loadNode(ParserContext &ctx, Ogre::SceneNode *parent, uint32 type);
Expand Down
2 changes: 1 addition & 1 deletion src/graphics/aurora/model_witcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void Model_Witcher::ParserContext::newNode() {
}


Model_Witcher::Model_Witcher(const Common::UString &name, const Common::UString &scene) : Model(scene), _fileName(name) {
Model_Witcher::Model_Witcher(const Common::UString &name, const Common::UString &scene) : Model(name, scene) {
ParserContext ctx(name);

load(ctx);
Expand Down
3 changes: 0 additions & 3 deletions src/graphics/aurora/model_witcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ class Model_Witcher : public Model {
void newNode();
};

Common::UString _fileName;
Common::UString _name;


void load(ParserContext &ctx);
void loadNode(ParserContext &ctx, Ogre::SceneNode *parent);
Expand Down

0 comments on commit 09c2959

Please sign in to comment.