Move RenderInfo class to GE
This commit is contained in:
parent
647988ad30
commit
2d0c945dd8
58
lib/graphics_engine/include/ge_render_info.hpp
Normal file
58
lib/graphics_engine/include/ge_render_info.hpp
Normal file
@ -0,0 +1,58 @@
|
||||
/* ==========================================================================
|
||||
* Copyright (c) 2022 SuperTuxKart-Team
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||
* persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||
* NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
* USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
* ==========================================================================
|
||||
*/
|
||||
|
||||
#ifndef HEADER_GE_RENDER_INFO_HPP
|
||||
#define HEADER_GE_RENDER_INFO_HPP
|
||||
|
||||
namespace GE
|
||||
{
|
||||
|
||||
class GERenderInfo
|
||||
{
|
||||
private:
|
||||
float m_hue;
|
||||
|
||||
bool m_transparent;
|
||||
|
||||
public:
|
||||
// ------------------------------------------------------------------------
|
||||
GERenderInfo(float hue = 0.0f, bool transparent = false)
|
||||
{
|
||||
m_hue = hue;
|
||||
m_transparent = transparent;
|
||||
}
|
||||
// ------------------------------------------------------------------------
|
||||
void setHue(float hue) { m_hue = hue; }
|
||||
// ------------------------------------------------------------------------
|
||||
void setTransparent(bool transparent) { m_transparent = transparent; }
|
||||
// ------------------------------------------------------------------------
|
||||
float getHue() const { return m_hue; }
|
||||
// ------------------------------------------------------------------------
|
||||
bool isTransparent() const { return m_transparent; }
|
||||
|
||||
}; // GERenderInfo
|
||||
|
||||
} // namespace GE
|
||||
|
||||
#endif
|
@ -1399,7 +1399,7 @@ scene::IParticleSystemSceneNode *IrrDriver::addParticleNode(bool default_emitter
|
||||
scene::ISceneNode *IrrDriver::addMesh(scene::IMesh *mesh,
|
||||
const std::string& debug_name,
|
||||
scene::ISceneNode *parent,
|
||||
std::shared_ptr<RenderInfo> render_info)
|
||||
std::shared_ptr<GE::GERenderInfo> render_info)
|
||||
{
|
||||
#ifdef SERVER_ONLY
|
||||
return m_scene_manager->addMeshSceneNode(mesh, parent);
|
||||
@ -1616,7 +1616,7 @@ void IrrDriver::removeTexture(video::ITexture *t)
|
||||
*/
|
||||
scene::IAnimatedMeshSceneNode *IrrDriver::addAnimatedMesh(scene::IAnimatedMesh *mesh,
|
||||
const std::string& debug_name, scene::ISceneNode* parent,
|
||||
std::shared_ptr<RenderInfo> render_info)
|
||||
std::shared_ptr<GE::GERenderInfo> render_info)
|
||||
{
|
||||
scene::IAnimatedMeshSceneNode* node;
|
||||
#ifndef SERVER_ONLY
|
||||
|
@ -68,7 +68,7 @@ class Camera;
|
||||
class FrameBuffer;
|
||||
class LightNode;
|
||||
class PerCameraNode;
|
||||
class RenderInfo;
|
||||
namespace GE { class GERenderInfo; }
|
||||
class RenderTarget;
|
||||
|
||||
struct SHCoefficients;
|
||||
@ -235,7 +235,7 @@ public:
|
||||
scene::ISceneNode* addMesh(scene::IMesh *mesh,
|
||||
const std::string& debug_name,
|
||||
scene::ISceneNode *parent = NULL,
|
||||
std::shared_ptr<RenderInfo> render_info = nullptr);
|
||||
std::shared_ptr<GE::GERenderInfo> render_info = nullptr);
|
||||
PerCameraNode *addPerCameraNode(scene::ISceneNode* node,
|
||||
scene::ICameraSceneNode* cam,
|
||||
scene::ISceneNode *parent = NULL);
|
||||
@ -254,7 +254,7 @@ public:
|
||||
*addAnimatedMesh(scene::IAnimatedMesh *mesh,
|
||||
const std::string& debug_name,
|
||||
scene::ISceneNode* parent = NULL,
|
||||
std::shared_ptr<RenderInfo> render_info = nullptr);
|
||||
std::shared_ptr<GE::GERenderInfo> render_info = nullptr);
|
||||
scene::ICameraSceneNode
|
||||
*addCameraSceneNode();
|
||||
Camera *addCamera(unsigned int index, AbstractKart *kart);
|
||||
|
@ -1,54 +0,0 @@
|
||||
//
|
||||
// SuperTuxKart - a fun racing game with go-kart
|
||||
// Copyright (C) 2016 SuperTuxKart-Team
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 3
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
#ifndef HEADER_RENDER_INFO_HPP
|
||||
#define HEADER_RENDER_INFO_HPP
|
||||
|
||||
#include "utils/no_copy.hpp"
|
||||
|
||||
/**
|
||||
* \ingroup graphics
|
||||
*/
|
||||
class RenderInfo : public NoCopy
|
||||
{
|
||||
private:
|
||||
float m_hue;
|
||||
|
||||
bool m_transparent;
|
||||
|
||||
public:
|
||||
// ------------------------------------------------------------------------
|
||||
RenderInfo(float hue = 0.0f, bool transparent = false)
|
||||
{
|
||||
m_hue = hue;
|
||||
m_transparent = transparent;
|
||||
}
|
||||
// ------------------------------------------------------------------------
|
||||
void setHue(float hue) { m_hue = hue; }
|
||||
// ------------------------------------------------------------------------
|
||||
void setTransparent(bool transparent) { m_transparent = transparent; }
|
||||
// ------------------------------------------------------------------------
|
||||
float getHue() const { return m_hue; }
|
||||
// ------------------------------------------------------------------------
|
||||
bool isTransparent() const { return m_transparent; }
|
||||
|
||||
}; // RenderInfo
|
||||
|
||||
#endif
|
||||
|
||||
/* EOF */
|
@ -28,7 +28,7 @@
|
||||
#include "graphics/shared_gpu_objects.hpp"
|
||||
#include "graphics/shader_based_renderer.hpp"
|
||||
#include "graphics/post_processing.hpp"
|
||||
#include "graphics/render_info.hpp"
|
||||
#include <ge_render_info.hpp>
|
||||
#include "graphics/rtts.hpp"
|
||||
#include "graphics/shaders.hpp"
|
||||
#include "graphics/sp/sp_dynamic_draw_call.hpp"
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "graphics/graphics_restrictions.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "graphics/material.hpp"
|
||||
#include "graphics/render_info.hpp"
|
||||
#include <ge_render_info.hpp>
|
||||
|
||||
#include "../../../lib/irrlicht/source/Irrlicht/CBoneSceneNode.h"
|
||||
#include <algorithm>
|
||||
@ -39,7 +39,7 @@ SPMeshNode::SPMeshNode(IAnimatedMesh* mesh, ISceneNode* parent,
|
||||
const core::vector3df& position,
|
||||
const core::vector3df& rotation,
|
||||
const core::vector3df& scale,
|
||||
std::shared_ptr<RenderInfo> render_info)
|
||||
std::shared_ptr<GE::GERenderInfo> render_info)
|
||||
: CAnimatedMeshSceneNode(mesh, parent, mgr, id, position, rotation,
|
||||
scale)
|
||||
{
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
using namespace irr;
|
||||
using namespace scene;
|
||||
class RenderInfo;
|
||||
namespace GE { class GERenderInfo; }
|
||||
|
||||
namespace SP
|
||||
{
|
||||
@ -38,9 +38,9 @@ class SPShader;
|
||||
class SPMeshNode : public irr::scene::CAnimatedMeshSceneNode
|
||||
{
|
||||
private:
|
||||
std::vector<std::shared_ptr<RenderInfo> > m_render_info;
|
||||
std::vector<std::shared_ptr<GE::GERenderInfo> > m_render_info;
|
||||
|
||||
std::shared_ptr<RenderInfo> m_first_render_info;
|
||||
std::shared_ptr<GE::GERenderInfo> m_first_render_info;
|
||||
|
||||
std::unordered_map<std::string, IBoneSceneNode*> m_joint_nodes;
|
||||
|
||||
@ -80,7 +80,7 @@ public:
|
||||
const core::vector3df& position = core::vector3df(),
|
||||
const core::vector3df& rotation = core::vector3df(),
|
||||
const core::vector3df& scale = core::vector3df(1, 1, 1),
|
||||
std::shared_ptr<RenderInfo> render_info = nullptr);
|
||||
std::shared_ptr<GE::GERenderInfo> render_info = nullptr);
|
||||
// ------------------------------------------------------------------------
|
||||
~SPMeshNode();
|
||||
// ------------------------------------------------------------------------
|
||||
@ -131,7 +131,7 @@ public:
|
||||
const core::matrix4* getSkinningMatrices() const
|
||||
{ return m_skinning_matrices.data(); }
|
||||
// ------------------------------------------------------------------------
|
||||
RenderInfo* getRenderInfo(unsigned mb_id) const
|
||||
GE::GERenderInfo* getRenderInfo(unsigned mb_id) const
|
||||
{
|
||||
if (m_render_info.size() > mb_id && m_render_info[mb_id].get())
|
||||
{
|
||||
@ -140,7 +140,7 @@ public:
|
||||
return NULL;
|
||||
}
|
||||
// ------------------------------------------------------------------------
|
||||
void resetFirstRenderInfo(std::shared_ptr<RenderInfo> ri)
|
||||
void resetFirstRenderInfo(std::shared_ptr<GE::GERenderInfo> ri)
|
||||
{
|
||||
m_render_info.clear();
|
||||
m_first_render_info = ri;
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include "config/user_config.hpp"
|
||||
#include "graphics/central_settings.hpp"
|
||||
#include "graphics/render_info.hpp"
|
||||
#include <ge_render_info.hpp>
|
||||
#include "guiengine/engine.hpp"
|
||||
#include "guiengine/widgets/model_view_widget.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
@ -49,7 +49,7 @@ m_rtt_size(rtt_size)
|
||||
m_type = WTYPE_MODEL_VIEW;
|
||||
m_render_target = NULL;
|
||||
m_rotation_mode = ROTATE_OFF;
|
||||
m_render_info = std::make_shared<RenderInfo>();
|
||||
m_render_info = std::make_shared<GE::GERenderInfo>();
|
||||
m_angle = 0;
|
||||
|
||||
// so that the base class doesn't complain there is no icon defined
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "utils/leak_check.hpp"
|
||||
#include "utils/ptr_vector.hpp"
|
||||
|
||||
class RenderInfo;
|
||||
namespace GE { class GERenderInfo; }
|
||||
|
||||
namespace GUIEngine
|
||||
{
|
||||
@ -63,7 +63,7 @@ namespace GUIEngine
|
||||
|
||||
scene::ISceneNode *m_light;
|
||||
|
||||
std::shared_ptr<RenderInfo> m_render_info;
|
||||
std::shared_ptr<GE::GERenderInfo> m_render_info;
|
||||
|
||||
unsigned m_rtt_size;
|
||||
|
||||
@ -107,7 +107,7 @@ namespace GUIEngine
|
||||
|
||||
void drawRTTScene(const irr::core::rect<s32>& dest_rect) const;
|
||||
|
||||
std::shared_ptr<RenderInfo> getModelViewRenderInfo() { return m_render_info; }
|
||||
std::shared_ptr<GE::GERenderInfo> getModelViewRenderInfo() { return m_render_info; }
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "audio/sfx_manager.hpp"
|
||||
#include "config/player_manager.hpp"
|
||||
#include "config/user_config.hpp"
|
||||
#include "graphics/render_info.hpp"
|
||||
#include <ge_render_info.hpp>
|
||||
#include "guiengine/widgets/kart_stats_widget.hpp"
|
||||
#include "guiengine/widgets/model_view_widget.hpp"
|
||||
#include "guiengine/widgets/player_name_spinner.hpp"
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "config/user_config.hpp"
|
||||
#include "graphics/explosion.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "graphics/render_info.hpp"
|
||||
#include <ge_render_info.hpp>
|
||||
#include "guiengine/engine.hpp"
|
||||
#include "items/attachment_manager.hpp"
|
||||
#include "items/item_manager.hpp"
|
||||
@ -68,7 +68,7 @@ Attachment::Attachment(AbstractKart* kart)
|
||||
if (kart->isGhostKart())
|
||||
m_node = irr_driver->addAnimatedMesh(
|
||||
attachment_manager->getMesh(Attachment::ATTACH_BOMB), "bomb",
|
||||
NULL, std::make_shared<RenderInfo>(0.0f, true));
|
||||
NULL, std::make_shared<GE::GERenderInfo>(0.0f, true));
|
||||
else
|
||||
m_node = irr_driver->addAnimatedMesh(
|
||||
attachment_manager->getMesh(Attachment::ATTACH_BOMB), "bomb");
|
||||
|
@ -42,7 +42,7 @@ AbstractKart::AbstractKart(const std::string& ident,
|
||||
int world_kart_id, int position,
|
||||
const btTransform& init_transform,
|
||||
HandicapLevel handicap,
|
||||
std::shared_ptr<RenderInfo> ri)
|
||||
std::shared_ptr<GE::GERenderInfo> ri)
|
||||
: Moveable()
|
||||
{
|
||||
m_world_kart_id = world_kart_id;
|
||||
@ -78,7 +78,7 @@ void AbstractKart::reset()
|
||||
// ----------------------------------------------------------------------------
|
||||
void AbstractKart::loadKartProperties(const std::string& new_ident,
|
||||
HandicapLevel handicap,
|
||||
std::shared_ptr<RenderInfo> ri)
|
||||
std::shared_ptr<GE::GERenderInfo> ri)
|
||||
{
|
||||
m_kart_properties.reset(new KartProperties());
|
||||
const KartProperties* kp = kart_properties_manager->getKart(new_ident);
|
||||
@ -149,7 +149,7 @@ void AbstractKart::loadKartProperties(const std::string& new_ident,
|
||||
// ----------------------------------------------------------------------------
|
||||
void AbstractKart::changeKart(const std::string& new_ident,
|
||||
HandicapLevel handicap,
|
||||
std::shared_ptr<RenderInfo> ri)
|
||||
std::shared_ptr<GE::GERenderInfo> ri)
|
||||
{
|
||||
// Reset previous kart (including delete old animation above)
|
||||
reset();
|
||||
|
@ -46,7 +46,7 @@ class KartModel;
|
||||
class KartProperties;
|
||||
class Material;
|
||||
class Powerup;
|
||||
class RenderInfo;
|
||||
namespace GE { class GERenderInfo; }
|
||||
class SFXBuffer;
|
||||
class Skidding;
|
||||
class SlipStream;
|
||||
@ -81,7 +81,7 @@ private:
|
||||
// ------------------------------------------------------------------------
|
||||
void loadKartProperties(const std::string& new_ident,
|
||||
HandicapLevel handicap,
|
||||
std::shared_ptr<RenderInfo> ri);
|
||||
std::shared_ptr<GE::GERenderInfo> ri);
|
||||
protected:
|
||||
btTransform m_starting_transform;
|
||||
|
||||
@ -114,7 +114,7 @@ public:
|
||||
int world_kart_id,
|
||||
int position, const btTransform& init_transform,
|
||||
HandicapLevel handicap,
|
||||
std::shared_ptr<RenderInfo> ri);
|
||||
std::shared_ptr<GE::GERenderInfo> ri);
|
||||
virtual ~AbstractKart();
|
||||
// ------------------------------------------------------------------------
|
||||
/** Returns a name to be displayed for this kart. */
|
||||
@ -144,7 +144,7 @@ public:
|
||||
/** Change to new kart instancely (used in network live join). */
|
||||
virtual void changeKart(const std::string& new_ident,
|
||||
HandicapLevel handicap,
|
||||
std::shared_ptr<RenderInfo> ri);
|
||||
std::shared_ptr<GE::GERenderInfo> ri);
|
||||
// ========================================================================
|
||||
// Access to the handicap.
|
||||
// ------------------------------------------------------------------------
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "karts/kart_gfx.hpp"
|
||||
#include "karts/kart_model.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "graphics/render_info.hpp"
|
||||
#include <ge_render_info.hpp>
|
||||
#include "modes/easter_egg_hunt.hpp"
|
||||
#include "modes/linear_world.hpp"
|
||||
#include "modes/world.hpp"
|
||||
@ -38,7 +38,7 @@ GhostKart::GhostKart(const std::string& ident, unsigned int world_kart_id,
|
||||
: Kart(ident, world_kart_id,
|
||||
position, btTransform(btQuaternion(0, 0, 0, 1)),
|
||||
HANDICAP_NONE,
|
||||
std::make_shared<RenderInfo>(color_hue, true/*transparent*/)),
|
||||
std::make_shared<GE::GERenderInfo>(color_hue, true/*transparent*/)),
|
||||
m_replay_data(rd)
|
||||
{
|
||||
} // GhostKart
|
||||
|
@ -112,7 +112,7 @@
|
||||
*/
|
||||
Kart::Kart (const std::string& ident, unsigned int world_kart_id,
|
||||
int position, const btTransform& init_transform,
|
||||
HandicapLevel handicap, std::shared_ptr<RenderInfo> ri)
|
||||
HandicapLevel handicap, std::shared_ptr<GE::GERenderInfo> ri)
|
||||
: AbstractKart(ident, world_kart_id, position, init_transform,
|
||||
handicap, ri)
|
||||
|
||||
@ -223,7 +223,7 @@ void Kart::initSound()
|
||||
// ----------------------------------------------------------------------------
|
||||
void Kart::changeKart(const std::string& new_ident,
|
||||
HandicapLevel handicap,
|
||||
std::shared_ptr<RenderInfo> ri)
|
||||
std::shared_ptr<GE::GERenderInfo> ri)
|
||||
{
|
||||
AbstractKart::changeKart(new_ident, handicap, ri);
|
||||
m_kart_model->setKart(this);
|
||||
|
@ -294,7 +294,7 @@ public:
|
||||
Kart(const std::string& ident, unsigned int world_kart_id,
|
||||
int position, const btTransform& init_transform,
|
||||
HandicapLevel handicap,
|
||||
std::shared_ptr<RenderInfo> ri);
|
||||
std::shared_ptr<GE::GERenderInfo> ri);
|
||||
virtual ~Kart();
|
||||
virtual void init(RaceManager::KartType type) OVERRIDE;
|
||||
virtual void kartIsInRestNow() OVERRIDE;
|
||||
@ -338,7 +338,7 @@ public:
|
||||
virtual void setXYZ(const Vec3& a) OVERRIDE;
|
||||
virtual void changeKart(const std::string& new_ident,
|
||||
HandicapLevel handicap,
|
||||
std::shared_ptr<RenderInfo> ri) OVERRIDE;
|
||||
std::shared_ptr<GE::GERenderInfo> ri) OVERRIDE;
|
||||
|
||||
// ========================================================================================
|
||||
// SPEED and speed-boost related functions
|
||||
|
@ -318,7 +318,7 @@ KartModel::~KartModel()
|
||||
* It is also marked not to be a master copy, so attachModel can be called
|
||||
* for this instance.
|
||||
*/
|
||||
KartModel* KartModel::makeCopy(std::shared_ptr<RenderInfo> ri)
|
||||
KartModel* KartModel::makeCopy(std::shared_ptr<GE::GERenderInfo> ri)
|
||||
{
|
||||
// Make sure that we are copying from a master objects, and
|
||||
// that there is indeed no animated node defined here ...
|
||||
@ -1257,7 +1257,7 @@ void KartModel::resetVisualWheelPosition()
|
||||
} // resetVisualSuspension
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
std::shared_ptr<RenderInfo> KartModel::getRenderInfo()
|
||||
std::shared_ptr<GE::GERenderInfo> KartModel::getRenderInfo()
|
||||
{
|
||||
return m_support_colorization ? m_render_info : NULL;
|
||||
} // getRenderInfo
|
||||
|
@ -37,7 +37,7 @@ using namespace irr;
|
||||
|
||||
class AbstractKart;
|
||||
class KartProperties;
|
||||
class RenderInfo;
|
||||
namespace GE { class GERenderInfo; }
|
||||
class XMLNode;
|
||||
|
||||
/** A speed-weighted object is an object whose characteristics are influenced by the kart's speed */
|
||||
@ -307,7 +307,7 @@ private:
|
||||
AbstractKart* m_kart;
|
||||
|
||||
/** For our engine to get the desired hue for colorization. */
|
||||
std::shared_ptr<RenderInfo> m_render_info;
|
||||
std::shared_ptr<GE::GERenderInfo> m_render_info;
|
||||
|
||||
/** True if this kart model can be colorization in red / blue (now only
|
||||
* used in soccer mode). */
|
||||
@ -342,7 +342,7 @@ private:
|
||||
public:
|
||||
KartModel(bool is_master);
|
||||
~KartModel();
|
||||
KartModel* makeCopy(std::shared_ptr<RenderInfo> ri);
|
||||
KartModel* makeCopy(std::shared_ptr<GE::GERenderInfo> ri);
|
||||
void reset();
|
||||
void loadInfo(const XMLNode &node);
|
||||
bool loadModels(const KartProperties &kart_properties);
|
||||
@ -440,7 +440,7 @@ public:
|
||||
// ------------------------------------------------------------------------
|
||||
scene::IAnimatedMeshSceneNode* getAnimatedNode(){ return m_animated_node; }
|
||||
// ------------------------------------------------------------------------
|
||||
std::shared_ptr<RenderInfo> getRenderInfo();
|
||||
std::shared_ptr<GE::GERenderInfo> getRenderInfo();
|
||||
// ------------------------------------------------------------------------
|
||||
bool supportColorization() const { return m_support_colorization; }
|
||||
// ------------------------------------------------------------------------
|
||||
|
@ -389,7 +389,7 @@ void KartProperties::load(const std::string &filename, const std::string &node)
|
||||
* \param krt The KartRenderType, like default, red, blue or transparent.
|
||||
* see the RenderInfo include for details
|
||||
*/
|
||||
KartModel* KartProperties::getKartModelCopy(std::shared_ptr<RenderInfo> ri) const
|
||||
KartModel* KartProperties::getKartModelCopy(std::shared_ptr<GE::GERenderInfo> ri) const
|
||||
{
|
||||
return m_kart_model->makeCopy(ri);
|
||||
} // getKartModelCopy
|
||||
|
@ -42,7 +42,7 @@ class CachedCharacteristic;
|
||||
class CombinedCharacteristic;
|
||||
class KartModel;
|
||||
class Material;
|
||||
class RenderInfo;
|
||||
namespace GE { class GERenderInfo; }
|
||||
class XMLNode;
|
||||
|
||||
|
||||
@ -252,7 +252,7 @@ public:
|
||||
video::ITexture *getMinimapIcon () const {return m_minimap_icon; }
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
KartModel* getKartModelCopy(std::shared_ptr<RenderInfo> ri=nullptr) const;
|
||||
KartModel* getKartModelCopy(std::shared_ptr<GE::GERenderInfo> ri=nullptr) const;
|
||||
// ------------------------------------------------------------------------
|
||||
/** Returns a pointer to the main KartModel object. This copy
|
||||
* should not be modified, not attachModel be called on it. */
|
||||
|
@ -47,7 +47,7 @@ KartRewinder::KartRewinder(const std::string& ident,
|
||||
unsigned int world_kart_id, int position,
|
||||
const btTransform& init_transform,
|
||||
HandicapLevel handicap,
|
||||
std::shared_ptr<RenderInfo> ri)
|
||||
std::shared_ptr<GE::GERenderInfo> ri)
|
||||
: Rewinder(
|
||||
{
|
||||
RN_KART,
|
||||
|
@ -36,7 +36,7 @@ public:
|
||||
KartRewinder(const std::string& ident, unsigned int world_kart_id,
|
||||
int position, const btTransform& init_transform,
|
||||
HandicapLevel handicap,
|
||||
std::shared_ptr<RenderInfo> ri);
|
||||
std::shared_ptr<GE::GERenderInfo> ri);
|
||||
~KartRewinder() {}
|
||||
virtual void saveTransform() OVERRIDE;
|
||||
virtual void computeError() OVERRIDE;
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include "modes/ctf_flag.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "graphics/render_info.hpp"
|
||||
#include <ge_render_info.hpp>
|
||||
#include "graphics/sp/sp_mesh_node.hpp"
|
||||
#include "karts/abstract_kart.hpp"
|
||||
#include "modes/world.hpp"
|
||||
@ -147,7 +147,7 @@ void CTFFlag::initFlagRenderInfo(irr::scene::IAnimatedMeshSceneNode* flag_node)
|
||||
SP::SPMeshNode* spmn = dynamic_cast<SP::SPMeshNode*>(flag_node);
|
||||
if (!spmn)
|
||||
return;
|
||||
m_flag_render_info = std::make_shared<RenderInfo>(0.0f, true);
|
||||
m_flag_render_info = std::make_shared<GE::GERenderInfo>(0.0f, true);
|
||||
spmn->resetFirstRenderInfo(m_flag_render_info);
|
||||
} // initFlagRenderInfo
|
||||
|
||||
|
@ -31,7 +31,7 @@ enum FlagColor : unsigned int
|
||||
FC_BLUE = 1
|
||||
};
|
||||
|
||||
class RenderInfo;
|
||||
namespace GE { class GERenderInfo; }
|
||||
|
||||
namespace irr
|
||||
{
|
||||
@ -65,7 +65,7 @@ private:
|
||||
int m_off_base_compressed[4];
|
||||
|
||||
/* Determine if the flag should be drawn translucently */
|
||||
std::shared_ptr<RenderInfo> m_flag_render_info;
|
||||
std::shared_ptr<GE::GERenderInfo> m_flag_render_info;
|
||||
|
||||
uint16_t m_deactivated_ticks;
|
||||
public:
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "config/user_config.hpp"
|
||||
#include "graphics/camera.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "graphics/render_info.hpp"
|
||||
#include <ge_render_info.hpp>
|
||||
#include "io/file_manager.hpp"
|
||||
#include "karts/kart.hpp"
|
||||
#include "karts/controller/spare_tire_ai.hpp"
|
||||
@ -739,7 +739,7 @@ void ThreeStrikesBattle::loadCustomModels()
|
||||
{
|
||||
auto sta = std::make_shared<Kart>(sta_list[i], (int)m_karts.size(),
|
||||
(int)m_karts.size() + 1, pos[i], HANDICAP_NONE,
|
||||
std::make_shared<RenderInfo>(1.0f));
|
||||
std::make_shared<GE::GERenderInfo>(1.0f));
|
||||
sta->init(RaceManager::KartType::KT_SPARE_TIRE);
|
||||
sta->setController(new SpareTireAI(sta.get()));
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "graphics/material.hpp"
|
||||
#include "graphics/material_manager.hpp"
|
||||
#include "graphics/render_info.hpp"
|
||||
#include <ge_render_info.hpp>
|
||||
#include "guiengine/modaldialog.hpp"
|
||||
#include "guiengine/screen_keyboard.hpp"
|
||||
#include "io/file_manager.hpp"
|
||||
@ -463,7 +463,7 @@ std::shared_ptr<AbstractKart> World::createKart
|
||||
if (RaceManager::get()->hasGhostKarts())
|
||||
gk = ReplayPlay::get()->getNumGhostKart();
|
||||
|
||||
std::shared_ptr<RenderInfo> ri = std::make_shared<RenderInfo>();
|
||||
std::shared_ptr<GE::GERenderInfo> ri = std::make_shared<GE::GERenderInfo>();
|
||||
core::stringw online_name;
|
||||
if (global_player_id > -1)
|
||||
{
|
||||
@ -1596,9 +1596,9 @@ std::shared_ptr<AbstractKart> World::createKartWithTeam
|
||||
btTransform init_pos = getStartTransform(pos_index - 1);
|
||||
m_kart_position_map[index] = (unsigned)(pos_index - 1);
|
||||
|
||||
std::shared_ptr<RenderInfo> ri = std::make_shared<RenderInfo>();
|
||||
ri = (team == KART_TEAM_BLUE ? std::make_shared<RenderInfo>(0.66f) :
|
||||
std::make_shared<RenderInfo>(1.0f));
|
||||
std::shared_ptr<GE::GERenderInfo> ri = std::make_shared<GE::GERenderInfo>();
|
||||
ri = (team == KART_TEAM_BLUE ? std::make_shared<GE::GERenderInfo>(0.66f) :
|
||||
std::make_shared<GE::GERenderInfo>(1.0f));
|
||||
|
||||
std::shared_ptr<AbstractKart> new_kart;
|
||||
if (RewindManager::get()->isEnabled())
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "guiengine/engine.hpp"
|
||||
#include "guiengine/message_queue.hpp"
|
||||
#include "guiengine/screen_keyboard.hpp"
|
||||
#include "graphics/render_info.hpp"
|
||||
#include <ge_render_info.hpp>
|
||||
#include "karts/abstract_kart.hpp"
|
||||
#include "karts/controller/controller.hpp"
|
||||
#include "modes/world.hpp"
|
||||
@ -233,10 +233,10 @@ void LobbyProtocol::addLiveJoiningKart(int kart_id, const RemoteKartInfo& rki,
|
||||
AbstractKart* k = World::getWorld()->getKart(kart_id);
|
||||
k->changeKart(rki.getKartName(), rki.getHandicap(),
|
||||
rki.getKartTeam() == KART_TEAM_RED ?
|
||||
std::make_shared<RenderInfo>(1.0f) :
|
||||
std::make_shared<GE::GERenderInfo>(1.0f) :
|
||||
rki.getKartTeam() == KART_TEAM_BLUE ?
|
||||
std::make_shared<RenderInfo>(0.66f) :
|
||||
std::make_shared<RenderInfo>(rki.getDefaultKartColor()));
|
||||
std::make_shared<GE::GERenderInfo>(0.66f) :
|
||||
std::make_shared<GE::GERenderInfo>(rki.getDefaultKartColor()));
|
||||
k->setLiveJoinKart(live_join_util_ticks);
|
||||
World::getWorld()->initTeamArrows(k);
|
||||
if (!k->getController()->isLocalPlayerController())
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "karts/kart_properties.hpp"
|
||||
#include "karts/kart_properties_manager.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "graphics/render_info.hpp"
|
||||
#include <ge_render_info.hpp>
|
||||
#include "guiengine/engine.hpp"
|
||||
#include "guiengine/widgets/label_widget.hpp"
|
||||
#include "guiengine/widgets/model_view_widget.hpp"
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "graphics/lod_node.hpp"
|
||||
#include "graphics/lod_node.hpp"
|
||||
#include "graphics/render_info.hpp"
|
||||
#include <ge_render_info.hpp>
|
||||
#include "guiengine/engine.hpp"
|
||||
#include "guiengine/scalable_font.hpp"
|
||||
#include "guiengine/widgets/button_widget.hpp"
|
||||
@ -185,7 +185,7 @@ void GrandPrixLose::setKarts(std::vector<std::pair<std::string, float> > ident_a
|
||||
const KartProperties* kart = kart_properties_manager->getKart(ident_arg[n].first);
|
||||
if (kart != NULL)
|
||||
{
|
||||
KartModel* kart_model = kart->getKartModelCopy(std::make_shared<RenderInfo>(ident_arg[n].second));
|
||||
KartModel* kart_model = kart->getKartModelCopy(std::make_shared<GE::GERenderInfo>(ident_arg[n].second));
|
||||
m_all_kart_models.push_back(kart_model);
|
||||
scene::ISceneNode* kart_main_node = kart_model->attachModel(true, false);
|
||||
LODNode* lnode = dynamic_cast<LODNode*>(kart_main_node);
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "config/stk_config.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "graphics/lod_node.hpp"
|
||||
#include "graphics/render_info.hpp"
|
||||
#include <ge_render_info.hpp>
|
||||
#include "guiengine/engine.hpp"
|
||||
#include "guiengine/scalable_font.hpp"
|
||||
#include "guiengine/widgets/button_widget.hpp"
|
||||
@ -345,7 +345,7 @@ void GrandPrixWin::setKarts(const std::pair<std::string, float> idents_arg[3])
|
||||
const KartProperties* kp = kart_properties_manager->getKart(idents[i].first);
|
||||
if (kp == NULL) continue;
|
||||
|
||||
KartModel* kart_model = kp->getKartModelCopy(std::make_shared<RenderInfo>(idents[i].second));
|
||||
KartModel* kart_model = kp->getKartModelCopy(std::make_shared<GE::GERenderInfo>(idents[i].second));
|
||||
m_all_kart_models.push_back(kart_model);
|
||||
scene::ISceneNode* kart_main_node = kart_model->attachModel(true, false);
|
||||
LODNode* lnode = dynamic_cast<LODNode*>(kart_main_node);
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "config/player_manager.hpp"
|
||||
#include "config/user_config.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "graphics/render_info.hpp"
|
||||
#include <ge_render_info.hpp>
|
||||
#include "guiengine/message_queue.hpp"
|
||||
#include "guiengine/widgets/bubble_widget.hpp"
|
||||
#include "guiengine/widgets/kart_stats_widget.hpp"
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#include "audio/sfx_manager.hpp"
|
||||
#include "config/user_config.hpp"
|
||||
#include "graphics/render_info.hpp"
|
||||
#include <ge_render_info.hpp>
|
||||
#include "guiengine/widgets/bubble_widget.hpp"
|
||||
#include "guiengine/widgets/button_widget.hpp"
|
||||
#include "guiengine/widgets/spinner_widget.hpp"
|
||||
|
@ -57,7 +57,7 @@ void ModelDefinitionLoader::addModelDefinition(const XMLNode* xml)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
LODNode* ModelDefinitionLoader::instanciateAsLOD(const XMLNode* node, scene::ISceneNode* parent, std::shared_ptr<RenderInfo> ri)
|
||||
LODNode* ModelDefinitionLoader::instanciateAsLOD(const XMLNode* node, scene::ISceneNode* parent, std::shared_ptr<GE::GERenderInfo> ri)
|
||||
{
|
||||
scene::ISceneManager* sm = irr_driver->getSceneManager();
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
class LODNode;
|
||||
class STKInstancedSceneNode;
|
||||
class RenderInfo;
|
||||
namespace GE { class GERenderInfo; }
|
||||
class Track;
|
||||
|
||||
#include <cassert>
|
||||
@ -92,7 +92,7 @@ public:
|
||||
void addModelDefinition(const XMLNode* xml);
|
||||
LODNode* instanciateAsLOD(const XMLNode* xml_node,
|
||||
scene::ISceneNode* parent,
|
||||
std::shared_ptr<RenderInfo> ri);
|
||||
std::shared_ptr<GE::GERenderInfo> ri);
|
||||
|
||||
void clear();
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "graphics/lod_node.hpp"
|
||||
#include "graphics/material.hpp"
|
||||
#include "graphics/material_manager.hpp"
|
||||
#include "graphics/render_info.hpp"
|
||||
#include <ge_render_info.hpp>
|
||||
#include "graphics/sp/sp_mesh_buffer.hpp"
|
||||
#include "graphics/sp/sp_mesh_node.hpp"
|
||||
#include "io/file_manager.hpp"
|
||||
@ -261,7 +261,7 @@ void TrackObject::init(const XMLNode &xml_node, scene::ISceneNode* parent,
|
||||
const float hue = colorized->getRandomHue();
|
||||
if (hue > 0.0f)
|
||||
{
|
||||
m_render_info = std::make_shared<RenderInfo>(hue);
|
||||
m_render_info = std::make_shared<GE::GERenderInfo>(hue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include <memory>
|
||||
|
||||
class ModelDefinitionLoader;
|
||||
class RenderInfo;
|
||||
namespace GE { class GERenderInfo; }
|
||||
class ThreeDAnimation;
|
||||
class XMLNode;
|
||||
|
||||
@ -60,7 +60,7 @@ private:
|
||||
|
||||
std::string m_id;
|
||||
|
||||
std::shared_ptr<RenderInfo> m_render_info;
|
||||
std::shared_ptr<GE::GERenderInfo> m_render_info;
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -355,7 +355,7 @@ void TrackObjectPresentationLibraryNode::move(const core::vector3df& xyz, const
|
||||
TrackObjectPresentationLOD::TrackObjectPresentationLOD(const XMLNode& xml_node,
|
||||
scene::ISceneNode* parent,
|
||||
ModelDefinitionLoader& model_def_loader,
|
||||
std::shared_ptr<RenderInfo> ri)
|
||||
std::shared_ptr<GE::GERenderInfo> ri)
|
||||
: TrackObjectPresentationSceneNode(xml_node)
|
||||
{
|
||||
m_node = model_def_loader.instanciateAsLOD(&xml_node, parent, ri);
|
||||
@ -401,7 +401,7 @@ TrackObjectPresentationMesh::TrackObjectPresentationMesh(
|
||||
const XMLNode& xml_node,
|
||||
bool enabled,
|
||||
scene::ISceneNode* parent,
|
||||
std::shared_ptr<RenderInfo> render_info)
|
||||
std::shared_ptr<GE::GERenderInfo> render_info)
|
||||
: TrackObjectPresentationSceneNode(xml_node)
|
||||
{
|
||||
m_is_looped = false;
|
||||
|
@ -40,7 +40,7 @@ class ParticleEmitter;
|
||||
class PhysicalObject;
|
||||
class ThreeDAnimation;
|
||||
class ModelDefinitionLoader;
|
||||
class RenderInfo;
|
||||
namespace GE { class GERenderInfo; }
|
||||
class STKInstancedSceneNode;
|
||||
class XMLNode;
|
||||
class TrackObject;
|
||||
@ -221,7 +221,7 @@ public:
|
||||
TrackObjectPresentationLOD(const XMLNode& xml_node,
|
||||
scene::ISceneNode* parent,
|
||||
ModelDefinitionLoader& model_def_loader,
|
||||
std::shared_ptr<RenderInfo> ri);
|
||||
std::shared_ptr<GE::GERenderInfo> ri);
|
||||
virtual ~TrackObjectPresentationLOD();
|
||||
virtual void reset() OVERRIDE;
|
||||
};
|
||||
@ -245,14 +245,14 @@ private:
|
||||
|
||||
std::string m_model_file;
|
||||
|
||||
std::shared_ptr<RenderInfo> m_render_info;
|
||||
std::shared_ptr<GE::GERenderInfo> m_render_info;
|
||||
|
||||
void init(const XMLNode* xml_node, scene::ISceneNode* parent, bool enabled);
|
||||
|
||||
public:
|
||||
TrackObjectPresentationMesh(const XMLNode& xml_node, bool enabled,
|
||||
scene::ISceneNode* parent,
|
||||
std::shared_ptr<RenderInfo> render_info);
|
||||
std::shared_ptr<GE::GERenderInfo> render_info);
|
||||
|
||||
TrackObjectPresentationMesh(const std::string& model_file,
|
||||
const core::vector3df& xyz,
|
||||
|
Loading…
Reference in New Issue
Block a user