Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

working on reworking everything for newest dt, works so far

  • Loading branch information...
commit 3c73744e0bbc0abed5ae5568e541a6a2ac2bac46 1 parent d2c1780
@shua shua authored
View
2  src/Agent.cpp
@@ -9,7 +9,7 @@ bool Agent::IsEnabled() const
return mIsEnabled;
}
-void Agent::SetEnabled(bool is_enabled)
+void Agent::setEnabled(bool is_enabled)
{
if(mIsEnabled != is_enabled)
mIsEnabled = is_enabled;
View
2  src/Agent.h
@@ -18,7 +18,7 @@ class Agent : public QObject
public:
Agent();
- void SetEnabled(bool is_enabled);
+ void setEnabled(bool is_enabled);
virtual bool OnInitialize() = 0;
View
22 src/ConfigurationManager.cpp
@@ -10,7 +10,7 @@ ConfigurationManager::ConfigurationManager()
{
}
-ConfigurationManager* ConfigurationManager::GetInstance()
+ConfigurationManager* ConfigurationManager::getInstance()
{
return mInstance.get();
}
@@ -23,17 +23,17 @@ bool ConfigurationManager::LoadConfig()
// If the file doesn't exist...
if(!config_file.open(QIODevice::ReadOnly))
{
- Logger::Get().Info("The configuration file doesn't exist. Trying to create a new one.");
+ Logger::get().info("The configuration file doesn't exist. Trying to create a new one.");
if(!SaveConfig())
{
- Logger::Get().Error("Failed to open the configuration file.");
+ Logger::get().error("Failed to open the configuration file.");
return false;
}
else
{
- Logger::Get().Info("Created a new configuration file.");
+ Logger::get().info("Created a new configuration file.");
return true;
}
@@ -58,7 +58,7 @@ bool ConfigurationManager::LoadConfig()
}
else
{
- Logger::Get().Error("Failed to read from the configuration file.");
+ Logger::get().error("Failed to read from the configuration file.");
return false;
}
@@ -66,12 +66,12 @@ bool ConfigurationManager::LoadConfig()
return true;
}
-KeySettings ConfigurationManager::GetKeySettings() const
+KeySettings ConfigurationManager::getKeySettings() const
{
return mKeySettings;
}
-void ConfigurationManager::SetKeySettings(KeySettings key_settings)
+void ConfigurationManager::setKeySettings(KeySettings key_settings)
{
mKeySettings = key_settings;
}
@@ -83,7 +83,7 @@ bool ConfigurationManager::SaveConfig() const
if(!config_file.open(QIODevice::WriteOnly))
{
- Logger::Get().Error("Cannot create the configuration file.");
+ Logger::get().error("Cannot create the configuration file.");
return false;
}
@@ -113,7 +113,7 @@ void ConfigurationManager::_LoadKeySettings(const QDomElement& element)
KeySettings::Function function_code = (KeySettings::Function)key_node.attribute(KEY_FUNCTION).toUInt();
InputManager::InputCode input_code = (InputManager::InputCode)key_node.attribute(KEY_CODE).toUInt();
- mKeySettings.SetKey(function_code, input_code);
+ mKeySettings.setKey(function_code, input_code);
}
}
@@ -123,10 +123,10 @@ QDomElement ConfigurationManager::_SaveKeySettings(QDomDocument& doc) const
for(unsigned function = (unsigned)mKeySettings.Begin() ; function <= (unsigned)mKeySettings.End() ; ++function)
{
- auto element = doc.createElement(mKeySettings.GetName((KeySettings::Function)function));
+ auto element = doc.createElement(mKeySettings.getName((KeySettings::Function)function));
element.setAttribute(KEY_FUNCTION, function);
- element.setAttribute(KEY_CODE, (unsigned)mKeySettings.GetKey((KeySettings::Function)function));
+ element.setAttribute(KEY_CODE, (unsigned)mKeySettings.getKey((KeySettings::Function)function));
key_settings.appendChild(element);
}
View
8 src/ConfigurationManager.h
@@ -14,15 +14,15 @@
class ConfigurationManager : boost::noncopyable
{
public:
- static ConfigurationManager* GetInstance();
+ static ConfigurationManager* getInstance();
bool LoadConfig();
bool SaveConfig() const;
- KeySettings GetKeySettings() const;
+ KeySettings getKeySettings() const;
- void SetKeySettings(KeySettings key_settings);
+ void setKeySettings(KeySettings key_settings);
private:
void _LoadKeySettings(const QDomElement& element);
@@ -35,4 +35,4 @@ class ConfigurationManager : boost::noncopyable
KeySettings mKeySettings;
};
-#endif
+#endif
View
48 src/FacadeControllerComponent.cpp
@@ -4,7 +4,7 @@
#include <Scene/Scene.hpp>
#include <Physics/PhysicsWorld.hpp>
-#include <BtogreGP.h>
+#include <BtOgreGP.h>
#include <BtOgrePG.h>
FacadeControllerComponent::FacadeControllerComponent(Agent* agent)
@@ -20,8 +20,8 @@ void FacadeControllerComponent::OnInitialize()
{
btTransform start_trans;
start_trans.setIdentity();
- start_trans.setOrigin(BtOgre::Convert::toBullet(GetNode()->GetPosition(Node::SCENE)));
- start_trans.setRotation(BtOgre::Convert::toBullet(GetNode()->GetRotation(Node::SCENE)));
+ start_trans.setOrigin(BtOgre::Convert::toBullet(getNode()->getPosition(Node::SCENE)));
+ start_trans.setRotation(BtOgre::Convert::toBullet(getNode()->getRotation(Node::SCENE)));
btScalar character_height = 1.75;
btScalar character_width = 0.44;
@@ -35,8 +35,8 @@ void FacadeControllerComponent::OnInitialize()
mBtController = std::shared_ptr<btKinematicCharacterController>
(new btKinematicCharacterController(mBtGhostObject.get(), capsule, 1));
- GetNode()->GetScene()->GetPhysicsWorld()->GetBulletWorld()->addCollisionObject(mBtGhostObject.get());
- GetNode()->GetScene()->GetPhysicsWorld()->GetBulletWorld()->addAction(mBtController.get());
+ getNode()->getScene()->getPhysicsWorld()->getBulletWorld()->addCollisionObject(mBtGhostObject.get());
+ getNode()->getScene()->getPhysicsWorld()->getBulletWorld()->addAction(mBtController.get());
Agent* agent = mAgent.get();
bool result = true;
@@ -47,18 +47,18 @@ void FacadeControllerComponent::OnInitialize()
{
if(!QObject::connect(agent, SIGNAL(sMove(Ogre::Vector3)), this, SLOT(_OnMoveChange(Ogre::Vector3))))
{
- Logger::Get().Error("Failed to connect signal sMove.");
+ Logger::get().error("Failed to connect signal sMove.");
result = false;
}
if(!QObject::connect(agent, SIGNAL(sLook(const Ogre::Radian&, const Ogre::Radian&, const Ogre::Radian&)),
this, SLOT(_OnLook(const Ogre::Radian&, const Ogre::Radian&, const Ogre::Radian&))))
{
- Logger::Get().Error("Failed to connect signal sLook.");
+ Logger::get().error("Failed to connect signal sLook.");
result = false;
}
if(!QObject::connect(agent, SIGNAL(sJump(bool)), this, SLOT(_OnJump())))
{
- Logger::Get().Error("Failed to connect signal sJump.");
+ Logger::get().error("Failed to connect signal sJump.");
result = false;
}
}
@@ -70,7 +70,7 @@ void FacadeControllerComponent::OnInitialize()
if(!result)
{
- Logger::Get().Error(QString("Failed to connect one or more signals for ") + this->GetNode()->GetName() + ".");
+ Logger::get().error(QString("Failed to connect one or more signals for ") + this->getNode()->getName() + ".");
}
}
@@ -78,16 +78,16 @@ void FacadeControllerComponent::OnEnable()
{
btTransform transform;
transform.setIdentity();
- transform.setOrigin(BtOgre::Convert::toBullet(GetNode()->GetPosition(Node::SCENE)));
- transform.setRotation(BtOgre::Convert::toBullet(GetNode()->GetRotation(Node::SCENE)));
+ transform.setOrigin(BtOgre::Convert::toBullet(getNode()->getPosition(Node::SCENE)));
+ transform.setRotation(BtOgre::Convert::toBullet(getNode()->getRotation(Node::SCENE)));
mBtGhostObject->setWorldTransform(transform);
- GetNode()->GetScene()->GetPhysicsWorld()->GetBulletWorld()->addCollisionObject(mBtGhostObject.get());
+ getNode()->getScene()->getPhysicsWorld()->getBulletWorld()->addCollisionObject(mBtGhostObject.get());
}
void FacadeControllerComponent::OnDisable()
{
- GetNode()->GetScene()->GetPhysicsWorld()->GetBulletWorld()->removeCollisionObject(mBtGhostObject.get());
+ getNode()->getScene()->getPhysicsWorld()->getBulletWorld()->removeCollisionObject(mBtGhostObject.get());
}
void FacadeControllerComponent::OnUpdate(double time_diff)
@@ -96,13 +96,13 @@ void FacadeControllerComponent::OnUpdate(double time_diff)
static Ogre::Quaternion quaternion;
static btTransform trans;
- quaternion = Ogre::Quaternion(GetNode()->GetRotation().getYaw(), Ogre::Vector3(0.0, 1.0, 0.0));
+ quaternion = Ogre::Quaternion(getNode()->getRotation().getYaw(), Ogre::Vector3(0.0, 1.0, 0.0));
move = quaternion * BtOgre::Convert::toOgre(mMove) * mMoveSpeed;
mBtController->setVelocityForTimeInterval(BtOgre::Convert::toBullet(move), 0.5);
trans = mBtGhostObject->getWorldTransform();
- GetNode()->SetPosition(BtOgre::Convert::toOgre(trans.getOrigin()), Node::SCENE);
+ getNode()->setPosition(BtOgre::Convert::toOgre(trans.getOrigin()), Node::SCENE);
mAgent->OnUpdate(time_diff);
}
@@ -112,32 +112,32 @@ void FacadeControllerComponent::OnDeinitialize()
mAgent->OnDeinitialize();
}
-void FacadeControllerComponent::SetMoveSpeed(float move_speed)
+void FacadeControllerComponent::setMoveSpeed(float move_speed)
{
mMoveSpeed = move_speed;
}
-float FacadeControllerComponent::GetMoveSpeed() const
+float FacadeControllerComponent::getMoveSpeed() const
{
return mMoveSpeed;
}
-void FacadeControllerComponent::SetJumpEnabled(bool jump_enabled)
+void FacadeControllerComponent::setJumpEnabled(bool jump_enabled)
{
mJumpEnabled = jump_enabled;
}
-bool FacadeControllerComponent::GetJumpEnabled() const
+bool FacadeControllerComponent::getJumpEnabled() const
{
return mJumpEnabled;
}
-Agent* FacadeControllerComponent::GetAgent() const
+Agent* FacadeControllerComponent::getAgent() const
{
return mAgent.get();
}
-void FacadeControllerComponent::SetAgent(Agent* agent)
+void FacadeControllerComponent::setAgent(Agent* agent)
{
mAgent.reset(agent);
}
@@ -158,7 +158,7 @@ void FacadeControllerComponent::_OnJump()
void FacadeControllerComponent::_OnLook(const Ogre::Radian& pitch, const Ogre::Radian& yaw, const Ogre::Radian& roll)
{
Ogre::Matrix3 orientMatrix;
- GetNode()->GetRotation().ToRotationMatrix(orientMatrix);
+ getNode()->getRotation().ToRotationMatrix(orientMatrix);
Ogre::Radian old_yaw, old_pitch, old_roll;
orientMatrix.ToEulerAnglesYXZ(old_yaw, old_pitch, old_roll);
@@ -178,5 +178,5 @@ void FacadeControllerComponent::_OnLook(const Ogre::Radian& pitch, const Ogre::R
Ogre::Quaternion rot;
rot.FromRotationMatrix(orientMatrix);
- GetNode()->SetRotation(rot);
-}
+ getNode()->setRotation(rot);
+}
View
14 src/FacadeControllerComponent.h
@@ -38,30 +38,30 @@ class FacadeControllerComponent : public Component
* Sets the speed the player moves at.
* @param move_speed The maximum speed, in units per second.
*/
- void SetMoveSpeed(float move_speed);
+ void setMoveSpeed(float move_speed);
/**
* Gets the speed the player moves at.
* @returns The player speed, in units per second.
*/
- float GetMoveSpeed() const;
+ float getMoveSpeed() const;
/**
* Sets whether the character can jump or not.
* @param jump_enabled Whether the character can jump or not.
*/
- void SetJumpEnabled(bool jump_enabled);
+ void setJumpEnabled(bool jump_enabled);
/**
* Gets whether the character can jump or not.
* @returns Whether the character can jump or not.
*/
- bool GetJumpEnabled() const;
+ bool getJumpEnabled() const;
- Agent* GetAgent() const;
+ Agent* getAgent() const;
- void SetAgent(Agent* agent);
+ void setAgent(Agent* agent);
private:
void _OnMoveChange(Ogre::Vector3 direction);
@@ -78,4 +78,4 @@ class FacadeControllerComponent : public Component
bool mJumpEnabled; //!< Whether the character can jump or not.
};
-#endif
+#endif
View
62 src/HumanAgent.cpp
@@ -11,22 +11,22 @@ bool HumanAgent::OnInitialize()
{
bool result = true;
- if(!QObject::connect(InputManager::Get(), SIGNAL(sPressed(dt::InputManager::InputCode, const OIS::EventArg&)),
+ if(!QObject::connect(InputManager::get(), SIGNAL(sPressed(dt::InputManager::InputCode, const OIS::EventArg&)),
this, SLOT(_HandleButtonDown(dt::InputManager::InputCode, const OIS::EventArg&))))
{
- Logger::Get().Error("Failed to connect signal sKeyPressed.");
+ Logger::get().error("Failed to connect signal sKeyPressed.");
result = false;
}
- if(!QObject::connect(InputManager::Get(), SIGNAL(sReleased(dt::InputManager::InputCode, const OIS::EventArg&)),
+ if(!QObject::connect(InputManager::get(), SIGNAL(sReleased(dt::InputManager::InputCode, const OIS::EventArg&)),
this, SLOT(_HandleButtonUp(dt::InputManager::InputCode, const OIS::EventArg&))))
{
- Logger::Get().Error("Failed to connect signal sKeyReleased.");
+ Logger::get().error("Failed to connect signal sKeyReleased.");
result = false;
}
- if(!QObject::connect(InputManager::Get(), SIGNAL(sMouseMoved(const OIS::MouseEvent&)),
+ if(!QObject::connect(InputManager::get(), SIGNAL(sMouseMoved(const OIS::MouseEvent&)),
this, SLOT(_HandleMouseMove(const OIS::MouseEvent&))))
{
- Logger::Get().Error("Failed to connect signal sMouseMoved.");
+ Logger::get().error("Failed to connect signal sMouseMoved.");
result = false;
}
@@ -39,17 +39,17 @@ bool HumanAgent::OnDeinitialize()
if(!QObject::disconnect(this, SLOT(_HandleButtonDown(dt::InputManager::InputCode, const OIS::EventArg&))))
{
- Logger::Get().Error("Failed to disconnect signal sKeyPressed.");
+ Logger::get().error("Failed to disconnect signal sKeyPressed.");
result = false;
}
if(!QObject::disconnect(this, SLOT(_HandleButtonUp(dt::InputManager::InputCode, const OIS::EventArg&))))
{
- Logger::Get().Error("Failed to disconnect signal sKeyReleased.");
+ Logger::get().error("Failed to disconnect signal sKeyReleased.");
result = false;
}
if(!QObject::disconnect(this, SLOT(_HandleMouseMove(const OIS::MouseEvent&))))
{
- Logger::Get().Error("Failed to disconnect signal sMouseMoved.");
+ Logger::get().error("Failed to disconnect signal sMouseMoved.");
result = false;
}
@@ -60,57 +60,57 @@ void HumanAgent::OnUpdate(double time_diff) {}
void HumanAgent::_HandleButtonDown(dt::InputManager::InputCode input_code, const OIS::EventArg& event)
{
- KeySettings key_settings = ConfigurationManager::GetInstance()->GetKeySettings();
+ KeySettings key_settings = ConfigurationManager::getInstance()->getKeySettings();
- if(input_code == key_settings.GetKey(KeySettings::FORWARD))
+ if(input_code == key_settings.getKey(KeySettings::FORWARD))
{
mMove.z -= 1.0;
mMove.normalise();
emit sMove(mMove);
}
- else if(input_code == key_settings.GetKey(KeySettings::BACKWARD))
+ else if(input_code == key_settings.getKey(KeySettings::BACKWARD))
{
mMove.z += 1.0;
mMove.normalise();
emit sMove(mMove);
}
- else if(input_code == key_settings.GetKey(KeySettings::LEFTWARD))
+ else if(input_code == key_settings.getKey(KeySettings::LEFTWARD))
{
mMove.x -= 1.0;
mMove.normalise();
emit sMove(mMove);
}
- else if(input_code == key_settings.GetKey(KeySettings::RIGHTWARD))
+ else if(input_code == key_settings.getKey(KeySettings::RIGHTWARD))
{
mMove.x += 1.0;
mMove.normalise();
emit sMove(mMove);
}
- else if(input_code == key_settings.GetKey(KeySettings::DUCK))
+ else if(input_code == key_settings.getKey(KeySettings::DUCK))
{
emit sDuck(true);
}
- else if(input_code == key_settings.GetKey(KeySettings::JUMP))
+ else if(input_code == key_settings.getKey(KeySettings::JUMP))
{
emit sJump(true);
}
- else if(input_code == key_settings.GetKey(KeySettings::ACTIVATE))
+ else if(input_code == key_settings.getKey(KeySettings::ACTIVATE))
{
emit sActivate(true);
}
- else if(input_code == key_settings.GetKey(KeySettings::RECALL_NANO))
+ else if(input_code == key_settings.getKey(KeySettings::RECALL_NANO))
{
emit sRecallNano(true);
}
- else if(input_code == key_settings.GetKey(KeySettings::RELEASE_NANO))
+ else if(input_code == key_settings.getKey(KeySettings::RELEASE_NANO))
{
emit sReleaseNano(true);
}
- else if(input_code == key_settings.GetKey(KeySettings::ZOOM))
+ else if(input_code == key_settings.getKey(KeySettings::ZOOM))
{
emit sZoom(true);
}
@@ -118,57 +118,57 @@ void HumanAgent::_HandleButtonDown(dt::InputManager::InputCode input_code, const
void HumanAgent::_HandleButtonUp(dt::InputManager::InputCode input_code, const OIS::EventArg& event)
{
- KeySettings key_settings = ConfigurationManager::GetInstance()->GetKeySettings();
+ KeySettings key_settings = ConfigurationManager::getInstance()->getKeySettings();
- if(input_code == key_settings.GetKey(KeySettings::FORWARD))
+ if(input_code == key_settings.getKey(KeySettings::FORWARD))
{
mMove.z += 1.0;
mMove.normalise();
emit sMove(mMove);
}
- else if(input_code == key_settings.GetKey(KeySettings::BACKWARD))
+ else if(input_code == key_settings.getKey(KeySettings::BACKWARD))
{
mMove.z -= 1.0;
mMove.normalise();
emit sMove(mMove);
}
- else if(input_code == key_settings.GetKey(KeySettings::LEFTWARD))
+ else if(input_code == key_settings.getKey(KeySettings::LEFTWARD))
{
mMove.x += 1.0;
mMove.normalise();
emit sMove(mMove);
}
- else if(input_code == key_settings.GetKey(KeySettings::RIGHTWARD))
+ else if(input_code == key_settings.getKey(KeySettings::RIGHTWARD))
{
mMove.x -= 1.0;
mMove.normalise();
emit sMove(mMove);
}
- else if(input_code == key_settings.GetKey(KeySettings::DUCK))
+ else if(input_code == key_settings.getKey(KeySettings::DUCK))
{
emit sDuck(false);
}
- else if(input_code == key_settings.GetKey(KeySettings::JUMP))
+ else if(input_code == key_settings.getKey(KeySettings::JUMP))
{
emit sJump(false);
}
- else if(input_code == key_settings.GetKey(KeySettings::ACTIVATE))
+ else if(input_code == key_settings.getKey(KeySettings::ACTIVATE))
{
emit sActivate(false);
}
- else if(input_code == key_settings.GetKey(KeySettings::RECALL_NANO))
+ else if(input_code == key_settings.getKey(KeySettings::RECALL_NANO))
{
emit sRecallNano(false);
}
- else if(input_code == key_settings.GetKey(KeySettings::RELEASE_NANO))
+ else if(input_code == key_settings.getKey(KeySettings::RELEASE_NANO))
{
emit sReleaseNano(false);
}
- else if(input_code == key_settings.GetKey(KeySettings::ZOOM))
+ else if(input_code == key_settings.getKey(KeySettings::ZOOM))
{
emit sZoom(false);
}
View
6 src/KeySettings.cpp
@@ -14,17 +14,17 @@ KeySettings::KeySettings()
mKeyMap[ACTIVATE] = pair<QString, InputManager::InputCode>("Activate", InputManager::KC_E);
}
-void KeySettings::SetKey(Function function, InputManager::InputCode key)
+void KeySettings::setKey(Function function, InputManager::InputCode key)
{
mKeyMap[function].second = key;
}
-InputManager::InputCode KeySettings::GetKey(Function function) const
+InputManager::InputCode KeySettings::getKey(Function function) const
{
return mKeyMap.at(function).second;
}
-QString KeySettings::GetName(Function function) const
+QString KeySettings::getName(Function function) const
{
return mKeyMap.at(function).first;
}
View
6 src/KeySettings.h
@@ -27,11 +27,11 @@ class KeySettings
KeySettings();
- void SetKey(Function function, InputManager::InputCode key);
+ void setKey(Function function, InputManager::InputCode key);
- InputManager::InputCode GetKey(Function function) const;
+ InputManager::InputCode getKey(Function function) const;
- QString GetName(Function function) const;
+ QString getName(Function function) const;
Function Begin() const;
View
54 src/MainMenuState.cpp
@@ -10,64 +10,64 @@
#include <QCoreApplication>
-void MainMenuState::OnInitialize()
+void MainMenuState::onInitialize()
{
{
QDir dir(QCoreApplication::applicationDirPath());
while(!dir.isRoot()) {
QDir data(dir.absolutePath() + "/externals/ducttape-engine");
if(data.exists()) {
- ResourceManager::Get()->AddDataPath(data);
+ ResourceManager::get()->addDataPath(data);
break;
}
dir.cdUp();
}
}
- ResourceManager::Get()->AddResourceLocation("data/gui","FileSystem", true);
- ResourceManager::Get()->AddResourceLocation("data", "FileSystem", true);
+ ResourceManager::get()->addResourceLocation("data/gui","FileSystem", true);
+ ResourceManager::get()->addResourceLocation("data", "FileSystem", true);
Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
- Scene* scene = AddScene(new Scene("MainMenu"));
+ auto scene = addScene(new Scene("MainMenu"));
- GuiManager::Get()->SetSceneManager(scene->GetSceneManager());
+ GuiManager::get()->setSceneManager(scene->getSceneManager());
- Node* camnode = scene->AddChildNode(new Node("camnode"));
- camnode->SetPosition(Ogre::Vector3(0, 5, 10));
- camnode->AddComponent(new CameraComponent("cam"))->LookAt(Ogre::Vector3(0, 0, 0));;
+ auto camnode = scene->addChildNode(new Node("camnode"));
+ camnode->setPosition(Ogre::Vector3(0, 5, 10));
+ camnode->addComponent(new CameraComponent("cam"))->lookAt(Ogre::Vector3(0, 0, 0));;
- GuiRootWindow& rootWindow = GuiManager::Get()->GetRootWindow();
+ GuiRootWindow& rootWindow = GuiManager::get()->getRootWindow();
//********************************************************************************
//The following lines are for test purpose only.
//Todo: Refine them for actual use.
- mOptionButton = rootWindow.AddChildWidget<GuiButton>(new GuiButton("option"));
- mOptionButton->SetCaption("Option");
- mOptionButton->SetSize(250, 100);
- mOptionButton->SetPosition(100, 100);
- dynamic_cast<MyGUI::Button*>(mOptionButton->GetMyGUIWidget())->eventMouseButtonClick
- += MyGUI::newDelegate(this, &MainMenuState::OnOptionClick);
+ mOptionButton = rootWindow.addChildWidget<GuiButton>(new GuiButton("option"));
+ mOptionButton->setCaption("Option");
+ mOptionButton->setSize(250, 100);
+ mOptionButton->setPosition(100, 100);
+ dynamic_cast<MyGUI::Button*>(mOptionButton->getMyGUIWidget())->eventMouseButtonClick
+ += MyGUI::newDelegate(this, &MainMenuState::onOptionClick);
- mSelectLevelButton = rootWindow.AddChildWidget<GuiButton>(new GuiButton("select_level"));
- mSelectLevelButton->SetCaption("Select Level");
- mSelectLevelButton->SetSize(250, 100);
- mSelectLevelButton->SetPosition(100, 220);
- dynamic_cast<MyGUI::Button*>(mSelectLevelButton->GetMyGUIWidget())->eventMouseButtonClick
- += MyGUI::newDelegate(this, &MainMenuState::OnSelectLevelClick);
+ mSelectLevelButton = rootWindow.addChildWidget<GuiButton>(new GuiButton("select_level"));
+ mSelectLevelButton->setCaption("Select Level");
+ mSelectLevelButton->setSize(250, 100);
+ mSelectLevelButton->setPosition(100, 220);
+ dynamic_cast<MyGUI::Button*>(mSelectLevelButton->getMyGUIWidget())->eventMouseButtonClick
+ += MyGUI::newDelegate(this, &MainMenuState::onSelectLevelClick);
//**********************************************************************************
}
-void MainMenuState::OnSelectLevelClick(MyGUI::Widget* sender)
+void MainMenuState::onSelectLevelClick(MyGUI::Widget* sender)
{
- StateSelector::GetInstance()->Select(StateSelector::SELECT_LEVEL);
+ StateSelector::getInstance()->Select(StateSelector::SELECT_LEVEL);
}
-void MainMenuState::OnOptionClick(MyGUI::Widget* sender)
+void MainMenuState::onOptionClick(MyGUI::Widget* sender)
{
- StateSelector::GetInstance()->Select(StateSelector::OPTION);
+ StateSelector::getInstance()->Select(StateSelector::OPTION);
}
-void MainMenuState::UpdateStateFrame(double simulationFrameTime)
+void MainMenuState::updateStateFrame(double simulationFrameTime)
{
}
View
14 src/MainMenuState.h
@@ -14,17 +14,17 @@ class MainMenuState : public State
{
Q_OBJECT
public:
- void OnInitialize();
+ void onInitialize();
- void UpdateStateFrame(double simulationFrameTime);
+ void updateStateFrame(double simulationFrameTime);
- void OnOptionClick(MyGUI::Widget* sender);
+ void onOptionClick(MyGUI::Widget* sender);
- void OnSelectLevelClick(MyGUI::Widget* sender);
+ void onSelectLevelClick(MyGUI::Widget* sender);
private:
- GuiButton* mOptionButton;
- GuiButton* mSelectLevelButton;
+ std::shared_ptr<GuiButton> mOptionButton;
+ std::shared_ptr<GuiButton> mSelectLevelButton;
};
-#endif
+#endif
View
56 src/OptionState.cpp
@@ -8,49 +8,49 @@
#include <OgreFontManager.h>
-void OptionState::OnInitialize()
+void OptionState::onInitialize()
{
- ResourceManager::Get()->AddResourceLocation("gui","FileSystem", true);
- ResourceManager::Get()->AddResourceLocation("", "FileSystem", true);
+ ResourceManager::get()->addResourceLocation("gui","FileSystem", true);
+ ResourceManager::get()->addResourceLocation("", "FileSystem", true);
Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
- Scene* scene = AddScene(new Scene("Option"));
+ auto scene = addScene(new Scene("Option"));
- Node* camnode = scene->AddChildNode(new dt::Node("camnode"));
- camnode->SetPosition(Ogre::Vector3(0, 0, 10));
- camnode->AddComponent(new dt::CameraComponent("cam"))->LookAt(Ogre::Vector3(0, 0, 0));
+ auto camnode = scene->addChildNode(new dt::Node("camnode"));
+ camnode->setPosition(Ogre::Vector3(0, 0, 10));
+ camnode->addComponent(new dt::CameraComponent("cam"))->lookAt(Ogre::Vector3(0, 0, 0));
//************************************************************
//The following lines are for test purpose only.
//Todo: Replace them with the actual content.
Ogre::FontManager::getSingleton().load("DejaVuSans", "General");
- Node* node1 = scene->AddChildNode(new dt::Node("node1"));
- dt::TextComponent* text1 = node1->AddComponent(new dt::TextComponent("Option", "text1"));
- text1->SetBackgroundMaterial("TextOverlayBackground");
- text1->SetColor(Ogre::ColourValue::White);
- text1->SetFont("DejaVuSans");
- text1->SetFontSize(72);
- text1->SetPadding(Ogre::Vector2(20, 20));
-
- GuiRootWindow& rootWindow = GuiManager::Get()->GetRootWindow();
- mReturnButton = rootWindow.AddChildWidget<GuiButton>(new GuiButton("return"));
-
- mReturnButton->SetPosition(100, 100);
- mReturnButton->SetSize(250, 100);
- mReturnButton->SetCaption("Return");
- mReturnButton->SetVisible(true);
- dynamic_cast<MyGUI::Button*>(mReturnButton->GetMyGUIWidget())->eventMouseButtonClick
- += MyGUI::newDelegate(this, &OptionState::OnReturnClick);
+ auto node1 = scene->addChildNode(new dt::Node("node1"));
+ auto text1 = node1->addComponent(new dt::TextComponent("Option", "text1"));
+ text1->setBackgroundMaterial("TextOverlayBackground");
+ text1->setColor(Ogre::ColourValue::White);
+ text1->setFont("DejaVuSans");
+ text1->setFontSize(72);
+ text1->setPadding(Ogre::Vector2(20, 20));
+
+ GuiRootWindow& rootWindow = GuiManager::get()->getRootWindow();
+ mReturnButton = rootWindow.addChildWidget<GuiButton>(new GuiButton("return"));
+
+ mReturnButton->setPosition(100, 100);
+ mReturnButton->setSize(250, 100);
+ mReturnButton->setCaption("Return");
+ mReturnButton->setVisible(true);
+ dynamic_cast<MyGUI::Button*>(mReturnButton->getMyGUIWidget())->eventMouseButtonClick
+ += MyGUI::newDelegate(this, &OptionState::onReturnClick);
//************************************************************
}
-void OptionState::OnReturnClick(MyGUI::Widget* sender)
+void OptionState::onReturnClick(MyGUI::Widget* sender)
{
- StateSelector::GetInstance()->Select(StateSelector::MAIN_MENU);
+ StateSelector::getInstance()->Select(StateSelector::MAIN_MENU);
}
-void OptionState::UpdateStateFrame(double simulationFrameTime)
+void OptionState::updateStateFrame(double simulationFrameTime)
{
-}
+}
View
10 src/OptionState.h
@@ -14,14 +14,14 @@ class OptionState : public State
{
Q_OBJECT
public:
- void OnInitialize();
+ void onInitialize();
- void UpdateStateFrame(double simulationFrameTime);
+ void updateStateFrame(double simulationFrameTime);
- void OnReturnClick(MyGUI::Widget* sender);
+ void onReturnClick(MyGUI::Widget* sender);
private:
- GuiButton* mReturnButton;
+ std::shared_ptr<GuiButton> mReturnButton;
};
-#endif
+#endif
View
68 src/SceneLoader.cpp
@@ -19,14 +19,14 @@ Scene* SceneLoader::LoadScene(QString path)
QDomDocument doc;
if(!file.open(QIODevice::ReadOnly))
{
- dt::Logger::Get().Error("Couldn't open file " + path);
+ dt::Logger::get().error("Couldn't open file " + path);
return nullptr;
}
cout << "Loading result: " << endl;
if(doc.setContent(&file))
{
mScene = new Scene(path);
- OgreProcedural::Root::getInstance()->sceneManager = mScene->GetSceneManager();
+ OgreProcedural::Root::getInstance()->sceneManager = mScene->getSceneManager();
QDomElement root = doc.documentElement();
@@ -49,10 +49,10 @@ Scene* SceneLoader::LoadScene(QString path)
return mScene;
}
-Node* SceneLoader::_LoadElement(const QDomElement& og_element, Node* dt_node)
+Node::NodeSP SceneLoader::_LoadElement(const QDomElement& og_element, Node::NodeSP dt_node)
{
QString name = og_element.nodeName();
- Node* node = nullptr;
+ Node::NodeSP node = nullptr;
if(name == SL_LIGHT)
{
@@ -76,30 +76,30 @@ Node* SceneLoader::_LoadElement(const QDomElement& og_element, Node* dt_node)
return node;
}
-Node* SceneLoader::_LoadNode(const QDomElement& og_node, Node* dt_parent)
+Node::NodeSP SceneLoader::_LoadNode(const QDomElement& og_node, Node::NodeSP dt_parent)
{
- Node* node = nullptr;
+ Node::NodeSP node = nullptr;
if(!og_node.isNull())
{
- node = new Node(og_node.attribute(SL_NAME));
+ node = Node::NodeSP(new Node(og_node.attribute(SL_NAME)));
if(dt_parent)
{
- dt_parent->AddChildNode(node);
+ dt_parent->addChildNode(node.get());
} else {
- mScene->AddChildNode(node);
+ mScene->addChildNode(node.get());
}
QDomElement pos = og_node.firstChildElement(SL_POS);
QDomElement rot = og_node.firstChildElement(SL_ROT);
QDomElement scale = og_node.firstChildElement(SL_SCALE);
- node->SetPosition(pos.attribute(SL_X).toFloat(), pos.attribute(SL_Y).toFloat(),
+ node->setPosition(pos.attribute(SL_X).toFloat(), pos.attribute(SL_Y).toFloat(),
pos.attribute(SL_Z).toFloat());
- node->SetRotation(Ogre::Quaternion(rot.attribute(SL_QW).toFloat(),
+ node->setRotation(Ogre::Quaternion(rot.attribute(SL_QW).toFloat(),
rot.attribute(SL_QX).toFloat(), rot.attribute(SL_QY).toFloat(), rot.attribute(SL_QZ).toFloat()));
- node->SetScale(Ogre::Vector3(scale.attribute(SL_X).toFloat(), scale.attribute(SL_Y).toFloat(),
+ node->setScale(Ogre::Vector3(scale.attribute(SL_X).toFloat(), scale.attribute(SL_Y).toFloat(),
scale.attribute(SL_Z).toFloat()));
for(QDomElement node_child = scale.nextSiblingElement(); !node_child.isNull(); node_child = node_child.nextSiblingElement())
@@ -111,9 +111,9 @@ Node* SceneLoader::_LoadNode(const QDomElement& og_node, Node* dt_parent)
return node;
}
-Node* SceneLoader::_LoadCamera(const QDomElement& og_component, Node* dt_node)
+Node::NodeSP SceneLoader::_LoadCamera(const QDomElement& og_component, Node::NodeSP dt_node)
{
- Node* node = dt_node;
+ Node::NodeSP node = dt_node;
if(!og_component.isNull())
{
@@ -121,26 +121,26 @@ Node* SceneLoader::_LoadCamera(const QDomElement& og_component, Node* dt_node)
if(node == nullptr)
{
- node = mScene->AddChildNode(new Node(name + "_node"));
+ node = mScene->addChildNode(new Node(name + "_node"));
QDomElement pos = og_component.firstChildElement(SL_POS);
QDomElement rot = og_component.firstChildElement(SL_ROT);
- node->SetPosition(pos.attribute(SL_X).toFloat(), pos.attribute(SL_Y).toFloat(),
+ node->setPosition(pos.attribute(SL_X).toFloat(), pos.attribute(SL_Y).toFloat(),
pos.attribute(SL_Z).toFloat());
- node->SetRotation(Ogre::Quaternion(rot.attribute(SL_QW).toFloat(),
+ node->setRotation(Ogre::Quaternion(rot.attribute(SL_QW).toFloat(),
rot.attribute(SL_QX).toFloat(), rot.attribute(SL_QY).toFloat(), rot.attribute(SL_QZ).toFloat()));
}
- node->AddComponent<CameraComponent>(new CameraComponent(name));
+ node->addComponent<CameraComponent>(new CameraComponent(name));
}
return node;
}
-Node* SceneLoader::_LoadLight(const QDomElement& og_component, Node* dt_node)
+Node::NodeSP SceneLoader::_LoadLight(const QDomElement& og_component, Node::NodeSP dt_node)
{
- Node* node = dt_node;
+ Node::NodeSP node = dt_node;
if(!og_component.isNull())
{
@@ -148,27 +148,27 @@ Node* SceneLoader::_LoadLight(const QDomElement& og_component, Node* dt_node)
if(node == nullptr)
{
- node = mScene->AddChildNode(new Node(name + "_node"));
+ node = mScene->addChildNode(new Node(name + "_node"));
QDomElement pos = og_component.firstChildElement(SL_POS);
QDomElement dir = og_component.firstChildElement(SL_DIRECTION);
- node->SetPosition(pos.attribute(SL_X).toFloat(), pos.attribute(SL_Y).toFloat(),
+ node->setPosition(pos.attribute(SL_X).toFloat(), pos.attribute(SL_Y).toFloat(),
pos.attribute(SL_Z).toFloat());
- node->SetDirection(Ogre::Vector3(dir.attribute(SL_X).toFloat(), dir.attribute(SL_Y).toFloat(),
+ node->setDirection(Ogre::Vector3(dir.attribute(SL_X).toFloat(), dir.attribute(SL_Y).toFloat(),
dir.attribute(SL_Z).toFloat()));
}
- node->AddComponent<LightComponent>(new LightComponent(name))->SetCastShadows(
+ node->addComponent<LightComponent>(new LightComponent(name))->setCastShadows(
og_component.attribute(SL_CAST_SHADOWS).toInt());
}
return node;
}
-Node* SceneLoader::_LoadMesh(const QDomElement& og_component, Node* dt_node)
+Node::NodeSP SceneLoader::_LoadMesh(const QDomElement& og_component, Node::NodeSP dt_node)
{
- Node* node = dt_node;
+ Node::NodeSP node = dt_node;
if(!og_component.isNull())
{
@@ -176,17 +176,17 @@ Node* SceneLoader::_LoadMesh(const QDomElement& og_component, Node* dt_node)
if(node == nullptr)
{
- node = mScene->AddChildNode(new Node(name + "_node"));
+ node = mScene->addChildNode(new Node(name + "_node"));
QDomElement pos = og_component.firstChildElement(SL_POS);
QDomElement rot = og_component.firstChildElement(SL_ROT);
QDomElement scale = og_component.firstChildElement(SL_SCALE);
- node->SetPosition(pos.attribute(SL_X).toFloat(), pos.attribute(SL_Y).toFloat(),
+ node->setPosition(pos.attribute(SL_X).toFloat(), pos.attribute(SL_Y).toFloat(),
pos.attribute(SL_Z).toFloat());
- node->SetRotation(Ogre::Quaternion(rot.attribute(SL_QW).toFloat(),
+ node->setRotation(Ogre::Quaternion(rot.attribute(SL_QW).toFloat(),
rot.attribute(SL_QX).toFloat(), rot.attribute(SL_QY).toFloat(), rot.attribute(SL_QZ).toFloat()));
- node->SetScale(Ogre::Vector3(scale.attribute(SL_X).toFloat(), scale.attribute(SL_Y).toFloat(),
+ node->setScale(Ogre::Vector3(scale.attribute(SL_X).toFloat(), scale.attribute(SL_Y).toFloat(),
scale.attribute(SL_Z).toFloat()));
}
@@ -196,7 +196,7 @@ Node* SceneLoader::_LoadMesh(const QDomElement& og_component, Node* dt_node)
{
const QDomElement& entity = unknown_mesh;
- MeshComponent* mesh = node->AddComponent<MeshComponent>(new MeshComponent(
+ std::shared_ptr<MeshComponent> mesh = node->addComponent<MeshComponent>(new MeshComponent(
entity.attribute(SL_MESH_HANDLE), "",
entity.attribute(SL_NAME)));
@@ -205,10 +205,10 @@ Node* SceneLoader::_LoadMesh(const QDomElement& og_component, Node* dt_node)
QString material_handle = mat.attribute(SL_MATERIALNAME);
uint32_t index = mat.attribute(SL_INDEX).toUInt();
- mesh->GetOgreEntity()->getSubEntity(index)->setMaterialName(material_handle.toStdString());
+ mesh->getOgreEntity()->getSubEntity(index)->setMaterialName(material_handle.toStdString());
}
- mesh->SetCastShadows(entity.attribute(SL_CAST_SHADOWS).toInt());
+ mesh->setCastShadows(entity.attribute(SL_CAST_SHADOWS).toInt());
}
else if(unknown_mesh.nodeName() == SL_PLANE)
{
@@ -232,7 +232,7 @@ Node* SceneLoader::_LoadMesh(const QDomElement& og_component, Node* dt_node)
.realizeMesh(plane.attribute(SL_NAME).toStdString());
//add entity
- node->AddComponent<MeshComponent>(new MeshComponent(
+ node->addComponent<MeshComponent>(new MeshComponent(
plane.attribute(SL_NAME),
plane.attribute(SL_MATERIAL),
plane.attribute(SL_NAME)));
View
10 src/SceneLoader.h
@@ -59,15 +59,15 @@ class SceneLoader
static Scene* LoadScene(QString path);
protected:
- static Node* _LoadElement(const QDomElement& og_element, Node* dt_node = nullptr);
+ static Node::NodeSP _LoadElement(const QDomElement& og_element, Node::NodeSP dt_node = nullptr);
- static Node* _LoadNode(const QDomElement& og_node, Node* dt_parent);
+ static Node::NodeSP _LoadNode(const QDomElement& og_node, Node::NodeSP dt_parent);
- static Node* _LoadMesh(const QDomElement& og_component, Node* dt_node);
+ static Node::NodeSP _LoadMesh(const QDomElement& og_component, Node::NodeSP dt_node);
- static Node* _LoadLight(const QDomElement& og_component, Node* dt_node);
+ static Node::NodeSP _LoadLight(const QDomElement& og_component, Node::NodeSP dt_node);
- static Node* _LoadCamera(const QDomElement& og_component, Node* dt_node);
+ static Node::NodeSP _LoadCamera(const QDomElement& og_component, Node::NodeSP dt_node);
static Scene* mScene;
};
View
16 src/SceneLoaderTest.cpp
@@ -4,34 +4,34 @@
#include <Core/ResourceManager.hpp>
-void Main::OnInitialize()
+void Main::onInitialize()
{
{
QDir dir(QCoreApplication::applicationDirPath());
while(!dir.isRoot()) {
QDir data(dir.absolutePath() + "/externals/ducttape-engine");
if(data.exists()) {
- ResourceManager::Get()->AddDataPath(data);
+ ResourceManager::get()->addDataPath(data);
break;
}
dir.cdUp();
}
}
- dt::ResourceManager::Get()->AddResourceLocation("","FileSystem");
+ dt::ResourceManager::get()->addResourceLocation("","FileSystem");
Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
dt::Scene* scene = nullptr;
- scene = SceneLoader::LoadScene(Utils::ToString(scenefile));
+ scene = SceneLoader::LoadScene(Utils::toString(scenefile));
if(scene)
- AddScene(scene);
+ addScene(scene);
}
-void Main::UpdateStateFrame(double simulation_frame_time)
+void Main::updateStateFrame(double simulation_frame_time)
{
}
-void Main::SetFile(std::string file) {
+void Main::setFile(std::string file) {
scenefile = file;
- Logger::Get().Debug("Setting scene file: " + Utils::ToString(scenefile));
+ Logger::get().debug("Setting scene file: " + Utils::toString(scenefile));
}
View
6 src/SceneLoaderTest.h
@@ -7,9 +7,9 @@
class Main : public dt::State {
Q_OBJECT
public:
- void OnInitialize();
- void UpdateStateFrame(double simulation_frame_time);
- void SetFile(std::string file);
+ void onInitialize();
+ void updateStateFrame(double simulation_frame_time);
+ void setFile(std::string file);
private:
std::string scenefile;
View
50 src/SelectLevelState.cpp
@@ -7,43 +7,43 @@
#include <OgreFontManager.h>
-void SelectLevelState::OnInitialize()
+void SelectLevelState::onInitialize()
{
- Scene* scene = AddScene(new Scene("SelectLevel"));
+ auto scene = addScene(new Scene("SelectLevel"));
- Node* camnode = scene->AddChildNode(new dt::Node("camnode"));
- camnode->SetPosition(Ogre::Vector3(0, 0, 10));
- camnode->AddComponent(new dt::CameraComponent("cam"))->LookAt(Ogre::Vector3(0, 0, 0));
+ auto camnode = scene->addChildNode(new dt::Node("camnode"));
+ camnode->setPosition(Ogre::Vector3(0, 0, 10));
+ camnode->addComponent(new dt::CameraComponent("cam"))->lookAt(Ogre::Vector3(0, 0, 0));
//************************************************************
//The following lines are for test purpose only.
//Todo: Replace them with the actual content.
Ogre::FontManager::getSingleton().load("DejaVuSans", "General");
- Node* node1 = scene->AddChildNode(new dt::Node("node1"));
- dt::TextComponent* text1 = node1->AddComponent(new dt::TextComponent("Select Level", "text1"));
- text1->SetBackgroundMaterial("TextOverlayBackground");
- text1->SetColor(Ogre::ColourValue::White);
- text1->SetFont("DejaVuSans");
- text1->SetFontSize(72);
- text1->SetPadding(Ogre::Vector2(20, 20));
-
- GuiRootWindow& rootWindow = GuiManager::Get()->GetRootWindow();
- mReturnButton = rootWindow.AddChildWidget<GuiButton>(new GuiButton("return"));
-
- mReturnButton->SetPosition(100, 100);
- mReturnButton->SetSize(250, 100);
- mReturnButton->SetCaption("Return");
- dynamic_cast<MyGUI::Button*>(mReturnButton->GetMyGUIWidget())->eventMouseButtonClick
- += MyGUI::newDelegate(this, &SelectLevelState::OnReturnClick);
+ auto node1 = scene->addChildNode(new dt::Node("node1"));
+ auto text1 = node1->addComponent(new dt::TextComponent("Select Level", "text1"));
+ text1->setBackgroundMaterial("TextOverlayBackground");
+ text1->setColor(Ogre::ColourValue::White);
+ text1->setFont("DejaVuSans");
+ text1->setFontSize(72);
+ text1->setPadding(Ogre::Vector2(20, 20));
+
+ GuiRootWindow& rootWindow = GuiManager::get()->getRootWindow();
+ mReturnButton = rootWindow.addChildWidget<GuiButton>(new GuiButton("return"));
+
+ mReturnButton->setPosition(100, 100);
+ mReturnButton->setSize(250, 100);
+ mReturnButton->setCaption("Return");
+ dynamic_cast<MyGUI::Button*>(mReturnButton->getMyGUIWidget())->eventMouseButtonClick
+ += MyGUI::newDelegate(this, &SelectLevelState::onReturnClick);
//************************************************************
}
-void SelectLevelState::OnReturnClick(MyGUI::Widget* sender)
+void SelectLevelState::onReturnClick(MyGUI::Widget* sender)
{
- StateSelector::GetInstance()->Select(StateSelector::MAIN_MENU);
+ StateSelector::getInstance()->Select(StateSelector::MAIN_MENU);
}
-void SelectLevelState::UpdateStateFrame(double simulationFrameTime)
+void SelectLevelState::updateStateFrame(double simulationFrameTime)
{
-}
+}
View
10 src/SelectLevelState.h
@@ -14,14 +14,14 @@ class SelectLevelState : public State
{
Q_OBJECT
public:
- void OnInitialize();
+ void onInitialize();
- void UpdateStateFrame(double simulationFrameTime);
+ void updateStateFrame(double simulationFrameTime);
- void OnReturnClick(MyGUI::Widget* sender);
+ void onReturnClick(MyGUI::Widget* sender);
private:
- GuiButton* mReturnButton;
+ std::shared_ptr<GuiButton> mReturnButton;
};
-#endif
+#endif
View
12 src/StateSelector.cpp
@@ -16,14 +16,14 @@ StateSelector::~StateSelector()
{
}
-StateSelector* StateSelector::GetInstance()
+StateSelector* StateSelector::getInstance()
{
return mInstance.get();
}
bool StateSelector::Select(const StateCode& state_code)
{
- auto stateMgr = dt::StateManager::Get();
+ auto stateMgr = dt::StateManager::get();
dt::State* state = nullptr;
switch(state_code)
@@ -41,11 +41,11 @@ bool StateSelector::Select(const StateCode& state_code)
return false;
}
- if(stateMgr->GetCurrentState())
+ if(stateMgr->getCurrentState())
{
- stateMgr->Pop();
+ stateMgr->pop();
}
- stateMgr->SetNewState(state);
+ stateMgr->setNewState(state);
return true;
-}
+}
View
4 src/StateSelector.h
@@ -16,7 +16,7 @@ class StateSelector
~StateSelector();
- static StateSelector* GetInstance();
+ static StateSelector* getInstance();
bool Select(const StateCode& state_code);
@@ -26,4 +26,4 @@ class StateSelector
static std::shared_ptr<StateSelector> mInstance;
};
-#endif
+#endif
View
4 src/main.cpp
@@ -12,10 +12,10 @@ int main(int argc, char** argv)
Game game;
Main* main = new Main();
if (argc > 1) {
- main->SetFile(argv[1]);
+ main->setFile(argv[1]);
}
- game.Run(main, argc, argv);
+ game.run(main, argc, argv);
return 0;
}
Please sign in to comment.
Something went wrong with that request. Please try again.