From 0aa61ec746bd243cecd1e010f86534cdf3ab7f2f Mon Sep 17 00:00:00 2001 From: Benau Date: Mon, 22 Jan 2018 01:11:53 +0800 Subject: [PATCH] Header clean up --- src/karts/kart.cpp | 10 ++++++++-- src/karts/kart.hpp | 6 +++--- src/physics/btKart.cpp | 1 + src/scriptengine/script_kart.cpp | 1 + 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/karts/kart.cpp b/src/karts/kart.cpp index 536921acf..4d33e9cee 100644 --- a/src/karts/kart.cpp +++ b/src/karts/kart.cpp @@ -54,6 +54,7 @@ #include "karts/explosion_animation.hpp" #include "karts/kart_gfx.hpp" #include "karts/kart_model.hpp" +#include "karts/kart_properties.hpp" #include "karts/kart_properties_manager.hpp" #include "karts/kart_rewinder.hpp" #include "karts/max_speed.hpp" @@ -3019,10 +3020,15 @@ const Vec3& Kart::getNormal() const } // getNormal // ------------------------------------------------------------------------ - void Kart::playSound(SFXBuffer* buffer) { getNextEmitter()->play(getXYZ(), buffer); -} +} // playSound + +// ------------------------------------------------------------------------ +const video::SColor& Kart::getColor() const +{ + return m_kart_properties->getColor(); +} // getColor /* EOF */ diff --git a/src/karts/kart.hpp b/src/karts/kart.hpp index 2f8e1080f..e911f2fc0 100644 --- a/src/karts/kart.hpp +++ b/src/karts/kart.hpp @@ -30,9 +30,10 @@ #include "items/powerup_manager.hpp" // For PowerupType #include "karts/abstract_kart.hpp" -#include "karts/kart_properties.hpp" #include "utils/no_copy.hpp" +#include + class AbstractKartAnimation; class Attachment; class btKart; @@ -347,8 +348,7 @@ public: virtual btTransform getAlignedTransform(const float customPitch=-1); // ------------------------------------------------------------------------- /** Returns the color used for this kart. */ - const video::SColor &getColor() const - {return m_kart_properties->getColor();} + const irr::video::SColor &getColor() const; // ------------------------------------------------------------------------ /** Returns the time till full steering is reached for this kart. * \param steer Current steer value (must be >=0), on which the time till diff --git a/src/physics/btKart.cpp b/src/physics/btKart.cpp index bc11d6ef5..9ea106195 100644 --- a/src/physics/btKart.cpp +++ b/src/physics/btKart.cpp @@ -25,6 +25,7 @@ #include "graphics/material.hpp" #include "karts/kart.hpp" #include "karts/kart_model.hpp" +#include "karts/kart_properties.hpp" #include "physics/triangle_mesh.hpp" #include "tracks/terrain_info.hpp" #include "tracks/track.hpp" diff --git a/src/scriptengine/script_kart.cpp b/src/scriptengine/script_kart.cpp index 51b2beecb..38dce873a 100644 --- a/src/scriptengine/script_kart.cpp +++ b/src/scriptengine/script_kart.cpp @@ -19,6 +19,7 @@ #include "script_kart.hpp" #include "karts/kart.hpp" +#include "karts/kart_properties.hpp" #include "modes/world.hpp" #include "scriptvec3.hpp"