Moved Vec3 and Coord into utils subdir.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2539 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2008-12-01 22:43:50 +00:00
parent 5b33cdc3c0
commit cce4da5a62
31 changed files with 47 additions and 40 deletions

View File

@ -26,8 +26,6 @@ libstatic_ssg_a_CXXFLAGS = @NOREGMOVE@
AM_CPPFLAGS=-DSUPERTUXKART_DATADIR="\"$(datadir)/games/@PACKAGE@/\"" -I$(srcdir)/bullet/src/ -I$(srcdir)/enet/include/ AM_CPPFLAGS=-DSUPERTUXKART_DATADIR="\"$(datadir)/games/@PACKAGE@/\"" -I$(srcdir)/bullet/src/ -I$(srcdir)/enet/include/
supertuxkart_SOURCES = main.cpp \ supertuxkart_SOURCES = main.cpp \
vec3.cpp vec3.hpp \
coord.hpp \
actionmap.cpp actionmap.hpp \ actionmap.cpp actionmap.hpp \
material.cpp material.hpp \ material.cpp material.hpp \
network/network_manager.cpp network/network_manager.hpp \ network/network_manager.cpp network/network_manager.hpp \
@ -52,9 +50,11 @@ supertuxkart_SOURCES = main.cpp \
audio/sfx_manager.cpp audio/sfx_manager.hpp \ audio/sfx_manager.cpp audio/sfx_manager.hpp \
audio/sfx_openal.cpp audio/sfx_openal.hpp \ audio/sfx_openal.cpp audio/sfx_openal.hpp \
audio/sound_manager.cpp audio/sound_manager.hpp \ audio/sound_manager.cpp audio/sound_manager.hpp \
utils/coord.hpp \
utils/random_generator.hpp utils/random_generator.cpp \ utils/random_generator.hpp utils/random_generator.cpp \
utils/ssg_help.cpp utils/ssg_help.hpp \ utils/ssg_help.cpp utils/ssg_help.hpp \
material_manager.cpp material_manager.hpp \ utils/vec3.cpp utils/vec3.hpp \
material_manager.cpp material_manager.hpp \
grand_prix_manager.cpp grand_prix_manager.hpp \ grand_prix_manager.cpp grand_prix_manager.hpp \
graphics/nitro.cpp graphics/nitro.hpp \ graphics/nitro.cpp graphics/nitro.hpp \
graphics/skid_mark.cpp graphics/skid_mark.hpp \ graphics/skid_mark.cpp graphics/skid_mark.hpp \

View File

@ -30,7 +30,7 @@
#include <SDL/SDL_endian.h> #include <SDL/SDL_endian.h>
#include "lisp/lisp.hpp" #include "lisp/lisp.hpp"
#include "vec3.hpp" #include "utils/vec3.hpp"
class SFXBase; class SFXBase;

View File

@ -168,7 +168,7 @@ MusicInformation* SoundManager::getMusicInformation(const std::string& filename)
} // SoundManager } // SoundManager
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void SoundManager::positionListener(Vec3 position, Vec3 front) void SoundManager::positionListener(const Vec3 &position, const Vec3 &front)
{ {
if(!user_config->doSFX() || !m_initialized) return; if(!user_config->doSFX() || !m_initialized) return;

View File

@ -28,7 +28,8 @@
#include "lisp/lisp.hpp" #include "lisp/lisp.hpp"
#include "audio/music.hpp" #include "audio/music.hpp"
#include "audio/music_information.hpp" #include "audio/music_information.hpp"
#include "vec3.hpp"
class Vec3;
class SoundManager class SoundManager
{ {
@ -48,7 +49,7 @@ public:
SoundManager(); SoundManager();
virtual ~SoundManager(); virtual ~SoundManager();
void positionListener(Vec3 position, Vec3 front); void positionListener(const Vec3 &position, const Vec3 &front);
void startMusic(MusicInformation* mi); void startMusic(MusicInformation* mi);
void stopMusic(); void stopMusic();
bool initialized() const {return m_initialized; } bool initialized() const {return m_initialized; }

View File

@ -20,7 +20,6 @@
#define _WINSOCKAPI_ #define _WINSOCKAPI_
#include <plib/ssg.h> #include <plib/ssg.h>
#include "coord.hpp"
#include "modes/world.hpp" #include "modes/world.hpp"
#include "track.hpp" #include "track.hpp"
#include "camera.hpp" #include "camera.hpp"
@ -29,6 +28,7 @@
#include "race_manager.hpp" #include "race_manager.hpp"
#include "audio/sound_manager.hpp" #include "audio/sound_manager.hpp"
#include "karts/player_kart.hpp" #include "karts/player_kart.hpp"
#include "utils/coord.hpp"
Camera::Camera(int camera_index, const Kart* kart) Camera::Camera(int camera_index, const Kart* kart)
{ {

View File

@ -22,7 +22,7 @@
#ifndef HEADER_CAMERA_H #ifndef HEADER_CAMERA_H
#define HEADER_CAMERA_H #define HEADER_CAMERA_H
#include "vec3.hpp" #include "utils/vec3.hpp"
class ssgContext; class ssgContext;
class Kart; class Kart;

View File

@ -23,6 +23,7 @@
#include "scene.hpp" #include "scene.hpp"
#include "audio/sfx_base.hpp" #include "audio/sfx_base.hpp"
#include "audio/sfx_manager.hpp" #include "audio/sfx_manager.hpp"
#include "utils/vec3.hpp"
Explosion::Explosion(const Vec3& coord) : ssgTransform() Explosion::Explosion(const Vec3& coord) : ssgTransform()
{ {

View File

@ -21,8 +21,8 @@
#define HEADER_EXPLOSION_H #define HEADER_EXPLOSION_H
#include <plib/sg.h> #include <plib/sg.h>
#include "vec3.hpp"
class Vec3;
class SFXBase; class SFXBase;
class Explosion : public ssgTransform class Explosion : public ssgTransform

View File

@ -74,7 +74,7 @@ void Nitro::particle_create(int, Particle *p)
p->m_time_to_live = 0.8f; p->m_time_to_live = 0.8f;
Vec3 xyz = m_kart->getXYZ(); Vec3 xyz = m_kart->getXYZ();
const Vec3 vel = -m_kart->getVelocity()*0.2; const Vec3 vel = -m_kart->getVelocity()*0.2f;
sgCopyVec3(p->m_vel, vel.toFloat()); sgCopyVec3(p->m_vel, vel.toFloat());
sgCopyVec3(p->m_pos, xyz.toFloat()); sgCopyVec3(p->m_pos, xyz.toFloat());
p->m_vel[0] += cos(DEGREE_TO_RAD(rand()% 10)); p->m_vel[0] += cos(DEGREE_TO_RAD(rand()% 10));

View File

@ -19,6 +19,7 @@
#include "scene.hpp" #include "scene.hpp"
#include "skid_mark.hpp" #include "skid_mark.hpp"
#include "utils/coord.hpp"
float SkidMark::m_global_track_offset = 0.005f; float SkidMark::m_global_track_offset = 0.005f;

View File

@ -17,13 +17,14 @@
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef HEADER_SKIDMARK_CXX #ifndef HEADER_SKID_MARK_HPP
#define HEADER_SKIDMARK_CXX #define HEADER_SKID_MARK_HPP
#include <vector> #include <vector>
#include <plib/ssg.h> #include <plib/ssg.h>
#include "coord.hpp"
class Coord;
class SkidMark class SkidMark
{ {

View File

@ -23,8 +23,8 @@
#include <vector> #include <vector>
#include "LinearMath/btQuaternion.h" #include "LinearMath/btQuaternion.h"
#include "vec3.hpp"
#include "karts/kart_control.hpp" #include "karts/kart_control.hpp"
#include "utils/vec3.hpp"
class Kart; class Kart;

View File

@ -823,10 +823,6 @@
RelativePath="../../../src\user_config.cpp" RelativePath="../../../src\user_config.cpp"
> >
</File> </File>
<File
RelativePath="..\..\vec3.cpp"
>
</File>
<Filter <Filter
Name="gui" Name="gui"
> >
@ -1042,6 +1038,10 @@
RelativePath="..\..\utils\ssg_help.cpp" RelativePath="..\..\utils\ssg_help.cpp"
> >
</File> </File>
<File
RelativePath="..\..\utils\vec3.cpp"
>
</File>
</Filter> </Filter>
<Filter <Filter
Name="audio" Name="audio"
@ -1217,10 +1217,6 @@
RelativePath="../../../src\constants.hpp" RelativePath="../../../src\constants.hpp"
> >
</File> </File>
<File
RelativePath="..\..\coord.hpp"
>
</File>
<File <File
RelativePath="../../../src\explosion.hpp" RelativePath="../../../src\explosion.hpp"
> >
@ -1652,6 +1648,10 @@
<Filter <Filter
Name="utils" Name="utils"
> >
<File
RelativePath="..\..\utils\coord.hpp"
>
</File>
<File <File
RelativePath="..\..\utils\random_generator.hpp" RelativePath="..\..\utils\random_generator.hpp"
> >
@ -1660,6 +1660,10 @@
RelativePath="..\..\utils\ssg_help.hpp" RelativePath="..\..\utils\ssg_help.hpp"
> >
</File> </File>
<File
RelativePath="..\..\utils\vec3.hpp"
>
</File>
</Filter> </Filter>
<Filter <Filter
Name="audio" Name="audio"

View File

@ -19,10 +19,10 @@
#include "items/item.hpp" #include "items/item.hpp"
#include "vec3.hpp"
#include "scene.hpp" #include "scene.hpp"
#include "coord.hpp"
#include "karts/kart.hpp" #include "karts/kart.hpp"
#include "utils/coord.hpp"
#include "utils/vec3.hpp"
Item::Item(ItemType type, const Vec3& xyz, const Vec3& normal, Item::Item(ItemType type, const Vec3& xyz, const Vec3& normal,
ssgEntity* model, unsigned int item_id, bool rotate) ssgEntity* model, unsigned int item_id, bool rotate)

View File

@ -23,8 +23,8 @@
// num_players triggers 'already defined' messages without the WINSOCKAPI define. Don't ask me :( // num_players triggers 'already defined' messages without the WINSOCKAPI define. Don't ask me :(
#define _WINSOCKAPI_ #define _WINSOCKAPI_
#include <plib/sg.h> #include <plib/sg.h>
#include "coord.hpp"
#include "karts/kart.hpp" #include "karts/kart.hpp"
#include "utils/coord.hpp"
class ssgTransform; class ssgTransform;
class ssgEntity; class ssgEntity;

View File

@ -20,7 +20,6 @@
#include "items/plunger.hpp" #include "items/plunger.hpp"
#include "constants.hpp" #include "constants.hpp"
#include "coord.hpp"
#include "camera.hpp" #include "camera.hpp"
#include "items/rubber_band.hpp" #include "items/rubber_band.hpp"
#include "karts/player_kart.hpp" #include "karts/player_kart.hpp"

View File

@ -22,9 +22,9 @@
#include <vector> #include <vector>
#include <plib/ssg.h> #include <plib/ssg.h>
#include "vec3.hpp"
#include "items/powerup_manager.hpp" #include "items/powerup_manager.hpp"
class Vec3;
class Kart; class Kart;
class Explosion; class Explosion;
class Flyable; class Flyable;

View File

@ -31,7 +31,6 @@
#include "bullet/Demos/OpenGL/GL_ShapeDrawer.h" #include "bullet/Demos/OpenGL/GL_ShapeDrawer.h"
#include "loader.hpp" #include "loader.hpp"
#include "coord.hpp"
#include "items/item_manager.hpp" #include "items/item_manager.hpp"
#include "file_manager.hpp" #include "file_manager.hpp"
#include "user_config.hpp" #include "user_config.hpp"
@ -53,6 +52,7 @@
#include "network/race_state.hpp" #include "network/race_state.hpp"
#include "network/network_manager.hpp" #include "network/network_manager.hpp"
#include "physics/physics.hpp" #include "physics/physics.hpp"
#include "utils/coord.hpp"
#include "utils/ssg_help.hpp" #include "utils/ssg_help.hpp"
#include "audio/sfx_manager.hpp" #include "audio/sfx_manager.hpp"

View File

@ -26,8 +26,8 @@
#include <plib/ssg.h> #include <plib/ssg.h>
#include "no_copy.hpp" #include "no_copy.hpp"
#include "vec3.hpp"
#include "lisp/lisp.hpp" #include "lisp/lisp.hpp"
#include "utils/vec3.hpp"
/** This class stores a 3D kart model. It takes especially care of attaching /** This class stores a 3D kart model. It takes especially care of attaching
* the wheels, which are loaded as separate objects. The wheels can turn * the wheels, which are loaded as separate objects. The wheels can turn

View File

@ -23,10 +23,10 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "plib/ssg.h" #include "plib/ssg.h"
#include "vec3.hpp"
#include "karts/kart_model.hpp" #include "karts/kart_model.hpp"
#include "lisp/lisp.hpp" #include "lisp/lisp.hpp"
#include "audio/sfx_manager.hpp" #include "audio/sfx_manager.hpp"
#include "utils/vec3.hpp"
class Material; class Material;
class ssgEntity; class ssgEntity;

View File

@ -23,8 +23,8 @@
#include "material_manager.hpp" #include "material_manager.hpp"
#include "material.hpp" #include "material.hpp"
#include "user_config.hpp" #include "user_config.hpp"
#include "coord.hpp"
#include "karts/player_kart.hpp" #include "karts/player_kart.hpp"
#include "utils/coord.hpp"
Moveable::Moveable() Moveable::Moveable()
{ {

View File

@ -23,10 +23,10 @@
#define _WINSOCKAPI_ #define _WINSOCKAPI_
#include <plib/ssg.h> #include <plib/ssg.h>
#include "vec3.hpp"
#include "btBulletDynamicsCommon.h" #include "btBulletDynamicsCommon.h"
#include "user_pointer.hpp" #include "user_pointer.hpp"
#include "physics/kart_motion_state.hpp" #include "physics/kart_motion_state.hpp"
#include "utils/vec3.hpp"
class Material; class Material;

View File

@ -24,7 +24,7 @@
#include <vector> #include <vector>
#define _WINSOCKAPI_ #define _WINSOCKAPI_
#include <plib/sg.h> #include <plib/sg.h>
#include "vec3.hpp" #include "utils/vec3.hpp"
namespace lisp namespace lisp
{ {

View File

@ -27,7 +27,7 @@
#include "enet/enet.h" #include "enet/enet.h"
#include "vec3.hpp" #include "utils/vec3.hpp"
// sjl: when a message is received, need to work out what kind of message it // sjl: when a message is received, need to work out what kind of message it
// is and therefore what to do with it // is and therefore what to do with it

View File

@ -23,8 +23,8 @@
#include "particle_system.hpp" #include "particle_system.hpp"
#include <algorithm> #include <algorithm>
#include "vec3.hpp"
#include "scene.hpp" #include "scene.hpp"
#include "utils/vec3.hpp"
ParticleSystem::ParticleSystem ( int num, float create_rate, int ttf, float sz) ParticleSystem::ParticleSystem ( int num, float create_rate, int ttf, float sz)
: ssgVtxTable(GL_QUADS, : ssgVtxTable(GL_QUADS,

View File

@ -30,8 +30,8 @@
#include "bullet/Demos/OpenGL/GL_ShapeDrawer.h" #include "bullet/Demos/OpenGL/GL_ShapeDrawer.h"
#include "user_pointer.hpp" #include "user_pointer.hpp"
#include "vec3.hpp"
class Vec3;
class Kart; class Kart;
class Physics : public btSequentialImpulseConstraintSolver class Physics : public btSequentialImpulseConstraintSolver

View File

@ -20,8 +20,8 @@
#ifndef HEADER_TERRAIN_INFO_H #ifndef HEADER_TERRAIN_INFO_H
#define HEADER_TERRAIN_INFO_H #define HEADER_TERRAIN_INFO_H
#include "vec3.hpp"
#include "material.hpp" #include "material.hpp"
#include "utils/vec3.hpp"
/** This class stores information about the triangle that's under an object, i.e.: /** This class stores information about the triangle that's under an object, i.e.:
* the normal, a pointer to the material, and the height above th * the normal, a pointer to the material, and the height above th

View File

@ -32,10 +32,10 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "LinearMath/btTransform.h" #include "LinearMath/btTransform.h"
#include "vec3.hpp"
#include "material.hpp" #include "material.hpp"
#include "triangle_mesh.hpp" #include "triangle_mesh.hpp"
#include "audio/music_information.hpp" #include "audio/music_information.hpp"
#include "utils/vec3.hpp"
class Track class Track
{ {