Removed dependencies on controller.hpp from kart.hpp (to

reduce compile time on controller changes).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10952 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2012-03-08 22:56:33 +00:00
parent 9d1e114bde
commit 629f9a27e2
16 changed files with 27 additions and 8 deletions

View File

@ -18,7 +18,9 @@
#include "graphics/skid_marks.hpp"
#include "config/stk_config.hpp"
#include "graphics/irr_driver.hpp"
#include "karts/controller/controller.hpp"
#include "karts/kart.hpp"
#include "physics/btKart.hpp"

View File

@ -22,6 +22,7 @@
#include "graphics/material_manager.hpp"
#include "graphics/irr_driver.hpp"
#include "io/file_manager.hpp"
#include "karts/controller/controller.hpp"
#include "karts/kart.hpp"
#include "modes/world.hpp"
#include "tracks/quad.hpp"

View File

@ -31,6 +31,7 @@
#include "guiengine/screen.hpp"
#include "input/device_manager.hpp"
#include "input/input.hpp"
#include "karts/controller/controller.hpp"
#include "karts/kart.hpp"
#include "modes/profile_world.hpp"
#include "modes/world.hpp"

View File

@ -28,6 +28,7 @@
#include "items/projectile_manager.hpp"
#include "items/swatter.hpp"
#include "karts/kart.hpp"
#include "karts/controller/controller.hpp"
#include "modes/three_strikes_battle.hpp"
#include "network/race_state.hpp"
#include "network/network_manager.hpp"

View File

@ -26,6 +26,7 @@
#include "items/item_manager.hpp"
#include "items/projectile_manager.hpp"
#include "karts/kart.hpp"
#include "karts/controller/controller.hpp"
#include "modes/world.hpp"
#include "network/network_manager.hpp"
#include "network/race_state.hpp"

View File

@ -33,6 +33,7 @@
#include "io/file_manager.hpp"
#include "items/attachment.hpp"
#include "items/projectile_manager.hpp"
#include "karts/controller/controller.hpp"
#include "modes/world.hpp"
#include "karts/kart.hpp"

View File

@ -328,6 +328,16 @@ void Kart::setController(Controller *controller)
m_controller = controller;
} // setController
// ----------------------------------------------------------------------------
/** Sets the position in race this kart has .
* The position in this race for this kart (1<=p<=n)
*/
void Kart::setPosition(int p)
{
m_controller->setPosition(p);
m_race_position = p;
} // setPosition
// -----------------------------------------------------------------------------
/** Returns a transform that will align an object with the kart: the heading
* and the pitch will be set appropriately. A custom pitch value can be

View File

@ -29,7 +29,6 @@
#include "LinearMath/btTransform.h"
#include "items/powerup.hpp"
#include "karts/controller/controller.hpp"
#include "karts/controller/kart_control.hpp"
#include "karts/emergency_animation.hpp"
#include "karts/max_speed.hpp"
@ -43,6 +42,7 @@ class btUprightConstraint;
class Attachment;
class Camera;
class Controller;
class Item;
class KartGFX;
class KartModel;
@ -244,6 +244,7 @@ public:
virtual void update (float dt);
virtual void finishedRace (float time);
virtual void setPosition(int p);
void beep ();
void showZipperFire ();
bool playCustomSFX (unsigned int type);
@ -269,13 +270,6 @@ public:
void setPowerup (PowerupManager::PowerupType t, int n)
{ m_powerup.set(t, n); }
// ------------------------------------------------------------------------
/** Sets the position in race this kart has (1<=p<=n). */
virtual void setPosition(int p)
{
m_controller->setPosition(p);
m_race_position = p;
} // setPosition
// ------------------------------------------------------------------------
/** Returns the current attachment. */
const Attachment* getAttachment() const {return m_attachment; }
// ------------------------------------------------------------------------

View File

@ -23,6 +23,7 @@
#include "audio/music_manager.hpp"
#include "audio/sfx_base.hpp"
#include "audio/sfx_manager.hpp"
#include "karts/controller/controller.hpp"
#include "network/network_manager.hpp"
#include "race/history.hpp"
#include "tracks/track_sector.hpp"

View File

@ -18,6 +18,7 @@
#include "network/kart_control_message.hpp"
#include "karts/controller/controller.hpp"
#include "modes/world.hpp"
#include "network/network_kart.hpp"

View File

@ -27,6 +27,7 @@
#include "input/device_manager.hpp"
#include "input/input_manager.hpp"
#include "karts/kart.hpp"
#include "karts/controller/controller.hpp"
#include "karts/kart_properties_manager.hpp"
#include "modes/follow_the_leader.hpp"
#include "modes/overworld.hpp"

View File

@ -34,6 +34,7 @@ using namespace irr;
#include "items/attachment.hpp"
#include "items/attachment_manager.hpp"
#include "items/powerup_manager.hpp"
#include "karts/controller/controller.hpp"
#include "karts/kart_properties_manager.hpp"
#include "modes/follow_the_leader.hpp"
#include "modes/linear_world.hpp"

View File

@ -37,6 +37,7 @@ using namespace irr;
#include "items/attachment.hpp"
#include "items/attachment_manager.hpp"
#include "items/powerup_manager.hpp"
#include "karts/controller/controller.hpp"
#include "karts/kart_properties_manager.hpp"
#include "modes/follow_the_leader.hpp"
#include "modes/linear_world.hpp"

View File

@ -38,6 +38,7 @@
#include "guiengine/scalable_font.hpp"
#include "io/file_manager.hpp"
#include "items/attachment_manager.hpp"
#include "karts/controller/controller.hpp"
#include "karts/kart.hpp"
#include "karts/kart_properties_manager.hpp"
#include "modes/follow_the_leader.hpp"

View File

@ -37,6 +37,7 @@ using namespace irr;
#include "items/attachment.hpp"
#include "items/attachment_manager.hpp"
#include "items/powerup_manager.hpp"
#include "karts/controller/controller.hpp"
#include "karts/kart_properties_manager.hpp"
#include "modes/world.hpp"
#include "race/race_manager.hpp"

View File

@ -27,6 +27,7 @@
#include "guiengine/widget.hpp"
#include "guiengine/widgets/icon_button_widget.hpp"
#include "io/file_manager.hpp"
#include "karts/controller/controller.hpp"
#include "modes/world_with_rank.hpp"
#include "states_screens/dialogs/race_over_dialog.hpp"
#include "states_screens/feature_unlocked.hpp"