Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KOTOR: Main menu model #319

Merged
merged 3 commits into from Jul 25, 2018
Merged

KOTOR: Main menu model #319

merged 3 commits into from Jul 25, 2018

Conversation

@Nostritius
Copy link
Contributor

@Nostritius Nostritius commented Jul 18, 2018

This PR adds the malak model standing in the main menu

@@ -91,7 +91,7 @@ Module::Module(::Engines::Console &console)
_pcPositionLoaded(false),
_inDialog(false),
_cameraHeight(0.0f) {

loadTexturePack();
Copy link
Member

@DrMcCoy DrMcCoy Jul 19, 2018

Ah, damn, so that model needs the texture pack after all? Annoying :P

Could you do that texturepack loading in Game::mainMenu() instead, right before MainMenu is instantiated? With a comment that the Malak model needs the texture pack?

_malakScene.reset(new Graphics::Aurora::SubSceneQuad);

_malakModel.reset(loadModelObject("mainmenu"));
_malakModel->playAnimation("default", true, -1);
Copy link
Member

@DrMcCoy DrMcCoy Jul 19, 2018

Can you check that _malakModel is != 0 before dereferencing it here? loadModelObject() might return 0 if the model can't be loaded.


// If a fill quad already exists, move the subscene a bit before it and disable clearing.
if (_quad) {
float x, y, z;
Copy link
Member

@DrMcCoy DrMcCoy Jul 19, 2018

floats x, y, z already exist in the scope above.

src/engines/aurora/kotorjadegui/kotorjadewidget.cpp: In member function  void Engines::KotORJadeWidget::setSubScene(Graphics::Aurora::SubSceneQuad*)’:
src/engines/aurora/kotorjadegui/kotorjadewidget.cpp:235:9: error: declaration of ‘x’ shadows a previous local [-Werror=shadow]
   float x, y, z;
         ^ 
src/engines/aurora/kotorjadegui/kotorjadewidget.cpp:229:8: note: shadowed declaration is here
  float x, y, z;
        ^
src/engines/aurora/kotorjadegui/kotorjadewidget.cpp:235:12: error: declaration of ‘y’ shadows a previous local [-Werror=shadow]
   float x, y, z;
            ^ 
src/engines/aurora/kotorjadegui/kotorjadewidget.cpp:229:11: note: shadowed declaration is here
  float x, y, z;
           ^
src/engines/aurora/kotorjadegui/kotorjadewidget.cpp:235:15: error: declaration of ‘z’ shadows a previous local [-Werror=shadow]
   float x, y, z;
               ^
src/engines/aurora/kotorjadegui/kotorjadewidget.cpp:229:14: note: shadowed declaration is here
  float x, y, z;
              ^

@@ -24,6 +24,8 @@

#include <boost/bind.hpp>

#include <glm/gtc/matrix_transform.hpp>
Copy link
Member

@DrMcCoy DrMcCoy Jul 19, 2018

Please use #include "", not #include <> for glm, because we're using our internal glm, not a system one.

@Nostritius Nostritius force-pushed the kotor_mainmenumodel branch from 0b41453 to 4971a26 Jul 25, 2018
@Nostritius
Copy link
Contributor Author

@Nostritius Nostritius commented Jul 25, 2018

The issues should now be fixed.

@DrMcCoy DrMcCoy merged commit 4971a26 into xoreos:master Jul 25, 2018
0 of 2 checks passed
@DrMcCoy
Copy link
Member

@DrMcCoy DrMcCoy commented Jul 25, 2018

Merged, thanks! :)

@Nostritius Nostritius deleted the kotor_mainmenumodel branch Jul 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants