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

Irrlicht cleanup: cleanup various object to use RenderingEngine #6088

Merged
merged 3 commits into from Jul 2, 2017

Conversation

nerzhul
Copy link
Member

@nerzhul nerzhul commented Jul 2, 2017

  • CAO doesn't need scenemanager in addToScene
  • Camera doesn't need VideoDriver pointer or SceneManager in constructor
  • Hud doesn't need driver & scene manager in constructor
  • Hud doesn't need scenemanager pointer
  • Tile.h doesn't need IrrlichtDevice header (just SMaterial)

* CAO doesn't need scenemanager in addToScene
* Camera doesn't need VideoDriver pointer or SceneManager in constructor
* Hud doesn't need driver & scene manager in constructor
* Hud doesn't need scenemanager pointer
* Tile.h doesn't need IrrlichtDevice header (just SMaterial)
@nerzhul nerzhul added @ Client rendering Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements labels Jul 2, 2017
@nerzhul nerzhul added this to the 0.5.0 milestone Jul 2, 2017
@nerzhul nerzhul requested a review from SmallJoker July 2, 2017 07:59
src/hud.cpp Outdated
Inventory *inventory)
{
this->driver = driver;
this->smgr = smgr;
driver = RenderingEngine::get_video_driver();
this->guienv = guienv;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

= (of driver) should be aligned the same way as these assignments.

src/hud.cpp Outdated
@@ -40,12 +40,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "touchscreengui.h"
#endif

Hud::Hud(video::IVideoDriver *driver, scene::ISceneManager* smgr,
gui::IGUIEnvironment* guienv, Client *client, LocalPlayer *player,
Hud::Hud(gui::IGUIEnvironment* guienv, Client *client, LocalPlayer *player,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gui::IGUIEnvironment *guienv

smgr, -1);
m_wield_meshnode = new WieldMeshSceneNode(
RenderingEngine::get_scene_manager()->getRootSceneNode(),
RenderingEngine::get_scene_manager(), -1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess these arguments (class WieldMeshSceneNode) will be cleaned up later?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes i think i will do it later, it was a first analysis about scenemgr but no time atm to continue this PR, waiting for merge to continue

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in fact it was easy to fix, i did it

src/camera.h Outdated
@@ -60,8 +60,7 @@ enum CameraMode {CAMERA_MODE_FIRST, CAMERA_MODE_THIRD, CAMERA_MODE_THIRD_FRONT};
class Camera
{
public:
Camera(scene::ISceneManager* smgr, MapDrawControl& draw_control,
Client *client);
Camera(MapDrawControl& draw_control, Client *client);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MapDrawControl &draw_control

src/camera.cpp Outdated

Camera::Camera(scene::ISceneManager* smgr, MapDrawControl& draw_control,
Client *client):
Camera::Camera(MapDrawControl& draw_control, Client *client):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MapDrawControl &draw_control here as well

src/hud.h Outdated
@@ -120,8 +120,7 @@ class Hud {
std::string hotbar_selected_image = "";
bool use_hotbar_selected_image = false;

Hud(video::IVideoDriver *driver,scene::ISceneManager* smgr,
gui::IGUIEnvironment* guienv, Client *client, LocalPlayer *player,
Hud(gui::IGUIEnvironment* guienv, Client *client, LocalPlayer *player,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pointer guienv again

@nerzhul
Copy link
Member Author

nerzhul commented Jul 2, 2017

i missed the old style, will fix it this evening :)

@nerzhul nerzhul merged commit 94c294b into minetest:master Jul 2, 2017
BeeeWall pushed a commit to BeeeWall/minetest that referenced this pull request Jul 6, 2017
…test#6088)

* Irrlicht cleanup: cleanup various object to use RenderingEngine

* CAO doesn't need scenemanager in addToScene
* Camera doesn't need VideoDriver pointer or SceneManager in constructor
* Hud doesn't need driver & scene manager in constructor
* Hud doesn't need scenemanager pointer
* Tile.h doesn't need IrrlichtDevice header (just SMaterial)
* WieldMeshSceneNode: only take scene, we always use scene root node as parent
BeeeWall pushed a commit to BeeeWall/minetest that referenced this pull request Jul 6, 2017
Eurybot pushed a commit to MT-Eurythmia/minetest that referenced this pull request Jul 10, 2017
…test#6088)

* Irrlicht cleanup: cleanup various object to use RenderingEngine

* CAO doesn't need scenemanager in addToScene
* Camera doesn't need VideoDriver pointer or SceneManager in constructor
* Hud doesn't need driver & scene manager in constructor
* Hud doesn't need scenemanager pointer
* Tile.h doesn't need IrrlichtDevice header (just SMaterial)
* WieldMeshSceneNode: only take scene, we always use scene root node as parent
Eurybot pushed a commit to MT-Eurythmia/minetest that referenced this pull request Jul 25, 2017
…test#6088)

* Irrlicht cleanup: cleanup various object to use RenderingEngine

* CAO doesn't need scenemanager in addToScene
* Camera doesn't need VideoDriver pointer or SceneManager in constructor
* Hud doesn't need driver & scene manager in constructor
* Hud doesn't need scenemanager pointer
* Tile.h doesn't need IrrlichtDevice header (just SMaterial)
* WieldMeshSceneNode: only take scene, we always use scene root node as parent
@nerzhul nerzhul deleted the irrlicht_cleanup2 branch February 18, 2018 21:39
osjc pushed a commit to osjc/minetest that referenced this pull request Jan 11, 2019
…test#6088)

* Irrlicht cleanup: cleanup various object to use RenderingEngine

* CAO doesn't need scenemanager in addToScene
* Camera doesn't need VideoDriver pointer or SceneManager in constructor
* Hud doesn't need driver & scene manager in constructor
* Hud doesn't need scenemanager pointer
* Tile.h doesn't need IrrlichtDevice header (just SMaterial)
* WieldMeshSceneNode: only take scene, we always use scene root node as parent
osjc pushed a commit to osjc/minetest that referenced this pull request Jan 23, 2019
…test#6088)

* Irrlicht cleanup: cleanup various object to use RenderingEngine

* CAO doesn't need scenemanager in addToScene
* Camera doesn't need VideoDriver pointer or SceneManager in constructor
* Hud doesn't need driver & scene manager in constructor
* Hud doesn't need scenemanager pointer
* Tile.h doesn't need IrrlichtDevice header (just SMaterial)
* WieldMeshSceneNode: only take scene, we always use scene root node as parent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ Client rendering Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements One approval ✅ ◻️
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants