Skip to content

Commit

Permalink
NWN: Add createGUIModel()
Browse files Browse the repository at this point in the history
  • Loading branch information
DrMcCoy committed Jan 30, 2014
1 parent 5d124d5 commit 11dc00d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/engines/nwn/model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,21 @@ namespace Engines {
namespace NWN {

Graphics::Aurora::Model_NWN *createWorldModel(const Common::UString &model, const Common::UString &texture) {
Graphics::Aurora::Model_NWN *modelInstance = (Graphics::Aurora::Model_NWN *) SceneMan.createModel(model, texture);
Graphics::Aurora::Model_NWN *modelInstance = (Graphics::Aurora::Model_NWN *) SceneMan.createModel(model, texture, "world");

modelInstance->setBaseOrientation(Common::deg2rad(-90.0), 1.0, 0.0, 0.0);

return modelInstance;
}

Graphics::Aurora::Model_NWN *createGUIModel(const Common::UString &model, const Common::UString &texture) {
Graphics::Aurora::Model_NWN *modelInstance = (Graphics::Aurora::Model_NWN *) SceneMan.createModel(model, texture, "gui");

modelInstance->setBaseScale(100.0, 100.0, 1.0);

return modelInstance;
}

void destroyModel(Graphics::Aurora::Model_NWN *model) {
SceneMan.destroy(model);
}
Expand Down
1 change: 1 addition & 0 deletions src/engines/nwn/model.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ namespace Engines {
namespace NWN {

Graphics::Aurora::Model_NWN *createWorldModel(const Common::UString &model, const Common::UString &texture = "");
Graphics::Aurora::Model_NWN *createGUIModel(const Common::UString &model, const Common::UString &texture = "");

void destroyModel(Graphics::Aurora::Model_NWN *model);

Expand Down

0 comments on commit 11dc00d

Please sign in to comment.