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
Conversation
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)
src/hud.cpp
Outdated
Inventory *inventory) | ||
{ | ||
this->driver = driver; | ||
this->smgr = smgr; | ||
driver = RenderingEngine::get_video_driver(); | ||
this->guienv = guienv; |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gui::IGUIEnvironment *guienv
src/content_cao.cpp
Outdated
smgr, -1); | ||
m_wield_meshnode = new WieldMeshSceneNode( | ||
RenderingEngine::get_scene_manager()->getRootSceneNode(), | ||
RenderingEngine::get_scene_manager(), -1); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pointer guienv
again
i missed the old style, will fix it this evening :) |
…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
…ne (minetest#6088)" This reverts commit bd91ecc.
…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
…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
…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
…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