From: <hik...@us...> - 2010-02-22 12:02:25
|
Revision: 4794 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4794&view=rev Author: hikerstk Date: 2010-02-22 12:02:13 +0000 (Mon, 22 Feb 2010) Log Message: ----------- Replaced OpenGL bullet debug view with irrlicht bullet debug view. Debug view can now be switch on and off during a race (ctl-F11), but currenlty does not display as much information as the original debug view (more to be implemented here). Removed glut dependency. Modified Paths: -------------- main/trunk/configure.ac main/trunk/src/Makefile.am main/trunk/src/graphics/irr_driver.cpp main/trunk/src/graphics/irr_driver.hpp main/trunk/src/ide/vc9/bullet_lib.vcproj main/trunk/src/ide/vc9/supertuxkart.vcproj main/trunk/src/input/input_manager.cpp main/trunk/src/karts/kart.cpp main/trunk/src/karts/kart.hpp main/trunk/src/main.cpp main/trunk/src/physics/physics.cpp main/trunk/src/physics/physics.hpp main/trunk/src/states_screens/grand_prix_over.cpp Added Paths: ----------- main/trunk/src/physics/irr_debug_drawer.cpp main/trunk/src/physics/irr_debug_drawer.hpp Removed Paths: ------------- main/trunk/src/bullet/Demos/ Modified: main/trunk/configure.ac =================================================================== --- main/trunk/configure.ac 2010-02-22 00:46:04 UTC (rev 4793) +++ main/trunk/configure.ac 2010-02-22 12:02:13 UTC (rev 4794) @@ -90,7 +90,7 @@ AC_DEFINE([WIN32], 1, [Define for Win32 platforms]) AC_DEFINE([NOMINMAX], 1, [Define for Win32 platforms]) - opengl_LIBS="-lglut32 -lglu32 -lopengl32 -luser32 -lgdi32 -lm -lwinmm" + opengl_LIBS="-lopengl32 -luser32 -lgdi32 -lm -lwinmm" joystick_LIBS="$joystick_LIBS -lwinmm" LDFLAGS="$LDFLAGS -mwindows" @@ -313,58 +313,13 @@ AC_DEFINE_UNQUOTED([SVNVERSION],"$SVNVERSION",["SVN revision number"]) fi -# ============================================== -# Glut (optional), used by bullet debugging only -# ============================================== -save_LIBS=$LIBS -save_LDFLAGS=$LDFLAGS -save_CXXFLAGS=$CXXFLAGS -case "${host}" in -*darwin*|*macosx*) - # Apparently -framework is needed for include files and libraries - CXXFLAGS="$CXXFLAGS -framework GLUT" - LDFLAGS="$LDFLAGS -framework GLUT" -esac -AC_SEARCH_LIBS(glutInit, [glut], have_glut_lib=yes) - -if test x$have_glut_lib = xyes; then - # Apple has the headers in GLUT/glut.h instead of GL/glut.h - AC_CHECK_HEADERS([GL/glut.h GLUT/glut.h], have_glut_hdr=yes) -fi -if test x$have_glut_hdr = xyes; then - AC_DEFINE(HAVE_GLUT) - SUMMARY="$SUMMARY\nGlut found, enabling optional bullet debug" -else - SUMMARY="$SUMMARY\nNo glut found, disabling bullet debug" - # Remove the unnecessary -framework GLUT on Macs (no impact - # of this on any other platforms) - CXXFLAGS=$save_CSSFLAGS - LDFLAGS=$save_LDFLAGS -fi - - -case "${host}" in -*darwin*|*macosx*) - glut_LIBS="$LIBS" - ;; -*) - glut_LIBS="$LIBS -lGLU" - ;; -esac - -LIBS=$save_LIBS - # ============== # Bullet physics # ============== AC_DEFINE([BT_NO_PROFILE], [], [Disable bullet internal profiling]) SUMMARY="$SUMMARY\nUsing bullet physics." BULLETTREE="src/bullet" -bullet_LIBS="" -if test x$have_glut_hdr = xyes; then - bullet_LIBS="-Lbullet/Demos/OpenGL -lbulletopenglsupport" -fi -bullet_LIBS="$bullet_LIBS -Lbullet/src -lbulletdynamics -lbulletcollision -lbulletmath" +bullet_LIBS="-Lbullet/src -lbulletdynamics -lbulletcollision -lbulletmath" # ==== @@ -410,7 +365,6 @@ AC_SUBST(opengl_LIBS) AC_SUBST(openal_LIBS) AC_SUBST(oggvorbis_LIBS) -AC_SUBST(glut_LIBS) AC_SUBST(BULLETTREE) AC_SUBST(ENETTREE) Modified: main/trunk/src/Makefile.am =================================================================== --- main/trunk/src/Makefile.am 2010-02-22 00:46:04 UTC (rev 4793) +++ main/trunk/src/Makefile.am 2010-02-22 12:02:13 UTC (rev 4794) @@ -227,6 +227,8 @@ physics/btKart.hpp \ physics/btUprightConstraint.cpp \ physics/btUprightConstraint.hpp \ + physics/irr_debug_drawer.cpp \ + physics/irr_debug_drawer.hpp \ physics/kart_motion_state.hpp \ physics/physical_object.cpp \ physics/physical_object.hpp \ @@ -354,7 +356,7 @@ # Link in the specific gcc 4.1 bug work around supertuxkart_LDADD = \ - $(irrlicht_LIBS) $(bullet_LIBS) $(enet_LIBS) $(glut_LIBS) \ + $(irrlicht_LIBS) $(bullet_LIBS) $(enet_LIBS) \ $(opengl_LIBS) $(openal_LIBS) $(oggvorbis_LIBS) \ $(INTLLIBS) Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2010-02-22 00:46:04 UTC (rev 4793) +++ main/trunk/src/graphics/irr_driver.cpp 2010-02-22 12:02:13 UTC (rev 4794) @@ -19,14 +19,6 @@ #include "graphics/irr_driver.hpp" -#ifdef HAVE_GLUT -# ifdef __APPLE__ -# include <GLUT/glut.h> -# else -# include <GL/glut.h> -# endif -#endif - #include "config/user_config.hpp" #include "graphics/camera.hpp" #include "graphics/material_manager.hpp" @@ -202,7 +194,7 @@ material2D.TextureLayer[n].TextureWrapU = ETC_CLAMP_TO_EDGE; material2D.TextureLayer[n].TextureWrapV = ETC_CLAMP_TO_EDGE; - material2D.TextureLayer[n].LODBias = 8.0f; + material2D.TextureLayer[n].LODBias = 8; } material2D.AntiAliasing=video::EAAM_FULL_BASIC; //m_video_driver->enableMaterial2D(); @@ -525,7 +517,8 @@ /** Creates a quad mesh buffer */ -scene::IMesh *IrrDriver::createTexturedQuadMesh(const video::SMaterial *material, const double w, const double h) +scene::IMesh *IrrDriver::createTexturedQuadMesh(const video::SMaterial *material, + const double w, const double h) { scene::SMeshBuffer *buffer = new scene::SMeshBuffer(); @@ -535,17 +528,17 @@ v1.TCoords = core::vector2d<f32>(0,1); video::S3DVertex v2; - v2.Pos = core::vector3df(w,0,0); + v2.Pos = core::vector3df((float)w,0,0); v2.Normal = core::vector3df(1/sqrt(2.0f), 1/sqrt(2.0f), 0); v2.TCoords = core::vector2d<f32>(1,1); video::S3DVertex v3; - v3.Pos = core::vector3df(w,h,0); + v3.Pos = core::vector3df((float)w,(float)h,0); v3.Normal = core::vector3df(1/sqrt(2.0f), 1/sqrt(2.0f), 0); v3.TCoords = core::vector2d<f32>(1,0); video::S3DVertex v4; - v4.Pos = core::vector3df(0,h,0); + v4.Pos = core::vector3df(0,(float)h,0); v4.Normal = core::vector3df(1/sqrt(2.0f), 1/sqrt(2.0f), 0); v4.TCoords = core::vector2d<f32>(0,0); @@ -706,67 +699,6 @@ } // setAmbientLight // ---------------------------------------------------------------------------- -/** Renders the bullet debug view using glut. - */ -void IrrDriver::renderBulletDebugView() -{ -#ifdef HAVE_GLUT - // Use bullets debug drawer - GLfloat light_ambient[] = { 0.0, 0.0, 0.0, 1.0 }; - GLfloat light_diffuse[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat light_specular[] = { 1.0, 1.0, 1.0, 1.0 }; - /* light_position is NOT default value */ - GLfloat light_position0[] = { 1.0, 1.0, 1.0, 0.0 }; - GLfloat light_position1[] = { -1.0, -1.0, -1.0, 0.0 }; - - glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient); - glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse); - glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular); - glLightfv(GL_LIGHT0, GL_POSITION, light_position0); - - glLightfv(GL_LIGHT1, GL_AMBIENT, light_ambient); - glLightfv(GL_LIGHT1, GL_DIFFUSE, light_diffuse); - glLightfv(GL_LIGHT1, GL_SPECULAR, light_specular); - glLightfv(GL_LIGHT1, GL_POSITION, light_position1); - - glEnable(GL_LIGHTING); - glEnable(GL_LIGHT0); - glEnable(GL_LIGHT1); - - glShadeModel(GL_SMOOTH); - glEnable(GL_DEPTH_TEST); - glDepthFunc(GL_LESS); - - glClearColor(0.8f,0.8f,0.8f,0); - - glCullFace(GL_BACK); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - float f=2.0f; - glFrustum(-f, f, -f, f, 1.0, 1000.0); - - World *world = World::getWorld(); - const Kart *kart = world->getKart(world->getNumKarts()-1); - Vec3 xyz = kart->getXYZ(); - // Compute the camera position 5 units behind and 4 units higher than the kart - Vec3 cam_pos= kart->getTrans()(Vec3(0, -5, 4)); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - - gluLookAt(cam_pos.getX(), cam_pos.getY(), cam_pos.getZ(), - xyz.getX(), xyz.getY(), xyz.getZ(), - 0.0f, 0.0f, 1.0f ); - - for (unsigned int i = 0 ; i < world->getNumKarts(); ++i) - { - Kart *kart=world->getKart((int)i); - if(!kart->isEliminated()) kart->draw(); - } - world->getPhysics()->draw(); -#endif -} // renderBulletDebugView - -// ---------------------------------------------------------------------------- /** Displays the FPS on the screen. */ void IrrDriver::displayFPS() @@ -847,34 +779,32 @@ if (inRace) { - if (UserConfigParams::m_bullet_debug) + RaceGUI *rg = world->getRaceGUI(); + for(unsigned int i=0; i<world->getNumKarts(); i++) { - renderBulletDebugView(); - } - else - { - RaceGUI *rg = world->getRaceGUI(); - for(unsigned int i=0; i<world->getNumKarts(); i++) + Kart *kart=world->getKart(i); + if(kart->getCamera()) { - Kart *kart=world->getKart(i); - if(kart->getCamera()) - { - kart->getCamera()->activate(); - m_scene_manager->drawAll(); - } // if kart->Camera - } // for i<world->getNumKarts() - // To draw the race gui we set the viewport back to the full - // screen. - m_video_driver->setViewPort(core::recti(0, 0, - UserConfigParams::m_width, - UserConfigParams::m_height)); - for(unsigned int i=0; i<world->getNumKarts(); i++) - { - Kart *kart = world->getKart(i); - if(kart->getCamera()) - rg->renderPlayerView(kart); - } // for i<getNumKarts - } // !bullet_debug + kart->getCamera()->activate(); + m_scene_manager->drawAll(); + // Note that drawAll must be called before rendering + // the bullet debug view, since otherwise the camera + // is not set up properly. + if (UserConfigParams::m_bullet_debug) + World::getWorld()->getPhysics()->draw(); + } // if kart->Camera + } // for i<world->getNumKarts() + // To draw the race gui we set the viewport back to the full + // screen. + m_video_driver->setViewPort(core::recti(0, 0, + UserConfigParams::m_width, + UserConfigParams::m_height)); + for(unsigned int i=0; i<world->getNumKarts(); i++) + { + Kart *kart = world->getKart(i); + if(kart->getCamera()) + rg->renderPlayerView(kart); + } // for i<getNumKarts } else { @@ -884,7 +814,7 @@ // The render and displayFPS calls interfere with bullet debug // rendering, so they can not be called. - if(!inRace || !UserConfigParams::m_bullet_debug) + //FIXME if(!inRace || !UserConfigParams::m_bullet_debug) { // Either render the gui, or the global elements of the race gui. GUIEngine::render(dt); Modified: main/trunk/src/graphics/irr_driver.hpp =================================================================== --- main/trunk/src/graphics/irr_driver.hpp 2010-02-22 00:46:04 UTC (rev 4793) +++ main/trunk/src/graphics/irr_driver.hpp 2010-02-22 12:02:13 UTC (rev 4794) @@ -58,7 +58,6 @@ void setAllMaterialFlags(scene::IAnimatedMesh *mesh) const; std::vector<VideoMode> m_modes; - void renderBulletDebugView(); void displayFPS(); void setupViewports(); video::E_DRIVER_TYPE getEngineDriverType(int index); Modified: main/trunk/src/ide/vc9/bullet_lib.vcproj =================================================================== --- main/trunk/src/ide/vc9/bullet_lib.vcproj 2010-02-22 00:46:04 UTC (rev 4793) +++ main/trunk/src/ide/vc9/bullet_lib.vcproj 2010-02-22 12:02:13 UTC (rev 4794) @@ -673,50 +673,6 @@ > </File> </Filter> - <Filter - Name="Demos" - > - <Filter - Name="OpenGL" - > - <File - RelativePath="..\..\bullet\Demos\OpenGL\BMF_Api.cpp" - > - </File> - <File - RelativePath="..\..\bullet\Demos\OpenGL\BMF_BitmapFont.cpp" - > - </File> - <File - RelativePath="..\..\bullet\Demos\OpenGL\BMF_font_helv10.cpp" - > - </File> - <File - RelativePath="..\..\bullet\Demos\OpenGL\DemoApplication.cpp" - > - </File> - <File - RelativePath="..\..\bullet\Demos\OpenGL\GL_ShapeDrawer.cpp" - > - </File> - <File - RelativePath="..\..\bullet\Demos\OpenGL\GL_Simplex1to4.cpp" - > - </File> - <File - RelativePath="..\..\bullet\Demos\OpenGL\GLDebugDrawer.cpp" - > - </File> - <File - RelativePath="..\..\bullet\Demos\OpenGL\GlutStuff.cpp" - > - </File> - <File - RelativePath="..\..\bullet\Demos\OpenGL\RenderTexture.cpp" - > - </File> - </Filter> - </Filter> </Filter> <Filter Name="Header Files" @@ -1251,62 +1207,6 @@ </File> </Filter> </Filter> - <Filter - Name="Demos" - > - <Filter - Name="OpenGL" - > - <File - RelativePath="..\..\bullet\Demos\OpenGL\BMF_Api.h" - > - </File> - <File - RelativePath="..\..\bullet\Demos\OpenGL\BMF_BitmapFont.h" - > - </File> - <File - RelativePath="..\..\bullet\Demos\OpenGL\BMF_FontData.h" - > - </File> - <File - RelativePath="..\..\bullet\Demos\OpenGL\BMF_Fonts.h" - > - </File> - <File - RelativePath="..\..\bullet\Demos\OpenGL\BMF_Settings.h" - > - </File> - <File - RelativePath="..\..\bullet\Demos\OpenGL\DebugCastResult.h" - > - </File> - <File - RelativePath="..\..\bullet\Demos\OpenGL\DemoApplication.h" - > - </File> - <File - RelativePath="..\..\bullet\Demos\OpenGL\GL_ShapeDrawer.h" - > - </File> - <File - RelativePath="..\..\bullet\Demos\OpenGL\GL_Simplex1to4.h" - > - </File> - <File - RelativePath="..\..\bullet\Demos\OpenGL\GLDebugDrawer.h" - > - </File> - <File - RelativePath="..\..\bullet\Demos\OpenGL\GlutStuff.h" - > - </File> - <File - RelativePath="..\..\bullet\Demos\OpenGL\RenderTexture.h" - > - </File> - </Filter> - </Filter> </Filter> <Filter Name="Resource Files" Modified: main/trunk/src/ide/vc9/supertuxkart.vcproj =================================================================== --- main/trunk/src/ide/vc9/supertuxkart.vcproj 2010-02-22 00:46:04 UTC (rev 4793) +++ main/trunk/src/ide/vc9/supertuxkart.vcproj 2010-02-22 12:02:13 UTC (rev 4794) @@ -641,6 +641,10 @@ > </File> <File + RelativePath="..\..\physics\irr_debug_drawer.cpp" + > + </File> + <File RelativePath="..\..\physics\physical_object.cpp" > </File> @@ -1005,6 +1009,10 @@ > </File> <File + RelativePath="..\..\states_screens\grand_prix_over.cpp" + > + </File> + <File RelativePath="..\..\states_screens\help_screen_1.cpp" > </File> @@ -1467,6 +1475,10 @@ > </File> <File + RelativePath="..\..\physics\irr_debug_drawer.hpp" + > + </File> + <File RelativePath="..\..\physics\kart_motion_state.hpp" > </File> @@ -1815,6 +1827,10 @@ > </File> <File + RelativePath="..\..\states_screens\grand_prix_over.hpp" + > + </File> + <File RelativePath="..\..\states_screens\help_screen_1.hpp" > </File> Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2010-02-22 00:46:04 UTC (rev 4793) +++ main/trunk/src/input/input_manager.cpp 2010-02-22 12:02:13 UTC (rev 4794) @@ -130,11 +130,14 @@ } break; case KEY_F11: - // FIXME: at this stage you can only switch back from debug view to normal - // view, if switching again you noly get a grey screen - some opengl settings - // are missing. if(value && control_is_pressed) + { UserConfigParams::m_bullet_debug = !UserConfigParams::m_bullet_debug; + if(UserConfigParams::m_bullet_debug) + world->getPhysics()->activateDebug(); + else + world->getPhysics()->deactivateDebug(); + } break; case KEY_F5: if (race_manager->getNumPlayers() ==1 ) Modified: main/trunk/src/karts/kart.cpp =================================================================== --- main/trunk/src/karts/kart.cpp 2010-02-22 00:46:04 UTC (rev 4793) +++ main/trunk/src/karts/kart.cpp 2010-02-22 12:02:13 UTC (rev 4794) @@ -23,8 +23,6 @@ #include <math.h> #include <iostream> -#include "bullet/Demos/OpenGL/GL_ShapeDrawer.h" - #include "audio/sound_manager.hpp" #include "audio/sfx_manager.hpp" #include "audio/sfx_base.hpp" @@ -815,29 +813,6 @@ m_controller->handleZipper(); } // handleZipper -//----------------------------------------------------------------------------- -void Kart::draw() -{ - float m[16]; - btTransform t=getTrans(); - t.getOpenGLMatrix(m); - - btVector3 wire_color(0.5f, 0.5f, 0.5f); - //RaceManager::getWorld()->getPhysics()->debugDraw(m, m_body->getCollisionShape(), - // wire_color); - btCylinderShapeX wheelShape( btVector3(0.1f, - m_kart_properties->getWheelRadius(), - m_kart_properties->getWheelRadius())); - btVector3 wheelColor(0,0,1); - for(int i=0; i<m_vehicle->getNumWheels(); i++) - { - m_vehicle->updateWheelTransform(i, true); - float m[16]; - m_vehicle->getWheelInfo(i).m_worldTransform.getOpenGLMatrix(m); - World::getWorld()->getPhysics()->debugDraw(m, &wheelShape, wheelColor); - } -} // draw - // ----------------------------------------------------------------------------- /** Returned an additional engine power boost when using nitro. * \param dt Time step size. Modified: main/trunk/src/karts/kart.hpp =================================================================== --- main/trunk/src/karts/kart.hpp 2010-02-22 00:46:04 UTC (rev 4793) +++ main/trunk/src/karts/kart.hpp 2010-02-22 12:02:13 UTC (rev 4794) @@ -329,7 +329,6 @@ btKart *getVehicle () const {return m_vehicle; } btUprightConstraint *getUprightConstraint() const {return m_uprightConstraint;} void createPhysics (); - void draw (); bool isInRest () const; //have to use this instead of moveable getVelocity to get velocity for bullet rigid body float getSpeed () const {return m_speed; } Modified: main/trunk/src/main.cpp =================================================================== --- main/trunk/src/main.cpp 2010-02-22 00:46:04 UTC (rev 4793) +++ main/trunk/src/main.cpp 2010-02-22 12:02:13 UTC (rev 4794) @@ -69,15 +69,6 @@ #include "tracks/track_manager.hpp" #include "utils/translation.hpp" -// Only needed for bullet debug! -#ifdef HAVE_GLUT -# ifdef __APPLE__ -# include <GLUT/glut.h> -# else -# include <GL/glut.h> -# endif -#endif - void cmdLineHelp (char* invocation) { fprintf ( stdout, @@ -254,12 +245,10 @@ { UserConfigParams::m_track_debug=1; } -#ifdef HAVE_GLUT else if(!strcmp(argv[i], "--bullet-debug")) { UserConfigParams::m_bullet_debug=1; } -#endif else if(!strcmp(argv[i], "--kartsize-debug")) { UserConfigParams::m_print_kart_sizes=true; @@ -441,7 +430,7 @@ else { printf("Profiling: %d seconds.\n", n); - ProfileWorld::setProfileModeTime(n); + ProfileWorld::setProfileModeTime((float)n); race_manager->setNumLaps(999999); // profile end depends on time } } @@ -572,10 +561,6 @@ int main(int argc, char *argv[] ) { try { -#ifdef HAVE_GLUT - // only needed for bullet debugging. - glutInit(&argc, argv); -#endif // Init the minimum managers so that user config exists, then // handle all command line options that do not need (or must // not have) other managers initialised: Added: main/trunk/src/physics/irr_debug_drawer.cpp =================================================================== --- main/trunk/src/physics/irr_debug_drawer.cpp (rev 0) +++ main/trunk/src/physics/irr_debug_drawer.cpp 2010-02-22 12:02:13 UTC (rev 4794) @@ -0,0 +1,71 @@ +// $Id: irr_debug_drawer.cpp 839 2006-10-24 00:01:56Z hiker $ +// +// SuperTuxKart - a fun racing game with go-kart +// Copyright (C) 2010 Joerg Henrichs +// +// 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. + +#include "physics/irr_debug_drawer.hpp" + +#include "modes/world.hpp" + +IrrDebugDrawer::IrrDebugDrawer() +{ + m_debug_mode = DBG_DrawAabb; +} // IrrDebugDrawer + +// ----------------------------------------------------------------------------- +/** Activates the debug view. It makes all karts invisible (in irrlicht), so + * that the bullet view can be seen. + */ +void IrrDebugDrawer::activate() +{ + World *world = World::getWorld(); + unsigned int num_karts = world->getNumKarts(); + for(unsigned int i=0; i<num_karts; i++) + { + Kart *kart = world->getKart(i); + if(kart->isEliminated()) continue; + kart->getNode()->setVisible(false); + } +} // activate +// ----------------------------------------------------------------------------- +/** Deactivates the bullet debug view, and makes all karts visible again. + */ +void IrrDebugDrawer::deactivate() +{ + World *world = World::getWorld(); + unsigned int num_karts = world->getNumKarts(); + for(unsigned int i=0; i<num_karts; i++) + { + Kart *kart = world->getKart(i); + if(kart->isEliminated()) continue; + kart->getNode()->setVisible(true); + } +} // deactivate +// ----------------------------------------------------------------------------- +void IrrDebugDrawer::drawLine(const btVector3& from, const btVector3& to, + const btVector3& color) +{ + Vec3 f(from); + Vec3 t(to); + video::SColor c(255, (int)(color.getX()*255), (int)(color.getY()*255), + (int)(color.getZ()*255) ); + irr_driver->getVideoDriver()->draw3DLine(f.toIrrVector(), + t.toIrrVector(), c); +} + +/* EOF */ + Added: main/trunk/src/physics/irr_debug_drawer.hpp =================================================================== --- main/trunk/src/physics/irr_debug_drawer.hpp (rev 0) +++ main/trunk/src/physics/irr_debug_drawer.hpp 2010-02-22 12:02:13 UTC (rev 4794) @@ -0,0 +1,59 @@ +// $Id: irr_debug_drawer.hpp 839 2006-10-24 00:01:56Z hiker $ +// +// SuperTuxKart - a fun racing game with go-kart +// Copyright (C) 2006 Joerg Henrichs +// +// 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_IRR_DEBUG_DRAWER_HPP +#define HEADER_IRR_DEBUG_DRAWER_HPP + +#include "irrlicht.h" +using namespace irr; + +#include "btBulletDynamicsCommon.h" + +#include "graphics/irr_driver.hpp" +#include "utils/vec3.hpp" + +class IrrDebugDrawer : public btIDebugDraw +{ + /** The drawing mode to use. */ + int m_debug_mode; + +public: + IrrDebugDrawer(); + void render(float dt); + /** Draws a line. */ + virtual void drawLine(const btVector3& from, const btVector3& to, + const btVector3& color); + ///optional debug methods + virtual void drawContactPoint(const btVector3& Point_on_b, + const btVector3& normal_on_b, + btScalar distance,int life_time, + const btVector3& color) {} + virtual void reportErrorWarning(const char* warningString) {} + virtual void draw3dText(const btVector3& location, + const char* textString) {} + virtual void setDebugMode(int debug_mode) { m_debug_mode = debug_mode; } + virtual int getDebugMode() const { return m_debug_mode; } + void activate(); + void deactivate(); + +}; // IrrDebugDrawer + +#endif +/* EOF */ + Modified: main/trunk/src/physics/physics.cpp =================================================================== --- main/trunk/src/physics/physics.cpp 2010-02-22 00:46:04 UTC (rev 4793) +++ main/trunk/src/physics/physics.cpp 2010-02-22 12:02:13 UTC (rev 4794) @@ -23,6 +23,7 @@ #include "network/race_state.hpp" #include "physics/btKart.hpp" #include "physics/btUprightConstraint.hpp" +#include "physics/irr_debug_drawer.hpp" #include "tracks/track.hpp" // ---------------------------------------------------------------------------- @@ -49,22 +50,15 @@ m_collision_conf); m_dynamics_world->setGravity(btVector3(0.0f, 0.0f, -World::getWorld()->getTrack()->getGravity())); -#ifdef HAVE_GLUT - if(UserConfigParams::m_bullet_debug) - { - m_debug_drawer = new GLDebugDrawer(); - m_debug_drawer->setDebugMode(btIDebugDraw::DBG_DrawWireframe); - m_dynamics_world->setDebugDrawer(m_debug_drawer); - } -#endif + m_debug_drawer = new IrrDebugDrawer(); + m_debug_drawer->setDebugMode(btIDebugDraw::DBG_DrawWireframe); + m_dynamics_world->setDebugDrawer(m_debug_drawer); } // init //----------------------------------------------------------------------------- Physics::~Physics() { -#ifdef HAVE_GLUT if(UserConfigParams::m_bullet_debug) delete m_debug_drawer; -#endif delete m_dynamics_world; delete m_axis_sweep; delete m_dispatcher; @@ -349,45 +343,22 @@ /** A debug draw function to show the track and all karts. */ void Physics::draw() { - int num_objects = m_dynamics_world->getNumCollisionObjects(); - for(int i=0; i<num_objects; i++) - { - btCollisionObject *obj = m_dynamics_world->getCollisionObjectArray()[i]; - btRigidBody* body = btRigidBody::upcast(obj); - if(!body) continue; - float m[16]; - btVector3 wireColor(1,0,0); - btDefaultMotionState *myMotion = (btDefaultMotionState*)body->getMotionState(); - if(myMotion) - { - myMotion->m_graphicsWorldTrans.getOpenGLMatrix(m); - // Karts need culling GL_FRONT (not sure why), otherwise they appear to - // rotate incorrectly due to incorrect culling - UserPointer *up = (UserPointer*)body->getUserPointer(); - if(up->is(UserPointer::UP_KART)) - glCullFace(GL_FRONT); - debugDraw(m, obj->getCollisionShape(), wireColor); - } - } // for i + video::SColor color(77,179,0,0); + video::SMaterial material; + material.Thickness = 2; + material.AmbientColor = color; + material.DiffuseColor = color; + material.EmissiveColor= color; + material.BackfaceCulling = false; + material.setFlag(video::EMF_LIGHTING, false); + irr_driver->getVideoDriver()->setMaterial(material); + irr_driver->getVideoDriver()->setTransform(video::ETS_WORLD, + core::IdentityMatrix); + m_dynamics_world->debugDrawWorld(); + return; } // draw // ----------------------------------------------------------------------------- -/** Helper function for Physics::draw(). It calls the shape drawer from - * bullet to render the actual object. - * \param m OpenGL matrix to apply. - * \param s Collision shape to drwa. - * \param color Colour to use. - */ -void Physics::debugDraw(float m[16], btCollisionShape *s, const btVector3 color) -{ -#ifdef HAVE_GLUT - m_shape_drawer.drawOpenGL(m, s, color, 0); - // btIDebugDraw::DBG_DrawWireframe); - // btIDebugDraw::DBG_DrawAabb); -#endif -} // debugDraw -// ----------------------------------------------------------------------------- - /* EOF */ Modified: main/trunk/src/physics/physics.hpp =================================================================== --- main/trunk/src/physics/physics.hpp 2010-02-22 00:46:04 UTC (rev 4793) +++ main/trunk/src/physics/physics.hpp 2010-02-22 12:02:13 UTC (rev 4794) @@ -24,9 +24,8 @@ #include <vector> #include "btBulletDynamicsCommon.h" -#include "bullet/Demos/OpenGL/GLDebugDrawer.h" -#include "bullet/Demos/OpenGL/GL_ShapeDrawer.h" +#include "Physics/irr_debug_drawer.hpp" #include "physics/user_pointer.hpp" class Vec3; @@ -83,10 +82,7 @@ }; // CollisionList btDynamicsWorld *m_dynamics_world; -#ifdef HAVE_GLUT - GLDebugDrawer *m_debug_drawer; - GL_ShapeDrawer m_shape_drawer; -#endif + IrrDebugDrawer *m_debug_drawer; btCollisionDispatcher *m_dispatcher; btBroadphaseInterface *m_axis_sweep; btDefaultCollisionConfiguration *m_collision_conf; @@ -106,6 +102,10 @@ btDynamicsWorld* getPhysicsWorld () const {return m_dynamics_world;} void debugDraw (float m[16], btCollisionShape *s, const btVector3 color); + /** Activates the debug drawer. */ + void activateDebug () {m_debug_drawer->activate(); } + /** Deactivates the debug drawer. */ + void deactivateDebug () {m_debug_drawer->deactivate(); } bool projectKartDownwards(const Kart *k); virtual btScalar solveGroup(btCollisionObject** bodies, int numBodies, btPersistentManifold** manifold,int numManifolds, Modified: main/trunk/src/states_screens/grand_prix_over.cpp =================================================================== --- main/trunk/src/states_screens/grand_prix_over.cpp 2010-02-22 00:46:04 UTC (rev 4793) +++ main/trunk/src/states_screens/grand_prix_over.cpp 2010-02-22 12:02:13 UTC (rev 4794) @@ -290,7 +290,7 @@ kart_main_node = irr_driver->addMesh(kartModel->getModel()); kart_main_node->setPosition( core::vector3df(m_kart_x[n], m_kart_y[n], m_kart_z[n]) ); - kart_main_node->setScale( core::vector3df(0.4f, 0.4, 0.4f) ); + kart_main_node->setScale( core::vector3df(0.4f, 0.4f, 0.4f) ); kart_main_node->updateAbsolutePosition(); for (int wheel=0; wheel<4; wheel++) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-02-22 19:01:06
|
Revision: 4799 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4799&view=rev Author: auria Date: 2010-02-22 19:01:00 +0000 (Mon, 22 Feb 2010) Log Message: ----------- Improved looks of GP end Modified Paths: -------------- main/trunk/data/models/License.txt main/trunk/data/models/village.b3d main/trunk/data/textures/License.txt main/trunk/data/textures/materials.xml main/trunk/src/states_screens/grand_prix_over.cpp Added Paths: ----------- main/trunk/data/textures/oakleaf_fall.png main/trunk/data/textures/pino.png main/trunk/data/textures/pino2.png Removed Paths: ------------- main/trunk/data/textures/oakleaf_fall.tga Modified: main/trunk/data/models/License.txt =================================================================== --- main/trunk/data/models/License.txt 2010-02-22 18:39:41 UTC (rev 4798) +++ main/trunk/data/models/License.txt 2010-02-22 19:01:00 UTC (rev 4799) @@ -1,23 +1,28 @@ * bowling.ac, plunger.ac, cake.ac, bomb.ac, anchor.ac created by MiniBjorn (c) 2008 - released under Creative Commons Attribution-Share Alike 3.0 [http://creativecommons.org/licenses/by-sa/3.0/] + released under Creative Commons Attribution-Share Alike 3.0 + [http://creativecommons.org/licenses/by-sa/3.0/] * bubblegum.ac, nitrotank-big.ac, nitrotank-small.ac, giftbox.ac created by MiniBjorn (c) 2008 - released under Creative Commons Attribution-Share Alike 3.0 [http://creativecommons.org/licenses/by-sa/3.0/] + released under Creative Commons Attribution-Share Alike 3.0 + [http://creativecommons.org/licenses/by-sa/3.0/] * banana.ac created by horace aka thomas oppl (to...@fh...) (c) 2008 - released under Creative Commons Attribution-Share Alike 3.0 [http://creativecommons.org/licenses/by-sa/3.0/] + released under Creative Commons Attribution-Share Alike 3.0 + [http://creativecommons.org/licenses/by-sa/3.0/] * chest* by MiniBjorn (c) 2010 - released under Creative Commons Attribution-Share Alike 3.0 [http://creativecommons.org/licenses/by-sa/3.0/] + released under Creative Commons Attribution-Share Alike 3.0 + [http://creativecommons.org/licenses/by-sa/3.0/] * village - released un CC-BY-SA 3.0 [http://creativecommons.org/licenses/by-sa/3.0/] - tree by Julius Krischan Makowka, released un CC-BY-SA 3.0 + released under CC-BY-SA 3.0 [http://creativecommons.org/licenses/by-sa/3.0/] + oak by Julius Krischan Makowka, released un CC-BY-SA 3.0 mushrooms by pfunked, with modifications by Marianne Gagnon, released under CC-BY-SA 3.0 + pinos by Moser Juan José, with minor modifications by Marianne Gagnon, released under CC-BY-SA 3.0 scene and finishing touches by Marianne Gagnon * shroom_color* textures by Julius Krischan Makowka, released un CC-BY-SA 3.0 Modified: main/trunk/data/models/village.b3d =================================================================== (Binary files differ) Modified: main/trunk/data/textures/License.txt =================================================================== --- main/trunk/data/textures/License.txt 2010-02-22 18:39:41 UTC (rev 4798) +++ main/trunk/data/textures/License.txt 2010-02-22 19:01:00 UTC (rev 4799) @@ -17,8 +17,11 @@ by Marianne Gagnon (Auria) and MiniBjorn * oakbark and oaklef - by Julius Krischan Makowka, released un CC-BY-SA 3.0 + by Julius Krischan Makowka, released under CC-BY-SA 3.0 +* pino and pino2 + by Moser Juan José, released under CC-BY-SA 3.0 + * earth, logs, rock, sand, sea, signs, water_light, notes by Marianne Gagnon (Auria) Modified: main/trunk/data/textures/materials.xml =================================================================== --- main/trunk/data/textures/materials.xml 2010-02-22 18:39:41 UTC (rev 4798) +++ main/trunk/data/textures/materials.xml 2010-02-22 19:01:00 UTC (rev 4799) @@ -14,7 +14,10 @@ <material name="stonewall.png" alpha="0.0" collide="N"/> <material name="pebbles.png" alpha="0.0" collide="N"/> <material name="egypt.png" alpha="0.0"/> - <material name="oakleaf_fall.tga" alpha="Y" collide="N" ignore="Y" /> + <material name="oakleaf_fall.png" alpha="Y" collide="N" ignore="Y" light="N" /> + <material name="pino.png" alpha="Y" collide="N" ignore="Y" /> + <material name="pino2.png" alpha="Y" collide="N" ignore="Y" /> + <material name="starparticle.png" clampU="Y" clampV="Y" alpha="Y" collide="N" ignore="Y" light="N"/> <material name="pyramidwall.png" alpha="0.0" collide="N"/> <material name="lava.png" alpha="0.0" light="N" reset="Y"/> Added: main/trunk/data/textures/oakleaf_fall.png =================================================================== (Binary files differ) Property changes on: main/trunk/data/textures/oakleaf_fall.png ___________________________________________________________________ Added: svn:mime-type + image/png Deleted: main/trunk/data/textures/oakleaf_fall.tga =================================================================== (Binary files differ) Added: main/trunk/data/textures/pino.png =================================================================== (Binary files differ) Property changes on: main/trunk/data/textures/pino.png ___________________________________________________________________ Added: svn:mime-type + image/png Added: main/trunk/data/textures/pino2.png =================================================================== (Binary files differ) Property changes on: main/trunk/data/textures/pino2.png ___________________________________________________________________ Added: svn:mime-type + image/png Modified: main/trunk/src/states_screens/grand_prix_over.cpp =================================================================== --- main/trunk/src/states_screens/grand_prix_over.cpp 2010-02-22 18:39:41 UTC (rev 4798) +++ main/trunk/src/states_screens/grand_prix_over.cpp 2010-02-22 19:01:00 UTC (rev 4799) @@ -113,9 +113,11 @@ sceneManager->setAmbientLight(video::SColor(255, 120, 120, 120)); const core::vector3df &sun_pos = core::vector3df( 0, 200, 100.0f ); - m_light = irr_driver->getSceneManager()->addLightSceneNode(NULL, sun_pos, video::SColorf(1.0f,1.0f,1.0f), 10000.0f /* radius */); + m_light = irr_driver->getSceneManager()->addLightSceneNode(NULL, sun_pos, + video::SColorf(1.0f,1.0f,1.0f), + 300.0f /* radius */); m_light->getLightData().DiffuseColor = irr::video::SColorf(1.0f, 1.0f, 1.0f, 1.0f); - m_light->getLightData().SpecularColor = irr::video::SColorf(1.0f, 1.0f, 1.0f, 1.0f); + m_light->getLightData().SpecularColor = irr::video::SColorf(1.0f, 0.0f, 0.0f, 0.0f); } // ------------------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-02-22 20:26:32
|
Revision: 4802 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4802&view=rev Author: auria Date: 2010-02-22 20:26:26 +0000 (Mon, 22 Feb 2010) Log Message: ----------- Some tweaks with alpha. I thought this'd fix Mr Ice Block floating eyes, but it's not the case *sigh* Modified Paths: -------------- main/trunk/data/textures/materials.xml main/trunk/src/graphics/material.cpp Modified: main/trunk/data/textures/materials.xml =================================================================== --- main/trunk/data/textures/materials.xml 2010-02-22 20:08:15 UTC (rev 4801) +++ main/trunk/data/textures/materials.xml 2010-02-22 20:26:26 UTC (rev 4802) @@ -14,7 +14,7 @@ <material name="stonewall.png" alpha="0.0" collide="N"/> <material name="pebbles.png" alpha="0.0" collide="N"/> <material name="egypt.png" alpha="0.0"/> - <material name="oakleaf_fall.png" alpha="Y" collide="N" ignore="Y" light="N" /> + <material name="oakleaf_fall.png" transparency="Y" collide="N" ignore="Y" light="N" /> <material name="pino.png" alpha="Y" collide="N" ignore="Y" /> <material name="pino2.png" alpha="Y" collide="N" ignore="Y" /> Modified: main/trunk/src/graphics/material.cpp =================================================================== --- main/trunk/src/graphics/material.cpp 2010-02-22 20:08:15 UTC (rev 4801) +++ main/trunk/src/graphics/material.cpp 2010-02-22 20:26:26 UTC (rev 4802) @@ -129,18 +129,27 @@ void Material::setMaterialProperties(video::SMaterial *m) const { if (m_alpha_testing) + { // Note: if EMT_TRANSPARENT_ALPHA_CHANNEL is used, you have to use // scene_manager->getParameters()->setAttribute( // scene::ALLOW_ZWRITE_ON_TRANSPARENT, true); and enable // updates of the Z buffer of the material. Since the _REF // approach is faster (and looks better imho), this is used for now. m->MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF; + } else if (m_alpha_blending) + { + m->ZWriteEnable = false; // for transluscent stuff, don't write to the Z buffer m->MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL; + } else if (m_sphere_map) + { m->MaterialType = video::EMT_SPHERE_MAP; + } else if (m_lightmap) + { m->MaterialType = video::EMT_LIGHTMAP; + } if (!m_lighting) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-02-23 01:00:27
|
Revision: 4810 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4810&view=rev Author: auria Date: 2010-02-23 01:00:21 +0000 (Tue, 23 Feb 2010) Log Message: ----------- Added a 'loading' screen, so that the game does not seem unresponsive when loading a big track Modified Paths: -------------- main/trunk/src/guiengine/engine.cpp main/trunk/src/guiengine/engine.hpp main/trunk/src/race/race_manager.cpp Added Paths: ----------- main/trunk/data/gui/loading.png Removed Paths: ------------- main/trunk/data/gui/main_challenges.png Copied: main/trunk/data/gui/loading.png (from rev 4805, main/trunk/data/gui/main_challenges.png) =================================================================== (Binary files differ) Deleted: main/trunk/data/gui/main_challenges.png =================================================================== (Binary files differ) Modified: main/trunk/src/guiengine/engine.cpp =================================================================== --- main/trunk/src/guiengine/engine.cpp 2010-02-23 00:09:09 UTC (rev 4809) +++ main/trunk/src/guiengine/engine.cpp 2010-02-23 01:00:21 UTC (rev 4810) @@ -292,6 +292,38 @@ } // render // ----------------------------------------------------------------------------- + +void renderLoading() +{ + g_skin->drawBgImage(); + ITexture* loading = irr_driver->getTexture( file_manager->getGUIDir() + "/loading.png" ); + + const int texture_w = loading->getSize().Width; + const int texture_h = loading->getSize().Height; + + core::dimension2d<u32> frame_size = GUIEngine::getDriver()->getCurrentRenderTargetSize(); + const int screen_w = frame_size.Width; + const int screen_h = frame_size.Height; + + const core::rect< s32 > dest_area = core::rect< s32 >(screen_w/2 - texture_w/2, + screen_h/2 - texture_h/2, + screen_w/2 + texture_w/2, + screen_h/2 + texture_h/2); + + const core::rect< s32 > source_area = core::rect< s32 >(0, 0, texture_w, texture_h); + + GUIEngine::getDriver()->draw2DImage( loading, dest_area, source_area, + 0 /* no clipping */, 0, true /* alpha */); + + + g_title_font->draw(_("Loading"), + core::rect< s32 >( 0, screen_h/2 + texture_h/2, screen_w, screen_h ), + SColor(255,255,255,255), + true/* center h */, false /* center v */ ); + +} // renderLoading + +// ----------------------------------------------------------------------------- Widget* getWidget(const char* name) { // if a modal dialog is shown, search within it too Modified: main/trunk/src/guiengine/engine.hpp =================================================================== --- main/trunk/src/guiengine/engine.hpp 2010-02-23 00:09:09 UTC (rev 4809) +++ main/trunk/src/guiengine/engine.hpp 2010-02-23 01:00:21 UTC (rev 4810) @@ -299,6 +299,7 @@ void reshowCurrentScreen(); void render(float dt); + void renderLoading(); void transmitEvent(Widget* widget, std::string& name, const int playerID); Modified: main/trunk/src/race/race_manager.cpp =================================================================== --- main/trunk/src/race/race_manager.cpp 2010-02-23 00:09:09 UTC (rev 4809) +++ main/trunk/src/race/race_manager.cpp 2010-02-23 01:00:21 UTC (rev 4810) @@ -207,6 +207,12 @@ */ void RaceManager::startNextRace() { + IrrlichtDevice* device = irr_driver->getDevice(); + GUIEngine::renderLoading(); + device->getVideoDriver()->endScene(); + device->getVideoDriver()->beginScene(true, true, video::SColor(255,100,101,140)); + + m_num_finished_karts = 0; m_num_finished_players = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-02-28 02:07:07
|
Revision: 4874 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4874&view=rev Author: auria Date: 2010-02-28 02:07:00 +0000 (Sun, 28 Feb 2010) Log Message: ----------- Started adding support for notifying the user that a feature was unlocked Modified Paths: -------------- main/trunk/data/karts/gnu/gnu.challenge main/trunk/src/states_screens/dialogs/race_over_dialog.cpp Modified: main/trunk/data/karts/gnu/gnu.challenge =================================================================== --- main/trunk/data/karts/gnu/gnu.challenge 2010-02-28 02:05:38 UTC (rev 4873) +++ main/trunk/data/karts/gnu/gnu.challenge 2010-02-28 02:07:00 UTC (rev 4874) @@ -4,13 +4,12 @@ id="snowmountain" name="Win a race on Snow Mountain" description="Win a 4 lap race on Snow Mountain against 4 'Racer' level AI kart." - depend-on="worldsend" unlock-kart="gnu Gnu" major="single" minor="quickrace" - track="snowmountain" + track="lighthouse" difficulty="hard" - laps="4" + laps="1" karts="4" position="1" /> Modified: main/trunk/src/states_screens/dialogs/race_over_dialog.cpp =================================================================== --- main/trunk/src/states_screens/dialogs/race_over_dialog.cpp 2010-02-28 02:05:38 UTC (rev 4873) +++ main/trunk/src/states_screens/dialogs/race_over_dialog.cpp 2010-02-28 02:07:00 UTC (rev 4874) @@ -219,8 +219,36 @@ } // end if not GP // ---- Buttons at the bottom - if (race_manager->getMajorMode() == RaceManager::MAJOR_MODE_SINGLE) + if (unlock_manager->getRecentlyUnlockedFeatures().size() > 0) { + LabelWidget* unlocked_label = new LabelWidget(); + unlocked_label->m_properties[PROP_ID] = "label"; + unlocked_label->x = 15; + unlocked_label->y = m_area.getHeight() - (button_h + margin_between_buttons)*2; + unlocked_label->w = m_area.getWidth() - 30; + unlocked_label->h = button_h; + unlocked_label->m_text = _("You unlocked a new feature!"); + unlocked_label->setParent(m_irrlicht_window); + m_children.push_back(unlocked_label); + unlocked_label->add(); + + ButtonWidget* whats_next_btn = new ButtonWidget(); + whats_next_btn->x = 15; + whats_next_btn->y = m_area.getHeight() - (button_h + margin_between_buttons); + whats_next_btn->w = m_area.getWidth() - 30; + whats_next_btn->h = button_h; + whats_next_btn->setParent(m_irrlicht_window); + + whats_next_btn->m_text = _("See unlocked features"); + whats_next_btn->m_properties[PROP_ID] = "seeunlocked"; + + m_children.push_back(whats_next_btn); + whats_next_btn->add(); + + whats_next_btn->setFocusForPlayer( GUI_PLAYER_ID ); + } + else if (race_manager->getMajorMode() == RaceManager::MAJOR_MODE_SINGLE) + { ButtonWidget* new_race_btn = new ButtonWidget(); new_race_btn->m_properties[PROP_ID] = "newracebtn"; new_race_btn->x = 15; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-03-01 21:50:57
|
Revision: 4891 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4891&view=rev Author: auria Date: 2010-03-01 21:50:51 +0000 (Mon, 01 Mar 2010) Log Message: ----------- Fixed feature unlocked 'continue' button when playing from a GP Modified Paths: -------------- main/trunk/data/gui/feature_unlocked.stkgui main/trunk/src/states_screens/feature_unlocked.cpp Modified: main/trunk/data/gui/feature_unlocked.stkgui =================================================================== --- main/trunk/data/gui/feature_unlocked.stkgui 2010-03-01 20:53:40 UTC (rev 4890) +++ main/trunk/data/gui/feature_unlocked.stkgui 2010-03-01 21:50:51 UTC (rev 4891) @@ -1,5 +1,5 @@ <stkgui> - <button id="back" x="20" y="-40" width="250" height="35" align="left" text="Continue"/> + <button id="continue" x="20" y="-40" width="250" height="35" align="left" text="Continue"/> </stkgui> \ No newline at end of file Modified: main/trunk/src/states_screens/feature_unlocked.cpp =================================================================== --- main/trunk/src/states_screens/feature_unlocked.cpp 2010-03-01 20:53:40 UTC (rev 4890) +++ main/trunk/src/states_screens/feature_unlocked.cpp 2010-03-01 21:50:51 UTC (rev 4891) @@ -154,9 +154,6 @@ irr_driver->removeNode(m_root_gift_node); m_root_gift_node = NULL; } - - // this is called maybe in the middle of a GP, so ask the race manager to continue - race_manager->next(); } // ------------------------------------------------------------------------------------- @@ -264,7 +261,7 @@ if (race_manager->getMajorMode() == RaceManager::MAJOR_MODE_GRAND_PRIX) { // in GP mode, continue GP after viewing this screen (TODO: test) - World::getWorld()->unpause(); + StateManager::get()->popMenu(); race_manager->next(); } else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-03-01 22:18:22
|
Revision: 4892 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4892&view=rev Author: auria Date: 2010-03-01 22:18:13 +0000 (Mon, 01 Mar 2010) Log Message: ----------- Anisotropic filtering is now specified in materials.xml. Now we can have crisp textures wherever we want, without wasting time doing the calculations where not needed Modified Paths: -------------- main/trunk/data/textures/materials.xml main/trunk/data/tracks/beach/materials.xml main/trunk/data/tracks/canyon/materials.xml main/trunk/data/tracks/mines/materials.xml main/trunk/data/tracks/snowmountain/materials.xml main/trunk/src/graphics/material.cpp main/trunk/src/graphics/material.hpp Removed Paths: ------------- main/trunk/data/textures/materials.dat main/trunk/data/tracks/mines/city_checker.png main/trunk/data/tracks/stadium/city_concrete.png Deleted: main/trunk/data/textures/materials.dat =================================================================== --- main/trunk/data/textures/materials.dat 2010-03-01 21:50:51 UTC (rev 4891) +++ main/trunk/data/textures/materials.dat 2010-03-01 22:18:13 UTC (rev 4892) @@ -1,199 +0,0 @@ -# -# In this files materials with special properties are listed, along with -# the values for these properties. Only materials that are in some way -# special need to be listed here, the others will use the default values. -# -# Here is an explanation of what each property do and their default values, -# the actual properties are at the bottom of the file: -# -# UVClamp -# ----- -# Clamp texture border instead of repeating the texture. This has -# two values, one for the X-axis and another for the Y-axis, which can be -# Y or N (yes or no). -# -# To understand what clamping is, hre is an example with my poor ASCII art: -# -# ox -# Suppose you have a 2x2 texture which represented here by xo , where o is a -# black square and x is a white square. If you place the texture in a 4x4 -# grid, you would think you get this: -# -# .... -# .... -# ox.. -# xo.. -# -# Where the . are empty spaces. -# -# However, what really happens is that by default the texture repeats itself: -# -# oxox -# xoxo -# oxox -# xoxo -# -# But if you clamp the texture on both the X and the Y axis you get this: -# -# oxoo -# oxoo -# oxxx -# xooo -# -# So only the borders repeat in the X and Y direction, not the whole texture. -# -# -# Translucency -# ------------ -# Use the alpha value of the texture to produce translucent areas. Can be -# Y or N, default is N. -# -# -# Alpha reference -# --------------- -# This value is used for the alpha test, which is to compare all the -# alpha values of the pixels of the texture against the alpha refence, and -# if the test succeeds, the pixel is not drawn. Values go from 0.0 to 1.0. -# 1.0 that no pixels are drawn, 0.0 means that only pixels completely -# translucent are not drawn. Default is 0.1. -# -# -# Lighting -# -------- -# Let lights affect how dark or light a texture is. Can be Y or N, default is -# Y. -# -# -# Sphere map -# ---------- -# Place the texture as if it is on top of a reflective sphere. This is useful -# on shiny metal objects, for example the coins. Can be Y or N, default is -# N. -# -# -# Friction -# -------- -# How much friction there is between an object with this texture and the -# wheels of the kart. Obviously, is only useful if a kart will ever be -# standing on top of an object with this texture. The smaller this value is, -# the more slippery a surface is. Values should go from 1.0 to 0.1, where -# 1.0 is the friction of the road. Default is 1.0 . -# -# At the moment, friction only limits the speed and acceleration of the karts. -# -# -# -# Ignore -# ------ -# Don't crash with a surface that has this texture applied. Values can be Y or -# N. Default is N. -# -# -# Zipper -# ------ -# Karts get a speed boost when they touch a surface with this texture. Values -# can be Y or N. Default is N. -# -# -# Resetter -# -------- -# When a kart touches this surface, it is rescued, useful for lava and others. -# Values can be Y or N. Default value is N. -# -# -# Collide -# ------- -# When you crash against a surface with this texture, the kart will not -# continue moving, instead it will stop the kart dead. Values can be Y or N, -# default value is Y. -# -# maxSpeed and slowdown-time -# -------------------------- -# These variables determine the maximum speed and a slowdown when driving on this -# terrain. The maximum speed is the fraction of the kart's maximum speed (so 1.0 -# is like driving on road - no change to maximum speed). The slowdown -# These two variables are optional, their default is 1.0 an - -# TextureName Clamp Trans Alpha Light SphMp Frict Ign Zip Rst Col mxSpd SldT -"clouds.rgb" N N N 0.0 N N 0.5 N N Y N -"sand.rgb" N N N 0.0 Y N 0.0000001 N N N N 0.4 4 -"sandgrass.rgb" N N N 0.0 Y N 0.00000015 N N N N 0.4 4 -"grass.rgb" N N N 0.0 Y N 0.0000002 N N N N 0.6 4 -"chrome.rgb" N N N 0.0 N Y 0.5 N N N N -"chrome2.rgb" N N N 0.0 N Y 0.5 N N N N -"railing.rgb" N Y Y 0.5 Y N 1.0 N N N N -"wood.rgb" N N N 0.0 Y N 0.0000003 N N N N -"concrete.rgb" N N N 0.0 Y N 0.0000003 N N N Y -"brick.rgb" N N N 0.0 Y N 1.0 N N N Y -"stonewall.rgb" N N N 0.0 Y N 1.0 N N N N -"pebbles.rgb" N N N 0.0 Y N 1.0 N N N N -"egypt.rgb" N N N 0.0 Y N 1.0 N N N Y -"pyramidwall.rgb" N N N 0.0 Y N 1.0 N N N N -"lava.rgb" N N N 0.0 N N 1.0 N N Y Y -"metalgrid.rgb" N N Y 0.3 Y N 0.0000003 N N N N -"fuzzy_sand.rgb" N N Y 0.0 N N 1.0 Y N N N -"roadway.rgb" Y N N 0.0 Y N 0.0000003 N N N N -"track.rgb" N N N 0.0 Y N 0.0000003 N N N N -"trackborder.rgb" N N N 0.0 N N 0.0000003 N N N N -"chess.rgb" N N N 0.0 Y N 0.0000003 N N N N -"tinytux.rgb" Y Y Y 0.8 N N 1.0 Y N N N -"butterfly.rgb" Y Y Y 0.8 N N 1.0 Y N N N -"track2.rgb" N N N 0.0 Y N 0.0000003 N N N N -"zipper_collect.rgb" N N N 0.0 N N 1.0 N Y N N -"zipper.rgb" N N N 0.0 N N 1.0 N Y N N - -# TextureName Clamp Trans Alpha Light SphMp Frict Ign Zip Rst Col -"banana.rgb" N N N 0.5 N N 1.0 N N N N -"bananawrap.rgb" Y Y Y 0.5 N N 1.0 N Y N N -"fuzzy.rgb" Y Y Y 0.2 N N 0.5 Y N N N -"generickartshadow.rgb" Y Y Y 0.0 N N 1.0 Y N N N -"smoke.rgb" N N Y 0.0 N N 1.0 Y N N N -"explode.rgb" Y Y Y 0.2 N N 1.0 Y N N N -"flames.rgb" N N N 0.9 N N 1.0 Y N N N -"nitro-particle.rgb" N N Y 0.0 N N 1.0 Y N N N -"magnet.rgb" Y Y Y 0.1 N N 1.0 Y N N N -"bzzt.rgb" N N Y 0.1 N N 1.0 Y N N N -"anchor-icon.rgb" Y Y Y 0.1 N N 1.0 Y N N N -"parachute.rgb" Y Y Y 0.1 N N 1.0 Y N N N -"speedback.rgb" Y Y Y 0.0 N N 1.0 Y N N N -"speedfore.rgb" Y Y Y 0.0 N N 1.0 Y N N N -"water_light.rgb" N N N 0.1 N N 1.0 N N Y N -"sea.rgb" N N N 0.0 N N 0.5 N N Y Y -"rock.rgb" N N N 0.0 N N 0.5 N N N N -"coniferous_tree.rgb" Y Y Y 0.5 N N 0.5 N N N N -"signs.rgb" N N Y 0.5 N N 0.5 N N N N -"greenice.rgb" N N N 0.0 N N 0.5 N N Y N - -# TextureName Clamp Trans Alpha Light SphMp Frict Ign Zip Rst Col mxSpd SldT -"snow.rgb" N N N 0.0 Y N 0.00000018 N N N N 0.4 4 -"ice.rgb" N N N 0.0 Y N 0.000000095 N N N N -"snowyrock.rgb" N N N 0.0 Y N 0.0000002 N N N N -"sand2.rgb" N N N 0.0 Y N 0.0000001 N N N N -"road_dirt.rgb" N N N 0.0 Y N 0.00000025 N N N N -"grass2.rgb" N N N 0.0 Y N 0.00000015 N N N N 0.6 4 -"dirt2sand.rgb" N N N 0.0 Y N 0.0000002 N N N N -"grass2dirt.rgb" N N N 0.0 Y N 0.0000002 N N N N 0.4 4 -"logs.rgb" N N N 0.0 Y N 0.0000002 N N N N -"stonetex.rgb" N N N 0.0 Y N 0.0000002 N N N N -"redwhite.rgb" N N N 0.0 Y N 0.0000002 N N N N -"dirt.rgb" N N N 0.0 Y N 0.00000025 N N N N -"city_asphalt_1.rgb" N N N 0.0 Y N 0.0000003 N N N N -"city_checker.rgb" N N N 0.0 Y N 0.0000003 N N N N -"tank-blue.rgb" N N N 0.0 Y Y 0.5 N N N N -"tank-green.rgb" N N N 0.0 Y Y 0.5 N N N N -"tank-cyan.rgb" N N N 0.0 Y Y 0.5 N N N N -"starparticle.rgb" N N Y 0.0 Y N 1.0 N N N N N -"gift-loop.rgb" N N N 0.0 Y Y 0.5 N N N N -"bowling-icon.rgb" N N Y 0.0 N N 1.0 N N N N -"bubblegum-icon.rgb" N N Y 0.0 N N 1.0 N N N N -"cake-icon.rgb" N N Y 0.0 N N 1.0 N N N N -"plunger-icon.rgb" N N Y 0.0 N N 1.0 N N N N -"plungerface.rgb" N N Y 0.0 N N 1.0 N N N N -"nitro-tank.rgb" N Y Y 0.5 Y N 1.0 N N N N - -"st_title_screen.rgb" Y Y N 1.0 N N 1.0 N N N Y -"menu_background.rgb" Y Y N 1.0 N N 1.0 N N N Y -"st_title_screen2.rgb" Y Y N 1.0 N N 1.0 N N N Y -"menu_background2.rgb" Y Y N 1.0 N N 1.0 N N N Y - -# EOF # Modified: main/trunk/data/textures/materials.xml =================================================================== --- main/trunk/data/textures/materials.xml 2010-03-01 21:50:51 UTC (rev 4891) +++ main/trunk/data/textures/materials.xml 2010-03-01 22:18:13 UTC (rev 4892) @@ -2,8 +2,8 @@ <materials> <material name="clouds.png" alpha="0.0" light="N" reset="Y" collide="N"/> <material name="sand.png" alpha="0.0" collide="N" maxSpeed="0.4" slowdownTime="4"/> - <material name="sandgrass.png" alpha="0.0" collide="N" maxSpeed="0.4" slowdownTime="4"/> - <material name="grass.png" alpha="0.0" collide="N" maxSpeed="0.6" slowdownTime="4"/> + <material name="sandgrass.png" alpha="0.0" collide="N" maxSpeed="0.4" slowdownTime="4" anisotropic="Y"/> + <material name="grass.png" alpha="0.0" collide="N" maxSpeed="0.6" slowdownTime="4" anisotropic="Y"/> <material name="chrome.png" alpha="0.0" light="N" sphere="Y" collide="N"/> <material name="chrome2.png" alpha="0.0" light="N" sphere="Y" collide="N"/> <material name="gold.png" alpha="0.0" light="Y" sphere="Y" collide="N"/> @@ -23,14 +23,13 @@ <material name="lava.png" alpha="0.0" light="N" reset="Y"/> <material name="metalgrid.png" transparency="Y" alpha="0.3" collide="N"/> <material name="fuzzy_sand.png" transparency="Y" alpha="0.0" light="N" ignore="Y" collide="N"/> - <material name="roadway.png" clampU="Y" alpha="0.0" collide="N"/> - <material name="track.png" alpha="0.0" collide="N"/> - <material name="track.png" alpha="0.0" collide="N"/> + <material name="roadway.png" clampU="Y" alpha="0.0" collide="N" anisotropic="Y"/> + <material name="track.png" anisotropic="Y"/> + <material name="track2.jpg" anisotropic="Y"/> <material name="trackborder.png" alpha="0.0" light="N" collide="N"/> <material name="chess.png" alpha="0.0" collide="N"/> <material name="tinytux.png" clampU="Y" clampV="Y" transparency="Y" alpha="0.8" light="N" ignore="Y" collide="N"/> <material name="butterfly.png" clampU="Y" clampV="Y" transparency="Y" alpha="0.8" light="N" ignore="Y" collide="N"/> - <material name="track2.png" alpha="0.0" collide="N"/> <material name="zipper_collect.png" alpha="0.0" light="N" zipper="Y" collide="N"/> <material name="zipper.png" alpha="0.0" light="N" zipper="Y" collide="N"/> <material name="banana.png" alpha="0.5" collide="N"/> @@ -58,15 +57,15 @@ <material name="ice.png" alpha="0.0" collide="N"/> <material name="snowyrock.png" alpha="0.0" collide="N"/> <material name="sand2.png" alpha="0.0" collide="N"/> - <material name="road_dirt.png" alpha="0.0" collide="N"/> - <material name="grass2.png" alpha="0.0" collide="N" maxSpeed="0.6" slowdownTime="4"/> - <material name="dirt2sand.png" alpha="0.0" collide="N"/> - <material name="grass2dirt.png" alpha="0.0" collide="N" maxSpeed="0.4" slowdownTime="4" clampU="Y" clampV="N"/> + <material name="road_dirt.png" alpha="0.0" collide="N" anisotropic="Y" /> + <material name="grass2.png" alpha="0.0" collide="N" maxSpeed="0.6" slowdownTime="4" anisotropic="Y"/> + <material name="dirt2sand.png" alpha="0.0" collide="N" anisotropic="Y"/> + <material name="grass2dirt.png" alpha="0.0" collide="N" maxSpeed="0.4" slowdownTime="4" clampU="Y" clampV="N" anisotropic="Y" /> <material name="logs.png" alpha="0.0" collide="N"/> <material name="stonetex.png" alpha="0.0" collide="N"/> <material name="redwhite.png" alpha="0.0" collide="N"/> <material name="dirt.png" alpha="0.0" collide="N"/> - <material name="city_asphalt_1.png" alpha="0.0" collide="N"/> + <material name="city_asphalt_1.png" alpha="0.0" collide="N" anisotropic="Y"/> <material name="city_checker.png" alpha="0.0" collide="N"/> <material name="nitro-tank.png" clampV="Y" transparency="Y" alpha="0.5" collide="N"/> <material name="tank-blue.png" alpha="0.0" sphere="Y" collide="N"/> Modified: main/trunk/data/tracks/beach/materials.xml =================================================================== --- main/trunk/data/tracks/beach/materials.xml 2010-03-01 21:50:51 UTC (rev 4891) +++ main/trunk/data/tracks/beach/materials.xml 2010-03-01 22:18:13 UTC (rev 4892) @@ -5,7 +5,7 @@ <material name="sand.jpg" collide="N" max-speed="0.4" slowdown="0.4"/> <material name="sandgrass.jpg" collide="N" max-speed="0.4" slowdown="0.4"/> <material name="stonetex.jpg" collide="N"/> - <material name="track.jpg" collide="N"/> + <material name="track.jpg" anisotropic="Y" collide="N"/> <material name="trackborder.jpg" light="N" collide="N"/> <material name="water_light.jpg" light="N" reset="Y" collide="N"/> <material name="waterfall.png" alpha="Y"/> Modified: main/trunk/data/tracks/canyon/materials.xml =================================================================== --- main/trunk/data/tracks/canyon/materials.xml 2010-03-01 21:50:51 UTC (rev 4891) +++ main/trunk/data/tracks/canyon/materials.xml 2010-03-01 22:18:13 UTC (rev 4892) @@ -1,15 +1,15 @@ <?xml version="1.0"?> <materials> -<material name="chess.jpg" collide="N"/> + <material name="chess.jpg" collide="N"/> <material name="canyon_sky_1.png" alpha="N" light="N" /> <material name="canyon_sky_2.png" alpha="N" light="N" /> <material name="canyon_sky_3.png" alpha="N" light="N" /> <material name="canyon_sky_4.png" alpha="N" light="N" /> <material name="canyon_sky_5.png" alpha="N" light="N" /> <material name="canyon_water.png" alpha="N" light="N" reset="Y" /> - <material name="canyon_asphalt_blend_1.png" alpha="N" light="Y" /> - <material name="canyon_asphalt_blend_2.png" alpha="N" light="Y" /> + <material name="canyon_asphalt_blend_1.png" anisotropic="Y"/> + <material name="canyon_asphalt_blend_2.png" anisotropic="Y" /> <material name="canyon_boards.png" alpha="N" light="Y" /> - <material name="canyon_dirt_road.png" alpha="N" light="Y" /> - <material name="canyon_ground.png" alpha="N" light="Y" /> + <material name="canyon_dirt_road.png" anisotropic="Y" /> + <material name="canyon_ground.png" anisotropic="Y" /> </materials> Deleted: main/trunk/data/tracks/mines/city_checker.png =================================================================== (Binary files differ) Modified: main/trunk/data/tracks/mines/materials.xml =================================================================== --- main/trunk/data/tracks/mines/materials.xml 2010-03-01 21:50:51 UTC (rev 4891) +++ main/trunk/data/tracks/mines/materials.xml 2010-03-01 22:18:13 UTC (rev 4892) @@ -1,6 +1,11 @@ <?xml version="1.0"?> <materials> - <material name="clip.png" transparency="y"/> <material name="mine_water_alpha.png" alpha="y"/> - <material name="mine_water_reset.png" alpha="y" reset="y"/> <material name="fence_chain.png" transparency="y"/> - <material name="candle.png" alpha="y"/> - \ No newline at end of file + <material name="clip.png" transparency="y"/> + <material name="mine_water_alpha.png" alpha="y"/> + <material name="mine_water_reset.png" alpha="y" reset="y"/> + <material name="fence_chain.png" transparency="y"/> + <material name="candle.png" alpha="y"/> + + <material name="mine_road.jpg" anisotropic="Y"/> + +</materials> \ No newline at end of file Modified: main/trunk/data/tracks/snowmountain/materials.xml =================================================================== --- main/trunk/data/tracks/snowmountain/materials.xml 2010-03-01 21:50:51 UTC (rev 4891) +++ main/trunk/data/tracks/snowmountain/materials.xml 2010-03-01 22:18:13 UTC (rev 4892) @@ -2,4 +2,8 @@ <materials> <material name="concrete.png" reset="Y" /> <material name="water_light.png" reset="Y" /> + + <material name="roadway2.png" anisotropic="Y" /> + <material name="roadwayborder.png" anisotropic="Y" /> + </materials> \ No newline at end of file Deleted: main/trunk/data/tracks/stadium/city_concrete.png =================================================================== (Binary files differ) Modified: main/trunk/src/graphics/material.cpp =================================================================== --- main/trunk/src/graphics/material.cpp 2010-03-01 21:50:51 UTC (rev 4891) +++ main/trunk/src/graphics/material.cpp 2010-03-01 22:18:13 UTC (rev 4892) @@ -60,6 +60,7 @@ node->get("reset", &m_resetter ); node->get("max-speed", &m_max_speed_fraction); node->get("slowdown", &m_slowdown ); + node->get("anisotropic", &m_anisotropic ); std::string s(""); node->get("graphical-effect", &s ); if(s=="water") @@ -102,6 +103,7 @@ m_lightmap = false; m_alpha_blending = false; m_lighting = true; + m_anisotropic = false; m_sphere_map = false; m_friction = 1.0f; m_ignore = false; @@ -159,8 +161,10 @@ m->SpecularColor = video::SColor(255, 255, 255, 255); } - //FIXME: only set on textures viewed at oblique angles, to avoid slowing down the game with this everywhere - m->setFlag(video::EMF_ANISOTROPIC_FILTER, true); + if (m_anisotropic) + { + m->setFlag(video::EMF_ANISOTROPIC_FILTER, true); + } #if (IRRLICHT_VERSION_MAJOR == 1) && (IRRLICHT_VERSION_MINOR >= 7) Modified: main/trunk/src/graphics/material.hpp =================================================================== --- main/trunk/src/graphics/material.hpp 2010-03-01 21:50:51 UTC (rev 4891) +++ main/trunk/src/graphics/material.hpp 2010-03-01 22:18:13 UTC (rev 4892) @@ -46,6 +46,10 @@ bool m_sphere_map; bool m_alpha_testing; bool m_alpha_blending; + + /** Whether to use anisotropic filtering for this texture */ + bool m_anisotropic; + /** True if lightmapping is enabled for this material. */ bool m_lightmap; float m_friction; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-03-02 01:25:35
|
Revision: 4896 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4896&view=rev Author: auria Date: 2010-03-02 01:25:29 +0000 (Tue, 02 Mar 2010) Log Message: ----------- Solving a challenge will now actually show the features you unlocked. Adapted the feature unlocked screen to be able to show many unlocked features at once. Show unlocked text in feature screen. Modified Paths: -------------- main/trunk/data/karts/gnu/gnu.challenge main/trunk/src/challenges/challenge.cpp main/trunk/src/challenges/challenge.hpp main/trunk/src/challenges/challenge_data.cpp main/trunk/src/graphics/irr_driver.cpp main/trunk/src/states_screens/dialogs/race_over_dialog.cpp main/trunk/src/states_screens/feature_unlocked.cpp main/trunk/src/states_screens/feature_unlocked.hpp Modified: main/trunk/data/karts/gnu/gnu.challenge =================================================================== --- main/trunk/data/karts/gnu/gnu.challenge 2010-03-02 01:21:32 UTC (rev 4895) +++ main/trunk/data/karts/gnu/gnu.challenge 2010-03-02 01:25:29 UTC (rev 4896) @@ -5,7 +5,7 @@ name="Win a race on Snow Mountain" description="Win a 4 lap race on Snow Mountain against 4 'Racer' level AI kart." depend-on="worldsend" - unlock-kart="gnu Gnu" + unlock-kart="gnu" major="single" minor="quickrace" track="snowmountain" Modified: main/trunk/src/challenges/challenge.cpp =================================================================== --- main/trunk/src/challenges/challenge.cpp 2010-03-02 01:21:32 UTC (rev 4895) +++ main/trunk/src/challenges/challenge.cpp 2010-03-02 01:25:29 UTC (rev 4896) @@ -31,6 +31,44 @@ #include "utils/translation.hpp" #include "utils/string_utils.hpp" +const irr::core::stringw UnlockableFeature::getUnlockedMessage() const +{ + switch (type) + { + case UNLOCK_TRACK: + { // {} avoids compiler warning + Track* track = track_manager->getTrack( name ); + return StringUtils::insertValues(_("New track '%s' now available"), + track->getName().c_str() ); + break; + } + case UNLOCK_MODE: + { + return StringUtils::insertValues(_("New game mode '%s' now available"), + user_name.c_str()); + } + case UNLOCK_GP: + { + const irr::core::stringw& gp_user_name = grand_prix_manager->getGrandPrix(name)->getName(); + return StringUtils::insertValues(_("New Grand Prix '%s' now available"), + gp_user_name.c_str()); + } + case UNLOCK_DIFFICULTY: + { + return StringUtils::insertValues(_("New difficulty\n'%s' now available"), + user_name.c_str()); + } + case UNLOCK_KART: + { + const KartProperties *kp=kart_properties_manager->getKart( name ); + return StringUtils::insertValues( _("New kart\n'%s' now available"), + kp->getName().c_str()); + } + default: + assert(false); + return L""; + } // switch +} //----------------------------------------------------------------------------- void Challenge::addUnlockTrackReward(const std::string &track_name) @@ -86,61 +124,6 @@ } //----------------------------------------------------------------------------- -const irr::core::stringw Challenge::getUnlockedMessage() const -{ - irr::core::stringw unlocked_message; - - const unsigned int amount = (unsigned int)m_feature.size(); - for(unsigned int n=0; n<amount; n++) - { - // add line break if we are showing multiple messages - if(n>0) unlocked_message+='\n'; - - irr::core::stringw message; - - // write message depending on feature type - switch(m_feature[n].type) - { - case UNLOCK_TRACK: - { // {} avoids compiler warning - Track* track = track_manager->getTrack( m_feature[n].name ); - message = StringUtils::insertValues( - _("New track '%s'\nnow available"), - track->getName().c_str() ); - break; - } - case UNLOCK_MODE: - message = StringUtils::insertValues( - _("New game mode\n'%s'\nnow available"), - m_feature[n].user_name.c_str()); - break; - case UNLOCK_GP: - { - const irr::core::stringw& gp_user_name = grand_prix_manager->getGrandPrix(m_feature[n].name)->getName(); - message = StringUtils::insertValues( - _("New Grand Prix '%s'\nnow available"), - gp_user_name.c_str()); - break; - } - case UNLOCK_DIFFICULTY: - message = StringUtils::insertValues( - _("New difficulty\n'%s'\nnow available"), - m_feature[n].user_name.c_str()); - break; - case UNLOCK_KART: - const KartProperties *kp=kart_properties_manager->getKart(m_feature[n].name ); - message = StringUtils::insertValues( - _("New kart\n'%s'\nnow available"), - kp->getName().c_str()); - break; - } // switch - unlocked_message += message; - } // for n - - return unlocked_message; -} - -//----------------------------------------------------------------------------- /** Loads the state for a challenge object (esp. m_state), and calls the * virtual function loadAdditionalInfo for additional information */ Modified: main/trunk/src/challenges/challenge.hpp =================================================================== --- main/trunk/src/challenges/challenge.hpp 2010-03-02 01:21:32 UTC (rev 4895) +++ main/trunk/src/challenges/challenge.hpp 2010-03-02 01:25:29 UTC (rev 4896) @@ -39,6 +39,8 @@ std::string name; // internal name irr::core::stringw user_name; // not all types of feature have one REWARD_TYPE type; + + const irr::core::stringw getUnlockedMessage() const; }; // A base class for all challenges @@ -70,7 +72,6 @@ void addUnlockKartReward(const std::string &internal_name, const irr::core::stringw &user_name); - const irr::core::stringw getUnlockedMessage() const; const std::vector<UnlockableFeature>& getFeatures() const { return m_feature; } void setChallengeDescription(const irr::core::stringw& d) Modified: main/trunk/src/challenges/challenge_data.cpp =================================================================== --- main/trunk/src/challenges/challenge_data.cpp 2010-03-02 01:21:32 UTC (rev 4895) +++ main/trunk/src/challenges/challenge_data.cpp 2010-03-02 01:25:29 UTC (rev 4896) @@ -227,7 +227,7 @@ if (prop == NULL) { std::cerr << "Challenge refers to kart " << attrib << - ", which is unknown. Ignoring challenge.\n"; + ", which is unknown. Ignoring reward.\n"; break; } irr::core::stringw user_name = prop->getName(); Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2010-03-02 01:21:32 UTC (rev 4895) +++ main/trunk/src/graphics/irr_driver.cpp 2010-03-02 01:25:29 UTC (rev 4896) @@ -524,23 +524,26 @@ { scene::SMeshBuffer *buffer = new scene::SMeshBuffer(); + const float w_2 = (float)w/2.0f; + const float h_2 = (float)h/2.0f; + video::S3DVertex v1; - v1.Pos = core::vector3df(0,0,0); + v1.Pos = core::vector3df(-w_2,-h_2,0); v1.Normal = core::vector3df(1/sqrt(2.0f), 1/sqrt(2.0f), 0); // I hope normals are ok... v1.TCoords = core::vector2d<f32>(0,1); video::S3DVertex v2; - v2.Pos = core::vector3df((float)w,0,0); + v2.Pos = core::vector3df(w_2,-h_2,0); v2.Normal = core::vector3df(1/sqrt(2.0f), 1/sqrt(2.0f), 0); v2.TCoords = core::vector2d<f32>(1,1); video::S3DVertex v3; - v3.Pos = core::vector3df((float)w,(float)h,0); + v3.Pos = core::vector3df(w_2,h_2,0); v3.Normal = core::vector3df(1/sqrt(2.0f), 1/sqrt(2.0f), 0); v3.TCoords = core::vector2d<f32>(1,0); video::S3DVertex v4; - v4.Pos = core::vector3df(0,(float)h,0); + v4.Pos = core::vector3df(-w_2,h_2,0); v4.Normal = core::vector3df(1/sqrt(2.0f), 1/sqrt(2.0f), 0); v4.TCoords = core::vector2d<f32>(0,0); Modified: main/trunk/src/states_screens/dialogs/race_over_dialog.cpp =================================================================== --- main/trunk/src/states_screens/dialogs/race_over_dialog.cpp 2010-03-02 01:21:32 UTC (rev 4895) +++ main/trunk/src/states_screens/dialogs/race_over_dialog.cpp 2010-03-02 01:25:29 UTC (rev 4896) @@ -376,34 +376,73 @@ unlock_manager->clearUnlocked(); FeatureUnlockedCutScene* scene = FeatureUnlockedCutScene::getInstance(); + + /* + scene->addUnlockedKart( const_cast<KartProperties*>(kart_properties_manager->getKart("gnu")), + _("Unlocked gnu kart") ); + scene->addUnlockedPicture( + irr_driver->getTexture(track_manager->getTrack("beach")->getScreenshotFile().c_str()), + _("Unlocked beach track")); + scene->addUnlockedPicture( + irr_driver->getTexture(track_manager->getTrack("lighthouse")->getScreenshotFile().c_str()), + _("Unlocked lighthouse track")); + //scene->addUnlockedPicture( irr_driver->getTexture(track_manager->getTrack("canyon")->getScreenshotFile().c_str()) ); + */ + + assert(unlocked.size() > 0); for (unsigned int n=0; n<unlocked.size(); n++) { - //FIXME: this is only a placeholder - const bool unlocked_kart = true; - const bool unlocked_track = false; - const bool unlocked_game_mode = false; + const std::vector<UnlockableFeature>& unlockedFeatures = unlocked[n]->getFeatures(); + assert(unlockedFeatures.size() > 0); + + for (unsigned int i=0; i<unlockedFeatures.size(); i++) + { + + switch (unlockedFeatures[i].type) + { + case UNLOCK_TRACK: + { + Track* track = track_manager->getTrack(unlockedFeatures[i].name); + assert(track != NULL); + const std::string sshot = track->getScreenshotFile(); + scene->addUnlockedPicture( irr_driver->getTexture(sshot.c_str()), + unlockedFeatures[i].getUnlockedMessage() ); + break; + } + case UNLOCK_GP: + { + //TODO + break; + } + case UNLOCK_MODE: + { + //TODO + break; + } + case UNLOCK_KART: + { + const KartProperties* kart = kart_properties_manager->getKart(unlockedFeatures[i].name); + assert(kart != NULL); + + // the passed kart will not be modified, that's why I allow myself to use const_cast + scene->addUnlockedKart( const_cast<KartProperties*>(kart), + unlockedFeatures[i].getUnlockedMessage() ); + break; + } + case UNLOCK_DIFFICULTY: + { + //TODO + break; + } + default: + { + assert(false); + } + } + + } // next feature + } // next challenge - //FIXME: update the feature unlocked scene to be able to handle when many features are unlocked - if (unlocked_kart) - { - // the passed kart will not be modified, that's why I allow myself to use const_cast - scene->setUnlockedKart( const_cast<KartProperties*>(kart_properties_manager->getKart("gnu")) ); - } - else if (unlocked_track) - { - scene->setUnlockedPicture( irr_driver->getTexture(track_manager->getTrack("beach")->getScreenshotFile().c_str()) ); - } - else if (unlocked_game_mode) - { - //TODO! - assert(false); - } - else - { - assert(false); - } - } - ModalDialog::dismiss(); // clear the race (FIXME: is this the right way to go?) Modified: main/trunk/src/states_screens/feature_unlocked.cpp =================================================================== --- main/trunk/src/states_screens/feature_unlocked.cpp 2010-03-02 01:21:32 UTC (rev 4895) +++ main/trunk/src/states_screens/feature_unlocked.cpp 2010-03-02 01:25:29 UTC (rev 4896) @@ -23,27 +23,23 @@ setNeeds3D(true); throttleFPS = false; - m_unlocked_kart = NULL; - m_unlocked_thing_picture = NULL; } // ------------------------------------------------------------------------------------- -void FeatureUnlockedCutScene::setUnlockedKart(KartProperties* unlocked_kart) +void FeatureUnlockedCutScene::addUnlockedKart(KartProperties* unlocked_kart, irr::core::stringw msg) { assert(unlocked_kart != NULL); - m_unlocked_kart = unlocked_kart; - m_unlocked_thing_picture = NULL; + m_unlocked_stuff.push_back( new UnlockedThing(unlocked_kart, msg) ); } // ------------------------------------------------------------------------------------- -void FeatureUnlockedCutScene::setUnlockedPicture(irr::video::ITexture* picture) +void FeatureUnlockedCutScene::addUnlockedPicture(irr::video::ITexture* picture, irr::core::stringw msg) { assert(picture != NULL); - m_unlocked_kart = NULL; - m_unlocked_thing_picture = picture; + m_unlocked_stuff.push_back( new UnlockedThing(picture, msg) ); } // ------------------------------------------------------------------------------------- @@ -85,48 +81,55 @@ m_light->getLightData().DiffuseColor = irr::video::SColorf(1.0f, 1.0f, 1.0f, 1.0f); m_light->getLightData().SpecularColor = irr::video::SColorf(1.0f, 1.0f, 1.0f, 1.0f); - if (m_unlocked_kart != NULL) + const int unlockedStuffCount = m_unlocked_stuff.size(); + + if (unlockedStuffCount == 0) std::cerr << "There is nothing in the unlock chest!!!\n"; + + for (int n=0; n<unlockedStuffCount; n++) { - KartModel* kartModel = m_unlocked_kart->getKartModel(); - - scene::ISceneNode* kart_node = irr_driver->getSceneManager()->addMeshSceneNode(kartModel->getModel()); + if (m_unlocked_stuff[n].m_unlocked_kart != NULL) + { + KartModel* kartModel = m_unlocked_stuff[n].m_unlocked_kart->getKartModel(); + + scene::ISceneNode* kart_node = irr_driver->getSceneManager()->addMeshSceneNode(kartModel->getModel()); - for (int n=0; n<4; n++) + for (int w=0; w<4; w++) + { + scene::ISceneNode* wheel = irr_driver->getSceneManager()->addMeshSceneNode(kartModel->getWheelModel(w), kart_node); + wheel->setPosition( kartModel->getWheelGraphicsPosition(w).toIrrVector() ); + wheel->updateAbsolutePosition(); + } + + m_unlocked_stuff[n].m_root_gift_node = kart_node; + } + else if (m_unlocked_stuff[n].m_picture != NULL) { - scene::ISceneNode* wheel = irr_driver->getSceneManager()->addMeshSceneNode(kartModel->getWheelModel(n), kart_node); - wheel->setPosition( kartModel->getWheelGraphicsPosition(n).toIrrVector() ); - wheel->updateAbsolutePosition(); - } - - m_root_gift_node = kart_node; - } - else if (m_unlocked_thing_picture != NULL) - { - video::SMaterial m; - m.BackfaceCulling = false; - m.setTexture(0, m_unlocked_thing_picture); - m.AmbientColor = SColor(255,255,255,255); - m.DiffuseColor = SColor(255,255,255,255); - m.SpecularColor = SColor(0,0,0,0); - m.GouraudShading = false; - m.Shininess = 0; - //m.setFlag(video::EMF_TEXTURE_WRAP, false); - -#if (IRRLICHT_VERSION_MAJOR == 1) && (IRRLICHT_VERSION_MINOR >= 7) - m.TextureLayer[0].TextureWrapU = video::ETC_CLAMP_TO_EDGE; - m.TextureLayer[0].TextureWrapV = video::ETC_CLAMP_TO_EDGE; -#else - m.TextureLayer[0].TextureWrap = video::ETC_CLAMP_TO_EDGE; -#endif + video::SMaterial m; + m.BackfaceCulling = false; + m.setTexture(0, m_unlocked_stuff[n].m_picture); + m.AmbientColor = SColor(255,255,255,255); + m.DiffuseColor = SColor(255,255,255,255); + m.SpecularColor = SColor(0,0,0,0); + m.GouraudShading = false; + m.Shininess = 0; + //m.setFlag(video::EMF_TEXTURE_WRAP, false); + + #if (IRRLICHT_VERSION_MAJOR == 1) && (IRRLICHT_VERSION_MINOR >= 7) + m.TextureLayer[0].TextureWrapU = video::ETC_CLAMP_TO_EDGE; + m.TextureLayer[0].TextureWrapV = video::ETC_CLAMP_TO_EDGE; + #else + m.TextureLayer[0].TextureWrap = video::ETC_CLAMP_TO_EDGE; + #endif - scene::IMesh* mesh = irr_driver->createTexturedQuadMesh(&m, 1.0, 0.75); - m_root_gift_node = irr_driver->addMesh(mesh); + scene::IMesh* mesh = irr_driver->createTexturedQuadMesh(&m, 1.0, 0.75); + m_unlocked_stuff[n].m_root_gift_node = irr_driver->addMesh(mesh); + } + else + { + std::cerr << "Malformed unlocked goody!!!\n"; + } } - else - { - std::cerr << "There is nothing in the chest!!!\n"; - } } // ------------------------------------------------------------------------------------- @@ -149,11 +152,7 @@ irr_driver->removeNode(m_light); m_light = NULL; - if (m_root_gift_node != NULL) - { - irr_driver->removeNode(m_root_gift_node); - m_root_gift_node = NULL; - } + m_unlocked_stuff.clearAndDeleteAll(); } // ------------------------------------------------------------------------------------- @@ -197,24 +196,43 @@ const int GIFT_EXIT_FROM = (int)ANIM_TO; const int GIFT_EXIT_TO = GIFT_EXIT_FROM + 12; - if (m_global_time > GIFT_EXIT_FROM && m_global_time < GIFT_EXIT_TO && m_root_gift_node != NULL) + const int unlockedStuffCount = m_unlocked_stuff.size(); + + if (m_global_time > GIFT_EXIT_FROM && m_global_time < GIFT_EXIT_TO) { - core::vector3df pos = m_root_gift_node->getPosition(); - pos.Y = sin( (float)((m_global_time - GIFT_EXIT_FROM)*M_PI*1.2/GIFT_EXIT_TO) )*30.0f; - pos.X += 2*dt; - pos.Z += 5*dt; + + for (int n=0; n<unlockedStuffCount; n++) + { + if (m_unlocked_stuff[n].m_root_gift_node == NULL) continue; + + core::vector3df pos = m_unlocked_stuff[n].m_root_gift_node->getPosition(); + pos.Y = sin( (float)((m_global_time - GIFT_EXIT_FROM)*M_PI*1.2/GIFT_EXIT_TO) )*30.0f; + + // when there are more than 1 unlocked items, make sure they each have their own path when they move + if (unlockedStuffCount > 1) + { + if (n % 2 == 0) pos.X -= 2.2f*dt*float( int((n + 1)/2) ); + else pos.X += 2.2f*dt*float( int((n + 1)/2) ); + //std::cout << "Object " << n << " moving by " << (n % 2 == 0 ? -4.0f : 4.0f)*float( n/2 + 1 ) << std::endl; + } + else + { + pos.X += 2*dt; + } + + pos.Z += 5*dt; - m_root_gift_node->setPosition(pos); + m_unlocked_stuff[n].m_root_gift_node->setPosition(pos); + + core::vector3df scale = m_unlocked_stuff[n].m_root_gift_node->getScale(); + scale.X += 2*dt; + scale.Y += 2*dt; + scale.Z += 2*dt; + m_unlocked_stuff[n].m_root_gift_node->setScale(scale); + } - core::vector3df scale = m_root_gift_node->getScale(); - scale.X += 2*dt; - scale.Y += 2*dt; - scale.Z += 2*dt; - m_root_gift_node->setScale(scale); - - core::vector3df campos = m_camera->getPosition(); - campos.X += 5*dt; + campos.X += 2*dt; campos.Z += 5*dt; m_camera->setPosition(campos); @@ -226,9 +244,11 @@ sin((1.0f-m_key_angle)*M_PI/8 + M_PI/4)*70.0f) ); } - if (m_root_gift_node != NULL) + assert(m_unlocked_stuff.size() > 0); + if (m_unlocked_stuff[0].m_root_gift_node != NULL) { - m_camera->setTarget( m_root_gift_node->getPosition() + core::vector3df(0.0f, 10.0f, 0.0f) ); + m_camera->setTarget( m_unlocked_stuff[0].m_root_gift_node->getPosition() + + core::vector3df(0.0f, 10.0f, 0.0f) ); m_camera->updateAbsolutePosition(); } else @@ -241,12 +261,28 @@ static const int h = irr_driver->getFrameSize().Height; const irr::video::SColor color(255, 255, 255, 255); - static int test_y = 0; - GUIEngine::getTitleFont()->draw(_("Feature Unlocked"), - core::rect< s32 >( 0, test_y, w, h/10 ), + core::rect< s32 >( 0, 0, w, h/10 ), color, true/* center h */, true /* center v */ ); + + if (m_global_time > GIFT_EXIT_TO) + { + const irr::video::SColor color2(255, 255, 126, 21); + const int fontH = GUIEngine::getFontHeight(); + const int MARGIN = 10; + + int message_y = h - fontH*3 - MARGIN; + + for (int n=0; n<unlockedStuffCount; n++) + { + GUIEngine::getFont()->draw(m_unlocked_stuff[n].m_unlock_message, + core::rect< s32 >( 0, message_y, w, message_y + fontH ), + color2, + true /* center h */, true /* center v */ ); + message_y -= (fontH + MARGIN); + } + } } // ------------------------------------------------------------------------------------- Modified: main/trunk/src/states_screens/feature_unlocked.hpp =================================================================== --- main/trunk/src/states_screens/feature_unlocked.hpp 2010-03-02 01:21:32 UTC (rev 4895) +++ main/trunk/src/states_screens/feature_unlocked.hpp 2010-03-02 01:25:29 UTC (rev 4896) @@ -2,6 +2,7 @@ #define HEADER_FEATURE_UNLOCKED_HPP #include "guiengine/screen.hpp" +#include "utils/ptr_vector.hpp" namespace irr { namespace scene { class ISceneNode; class ICameraSceneNode; class ILightSceneNode; } } class KartProperties; @@ -13,12 +14,37 @@ FeatureUnlockedCutScene(); - /** Whichever of these is non-null decides whhat comes out of the chest */ - KartProperties* m_unlocked_kart; - irr::video::ITexture* m_unlocked_thing_picture; + /** Whichever of these is non-null decides what comes out of the chest */ + struct UnlockedThing + { + KartProperties* m_unlocked_kart; + irr::video::ITexture* m_picture; + + /** Contains whatever is in the chest */ + scene::ISceneNode* m_root_gift_node; + + irr::core::stringw m_unlock_message; + + UnlockedThing(KartProperties* kart, irr::core::stringw msg) + { + m_unlocked_kart = kart; + m_picture = NULL; + m_unlock_message = msg; + } + UnlockedThing(irr::video::ITexture* pict, irr::core::stringw msg) + { + m_unlocked_kart = NULL; + m_picture = pict; + m_unlock_message = msg; + } + ~UnlockedThing() + { + if (m_root_gift_node != NULL) irr_driver->removeNode(m_root_gift_node); + m_root_gift_node = NULL; + } + }; + ptr_vector<UnlockedThing, HOLD> m_unlocked_stuff; - /** Contains whatever is in the chest */ - scene::ISceneNode* m_root_gift_node; /** sky angle, 0-360 */ float m_sky_angle; @@ -51,10 +77,10 @@ void eventCallback(GUIEngine::Widget* widget, const std::string& name, const int playerID); /** Call before showing up the screen to make a kart come out of the chest */ - void setUnlockedKart(KartProperties* unlocked_kart); + void addUnlockedKart(KartProperties* unlocked_kart, irr::core::stringw msg); /** Call before showing up the screen to make a picture come out of the chest */ - void setUnlockedPicture(irr::video::ITexture* picture); + void addUnlockedPicture(irr::video::ITexture* picture, irr::core::stringw msg); /** override from base class to handle escape press */ virtual bool onEscapePressed(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-03-03 18:29:23
|
Revision: 4914 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4914&view=rev Author: auria Date: 2010-03-03 18:29:16 +0000 (Wed, 03 Mar 2010) Log Message: ----------- Implemented track group support Modified Paths: -------------- main/trunk/data/karts/gnu/gnu.challenge main/trunk/src/states_screens/tracks_screen.cpp main/trunk/src/states_screens/tracks_screen.hpp Modified: main/trunk/data/karts/gnu/gnu.challenge =================================================================== --- main/trunk/data/karts/gnu/gnu.challenge 2010-03-03 18:10:45 UTC (rev 4913) +++ main/trunk/data/karts/gnu/gnu.challenge 2010-03-03 18:29:16 UTC (rev 4914) @@ -4,13 +4,12 @@ id="snowmountain" name="Win a race on Snow Mountain" description="Win a 4 lap race on Snow Mountain against 4 'Racer' level AI kart." - depend-on="worldsend" unlock-kart="gnu" major="single" minor="quickrace" track="snowmountain" difficulty="hard" - laps="4" + laps="1" karts="4" position="1" /> Modified: main/trunk/src/states_screens/tracks_screen.cpp =================================================================== --- main/trunk/src/states_screens/tracks_screen.cpp 2010-03-03 18:10:45 UTC (rev 4913) +++ main/trunk/src/states_screens/tracks_screen.cpp 2010-03-03 18:29:16 UTC (rev 4914) @@ -137,6 +137,10 @@ assert(false); } } + else if (name == "trackgroups") + { + buildTrackList(); + } } @@ -200,49 +204,90 @@ } gps_widget->updateItemDisplay(); + buildTrackList(); + + // FIXME: don't hardcode player 0? + tracks_widget->setSelection(tracks_widget->getItems()[0].m_code_name, 0, true); +} + +// ----------------------------------------------------------------------------------------------- + +void TracksScreen::tearDown() +{ +} + +// ----------------------------------------------------------------------------------------------- + +void TracksScreen::buildTrackList() +{ + DynamicRibbonWidget* tracks_widget = this->getWidget<DynamicRibbonWidget>("tracks"); + assert( tracks_widget != NULL ); + + RibbonWidget* tabs = this->getWidget<RibbonWidget>("trackgroups"); + assert( tabs != NULL ); + // Reset track list everytime (accounts for locking changes, etc.) tracks_widget->clearItems(); + const std::string curr_group_name = tabs->getSelectionIDString(0); + // Build track list - - //FIXME: don't hardcode player 0? - const std::vector<int>& curr_group = track_manager->getTracksInGroup( tabs->getSelectionIDString(0) ); - const int trackAmount = curr_group.size(); - - for (int n=0; n<trackAmount; n++) + if (curr_group_name == ALL_TRACK_GROUPS_ID) { - Track* curr = track_manager->getTrack( curr_group[n] ); - if (curr->isArena()) continue; + const int trackAmount = track_manager->getNumberOfTracks(); - if (unlock_manager->isLocked(curr->getIdent())) + for (int n=0; n<trackAmount; n++) { - tracks_widget->addItem( _("Locked : solve active challenges to gain access to more!"), - "locked", curr->getScreenshotFile(), true, - IconButtonWidget::ICON_PATH_TYPE_ABSOLUTE); + Track* curr = track_manager->getTrack( n ); + if (curr->isArena()) continue; + + if (unlock_manager->isLocked(curr->getIdent())) + { + tracks_widget->addItem( _("Locked : solve active challenges to gain access to more!"), + "locked", curr->getScreenshotFile(), true, + IconButtonWidget::ICON_PATH_TYPE_ABSOLUTE); + } + else + { + tracks_widget->addItem( curr->getName(), curr->getIdent(), curr->getScreenshotFile(), + 0, IconButtonWidget::ICON_PATH_TYPE_ABSOLUTE ); + } } - else + + } + else + { + //FIXME: don't hardcode player 0? + const std::vector<int>& curr_group = track_manager->getTracksInGroup( curr_group_name ); + const int trackAmount = curr_group.size(); + + for (int n=0; n<trackAmount; n++) { - tracks_widget->addItem( curr->getName(), curr->getIdent(), curr->getScreenshotFile(), - 0, IconButtonWidget::ICON_PATH_TYPE_ABSOLUTE ); + Track* curr = track_manager->getTrack( curr_group[n] ); + if (curr->isArena()) continue; + + if (unlock_manager->isLocked(curr->getIdent())) + { + tracks_widget->addItem( _("Locked : solve active challenges to gain access to more!"), + "locked", curr->getScreenshotFile(), true, + IconButtonWidget::ICON_PATH_TYPE_ABSOLUTE); + } + else + { + tracks_widget->addItem( curr->getName(), curr->getIdent(), curr->getScreenshotFile(), + 0, IconButtonWidget::ICON_PATH_TYPE_ABSOLUTE ); + } } } + tracks_widget->addItem(_("Random Track"), "random_track", "/gui/track_random.png", 0, IconButtonWidget::ICON_PATH_TYPE_RELATIVE); - - tracks_widget->updateItemDisplay(); - // FIXME: don't hardcode player 0? - tracks_widget->setSelection(tracks_widget->getItems()[0].m_code_name, 0, true); + tracks_widget->updateItemDisplay(); } // ----------------------------------------------------------------------------------------------- -void TracksScreen::tearDown() -{ -} - -// ----------------------------------------------------------------------------------------------- - void TracksScreen::setFocusOnTrack(const std::string& trackName) { DynamicRibbonWidget* tracks_widget = this->getWidget<DynamicRibbonWidget>("tracks"); Modified: main/trunk/src/states_screens/tracks_screen.hpp =================================================================== --- main/trunk/src/states_screens/tracks_screen.hpp 2010-03-03 18:10:45 UTC (rev 4913) +++ main/trunk/src/states_screens/tracks_screen.hpp 2010-03-03 18:29:16 UTC (rev 4914) @@ -29,6 +29,9 @@ TracksScreen(); + /** adds the tracks from the current track group into the tracks ribbon */ + void buildTrackList(); + public: void eventCallback(GUIEngine::Widget* widget, const std::string& name, const int playerID); void init(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-03-05 23:51:51
|
Revision: 4940 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4940&view=rev Author: auria Date: 2010-03-05 23:51:44 +0000 (Fri, 05 Mar 2010) Log Message: ----------- Removed GP descriptions, they weren't useful in any way Modified Paths: -------------- main/trunk/data/grandprix/alltracks.grandprix main/trunk/data/grandprix/atworldsend.grandprix main/trunk/data/grandprix/penguinplayground.grandprix main/trunk/data/grandprix/snagdrive.grandprix main/trunk/data/grandprix/tothemoonandback.grandprix main/trunk/src/race/grand_prix_data.cpp main/trunk/src/race/grand_prix_data.hpp Modified: main/trunk/data/grandprix/alltracks.grandprix =================================================================== --- main/trunk/data/grandprix/alltracks.grandprix 2010-03-05 23:42:44 UTC (rev 4939) +++ main/trunk/data/grandprix/alltracks.grandprix 2010-03-05 23:51:44 UTC (rev 4940) @@ -1,5 +1,5 @@ -<supertuxkart_grand_prix name="All tracks" description="All tracks included in SuperTuxKart"> +<supertuxkart_grand_prix name="All tracks"> <track id="beach" laps="2" /> <track id="startrack" laps="3" /> Modified: main/trunk/data/grandprix/atworldsend.grandprix =================================================================== --- main/trunk/data/grandprix/atworldsend.grandprix 2010-03-05 23:42:44 UTC (rev 4939) +++ main/trunk/data/grandprix/atworldsend.grandprix 2010-03-05 23:51:44 UTC (rev 4940) @@ -1,5 +1,5 @@ -<supertuxkart_grand_prix name="At World's End" description="Last grand prix, longer and harder"> +<supertuxkart_grand_prix name="At World's End"> <track id="fortmagma" laps="3" /> <track id="canyon" laps="2" /> Modified: main/trunk/data/grandprix/penguinplayground.grandprix =================================================================== --- main/trunk/data/grandprix/penguinplayground.grandprix 2010-03-05 23:42:44 UTC (rev 4939) +++ main/trunk/data/grandprix/penguinplayground.grandprix 2010-03-05 23:51:44 UTC (rev 4940) @@ -1,5 +1,5 @@ -<supertuxkart_grand_prix name="Penguin Playground" description="First grand prix, easy to get started"> +<supertuxkart_grand_prix name="Penguin Playground"> <track id="sandtrack" laps="3" /> <track id="snowmountain" laps="3" /> Modified: main/trunk/data/grandprix/snagdrive.grandprix =================================================================== --- main/trunk/data/grandprix/snagdrive.grandprix 2010-03-05 23:42:44 UTC (rev 4939) +++ main/trunk/data/grandprix/snagdrive.grandprix 2010-03-05 23:51:44 UTC (rev 4940) @@ -1,5 +1,5 @@ -<supertuxkart_grand_prix name="Snag Drive" description="Third grand prix"> +<supertuxkart_grand_prix name="Snag Drive"> <track id="islandtrack" laps="2" /> <track id="tuxtollway" laps="2" /> Modified: main/trunk/data/grandprix/tothemoonandback.grandprix =================================================================== --- main/trunk/data/grandprix/tothemoonandback.grandprix 2010-03-05 23:42:44 UTC (rev 4939) +++ main/trunk/data/grandprix/tothemoonandback.grandprix 2010-03-05 23:51:44 UTC (rev 4940) @@ -1,5 +1,5 @@ -<supertuxkart_grand_prix name="To the Moon and Back" description="Second grand prix"> +<supertuxkart_grand_prix name="To the Moon and Back"> <track id="lighthouse" laps="4" /> <track id="skyline" laps="3" /> Modified: main/trunk/src/race/grand_prix_data.cpp =================================================================== --- main/trunk/src/race/grand_prix_data.cpp 2010-03-05 23:42:44 UTC (rev 4939) +++ main/trunk/src/race/grand_prix_data.cpp 2010-03-05 23:51:44 UTC (rev 4940) @@ -55,12 +55,14 @@ m_name = _(temp_name.c_str()); foundName = true; + /* std::string temp_desc; const int readDesc = root->get( "description", &temp_desc ); if (readDesc == 1 && temp_desc.size() > 0) { m_description = _(temp_desc.c_str()); } + */ // This used to be there, but I'm leaving it out since it seems it was unused // lisp->get("item", m_item_style); Modified: main/trunk/src/race/grand_prix_data.hpp =================================================================== --- main/trunk/src/race/grand_prix_data.hpp 2010-03-05 23:42:44 UTC (rev 4939) +++ main/trunk/src/race/grand_prix_data.hpp 2010-03-05 23:51:44 UTC (rev 4940) @@ -32,7 +32,9 @@ class GrandPrixData { irr::core::stringw m_name; //!< The name of the grand prix - might be translated! - irr::core::stringw m_description; //!< Description for this GP + + //irr::core::stringw m_description; //!< Description for this GP + std::string m_id; //!< Internal name of the grand prix, not translated std::string m_filename; //!< Original filename, only for error handling needed std::string m_item_style; //!< item style which overwrites the track default @@ -59,7 +61,7 @@ const irr::core::stringw& getName () const { return m_name; } /** @return the (potentially translated) user-visible description of the Grand Prix */ - const irr::core::stringw& getDescription () const { return m_description; } + //const irr::core::stringw& getDescription () const { return m_description; } /** @return the internale name identifier of the Grand Prix (not translated) */ const std::string& getId () const { return m_id; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-03-12 02:17:04
|
Revision: 4985 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4985&view=rev Author: hikerstk Date: 2010-03-12 02:16:11 +0000 (Fri, 12 Mar 2010) Log Message: ----------- Merged the switch_coordinate_system branch with trunk. This means that now all coordinate systems are y up, z forwards - including the file format. For now only one track has been ported, the rest will follow shortly. Modified Paths: -------------- main/trunk/data/karts/adiumy/kart.xml main/trunk/data/karts/elephpant/kart.xml main/trunk/data/karts/eviltux/kart.xml main/trunk/data/karts/gnu/kart.xml main/trunk/data/karts/gooey/kart.xml main/trunk/data/karts/hexley/kart.xml main/trunk/data/karts/mozilla/kart.xml main/trunk/data/karts/mriceblock/kart.xml main/trunk/data/karts/nolok/kart.xml main/trunk/data/karts/pidgin/kart.xml main/trunk/data/karts/puffy/kart.xml main/trunk/data/karts/stk_kart.py main/trunk/data/karts/tux/kart.xml main/trunk/data/karts/wilber/kart.xml main/trunk/data/stk_config.xml main/trunk/data/tracks/lighthouse/graph.xml main/trunk/data/tracks/lighthouse/quads.xml main/trunk/data/tracks/lighthouse/scene.xml main/trunk/data/tracks/lighthouse/track.xml main/trunk/data/tracks/stk_track.py main/trunk/src/bullet/copy_bullet_files main/trunk/src/bullet/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp main/trunk/src/bullet/src/BulletDynamics/Vehicle/btRaycastVehicle.cpp main/trunk/src/config/user_config.hpp main/trunk/src/graphics/camera.cpp main/trunk/src/graphics/irr_driver.cpp main/trunk/src/graphics/mesh_tools.cpp main/trunk/src/graphics/slip_stream.cpp main/trunk/src/input/input_manager.cpp main/trunk/src/items/bowling.cpp main/trunk/src/items/cake.cpp main/trunk/src/items/flyable.cpp main/trunk/src/items/flyable.hpp main/trunk/src/items/item.cpp main/trunk/src/items/item.hpp main/trunk/src/items/plunger.cpp main/trunk/src/items/rubber_band.cpp main/trunk/src/karts/controller/default_ai_controller.cpp main/trunk/src/karts/controller/end_controller.cpp main/trunk/src/karts/controller/new_ai_controller.cpp main/trunk/src/karts/controller/player_controller.cpp main/trunk/src/karts/kart.cpp main/trunk/src/karts/kart.hpp main/trunk/src/karts/kart_model.cpp main/trunk/src/karts/kart_model.hpp main/trunk/src/karts/kart_properties.cpp main/trunk/src/karts/kart_properties.hpp main/trunk/src/karts/moveable.cpp main/trunk/src/karts/moveable.hpp main/trunk/src/main.cpp main/trunk/src/modes/linear_world.cpp main/trunk/src/modes/three_strikes_battle.cpp main/trunk/src/modes/world.cpp main/trunk/src/physics/btKart.cpp main/trunk/src/physics/btUprightConstraint.cpp main/trunk/src/physics/btUprightConstraint.hpp main/trunk/src/physics/irr_debug_drawer.cpp main/trunk/src/physics/irr_debug_drawer.hpp main/trunk/src/physics/physics.cpp main/trunk/src/physics/physics.hpp main/trunk/src/race/history.cpp main/trunk/src/states_screens/kart_selection.cpp main/trunk/src/tracks/check_line.cpp main/trunk/src/tracks/graph_node.cpp main/trunk/src/tracks/quad.cpp main/trunk/src/tracks/quad_graph.cpp main/trunk/src/tracks/terrain_info.cpp main/trunk/src/tracks/track.cpp main/trunk/src/utils/coord.hpp main/trunk/src/utils/vec3.cpp main/trunk/src/utils/vec3.hpp Property Changed: ---------------- main/trunk/ main/trunk/data/karts/tux/ main/trunk/data/tracks/tuxtollway/tuxtollway.drvl main/trunk/data/tracks/tuxtollway/tuxtollway.drvr main/trunk/data/tracks/tuxtollway/tuxtollway.loc main/trunk/data/tracks/tuxtollway/tuxtollway.track main/trunk/src/audio/music.hpp main/trunk/src/audio/music_information.cpp main/trunk/src/audio/music_information.hpp main/trunk/src/audio/music_ogg.cpp main/trunk/src/audio/music_ogg.hpp main/trunk/src/audio/sfx_base.hpp main/trunk/src/audio/sfx_openal.cpp main/trunk/src/audio/sfx_openal.hpp main/trunk/src/audio/sound_manager.cpp main/trunk/src/audio/sound_manager.hpp main/trunk/src/challenges/unlock_manager.cpp main/trunk/src/challenges/unlock_manager.hpp main/trunk/src/graphics/camera.cpp main/trunk/src/graphics/camera.hpp main/trunk/src/graphics/moving_texture.cpp main/trunk/src/graphics/moving_texture.hpp main/trunk/src/graphics/shadow.cpp main/trunk/src/graphics/shadow.hpp main/trunk/src/graphics/skid_marks.cpp main/trunk/src/graphics/skid_marks.hpp main/trunk/src/graphics/smoke.cpp main/trunk/src/graphics/smoke.hpp main/trunk/src/items/flyable.cpp main/trunk/src/items/flyable.hpp main/trunk/src/karts/auto_kart.hpp main/trunk/src/karts/controller/kart_control.hpp main/trunk/src/karts/controller/player_controller.cpp main/trunk/src/karts/controller/player_controller.hpp main/trunk/src/karts/kart.cpp main/trunk/src/karts/kart.hpp main/trunk/src/karts/kart_properties.cpp main/trunk/src/karts/kart_properties.hpp main/trunk/src/karts/kart_properties_manager.cpp main/trunk/src/karts/kart_properties_manager.hpp main/trunk/src/karts/moveable.cpp main/trunk/src/karts/moveable.hpp main/trunk/src/main_loop.cpp main/trunk/src/main_loop.hpp main/trunk/src/physics/btKart.cpp main/trunk/src/physics/btKart.hpp main/trunk/src/physics/btUprightConstraint.cpp main/trunk/src/physics/btUprightConstraint.hpp main/trunk/src/physics/physical_object.cpp main/trunk/src/physics/physical_object.hpp main/trunk/src/physics/physics.cpp main/trunk/src/physics/physics.hpp main/trunk/src/physics/triangle_mesh.cpp main/trunk/src/physics/triangle_mesh.hpp main/trunk/src/replay/replay_base.cpp main/trunk/src/replay/replay_base.hpp main/trunk/src/replay/replay_buffer_tpl.hpp main/trunk/src/replay/replay_buffers.cpp main/trunk/src/replay/replay_buffers.hpp main/trunk/src/replay/replay_player.cpp main/trunk/src/replay/replay_player.hpp main/trunk/src/replay/replay_recorder.cpp main/trunk/src/replay/replay_recorder.hpp main/trunk/src/tracks/terrain_info.cpp main/trunk/src/tracks/terrain_info.hpp main/trunk/src/tracks/track.cpp main/trunk/src/tracks/track.hpp main/trunk/src/tracks/track_manager.cpp main/trunk/src/tracks/track_manager.hpp main/trunk/src/utils/constants.hpp main/trunk/src/utils/coord.hpp main/trunk/src/utils/string_utils.cpp main/trunk/src/utils/string_utils.hpp main/trunk/src/utils/translation.cpp main/trunk/src/utils/translation.hpp main/trunk/src/utils/vec3.cpp main/trunk/src/utils/vec3.hpp Property changes on: main/trunk ___________________________________________________________________ Added: svn:mergeinfo + /main/branches/switch_coordinate_system:4813-4984 Modified: main/trunk/data/karts/adiumy/kart.xml =================================================================== --- main/trunk/data/karts/adiumy/kart.xml 2010-03-11 23:23:15 UTC (rev 4984) +++ main/trunk/data/karts/adiumy/kart.xml 2010-03-12 02:16:11 UTC (rev 4985) @@ -1,5 +1,5 @@ (tuxkart-kart - (version 1) + (version 2) (name "Adiumy") (model-file "adiumy.b3d") (icon-file "adiumyicon.png") @@ -10,19 +10,19 @@ (animation-straight 6) (animation-right 11) (wheel-front-right - (position 0.402310 0.161740 0.161885) + (position 0.402310 0.161885 0.161740) (model "wheel-front-right.b3d") ) (wheel-front-left - (position -0.399104 0.161703 0.161885) + (position -0.399104 0.161885 0.161703) (model "wheel-front-left.b3d") ) (wheel-rear-right - (position 0.027891 -0.378886 0.076657) + (position 0.027891 0.076657 -0.378886) (model "wheel-rear-right.b3d") ) (wheel-rear-left - (position -0.028688 -0.378886 0.076657) + (position -0.028688 0.076657 -0.378886) (model "wheel-rear-left.b3d") ) ) Modified: main/trunk/data/karts/elephpant/kart.xml =================================================================== --- main/trunk/data/karts/elephpant/kart.xml 2010-03-11 23:23:15 UTC (rev 4984) +++ main/trunk/data/karts/elephpant/kart.xml 2010-03-12 02:16:11 UTC (rev 4985) @@ -1,5 +1,5 @@ (tuxkart-kart - (version 1) + (version 2) (name "Elephpant") (model-file "kart.b3d") (icon-file "elephpanticon.png") @@ -12,19 +12,19 @@ (animation-start-winning 40) (animation-end-winning 104) (wheel-front-right - (position 0.253327 0.468561 0.102258) + (position 0.253327 0.102258 0.468561) (model "wheel-front-right.b3d") ) (wheel-front-left - (position -0.245315 0.469806 0.102874) + (position -0.245315 0.102874 0.469806) (model "wheel-front-left.b3d") ) (wheel-rear-right - (position 0.377162 -0.470212 0.139018) + (position 0.377162 0.139018 -0.470212) (model "wheel-rear-right.b3d") ) (wheel-rear-left - (position -0.372574 -0.470285 0.139018) + (position -0.372574 0.139018 -0.470285) (model "wheel-rear-left.b3d") ) ) Modified: main/trunk/data/karts/eviltux/kart.xml =================================================================== --- main/trunk/data/karts/eviltux/kart.xml 2010-03-11 23:23:15 UTC (rev 4984) +++ main/trunk/data/karts/eviltux/kart.xml 2010-03-12 02:16:11 UTC (rev 4985) @@ -2,7 +2,7 @@ (tuxkart-kart (name "Eviltux") - (version 1) + (version 2) (model-file "eviltux.b3d") (icon-file "eviltuxicon.png") (shadow-file "generickartshadow.png") @@ -10,19 +10,19 @@ (engine-sound "small") (rgb 0.3 0.1 0.6) (wheel-front-right - (position 0.290000 0.617000 0.123461) + (position 0.290000 0.123461 0.617000) (model "wheel-front-right.b3d") ) (wheel-front-left - (position -0.289815 0.616744 0.123513) + (position -0.289815 0.123513 0.616744) (model "wheel-front-left.b3d") ) (wheel-rear-right - (position 0.296641 -0.318647 0.143240) + (position 0.296641 0.143240 -0.318647) (model "wheel-rear-right.b3d") ) (wheel-rear-left - (position -0.297522 -0.318647 0.143240) + (position -0.297522 0.143240 -0.318647) (model "wheel-rear-left.b3d") ) Modified: main/trunk/data/karts/gnu/kart.xml =================================================================== --- main/trunk/data/karts/gnu/kart.xml 2010-03-11 23:23:15 UTC (rev 4984) +++ main/trunk/data/karts/gnu/kart.xml 2010-03-12 02:16:11 UTC (rev 4985) @@ -5,26 +5,26 @@ (model-file "gnu.b3d") (icon-file "gnuicon.png") (shadow-file "gnushadow.png") - (version 1) + (version 2) (groups "special") (has-skidmarks #f) (rgb 1.0 0.964705 0.0) (wheel-front-right - (position 0.275697 0.339242 0.112979) + (position 0.275697 0.112979 0.339242) (model "wheel-front-right.b3d") ) (wheel-front-left - (position -0.294220 0.337597 0.111252) + (position -0.294220 0.111252 0.337597) (model "wheel-front-left.b3d") ) (wheel-rear-right - (position 0.300863 -0.305902 0.112090) + (position 0.300863 0.112090 -0.305902) (model "wheel-rear-right.b3d") ) (wheel-rear-left - (position -0.315232 -0.307547 0.110255) + (position -0.315232 0.110255 -0.307547) (model "wheel-rear-left.b3d") ) Modified: main/trunk/data/karts/gooey/kart.xml =================================================================== --- main/trunk/data/karts/gooey/kart.xml 2010-03-11 23:23:15 UTC (rev 4984) +++ main/trunk/data/karts/gooey/kart.xml 2010-03-12 02:16:11 UTC (rev 4985) @@ -2,7 +2,7 @@ (tuxkart-kart (name "Gooey") - (version 1) + (version 2) (model-file "gooey.b3d") (icon-file "gooeyicon.png") (shadow-file "gooeyshadow.png") @@ -10,19 +10,19 @@ (engine-sound "large") (rgb 0.811764 0.015686 0.537254) (wheel-front-right - (position 0.295805 0.431543 0.134951) + (position 0.295805 0.134951 0.431543) (model "wheel-front-right.b3d") ) (wheel-front-left - (position -0.298656 0.431543 0.134951) + (position -0.298656 0.134951 0.431543) (model "wheel-front-left.b3d") ) (wheel-rear-right - (position 0.342563 -0.439540 0.164941) + (position 0.342563 0.164941 -0.439540) (model "wheel-rear-right.b3d") ) (wheel-rear-left - (position -0.345413 -0.439540 0.164941) + (position -0.345413 0.164941 -0.439540) (model "wheel-rear-left.b3d") ) Modified: main/trunk/data/karts/hexley/kart.xml =================================================================== --- main/trunk/data/karts/hexley/kart.xml 2010-03-11 23:23:15 UTC (rev 4984) +++ main/trunk/data/karts/hexley/kart.xml 2010-03-12 02:16:11 UTC (rev 4985) @@ -2,25 +2,25 @@ (tuxkart-kart (name "Hexley") - (version 1) + (version 2) (model-file "hexley.b3d") (icon-file "hexleyicon.png") (shadow-file "hexley2shadow.png") (rgb 0.780392 0.231372 0.231372) (wheel-front-right - (position 0.275697 0.339242 0.112979) + (position 0.275697 0.112979 0.339242) (model "wheel-front-right.b3d") ) (wheel-front-left - (position -0.294220 0.337597 0.111252) + (position -0.294220 0.111252 0.337597) (model "wheel-front-left.b3d") ) (wheel-rear-right - (position 0.300863 -0.305902 0.112090) + (position 0.300863 0.112090 -0.305902) (model "wheel-rear-right.b3d") ) (wheel-rear-left - (position -0.315232 -0.307547 0.110255) + (position -0.315232 0.110255 -0.307547) (model "wheel-rear-left.b3d") ) Modified: main/trunk/data/karts/mozilla/kart.xml =================================================================== --- main/trunk/data/karts/mozilla/kart.xml 2010-03-11 23:23:15 UTC (rev 4984) +++ main/trunk/data/karts/mozilla/kart.xml 2010-03-12 02:16:11 UTC (rev 4985) @@ -2,7 +2,7 @@ (tuxkart-kart (name "Mozilla") - (version 1) + (version 2) (model-file "mozilla.b3d") (icon-file "mozillaicon.png") (shadow-file "mozillashadow.png") @@ -10,19 +10,19 @@ (engine-sound "large") (rgb 1.0 0.77647 0.447058) (wheel-front-right - (position 0.237866 0.380136 0.114071) + (position 0.237866 0.114071 0.380136) (model "wheel-front-right.b3d") ) (wheel-front-left - (position -0.238088 0.380136 0.114071) + (position -0.238088 0.114071 0.380136) (model "wheel-front-left.b3d") ) (wheel-rear-right - (position 0.364589 -0.454568 0.188269) + (position 0.364589 0.188269 -0.454568) (model "wheel-rear-right.b3d") ) (wheel-rear-left - (position -0.364812 -0.454568 0.188269) + (position -0.364812 0.188269 -0.454568) (model "wheel-rear-left.b3d") ) Modified: main/trunk/data/karts/mriceblock/kart.xml =================================================================== --- main/trunk/data/karts/mriceblock/kart.xml 2010-03-11 23:23:15 UTC (rev 4984) +++ main/trunk/data/karts/mriceblock/kart.xml 2010-03-12 02:16:11 UTC (rev 4985) @@ -1,25 +1,25 @@ (tuxkart-kart (name "mr. iceblock") - (version 1) + (version 2) (model-file "mriceblock.b3d") (icon-file "mriceblockicon.png") (shadow-file "mriceblockshadow.png") (groups "standard") (rgb 0.000000 0.870588 1.000000) (wheel-front-right - (position 0.270099 0.447726 0.116442) + (position 0.270099 0.116442 0.447726) (model "wheel-front-right.b3d") ) (wheel-front-left - (position -0.284098 0.443071 0.139798) + (position -0.284098 0.139798 0.443071) (model "wheel-front-left.b3d") ) (wheel-rear-right - (position 0.301257 -0.352108 0.128311) + (position 0.301257 0.128311 -0.352108) (model "wheel-rear-right.b3d") ) (wheel-rear-left - (position -0.312922 -0.350504 0.131780) + (position -0.312922 0.131780 -0.350504) (model "wheel-rear-left.b3d") ) ) Modified: main/trunk/data/karts/nolok/kart.xml =================================================================== --- main/trunk/data/karts/nolok/kart.xml 2010-03-11 23:23:15 UTC (rev 4984) +++ main/trunk/data/karts/nolok/kart.xml 2010-03-12 02:16:11 UTC (rev 4985) @@ -1,7 +1,7 @@ ;; -*- mode: lisp -*- (tuxkart-kart - (version 1) + (version 2) (name "Nolok") (model-file "nolok.b3d") (icon-file "nolokicon.png") @@ -9,19 +9,19 @@ (groups "standard") (rgb 0.121568 0.172549 0.054901) (wheel-front-right - (position 0.192059 0.443191 0.113489) + (position 0.192059 0.113489 0.443191) (model "wheel-front-right.b3d") ) (wheel-front-left - (position -0.192059 0.443191 0.113489) + (position -0.192059 0.113489 0.443191) (model "wheel-front-left.b3d") ) (wheel-rear-right - (position 0.195518 -0.415114 0.145934) + (position 0.195518 0.145934 -0.415114) (model "wheel-rear-right.b3d") ) (wheel-rear-left - (position -0.195518 -0.415114 0.145934) + (position -0.195518 0.145934 -0.415114) (model "wheel-rear-left.b3d") ) ) Modified: main/trunk/data/karts/pidgin/kart.xml =================================================================== --- main/trunk/data/karts/pidgin/kart.xml 2010-03-11 23:23:15 UTC (rev 4984) +++ main/trunk/data/karts/pidgin/kart.xml 2010-03-12 02:16:11 UTC (rev 4985) @@ -1,5 +1,5 @@ (tuxkart-kart - (version 1) + (version 2) (name "Pidgin") (model-file "pidgin.b3d") (icon-file "pidginicon.png") @@ -7,19 +7,19 @@ (groups "standard") (rgb 0.364705 0.219607 0.396078) (wheel-front-right - (position 0.257000 0.303252 0.124375) + (position 0.257000 0.124375 0.303252) (model "wheel-front-right.b3d") ) (wheel-front-left - (position -0.256601 0.303252 0.124375) + (position -0.256601 0.124375 0.303252) (model "wheel-front-left.b3d") ) (wheel-rear-right - (position 0.237290 -0.437579 0.170517) + (position 0.237290 0.170517 -0.437579) (model "wheel-rear-right.b3d") ) (wheel-rear-left - (position -0.237000 -0.437579 0.170517) + (position -0.237000 0.170517 -0.4375797) (model "wheel-rear-left.b3d") ) ) Modified: main/trunk/data/karts/puffy/kart.xml =================================================================== --- main/trunk/data/karts/puffy/kart.xml 2010-03-11 23:23:15 UTC (rev 4984) +++ main/trunk/data/karts/puffy/kart.xml 2010-03-12 02:16:11 UTC (rev 4985) @@ -1,5 +1,5 @@ (tuxkart-kart - (version 1) + (version 2) (name "Puffy") (model-file "puffy.b3d") (icon-file "puffy-icon.png") @@ -7,23 +7,23 @@ (groups "standard") (rgb 0.12549 0.50196 0.12549) (wheel-front-right -; (position 0.400000 0.550000 0.100000) - (position 0.400000 0.550000 0.090000) +; (position 0.400000 0.100000 0.550000) + (position 0.400000 0.090000 0.550000) (model "wheel-front-right.b3d") ) (wheel-front-left -; (position -0.400000 0.550000 0.100000) - (position -0.400000 0.550000 0.090000) +; (position -0.400000 0.100000 0.550000) + (position -0.400000 0.090000 0.550000) (model "wheel-front-left.b3d") ) (wheel-rear-right -; (position 0.400000 -0.500000 0.150000) - (position 0.400000 -0.500000 0.140000) +; (position 0.400000 0.150000 -0.500000) + (position 0.400000 0.140000 -0.500000) (model "wheel-rear-right.b3d") ) (wheel-rear-left -; (position -0.400000 -0.500000 0.150000) - (position -0.400000 -0.500000 0.140000) +; (position -0.400000 0.150000 -0.500000) + (position -0.400000 0.140000 -0.500000) (model "wheel-rear-left.b3d") ) ) Modified: main/trunk/data/karts/stk_kart.py =================================================================== --- main/trunk/data/karts/stk_kart.py 2010-03-11 23:23:15 UTC (rev 4984) +++ main/trunk/data/karts/stk_kart.py 2010-03-12 02:16:11 UTC (rev 4985) @@ -261,19 +261,19 @@ if kartSoundAttach.val != "" : f.write(' (attach-sound "%s")\n' %(kartSoundAttach.val)) f.write(' (wheel-front-right\n') - f.write(' (position %f %f %f)\n' %(old_locfr.x, old_locfr.y, old_locfr.z)) + f.write(' (position %f %f %f)\n' %(old_locfr.x, old_locfr.z, old_locfr.y)) f.write(' (model "wheel-front-right.b3d")\n') f.write(' )\n') f.write(' (wheel-front-left\n') - f.write(' (position %f %f %f)\n' %(old_locfl.x, old_locfl.y, old_locfl.z)) + f.write(' (position %f %f %f)\n' %(old_locfl.x, old_locfl.z, old_locfl.y)) f.write(' (model "wheel-front-left.b3d")\n') f.write(' )\n') f.write(' (wheel-rear-right\n') - f.write(' (position %f %f %f)\n' %(old_locrr.x, old_locrr.y, old_locrr.z)) + f.write(' (position %f %f %f)\n' %(old_locrr.x, old_locrr.z, old_locrr.y)) f.write(' (model "wheel-rear-right.b3d")\n') f.write(' )\n') f.write(' (wheel-rear-left\n') - f.write(' (position %f %f %f)\n' %(old_locrl.x, old_locrl.y, old_locrl.z)) + f.write(' (position %f %f %f)\n' %(old_locrl.x, old_locrl.z, old_locrl.y)) f.write(' (model "wheel-rear-left.b3d")\n') f.write(' )\n') f.write(')\n') Property changes on: main/trunk/data/karts/tux ___________________________________________________________________ Deleted: svn:mergeinfo - Modified: main/trunk/data/karts/tux/kart.xml =================================================================== --- main/trunk/data/karts/tux/kart.xml 2010-03-11 23:23:15 UTC (rev 4984) +++ main/trunk/data/karts/tux/kart.xml 2010-03-12 02:16:11 UTC (rev 4985) @@ -2,7 +2,7 @@ (tuxkart-kart (name "Tux") - (version 1) + (version 2) (model-file "tux.b3d") (icon-file "tuxicon.png") (shadow-file "tuxkartshadow.png") @@ -22,19 +22,19 @@ (rgb 0.690196 0.0 0.0) (wheel-front-right - (position 0.295 0.412 0.103) + (position 0.295 0.103 0.412) (model "wheel-front-right.b3d") ) (wheel-front-left - (position -0.285 0.412 0.103) + (position -0.285 0.103 0.412) (model "wheel-front-left.b3d") ) (wheel-rear-right - (position 0.361 -0.344 0.143) + (position 0.361 0.143 -0.344) (model "wheel-rear-right.b3d") ) (wheel-rear-left - (position -0.349 -0.344 0.143) + (position -0.349 0.143 -0.344) (model "wheel-rear-left.b3d") ) ) Modified: main/trunk/data/karts/wilber/kart.xml =================================================================== --- main/trunk/data/karts/wilber/kart.xml 2010-03-11 23:23:15 UTC (rev 4984) +++ main/trunk/data/karts/wilber/kart.xml 2010-03-12 02:16:11 UTC (rev 4985) @@ -1,5 +1,5 @@ (tuxkart-kart - (version 1) + (version 2) (name "Wilber") (model-file "kart.b3d") (icon-file "wilbericon.png") @@ -12,19 +12,19 @@ (animation-start-winning 1) (animation-end-winning 21) (wheel-front-right - (position 0.313791 0.326004 0.112673) + (position 0.313791 0.112673 0.326004) (model "wheel-front-right.b3d") ) (wheel-front-left - (position -0.322693 0.326289 0.112673) + (position -0.322693 0.112673 0.326289) (model "wheel-front-left.b3d") ) (wheel-rear-right - (position 0.400584 -0.318699 0.133159) + (position 0.400584 0.133159 -0.318699) (model "wheel-rear-right.b3d") ) (wheel-rear-left - (position -0.398359 -0.318699 0.133159) + (position -0.398359 0.133159 -0.318699) (model "wheel-rear-left.b3d") ) ) Modified: main/trunk/data/stk_config.xml =================================================================== --- main/trunk/data/stk_config.xml 2010-03-11 23:23:15 UTC (rev 4984) +++ main/trunk/data/stk_config.xml 2010-03-12 02:16:11 UTC (rev 4985) @@ -2,11 +2,32 @@ <?xml version="1.0"?> <config> - + <!-- Minimum and maximum kart versions that can be used by this binary. + Older version will be ignored. --> + <kart-version min="2" max="2"/> + <!-- Minimum and maxium track versions that be be read by this binary. + Older versions will be ignored. --> + <track-version min="2" max="2"/> + <!-- Maximum number of karts to be used at the same time. This limit + can easily be increased, but some tracks might not have valid start + positions for those additional karts. --> + <max-karts value="8"/> + <!-- + <Scores =point="10 8 6 5 4 3 2 1"''> + grid-order="1" + title-music="main_theme.music" + mainmenu-background="st_title_screen.rgb st_title_screen2.rgb" + menu-background="menu_background.rgb menu_background2.rgb" + max-history="10000" + max-skidmarks="100" + skid-fadeout-time="60" + near-ground="2" + delay-finish-time="4" + music-credit-time="10" + final-camera-time="1.5" +--> <!-- STK PARAMETERS -min-kart-version and max-kart-version are the the minimum and maximum .kart -files supported. Older/newer files are ignored. min-track-version and max-track-version are the minimum and maximum .track files supported, older/newer files are ignored. @@ -34,10 +55,10 @@ --> <stk-parameters - min-kart-version="1" - max-kart-version="1" - min-track-version="1" - max-track-version="1" + min-kart-version="2" + max-kart-version="2" + min-track-version="2" + max-track-version="2" max-karts="8" scores="10 8 6 5 4 3 2 1" grid-order="1" @@ -158,7 +179,7 @@ in the direction it is driving, it will be more (no friction from tires), while when pushed to the side, hardly anything happens. -z-rescue-offset is the z-axis offset when kart is being put back on track +vert-rescue-offset is the z-axis offset when kart is being put back on track after being rescued, it's a fraction of kart height gear-switch-ratio defines at what ratio of the maximum speed what gear is @@ -189,7 +210,7 @@ time-full-steer-ai="0.1" corn-f ="4" corn-r="4" - gravity-center-shift="0 0 0.3" + gravity-center-shift="0 0.3 0" nitro-power-boost="3" skid-increase="1.05" @@ -223,11 +244,11 @@ suspension-travel-cm="19" jump-velocity="3.0" collision-side-impulse="0" - z-rescue-offset="0.0" - wheel-front-right="0.38 0.6 0" - wheel-front-left="-0.38 0.6 0" - wheel-rear-right="0.38 -0.6 0" - wheel-rear-left="-0.38 -0.6 0" + vert-rescue-offset="0.0" + wheel-front-right="0.38 0 0.6" + wheel-front-left="-0.38 0 0.6" + wheel-rear-right="0.38 0 -0.6" + wheel-rear-left="-0.38 0 -0.6" gear-switch-ratio="0.25 0.7 1.0" gear-power-increase="2.2 1.7 1.3" upright-tolerance="0.2" Modified: main/trunk/data/tracks/lighthouse/graph.xml =================================================================== --- main/trunk/data/tracks/lighthouse/graph.xml 2010-03-11 23:23:15 UTC (rev 4984) +++ main/trunk/data/tracks/lighthouse/graph.xml 2010-03-12 02:16:11 UTC (rev 4985) @@ -1,11 +1,11 @@ -<?xml version="1.0"?> -<graph> - <!-- First define all nodes of the graph, and what quads they represent --> - <node-list from-quad="0" to-quad="82"/> <!-- map each quad to a node --> - <!-- Define the main loop --> - <edge-loop from="0" to="75"/> - <!-- Shortcut Plane.001 --> - <edge from="39" to="76"/> - <edge-line from="76" to="82"/> - <edge from="82" to="42"/> -</graph> +<?xml version="1.0"?> +<graph> + <!-- First define all nodes of the graph, and what quads they represent --> + <node-list from-quad="0" to-quad="82"/> <!-- map each quad to a node --> + <!-- Define the main loop --> + <edge-loop from="0" to="75"/> + <!-- Shortcut Plane.001 --> + <edge from="39" to="76"/> + <edge-line from="76" to="82"/> + <edge from="82" to="42"/> +</graph> Modified: main/trunk/data/tracks/lighthouse/quads.xml =================================================================== --- main/trunk/data/tracks/lighthouse/quads.xml 2010-03-11 23:23:15 UTC (rev 4984) +++ main/trunk/data/tracks/lighthouse/quads.xml 2010-03-12 02:16:11 UTC (rev 4985) @@ -1,88 +1,88 @@ -<?xml version="1.0"?> -<quads> - <!-- Driveline: Mesh.001-sub6 --> - <quad p0="-4.706323 2.414262 -0.598438" p1="4.415620 2.438872 -0.598438" p2="4.210324 17.969233 -0.579387" p3="-4.967913 17.563377 -0.579387"/> - <quad p0="0:3" p1="0:2" p2="2.213851 34.072403 -0.615510" p3="-6.433165 31.383318 -0.615509"/> - <quad p0="1:3" p1="1:2" p2="-4.171629 44.065876 0.652552" p3="-9.982076 37.358948 0.686013"/> - <quad p0="2:3" p1="2:2" p2="-18.072607 50.649399 1.696855" p3="-20.091295 41.757473 1.696856"/> - <quad p0="3:3" p1="3:2" p2="-27.729652 51.265530 1.509671" p3="-26.050608 42.221390 1.486341"/> - <quad p0="4:3" p1="4:2" p2="-36.875408 46.581539 1.382071" p3="-30.451719 40.142567 1.382071"/> - <quad p0="5:3" p1="5:2" p2="-41.335201 37.549858 1.465893" p3="-32.433727 35.867916 1.465894"/> - <quad p0="6:3" p1="6:2" p2="-40.666641 28.027090 1.632516" p3="-31.861115 29.853500 1.632518"/> - <quad p0="7:3" p1="7:2" p2="-37.512127 19.014757 1.354741" p3="-29.546700 22.924814 1.354740"/> - <quad p0="8:3" p1="8:2" p2="-33.184044 13.706114 0.742249" p3="-27.094248 20.034914 0.742251"/> - <quad p0="9:3" p1="9:2" p2="-28.694530 10.452460 0.002749" p3="-22.694223 17.100840 0.002752"/> - <quad p0="10:3" p1="10:2" p2="-26.181463 6.932288 -0.592881" p3="-18.353384 11.908858 -0.540864"/> - <quad p0="11:3" p1="11:2" p2="-24.896889 1.668377 -0.862612" p3="-16.086662 3.002698 -0.862610"/> - <quad p0="12:3" p1="12:2" p2="-24.810951 -4.621467 -0.848669" p3="-16.001045 -5.620519 -0.848670"/> - <quad p0="13:3" p1="13:2" p2="-26.261465 -10.369851 -0.599399" p3="-18.661831 -14.752811 -0.599401"/> - <quad p0="14:3" p1="14:2" p2="-32.213882 -17.244680 0.145504" p3="-26.075872 -24.104187 0.145506"/> - <quad p0="15:3" p1="15:2" p2="-41.148266 -23.312559 1.031700" p3="-34.956303 -29.951525 1.031699"/> - <quad p0="16:3" p1="16:2" p2="-48.798962 -32.436180 1.423564" p3="-40.936974 -37.142769 1.423565"/> - <quad p0="17:3" p1="17:2" p2="-51.802658 -41.687798 0.900872" p3="-42.765202 -43.376961 0.900872"/> - <quad p0="18:3" p1="18:2" p2="-52.066647 -50.956055 0.060375" p3="-43.108673 -49.389191 0.060375"/> - <quad p0="19:3" p1="19:2" p2="-48.115791 -59.896664 -0.621457" p3="-40.962234 -54.483067 -0.621457"/> - <quad p0="20:3" p1="20:2" p2="-41.142822 -64.367798 -0.946071" p3="-38.865284 -55.496605 -0.946073"/> - <quad p0="21:3" p1="21:2" p2="-34.844822 -64.817902 -1.179832" p3="-32.903500 -56.050491 -1.179832"/> - <quad p0="22:3" p1="22:2" p2="-31.481289 -66.258591 -1.608891" p3="-25.123781 -59.679443 -1.608891"/> - <quad p0="23:3" p1="23:2" p2="-30.483164 -69.371674 -2.075523" p3="-21.357168 -67.274895 -2.075525"/> - <quad p0="24:3" p1="24:2" p2="-29.568579 -75.664894 -2.611796" p3="-20.807631 -73.251686 -2.848396"/> - <quad p0="25:3" p1="25:2" p2="-25.514933 -82.628807 -3.202161" p3="-19.164318 -76.489487 -3.362162"/> - <quad p0="26:3" p1="26:2" p2="-18.387693 -86.704239 -3.644526" p3="-15.485102 -78.359093 -3.907151"/> - <quad p0="27:3" p1="27:2" p2="-10.813594 -87.670212 -4.134078" p3="-12.384446 -78.830017 -4.134079"/> - <quad p0="28:3" p1="28:2" p2="-2.704075 -84.426735 -4.514056" p3="-8.780684 -77.962776 -4.489532"/> - <quad p0="29:3" p1="29:2" p2="1.411081 -77.158401 -5.192565" p3="-6.615165 -73.390938 -4.666523"/> - <quad p0="30:3" p1="30:2" p2="3.709216 -69.930611 -6.043624" p3="-4.256489 -65.867912 -5.428376"/> - <quad p0="31:3" p1="31:2" p2="6.930733 -65.775719 -6.846976" p3="2.394150 -58.085953 -6.330886"/> - <quad p0="32:3" p1="32:2" p2="11.878706 -65.510727 -7.495578" p3="12.408020 -56.558720 -6.864302"/> - <quad p0="33:3" p1="33:2" p2="19.493784 -67.503082 -8.543320" p3="20.641354 -57.516510 -8.022539"/> - <quad p0="34:3" p1="34:2" p2="28.421135 -70.052094 -9.922286" p3="28.112600 -60.091297 -9.563305"/> - <quad p0="35:3" p1="35:2" p2="37.380337 -69.616692 -11.608571" p3="34.355743 -60.011272 -11.453115"/> - <quad p0="36:3" p1="36:2" p2="49.442150 -62.841492 -12.571898" p3="43.960110 -55.573742 -12.607226"/> - <quad p0="37:3" p1="37:2" p2="61.841213 -54.321426 -11.204114" p3="52.842621 -49.542389 -11.175269"/> - <quad p0="38:3" p1="38:2" p2="64.425217 -44.035255 -9.969193" p3="55.796593 -38.725712 -10.221364"/> - <quad p0="39:3" p1="39:2" p2="67.380608 -38.948483 -9.466942" p3="58.602009 -34.296867 -9.267458"/> - <quad p0="40:3" p1="40:2" p2="71.683334 -31.473293 -8.646638" p3="63.355213 -27.507542 -8.043308"/> - <quad p0="41:3" p1="41:2" p2="74.057571 -25.234463 -7.100697" p3="65.286118 -20.760723 -7.033663"/> - <quad p0="42:3" p1="42:2" p2="76.431801 -18.995630 -5.134175" p3="68.374817 -14.013905 -5.690857"/> - <quad p0="43:3" p1="43:2" p2="78.806038 -12.756800 -3.377944" p3="70.884621 -7.267086 -3.158825"/> - <quad p0="44:3" p1="44:2" p2="82.113426 -3.200323 -1.857885" p3="74.056046 0.717542 -1.698861"/> - <quad p0="45:3" p1="45:2" p2="84.617256 5.494129 -1.718896" p3="75.674469 6.877448 -1.718896"/> - <quad p0="46:3" p1="46:2" p2="84.430473 14.307998 -1.738937" p3="75.741882 12.868042 -1.738937"/> - <quad p0="47:3" p1="47:2" p2="82.208305 22.422503 -1.859400" p3="73.895180 19.401936 -1.859400"/> - <quad p0="48:3" p1="48:2" p2="78.869949 28.558496 -1.955870" p3="71.854958 23.106176 -1.955869"/> - <quad p0="49:3" p1="49:2" p2="74.310295 33.183178 -1.952129" p3="69.045982 25.979342 -1.952129"/> - <quad p0="50:3" p1="50:2" p2="68.498993 36.267597 -1.911428" p3="65.277534 28.213400 -1.911430"/> - <quad p0="51:3" p1="51:2" p2="59.939777 38.628609 -1.381185" p3="58.806938 30.005505 -1.381183"/> - <quad p0="52:3" p1="52:2" p2="51.380390 38.630714 -0.997298" p3="52.571983 30.006895 -0.997298"/> - <quad p0="53:3" p1="53:2" p2="42.947643 36.465233 -0.512965" p3="45.909142 28.090158 -0.512965"/> - <quad p0="54:3" p1="54:2" p2="37.198528 33.000858 -0.501884" p3="42.394970 25.985365 -0.501884"/> - <quad p0="55:3" p1="55:2" p2="32.381428 28.378433 -0.554619" p3="39.457142 23.177242 -0.554619"/> - <quad p0="56:3" p1="56:2" p2="29.121250 22.103233 -0.563037" p3="37.589394 19.806171 -0.563037"/> - <quad p0="57:3" p1="57:2" p2="28.165947 13.380054 -0.588171" p3="37.203369 13.757662 -0.588169"/> - <quad p0="58:3" p1="58:2" p2="29.438185 5.883281 -0.609578" p3="38.475609 6.388496 -0.609578"/> - <quad p0="59:3" p1="59:2" p2="29.295568 0.393307 -0.608534" p3="37.404495 -2.829414 -0.608534"/> - <quad p0="60:3" p1="60:2" p2="26.522503 -2.393089 -0.579792" p3="32.919399 -8.786451 -0.579793"/> - <quad p0="61:3" p1="61:2" p2="22.489161 -5.129051 -0.572397" p3="28.471224 -11.621149 -0.572397"/> - <quad p0="62:3" p1="62:2" p2="18.279608 -10.317947 -0.534855" p3="26.401922 -14.508936 -0.534857"/> - <quad p0="63:3" p1="63:2" p2="16.781017 -16.368546 -0.554546" p3="25.760576 -17.336922 -0.554546"/> - <quad p0="64:3" p1="64:2" p2="16.969650 -21.636999 -0.607226" p3="25.839380 -20.381168 -0.607227"/> - <quad p0="65:3" p1="65:2" p2="18.103983 -27.347338 -0.575364" p3="27.021225 -27.038719 -0.575364"/> - <quad p0="66:3" p1="66:2" p2="17.819407 -31.217104 -0.576057" p3="25.510227 -35.324093 -0.576056"/> - <quad p0="67:3" p1="67:2" p2="15.056807 -33.764656 -0.607409" p3="19.131086 -41.427471 -0.607408"/> - <quad p0="68:3" p1="68:2" p2="10.987198 -34.731186 -0.573460" p3="11.282402 -43.708355 -0.573461"/> - <quad p0="69:3" p1="69:2" p2="7.933927 -33.941578 -0.590497" p3="3.719333 -42.025673 -0.590500"/> - <quad p0="70:3" p1="70:2" p2="5.825994 -32.173302 -0.585881" p3="-2.173187 -36.648232 -0.585880"/> - <quad p0="71:3" p1="71:2" p2="4.409142 -27.475288 -0.532562" p3="-4.594118 -28.754313 -0.532562"/> - <quad p0="72:3" p1="72:2" p2="4.241634 -22.010561 -0.587381" p3="-4.679946 -22.054602 -0.587381"/> - <quad p0="73:3" p1="73:2" p2="4.344248 0.170297 -0.589689" p3="-4.704764 0.160597 -0.589689"/> - <quad p0="74:3" p1="74:2" p2="0:1" p3="0:0"/> - <!-- Driveline: Plane.001 --> - <quad p0="52.625244 -49.710072 -11.032082" p1="55.466572 -38.690292 -10.070258" p2="54.029762 -36.472202 -10.074968" p3="49.933815 -42.089600 -10.695952"/> - <quad p0="76:3" p1="76:2" p2="52.938461 -34.240349 -9.644795" p3="48.288677 -36.117771 -9.794831"/> - <quad p0="77:3" p1="77:2" p2="53.163116 -31.656792 -9.281466" p3="48.457172 -31.680798 -9.281466"/> - <quad p0="78:3" p1="78:2" p2="53.837090 -29.129402 -8.813679" p3="49.299633 -27.243824 -8.813679"/> - <quad p0="79:3" p1="79:2" p2="56.027493 -27.332148 -8.424850" p3="52.444832 -23.986298 -8.251587"/> - <quad p0="80:3" p1="80:2" p2="59.453514 -26.714340 -8.310761" p3="58.285912 -21.515068 -7.394853"/> - <quad p0="81:3" p1="81:2" p2="62.823368 -27.275982 -8.274406" p3="64.744797 -20.841099 -7.178000"/> -</quads> +<?xml version="1.0"?> +<quads> + <!-- Driveline: Mesh.001-sub6 --> + <quad p0="-4.706323 -0.598438 2.414262" p1="4.415620 -0.598438 2.438872" p2="4.210324 -0.579387 17.969233" p3="-4.967913 -0.579387 17.563377"/> + <quad p0="0:3" p1="0:2" p2="2.213851 -0.615510 34.072403" p3="-6.433165 -0.615509 31.383318"/> + <quad p0="1:3" p1="1:2" p2="-4.171629 0.652552 44.065876" p3="-9.982076 0.686013 37.358948"/> + <quad p0="2:3" p1="2:2" p2="-18.072607 1.696855 50.649399" p3="-20.091295 1.696856 41.757473"/> + <quad p0="3:3" p1="3:2" p2="-27.729652 1.509671 51.265530" p3="-26.050608 1.486341 42.221390"/> + <quad p0="4:3" p1="4:2" p2="-36.875408 1.382071 46.581539" p3="-30.451719 1.382071 40.142567"/> + <quad p0="5:3" p1="5:2" p2="-41.335201 1.465893 37.549858" p3="-32.433727 1.465894 35.867916"/> + <quad p0="6:3" p1="6:2" p2="-40.666641 1.632516 28.027090" p3="-31.861115 1.632518 29.853500"/> + <quad p0="7:3" p1="7:2" p2="-37.512127 1.354741 19.014757" p3="-29.546700 1.354740 22.924814"/> + <quad p0="8:3" p1="8:2" p2="-33.184044 0.742249 13.706114" p3="-27.094248 0.742251 20.034914"/> + <quad p0="9:3" p1="9:2" p2="-28.694530 0.002749 10.452460" p3="-22.694223 0.002752 17.100840"/> + <quad p0="10:3" p1="10:2" p2="-26.181463 -0.592881 6.932288" p3="-18.353384 -0.540864 11.908858"/> + <quad p0="11:3" p1="11:2" p2="-24.896889 -0.862612 1.668377" p3="-16.086662 -0.862610 3.002698"/> + <quad p0="12:3" p1="12:2" p2="-24.810951 -0.848669 -4.621467" p3="-16.001045 -0.848670 -5.620519"/> + <quad p0="13:3" p1="13:2" p2="-26.261465 -0.599399 -10.369851" p3="-18.661831 -0.599401 -14.752811"/> + <quad p0="14:3" p1="14:2" p2="-32.213882 0.145504 -17.244680" p3="-26.075872 0.145506 -24.104187"/> + <quad p0="15:3" p1="15:2" p2="-41.148266 1.031700 -23.312559" p3="-34.956303 1.031699 -29.951525"/> + <quad p0="16:3" p1="16:2" p2="-48.798962 1.423564 -32.436180" p3="-40.936974 1.423565 -37.142769"/> + <quad p0="17:3" p1="17:2" p2="-51.802658 0.900873 -41.687798" p3="-42.765202 0.900872 -43.376961"/> + <quad p0="18:3" p1="18:2" p2="-52.066647 0.060375 -50.956055" p3="-43.108673 0.060375 -49.389191"/> + <quad p0="19:3" p1="19:2" p2="-48.115791 -0.621457 -59.896664" p3="-40.962234 -0.621457 -54.483067"/> + <quad p0="20:3" p1="20:2" p2="-41.142822 -0.946071 -64.367798" p3="-38.865284 -0.946073 -55.496605"/> + <quad p0="21:3" p1="21:2" p2="-34.844822 -1.179832 -64.817902" p3="-32.903500 -1.179832 -56.050491"/> + <quad p0="22:3" p1="22:2" p2="-31.481289 -1.608891 -66.258591" p3="-25.123781 -1.608891 -59.679443"/> + <quad p0="23:3" p1="23:2" p2="-30.483164 -2.075524 -69.371674" p3="-21.357168 -2.075525 -67.274895"/> + <quad p0="24:3" p1="24:2" p2="-29.568579 -2.611796 -75.664894" p3="-20.807631 -2.848396 -73.251686"/> + <quad p0="25:3" p1="25:2" p2="-25.514933 -3.202161 -82.628807" p3="-19.164318 -3.362162 -76.489487"/> + <quad p0="26:3" p1="26:2" p2="-18.387693 -3.644526 -86.704239" p3="-15.485102 -3.907151 -78.359093"/> + <quad p0="27:3" p1="27:2" p2="-10.813594 -4.134078 -87.670212" p3="-12.384446 -4.134079 -78.830017"/> + <quad p0="28:3" p1="28:2" p2="-2.704075 -4.514056 -84.426735" p3="-8.780684 -4.489532 -77.962776"/> + <quad p0="29:3" p1="29:2" p2="1.411081 -5.192564 -77.158401" p3="-6.615165 -4.666523 -73.390938"/> + <quad p0="30:3" p1="30:2" p2="3.709216 -6.043624 -69.930611" p3="-4.256489 -5.428376 -65.867912"/> + <quad p0="31:3" p1="31:2" p2="6.930733 -6.846976 -65.775719" p3="2.394150 -6.330885 -58.085953"/> + <quad p0="32:3" p1="32:2" p2="11.878706 -7.495578 -65.510727" p3="12.408020 -6.864301 -56.558720"/> + <quad p0="33:3" p1="33:2" p2="19.493784 -8.543320 -67.503082" p3="20.641354 -8.022539 -57.516510"/> + <quad p0="34:3" p1="34:2" p2="28.421135 -9.922286 -70.052094" p3="28.112600 -9.563305 -60.091297"/> + <quad p0="35:3" p1="35:2" p2="37.380337 -11.608571 -69.616692" p3="34.355743 -11.453115 -60.011272"/> + <quad p0="36:3" p1="36:2" p2="49.442150 -12.571898 -62.841492" p3="43.960110 -12.607226 -55.573742"/> + <quad p0="37:3" p1="37:2" p2="61.841213 -11.204114 -54.321426" p3="52.842621 -11.175269 -49.542389"/> + <quad p0="38:3" p1="38:2" p2="64.425217 -9.969193 -44.035255" p3="55.796593 -10.221364 -38.725712"/> + <quad p0="39:3" p1="39:2" p2="67.380608 -9.466942 -38.948483" p3="58.602009 -9.267458 -34.296867"/> + <quad p0="40:3" p1="40:2" p2="71.683334 -8.646638 -31.473293" p3="63.355213 -8.043308 -27.507542"/> + <quad p0="41:3" p1="41:2" p2="74.057571 -7.100697 -25.234463" p3="65.286118 -7.033663 -20.760723"/> + <quad p0="42:3" p1="42:2" p2="76.431801 -5.134175 -18.995630" p3="68.374817 -5.690856 -14.013905"/> + <quad p0="43:3" p1="43:2" p2="78.806038 -3.377944 -12.756800" p3="70.884621 -3.158825 -7.267086"/> + <quad p0="44:3" p1="44:2" p2="82.113426 -1.857885 -3.200323" p3="74.056046 -1.698861 0.717542"/> + <quad p0="45:3" p1="45:2" p2="84.617256 -1.718897 5.494129" p3="75.674469 -1.718897 6.877448"/> + <quad p0="46:3" p1="46:2" p2="84.430473 -1.738937 14.307998" p3="75.741882 -1.738937 12.868042"/> + <quad p0="47:3" p1="47:2" p2="82.208305 -1.859400 22.422503" p3="73.895180 -1.859400 19.401936"/> + <quad p0="48:3" p1="48:2" p2="78.869949 -1.955870 28.558496" p3="71.854958 -1.955869 23.106176"/> + <quad p0="49:3" p1="49:2" p2="74.310295 -1.952129 33.183178" p3="69.045982 -1.952129 25.979342"/> + <quad p0="50:3" p1="50:2" p2="68.498993 -1.911428 36.267597" p3="65.277534 -1.911430 28.213400"/> + <quad p0="51:3" p1="51:2" p2="59.939777 -1.381185 38.628609" p3="58.806938 -1.381183 30.005505"/> + <quad p0="52:3" p1="52:2" p2="51.380390 -0.997298 38.630714" p3="52.571983 -0.997298 30.006895"/> + <quad p0="53:3" p1="53:2" p2="42.947643 -0.512966 36.465233" p3="45.909142 -0.512965 28.090158"/> + <quad p0="54:3" p1="54:2" p2="37.198528 -0.501884 33.000858" p3="42.394970 -0.501884 25.985365"/> + <quad p0="55:3" p1="55:2" p2="32.381428 -0.554619 28.378433" p3="39.457142 -0.554619 23.177242"/> + <quad p0="56:3" p1="56:2" p2="29.121250 -0.563037 22.103233" p3="37.589394 -0.563037 19.806171"/> + <quad p0="57:3" p1="57:2" p2="28.165947 -0.588171 13.380054" p3="37.203369 -0.588169 13.757662"/> + <quad p0="58:3" p1="58:2" p2="29.438185 -0.609578 5.883281" p3="38.475609 -0.609578 6.388496"/> + <quad p0="59:3" p1="59:2" p2="29.295568 -0.608534 0.393307" p3="37.404495 -0.608534 -2.829414"/> + <quad p0="60:3" p1="60:2" p2="26.522503 -0.579792 -2.393089" p3="32.919399 -0.579793 -8.786451"/> + <quad p0="61:3" p1="61:2" p2="22.489161 -0.572397 -5.129051" p3="28.471224 -0.572397 -11.621149"/> + <quad p0="62:3" p1="62:2" p2="18.279608 -0.534855 -10.317947" p3="26.401922 -0.534857 -14.508936"/> + <quad p0="63:3" p1="63:2" p2="16.781017 -0.554546 -16.368546" p3="25.760576 -0.554546 -17.336922"/> + <quad p0="64:3" p1="64:2" p2="16.969650 -0.607226 -21.636999" p3="25.839380 -0.607227 -20.381168"/> + <quad p0="65:3" p1="65:2" p2="18.103983 -0.575364 -27.347338" p3="27.021225 -0.575364 -27.038719"/> + <quad p0="66:3" p1="66:2" p2="17.819407 -0.576057 -31.217104" p3="25.510227 -0.576056 -35.324093"/> + <quad p0="67:3" p1="67:2" p2="15.056807 -0.607409 -33.764656" p3="19.131086 -0.607408 -41.427471"/> + <quad p0="68:3" p1="68:2" p2="10.987198 -0.573460 -34.731186" p3="11.282402 -0.573461 -43.708355"/> + <quad p0="69:3" p1="69:2" p2="7.933927 -0.590498 -33.941578" p3="3.719333 -0.590500 -42.025673"/> + <quad p0="70:3" p1="70:2" p2="5.825994 -0.585881 -32.173302" p3="-2.173187 -0.585880 -36.648232"/> + <quad p0="71:3" p1="71:2" p2="4.409142 -0.532562 -27.475288" p3="-4.594118 -0.532562 -28.754313"/> + <quad p0="72:3" p1="72:2" p2="4.241634 -0.587381 -22.010561" p3="-4.679946 -0.587381 -22.054602"/> + <quad p0="73:3" p1="73:2" p2="4.344248 -0.589689 0.170297" p3="-4.704764 -0.589689 0.160597"/> + <quad p0="74:3" p1="74:2" p2="0:1" p3="0:0"/> + <!-- Driveline: Plane.001 --> + <quad invisible="yes" p0="52.625244 -11.032082 -49.710072" p1="55.466572 -10.070258 -38.690292" p2="54.029762 -10.074968 -36.472202" p3="49.933815 -10.695952 -42.089600"/> + <quad invisible="yes" p0="76:3" p1="76:2" p2="52.938461 -9.644795 -34.240349" p3="48.288677 -9.794831 -36.117771"/> + <quad invisible="yes" p0="77:3" p1="77:2" p2="53.163116 -9.281465 -31.656792" p3="48.457172 -9.281465 -31.680798"/> + <quad invisible="yes" p0="78:3" p1="78:2" p2="53.837090 -8.813679 -29.129402" p3="49.299633 -8.813679 -27.243822"/> + <quad invisible="yes" p0="79:3" p1="79:2" p2="56.027493 -8.424850 -27.332148" p3="52.444832 -8.251587 -23.986298"/> + <quad invisible="yes" p0="80:3" p1="80:2" p2="59.453514 -8.310761 -26.714340" p3="58.285912 -7.394853 -21.515070"/> + <quad invisible="yes" p0="81:3" p1="81:2" p2="62.823368 -8.274405 -27.275982" p3="64.744797 -7.178000 -20.841099"/> +</quads> Modified: main/trunk/data/tracks/lighthouse/scene.xml =================================================================== --- main/trunk/data/tracks/lighthouse/scene.xml 2010-03-11 23:23:15 UTC (rev 4984) +++ main/trunk/data/tracks/lighthouse/scene.xml 2010-03-12 02:16:11 UTC (rev 4985) @@ -1,56 +1,56 @@ -<?xml version="1.0"?> -<scene> - <track model="lighthouse.track_track.b3d" x="0" y="0" z="0"/> - <object type="animation" model="Light.b3d" xyz="-48.248627 -94.301178 29.666990" hpr="0.000000 0.000000 0.000000" > - <curve channel="RotX" interpolation="linear" extend="const"> - <p c="1.288065 0.000000"/> - <p c="90.639534 0.000000"/> - <p c="184.693726 0.000000"/> - </curve> - <curve channel="RotZ" interpolation="bezier" extend="const"> - <p c="1.288065 0.000000" h1="-33.595772 0.000000" h2="36.171909 0.000000"/> - <p c="90.639534 0.000000" h1="55.755692 0.000000" h2="127.359375 0.000000"/> - <p c="184.693726 0.000000" h1="147.973892 0.000000" h2="221.413574 0.000000"/> - </curve> - <curve channel="RotY" interpolation="linear" extend="const"> - <p c="1.288065 0.000000"/> - <p c="90.639534 180.000000"/> - <p c="184.693726 360.000000"/> - </curve> - </object> - <sun fog="true" fog-color="1 1 1" fog-density="50" fog-start="0" fog-end="100" xyz="1.45523071289 109.559005737 88.6911010742"/> - <item x="-27.765064" y="49.391853" z="1.957284" /> - <item x="-27.21554" y="47.084381" z="1.957286" /> - <item x="-26.720949" y="44.996407" z="1.957287" /> - <item x="-26.226444" y="43.07349" z="1.957289" /> - <item x="-45.854069" y="-46.743793" z="1.06246" /> - <item x="-48.68174" y="-46.445847" z="0.984951" /> - <item x="12.371565" y="-57.734921" z="-7.065746" /> - <item x="12.38612" y="-59.65921" z="-7.065743" /> - <item x="12.250172" y="-62.217819" z="-7.06574" /> - <item x="11.839122" y="-64.608177" z="-7.065737" /> - <item x="60.041832" y="-32.400433" z="-7.065742" /> - <item x="63.257195" y="-33.995289" z="-7.065742" /> - <item x="54.593498" y="37.709343" z="1.684416" /> - <item x="54.767887" y="35.429962" z="1.684416" /> - <item x="54.783318" y="33.181438" z="1.684416" /> - <item x="54.783318" y="30.823359" z="1.684416" /> - <item x="30.821682" y="-8.613055" z="1.684416" /> - <item x="29.096848" y="-6.530096" z="1.684416" /> - <small-nitro x="-23.934258" y="-4.407568" z="0.763208" /> - <small-nitro x="-17.353445" y="2.173244" z="0.763208" /> - <small-nitro x="-18.127659" y="-9.827062" z="0.763208" /> - <small-nitro x="-50.838169" y="-46.21508" z="0.763215" /> - <small-nitro x="-43.751602" y="-46.911083" z="0.763215" /> - <small-nitro x="66.910866" y="-35.339317" z="0.763096" /> - <small-nitro x="69.350883" y="-31.559687" z="0.763096" /> - <small-nitro x="64.327324" y="-39.501694" z="0.763096" /> - <big-nitro x="51.721169" y="-28.531448" z="0.763096" /> - <small-nitro x="27.694473" y="-5.095636" z="0.7631" /> - <small-nitro x="26.239197" y="-3.513813" z="0.7631" /> - <checks> - <check-line kind="lap" p1="4.415620 2.438872" p2="-4.706323 2.414262" min-height="-0.598438"/> - <check-line kind="toggle" other-id="0" p1="68.019455 -45.556225" p2="44.501854 -31.783911" - min-height="-9.717559"/> - </checks> -</scene> +<?xml version="1.0"?> +<scene> + <track model="lighthouse.track_track.b3d" x="0" y="0" z="0"/> + <object type="animation" model="Light.b3d" xyz="-48.248627 29.666990 -94.301178" hpr="0.000000 0.000000 0.000000" > + <curve channel="RotX" interpolation="linear" extend="const"> + <p c="1.288065 0.000000"/> + <p c="90.639534 0.000000"/> + <p c="184.693726 0.000000"/> + </curve> + <curve channel="RotZ" interpolation="bezier" extend="const"> + <p c="1.288065 0.000000" h1="-33.595772 0.000000" h2="36.171909 0.000000"/> + <p c="90.639534 0.000000" h1="55.755692 0.000000" h2="127.359375 0.000000"/> + <p c="184.693726 0.000000" h1="147.973892 0.000000" h2="221.413574 0.000000"/> + </curve> + <curve channel="RotY" interpolation="linear" extend="const"> + <p c="1.288065 0.000000"/> + <p c="90.639534 180.000000"/> + <p c="184.693726 360.000000"/> + </curve> + </object> + <sun fog="true" fog-color="1 1 1" fog-density="50" fog-start="0" fog-end="100" xyz="1.45523071289 88.6911010742 109.559005737"/> + <item x="-27.765064" y="1.957284" z="49.391853" /> + <item x="-27.21554" y="1.957286" z="47.084381" /> + <item x="-26.720949" y="1.957287" z="44.996407" /> + <item x="-26.226444" y="1.957289" z="43.07349" /> + <item x="-45.854069" y="1.06246" z="-46.743793" /> + <item x="-48.68174" y="0.984951" z="-46.445847" /> + <item x="12.371565" y="-7.065746" z="-57.734921" /> + <item x="12.38612" y="-7.065743" z="-59.65921" /> + <item x="12.250172" y="-7.06574" z="-62.217819" /> + <item x="11.839122" y="-7.065737" z="-64.608177" /> + <item x="60.041832" y="-7.065742" z="-32.400433" /> + <item x="63.257195" y="-7.065742" z="-33.995289" /> + <item x="54.593498" y="1.684416" z="37.709343" /> + <item x="54.767887" y="1.684416" z="35.429962" /> + <item x="54.783318" y="1.684416" z="33.181438" /> + <item x="54.783318" y="1.684416" z="30.823359" /> + <item x="30.821682" y="1.684416" z="-8.613055" /> + <item x="29.096848" y="1.684416" z="-6.530096" /> + <small-nitro x="-23.934258" y="0.763208" z="-4.407568" /> + <small-nitro x="-17.353445" y="0.763208" z="2.173244" /> + <small-nitro x="-18.127659" y="0.763208" z="-9.827062" /> + <small-nitro x="-50.838169" y="0.763215" z="-46.21508" /> + <small-nitro x="-43.751602" y="0.763215" z="-46.911083" /> + <small-nitro x="66.910866" y="-6.606025" z="-35.339317" /> + <small-nitro x="69.350883" y="-6.606025" z="-31.559687" /> + <small-nitro x="64.327324" y="-6.606026" z="-39.501694" /> + <big-nitro x="51.721169" y="-7.341476" z="-28.531448" /> + <small-nitro x="27.694473" y="0.7631" z="-5.095636" /> + <small-nitro x="26.239197" y="0.7631" z="-3.513813" /> + <checks> + <check-line kind="lap" p1="4.415620 2.438872" p2="-4.706323 2.414262" min-height="-0.598438"/> + <check-line kind="activate" other-id="0" p1="68.019447 -45.556225" p2="44.501854 -31.783911" + min-height="-9.717559"/> + </checks> +</scene> Modified: main/trunk/data/tracks/lighthouse/track.xml =================================================================== --- main/trunk/data/tracks/lighthouse/track.xml 2010-03-11 23:23:15 UTC (rev 4984) +++ main/trunk/data/tracks/lighthouse/track.xml 2010-03-12 02:16:11 UTC (rev 4985) @@ -1,6 +1,6 @@ <?xml version="1.0"?> <track name = "Around the Lighthouse" - version = "1" + version = "2" groups = "standard" designer = "Ingo Ruhnke & Marianne Gagnon & Stephen Dunn" music = "ChillCarrier-Druckverlust.music" Modified: main/trunk/data/tracks/stk_track.py =================================================================== --- main/trunk/data/tracks/stk_track.py 2010-03-11 23:23:15 UTC (rev 4984) +++ main/trunk/data/tracks/stk_track.py 2010-03-12 02:16:11 UTC (rev 4985) @@ -62,14 +62,13 @@ # ------------------------------------------------------------------------------ # Returns a string 'x="1" y="2" z="3" h="4"', where 1, 2, ...are the actual # location and rotation of the given object. The location has a swapped -# y and z axis (so that the same coordinate system as in-game is used), and -# rotations are multiplied by 10 (since bullet stores the values in units -# of 10 degrees.) +# y and z axis (so that the same coordinate system as in-game is used). def getXYZHString(obj): - loc = obj.loc - hpr = obj.rot + loc = obj.loc + hpr = obj.rot + rad2deg = 180.0/3.1415926535; s="x=\"%f\" y=\"%f\" z=\"%f\" h=\"%f\"" %\ - (loc[0], loc[1], loc[2], hpr[2]*180/3.1415926) + (loc[0], loc[2], loc[1], hpr[2]*rad2deg) return s # ------------------------------------------------------------------------------ @@ -79,10 +78,12 @@ # rotations are multiplied by 10 (since bullet stores the values in units # of 10 degrees.) def getXYZHPRString(obj): - loc = obj.loc - hpr = obj.rot + loc = obj.loc + hpr = obj.rot + rad2deg = 180.0/3.1415926535; s="xyz=\"%f %f %f\" hpr=\"%f %f %f\"" %\ - (loc[0], loc[1], loc[2], hpr[0]*10.0, hpr[1]*10.0, hpr[2]*10.0) + (loc[0], loc[2], loc[1], hpr[0]*rad2deg, hpr[1]*rad2deg, + hpr[2]*rad2deg) return s # ============================================================================== @@ -363,13 +364,13 @@ f.write(" <!-- Driveline: %s -->\n"%self.name) f.write(" <quad%sp0=\"%f %f %f\" p1=\"%f %f %f\" p2=\"%f %f %f\" p3=\"%f %f %f\"/>\n" \ - %(sInv, l[0],l[1],l[2], r[0],r[1],r[2], r1[0],r1[1],r1[2], l1[0],l1[1],l1[2]) ) + %(sInv, l[0],l[2],l[1], r[0],r[2],r[1], r1[0],r1[2],r1[1], l1[0],l1[2],l1[1]) ) for i in range(1, max_index): l1 = self.lLeft[i+1] r1 = self.lRight[i+1] f.write(" <quad%sp0=\"%d:3\" p1=\"%d:2\" p2=\"%f %f %f\" p3=\"%f %f %f\"/>\n" \ %(sInv,self.global_quad_index_start+i-1, self.global_quad_index_start+i-1, \ - r1[0],r1[1],r1[2], l1[0],l1[1],l1[2]) ) + r1[0],r1[2],r1[1], l1[0],l1[2],l1[1]) ) if self.is_last_main: f.write(" <quad%sp0=\"%d:3\" p1=\"%d:2\" p2=\"0:1\" p3=\"0:0\"/>\n"\ % (sInv, max_index-1, max_index-1)) @@ -786,27 +787,20 @@ lap[1][0], lap[1][1], min_h ) ) # Create a dictionary to map the names to the index of the # check structure. Insert the 'lap' object as a first entry - dName2Index = {'lap' : 0} - count = 1 + dName2Index = {"lap" : 0} else: # Create a dictionary to map the names to the index of the # check structure. Insert the 'lap' object as a first entry dName2Index = {} - count = 0 - # Create a dictionary to map the names to the index of the - # check structure. Insert the 'lap' object as a first entry - dName2Index = {'lap' : 0} - count = 1 for obj in lChecks: if dName2Index.has_key(obj.name): print "Check structure name '%s' already defined, ignored."% \ obj.name print "Remember that the 'lap' checkline is automatically defined." continue - dName2Index[obj.name] = count - count = count + 1 - + dName2Index[obj.name] = len(dName2Index) + for obj in lChecks: mesh=obj.getData() # Convert to world space @@ -837,9 +831,11 @@ if len(mesh.verts)==2: # Check line min_h = mesh.verts[0][2] if mesh.verts[1][2]<min_h: min_h = mesh.verts[1][2] - f.write(" <check-line%sp1=\"%f %f\" p2=\"%f %f\" min-height=\"%f\"/>\n"% \ + f.write(" <check-line%sp1=\"%f %f\" p2=\"%f %f\"\n" % (kind, mesh.verts[0][0], mesh.verts[0][1], - mesh.verts[1][0], mesh.verts[1][1], min_h ) ) + mesh.verts[1][0], mesh.verts[1][1] ) ) + + f.write(" min-height=\"%f\"/>\n"% min_h ) else: radius = 0 for v in mesh.verts: @@ -852,7 +848,7 @@ inner_radius = getProperty(obj, "inner-radius", radius) color = getProperty(obj, "color", "255 120 120 120") f.write(" <check-sphere%sxyz=\"%f %f %f\" radius=\"%f\"\n" % \ - (kind, obj.loc[0], obj.loc[1], obj.loc[2], radius) ) + (kind, obj.loc[0], obj.loc[2], obj.loc[1], radius) ) f.write(" inner-radius=\"%f\" color=\"%s\"/>\n"% \ (inner_radius, color) ) @@ -1005,7 +1001,7 @@ if len(lSun)>0: sun = lSun[0] xyz=sun.loc - sSky="%s xyz=\"%s %s %s\""%(sSky, xyz[0],xyz[1],xyz[2]) + sSky="%s xyz=\"%s %s %s\""%(sSky, xyz[0],xyz[2],xyz[1]) s=getProperty(sun, "color", 0) if s: sSky="%s sun-color=\"%s\""%(sSky, s) s=getProperty(sun, "specular", 0) @@ -1055,7 +1051,8 @@ h,p,r = map(str, map(Round, [rz,rx,ry]) ) x,y,z = map(str, map(Round, obj.loc ) ) drop = getProperty(obj, "drop", "y").lower() - s = "%s x=\"%s\" y=\"%s\" z=\"%s\"" % (name, x, y, z) + # Swap y and z axis to have the same coordinate system used in game. + s = "%s x=\"%s\" y=\"%s\" z=\"%s\"" % (name, x, z, y) if h and h!="0": s = "%s h=\"%s\""%(s, h) if drop=="n": # Pitch and roll will be set automatically if dropped Property changes on: main/trunk/data/tracks/tuxtollway/tuxtollway.drvl ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: main/trunk/data/tracks/tuxtollway/tuxtollway.drvr ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: main/trunk/data/tracks/tuxtollway/tuxtollway.loc ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: main/trunk/data/tracks/tuxtollway/tuxtollway.track ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: main/trunk/src/audio/music.hpp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: main/trunk/src/audio/music_information.cpp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: main/trunk/src/audio/music_information.hpp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: main/trunk/src/audio/music_ogg.cpp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: main/trunk/src/audio/music_ogg.hpp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: main/trunk/src/audio/sfx_base.hpp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: main/trunk/src/audio/sfx_openal.cpp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: main/trunk/src/audio/sfx_openal.hpp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: main/trunk/src/audio/sound_manager.cpp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: main/trunk/src/audio/sound_manager.hpp ___________________________________________________________________ Deleted: svn:mergeinfo - Modified: m... [truncated message content] |
From: <hik...@us...> - 2010-03-15 23:00:41
|
Revision: 5002 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5002&view=rev Author: hikerstk Date: 2010-03-15 23:00:34 +0000 (Mon, 15 Mar 2010) Log Message: ----------- Started re-design of stk-config file. Modified Paths: -------------- main/trunk/data/stk_config.xml main/trunk/src/config/stk_config.cpp main/trunk/src/config/stk_config.hpp main/trunk/src/race/race_manager.cpp Modified: main/trunk/data/stk_config.xml =================================================================== --- main/trunk/data/stk_config.xml 2010-03-15 20:29:18 UTC (rev 5001) +++ main/trunk/data/stk_config.xml 2010-03-15 23:00:34 UTC (rev 5002) @@ -5,159 +5,130 @@ <!-- Minimum and maximum kart versions that can be used by this binary. Older version will be ignored. --> <kart-version min="2" max="2"/> + <!-- Minimum and maxium track versions that be be read by this binary. Older versions will be ignored. --> <track-version min="2" max="2"/> + <!-- Maximum number of karts to be used at the same time. This limit can easily be increased, but some tracks might not have valid start positions for those additional karts. --> - <max-karts value="8"/> - <!-- - <Scores =point="10 8 6 5 4 3 2 1"''> - grid-order="1" - title-music="main_theme.music" - mainmenu-background="st_title_screen.rgb st_title_screen2.rgb" - menu-background="menu_background.rgb menu_background2.rgb" - max-history="10000" - max-skidmarks="100" - skid-fadeout-time="60" - near-ground="2" - delay-finish-time="4" - music-credit-time="10" - final-camera-time="1.5" ---> -<!-- STK PARAMETERS + <karts max-number="8"/> + <!-- Scores are the number of points given when the race ends, + order is most-points-first or most-points-last. --> + <grand-prix scores="10 8 6 5 4 3 2 1" + order = "most-points-first"/> + <!-- Time in follow-the-leader after which karts are removed. + The last values applies for all remaining karts. --> + <follow-the-leader intervals="30 20 10"/> -min-track-version and max-track-version are the minimum and maximum .track -files supported, older/newer files are ignored. + <!-- The title music. --> + <music title="main_theme.music"/> -max-karts is maximum number of karts. -scores are the number of points given when the race ends. -grid-order is the grand prix order, 1 = most points 1st, 0 = least points 1st. -title-music is umm... the title music. + <!-- Mostly for debugging: maximum number of history entrie$a --> + <history max-frames="10000"/> -mainmenu-background and menu-background must have the same length, containing -all the possible main menu and background images. + <!-- Skidmark data: maximum number of skid marks, and + time for skidmars to fade out. --> + <skid-marks max-number="100" fadeout-time="60"/> + + <!-- Defines when the upright constraint should be acctive, it's + disables when the kart is more than this value from the track. --> + <near-ground distance="2"/> -max-history is the maximum number of history frames. + <!-- How long the end animation will be shown. --> + <delay-finish time="4"/> -max-skidmarks is the max. number o skidmarks per kart. -skid-fadeout-time is the time till the skid marks fade out + <!-- How long the music credits are shown. --> + <credits music="10"/> -near-ground is the distance above ground when the upright constraint will be -disabled to allow more violent explosions. + <!-- weight is the additional weight an anvil adds to a kart. + speed-factor is the additional slowdown caused by the anvil. + time is the time an anvil is active. --> + <anvil time="2.0" weight="150" speed-factor="0.2"/> -delay-finish-time is the delay till the race results are displayed -music-credit-time is the time for which the music credits are displayed -final-camera-time is the time for the final camera to reach it's destination + <!-- friction is the friction increase when a parachute is attached. + time is the time an attached parachute is active + time-other is the time a parachute attached from other kart works + done-fraction is the fraction of speed when lost will detach parachute --> + <parachute friction="2.0" time="4.0" time-other="8.0" done-fraction="0.7"/> ---> + <!-- time is the time till a bomb explodes. time-increase is the time added + to timer when bomb is passed on. --> + <bomb time="30.0" time-increase="-5.0"/> -<stk-parameters - min-kart-version="2" - max-kart-version="2" - min-track-version="2" - max-track-version="2" - max-karts="8" - scores="10 8 6 5 4 3 2 1" - grid-order="1" - title-music="main_theme.music" - mainmenu-background="st_title_screen.rgb st_title_screen2.rgb" - menu-background="menu_background.rgb menu_background2.rgb" - max-history="10000" - max-skidmarks="100" - skid-fadeout-time="60" - near-ground="2" - delay-finish-time="4" - music-credit-time="10" - final-camera-time="1.5" -/> + <!-- time is the time a zipper is active. force is the additional + zipper force. speed-gain is the one time additional speed. + max-speed-fraction is a factor multiplied to the maximum + speed on the terrain. --> + <zipper time="3.5" force="250.0" speed-gain="4.5" max-speed-fraction="2.0"/> -<!-- ATTACHMENT PARAMETERS + <!-- time: How long a switch is being effective. + items for each item list the index of the item it is switched with. + Order: item, banana, big-nitro, small-nitro, bubble-bum --> + <switch time="5" items="1 0 4 4 2"/> -anvil-weight is the additional weight an anvil adds to a kart -anvil-speed-factor is the additional slowdown caused by the anvil -parachute-friction is the friction increase when a parachute is attached -parachute-time is the time an attached parachute is active -parachute-time-other is the time a parachute attached from other kart works -parachute-done-fraction is the fraction of speed when lost will detach -parachute + <!-- Physics default values for all karts + ==================================== --> + <physics> + + <!-- gravity-center-shift is the shift of the chassis with regards to the center of + mass. E.g. with the the value commented out below the + chassis will be 30 cm higher than the center of mass - + or the center of mass will be 30 cm lower than the + middle of the chassis. So this effectively lowers the + center of mass, making the kart more stable and less + likely to topple over. Default (if nothing is defined + here) is that the center of the mass is at the very bottom + of the chassis. --> + <dimensions wheel-base="1.2" heightCOG="0.2"/> -bomb-time is the time till a bomb explodes -bomb-time-increase is the time added to timer when bomb is passed on -leader-intervals is the time till a kart is removed in follow leader mode -anvil-time is the time an anvil is active -zipper-time is the time a zipper is active -zipper-force is the additional zipper force -zipper-speed-gain is the one time additional speed -item-switch-time How long a switch is being effective. -switch-items for each item list the index of the item it is switched with. - Order: item, banana, big-nitro, small-nitro, bubble-bum ---> + <!-- time-full-steer is the time when a player's input goes from neutral + steering to extreme left or right. + time-full-steer-ai is the time for the AI to go from neutral steering to + extreme left (or right). This can be used to reduce + 'shaking' of AI karts caused by changing steering direction + too often. It also helps with making it easier to push the + AI karts (otherwise micro-corrections make this nearly + impossible). A value of 1/maxFPS / 2 will guarantee that + the wheel can go from -1 to +1 steering in one frame, + basically disabling this mechanism. --> + <steer time-full-steer="0.2" time-full-steer-ai="0.1" /> -<attachment-parameters - anvil-weight="150.0" - anvil-speed-factor="0.2" - parachute-friction="2.0" - parachute-time="4.0" - parachute-time-other="8.0" - parachute-done-fraction="0.7" - bomb-time="30.0" - bomb-time-increase="-5.0" - leader-intervals="30 20 10" - anvil-time="2.0" - zipper-time="3.5" - zipper-force="250.0" - zipper-speed-gain="4.5" - zipper-max-speed-fraction="2.0" - item-switch-time="5" - switch-items="1 0 4 4 2" -/> + <!-- power-boost is the increase in engine power, i.e. 1=plus 100% --> + <nitro power-boost="3"/> -<!-- GENERAL KART DEFAULTS + <!-- increase: multiplicative increase of skidding factor in each frame. + decrease: multiplicative decrease of skidding factor in each frame. + max: maximum skidding factor = maximum increase of steering angle. + time-till-max: Time till maximum skidding is reached. + visual: Additional graphical rotation of kart. --> + <skid increase="1.05" decrease="0.95" max="2.5" time-till-max="0.4" + visual="0.16"/> -time-full-steer = is the time when a player's input goes from neutral -steering to extreme left or right. + <!-- length: How far behind a kart slipstream works + collect-time: How many seconds of sstream give maximum benefit + use-time: How long the benefit will last. + add-power: Additional power due to sstreaming. 1 = +100% + min-speed: Minimum speed necessary for slipstream to take effect. --> + <slipstream length="10" collect-time="2" use-time="5" + add-power="3" min-speed="10" /> -time-full-steer-ai is the time for the AI to go from neutral steering to -extreme left (or right). This can be used to reduce 'shaking' of AI karts -caused by changing steering direction too often. It also helps with making it -easier to push the AI karts (otherwise micro-corrections make this nearly -impossible). A value of 1/maxFPS / 2 will guarantee that the wheel can go from --1 to +1 steering in one frame, basically disabling this mechanism. + <!-- min-speed-radius and max-speed-radius define the smallest turn + radius at lowest speed (4.64 m at speed 0) and at high speed + (13.5 m at speed 12 m/s). Maximum steering angles for speeds + in between will be interpolated. This allows for tighter turns + at lower speeds. The actual steering angle is dependent on the + wheel base of the kart: radius = wheel_base/sin(steering_angle) + By specifying the radius the steering behaviour can be defined + independent of the kart size. --> + <turn min-speed-radius="0 3" max-speed-radius="10 15.0"/> -gravity-center-shift is the shift of the chassis with regards to the center of -mass. E.g. with the the value commented out below the chassis will be 30 cm -higher than the center of mass - or the center of mass will be 30 cm lower -than the middle of the chassis. So this effectively lowers the center of -mass, making the kart more stable and less likely to topple over. Default (if -nothing is defined here) is that the center of the mass is at the very bottom -of the chassis! + </physics> +<!-- GENERAL KART DEFAULTS -nitro-power-boost is the increase in engine power, i.e. 1=plus 100% -skid-increase: multiplicative increase of skidding factor in each frame. -skid-decrease: multiplicative decrease of skidding factor in each frame. -skid-max: maximum skidding factor = maximum increase of steering angle. -time-till-max-skid: Time till maximum skidding is reached. -skid-visual: Additional graphical rotation of kart. -slipstream slipstream-length: How far behind a kart slipstream works -slipstream-collect-time: How many seconds of sstream give maximum benefit -slipstream-use-time: How long the benefit will last. -slipstream-add-power: Additional power due to sstreaming. 1 = +100% -slipstream-min-speed: Minimum speed necessary for slipstream to take effect. - -min-speed-radius and max-speed-radius define the smallest turn radius at -lowest speed (4.64 m at speed 0) and at high speed (13.5 m at speed 12 m/s). -Maximum steering angles for speeds in between will be interpolated. This -allows for tighter turns at lower speeds. The actual steering angle is -dependent on the wheel base of the kart: -radius = wheel_base/sin(steering_angle) -By specifying the radius the steering behaviour can be defined independent -of the kart size. - - engine-power and max-speed have 3 values, one for hard, medium and low difficulties; Max speed right now would be 116 101 90 km/h. Modified: main/trunk/src/config/stk_config.cpp =================================================================== --- main/trunk/src/config/stk_config.cpp 2010-03-15 20:29:18 UTC (rev 5001) +++ main/trunk/src/config/stk_config.cpp 2010-03-15 23:00:34 UTC (rev 5002) @@ -40,6 +40,7 @@ */ void STKConfig::load(const std::string &filename) { + init_defaults(); XMLNode *root = 0; try { @@ -86,18 +87,9 @@ fprintf(stderr,"No item switches defined in stk_config"); exit(-1); } - if(m_menu_background.size()==0) - { - fprintf(stderr,"No menu background defined in stk_config"); - exit(-1); - } - if(m_mainmenu_background.size()==0) - { - fprintf(stderr,"No mainmenu background defined in stk_config"); - exit(-1); - } - CHECK_NEG(m_max_karts, "max-karts" ); - CHECK_NEG(m_grid_order, "grid-order" ); + + CHECK_NEG(m_max_karts, "<karts max=..." ); + CHECK_NEG(m_gp_order, "grand-prix order=..." ); CHECK_NEG(m_parachute_friction, "parachute-friction" ); CHECK_NEG(m_parachute_done_fraction, "parachute-done-fraction" ); CHECK_NEG(m_parachute_time, "parachute-time" ); @@ -111,13 +103,12 @@ CHECK_NEG(m_zipper_speed_gain, "zipper-speed-gain" ); CHECK_NEG(m_zipper_max_speed_fraction, "zipper-max-speed-fraction" ); CHECK_NEG(m_item_switch_time, "item-switch-time" ); - CHECK_NEG(m_final_camera_time, "final-camera-time" ); CHECK_NEG(m_explosion_impulse, "explosion-impulse" ); CHECK_NEG(m_explosion_impulse_objects, "explosion-impulse-objects" ); CHECK_NEG(m_max_history, "max-history" ); CHECK_NEG(m_max_skidmarks, "max-skidmarks" ); - CHECK_NEG(m_min_kart_version, "min-kart-version" ); - CHECK_NEG(m_max_kart_version, "max-kart-version" ); + CHECK_NEG(m_min_kart_version, "<kart-version min...>" ); + CHECK_NEG(m_max_kart_version, "<kart-version max=...>" ); CHECK_NEG(m_min_track_version, "min-track-version" ); CHECK_NEG(m_max_track_version, "max-track-version" ); CHECK_NEG(m_skid_fadeout_time, "skid-fadeout-time" ); @@ -145,10 +136,9 @@ m_zipper_max_speed_fraction = m_music_credit_time = m_explosion_impulse = m_explosion_impulse_objects = m_delay_finish_time = m_skid_fadeout_time = - m_final_camera_time = m_near_ground = - m_item_switch_time = UNDEFINED; + m_near_ground = m_item_switch_time = UNDEFINED; m_max_karts = -100; - m_grid_order = -100; + m_gp_order = -100; m_max_history = -100; m_max_skidmarks = -100; m_min_kart_version = -100; @@ -163,90 +153,102 @@ } // init_defaults //----------------------------------------------------------------------------- -const std::string &STKConfig::getMainMenuPicture(int n) -{ - if(n>=0 && n<(int)m_mainmenu_background.size()) - return m_mainmenu_background[n]; - else - return m_mainmenu_background[0]; -} // getMainMenuPicture - -//----------------------------------------------------------------------------- -const std::string &STKConfig::getBackgroundPicture(int n) -{ - if(n>=0 && n<(int)m_menu_background.size()) - return m_menu_background[n]; - else - return m_menu_background[0]; -} // getBackgroundPicture - -//----------------------------------------------------------------------------- /** Extracts the actual information from a xml file. * \param xml Pointer to the xml data structure. */ void STKConfig::getAllData(const XMLNode * root) { - const XMLNode *node = root -> getNode("stk-parameters"); - if(!node) + // Get the values which are not part of the default KartProperties + // --------------------------------------------------------------- + if(const XMLNode *kart_node = root->getNode("kart-version")) { - std::ostringstream msg; - msg << "Couldn't load stk-parameters: no node."; - throw std::runtime_error(msg.str()); + kart_node->get("min", &m_min_kart_version); + kart_node->get("max", &m_max_kart_version); } - // Get the values which are not part of the default KartProperties - // --------------------------------------------------------------- + if(const XMLNode *node = root->getNode("track-version")) + { + node->get("min", &m_min_track_version); + node->get("max", &m_max_track_version); + } - node->get("min-kart-version", &m_min_kart_version); - node->get("max-kart-version", &m_max_kart_version); - node->get("min-track-version", &m_min_track_version); - node->get("max-track-version", &m_max_track_version); - node->get("max-karts", &m_max_karts); - node->get("scores", &m_scores); - node->get("grid-order", &m_grid_order); + if(const XMLNode *kart_node = root->getNode("karts")) + kart_node->get("max-number", &m_max_karts); - std::string title_music; - node->get("title-music", &title_music); - m_title_music = new MusicInformation(file_manager->getMusicFile(title_music)); + if(const XMLNode *gp_node = root->getNode("grand-prix")) + { + gp_node->get("scores", &m_scores); + std::string order; + gp_node->get("grid-order", &order); + m_gp_order = (order=="most-points-first"); + } - node->get("mainmenu-background", &m_mainmenu_background); - node->get("menu-background", &m_menu_background); - node->get("max-history", &m_max_history); - node->get("max-skidmarks", &m_max_skidmarks); - node->get("skid-fadeout-time", &m_skid_fadeout_time); - node->get("near-ground", &m_near_ground); - node->get("delay-finish-time", &m_delay_finish_time); - node->get("music-credit-time", &m_music_credit_time); - node->get("final-camera-time", &m_final_camera_time); + if(const XMLNode *leader_node= root->getNode("follow-the-leader")) + leader_node->get("intervals", &m_leader_intervals); + if(const XMLNode *music_node = root->getNode("grand-prix")) + { + std::string title_music; + music_node->get("title", &title_music); + m_title_music = new MusicInformation( + file_manager->getMusicFile(title_music) ); + } - node = root -> getNode("attachment-parameters"); - if(!node) + if(const XMLNode *history_node = root->getNode("history")) + history_node->get("max-frames", &m_max_history); + + if(const XMLNode *skidmarks_node = root->getNode("skid-marks")) { - std::ostringstream msg; - msg << "Couldn't load attachment-parameters: no node."; - throw std::runtime_error(msg.str()); + skidmarks_node->get("max-number", &m_max_skidmarks ); + skidmarks_node->get("fadeout-time", &m_skid_fadeout_time); } - node->get("anvil-weight", &m_anvil_weight); - node->get("anvil-speed-factor", &m_anvil_speed_factor); - node->get("parachute-friction", &m_parachute_friction); - node->get("parachute-time", &m_parachute_time); - node->get("parachute-time-other", &m_parachute_time_other); - node->get("parachute-done-fraction", &m_parachute_done_fraction); - node->get("bomb-time", &m_bomb_time); - node->get("bomb-time-increase", &m_bomb_time_increase); - node->get("leader-intervals", &m_leader_intervals); - node->get("switch-items", &m_switch_items); - node->get("anvil-time", &m_anvil_time); - node->get("zipper-time", &m_zipper_time); - node->get("zipper-force", &m_zipper_force); - node->get("zipper-speed-gain", &m_zipper_speed_gain); - node->get("zipper-max-speed-fraction", &m_zipper_max_speed_fraction); - node->get("item-switch-time", &m_item_switch_time); + if(const XMLNode *near_ground_node = root->getNode("near-ground")) + near_ground_node->get("distance", &m_near_ground); + if(const XMLNode *delay_finish_node= root->getNode("delay-finish")) + delay_finish_node->get("time", &m_delay_finish_time); - node = root -> getNode("misc-defaults"); + if(const XMLNode *credits_node= root->getNode("credits")) + credits_node->get("music", &m_music_credit_time); + + + if(const XMLNode *anvil_node= root->getNode("anvil")) + { + anvil_node->get("weight", &m_anvil_weight ); + anvil_node->get("speed-factor", &m_anvil_speed_factor); + anvil_node->get("time", &m_anvil_time ); + } + + if(const XMLNode *parachute_node= root->getNode("parachute")) + { + parachute_node->get("friction", &m_parachute_friction ); + parachute_node->get("time", &m_parachute_time ); + parachute_node->get("time-other", &m_parachute_time_other ); + parachute_node->get("done-fraction", &m_parachute_done_fraction); + } + + if(const XMLNode *bomb_node= root->getNode("bomb")) + { + bomb_node->get("time", &m_bomb_time); + bomb_node->get("time-increase", &m_bomb_time_increase); + } + + if(const XMLNode *zipper_node= root->getNode("zipper")) + { + zipper_node->get("time", &m_zipper_time ); + zipper_node->get("force", &m_zipper_force ); + zipper_node->get("speed-gain", &m_zipper_speed_gain ); + zipper_node->get("max-speed-fraction", &m_zipper_max_speed_fraction); + } + + if(const XMLNode *switch_node= root->getNode("switch")) + { + switch_node->get("items", &m_switch_items ); + switch_node->get("time", &m_item_switch_time); + } + + const XMLNode *node = root -> getNode("misc-defaults"); if(!node) { std::ostringstream msg; Modified: main/trunk/src/config/stk_config.hpp =================================================================== --- main/trunk/src/config/stk_config.hpp 2010-03-15 20:29:18 UTC (rev 5001) +++ main/trunk/src/config/stk_config.hpp 2010-03-15 23:00:34 UTC (rev 5002) @@ -57,8 +57,6 @@ float m_zipper_max_speed_fraction;/**<Fraction of max speed allowed past regular max speed */ float m_item_switch_time; /**< Time items will be switched. */ - float m_final_camera_time; /**<Time for the movement of the final - * camera. */ float m_explosion_impulse; /**<Impulse affecting each non-hit kart.*/ float m_explosion_impulse_objects;/**<Impulse of explosion on moving objects, e.g. road cones, ... */ @@ -67,7 +65,7 @@ float m_music_credit_time; /**<Time the music credits are displayed. */ int m_max_karts; /**<Maximum number of karts. */ - int m_grid_order; /**<Whether grand prix grid is in point + int m_gp_order; /**<Whether grand prix grid is in point or reverse point order. */ int m_max_history; /**<Maximum number of frames to save in a history files. */ @@ -92,10 +90,6 @@ MusicInformation *m_title_music; /**<Filename of the title music to play.*/ - std::vector<std::string> - m_mainmenu_background; /**<Picture used as menu background. */ - std::vector<std::string> - m_menu_background; /**<Picture used as background for other menus. */ /** Empty constructor. The actual work is done in load. */ STKConfig() {}; Modified: main/trunk/src/race/race_manager.cpp =================================================================== --- main/trunk/src/race/race_manager.cpp 2010-03-15 20:29:18 UTC (rev 5001) +++ main/trunk/src/race/race_manager.cpp 2010-03-15 23:00:34 UTC (rev 5002) @@ -241,7 +241,7 @@ std::sort(m_kart_status.begin()+offset, m_kart_status.end()); //reverse kart order if flagged in stk_config - if (stk_config->m_grid_order) + if (stk_config->m_gp_order) { std::reverse(m_kart_status.begin()+offset, m_kart_status.end()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-03-17 04:57:04
|
Revision: 5015 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5015&view=rev Author: hikerstk Date: 2010-03-17 04:56:57 +0000 (Wed, 17 Mar 2010) Log Message: ----------- Fixed typos in previous commit, fixed incorrect XML syntax in sfx.xml file. Modified Paths: -------------- main/trunk/data/sfx/sfx.xml main/trunk/src/audio/sfx_manager.cpp Modified: main/trunk/data/sfx/sfx.xml =================================================================== --- main/trunk/data/sfx/sfx.xml 2010-03-17 04:48:01 UTC (rev 5014) +++ main/trunk/data/sfx/sfx.xml 2010-03-17 04:56:57 UTC (rev 5015) @@ -1,4 +1,4 @@ - +<?xml version="1.0"?> <sfx-config> <!-- @@ -36,5 +36,5 @@ <sfx name="wee" filename="wee.ogg" volume="1.0" rolloff="0.1" positional="false" /> <sfx name="winner" filename="gp_end.ogg" volume="1.0" rolloff="0.1" positional="false" /> -<sfx-config/> +</sfx-config> Modified: main/trunk/src/audio/sfx_manager.cpp =================================================================== --- main/trunk/src/audio/sfx_manager.cpp 2010-03-17 04:48:01 UTC (rev 5014) +++ main/trunk/src/audio/sfx_manager.cpp 2010-03-17 04:56:57 UTC (rev 5015) @@ -113,7 +113,7 @@ { std::string sfx_config_name = file_manager->getSFXFile("sfx.xml"); XMLNode* root = file_manager->createXMLTree(sfx_config_name); - if (!root) + if (!root || root->getName()!="sfx-config") { std::cerr << "Could not read sounf effects XML file " << sfx_config_name.c_str() << std::endl; } @@ -355,7 +355,7 @@ * \param id Identifier of the sound effect to create. */ SFXBase* SFXManager::createSoundSource(const SFXBufferInfo& info, - const bool add_toS_FX_list) + const bool add_to_SFX_list) { bool positional = false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-03-19 01:02:46
|
Revision: 5024 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5024&view=rev Author: auria Date: 2010-03-19 01:02:40 +0000 (Fri, 19 Mar 2010) Log Message: ----------- Fixed keyboard configuration. For some reason, the code that sensed keyboard input disappear... weird Modified Paths: -------------- main/trunk/data/karts/gnu/gnu.challenge main/trunk/src/input/input_manager.cpp Modified: main/trunk/data/karts/gnu/gnu.challenge =================================================================== --- main/trunk/data/karts/gnu/gnu.challenge 2010-03-18 18:18:19 UTC (rev 5023) +++ main/trunk/data/karts/gnu/gnu.challenge 2010-03-19 01:02:40 UTC (rev 5024) @@ -4,14 +4,23 @@ id="snowmountain" name="Win a race on Snow Mountain" description="Win a 4 lap race on Snow Mountain against 4 'Racer' level AI kart." - depend-on="worldsend" - unlock-kart="gnu" - major="single" + + gp="dummy" + + depend-on="" + + unlock-mode="FOLLOW_LEADER" + major="grandprix" minor="quickrace" track="snowmountain" difficulty="hard" - laps="4" + karts="4" position="1" /> +<!-- + track="snowmountain" + major="single" + laps="1" +--> \ No newline at end of file Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2010-03-18 18:18:19 UTC (rev 5023) +++ main/trunk/src/input/input_manager.cpp 2010-03-19 01:02:40 UTC (rev 5024) @@ -183,26 +183,46 @@ */ void InputManager::inputSensing(Input::InputType type, int deviceID, int btnID, int axisDirection, int value) { +#if INPUT_MODE_DEBUG + std::cout << "INPUT SENSING... "; +#endif + bool store_new = true; // don't store if we're trying to do something like bindings keyboard keys on a gamepad - if(m_mode == INPUT_SENSE_KEYBOARD && type != Input::IT_KEYBOARD) store_new = false; - if(m_mode == INPUT_SENSE_GAMEPAD && type != Input::IT_STICKMOTION && type != Input::IT_STICKBUTTON) store_new = false; + if (m_mode == INPUT_SENSE_KEYBOARD && type != Input::IT_KEYBOARD) + { + store_new = false; + } + if (m_mode == INPUT_SENSE_GAMEPAD && type != Input::IT_STICKMOTION && type != Input::IT_STICKBUTTON) + { + store_new = false; + } + +#if INPUT_MODE_DEBUG + std::cout << (store_new ? "storing it" : "ignoring it") << "\n"; +#endif - if(store_new) + if (store_new) { + m_sensed_input->type = type; m_sensed_input->deviceID = deviceID; m_sensed_input->btnID = btnID; m_sensed_input->axisDirection = axisDirection; - if(type == Input::IT_STICKMOTION) + if (type == Input::IT_KEYBOARD) { + OptionsScreenInput::getInstance()->gotSensedInput(m_sensed_input); + return; + } + else if (type == Input::IT_STICKMOTION) + { std::cout << "%% storing new axis binding, value=" << value << " deviceID=" << deviceID << " btnID=" << btnID << " axisDirection=" << (axisDirection == Input::AD_NEGATIVE ? "-" : "+") << "\n"; } - else if(type == Input::IT_STICKBUTTON) + else if (type == Input::IT_STICKBUTTON) { std::cout << "%% storing new gamepad button binding value=" << value << " deviceID=" << deviceID << " btnID=" << btnID << "\n"; @@ -214,7 +234,7 @@ } } - if( type == Input::IT_STICKMOTION ) + if (type == Input::IT_STICKMOTION) { // It is necessary to test both ids because the center position is always positive (0) const int input_id = axisDirection*50 + btnID; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-03-19 04:23:40
|
Revision: 5029 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5029&view=rev Author: hikerstk Date: 2010-03-19 04:23:32 +0000 (Fri, 19 Mar 2010) Log Message: ----------- Converted all kart.xml files from lisp to .xml files. Modified Paths: -------------- main/trunk/data/karts/adiumy/kart.xml main/trunk/data/karts/elephpant/kart.xml main/trunk/data/karts/eviltux/kart.xml main/trunk/data/karts/gnu/kart.xml main/trunk/data/karts/gooey/kart.xml main/trunk/data/karts/hexley/kart.xml main/trunk/data/karts/mozilla/kart.xml main/trunk/data/karts/mriceblock/kart.xml main/trunk/data/karts/nolok/kart.xml main/trunk/data/karts/pidgin/kart.xml main/trunk/data/karts/puffy/kart.xml main/trunk/data/karts/tux/kart.xml main/trunk/data/karts/wilber/kart.xml main/trunk/data/stk_config.xml main/trunk/src/config/stk_config.cpp main/trunk/src/graphics/camera.cpp main/trunk/src/karts/kart_model.cpp main/trunk/src/karts/kart_model.hpp main/trunk/src/karts/kart_properties.cpp main/trunk/src/karts/kart_properties.hpp main/trunk/src/race/highscore_manager.cpp Modified: main/trunk/data/karts/adiumy/kart.xml =================================================================== --- main/trunk/data/karts/adiumy/kart.xml 2010-03-19 04:20:45 UTC (rev 5028) +++ main/trunk/data/karts/adiumy/kart.xml 2010-03-19 04:23:32 UTC (rev 5029) @@ -1,28 +1,23 @@ -(tuxkart-kart - (version 2) - (name "Adiumy") - (model-file "adiumy.b3d") - (icon-file "adiumyicon.png") - (shadow-file "adiumyshadow.png") - (groups "standard") - (rgb 0.462745 0.713725 0.023529) - (animation-left 1) - (animation-straight 6) - (animation-right 11) - (wheel-front-right - (position 0.402310 0.161885 0.161740) - (model "wheel-front-right.b3d") - ) - (wheel-front-left - (position -0.399104 0.161885 0.161703) - (model "wheel-front-left.b3d") - ) - (wheel-rear-right - (position 0.027891 0.076657 -0.378886) - (model "wheel-rear-right.b3d") - ) - (wheel-rear-left - (position -0.028688 0.076657 -0.378886) - (model "wheel-rear-left.b3d") - ) -) +<?xml version="1.0"?> +<kart name = "Elephpant" + version ="2" + name ="Adiumy" + model-file = "adiumy.b3d" + icon-file = "adiumyicon.png" + shadow-file = "adiumyshadow.png" + groups = "standard" + rgb = "0.462745 0.713725 0.023529"> + <animations left = "1" + straight = "6" + right = "11"/> + <wheels> + <front-right position = "0.402310 0.161885 0.161740" + model = "wheel-front-right.b3d" /> + <front-left position = "-0.399104 0.161885 0.161703" + model = "wheel-front-left.b3d" /> + <rear-right position = "0.027891 0.076657 -0.378886" + model = "wheel-rear-right.b3d" /> + <rear-left position = "-0.028688 0.076657 -0.378886" + model = "wheel-rear-left.b3d" /> + </wheels> +</kart> Modified: main/trunk/data/karts/elephpant/kart.xml =================================================================== --- main/trunk/data/karts/elephpant/kart.xml 2010-03-19 04:20:45 UTC (rev 5028) +++ main/trunk/data/karts/elephpant/kart.xml 2010-03-19 04:23:32 UTC (rev 5029) @@ -1,30 +1,24 @@ -(tuxkart-kart - (version 2) - (name "Elephpant") - (model-file "kart.b3d") - (icon-file "elephpanticon.png") - (shadow-file "elephpantshadow.png") - (groups "standard") - (rgb 0.462745 0.713725 0.023529) - (animation-left 1) - (animation-straight 11) - (animation-right 21) - (animation-start-winning 40) - (animation-end-winning 104) - (wheel-front-right - (position 0.253327 0.102258 0.468561) - (model "wheel-front-right.b3d") - ) - (wheel-front-left - (position -0.245315 0.102874 0.469806) - (model "wheel-front-left.b3d") - ) - (wheel-rear-right - (position 0.377162 0.139018 -0.470212) - (model "wheel-rear-right.b3d") - ) - (wheel-rear-left - (position -0.372574 0.139018 -0.470285) - (model "wheel-rear-left.b3d") - ) -) +<?xml version="1.0"?> +<kart name = "Elephpant" + version = "2" + model-file = "kart.b3d" + icon-file = "elephpanticon.png" + shadow-file = "elephpantshadow.png" + groups = "standard" + rgb = "0.462745 0.713725 0.023529"> + <animations left = "1" + straight = "11" + right = "21" + start-winning = "40" + end-winning = "104"/> + <wheels> + <front-right position = "0.253327 0.102258 0.468561" + model = "wheel-front-right.b3d" /> + <front-left position = "-0.245315 0.102874 0.469806" + model = "wheel-front-left.b3d" /> + <rear-right position = "0.377162 0.139018 -0.470212" + model = "wheel-rear-right.b3d" /> + <rear-left position = "-0.372574 0.139018 -0.470285" + model = "wheel-rear-left.b3d" /> + </wheels> +</kart> Modified: main/trunk/data/karts/eviltux/kart.xml =================================================================== --- main/trunk/data/karts/eviltux/kart.xml 2010-03-19 04:20:45 UTC (rev 5028) +++ main/trunk/data/karts/eviltux/kart.xml 2010-03-19 04:23:32 UTC (rev 5029) @@ -1,30 +1,20 @@ -;; -*- mode: lisp -*- - -(tuxkart-kart - (name "Eviltux") - (version 2) - (model-file "eviltux.b3d") - (icon-file "eviltuxicon.png") - (shadow-file "generickartshadow.png") - (groups "standard") - (engine-sound "small") - (rgb 0.3 0.1 0.6) - (wheel-front-right - (position 0.290000 0.123461 0.617000) - (model "wheel-front-right.b3d") - ) - (wheel-front-left - (position -0.289815 0.123513 0.616744) - (model "wheel-front-left.b3d") - ) - (wheel-rear-right - (position 0.296641 0.143240 -0.318647) - (model "wheel-rear-right.b3d") - ) - (wheel-rear-left - (position -0.297522 0.143240 -0.318647) - (model "wheel-rear-left.b3d") - ) - -) -;; EOF ;; +<?xml version="1.0"?> +<kart name = "Eviltux" + version = "2" + model-file = "eviltux.b3d" + icon-file = "eviltuxicon.png" + shadow-file = "generickartshadow.png" + groups = "standard" + engine-sound = "small" + rgb = "0.3 0.1 0.6" > + <wheels> + <front-right position = "0.290000 0.123461 0.617000" + model = "wheel-front-right.b3d" /> + <front-left position = "-0.289815 0.123513 0.616744" + model = "wheel-front-left.b3d" /> + <rear-right position = "0.296641 0.143240 -0.318647" + model = "wheel-rear-right.b3d" /> + <rear-left position = "-0.297522 0.143240 -0.318647" + model = "wheel-rear-left.b3d" /> + </wheels> +</kart> Modified: main/trunk/data/karts/gnu/kart.xml =================================================================== --- main/trunk/data/karts/gnu/kart.xml 2010-03-19 04:20:45 UTC (rev 5028) +++ main/trunk/data/karts/gnu/kart.xml 2010-03-19 04:23:32 UTC (rev 5029) @@ -1,32 +1,20 @@ -;; -*- mode: lisp -*- - -(tuxkart-kart - (name "Gnu") - (model-file "gnu.b3d") - (icon-file "gnuicon.png") - (shadow-file "gnushadow.png") - (version 2) - (groups "special") - (has-skidmarks #f) - - (rgb 1.0 0.964705 0.0) - - (wheel-front-right - (position 0.275697 0.112979 0.339242) - (model "wheel-front-right.b3d") - ) - (wheel-front-left - (position -0.294220 0.111252 0.337597) - (model "wheel-front-left.b3d") - ) - (wheel-rear-right - (position 0.300863 0.112090 -0.305902) - (model "wheel-rear-right.b3d") - ) - (wheel-rear-left - (position -0.315232 0.110255 -0.307547) - (model "wheel-rear-left.b3d") - ) - -) -;; EOF ;; +<?xml version="1.0"?> +<kart name = "Gnu" + model-file ="gnu.b3d" + icon-file ="gnuicon.png" + shadow-file ="gnushadow.png" + version = "2" + groups ="special" + has-skidmarks = "false" + rgb = "1.0 0.964705 0.0" /> + <wheels> + <front-right position = "0.275697 0.112979 0.339242" + model = "wheel-front-right.b3d" /> + <front-left position = "-0.294220 0.111252 0.337597" + model = "wheel-front-left.b3d" /> + <rear-right position = "0.300863 0.112090 -0.305902" + model = "wheel-rear-right.b3d" /> + <rear-left position = "-0.315232 0.110255 -0.307547" + model = "wheel-rear-left.b3d" /> + </wheels> +</kart> Modified: main/trunk/data/karts/gooey/kart.xml =================================================================== --- main/trunk/data/karts/gooey/kart.xml 2010-03-19 04:20:45 UTC (rev 5028) +++ main/trunk/data/karts/gooey/kart.xml 2010-03-19 04:23:32 UTC (rev 5029) @@ -1,30 +1,20 @@ -;; -*- mode: lisp -*- - -(tuxkart-kart - (name "Gooey") - (version 2) - (model-file "gooey.b3d") - (icon-file "gooeyicon.png") - (shadow-file "gooeyshadow.png") - (groups "standard") - (engine-sound "large") - (rgb 0.811764 0.015686 0.537254) - (wheel-front-right - (position 0.295805 0.134951 0.431543) - (model "wheel-front-right.b3d") - ) - (wheel-front-left - (position -0.298656 0.134951 0.431543) - (model "wheel-front-left.b3d") - ) - (wheel-rear-right - (position 0.342563 0.164941 -0.439540) - (model "wheel-rear-right.b3d") - ) - (wheel-rear-left - (position -0.345413 0.164941 -0.439540) - (model "wheel-rear-left.b3d") - ) - -) -;; EOF ;; +<?xml version="1.0"?> +<kart name = "Gooey" + version = "2" + model-file = "gooey.b3d" + icon-file = "gooeyicon.png" + shadow-file = "gooeyshadow.png" + groups = "standard" + engine-sound = "large" + rgb = "0.811764 0.015686 0.537254"> + <wheels> + <front-right position = "0.295805 0.134951 0.431543" + model = "wheel-front-right.b3d" /> + <front-left position = "-0.298656 0.134951 0.431543" + model = "wheel-front-left.b3d" /> + <rear-right position = "0.342563 0.164941 -0.439540" + model = "wheel-rear-right.b3d" /> + <rear-left position = "-0.345413 0.164941 -0.439540" + model = "wheel-rear-left.b3d" /> + </wheels> +</kart> Modified: main/trunk/data/karts/hexley/kart.xml =================================================================== --- main/trunk/data/karts/hexley/kart.xml 2010-03-19 04:20:45 UTC (rev 5028) +++ main/trunk/data/karts/hexley/kart.xml 2010-03-19 04:23:32 UTC (rev 5029) @@ -1,28 +1,19 @@ -;; -*- mode: lisp -*- +<?xml version="1.0"?> +<kart name = "Hexley" + version = "2" + model-file ="hexley.b3d" + icon-file ="hexleyicon.png" + shadow-file ="hexley2shadow.png" + rgb = "0.780392 0.231372 0.231372"> + <wheels> + <front-right position = "0.275697 0.112979 0.339242" + model = "wheel-front-right.b3d" /> + <front-left position = "-0.294220 0.111252 0.337597" + model = "wheel-front-left.b3d" /> + <rear-right position = "0.300863 0.112090 -0.305902" + model = "wheel-rear-right.b3d" /> + <rear-left position = "-0.315232 0.110255 -0.307547" + model = "wheel-rear-left.b3d" /> + <wheels> +</kart> -(tuxkart-kart - (name "Hexley") - (version 2) - (model-file "hexley.b3d") - (icon-file "hexleyicon.png") - (shadow-file "hexley2shadow.png") - (rgb 0.780392 0.231372 0.231372) - (wheel-front-right - (position 0.275697 0.112979 0.339242) - (model "wheel-front-right.b3d") - ) - (wheel-front-left - (position -0.294220 0.111252 0.337597) - (model "wheel-front-left.b3d") - ) - (wheel-rear-right - (position 0.300863 0.112090 -0.305902) - (model "wheel-rear-right.b3d") - ) - (wheel-rear-left - (position -0.315232 0.110255 -0.307547) - (model "wheel-rear-left.b3d") - ) - -) -;; EOF ;; Modified: main/trunk/data/karts/mozilla/kart.xml =================================================================== --- main/trunk/data/karts/mozilla/kart.xml 2010-03-19 04:20:45 UTC (rev 5028) +++ main/trunk/data/karts/mozilla/kart.xml 2010-03-19 04:23:32 UTC (rev 5029) @@ -1,30 +1,20 @@ -;; -*- mode: lisp -*- - -(tuxkart-kart - (name "Mozilla") - (version 2) - (model-file "mozilla.b3d") - (icon-file "mozillaicon.png") - (shadow-file "mozillashadow.png") - (groups "standard") - (engine-sound "large") - (rgb 1.0 0.77647 0.447058) - (wheel-front-right - (position 0.237866 0.114071 0.380136) - (model "wheel-front-right.b3d") - ) - (wheel-front-left - (position -0.238088 0.114071 0.380136) - (model "wheel-front-left.b3d") - ) - (wheel-rear-right - (position 0.364589 0.188269 -0.454568) - (model "wheel-rear-right.b3d") - ) - (wheel-rear-left - (position -0.364812 0.188269 -0.454568) - (model "wheel-rear-left.b3d") - ) - -) -;; EOF ;; +<?xml version="1.0"?> +<kart name = "Mozilla") + version = "2" + model-file = "mozilla.b3d" + icon-file = "mozillaicon.png" + shadow-file = "mozillashadow.png" + groups = "standard" + engine-sound ="large" + rgb = "1.0 0.77647 0.447058"> + <wheels> + <front-right position = "0.237866 0.114071 0.380136" + model = "wheel-front-right.b3d" /> + <front-left position = "-0.238088 0.114071 0.380136" + model = "wheel-front-left.b3d" /> + <rear-right position = "0.364589 0.188269 -0.454568" + model = "wheel-rear-right.b3d" /> + <rear-left position = "-0.364812 0.188269 -0.454568" + model = "wheel-rear-left.b3d" /> + </wheels> +</kart> Modified: main/trunk/data/karts/mriceblock/kart.xml =================================================================== --- main/trunk/data/karts/mriceblock/kart.xml 2010-03-19 04:20:45 UTC (rev 5028) +++ main/trunk/data/karts/mriceblock/kart.xml 2010-03-19 04:23:32 UTC (rev 5029) @@ -1,25 +1,19 @@ -(tuxkart-kart - (name "mr. iceblock") - (version 2) - (model-file "mriceblock.b3d") - (icon-file "mriceblockicon.png") - (shadow-file "mriceblockshadow.png") - (groups "standard") - (rgb 0.000000 0.870588 1.000000) - (wheel-front-right - (position 0.270099 0.116442 0.447726) - (model "wheel-front-right.b3d") - ) - (wheel-front-left - (position -0.284098 0.139798 0.443071) - (model "wheel-front-left.b3d") - ) - (wheel-rear-right - (position 0.301257 0.128311 -0.352108) - (model "wheel-rear-right.b3d") - ) - (wheel-rear-left - (position -0.312922 0.131780 -0.350504) - (model "wheel-rear-left.b3d") - ) -) +<?xml version="1.0"?> +<kart name = "mr. iceblock" + version 2) + model-file ="mriceblock.b3d" + icon-file ="mriceblockicon.png" + shadow-file ="mriceblockshadow.png" + groups ="standard" + rgb = "0.000000 0.870588 1.000000"> + <wheels> + <front-right position = "0.270099 0.116442 0.447726" + model ="wheel-front-right.b3d" /> + <front-left position = "-0.284098 0.139798 0.443071" + model = "wheel-front-left.b3d" /> + <rear-right position = "0.301257 0.128311 -0.352108" + model = "wheel-rear-right.b3d" /> + <rear-left position = "-0.312922 0.131780 -0.350504" + model = "wheel-rear-left.b3d" /> + </wheels> +</kart> Modified: main/trunk/data/karts/nolok/kart.xml =================================================================== --- main/trunk/data/karts/nolok/kart.xml 2010-03-19 04:20:45 UTC (rev 5028) +++ main/trunk/data/karts/nolok/kart.xml 2010-03-19 04:23:32 UTC (rev 5029) @@ -1,27 +1,19 @@ -;; -*- mode: lisp -*- - -(tuxkart-kart - (version 2) - (name "Nolok") - (model-file "nolok.b3d") - (icon-file "nolokicon.png") - (shadow-file "nolokshadow.png") - (groups "standard") - (rgb 0.121568 0.172549 0.054901) - (wheel-front-right - (position 0.192059 0.113489 0.443191) - (model "wheel-front-right.b3d") - ) - (wheel-front-left - (position -0.192059 0.113489 0.443191) - (model "wheel-front-left.b3d") - ) - (wheel-rear-right - (position 0.195518 0.145934 -0.415114) - (model "wheel-rear-right.b3d") - ) - (wheel-rear-left - (position -0.195518 0.145934 -0.415114) - (model "wheel-rear-left.b3d") - ) -) +<?xml version="1.0"?> +<kart name = "Nolok" + version = "2" + model-file = "nolok.b3d" + icon-file = "nolokicon.png" + shadow-file = "nolokshadow.png" + groups = "standard" + rgb = "0.121568 0.172549 0.054901" > + <wheels> + <front-right position = "0.192059 0.113489 0.443191" + model = "wheel-front-right.b3d" /> + <front-left position = "-0.192059 0.113489 0.443191" + model = "wheel-front-left.b3d" /> + <rear-right position = "0.195518 0.145934 -0.415114" + model = "wheel-rear-right.b3d" /> + <rear-left position = "-0.195518 0.145934 -0.415114" + model = "wheel-rear-left.b3d" /> + </wheels> +</kart> Modified: main/trunk/data/karts/pidgin/kart.xml =================================================================== --- main/trunk/data/karts/pidgin/kart.xml 2010-03-19 04:20:45 UTC (rev 5028) +++ main/trunk/data/karts/pidgin/kart.xml 2010-03-19 04:23:32 UTC (rev 5029) @@ -1,25 +1,19 @@ -(tuxkart-kart - (version 2) - (name "Pidgin") - (model-file "pidgin.b3d") - (icon-file "pidginicon.png") - (shadow-file "pidginshadow.png") - (groups "standard") - (rgb 0.364705 0.219607 0.396078) - (wheel-front-right - (position 0.257000 0.124375 0.303252) - (model "wheel-front-right.b3d") - ) - (wheel-front-left - (position -0.256601 0.124375 0.303252) - (model "wheel-front-left.b3d") - ) - (wheel-rear-right - (position 0.237290 0.170517 -0.437579) - (model "wheel-rear-right.b3d") - ) - (wheel-rear-left - (position -0.237000 0.170517 -0.4375797) - (model "wheel-rear-left.b3d") - ) -) +<?xml version="1.0"?> +<kart name = "Pidgin" + version = "2" + model-file = "pidgin.b3d" + icon-file = "pidginicon.png" + shadow-file = "pidginshadow.png" + groups = "standard" + rgb = "0.364705 0.219607 0.396078"> + <wheels> + <front-right position = "0.257000 0.124375 0.303252" + model = "wheel-front-right.b3d" /> + <front-left position = "-0.256601 0.124375 0.303252" + model = "wheel-front-left.b3d" /> + <rear-right position = "0.237290 0.170517 -0.437579" + model = "wheel-rear-right.b3d" /> + <rear-left position = "-0.237000 0.170517 -0.4375797" + model = "wheel-rear-left.b3d" /> + </wheels +</kart> Modified: main/trunk/data/karts/puffy/kart.xml =================================================================== --- main/trunk/data/karts/puffy/kart.xml 2010-03-19 04:20:45 UTC (rev 5028) +++ main/trunk/data/karts/puffy/kart.xml 2010-03-19 04:23:32 UTC (rev 5029) @@ -1,29 +1,19 @@ -(tuxkart-kart - (version 2) - (name "Puffy") - (model-file "puffy.b3d") - (icon-file "puffy-icon.png") - (shadow-file "puffy-shadow.png") - (groups "standard") - (rgb 0.12549 0.50196 0.12549) - (wheel-front-right -; (position 0.400000 0.100000 0.550000) - (position 0.400000 0.090000 0.550000) - (model "wheel-front-right.b3d") - ) - (wheel-front-left -; (position -0.400000 0.100000 0.550000) - (position -0.400000 0.090000 0.550000) - (model "wheel-front-left.b3d") - ) - (wheel-rear-right -; (position 0.400000 0.150000 -0.500000) - (position 0.400000 0.140000 -0.500000) - (model "wheel-rear-right.b3d") - ) - (wheel-rear-left -; (position -0.400000 0.150000 -0.500000) - (position -0.400000 0.140000 -0.500000) - (model "wheel-rear-left.b3d") - ) -) +<?xml version="1.0"?> +<kart name = "Puffy" + version = "2" + model-file = "puffy.b3d" + icon-file = "puffy-icon.png" + shadow-file = "puffy-shadow.png" + groups = "standard" + rgb = "0.12549 0.50196 0.12549"> + <wheels> + <front-right position = "0.400000 0.090000 0.550000" + model = "wheel-front-right.b3d" /> + <front-left position = "-0.400000 0.090000 0.550000" + model = "wheel-front-left.b3d" /> + <rear-right position = "0.400000 0.140000 -0.500000" + model = "wheel-rear-right.b3d" /> + <rear-left position = "-0.400000 0.140000 -0.500000" + model = "wheel-rear-left.b3d" /> + </wheels> +</kart> Modified: main/trunk/data/karts/tux/kart.xml =================================================================== --- main/trunk/data/karts/tux/kart.xml 2010-03-19 04:20:45 UTC (rev 5028) +++ main/trunk/data/karts/tux/kart.xml 2010-03-19 04:23:32 UTC (rev 5029) @@ -1,41 +1,30 @@ -;; -*- mode: lisp -*- - -(tuxkart-kart - (name "Tux") - (version 2) - (model-file "tux.b3d") - (icon-file "tuxicon.png") - (shadow-file "tuxkartshadow.png") - (groups "standard") - (engine-sound "small") - - (horn-sound "yeah.ogg") - (crash-sound "crash.ogg") - (shoot-sound "pass.ogg") - (win-sound "horn.ogg") - (explode-sound "explode.ogg") - (goo-sound "goo.ogg") - (pass-sound "pass.ogg") - (zipper-sound "zipper.ogg") - (name-sound "horn.ogg") - (attach-sound "uh-oh.ogg") - - (rgb 0.690196 0.0 0.0) - (wheel-front-right - (position 0.295 0.103 0.412) - (model "wheel-front-right.b3d") - ) - (wheel-front-left - (position -0.285 0.103 0.412) - (model "wheel-front-left.b3d") - ) - (wheel-rear-right - (position 0.361 0.143 -0.344) - (model "wheel-rear-right.b3d") - ) - (wheel-rear-left - (position -0.349 0.143 -0.344) - (model "wheel-rear-left.b3d") - ) -) -;; EOF ;; +<?xml version="1.0"?> +<kart name = "Tux" + version = "2" + model-file = "tux.b3d" + icon-file = "tuxicon.png" + shadow-file = "tuxkartshadow.png" + groups = "standard" + rgb = "0.690196 0.0 0.0" > + <sounds engine = "small" + horn = "yeah.ogg" + crash = "crash.ogg" + shoot = "pass.ogg" + win = "horn.ogg" + explode = "explode.ogg" + goo = "goo.ogg" + pass = "pass.ogg" + zipper = "zipper.ogg" + name = "horn.ogg" + attach = "uh-oh.ogg" /> + <wheels> + <front-right position = "0.295 0.103 0.412" + model = "wheel-front-right.b3d"/> + <front-left position = "-0.285 0.103 0.412" + model = "wheel-front-left.b3d" /> + <rear-right position = "0.361 0.143 -0.344" + model = "wheel-rear-right.b3d" /> + <rear-left position = "-0.349 0.143 -0.344" + model = "wheel-rear-left.b3d" /> + </wheels> +</kart> Modified: main/trunk/data/karts/wilber/kart.xml =================================================================== --- main/trunk/data/karts/wilber/kart.xml 2010-03-19 04:20:45 UTC (rev 5028) +++ main/trunk/data/karts/wilber/kart.xml 2010-03-19 04:23:32 UTC (rev 5029) @@ -1,30 +1,24 @@ -(tuxkart-kart - (version 2) - (name "Wilber") - (model-file "kart.b3d") - (icon-file "wilbericon.png") - (shadow-file "wilbershadow.png") - (groups "standard") - (rgb 0.811764 0.439215 0.058823) - (animation-left 1) - (animation-straight 11) - (animation-right 21) - (animation-start-winning 1) - (animation-end-winning 21) - (wheel-front-right - (position 0.313791 0.112673 0.326004) - (model "wheel-front-right.b3d") - ) - (wheel-front-left - (position -0.322693 0.112673 0.326289) - (model "wheel-front-left.b3d") - ) - (wheel-rear-right - (position 0.400584 0.133159 -0.318699) - (model "wheel-rear-right.b3d") - ) - (wheel-rear-left - (position -0.398359 0.133159 -0.318699) - (model "wheel-rear-left.b3d") - ) -) +<?xml version="1.0"?> +<kart name = "Wilber" + version = "2" + model-file = "kart.b3d" + icon-file = "wilbericon.png" + shadow-file = "wilbershadow.png" + groups = "standard" + rgb = "0.811764 0.439215 0.058823"> + <animations left = "1" + straight = "11" + right = "21" + start-winning = "1" + end-winning = "21" /> + <wheels> + <front-right position = "0.313791 0.112673 0.326004" + model = "wheel-front-right.b3d" /> + <front-left position = "-0.322693 0.112673 0.326289" + model = "wheel-front-left.b3d" /> + <rear-right position = "0.400584 0.133159 -0.318699" + model = "wheel-rear-right.b3d" /> + <rear-left position = "-0.398359 0.133159 -0.318699" + model = "wheel-rear-left.b3d" /> + </wheels> +</kart> Modified: main/trunk/data/stk_config.xml =================================================================== --- main/trunk/data/stk_config.xml 2010-03-19 04:20:45 UTC (rev 5028) +++ main/trunk/data/stk_config.xml 2010-03-19 04:23:32 UTC (rev 5029) @@ -1,4 +1,3 @@ - <?xml version="1.0"?> <config> @@ -69,37 +68,38 @@ Order: item, banana, big-nitro, small-nitro, bubble-bum --> <switch time="5" items="1 0 4 4 2"/> - <!-- Physics default values for all karts - ==================================== --> - <physics> + <!-- impulse is the push from explosions when karts aren't hit directly. + explosion-impulse-objects is the impulse for physics objects (smaller + ones like the cone, will be pushed way too far with normal impulse). --> + <explosion impulse="10000.0" impulse-objects="500.0" /> + + <!-- Networking - the current networking code is outdated and will not + work anymore - so for now don't enable this. --> + <networking enable="false"/> + + <!-- Default values for all karts + ============================ --> + <general-kart-defaults> - <!-- gravity-center-shift is the shift of the chassis with regards to the center of - mass. E.g. with the the value commented out below the - chassis will be 30 cm higher than the center of mass - - or the center of mass will be 30 cm lower than the - middle of the chassis. So this effectively lowers the - center of mass, making the kart more stable and less - likely to topple over. Default (if nothing is defined - here) is that the center of the mass is at the very bottom - of the chassis. --> - <dimensions wheel-base="1.2" heightCOG="0.2"/> + <!-- Kart's center point: + gravity-shift is the shift of the chassis with regards to the center of + mass. E.g. with the the value commented out below the + chassis will be 30 cm higher than the center of mass - + or the center of mass will be 30 cm lower than the + middle of the chassis. So this effectively lowers the + center of mass, making the kart more stable and less + likely to topple over. Default (if nothing is defined + here) is that the center of the mass is at the very bottom + of the chassis. --> + <center gravity-shift="0 0.3 0"/> - <!-- time-full-steer is the time when a player's input goes from neutral - steering to extreme left or right. - time-full-steer-ai is the time for the AI to go from neutral steering to - extreme left (or right). This can be used to reduce - 'shaking' of AI karts caused by changing steering direction - too often. It also helps with making it easier to push the - AI karts (otherwise micro-corrections make this nearly - impossible). A value of 1/maxFPS / 2 will guarantee that - the wheel can go from -1 to +1 steering in one frame, - basically disabling this mechanism. --> - <steer time-full-steer="0.2" time-full-steer-ai="0.1" /> + <!-- Camera: Distance between kart and camera. --> + <camera distance="1.5"/> - <!-- power-boost is the increase in engine power, i.e. 1=plus 100% --> + <!-- Nitro: power-boost is the increase in engine power, i.e. 1=plus 100% --> <nitro power-boost="3"/> - <!-- increase: multiplicative increase of skidding factor in each frame. + <!-- Skidding: increase: multiplicative increase of skidding factor in each frame. decrease: multiplicative decrease of skidding factor in each frame. max: maximum skidding factor = maximum increase of steering angle. time-till-max: Time till maximum skidding is reached. @@ -107,7 +107,7 @@ <skid increase="1.05" decrease="0.95" max="2.5" time-till-max="0.4" visual="0.16"/> - <!-- length: How far behind a kart slipstream works + <!-- Slipstream: length: How far behind a kart slipstream works collect-time: How many seconds of sstream give maximum benefit use-time: How long the benefit will last. add-power: Additional power due to sstreaming. 1 = +100% @@ -122,138 +122,103 @@ at lower speeds. The actual steering angle is dependent on the wheel base of the kart: radius = wheel_base/sin(steering_angle) By specifying the radius the steering behaviour can be defined - independent of the kart size. --> - <turn min-speed-radius="0 3" max-speed-radius="10 15.0"/> + independent of the kart size. + time-full-steer is the time when a player's input goes from neutral + steering to extreme left or right. + time-full-steer-ai is the time for the AI to go from neutral steering to + extreme left (or right). This can be used to reduce + 'shaking' of AI karts caused by changing steering direction + too often. It also helps with making it easier to push the + AI karts (otherwise micro-corrections make this nearly + impossible). A value of 1/maxFPS / 2 will guarantee that + the wheel can go from -1 to +1 steering in one frame, + basically disabling this mechanism. --> + <turn min-speed-radius="0 3" max-speed-radius="10 15.0" + time-full-steer ="0.2" time-full-steer-ai="0.1" /> - </physics> -<!-- GENERAL KART DEFAULTS + <!-- Speed and acceleration related values: power and max-speed (in m/s) + have 3 values, one for hard, medium and low difficulties. + brake-factor: Value used when braking. max-speed-reverse-ratio is + the percentage of max speed for reverse gear. --> + <engine power="400 400 300" max-speed="32.22 28 25" brake-factor="11.0" + max-speed-reverse-ratio="0.3"/> + <!-- Simulated gears: switch-ratio defines at what ratio of the maximum + speed what gear is selected, e.g. 0.25 means that if the speed is + bigger or equal to 0.25 x maxSpeed then use gear 1, 0.5 means if + the speed is bigger or equal to 0.5 x maxSpeed then gear 2. + gear-power-increase contains the increase in max power (to simulate + different gears), e.g. 2.5 as first entry means: 2.5*maxPower in gear 1 + | first | second | third | . --> + <gear switch-ratio="0.25 0.7 1.0" power-increase="2.2 1.7 1.3"/> -engine-power and max-speed have 3 values, one for hard, medium and low -difficulties; Max speed right now would be 116 101 90 km/h. + <!-- mass --> + <mass value="225"/> -mass: kart's mass -suspension-stiffness: kart's suspension stiffness + <!-- Suspension related values. stiffness: kart's suspension stiffness. + rest Length of suspension when at rest. travel-cm: maximum + movement of suspension - in cm!! --> + <suspension stiffness="248.0" rest="0.2" travel-cm="19"/> -max-speed-reverse-ratio is the percentage of max speed for reverse gear + <!-- Wheel related parameters: damping-relaxation/compression: for + bullet, damping parameters. Radius and width of wheel. + front-right, front-left, rear-right and rear-left give the + position of the physics raycast wheels relative to the center of + gravity. Default is to use the corners of the chassis to attach + the wheels to. --> + <wheels damping-relaxation="20" damping-compression="4.4" radius="0.25"> + <front-right position="0.38 0 0.6" /> + <front-left position="-0.38 0 0.6" /> + <rear-right position="0.38 0 -0.6" /> + <rear-left position="-0.38 0 -0.6"/> + </wheels> -jump-velocity is the z-axis velocity set when a jump is initiated. This -will cause the kart to start rising, till it is pulled back by gravity. -A higher value means higher Z velocity, meaning the kart will rise faster -and higher, and will be in the air longer + <!-- friction: slip used for bullet skidding. A high value + (like 10000000) disables bullet skidding. --> + <friction slip="10000000"/> -collision-side-impulse is an additional (artificial) impulse that pushes -the slower kart out of the way of the faster karts (i.e. sideways to the -faster kart) when a collision happens. This is for now disables, since -it needs tuning and additionally has the problem that the amount of push -a hit kart receives depends on the orientation - if a kart is pushed -in the direction it is driving, it will be more (no friction from tires), -while when pushed to the side, hardly anything happens. - -vert-rescue-offset is the z-axis offset when kart is being put back on track -after being rescued, it's a fraction of kart height + <!-- Values related to stability of the chassis: damping, and reduced + impact of roll. --> + <stability roll-influence="0.03" + chassis-linear-damping="0.2" + chassis-angular-damping="30.2"/> -gear-switch-ratio defines at what ratio of the maximum speed what gear is -selected, e.g. 0.25 means that if the speed is bigger or equal to 0.25 x -maxSpeed then use gear 1, 0.5 means if the speed is bigger or equal to 0.5 x -maxSpeed then gear 2. + <!-- Parameters for the upright constraint, which keeps karts upright. --> + <upright tolerance="0.2" max-force="30"/> -gear-power-increase contains the increase in max power (to simulate -different gears), e.g. 2.5 as first entry means: 2.5*maxPower in gear 1 -| first | second | third | . + <!-- An artificial force that pulls a wheel to the ground if its off + ground. Reduces the affect if a kart loses contact with the ground + (i.e. it then can't steer or accelerate anymore). --> + <track-connection-accel value="2"/> -wheel-front-right, wheel-front-left, wheel-rear-right and wheel-rear-left -give the position of the physics raycast wheels relative to the center of -gravity. Default is to use the corners of the chassis to attach the wheels -to. + <!-- jump-velocity is the z-axis velocity set when a jump is initiated. + This will cause the kart to start rising, till it is pulled back + by gravity. A higher value means higher Z velocity, meaning the + kart will rise faster and higher, and will be in the air longer. + Notice that jumps are currently disabled, so this value is ignored. --> + <jump velocity="3.0"/> -rubber-band-max-length is the maximum length of rubber band + <!-- collision-side-impulse is an additional (artificial) impulse that + pushes the slower kart out of the way of the faster karts (i.e. + sideways to the faster kart) when a collision happens. This is + for now disabled since it needs tuning and additionally has the + problem that the amount of push a hit kart receives depends on + the orientation - if a kart is pushed in the direction it is + driving, it will be more (no friction from tires), while when + pushed to the side, hardly anything happens. --> + <collision side-impulse="0"/> -rubber-band-force is the force a plunger/rubber band applies to the kart(s). + <!-- vert rescue offset: used to raise karts a bit higher before + releasing them on the ground after a rescue. Used to avoid + resetting karts into the track. Not sure if this is still + necessary. --> + <rescue vert-offset="0.0"/> -rubber-band-duration is the duration a rubber band acts. ---> - -<general-kart-defaults - wheel-base="1.2" - heightCOG="0.2" - time-full-steer="0.2" - time-full-steer-ai="0.1" - corn-f ="4" - corn-r="4" - gravity-center-shift="0 0.3 0" - nitro-power-boost="3" - - skid-increase="1.05" - skid-decrease="0.95" - skid-max="2.5" - time-till-max-skid="0.4" - skid-visual="0.16" - slipstream-length="10" - slipstream-collect-time="2" - slipstream-use-time="5" - slipstream-add-power="3" - slipstream-min-speed="10" - - brake-factor="11.0" - min-speed-radius="0 3" - max-speed-radius="10 15.0" - engine-power="400 400 300" - max-speed="32.22 28 25" - mass="225" - suspension-stiffness="248.0" - wheel-damping-relaxation="20" - wheel-damping-compression="4.4" - friction-slip="10000000" - roll-influence="0.03" - wheel-radius="0.25" - wheel-width="0.3" - chassis-linear-damping="0.2" - chassis-angular-damping="30.2" - max-speed-reverse-ratio="0.3" - suspension-rest="0.2" - suspension-travel-cm="19" - jump-velocity="3.0" - collision-side-impulse="0" - vert-rescue-offset="0.0" - wheel-front-right="0.38 0 0.6" - wheel-front-left="-0.38 0 0.6" - wheel-rear-right="0.38 0 -0.6" - wheel-rear-left="-0.38 0 -0.6" - gear-switch-ratio="0.25 0.7 1.0" - gear-power-increase="2.2 1.7 1.3" - upright-tolerance="0.2" - upright-max-force="30" - track-connection-accel="2" - rubber-band-max-length="50" - rubber-band-force="1500" - rubber-band-duration="1" - camera-max-accel="10" - camera-max-brake="10" - camera-distance="3.0" -/> - -<!-- MISC DEFAULTS - -shortcut-length is the length that when leaving the road and coming back on -it more than X 'meters" - later is considered to be a shortcut - -offroad-tolerance widens the road % for shortcut detection. - -enable-networking is a boolean value that enables / disables networking -explosion-impulse is the push from explosions when karts aren't hit directly -explosion-impulse-objects 500.0 is the impulse for physics objects (smaller -ones like the cone, will be pushed way too far ---> - -<misc-defaults - shortcut-length="90" - offroad-tolerance="0.15" - enable-networking="f" - explosion-impulse="10000.0" - explosion-impulse-objects="500.0" -/> - + <!-- Kart-specific rubber band handling: max-length is the + maximum length of rubber band before it snaps. force is + the force a plunger/rubber band applies to the kart(s). + duration is the duration a rubber band acts. --> + <rubber-band max-length="50" force="1500" duration="1"/> + + </general-kart-defaults> </config> - Modified: main/trunk/src/config/stk_config.cpp =================================================================== --- main/trunk/src/config/stk_config.cpp 2010-03-19 04:20:45 UTC (rev 5028) +++ main/trunk/src/config/stk_config.cpp 2010-03-19 04:23:32 UTC (rev 5029) @@ -248,21 +248,18 @@ switch_node->get("time", &m_item_switch_time); } - const XMLNode *node = root -> getNode("misc-defaults"); - if(!node) + if(const XMLNode *explosion_node= root->getNode("explosion")) { - std::ostringstream msg; - msg << "Couldn't load misc-defaults: no node."; - throw std::runtime_error(msg.str()); + explosion_node->get("impulse", &m_explosion_impulse ); + explosion_node->get("impulse-objects", &m_explosion_impulse_objects); } - node->get("explosion-impulse", &m_explosion_impulse); - node->get("explosion-impulse-objects", &m_explosion_impulse_objects); - node->get("enable-networking", &m_enable_networking); + if(const XMLNode *networking_node= root->getNode("networking")) + networking_node->get("enable", &m_enable_networking); // Get the default KartProperties // ------------------------------ - node = root -> getNode("general-kart-defaults"); + const XMLNode *node = root -> getNode("general-kart-defaults"); if(!node) { std::ostringstream msg; Modified: main/trunk/src/graphics/camera.cpp =================================================================== --- main/trunk/src/graphics/camera.cpp 2010-03-19 04:20:45 UTC (rev 5028) +++ main/trunk/src/graphics/camera.cpp 2010-03-19 04:23:32 UTC (rev 5029) @@ -38,7 +38,7 @@ m_index = camera_index; m_camera = irr_driver->addCameraSceneNode(); setupCamera(); - m_distance = kart->getKartProperties()->getCameraDistance() * 0.5f; + m_distance = kart->getKartProperties()->getCameraDistance(); m_kart = kart; m_ambient_light = World::getWorld()->getTrack()->getDefaultAmbientColor(); Modified: main/trunk/src/karts/kart_model.cpp =================================================================== --- main/trunk/src/karts/kart_model.cpp 2010-03-19 04:20:45 UTC (rev 5028) +++ main/trunk/src/karts/kart_model.cpp 2010-03-19 04:23:32 UTC (rev 5029) @@ -23,6 +23,7 @@ #include "config/user_config.hpp" #include "graphics/irr_driver.hpp" #include "graphics/mesh_tools.hpp" +#include "io/xml_node.hpp" #include "utils/constants.hpp" float KartModel::UNDEFINED = -99.9f; @@ -54,24 +55,30 @@ } // KartModel // ---------------------------------------------------------------------------- -/** This function loads the information about the kart from a lisp file. It +/** This function loads the information about the kart from a xml file. It * does not actually load the models (see load()). - * \param lisp Lisp object of configuration file. + * \param node XML object of configuration file. */ -void KartModel::loadInfo(const lisp::Lisp* lisp) +void KartModel::loadInfo(const XMLNode &node) { - lisp->get("model-file", m_model_filename ); - lisp->get("animation-left", m_animation_frame[AF_LEFT] ); - lisp->get("animation-straight", m_animation_frame[AF_STRAIGHT] ); - lisp->get("animation-right", m_animation_frame[AF_RIGHT] ); - lisp->get("animation-start-winning", m_animation_frame[AF_WIN_START]); - lisp->get("animation-end-winning", m_animation_frame[AF_WIN_END] ); - lisp->get("animation-speed", m_animation_speed ); + node.get("model-file", &m_model_filename); + if(const XMLNode *animation_node=node.getNode("animations")) + { + animation_node->get("left", &m_animation_frame[AF_LEFT] ); + animation_node->get("straight", &m_animation_frame[AF_STRAIGHT] ); + animation_node->get("right", &m_animation_frame[AF_RIGHT] ); + animation_node->get("start-winning", &m_animation_frame[AF_WIN_START]); + animation_node->get("end-winning", &m_animation_frame[AF_WIN_END] ); + animation_node->get("speed", &m_animation_speed ); + } - loadWheelInfo(lisp, "wheel-front-right", 0); - loadWheelInfo(lisp, "wheel-front-left", 1); - loadWheelInfo(lisp, "wheel-rear-right", 2); - loadWheelInfo(lisp, "wheel-rear-left", 3); + if(const XMLNode *wheels_node=node.getNode("wheels")) + { + loadWheelInfo(*wheels_node, "front-right", 0); + loadWheelInfo(*wheels_node, "front-left", 1); + loadWheelInfo(*wheels_node, "rear-right", 2); + loadWheelInfo(*wheels_node, "rear-left", 3); + } } // init // ---------------------------------------------------------------------------- /** Destructor. @@ -156,11 +163,11 @@ * \param wheel_name Name of the wheel, e.g. wheel-rear-left. * \param index Index of this wheel in the global m_wheel* fields. */ -void KartModel::loadWheelInfo(const lisp::Lisp* const lisp, +void KartModel::loadWheelInfo(const XMLNode &node, const std::string &wheel_name, int index) { - const lisp::Lisp* const wheel = lisp->getLisp(wheel_name); - if(!wheel) + const XMLNode *wheel_node = node.getNode(wheel_name); + if(!wheel_node) { // Only print the warning if a model filename is given. Otherwise the // stk_config file is read (which has no model information). @@ -172,11 +179,11 @@ } return; } - wheel->get("model", m_wheel_filename[index] ); - wheel->get("position", m_wheel_graphics_position[index]); - wheel->get("physics-position", m_wheel_physics_position[index] ); - wheel->get("min-suspension", m_min_suspension[index] ); - wheel->get("max-suspension", m_max_suspension[index] ); + wheel_node->get("model", &m_wheel_filename[index] ); + wheel_node->get("position", &m_wheel_graphics_position[index]); + wheel_node->get("physics-position", &m_wheel_physics_position[index] ); + wheel_node->get("min-suspension", &m_min_suspension[index] ); + wheel_node->get("max-suspension", &m_max_suspension[index] ); } // loadWheelInfo // ---------------------------------------------------------------------------- Modified: main/trunk/src/karts/kart_model.hpp =================================================================== --- main/trunk/src/karts/kart_model.hpp 2010-03-19 04:20:45 UTC (rev 5028) +++ main/trunk/src/karts/kart_model.hpp 2010-03-19 04:23:32 UTC (rev 5029) @@ -25,11 +25,11 @@ #include "irrlicht.h" using namespace irr; -#include "lisp/lisp.hpp" #include "utils/no_copy.hpp" #include "utils/vec3.hpp" class KartProperties; +class XMLNode; /** 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 @@ -107,13 +107,13 @@ float m_z_offset; /**< Models are usually not at z=0 (due * to the wheels), so this value moves * the karts down appropriately. */ - void loadWheelInfo(const lisp::Lisp* const lisp, + void loadWheelInfo(const XMLNode &node, const std::string &wheel_name, int index); public: KartModel(); ~KartModel(); - void loadInfo(const lisp::Lisp* lisp); + void loadInfo(const XMLNode &node); void loadModels(const KartProperties &kart_properties); void attachModel(scene::ISceneNode **node); scene::IAnimatedMesh* getModel() const { return m_mesh; } Modified: main/trunk/src/karts/kart_properties.cpp =================================================================== --- main/trunk/src/karts/kart_properties.cpp 2010-03-19 04:20:45 UTC (rev 5028) +++ main/trunk/src/karts/kart_properties.cpp 2010-03-19 04:23:32 UTC (rev 5029) @@ -29,8 +29,6 @@ #include "graphics/material_manager.hpp" #include "io/file_manager.hpp" #include "karts/kart_model.hpp" -#include "lisp/parser.hpp" -#include "lisp/lisp.hpp" #include "io/xml_node.hpp" #include "utils/string_utils.hpp" #include "utils/translation.hpp" @@ -71,7 +69,6 @@ m_rubber_band_max_length = m_rubber_band_force = m_rubber_band_duration = m_time_till_max_skid = m_skid_decrease = m_skid_increase = m_skid_visual = m_skid_max = - m_camera_max_accel = m_camera_max_brake = m_slipstream_length = m_slipstream_collect_time = m_slipstream_use_time = m_slipstream_add_power = m_slipstream_min_speed = m_camera_distance = UNDEFINED; @@ -83,7 +80,7 @@ m_engine_sfx_type = "engine_small"; // The default constructor for stk_config uses filename="" - if (filename != "") load(filename); + if (filename != "") load(filename, "kart"); } // KartProperties //----------------------------------------------------------------------------- @@ -95,25 +92,22 @@ //----------------------------------------------------------------------------- /** Loads the kart properties from a file. * \param filename Filename to load. - * \param node Name of the lisp node to load the data from - * (default: tuxkart-kart) + * \param node Name of the xml node to load the data from */ void KartProperties::load(const std::string &filename, const std::string &node) { - // Get the default values from STKConfig: *this = stk_config->getDefaultKartProperties(); -#if 0 const XMLNode * root = 0; - m_ident = StringUtils::basename(StringUtils::without_extension(filename)); - + m_root = StringUtils::getPath(filename); + m_ident = StringUtils::getBasename(StringUtils::removeExtension(filename)); + m_ident = StringUtils::getBasename(StringUtils::getPath(filename)); try { root = new XMLNode(filename); if(!root || root->getName()!="kart") { - if(root) delete root; std::ostringstream msg; msg << "Couldn't load kart properties '" << filename << "': no kart node."; @@ -121,33 +115,13 @@ } getAllData(root); } -#else - const lisp::Lisp* root = 0; - m_root = StringUtils::getPath(filename); - m_ident = StringUtils::getBasename(m_root); - - try - { - lisp::Parser parser; - root = parser.parse(filename); - - const lisp::Lisp* const LISP = root->getLisp(node); - if(!LISP) - { - std::ostringstream msg; - msg << "No '" << node << "' node found."; - throw std::runtime_error(msg.str()); - } - getAllData(LISP); - } -#endif catch(std::exception& err) { fprintf(stderr, "Error while parsing KartProperties '%s':\n", filename.c_str()); fprintf(stderr, "%s\n", err.what()); } - delete root; + if(root) delete root; // Set a default group (that has to happen after init_default and load) if(m_groups.size()==0) @@ -210,277 +184,205 @@ root->get("version", &m_version); std::string temp_name; - root->get("name", &temp_name); + root->get("name", &temp_name ); m_name = _(temp_name.c_str()); - root->get("icon-file", &m_icon_file); + root->get("icon-file", &m_icon_file ); root->get("shadow-file", &m_shadow_file); - Vec3 c; - root->get("rgb", &c); + root->get("rgb", &c ); + root->get("groups", &m_groups ); - std::string sfx_type_string; - root->get("engine-sound", &sfx_type_string); + //m_kart_model.loadInfo(lisp); - if (sfx_type_string == "large") + if(const XMLNode *dimensions_node = root->getNode("center")) + dimensions_node->get("gravity-shift", &m_gravity_center_shift); + + if(const XMLNode *nitro_node = root->getNode("nitro")) + nitro_node->get("power-boost", &m_nitro_power_boost); + + if(const XMLNode *skid_node = root->getNode("skid")) { - m_engine_sfx_type = "engine_large"; + skid_node->get("increase", &m_skid_increase ); + skid_node->get("decrease", &m_skid_decrease ); + skid_node->get("max", &m_skid_max ); + skid_node->get("time-till-max", &m_time_till_max_skid); + skid_node->get("visual", &m_skid_visual ); + skid_node->get("enable", &m_has_skidmarks ); } - else if (sfx_type_string == "small") + + if(const XMLNode *slipstream_node = root->getNode("slipstream")) { - m_engine_sfx_type = "engine_small"; + slipstream_node->get("length", &m_slipstream_length ); + slipstream_node->get("collect-time", &m_slipstream_collect_time); + slipstream_node->get("use-time", &m_slipstream_use_time ); + slipstream_node->get("add-power", &m_slipstream_add_power ); + slipstream_node->get("min-speed", &m_slipstream_min_speed ); } - root->get("has-skidmarks", &m_has_skidmarks); - root->get("groups", &m_groups); - root->get("time-full-steer", &m_time_full_steer); - root->get("time-full-steer-ai", &m_time_full_steer_ai); - root->get("gravity-center-shift", &m_gravity_center_shift); - root->get("nitro-power-boost", &m_nitro_power_boost); - root->get("skid-increase", &m_skid_increase); - root->get("skid-decrease", &m_skid_decrease); - root->get("skid-max", &m_skid_max); - root->get("time-till-max-skid", &m_time_till_max_skid); - root->get("skid-visual", &m_skid_visual); - root->get("slipstream-length", &m_slipstream_length); - root->get("slipstream-collect-time", &m_slipstream_collect_time); - root->get("slipstream-use-time", &m_slipstream_use_time); - root->get("slipstream-add-power", &m_slipstream_add_power); - root->get("slipstream-min-speed", &m_slipstream_min_speed); - root->get("brake-factor", &m_brake_factor); - - std::vector<float> v; - if(root->get("min-speed-radius", &v)) + if(const XMLNode *turn_node = root->getNode("turn")) { - if(v.size()!=2) - printf("Incorrect min-speed-radius specifications for kart '%s'\n", - getIdent().c_str()); - else + turn_node->get("time-full-steer", &m_time_full_steer ); + turn_node->get("time-full-steer-ai", &m_time_full_steer_ai); + std::vector<float> v; + if(turn_node->get("min-speed-radius", &v)) { - m_min_speed_turn = v[0]; - m_min_radius = v[1]; + if(v.size()!=2) + printf("Incorrect min-speed-radius specifications for kart '%s'\n", + getIdent().c_str()); + else + { + m_min_speed_turn = v[0]; + m_min_radius = v[1]; + } } - } - v.clear(); - if(root->get("max-speed-radius", &v)) - { - if(v.size()!=2) - printf("Incorrect max-speed-radius specifications for kart '%s'\n", - getIdent().c_str()); - else + v.clear(); + if(turn_node->get("max-speed-radius", &v)) { - m_max_speed_turn = v[0]; - m_max_radius = v[1]; + if(v.size()!=2) + printf("Incorrect max-speed-radius specifications for kart '%s'\n", + getIdent().c_str()); + else + { + m_max_speed_turn = v[0]; + m_max_radius = v[1]; + } } - } + } // if turn_node - v.clear(); - if( root->get("engine-power", &v)) + if(const XMLNode *engine_node = root->getNode("engine")) { - if(v.size()!=3) - printf("Incorrect engine-power specifications for kart '%s'\n", - getIdent().c_str()); - else + engine_node->get("brake-factor", &m_brake_factor); + engine_node->get("max-speed-reverse-ratio", &m_max_speed_reverse_ratio); + std::vector<float> v; + if( engine_node->get("power", &v)) { - m_engine_power[0] = v[0]; - m_engine_power[1] = v[1]; - m_engine_power[2] = v[2]; - } - } + if(v.size()!=3) + printf("Incorrect engine-power specifications for kart '%s'\n", + getIdent().c_str()); + else + { + m_engine_power[0] = v[0]; + m_engine_power[1] = v[1]; + m_engine_power[2] = v[2]; + } + } // if engine-power + v.clear(); + if( engine_node->get("max-speed", &v)) + { + if(v.size()!=3) + printf("Incorrect max-speed specifications for kart '%s'\n", + getIdent().c_str()); + else + { + m_max_speed[0] = v[0]; + m_max_speed[1] = v[1]; + m_max_speed[2] = v[2]; + } + } // if max-speed + } // if getNode("engine") - v.clear(); - if( root->get("max-speed", &v)) + if(const XMLNode *gear_node = root->getNode("gear")) { - if(v.size()!=3) - printf("Incorrect max-speed specifications for kart '%s'\n", - getIdent().c_str()); - else - { - m_max_speed[0] = v[0]; - m_max_speed[1] = v[1]; - m_max_speed[2] = v[2]; - } + gear_node->get("switch-ratio", &m_gear_switch_ratio ); + gear_node->get("power-increase", &m_gear_power_increase); } - root->get("mass", &m_mass); - root->get("suspension-stiffness", &m_suspension_stiffness); - root->get("wheel-damping-relaxation", &m_wheel_damping_relaxation); - root->get("wheel-damping-compression", &m_wheel_damping_compression); - root->get("friction-slip", &m_friction_slip); - root->get("roll-influence", &m_roll_influence); - root->get("wheel-radius", &m_wheel_radius); + if(const XMLNode *mass_node = root->getNode("mass")) + mass_node->get("value", &m_mass); - //TODO: wheel width is not loaded, yet is listed as an attribute in the xml file after wheel-radius? - root->get("chassis-linear-damping", &m_chassis_linear_damping); - root->get("chassis-angular-damping", &m_chassis_angular_damping); - root->get("max-speed-reverse-ratio", &m_max_speed_reverse_ratio); - root->get("suspension-rest", &m_suspension_rest); - root->get("suspension-travel-cm", &m_suspension_travel_cm); - root->get("jump-velocity", &m_jump_velocity); - root->get("collision-side-impulse", &m_collision_side_impulse); - root->get("vert-rescue-offset", &m_vert_rescue_offset); + if(const XMLNode *suspension_node = root->getNode("suspension")) + { + suspension_node->get("stiffness", &m_suspension_stiffness); + suspension_node->get("rest", &m_suspension_rest ); + suspension_node->get("travel-cm", &m_suspension_travel_cm); + } - //TODO: wheel front right and wheel front left is not loaded, yet is listed as an attribute in the xml file after wheel-radius - //TODO: same goes for their rear equivalents - - root->get("gear-switch-ratio", &m_gear_switch_ratio); - root->get("gear-power-increase", &m_gear_power_increase); - root->get("upright-tolerance", &m_upright_tolerance); - root->get("upright-max-force", &m_upright_max_force); - root->get("track-connection-accel", &m_track_connection_accel); - root->get("rubber-band-max-length", &m_rubber_band_max_length); - root->get("rubber-band-force", &m_rubber_band_force); - root->get("rubber-band-duration", &m_rubber_band_duration); - root->get("camera-max-accel", &m_camera_max_accel); - root->get("camera-max-brake", &m_camera_max_brake); - root->get("camera-distance", &m_camera_distance); -} - -// ---------------------------------------------------------------------------- -void KartProperties::getAllData(const lisp::Lisp* lisp) -{ - lisp->get("version", m_version); - //... [truncated message content] |
From: <au...@us...> - 2010-03-27 19:19:17
|
Revision: 5084 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5084&view=rev Author: auria Date: 2010-03-27 19:19:09 +0000 (Sat, 27 Mar 2010) Log Message: ----------- Added the ability to specify a case color (fixed mine to have black clear color). Not supported yet by track exporter Modified Paths: -------------- main/trunk/data/tracks/mines/scene.xml main/trunk/src/graphics/irr_driver.cpp main/trunk/src/modes/world.cpp main/trunk/src/modes/world.hpp main/trunk/src/tracks/track.cpp main/trunk/src/tracks/track.hpp Modified: main/trunk/data/tracks/mines/scene.xml =================================================================== --- main/trunk/data/tracks/mines/scene.xml 2010-03-27 18:49:35 UTC (rev 5083) +++ main/trunk/data/tracks/mines/scene.xml 2010-03-27 19:19:09 UTC (rev 5084) @@ -255,4 +255,6 @@ min-height="-6.716766"/> </checks> <camera far="100.0"/> + + <sky-color rgb="0 0 0 " /> </scene> Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2010-03-27 18:49:35 UTC (rev 5083) +++ main/trunk/src/graphics/irr_driver.cpp 2010-03-27 19:19:09 UTC (rev 5084) @@ -768,11 +768,21 @@ World *world = World::getWorld(); const bool inRace = world!=NULL; + // With bullet debug view we have to clear the back buffer, but // that's not necessary for non-debug - bool back_buffer_clear = inRace && world->getPhysics()->isDebug(); - m_device->getVideoDriver()->beginScene(back_buffer_clear, - true, video::SColor(255,100,101,140)); + bool back_buffer_clear = inRace && (world->getPhysics()->isDebug() || world->clearBackBuffer()); + + if (world != NULL) + { + m_device->getVideoDriver()->beginScene(back_buffer_clear, + true, world->getClearColor()); + } + else + { + m_device->getVideoDriver()->beginScene(back_buffer_clear, + true, video::SColor(255,100,101,140)); + } { // Just to mark the begin/end scene block GUIEngine::GameState state = StateManager::get()->getGameState(); Modified: main/trunk/src/modes/world.cpp =================================================================== --- main/trunk/src/modes/world.cpp 2010-03-27 18:49:35 UTC (rev 5083) +++ main/trunk/src/modes/world.cpp 2010-03-27 19:19:09 UTC (rev 5084) @@ -74,13 +74,14 @@ * after the constructor. Those functions must be called in the init() * function, which is called immediately after the constructor. */ -World::World() : WorldStatus() +World::World() : WorldStatus(), m_clear_color(255,100,101,140) { - m_physics = NULL; - m_race_gui = NULL; - m_use_highscores = true; - m_track = NULL; - + m_physics = NULL; + m_race_gui = NULL; + m_use_highscores = true; + m_track = NULL; + m_clear_back_buffer = false; + WorldStatus::setClockMode(CLOCK_CHRONO); } // World @@ -125,7 +126,7 @@ // Load the track models - this must be done before the karts so that the // karts can be positioned properly on (and not in) the tracks. - m_track->loadTrackModel(); + m_track->loadTrackModel(this); for(unsigned int i=0; i<num_karts; i++) { Modified: main/trunk/src/modes/world.hpp =================================================================== --- main/trunk/src/modes/world.hpp 2010-03-27 18:49:35 UTC (rev 5083) +++ main/trunk/src/modes/world.hpp 2010-03-27 19:19:09 UTC (rev 5084) @@ -121,6 +121,10 @@ /** Pointer to the race GUI. The race GUI is handedl by world. */ RaceGUI *m_race_gui; + bool m_clear_back_buffer; + + irr::video::SColor m_clear_color; + virtual void onGo(); /** Returns true if the race is over. Must be defined by all modes. */ virtual bool isRaceOver() = 0; @@ -246,6 +250,13 @@ * Array dimension must be the number of karts. */ virtual void raceResultOrder( int order[] ) = 0; + + bool clearBackBuffer() const { return m_clear_back_buffer; } + + const irr::video::SColor& getClearColor() const { return m_clear_color; } + void setClearBackBuffer(bool enabled) { m_clear_back_buffer = enabled; } + void setClearbackBufferColor(irr::video::SColor color) { m_clear_color = color; } + }; #endif Modified: main/trunk/src/tracks/track.cpp =================================================================== --- main/trunk/src/tracks/track.cpp 2010-03-27 18:49:35 UTC (rev 5083) +++ main/trunk/src/tracks/track.cpp 2010-03-27 19:19:09 UTC (rev 5084) @@ -625,7 +625,7 @@ * \param mode_id Which of the modes of a track to use. This determines which * scene, quad, and graph file to load. */ -void Track::loadTrackModel(unsigned int mode_id) +void Track::loadTrackModel(World* parent, unsigned int mode_id) { //m_is_arena = false; m_track_object_manager = new TrackObjectManager(); @@ -733,14 +733,14 @@ node->get("fog-start", &m_fog_start); node->get("fog-end", &m_fog_end); } - else if(name=="sky-dome" || name=="sky-box") + else if(name=="sky-dome" || name=="sky-box" || name=="sky-color") { handleSky(*node, path); } else { - fprintf(stderr, "Warning: element '%s' not found.\n", - node->getName().c_str()); + fprintf(stderr, "Warning: while loading track '%s', element '%s' was met but is unknown.\n", + m_ident.c_str(), node->getName().c_str()); } } @@ -776,6 +776,11 @@ { m_all_nodes.push_back(irr_driver->addSkyBox(m_sky_textures)); } + else if(m_sky_type==SKY_COLOR) + { + parent->setClearBackBuffer(true); + parent->setClearbackBufferColor(m_sky_color); + } file_manager->popTextureSearchPath(); file_manager->popModelSearchPath (); @@ -857,6 +862,12 @@ { m_sky_type = SKY_BOX; } + } + else if (xml_node.getName() == "sky-color") + { + m_sky_type = SKY_COLOR; + xml_node.get("rgb", &m_sky_color); + } // if sky-box } // handleSky Modified: main/trunk/src/tracks/track.hpp =================================================================== --- main/trunk/src/tracks/track.hpp 2010-03-27 18:49:35 UTC (rev 5083) +++ main/trunk/src/tracks/track.hpp 2010-03-27 19:19:09 UTC (rev 5084) @@ -48,6 +48,7 @@ class PhysicalObject; class TrackObjectManager; class TriangleMesh; +class World; class XMLNode; class Track @@ -91,12 +92,15 @@ /** The type of sky to be used for the track. */ enum {SKY_NONE, SKY_BOX, - SKY_DOME} m_sky_type; + SKY_DOME, SKY_COLOR} m_sky_type; /** A list of the textures for the sky to use. It contains one texture * in case of a dome, and 6 textures for a box. */ std::vector<std::string> m_sky_textures; + /** Used if m_sky_type is SKY_COLOR only */ + irr::video::SColor m_sky_color; + /** The list of all animated textures. */ std::vector<MovingTexture*> m_animated_textures; @@ -181,7 +185,7 @@ /** Returns the texture with the mini map for this track. */ const video::ITexture*getMiniMap () const { return m_mini_map; } const Vec3& trackToSpatial (const int SECTOR) const; - void loadTrackModel (unsigned int mode_id=0); + void loadTrackModel (World* parent, unsigned int mode_id=0); void addMusic (MusicInformation* mi) {m_music.push_back(mi); } float getGravity () const {return m_gravity; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-03-27 19:56:01
|
Revision: 5085 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5085&view=rev Author: auria Date: 2010-03-27 19:55:53 +0000 (Sat, 27 Mar 2010) Log Message: ----------- Allow skinning scrollbars Modified Paths: -------------- main/trunk/data/gui/skins/glass.stkskin main/trunk/src/guiengine/skin.cpp main/trunk/src/guiengine/skin.hpp Added Paths: ----------- main/trunk/data/gui/skins/glass/scrollbar_bg.png main/trunk/data/gui/skins/glass/scrollbar_btn.png main/trunk/data/gui/skins/glass/scrollbar_btn_down.png main/trunk/data/gui/skins/glass/scrollbar_thumb.png Added: main/trunk/data/gui/skins/glass/scrollbar_bg.png =================================================================== (Binary files differ) Property changes on: main/trunk/data/gui/skins/glass/scrollbar_bg.png ___________________________________________________________________ Added: svn:mime-type + image/png Added: main/trunk/data/gui/skins/glass/scrollbar_btn.png =================================================================== (Binary files differ) Property changes on: main/trunk/data/gui/skins/glass/scrollbar_btn.png ___________________________________________________________________ Added: svn:mime-type + image/png Added: main/trunk/data/gui/skins/glass/scrollbar_btn_down.png =================================================================== (Binary files differ) Property changes on: main/trunk/data/gui/skins/glass/scrollbar_btn_down.png ___________________________________________________________________ Added: svn:mime-type + image/png Added: main/trunk/data/gui/skins/glass/scrollbar_thumb.png =================================================================== (Binary files differ) Property changes on: main/trunk/data/gui/skins/glass/scrollbar_thumb.png ___________________________________________________________________ Added: svn:mime-type + image/png Modified: main/trunk/data/gui/skins/glass.stkskin =================================================================== --- main/trunk/data/gui/skins/glass.stkskin 2010-03-27 19:19:09 UTC (rev 5084) +++ main/trunk/data/gui/skins/glass.stkskin 2010-03-27 19:55:53 UTC (rev 5085) @@ -145,6 +145,16 @@ hborder_out_portion="1.0" vborder_out_portion="1.0" areas="body" /> +<!-- Scrollbars. Background and thumb have no state (always neutral state). + The buttons are the top and bottom arrows. Image must be top arrow, will + be mirrorred for bottom. Buttons can be in neutral or down state. + Advanced stretching is not used here. + --> +<element type="scrollbar_background" image="glass/scrollbar_bg.png" /> +<element type="scrollbar_thumb" image="glass/scrollbar_thumb.png" /> +<element type="scrollbar_button" image="glass/scrollbar_btn.png" /> +<element type="scrollbar_button" state="down" image="glass/scrollbar_btn_down.png" /> + <!-- Stateless --> <element type="section" image="glass/glass_section.png" left_border="15" right_border="15" top_border="15" bottom_border="15" Modified: main/trunk/src/guiengine/skin.cpp =================================================================== --- main/trunk/src/guiengine/skin.cpp 2010-03-27 19:19:09 UTC (rev 5084) +++ main/trunk/src/guiengine/skin.cpp 2010-03-27 19:55:53 UTC (rev 5085) @@ -184,6 +184,12 @@ } void BoxRenderParams::setTexture(ITexture* image) { + if (image == NULL) + { + fprintf(stderr, "/!\\ WARNING: missing image in skin\n"); + return; + } + this->image = image; /* The source texture is split this way to allow for a stretchable center and borders that don't stretch : @@ -322,8 +328,8 @@ BoxRenderParams& params, bool deactivated) { // check if widget moved. if so, recalculate coords - if(w->x != dest.UpperLeftCorner.X || w->y != dest.UpperLeftCorner.Y || - w->w != dest.getWidth() || w->h != dest.getHeight()) + if (w->x != dest.UpperLeftCorner.X || w->y != dest.UpperLeftCorner.Y || + w->w != dest.getWidth() || w->h != dest.getHeight()) { w->dest_areas_inited = false; w->dest_areas_yflip_inited = false; @@ -1091,23 +1097,87 @@ void Skin::drawScrollbarBackground(const irr::core::rect< irr::s32 > &rect) { - //TODO: allow skinning scrollbar - GUIEngine::getDriver()->draw2DRectangle( video::SColor(255,200,200,200), rect ); + // leave square space at both ends for up/down buttons (yeah, irrlicht doesn't handle that) + core::rect<s32> rect2 = rect; + rect2.UpperLeftCorner.Y += rect.getWidth(); + rect2.LowerRightCorner.Y -= rect.getWidth(); + + BoxRenderParams& p = SkinConfig::m_render_params["scrollbar_background::neutral"]; + + GUIEngine::getDriver()->draw2DImage(p.getImage(), rect2, p.source_area_center, + 0 /* no clipping */, 0, true /* alpha */); + + //drawBoxFromStretchableTexture(NULL, rect, SkinConfig::m_render_params["scrollbar_background::neutral"]); } void Skin::drawScrollbarThumb(const irr::core::rect< irr::s32 > &rect) { - //TODO: allow skinning scrollbar - GUIEngine::getDriver()->draw2DRectangle( video::SColor(255,0,150,0), rect ); + BoxRenderParams& p = SkinConfig::m_render_params["scrollbar_thumb::neutral"]; + + GUIEngine::getDriver()->draw2DImage(p.getImage(), rect, p.source_area_center, + 0 /* no clipping */, 0, true /* alpha */); + + //drawBoxFromStretchableTexture(NULL, rect, SkinConfig::m_render_params["scrollbar_thumb::neutral"]); } -void Skin::drawScrollbarButton(const irr::core::rect< irr::s32 > &rect, const bool pressed) +void Skin::drawScrollbarButton(const irr::core::rect< irr::s32 > &rect, const bool pressed, + const bool bottomArrow) { + /* //TODO: allow skinning scrollbar GUIEngine::getDriver()->draw2DRectangle( (pressed ? video::SColor(255, 0, 175, 0) : video::SColor(255, 150, 150, 150)), rect ); + */ + + if (pressed) + { + BoxRenderParams& p = SkinConfig::m_render_params["scrollbar_button::down"]; + + if (!bottomArrow) + { + GUIEngine::getDriver()->draw2DImage(p.getImage(), rect, p.source_area_center, + 0 /* no clipping */, 0, true /* alpha */); + } + else + { + // flip image + const irr::core::rect<irr::s32>& source_area = p.source_area_center; + const int x0 = source_area.UpperLeftCorner.X; + const int x1 = source_area.LowerRightCorner.X; + const int y0 = source_area.UpperLeftCorner.Y; + const int y1 = source_area.LowerRightCorner.Y; + + GUIEngine::getDriver()->draw2DImage(p.getImage(), rect, core::rect<irr::s32>(x0, y1, x1, y0), + 0 /* no clipping */, 0, true /* alpha */); + } + //drawBoxFromStretchableTexture(NULL, rect, SkinConfig::m_render_params["scrollbar_background::down"]); + } + else + { + BoxRenderParams& p = SkinConfig::m_render_params["scrollbar_button::neutral"]; + + if (!bottomArrow) + { + GUIEngine::getDriver()->draw2DImage(p.getImage(), rect, p.source_area_center, + 0 /* no clipping */, 0, true /* alpha */); + } + else + { + // flip image + const irr::core::rect<irr::s32>& source_area = p.source_area_center; + const int x0 = source_area.UpperLeftCorner.X; + const int x1 = source_area.LowerRightCorner.X; + const int y0 = source_area.UpperLeftCorner.Y; + const int y1 = source_area.LowerRightCorner.Y; + + GUIEngine::getDriver()->draw2DImage(p.getImage(), rect, core::rect<irr::s32>(x0, y1, x1, y0), + 0 /* no clipping */, 0, true /* alpha */); + } + //drawBoxFromStretchableTexture(NULL, rect, SkinConfig::m_render_params["scrollbar_background::neutral"]); + } + } #if 0 @@ -1155,7 +1225,12 @@ if (element->getType() == gui::EGUIET_BUTTON && element->getParent() != NULL && element->getParent()->getType() == EGUIET_SCROLL_BAR) { - drawScrollbarButton(rect, pressed); + const int parentHeight = element->getParent()->getRelativePosition().getHeight(); + const int y = element->getRelativePosition().UpperLeftCorner.Y; + + const bool bottomButton = (y > parentHeight/2); + + drawScrollbarButton(rect, pressed, bottomButton); } return; Modified: main/trunk/src/guiengine/skin.hpp =================================================================== --- main/trunk/src/guiengine/skin.hpp 2010-03-27 19:19:09 UTC (rev 5084) +++ main/trunk/src/guiengine/skin.hpp 2010-03-27 19:55:53 UTC (rev 5085) @@ -235,7 +235,7 @@ void drawScrollbarBackground(const irr::core::rect< irr::s32 > &rect); void drawScrollbarThumb(const irr::core::rect< irr::s32 > &rect); - void drawScrollbarButton(const irr::core::rect< irr::s32 > &rect, const bool pressed); + void drawScrollbarButton(const irr::core::rect< irr::s32 > &rect, const bool pressed, const bool bottomArrow); public: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-03-27 23:18:13
|
Revision: 5086 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5086&view=rev Author: auria Date: 2010-03-27 23:18:07 +0000 (Sat, 27 Mar 2010) Log Message: ----------- Cleanup : less publicly editable members in Widget, renamed the name of tabs in options because there was a name conflict, improved widget search into the tree Modified Paths: -------------- main/trunk/data/gui/options_av.stkgui main/trunk/data/gui/options_input.stkgui main/trunk/data/gui/options_players.stkgui main/trunk/src/guiengine/event_handler.cpp main/trunk/src/guiengine/screen.cpp main/trunk/src/guiengine/screen.hpp main/trunk/src/guiengine/screen_loader.cpp main/trunk/src/guiengine/widget.cpp main/trunk/src/guiengine/widget.hpp main/trunk/src/guiengine/widgets/button_widget.cpp main/trunk/src/guiengine/widgets/check_box_widget.cpp main/trunk/src/guiengine/widgets/dynamic_ribbon_widget.cpp main/trunk/src/guiengine/widgets/icon_button_widget.cpp main/trunk/src/guiengine/widgets/label_widget.cpp main/trunk/src/guiengine/widgets/list_widget.cpp main/trunk/src/guiengine/widgets/model_view_widget.cpp main/trunk/src/guiengine/widgets/ribbon_widget.cpp main/trunk/src/guiengine/widgets/spinner_widget.cpp main/trunk/src/guiengine/widgets/text_box_widget.cpp main/trunk/src/states_screens/kart_selection.cpp main/trunk/src/states_screens/options_screen_av.cpp main/trunk/src/states_screens/options_screen_input.cpp main/trunk/src/states_screens/options_screen_players.cpp Modified: main/trunk/data/gui/options_av.stkgui =================================================================== --- main/trunk/data/gui/options_av.stkgui 2010-03-27 19:55:53 UTC (rev 5085) +++ main/trunk/data/gui/options_av.stkgui 2010-03-27 23:18:07 UTC (rev 5086) @@ -6,11 +6,11 @@ <spacer height="15" width="10"/> <tabs id="options_choice" height="10%" max_height="110" width="100%" align="center"> - <icon-button id="audio_video" width="128" height="128" icon="gui/options_audio_video.png" + <icon-button id="tab_audio_video" width="128" height="128" icon="gui/options_audio_video.png" I18N="Section in the settings menu" text="Audio/Video"/> - <icon-button id="players" width="128" height="128" icon="gui/options_players.png" + <icon-button id="tab_players" width="128" height="128" icon="gui/options_players.png" I18N="Section in the settings menu" text="Players"/> - <icon-button id="controls" width="128" height="128" icon="gui/options_input.png" + <icon-button id="tab_controls" width="128" height="128" icon="gui/options_input.png" I18N="Section in the settings menu" text="Controls"/> </tabs> Modified: main/trunk/data/gui/options_input.stkgui =================================================================== --- main/trunk/data/gui/options_input.stkgui 2010-03-27 19:55:53 UTC (rev 5085) +++ main/trunk/data/gui/options_input.stkgui 2010-03-27 23:18:07 UTC (rev 5086) @@ -6,11 +6,11 @@ <spacer height="15" width="10"/> <tabs id="options_choice" height="10%" max_height="110" width="100%" align="center"> - <icon-button id="audio_video" width="128" height="128" icon="gui/options_audio_video.png" + <icon-button id="tab_audio_video" width="128" height="128" icon="gui/options_audio_video.png" I18N="Section in the settings menu" text="Audio/Video"/> - <icon-button id="players" width="128" height="128" icon="gui/options_players.png" + <icon-button id="tab_players" width="128" height="128" icon="gui/options_players.png" I18N="Section in the settings menu" text="Players"/> - <icon-button id="controls" width="128" height="128" icon="gui/options_input.png" + <icon-button id="tab_controls" width="128" height="128" icon="gui/options_input.png" I18N="Section in the settings menu" text="Controls"/> </tabs> Modified: main/trunk/data/gui/options_players.stkgui =================================================================== --- main/trunk/data/gui/options_players.stkgui 2010-03-27 19:55:53 UTC (rev 5085) +++ main/trunk/data/gui/options_players.stkgui 2010-03-27 23:18:07 UTC (rev 5086) @@ -6,11 +6,11 @@ <spacer height="15" width="10"/> <tabs id="options_choice" height="10%" max_height="110" width="100%" align="center"> - <icon-button id="audio_video" width="128" height="128" icon="gui/options_audio_video.png" + <icon-button id="tab_audio_video" width="128" height="128" icon="gui/options_audio_video.png" I18N="Section in the settings menu" text="Audio/Video"/> - <icon-button id="players" width="128" height="128" icon="gui/options_players.png" + <icon-button id="tab_players" width="128" height="128" icon="gui/options_players.png" I18N="Section in the settings menu" text="Players"/> - <icon-button id="controls" width="128" height="128" icon="gui/options_input.png" + <icon-button id="tab_controls" width="128" height="128" icon="gui/options_input.png" I18N="Section in the settings menu" text="Controls"/> </tabs> Modified: main/trunk/src/guiengine/event_handler.cpp =================================================================== --- main/trunk/src/guiengine/event_handler.cpp 2010-03-27 19:55:53 UTC (rev 5085) +++ main/trunk/src/guiengine/event_handler.cpp 2010-03-27 23:18:07 UTC (rev 5086) @@ -153,14 +153,9 @@ // we don't want that since we do our own custom processing for keys if (w->m_type == WTYPE_LIST) { - // cheap way to remove the focus from the element (nope, IGUIEnv::removeFocus doesn't work) - // Obviously will not work if the list if the first item of the screen. - GUIEngine::getGUIEnv()->setFocus( getCurrentScreen()->getFirstWidget()->getIrrlichtElement() ); - return EVENT_BLOCK; // confirms to irrLicht that we processed it + return EVENT_BLOCK; } - - //return w->focused(0); // is this still used with the new focus implementation? - + break; } case EGET_EDITBOX_ENTER: Modified: main/trunk/src/guiengine/screen.cpp =================================================================== --- main/trunk/src/guiengine/screen.cpp 2010-03-27 19:55:53 UTC (rev 5085) +++ main/trunk/src/guiengine/screen.cpp 2010-03-27 23:18:07 UTC (rev 5086) @@ -402,9 +402,9 @@ { Widget& widget = (*within_vector)[n]; - if(widget.m_properties[PROP_ID] == name) return &widget; + if (widget.m_properties[PROP_ID] == name) return &widget; - if(widget.m_type == WTYPE_DIV) + if (widget.searchInsideMe() && widget.m_children.size() > 0) { Widget* el = getWidget(name, &(widget.m_children)); if(el != NULL) return el; @@ -422,9 +422,9 @@ { Widget& widget = (*within_vector)[n]; - if(widget.m_element != NULL && widget.m_element->getID() == id) return &widget; + if (widget.m_element != NULL && widget.m_element->getID() == id) return &widget; - if(widget.m_children.size() > 0) + if (widget.searchInsideMe() && widget.m_children.size() > 0) { // std::cout << "widget = <" << widget.m_properties[PROP_ID].c_str() << "> widget.m_children.size()=" << widget.m_children.size() << std::endl; Widget* el = getWidget(id, &(widget.m_children)); @@ -443,7 +443,7 @@ { if (!within_vector->get(i)->m_focusable) continue; - // if container, also checks children + // if container, also checks children (FIXME: don't hardcode which types to avoid descending into) if (within_vector->get(i)->m_children.size() > 0 && within_vector->get(i)->m_type != WTYPE_RIBBON && within_vector->get(i)->m_type != WTYPE_SPINNER) Modified: main/trunk/src/guiengine/screen.hpp =================================================================== --- main/trunk/src/guiengine/screen.hpp 2010-03-27 19:55:53 UTC (rev 5085) +++ main/trunk/src/guiengine/screen.hpp 2010-03-27 23:18:07 UTC (rev 5086) @@ -116,7 +116,14 @@ /** returns an object by name, casted to specified type, or NULL if not found/wrong type */ template <typename T> T* getWidget(const char* name) { - return dynamic_cast<T*>( getWidget(name) ); + Widget* out = getWidget(name); + T* outCasted = dynamic_cast<T*>( out ); + if (out != NULL && outCasted == NULL) + { + fprintf(stderr, "Screen::getWidget : Widget '%s' of type '%s' cannot be casted to " + "requested type '%s'!\n", name, typeid(*out).name(), typeid(T).name()); + } + return outCasted; } static Widget* getWidget(const char* name, ptr_vector<Widget>* within_vector); Modified: main/trunk/src/guiengine/screen_loader.cpp =================================================================== --- main/trunk/src/guiengine/screen_loader.cpp 2010-03-27 19:55:53 UTC (rev 5085) +++ main/trunk/src/guiengine/screen_loader.cpp 2010-03-27 23:18:07 UTC (rev 5086) @@ -57,8 +57,7 @@ /* find which type of widget is specified by the current tag, and instanciate it */ if (!strcmp("div", xml->getNodeName())) { - Widget* w = new Widget(); - w->m_type = WTYPE_DIV; + Widget* w = new Widget(WTYPE_DIV); append_to.push_back(w); } else if (!strcmp("stkgui", xml->getNodeName())) @@ -68,14 +67,12 @@ } else if (!strcmp("placeholder", xml->getNodeName())) { - Widget* w = new Widget(true); - w->m_type = WTYPE_DIV; + Widget* w = new Widget(WTYPE_DIV, true); append_to.push_back(w); } else if (!strcmp("box", xml->getNodeName())) { - Widget* w = new Widget(); - w->m_type = WTYPE_DIV; + Widget* w = new Widget(WTYPE_DIV); w->m_show_bounding_box = true; append_to.push_back(w); } @@ -126,7 +123,7 @@ } else if (!strcmp("spacer", xml->getNodeName())) { - append_to.push_back(new Widget()); + append_to.push_back(new Widget(WTYPE_NONE)); } else if (!strcmp("ribbon_grid", xml->getNodeName())) { @@ -195,8 +192,10 @@ } /* a new div starts here, continue parsing with this new div as new parent */ - if( widget.m_type == WTYPE_DIV || widget.m_type == WTYPE_RIBBON) + if (widget.getType() == WTYPE_DIV || widget.getType() == WTYPE_RIBBON) + { parseScreenFileDiv( xml, append_to[append_to.size()-1].m_children ); + } }// end case EXN_ELEMENT break; Modified: main/trunk/src/guiengine/widget.cpp =================================================================== --- main/trunk/src/guiengine/widget.cpp 2010-03-27 19:55:53 UTC (rev 5085) +++ main/trunk/src/guiengine/widget.cpp 2010-03-27 23:18:07 UTC (rev 5086) @@ -57,7 +57,7 @@ // ----------------------------------------------------------------------------- -Widget::Widget(bool reserve_id) +Widget::Widget(WidgetType type, bool reserve_id) { m_magic_number = 0xCAFEC001; @@ -68,7 +68,7 @@ id = -1; m_element = NULL; m_title_font = false; - m_type = WTYPE_NONE; + m_type = type; m_focusable = true; m_event_handler = NULL; @@ -85,9 +85,12 @@ m_selected[n] = false; } - m_reserved_id = -1; - m_deactivated = false; - m_badges = 0; + m_reserved_id = -1; + m_deactivated = false; + m_badges = 0; + + // set a default value, derivates can override this as they wish + m_check_inside_me = (m_type == WTYPE_DIV); } // ----------------------------------------------------------------------------- Modified: main/trunk/src/guiengine/widget.hpp =================================================================== --- main/trunk/src/guiengine/widget.hpp 2010-03-27 19:55:53 UTC (rev 5085) +++ main/trunk/src/guiengine/widget.hpp 2010-03-27 23:18:07 UTC (rev 5086) @@ -121,6 +121,12 @@ bool m_selected[MAX_PLAYER_COUNT]; /** + * Whether to descend in the children of this widget when searching a widget + * from its ID or name. (children classes can override this value as they please) + */ + bool m_check_inside_me; + + /** * called when left/right keys pressed and focus is on widget. * Returns 'EVENT_LET' if user's event handler should be notified of a change. * Override in children to be notified of left/right events and/or make @@ -191,6 +197,10 @@ * if/how much space must be added to the raw label's size for the widget to be large enough */ virtual int getHeightNeededAroundLabel() const { return 0; } + + /** Type of this widget */ + WidgetType m_type; + public: /** * This is set to NULL by default; set to something else in a widget to mean @@ -241,7 +251,7 @@ /** A simple flag that can be raised to hide this widget */ bool m_deactivated; - Widget(bool reserve_id = false); + Widget(WidgetType type, bool reserve_id = false); virtual ~Widget(); /** @@ -278,10 +288,7 @@ * one irrlicht widgets (e.g. Spinner) */ ptr_vector<Widget> m_children; - - /** Type of this widget */ - WidgetType m_type; - + /** A map that holds values for all specified widget properties (in the XML file)*/ std::map<Property, std::string> m_properties; @@ -309,6 +316,8 @@ */ virtual void move(const int x, const int y, const int w, const int h); + /** \return Type of this widget */ + WidgetType getType() const { return m_type; } bool isSelected(const int playerID) const { return m_selected[playerID]; } @@ -344,6 +353,8 @@ * Called when irrLicht widgets cleared. Forget all references to them, they're no more valid. */ virtual void elementRemoved(); + + bool searchInsideMe() const { return m_check_inside_me; } }; Modified: main/trunk/src/guiengine/widgets/button_widget.cpp =================================================================== --- main/trunk/src/guiengine/widgets/button_widget.cpp 2010-03-27 19:55:53 UTC (rev 5085) +++ main/trunk/src/guiengine/widgets/button_widget.cpp 2010-03-27 23:18:07 UTC (rev 5086) @@ -20,11 +20,14 @@ using namespace GUIEngine; using namespace irr::core; -ButtonWidget::ButtonWidget() +// ----------------------------------------------------------------------------- + +ButtonWidget::ButtonWidget() : Widget(WTYPE_BUTTON) { - m_type = WTYPE_BUTTON; } + // ----------------------------------------------------------------------------- + void ButtonWidget::add() { rect<s32> widget_size = rect<s32>(x, y, x + w, y + h); @@ -35,10 +38,14 @@ m_element->setTabOrder(id); m_element->setTabGroup(false); } + // ----------------------------------------------------------------------------- + void ButtonWidget::setLabel(irr::core::stringw label) { m_element->setText( label.c_str() ); m_text = label; } +// ----------------------------------------------------------------------------- + Modified: main/trunk/src/guiengine/widgets/check_box_widget.cpp =================================================================== --- main/trunk/src/guiengine/widgets/check_box_widget.cpp 2010-03-27 19:55:53 UTC (rev 5085) +++ main/trunk/src/guiengine/widgets/check_box_widget.cpp 2010-03-27 23:18:07 UTC (rev 5086) @@ -20,13 +20,16 @@ using namespace GUIEngine; using namespace irr::core; -CheckBoxWidget::CheckBoxWidget() +// ----------------------------------------------------------------------------- + +CheckBoxWidget::CheckBoxWidget() : Widget(WTYPE_CHECKBOX) { m_state = true; m_event_handler = this; - m_type = WTYPE_CHECKBOX; } + // ----------------------------------------------------------------------------- + void CheckBoxWidget::add() { rect<s32> widget_size = rect<s32>(x, y, x + w, y + h); Modified: main/trunk/src/guiengine/widgets/dynamic_ribbon_widget.cpp =================================================================== --- main/trunk/src/guiengine/widgets/dynamic_ribbon_widget.cpp 2010-03-27 19:55:53 UTC (rev 5085) +++ main/trunk/src/guiengine/widgets/dynamic_ribbon_widget.cpp 2010-03-27 23:18:07 UTC (rev 5086) @@ -31,7 +31,7 @@ const char* DynamicRibbonWidget::NO_ITEM_ID = "?"; -DynamicRibbonWidget::DynamicRibbonWidget(const bool combo, const bool multi_row) +DynamicRibbonWidget::DynamicRibbonWidget(const bool combo, const bool multi_row) : Widget(WTYPE_DYNAMIC_RIBBON) { m_scroll_offset = 0; m_needed_cols = 0; @@ -42,8 +42,9 @@ m_has_label = false; m_left_widget = NULL; m_right_widget = NULL; - m_type = WTYPE_DYNAMIC_RIBBON; + m_check_inside_me = true; + // by default, set all players to have no selection in this ribbon for (int n=0; n<MAX_PLAYER_COUNT; n++) { @@ -101,8 +102,8 @@ delete m_left_widget; delete m_right_widget; } - m_left_widget = new Widget(); - m_right_widget = new Widget(); + m_left_widget = new Widget(WTYPE_NONE); + m_right_widget = new Widget(WTYPE_NONE); const int average_y = y + (h-m_label_height)/2; m_arrows_w = 30; Modified: main/trunk/src/guiengine/widgets/icon_button_widget.cpp =================================================================== --- main/trunk/src/guiengine/widgets/icon_button_widget.cpp 2010-03-27 19:55:53 UTC (rev 5085) +++ main/trunk/src/guiengine/widgets/icon_button_widget.cpp 2010-03-27 23:18:07 UTC (rev 5086) @@ -25,11 +25,10 @@ // ----------------------------------------------------------------------------- IconButtonWidget::IconButtonWidget(ScaleMode scale_mode, const bool tab_stop, - const bool focusable, IconPathType pathType) + const bool focusable, IconPathType pathType) : Widget(WTYPE_ICON_BUTTON) { m_label = NULL; m_texture = NULL; - m_type = WTYPE_ICON_BUTTON; m_custom_aspect_ratio = 1.0f; m_tab_stop = tab_stop; Modified: main/trunk/src/guiengine/widgets/label_widget.cpp =================================================================== --- main/trunk/src/guiengine/widgets/label_widget.cpp 2010-03-27 19:55:53 UTC (rev 5085) +++ main/trunk/src/guiengine/widgets/label_widget.cpp 2010-03-27 23:18:07 UTC (rev 5086) @@ -21,13 +21,16 @@ using namespace irr::core; using namespace irr::gui; -LabelWidget::LabelWidget(bool title) +// ----------------------------------------------------------------------------- + +LabelWidget::LabelWidget(bool title) : Widget(WTYPE_LABEL) { - m_type = WTYPE_LABEL; m_title_font = title; m_has_color = false; } + // ----------------------------------------------------------------------------- + void LabelWidget::add() { rect<s32> widget_size = rect<s32>(x, y, x + w, y + h); Modified: main/trunk/src/guiengine/widgets/list_widget.cpp =================================================================== --- main/trunk/src/guiengine/widgets/list_widget.cpp 2010-03-27 19:55:53 UTC (rev 5085) +++ main/trunk/src/guiengine/widgets/list_widget.cpp 2010-03-27 23:18:07 UTC (rev 5086) @@ -21,18 +21,23 @@ using namespace irr::core; using namespace irr::gui; -ListWidget::ListWidget() +// ----------------------------------------------------------------------------- + +ListWidget::ListWidget() : Widget(WTYPE_LIST) { - m_type = WTYPE_LIST; } + // ----------------------------------------------------------------------------- + void ListWidget::add() { rect<s32> widget_size = rect<s32>(x, y, x + w, y + h); m_element = GUIEngine::getGUIEnv()->addListBox (widget_size, m_parent, getNewID()); } + // ----------------------------------------------------------------------------- + void ListWidget::clear() { IGUIListBox* list = getIrrlichtElement<IGUIListBox>(); @@ -40,6 +45,7 @@ list->clear(); } + // ----------------------------------------------------------------------------- /* // Doesn't work, I would need to override CGUIListBox, but this class is private bool ListWidget::OnEvent (const SEvent &event) @@ -57,28 +63,36 @@ } } */ + // ----------------------------------------------------------------------------- + void ListWidget::addItem(const char* item) { IGUIListBox* list = getIrrlichtElement<IGUIListBox>(); assert(list != NULL); list->addItem( stringw(item).c_str() ); } + // ----------------------------------------------------------------------------- + int ListWidget::getSelection() const { const IGUIListBox* list = getIrrlichtElement<IGUIListBox>(); assert(list != NULL); return list->getSelected(); } + // ----------------------------------------------------------------------------- + std::string ListWidget::getSelectionName() const { const IGUIListBox* list = getIrrlichtElement<IGUIListBox>(); assert(list != NULL); return stringc( list->getListItem( list->getSelected() ) ).c_str(); } + // ----------------------------------------------------------------------------- + void ListWidget::unfocused(const int playerID) { IGUIListBox* list = getIrrlichtElement<IGUIListBox>(); @@ -87,3 +101,4 @@ if (list != NULL) list->setSelected(-1); } +// ----------------------------------------------------------------------------- Modified: main/trunk/src/guiengine/widgets/model_view_widget.cpp =================================================================== --- main/trunk/src/guiengine/widgets/model_view_widget.cpp 2010-03-27 19:55:53 UTC (rev 5085) +++ main/trunk/src/guiengine/widgets/model_view_widget.cpp 2010-03-27 23:18:07 UTC (rev 5086) @@ -22,8 +22,10 @@ using namespace irr::core; using namespace irr::gui; -ModelViewWidget::ModelViewWidget() : IconButtonWidget(IconButtonWidget::SCALE_MODE_KEEP_TEXTURE_ASPECT_RATIO, false, false) +ModelViewWidget::ModelViewWidget() : + IconButtonWidget(IconButtonWidget::SCALE_MODE_KEEP_TEXTURE_ASPECT_RATIO, false, false) { + //FIXME: find nicer way than overriding what IconButtonWidget's constructor already set... m_type = WTYPE_MODEL_VIEW; m_rtt_provider = NULL; m_rotation_mode = ROTATE_OFF; Modified: main/trunk/src/guiengine/widgets/ribbon_widget.cpp =================================================================== --- main/trunk/src/guiengine/widgets/ribbon_widget.cpp 2010-03-27 19:55:53 UTC (rev 5085) +++ main/trunk/src/guiengine/widgets/ribbon_widget.cpp 2010-03-27 23:18:07 UTC (rev 5086) @@ -33,7 +33,8 @@ #endif // ----------------------------------------------------------------------------- -RibbonWidget::RibbonWidget(const RibbonType type) + +RibbonWidget::RibbonWidget(const RibbonType type) : Widget(WTYPE_RIBBON) { for (int n=0; n<MAX_PLAYER_COUNT; n++) { @@ -41,11 +42,12 @@ } m_selection[0] = 0; // only player 0 has a selection by default - m_type = WTYPE_RIBBON; m_ribbon_type = type; m_mouse_focus = NULL; - m_listener = NULL; + m_listener = NULL; + m_check_inside_me = true; + updateSelection(); } // ----------------------------------------------------------------------------- Modified: main/trunk/src/guiengine/widgets/spinner_widget.cpp =================================================================== --- main/trunk/src/guiengine/widgets/spinner_widget.cpp 2010-03-27 19:55:53 UTC (rev 5085) +++ main/trunk/src/guiengine/widgets/spinner_widget.cpp 2010-03-27 23:18:07 UTC (rev 5086) @@ -30,10 +30,11 @@ // ----------------------------------------------------------------------------- -SpinnerWidget::SpinnerWidget(const bool gauge) +SpinnerWidget::SpinnerWidget(const bool gauge) : Widget(WTYPE_SPINNER) { m_gauge = gauge; - m_type = WTYPE_SPINNER; + + m_check_inside_me = true; //FIXME: not sure this is necessary } // ----------------------------------------------------------------------------- @@ -62,14 +63,15 @@ m_value = (m_min + m_max)/2; // create sub-widgets if they don't already exist - if(m_children.size() == 0) + if (m_children.size() == 0) { std::string& icon = m_properties[PROP_ICON]; m_graphical = icon.size()>0; - m_children.push_back( new Widget() ); - m_children.push_back( new Widget() ); - m_children.push_back( new Widget() ); + //FIXME: unclean to create "fake" button/label/icon widgets!! + m_children.push_back( new Widget(WTYPE_BUTTON) ); + m_children.push_back( new Widget(m_graphical ? WTYPE_ICON_BUTTON : WTYPE_LABEL) ); + m_children.push_back( new Widget(WTYPE_BUTTON) ); } int widgetID; @@ -93,7 +95,6 @@ rect<s32> subsize_left_arrow = rect<s32>(0 ,0, h, h); IGUIButton * left_arrow = GUIEngine::getGUIEnv()->addButton(subsize_left_arrow, btn, getNewNoFocusID(), L" "); m_children[0].m_element = left_arrow; - m_children[0].m_type = WTYPE_BUTTON; left_arrow->setTabStop(false); m_children[0].m_event_handler = this; m_children[0].m_properties[PROP_ID] = "left"; @@ -109,10 +110,8 @@ const int free_h_space = w-h*2-texture_width; // to center image rect<s32> subsize_label = rect<s32>(h+free_h_space/2, 0, w-h+free_h_space/2, h); - //IGUIButton* subbtn = GUIEngine::getGUIEnv()->addButton(subsize_label, btn, ++id_counter_2, L""); IGUIImage * subbtn = GUIEngine::getGUIEnv()->addImage(subsize_label, btn, getNewNoFocusID()); m_children[1].m_element = subbtn; - m_children[1].m_type = WTYPE_ICON_BUTTON; m_children[1].id = subbtn->getID(); m_children[1].m_event_handler = this; subbtn->setUseAlphaChannel(true); @@ -127,7 +126,6 @@ false /* border */, true /* word wrap */, btn, getNewNoFocusID()); m_children[1].m_element = label; - m_children[1].m_type = WTYPE_LABEL; m_children[1].m_event_handler = this; m_children[1].id = label->getID(); label->setTextAlignment(EGUIA_CENTER, EGUIA_CENTER); @@ -141,7 +139,6 @@ IGUIButton * right_arrow = GUIEngine::getGUIEnv()->addButton(subsize_right_arrow, btn, getNewNoFocusID(), L" "); right_arrow->setTabStop(false); m_children[2].m_element = right_arrow; - m_children[2].m_type = WTYPE_BUTTON; m_children[2].m_event_handler = this; m_children[2].m_properties[PROP_ID] = "right"; m_children[2].id = m_children[2].m_element->getID(); Modified: main/trunk/src/guiengine/widgets/text_box_widget.cpp =================================================================== --- main/trunk/src/guiengine/widgets/text_box_widget.cpp 2010-03-27 19:55:53 UTC (rev 5085) +++ main/trunk/src/guiengine/widgets/text_box_widget.cpp 2010-03-27 23:18:07 UTC (rev 5086) @@ -23,11 +23,13 @@ using namespace irr::gui; // ----------------------------------------------------------------------------- -TextBoxWidget::TextBoxWidget() + +TextBoxWidget::TextBoxWidget() : Widget(WTYPE_TEXTBOX) { - m_type = WTYPE_TEXTBOX; } + // ----------------------------------------------------------------------------- + void TextBoxWidget::add() { rect<s32> widget_size = rect<s32>(x, y, x + w, y + h); @@ -40,7 +42,9 @@ m_element->setTabGroup(false); m_element->setTabStop(true); } + // ----------------------------------------------------------------------------- + stringw TextBoxWidget::getText() const { const IGUIEditBox* textCtrl = Widget::getIrrlichtElement<IGUIEditBox>(); @@ -48,7 +52,9 @@ return stringw(textCtrl->getText()); } + // ----------------------------------------------------------------------------- + EventPropagation TextBoxWidget::focused(const int playerID) { assert(playerID == 0); // No support for multiple players in text areas! @@ -58,7 +64,9 @@ setWithinATextBox(true); return EVENT_LET; } + // ----------------------------------------------------------------------------- + void TextBoxWidget::unfocused(const int playerID) { assert(playerID == 0); // No support for multiple players in text areas! Modified: main/trunk/src/states_screens/kart_selection.cpp =================================================================== --- main/trunk/src/states_screens/kart_selection.cpp 2010-03-27 19:55:53 UTC (rev 5085) +++ main/trunk/src/states_screens/kart_selection.cpp 2010-03-27 23:18:07 UTC (rev 5086) @@ -66,10 +66,8 @@ KartSelectionScreen* m_parent; int m_reserved_id; public: - FocusDispatcher(KartSelectionScreen* parent) + FocusDispatcher(KartSelectionScreen* parent) : Widget(WTYPE_BUTTON) { - //m_type = WTYPE_LABEL; - m_type = WTYPE_BUTTON; m_parent = parent; m_reserved_id = -1; @@ -205,7 +203,7 @@ std::string m_kartInternalName; PlayerKartWidget(KartSelectionScreen* parent,StateManager:: ActivePlayer* associatedPlayer, - Widget* area, const int m_playerID, const int irrlichtWidgetID=-1) : Widget() + Widget* area, const int m_playerID, const int irrlichtWidgetID=-1) : Widget(WTYPE_DIV) { m_associatedPlayer = associatedPlayer; x_speed = 1.0f; Modified: main/trunk/src/states_screens/options_screen_av.cpp =================================================================== --- main/trunk/src/states_screens/options_screen_av.cpp 2010-03-27 19:55:53 UTC (rev 5085) +++ main/trunk/src/states_screens/options_screen_av.cpp 2010-03-27 23:18:07 UTC (rev 5086) @@ -46,7 +46,7 @@ void OptionsScreenAV::init() { RibbonWidget* ribbon = this->getWidget<RibbonWidget>("options_choice"); - if (ribbon != NULL) ribbon->select( "audio_video", GUI_PLAYER_ID ); + if (ribbon != NULL) ribbon->select( "tab_audio_video", GUI_PLAYER_ID ); // ---- sfx volume SpinnerWidget* gauge = this->getWidget<SpinnerWidget>("sfx_volume"); @@ -144,9 +144,9 @@ { std::string selection = ((RibbonWidget*)widget)->getSelectionIDString(GUI_PLAYER_ID).c_str(); - if (selection == "audio_video") StateManager::get()->replaceTopMostScreen(OptionsScreenAV::getInstance()); - else if (selection == "players") StateManager::get()->replaceTopMostScreen(OptionsScreenPlayers::getInstance()); - else if (selection == "controls") StateManager::get()->replaceTopMostScreen(OptionsScreenInput::getInstance()); + if (selection == "tab_audio_video") StateManager::get()->replaceTopMostScreen(OptionsScreenAV::getInstance()); + else if (selection == "tab_players") StateManager::get()->replaceTopMostScreen(OptionsScreenPlayers::getInstance()); + else if (selection == "tab_controls") StateManager::get()->replaceTopMostScreen(OptionsScreenInput::getInstance()); } else if(name == "back") { Modified: main/trunk/src/states_screens/options_screen_input.cpp =================================================================== --- main/trunk/src/states_screens/options_screen_input.cpp 2010-03-27 19:55:53 UTC (rev 5085) +++ main/trunk/src/states_screens/options_screen_input.cpp 2010-03-27 23:18:07 UTC (rev 5086) @@ -262,8 +262,8 @@ // ----------------------------------------------------------------------------- void OptionsScreenInput::init() { - RibbonWidget* ribbon = this->getWidget<RibbonWidget>("options_choice"); - if (ribbon != NULL) ribbon->select( "controls", GUI_PLAYER_ID ); + RibbonWidget* tabBar = this->getWidget<RibbonWidget>("options_choice"); + if (tabBar != NULL) tabBar->select( "tab_controls", GUI_PLAYER_ID ); DynamicRibbonWidget* devices = this->getWidget<DynamicRibbonWidget>("devices"); @@ -393,9 +393,9 @@ { std::string selection = ((RibbonWidget*)widget)->getSelectionIDString(GUI_PLAYER_ID).c_str(); - if (selection == "audio_video") StateManager::get()->replaceTopMostScreen(OptionsScreenAV::getInstance()); - else if (selection == "players") StateManager::get()->replaceTopMostScreen(OptionsScreenPlayers::getInstance()); - else if (selection == "controls") StateManager::get()->replaceTopMostScreen(OptionsScreenInput::getInstance()); + if (selection == "tab_audio_video") StateManager::get()->replaceTopMostScreen(OptionsScreenAV::getInstance()); + else if (selection == "tab_players") StateManager::get()->replaceTopMostScreen(OptionsScreenPlayers::getInstance()); + else if (selection == "tab_controls") StateManager::get()->replaceTopMostScreen(OptionsScreenInput::getInstance()); } else if (name == "add_device") { Modified: main/trunk/src/states_screens/options_screen_players.cpp =================================================================== --- main/trunk/src/states_screens/options_screen_players.cpp 2010-03-27 19:55:53 UTC (rev 5085) +++ main/trunk/src/states_screens/options_screen_players.cpp 2010-03-27 23:18:07 UTC (rev 5086) @@ -49,8 +49,8 @@ void OptionsScreenPlayers::init() { - RibbonWidget* ribbon = this->getWidget<RibbonWidget>("options_choice"); - if (ribbon != NULL) ribbon->select( "players", GUI_PLAYER_ID ); + RibbonWidget* tabBar = this->getWidget<RibbonWidget>("options_choice"); + if (tabBar != NULL) tabBar->select( "tab_players", GUI_PLAYER_ID ); ListWidget* players = this->getWidget<ListWidget>("players"); assert(players != NULL); @@ -140,9 +140,9 @@ { std::string selection = ((RibbonWidget*)widget)->getSelectionIDString(GUI_PLAYER_ID).c_str(); - if (selection == "audio_video") StateManager::get()->replaceTopMostScreen(OptionsScreenAV::getInstance()); - else if (selection == "players") StateManager::get()->replaceTopMostScreen(OptionsScreenPlayers::getInstance()); - else if (selection == "controls") StateManager::get()->replaceTopMostScreen(OptionsScreenInput::getInstance()); + if (selection == "tab_audio_video") StateManager::get()->replaceTopMostScreen(OptionsScreenAV::getInstance()); + else if (selection == "tab_players") StateManager::get()->replaceTopMostScreen(OptionsScreenPlayers::getInstance()); + else if (selection == "tab_controls") StateManager::get()->replaceTopMostScreen(OptionsScreenInput::getInstance()); } else if (name == "back") { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-04-11 16:50:55
|
Revision: 5165 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5165&view=rev Author: auria Date: 2010-04-11 16:50:43 +0000 (Sun, 11 Apr 2010) Log Message: ----------- Better center 'selection bubble' in GUi skin Modified Paths: -------------- main/trunk/data/gui/skins/glass/bubble.png main/trunk/src/guiengine/skin.cpp Modified: main/trunk/data/gui/skins/glass/bubble.png =================================================================== (Binary files differ) Modified: main/trunk/src/guiengine/skin.cpp =================================================================== --- main/trunk/src/guiengine/skin.cpp 2010-04-11 16:36:48 UTC (rev 5164) +++ main/trunk/src/guiengine/skin.cpp 2010-04-11 16:50:43 UTC (rev 5165) @@ -718,6 +718,8 @@ /* draw "selection bubble" if relevant */ if (always_show_selection && mark_selected) { + //GUIEngine::getDriver()->draw2DRectangle( SColor(255, 255,0,0), rect ); + ITexture* tex_bubble = SkinConfig::m_render_params["selectionHalo::neutral"].getImage(); const int texture_w = tex_bubble->getSize().Width; @@ -727,15 +729,17 @@ core::rect<s32> source_area = core::rect<s32>(0, 0, texture_w, texture_h); const float outgrow = 0.35f; // make slightly bigger than the icon it's on - const int rectHeight = (int)(rect.getHeight() * (1.0f + outgrow)); - const int rectWidth = (int)(rectHeight * aspectRatio); + const int rectHeight = int(rect.getHeight() * (1.0f + outgrow)); + const int rectWidth = int(rectHeight * aspectRatio); const int x_gap = (rect.getWidth() - rectWidth)/2; - const int y_shift_up = (int)(rect.getHeight() * (outgrow/2.0f)); + const int y_shift_up = int((rectHeight - rect.getHeight()) / 2.0f); core::rect< s32 > rect2( position2d< s32 >(rect.UpperLeftCorner.X + x_gap, rect.UpperLeftCorner.Y - y_shift_up), - dimension2d< s32 >(rectWidth, rectHeight) ); + dimension2d< s32 >(rectWidth, rectHeight) ); + //GUIEngine::getDriver()->draw2DRectangleOutline( rect2, SColor(255, 0,255,0) ); + GUIEngine::getDriver()->draw2DImage(tex_bubble, rect2, source_area, 0 /* no clipping */, 0, true /* alpha */); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-04-14 00:14:28
|
Revision: 5193 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5193&view=rev Author: hikerstk Date: 2010-04-14 00:14:20 +0000 (Wed, 14 Apr 2010) Log Message: ----------- 1) Simplified rescue code somewhat (one-time setup of variables is now done in forceRescue, not in an if-statement in update anymore). 2) Made the parameters for rescue configurable in stk_config.xml (in preparation for other similar animations). E.g. the rescue time can now be set per kart. 3) Reset animations on restart (so that e.g. a win/lose animation is not shown during startup in case of a restart anymore). 4) Removed unused variable m_current_gear_ratio 5) Added documentation. Modified Paths: -------------- main/trunk/data/stk_config.xml main/trunk/src/karts/kart.cpp main/trunk/src/karts/kart.hpp main/trunk/src/karts/kart_properties.cpp main/trunk/src/karts/kart_properties.hpp main/trunk/src/karts/moveable.hpp Modified: main/trunk/data/stk_config.xml =================================================================== --- main/trunk/data/stk_config.xml 2010-04-14 00:06:10 UTC (rev 5192) +++ main/trunk/data/stk_config.xml 2010-04-14 00:14:20 UTC (rev 5193) @@ -96,6 +96,15 @@ <!-- Camera: Distance between kart and camera. --> <camera distance="1.5"/> + <!-- Rescue: time: How long it takes the kart to be raised. + height: how height the kart will be raised before it is + dropped back onto the track. + vert rescue offset: used to raise karts a bit higher before + releasing them on the ground after a rescue. Used to avoid + resetting karts into the track. Not sure if this is still + necessary. --> + <rescue vert-offset="0.0" time="2" height="2"/> + <!-- Nitro: power-boost is the increase in engine power, i.e. 1=plus 100% --> <nitro power-boost="3"/> @@ -208,12 +217,6 @@ pushed to the side, hardly anything happens. --> <collision side-impulse="0"/> - <!-- vert rescue offset: used to raise karts a bit higher before - releasing them on the ground after a rescue. Used to avoid - resetting karts into the track. Not sure if this is still - necessary. --> - <rescue vert-offset="0.0"/> - <!-- Kart-specific rubber band handling: max-length is the maximum length of rubber band before it snaps. force is the force a plunger/rubber band applies to the kart(s). Modified: main/trunk/src/karts/kart.cpp =================================================================== --- main/trunk/src/karts/kart.cpp 2010-04-14 00:06:10 UTC (rev 5192) +++ main/trunk/src/karts/kart.cpp 2010-04-14 00:14:20 UTC (rev 5193) @@ -56,6 +56,12 @@ # pragma warning(disable:4355) #endif +/** The kart constructor. + * \param ident The identifier for the kart model to use. + * \param position The position (or rank) for this kart (between 1 and + * number of karts). This is used to determine the start position. + * \param init_transform The initial position and rotation for this kart. + */ Kart::Kart (const std::string& ident, int position, const btTransform& init_transform) : TerrainInfo(1), @@ -158,7 +164,12 @@ } // setController // ----------------------------------------------------------------------------- - +/** 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 + * specified in order to overwrite the terrain pitch (which would be used + * otherwise). + * \param customPitch Pitch value to overwrite the terrain pitch. + */ btTransform Kart::getKartHeading(const float customPitch) { btTransform trans = getTrans(); @@ -173,7 +184,7 @@ } // getKartHeading // ---------------------------------------------------------------------------- -/** Created the physical representation of this kart. Atm it uses the actual +/** Creates the physical representation of this kart. Atm it uses the actual * extention of the kart model to determine the size of the collision body. */ void Kart::createPhysics() @@ -268,7 +279,11 @@ } } // createPhysics -// ----------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +/** The destructor frees the memory of this kart, but note that the actual kart + * model is still stored in the kart_properties (m_kart_model variable), so + * it is not reloaded). + */ Kart::~Kart() { //stop the engine sound @@ -325,14 +340,11 @@ } m_kart_mode = KM_ELIMINATED; - // make the kart invisible by placing it way under the track getNode()->setVisible(false); } // eliminate //----------------------------------------------------------------------------- -/** Returns true if the kart is 'resting' - * - * Returns true if the kart is 'resting', i.e. (nearly) not moving. +/** Returns true if the kart is 'resting', i.e. (nearly) not moving. */ bool Kart::isInRest() const { @@ -364,7 +376,8 @@ } // updatedWeight //----------------------------------------------------------------------------- -/** Reset before a new race. +/** Reset before a new race. It will remove all attachments, and + * puts the kart back at its original start position. */ void Kart::reset() { @@ -381,6 +394,8 @@ m_camera->setInitialTransform(); } + // Stop any animations currently being played. + m_kart_properties->getKartModel()->setAnimation(KartModel::AF_DEFAULT); // If the controller was replaced (e.g. replaced by end controller), // restore the original controller. if(m_saved_controller) @@ -511,6 +526,13 @@ } // finishedRace //----------------------------------------------------------------------------- +/** Called when an item is collected. It will either adjust the collected + * energy, or update the attachment or powerup for this kart. + * \param item The item that was hit. + * \param add_info Additional info, used in networking games to force + * a specific item to be used (instead of a random item) to keep + * all karts in synch. + */ void Kart::collectedItem(const Item &item, int add_info) { float old_energy = m_collected_energy; @@ -559,7 +581,9 @@ } // collectedItem //----------------------------------------------------------------------------- -// Simulates gears +/** Simulates gears by adjusting the force of the engine. It also takes the + * effect of the zipper into account. + */ float Kart::getActualWheelForce() { float zipperF=(m_zipper_time_left>0.0f) ? stk_config->m_zipper_force : 0.0f; @@ -568,8 +592,8 @@ { if(m_speed <= getMaxSpeed()*gear_ratio[i]) { - m_current_gear_ratio = gear_ratio[i]; - return getMaxPower()*m_kart_properties->getGearPowerIncrease()[i]+zipperF; + return getMaxPower()*m_kart_properties->getGearPowerIncrease()[i] + +zipperF; } } return getMaxPower()+zipperF; @@ -577,8 +601,8 @@ } // getActualWheelForce //----------------------------------------------------------------------------- -/** The kart is on ground if all 4 wheels touch the ground -*/ +/** The kart is on ground if all 4 wheels touch the ground. + */ bool Kart::isOnGround() const { return (m_vehicle->getNumWheelsOnGround() == m_vehicle->getNumWheels()); @@ -588,7 +612,6 @@ * is used to determine when to switch off the upright constraint, so that * explosions can be more violent, while still */ - bool Kart::isNearGround() const { if(getHoT()==Track::NOHIT) @@ -597,6 +620,11 @@ return ((getXYZ().getZ() - getHoT()) < stk_config->m_near_ground); } // isNearGround //----------------------------------------------------------------------------- +/** Called when an explosion happens. + * \param pos Position of the explosion. + * \param direct_hit True if this kart was hit directly (and should therefore + * be more severly affected). + */ void Kart::handleExplosion(const Vec3& pos, bool direct_hit) { int sign_bits = rand(); // To select plus or minus randomnly, assuming 15 bit at least @@ -652,6 +680,10 @@ } // handleExplosion //----------------------------------------------------------------------------- +/** Updates the kart in each time step. It updates the physics setting, + * particle effects, camera position, etc. + * \param dt Time step size. + */ void Kart::update(float dt) { if(!history->replayHistory()) @@ -713,23 +745,16 @@ if ( m_kart_mode==KM_RESCUE ) { // Let the kart raise 2m in the 2 seconds of the rescue - const float rescue_time = 2.0f; + const float rescue_time = m_kart_properties->getRescueTime(); const float rescue_height = 2.0f; - if(m_attachment->getType() != ATTACH_TINYTUX) - { - m_attachment->set( ATTACH_TINYTUX, rescue_time ) ; - m_rescue_pitch = getHPR().getPitch(); - m_rescue_roll = getHPR().getRoll(); - race_state->itemCollected(getWorldKartId(), -1, -1); - } - World::getWorld()->getPhysics()->removeKart(this); - btQuaternion q_roll (btVector3(0.0f, 0.0f, 1.0f), - -m_rescue_roll*dt/rescue_time*M_PI/180.0f); + -m_rescue_roll*dt/rescue_time*DEGREE_TO_RAD); btQuaternion q_pitch(btVector3(1.f, 0.f, 0.f), - -m_rescue_pitch*dt/rescue_time*M_PI/180.0f); - setXYZRotation(getXYZ()+Vec3(0, rescue_height*dt/rescue_time, 0), - getRotation()*q_roll*q_pitch); + -m_rescue_pitch*dt/rescue_time*DEGREE_TO_RAD); + setXYZ(getXYZ()+Vec3(0, + m_kart_properties->getRescueHeight()*dt/rescue_time, + 0)); + setRotation(getRotation()*q_roll*q_pitch); } // if rescue mode m_attachment->update(dt); @@ -772,13 +797,6 @@ // happening (since Z velocity is clamped), the epsilon is left in place // just to be on the safe side (it will not hit the chassis itself). Vec3 pos_plus_epsilon = trans.getOrigin()+btVector3(0,0.3f,0); - // These values cause the track not to be hit in tuxtrack. I leave - // them in as a test case if additional debugging should be needed. - // Note: it might be that the kart chassis is actually 'in' the track, - // i.e. it's a tunneling problem! - //btVector3 pos_plus_epsilon (-54.449902, -139.99402, -3.4524240); - // motionstate: -52.449902, -139.99402, -3.6524241 - // collision object -52.221024, -139.99614, -3.5276926 // Make sure that the ray doesn't hit the kart. This is done by // resetting the collision filter group, so that this collision @@ -1084,10 +1102,13 @@ return ret; */ } -// ----------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- +/** Updates the physics for this kart: computing the driving force, set + * steering, handles skidding, terrain impact on kart, ... + * \param dt Time step size. + */ void Kart::updatePhysics(float dt) { - m_bounce_back_time-=dt; float engine_power = getActualWheelForce() + handleNitro(dt) + handleSlipstream(dt); @@ -1304,11 +1325,23 @@ } // updatePhysics //----------------------------------------------------------------------------- -/** Sets the mode of the kart to being rescued. +/** Sets the mode of the kart to being rescued, attaches the rescue model + * and saves the current pitch and roll (for the rescue animation). It + * also removes the kart from the physics world. */ void Kart::forceRescue() { m_kart_mode=KM_RESCUE; + // Just in case that rescue is pressed while the kart is being rescued + if(m_attachment->getType() != ATTACH_TINYTUX) + { + m_attachment->set( ATTACH_TINYTUX, m_kart_properties->getRescueTime()); + m_rescue_pitch = getPitch(); + m_rescue_roll = getRoll(); + race_state->itemCollected(getWorldKartId(), -1, -1); + World::getWorld()->getPhysics()->removeKart(this); + } + } // forceRescue //----------------------------------------------------------------------------- @@ -1331,7 +1364,9 @@ } // endRescue //----------------------------------------------------------------------------- - +/** Attaches the right model, creates the physics and loads all special + * effects (particle systems etc.) + */ void Kart::loadData() { m_kart_properties->getKartModel()->attachModel(&m_node); @@ -1400,8 +1435,6 @@ } // applyEngineForce //----------------------------------------------------------------------------- -void Kart::updateGraphics(const Vec3& offset_xyz, - const btQuaternion& rotation) /** Updates the graphics model. Mainly set the graphical position to be the * same as the physics position, but uses offsets to position and rotation * for special gfx effects (e.g. skidding will turn the karts more). These @@ -1410,6 +1443,8 @@ * \param offset_xyz Offset to be added to the position. * \param rotation Additional rotation. */ +void Kart::updateGraphics(const Vec3& offset_xyz, + const btQuaternion& rotation) { float wheel_up_axis[4]; KartModel *kart_model = m_kart_properties->getKartModel(); Modified: main/trunk/src/karts/kart.hpp =================================================================== --- main/trunk/src/karts/kart.hpp 2010-04-14 00:06:10 UTC (rev 5192) +++ main/trunk/src/karts/kart.hpp 2010-04-14 00:14:20 UTC (rev 5193) @@ -174,7 +174,6 @@ * > 0 the number it contains is the time left before removing plunger. */ float m_view_blocked_by_plunger; float m_speed; - float m_current_gear_ratio; /** Different kart modes: normal racing, being rescued, showing end * animation, explosions, kart eliminated. */ enum {KM_RACE, KM_RESCUE, KM_END_ANIM, KM_EXPLOSION, Modified: main/trunk/src/karts/kart_properties.cpp =================================================================== --- main/trunk/src/karts/kart_properties.cpp 2010-04-14 00:06:10 UTC (rev 5192) +++ main/trunk/src/karts/kart_properties.cpp 2010-04-14 00:14:20 UTC (rev 5193) @@ -62,7 +62,7 @@ m_wheel_radius = m_chassis_linear_damping = m_chassis_angular_damping = m_suspension_rest = m_max_speed_reverse_ratio = m_jump_velocity = - m_vert_rescue_offset = m_upright_tolerance = m_collision_side_impulse = + m_rescue_vert_offset = m_upright_tolerance = m_collision_side_impulse = m_upright_max_force = m_suspension_travel_cm = m_track_connection_accel = m_min_speed_turn = m_angle_at_min = m_max_speed_turn = m_angle_at_max = @@ -71,7 +71,8 @@ m_skid_decrease = m_skid_increase = m_skid_visual = m_skid_max = m_slipstream_length = m_slipstream_collect_time = m_slipstream_use_time = m_slipstream_add_power = - m_slipstream_min_speed = m_camera_distance = UNDEFINED; + m_slipstream_min_speed = m_camera_distance = + m_rescue_time = m_rescue_height = UNDEFINED; m_gravity_center_shift = Vec3(UNDEFINED); m_has_skidmarks = true; m_version = 0; @@ -179,6 +180,9 @@ } // load //----------------------------------------------------------------------------- +/** Actually reads in the data from the xml file. + * \param root Root of the xml tree. + */ void KartProperties::getAllData(const XMLNode * root) { root->get("version", &m_version); @@ -203,6 +207,13 @@ if(const XMLNode *nitro_node = root->getNode("nitro")) nitro_node->get("power-boost", &m_nitro_power_boost); + if(const XMLNode *rescue_node = root->getNode("rescue")) + { + rescue_node->get("vert-offset", &m_rescue_vert_offset); + rescue_node->get("time", &m_rescue_time ); + rescue_node->get("height", &m_rescue_height ); + } + if(const XMLNode *skid_node = root->getNode("skid")) { skid_node->get("increase", &m_skid_increase ); @@ -334,9 +345,6 @@ if(const XMLNode *collision_node = root->getNode("collision")) collision_node->get("side-impulse", &m_collision_side_impulse); - if(const XMLNode *rescue_node = root->getNode("rescue")) - rescue_node->get("vert-offset", &m_vert_rescue_offset); - //TODO: wheel front right and wheel front left is not loaded, yet is listed as an attribute in the xml file after wheel-radius //TODO: same goes for their rear equivalents @@ -414,55 +422,54 @@ strA,filename.c_str());exit(-1); \ } - CHECK_NEG(m_mass, "mass" ); - CHECK_NEG(m_engine_power[0], "engine-power[0]" ); - CHECK_NEG(m_engine_power[1], "engine-power[1]" ); - CHECK_NEG(m_engine_power[2], "engine-power[2]" ); - CHECK_NEG(m_min_speed_turn, "min-speed-angle" ); - CHECK_NEG(m_min_radius, "min-speed-angle" ); - CHECK_NEG(m_max_speed_turn, "max-speed-angle" ); - CHECK_NEG(m_max_radius, "max-speed-angle" ); - CHECK_NEG(m_brake_factor, "brake-factor" ); - CHECK_NEG(m_time_full_steer, "time-full-steer" ); - CHECK_NEG(m_time_full_steer_ai, "time-full-steer-ai" ); + CHECK_NEG(m_mass, "mass" ); + CHECK_NEG(m_min_speed_turn, "turn min-speed-angle" ); + CHECK_NEG(m_min_radius, "turn min-speed-angle" ); + CHECK_NEG(m_max_speed_turn, "turn max-speed-angle" ); + CHECK_NEG(m_max_radius, "turn max-speed-angle" ); + CHECK_NEG(m_time_full_steer, "turn time-full-steer" ); + CHECK_NEG(m_time_full_steer_ai, "turn time-full-steer-ai" ); + CHECK_NEG(m_wheel_damping_relaxation, "wheels damping-relaxation" ); + CHECK_NEG(m_wheel_damping_compression, "wheels damping-compression" ); + CHECK_NEG(m_wheel_radius, "wheels radius" ); + CHECK_NEG(m_friction_slip, "friction slip" ); + CHECK_NEG(m_roll_influence, "stability roll-influence" ); + CHECK_NEG(m_chassis_linear_damping, "stability chassis-linear-damping"); + CHECK_NEG(m_chassis_angular_damping, "stability chassis-angular-damping"); + CHECK_NEG(m_engine_power[0], "engine power[0]" ); + CHECK_NEG(m_engine_power[1], "engine power[1]" ); + CHECK_NEG(m_engine_power[2], "engine power[2]" ); + CHECK_NEG(m_max_speed[0], "engine maximum-speed[0]" ); + CHECK_NEG(m_max_speed[1], "engine maximum-speed[1]" ); + CHECK_NEG(m_max_speed[2], "engine maximum-speed[2]" ); + CHECK_NEG(m_max_speed_reverse_ratio, "engine max-speed-reverse-ratio"); + CHECK_NEG(m_brake_factor, "engine brake-factor" ); + CHECK_NEG(m_suspension_stiffness, "suspension stiffness" ); + CHECK_NEG(m_suspension_rest, "suspension rest" ); + CHECK_NEG(m_suspension_travel_cm, "suspension travel-cm" ); + CHECK_NEG(m_collision_side_impulse, "collision side-impulse" ); + CHECK_NEG(m_jump_velocity, "jump velocity" ); + CHECK_NEG(m_upright_tolerance, "upright tolerance" ); + CHECK_NEG(m_upright_max_force, "upright max-force" ); + CHECK_NEG(m_track_connection_accel, "track-connection-accel" ); + CHECK_NEG(m_rubber_band_max_length, "rubber-band max-length" ); + CHECK_NEG(m_rubber_band_force, "rubber-band force" ); + CHECK_NEG(m_rubber_band_duration, "rubber-band duration" ); + CHECK_NEG(m_skid_decrease, "skid decrease" ); + CHECK_NEG(m_time_till_max_skid, "skid time-till-max" ); + CHECK_NEG(m_skid_increase, "skid increase" ); + CHECK_NEG(m_skid_max, "skid max" ); + CHECK_NEG(m_skid_visual, "skid visual" ); + CHECK_NEG(m_slipstream_length, "slipstream length" ); + CHECK_NEG(m_slipstream_collect_time, "slipstream collect-time" ); + CHECK_NEG(m_slipstream_use_time, "slipstream use-time" ); + CHECK_NEG(m_slipstream_add_power, "slipstream add-power" ); + CHECK_NEG(m_slipstream_min_speed, "slipstream min-speed" ); + CHECK_NEG(m_camera_distance, "camera distance" ); + CHECK_NEG(m_rescue_height, "rescue height" ); + CHECK_NEG(m_rescue_time, "rescue time" ); + CHECK_NEG(m_rescue_vert_offset, "rescue vert-offset" ); - //bullet physics data - CHECK_NEG(m_suspension_stiffness, "suspension-stiffness" ); - CHECK_NEG(m_wheel_damping_relaxation, "wheel-damping-relaxation" ); - CHECK_NEG(m_wheel_damping_compression, "wheel-damping-compression" ); - CHECK_NEG(m_friction_slip, "friction-slip" ); - CHECK_NEG(m_roll_influence, "roll-influence" ); - CHECK_NEG(m_wheel_radius, "wheel-radius" ); - // Don't check m_wheel_base here, it is computed later! - CHECK_NEG(m_chassis_linear_damping, "chassis-linear-damping" ); - CHECK_NEG(m_chassis_angular_damping, "chassis-angular-damping" ); - CHECK_NEG(m_max_speed[0], "maximum-speed[0]" ); - CHECK_NEG(m_max_speed[1], "maximum-speed[1]" ); - CHECK_NEG(m_max_speed[2], "maximum-speed[2]" ); - CHECK_NEG(m_max_speed_reverse_ratio, "max-speed-reverse-ratio" ); - CHECK_NEG(m_suspension_rest, "suspension-rest" ); - CHECK_NEG(m_suspension_travel_cm, "suspension-travel-cm" ); - CHECK_NEG(m_collision_side_impulse, "collision-side-impulse" ); - CHECK_NEG(m_jump_velocity, "jump-velocity" ); - CHECK_NEG(m_vert_rescue_offset, "vert-rescue-offset" ); - CHECK_NEG(m_upright_tolerance, "upright-tolerance" ); - CHECK_NEG(m_upright_max_force, "upright-max-force" ); - CHECK_NEG(m_track_connection_accel, "track-connection-accel" ); - CHECK_NEG(m_rubber_band_max_length, "rubber-band-max-length" ); - CHECK_NEG(m_rubber_band_force, "rubber-band-force" ); - CHECK_NEG(m_rubber_band_duration, "rubber-band-duration" ); - CHECK_NEG(m_skid_decrease, "skid-decrease" ); - CHECK_NEG(m_time_till_max_skid, "time-till-max-skid" ); - CHECK_NEG(m_skid_increase, "skid-increase" ); - CHECK_NEG(m_skid_max, "skid-max" ); - CHECK_NEG(m_skid_visual, "skid-visual" ); - CHECK_NEG(m_slipstream_length, "slipstream-length" ); - CHECK_NEG(m_slipstream_collect_time, "slipstream-collect-time" ); - CHECK_NEG(m_slipstream_use_time, "slipstream-use-time" ); - CHECK_NEG(m_slipstream_add_power, "slipstream-add-power" ); - CHECK_NEG(m_slipstream_min_speed, "slipstream-min-speed" ); - CHECK_NEG(m_camera_distance, "camera distance" ); - } // checkAllSet // ---------------------------------------------------------------------------- Modified: main/trunk/src/karts/kart_properties.hpp =================================================================== --- main/trunk/src/karts/kart_properties.hpp 2010-04-14 00:06:10 UTC (rev 5192) +++ main/trunk/src/karts/kart_properties.hpp 2010-04-14 00:14:20 UTC (rev 5193) @@ -69,7 +69,7 @@ // Display and gui // --------------- - irr::core::stringw m_name; /**< The human readable Name of the kart + irr::core::stringw m_name; /**< The human readable Name of the kart * driver. */ std::string m_ident; /**< The computer readable-name of the * kart driver. */ @@ -106,6 +106,15 @@ kart length. */ m_max_radius; /**< Largest turn radius. */ + /** Time a kart is moved upwards after when it is rescued. */ + float m_rescue_time; + + /** Distance the kart is raised before dropped. */ + float m_rescue_height; + + /** Vertical offset after rescue. */ + float m_rescue_vert_offset; + std::string m_wheel_filename[4]; /**< Filename of the wheel models. */ /** Radius of the graphical wheels. */ float m_wheel_graphics_radius[4]; @@ -138,7 +147,6 @@ * out of the way of the faster kart in case of a collision. */ float m_collision_side_impulse; float m_jump_velocity; /**< Vertical velocity set when jumping. */ - float m_vert_rescue_offset; /**< Vertical offset after rescue. */ float m_upright_tolerance; float m_upright_max_force; @@ -234,7 +242,11 @@ float getCollisionSideImpulse () const {return m_collision_side_impulse; } /** Returns the vertical offset when rescuing karts to avoid karts being * rescued in (or under) the track. */ - float getVertRescueOffset () const {return m_vert_rescue_offset; } + float getVertRescueOffset () const {return m_rescue_vert_offset; } + /** Returns the time a kart is rised during a rescue. */ + float getRescueTime () const {return m_rescue_time; } + /** Returns the height a kart is moved to during a rescue. */ + float getRescueHeight () const {return m_rescue_height; } float getUprightTolerance () const {return m_upright_tolerance; } float getUprightMaxForce () const {return m_upright_max_force; } float getTrackConnectionAccel () const {return m_track_connection_accel; } Modified: main/trunk/src/karts/moveable.hpp =================================================================== --- main/trunk/src/karts/moveable.hpp 2010-04-14 00:06:10 UTC (rev 5192) +++ main/trunk/src/karts/moveable.hpp 2010-04-14 00:14:20 UTC (rev 5193) @@ -100,14 +100,6 @@ m_motion_state->setWorldTransform(m_transform); } // ------------------------------------------------------------------------ - /** Sets XYZ position and rotation of this moveable. */ - void setXYZRotation(const Vec3& xyz, const btQuaternion& a) - { - m_transform.setRotation(a); - m_transform.setOrigin(xyz); - m_motion_state->setWorldTransform(m_transform); - } - // ------------------------------------------------------------------------ virtual void handleZipper () {}; virtual void updateGraphics(const Vec3& off_xyz, const btQuaternion& off_rotation); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-04-20 17:20:38
|
Revision: 5217 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5217&view=rev Author: auria Date: 2010-04-20 17:20:31 +0000 (Tue, 20 Apr 2010) Log Message: ----------- Fixed old code still using 'this' as argument for a method that expected a bitmask (stupid C++ converts bool to int implicitely so didn't warn me) Modified Paths: -------------- main/trunk/data/tracks/jungle/graph.xml main/trunk/data/tracks/jungle/quads.xml main/trunk/data/tracks/jungle/scene.xml main/trunk/data/tracks/jungle/track.xml main/trunk/src/states_screens/challenges.cpp main/trunk/src/states_screens/tracks_screen.cpp Modified: main/trunk/data/tracks/jungle/graph.xml =================================================================== --- main/trunk/data/tracks/jungle/graph.xml 2010-04-20 17:12:09 UTC (rev 5216) +++ main/trunk/data/tracks/jungle/graph.xml 2010-04-20 17:20:31 UTC (rev 5217) @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<!-- Saved with script $Revision: 4996 $ --> +<!-- Generated with script from SVN rev 5037 --> <graph> <!-- First define all nodes of the graph, and what quads they represent --> <node-list from-quad="0" to-quad="232"/> <!-- map each quad to a node --> Modified: main/trunk/data/tracks/jungle/quads.xml =================================================================== --- main/trunk/data/tracks/jungle/quads.xml 2010-04-20 17:12:09 UTC (rev 5216) +++ main/trunk/data/tracks/jungle/quads.xml 2010-04-20 17:20:31 UTC (rev 5217) @@ -1,239 +1,239 @@ <?xml version="1.0"?> -<!-- Saved with script $Revision: 4996 $ --> +<!-- Generated with script from SVN rev 5037 --> <quads> <!-- Driveline: DRV_LEFT --> - <quad p0="-9.843615 -3.580265 3.899887" p1="10.196639 -3.580266 3.928761" p2="6.876125 -3.580266 9.386547" p3="-6.586914 -3.580267 10.213245"/> - <quad p0="0:3" p1="0:2" p2="7.433191 -3.580266 14.897751" p3="-5.886436 -3.580264 17.024937"/> - <quad p0="1:3" p1="1:2" p2="8.669672 -3.580266 20.506283" p3="-4.255719 -3.580268 24.362679"/> - <quad p0="2:3" p1="2:2" p2="10.819716 -3.580266 26.208866" p3="-1.385752 -3.580267 31.950268"/> - <quad p0="3:3" p1="3:2" p2="14.021376 -3.580266 31.915558" p3="2.645247 -3.580264 39.162685"/> - <quad p0="4:3" p1="4:2" p2="17.365570 -3.597069 36.497669" p3="6.892695 -3.597070 44.998058"/> - <quad p0="5:3" p1="5:2" p2="20.910248 -3.637880 40.406300" p3="11.450565 -3.637879 50.021435"/> - <quad p0="6:3" p1="6:2" p2="24.729019 -3.688308 43.737743" p3="16.486589 -3.688308 54.414776"/> - <quad p0="7:3" p1="7:2" p2="28.833593 -3.733952 46.524769" p3="21.920338 -3.733951 58.106800"/> - <quad p0="8:3" p1="8:2" p2="33.222527 -3.760387 48.814022" p3="27.619343 -3.760387 61.083553"/> - <quad p0="9:3" p1="9:2" p2="37.897270 -3.753171 50.672115" p3="33.464363 -3.753172 63.411251"/> - <quad p0="10:3" p1="10:2" p2="42.874397 -3.697866 52.179638" p3="39.397957 -3.697866 65.212341"/> - <quad p0="11:3" p1="11:2" p2="48.372940 -3.580061 53.455502" p3="46.182426 -3.580061 66.764832"/> - <quad p0="12:3" p1="12:2" p2="58.894196 -3.272041 54.811619" p3="58.068817 -3.272040 68.274734"/> - <quad p0="13:3" p1="13:2" p2="69.225845 -2.935133 54.717411" p3="70.106972 -2.935132 68.177017"/> - <quad p0="14:3" p1="14:2" p2="79.103447 -2.559891 53.497555" p3="81.322746 -2.559889 66.802155"/> - <quad p0="15:3" p1="15:2" p2="88.485359 -2.136873 51.511982" p3="91.643158 -2.136872 64.625549"/> - <quad p0="16:3" p1="16:2" p2="97.338890 -1.656625 49.111111" p3="101.031006 -1.656624 62.084347"/> - <quad p0="17:3" p1="17:2" p2="105.627251 -1.109672 46.635715" p3="109.432236 -1.109670 59.576321"/> - <quad p0="18:3" p1="18:2" p2="113.298660 -0.486494 44.417698" p3="116.731606 -0.486493 57.461948"/> - <quad p0="19:3" p1="19:2" p2="120.425781 0.222214 42.742527" p3="123.325462 0.222215 55.915585"/> - <quad p0="20:3" p1="20:2" p2="124.138023 0.666107 42.036488" p3="126.531258 0.666109 55.310886"/> - <quad p0="21:3" p1="21:2" p2="128.352478 1.196699 41.318508" p3="130.306381 1.196701 54.664639"/> - <quad p0="22:3" p1="22:2" p2="132.810745 1.767841 40.767475" p3="133.991425 1.767843 54.204090"/> - <quad p0="23:3" p1="23:2" p2="137.378662 2.333176 40.525913" p3="137.438812 2.333177 54.014194"/> - <quad p0="24:3" p1="24:2" p2="141.913101 2.846345 40.725147" p3="140.466553 2.846346 54.135754"/> - <quad p0="25:3" p1="25:2" p2="146.276230 3.261075 41.478802" p3="142.913986 3.261077 54.541431"/> - <quad p0="26:3" p1="26:2" p2="150.359451 3.531273 42.884991" p3="144.734833 3.531275 55.144726"/> - <quad p0="27:3" p1="27:2" p2="154.089386 3.611033 45.038120" p3="145.993576 3.611035 55.826748"/> - <quad p0="28:3" p1="28:2" p2="157.716049 3.647668 48.417103" p3="147.551392 3.647671 57.283710"/> - <quad p0="29:3" p1="29:2" p2="160.670410 3.808673 52.628971" p3="149.086349 3.808675 59.538860"/> - <quad p0="30:3" p1="30:2" p2="163.129852 4.068005 57.574001" p3="150.775009 4.068007 62.986500"/> - <quad p0="31:3" p1="31:2" p2="165.193619 4.399709 63.018520" p3="152.456375 4.399710 67.456970"/> - <quad p0="32:3" p1="32:2" p2="166.993927 4.777893 68.704636" p3="154.104706 4.777894 72.680191"/> - <quad p0="33:3" p1="33:2" p2="168.694992 5.176673 74.383209" p3="155.825500 5.176674 78.422104"/> - <quad p0="34:3" p1="34:2" p2="170.494980 5.570159 79.831604" p3="157.861435 5.570160 84.557098"/> - <quad p0="35:3" p1="35:2" p2="172.619171 5.932143 84.801636" p3="160.572739 5.932144 90.869629"/> - <quad p0="36:3" p1="36:2" p2="176.720337 6.418116 92.205292" p3="165.178528 6.418119 99.185562"/> - <quad p0="37:3" p1="37:2" p2="181.794891 6.767225 99.964233" p3="170.845276 6.767226 107.840942"/> - <quad p0="38:3" p1="38:2" p2="187.910828 6.996262 107.745819" p3="177.761887 6.996265 116.630432"/> - <quad p0="39:3" p1="39:2" p2="195.120560 7.121813 115.168869" p3="186.061920 7.121816 125.162766"/> - <quad p0="40:3" p1="40:2" p2="203.480179 7.160532 121.838669" p3="195.892822 7.160535 132.990753"/> - <quad p0="41:3" p1="41:2" p2="213.039047 7.129082 127.339279" p3="207.374451 7.129083 139.580566"/> - <quad p0="42:3" p1="42:2" p2="223.819153 7.044139 131.232834" p3="220.515076 7.044141 144.310303"/> - <quad p0="43:3" p1="43:2" p2="235.718018 6.922359 133.075211" p3="234.811218 6.922363 146.533096"/> - <quad p0="44:3" p1="44:2" p2="247.024292 6.909037 132.801239" p3="248.462021 6.909040 146.212814"/> - <quad p0="45:3" p1="45:2" p2="257.394379 7.096583 130.748505" p3="261.147552 7.096588 143.704224"/> - <quad p0="46:3" p1="46:2" p2="266.869080 7.444751 127.047241" p3="272.823456 7.444755 139.150238"/> - <quad p0="47:3" p1="47:2" p2="275.455841 7.913213 121.864578" p3="283.297699 7.913217 132.839188"/> - <quad p0="48:3" p1="48:2" p2="283.199402 8.461684 115.385193" p3="292.524353 8.461688 125.131042"/> - <quad p0="49:3" p1="49:2" p2="290.180176 9.049956 107.784012" p3="300.600159 9.049960 116.349045"/> - <quad p0="50:3" p1="50:2" p2="296.496735 9.637872 99.214798" p3="307.694946 9.637876 106.733917"/> - <quad p0="51:3" p1="51:2" p2="302.387115 10.185430 89.547165" p3="314.545074 10.185435 95.388565"/> - <quad p0="52:3" p1="52:2" p2="308.073456 10.944722 74.991821" p3="321.158875 10.944725 78.264160"/> - <quad p0="53:3" p1="53:2" p2="309.610870 11.704998 60.460239" p3="323.099060 11.705005 60.529812"/> - <quad p0="54:3" p1="54:2" p2="308.285400 12.434637 46.447987" p3="321.628479 12.434643 44.473370"/> - <quad p0="55:3" p1="55:2" p2="305.572815 13.102206 32.909569" p3="318.788361 13.102213 30.210007"/> - <quad p0="56:3" p1="56:2" p2="302.829681 13.676236 19.728634" p3="316.143066 13.676239 17.562706"/> - <quad p0="57:3" p1="57:2" p2="301.293518 14.125220 6.816071" p3="314.777252 14.125225 6.460625"/> - <quad p0="58:3" p1="58:2" p2="302.088684 14.417689 -5.960781" p3="315.320709 14.417693 -3.343332"/> - <quad p0="59:3" p1="59:2" p2="306.472595 14.522183 -19.228100" p3="318.938080 15.069299 -14.075474"/> - <quad p0="60:3" p1="60:2" p2="313.714111 14.590604 -33.888187" p3="325.770538 15.137721 -27.840006"/> - <quad p0="61:3" p1="61:2" p2="320.610413 15.407014 -47.384274" p3="332.575104 15.411443 -41.156658"/> - <quad p0="62:3" p1="62:2" p2="327.265930 15.662045 -59.923935" p3="339.131653 15.573148 -53.509724"/> - <quad p0="63:3" p1="63:2" p2="333.896576 15.954364 -71.961731" p3="345.666046 15.865468 -65.372635"/> - <quad p0="64:3" p1="64:2" p2="340.718628 16.246647 -83.952347" p3="352.405945 16.157753 -77.218575"/> - <quad p0="65:3" p1="65:2" p2="347.947845 16.668587 -96.348694" p3="359.575531 15.865582 -89.512527"/> - <quad p0="66:3" p1="66:2" p2="355.798126 16.809029 -109.600769" p3="367.391907 16.045898 -102.707214"/> - <quad p0="67:3" p1="67:2" p2="364.437286 16.114304 -124.082809" p3="375.878448 16.114307 -116.938858"/> - <quad p0="68:3" p1="68:2" p2="371.188232 16.247356 -134.268768" p3="382.055328 16.247360 -126.278534"/> - <quad p0="69:3" p1="69:2" p2="378.176849 16.598160 -142.783340" p3="388.165649 16.598167 -133.719131"/> - <quad p0="70:3" p1="70:2" p2="385.552734 17.094009 -150.090210" p3="394.599976 17.094013 -140.085953"/> - <quad p0="71:3" p1="71:2" p2="393.434143 17.662209 -156.566864" p3="401.613953 17.662212 -145.841766"/> - <quad p0="72:3" p1="72:2" p2="401.936584 18.230175 -162.571838" p3="409.451172 18.230183 -151.370575"/> - <quad p0="73:3" p1="73:2" p2="411.158539 18.725475 -168.448135" p3="418.281311 18.725483 -156.993729"/> - <quad p0="74:3" p1="74:2" p2="421.177673 19.075741 -174.532608" p3="428.188416 19.075745 -163.009323"/> - <quad p0="75:3" p1="75:2" p2="432.073944 19.208611 -181.173264" p3="439.253632 19.208614 -169.754456"/> - <quad p0="76:3" p1="76:2" p2="445.067230 19.278889 -189.556961" p3="452.673828 19.278893 -178.418015"/> - <quad p0="77:3" p1="77:2" p2="457.511597 19.428989 -198.552811" p3="465.838623 19.428997 -187.941666"/> - <quad p0="78:3" p1="78:2" p2="468.918823 19.567791 -208.289536" p3="478.236725 19.567799 -198.536865"/> - <quad p0="79:3" p1="79:2" p2="478.805145 19.604237 -218.925064" p3="489.360901 19.604248 -210.527908"/> - <quad p0="80:3" p1="80:2" p2="486.650787 19.447369 -230.629517" p3="498.556488 19.447376 -224.289948"/> - <quad p0="81:3" p1="81:2" p2="491.872650 19.006302 -243.540985" p3="504.905457 19.006310 -240.064667"/> - <quad p0="82:3" p1="82:2" p2="493.850616 18.190056 -257.681946" p3="507.338837 18.190063 -257.614624"/> - <quad p0="83:3" p1="83:2" p2="492.050690 16.907482 -272.940491" p3="505.150208 16.907490 -276.155762"/> - <quad p0="84:3" p1="84:2" p2="487.325073 15.614814 -283.889221" p3="498.578247 15.614820 -291.325958"/> - <quad p0="85:3" p1="85:2" p2="479.719574 14.157977 -291.675110" p3="487.770477 14.157986 -302.497375"/> - <quad p0="86:3" p1="86:2" p2="470.354462 12.639530 -296.739319" p3="475.584351 12.639537 -309.172577"/> - <quad p0="87:3" p1="87:2" p2="460.081177 11.164165 -300.068634" p3="463.712372 11.164172 -313.059113"/> - <quad p0="88:3" p1="88:2" p2="449.460541 9.836051 -302.626007" p3="452.674255 9.836058 -315.725922"/> - <quad p0="89:3" p1="89:2" p2="439.022797 8.758851 -305.231659" p3="442.883575 8.758858 -318.155731"/> - <quad p0="90:3" p1="90:2" p2="429.329956 8.036228 -308.597046" p3="434.888794 8.036235 -320.886780"/> - <quad p0="91:3" p1="91:2" p2="420.893646 7.772212 -313.349487" p3="429.015930 7.772219 -324.118195"/> - <quad p0="92:3" p1="92:2" p2="410.661957 7.866627 -322.698395" p3="420.752686 7.866632 -331.649048"/> - <quad p0="93:3" p1="93:2" p2="404.320007 8.116621 -332.003815" p3="416.142731 8.116627 -338.496948"/> - <quad p0="94:3" p1="94:2" p2="400.460815 8.472187 -341.375946" p3="413.219910 8.472196 -345.751343"/> - <quad p0="95:3" p1="95:2" p2="397.911530 8.883303 -350.866760" p3="410.963562 8.883308 -354.269653"/> - <quad p0="96:3" p1="96:2" p2="395.506897 9.299986 -360.409180" p3="408.384277 9.299991 -364.422913"/> - <quad p0="97:3" p1="97:2" p2="391.926849 9.672275 -369.819489" p3="403.857208 9.672280 -376.112610"/> - <quad p0="98:3" p1="98:2" p2="385.764526 9.950300 -378.625061" p3="395.395966 9.950306 -388.068146"/> - <quad p0="99:3" p1="99:2" p2="376.182526 10.084319 -385.956818" p3="383.326691 10.084326 -397.397827"/> - <quad p0="100:3" p1="100:2" p2="365.794495 10.061456 -391.186340" p3="371.249634 10.061462 -403.522369"/> - <quad p0="101:3" p1="101:2" p2="355.490845 9.930087 -395.127502" p3="359.572449 9.930091 -407.983521"/> - <quad p0="102:3" p1="102:2" p2="345.110291 9.719132 -397.744598" p3="347.509766 9.719138 -411.017883"/> - <quad p0="103:3" p1="103:2" p2="334.695038 9.457513 -398.877747" p3="335.100067 9.457517 -412.360046"/> - <quad p0="104:3" p1="104:2" p2="324.310822 9.174155 -398.361694" p3="322.477509 9.174160 -411.724945"/> - <quad p0="105:3" p1="105:2" p2="314.053436 8.898008 -396.042786" p3="309.896179 8.898014 -408.874542"/> - <quad p0="106:3" p1="106:2" p2="304.036957 8.658048 -391.797882" p3="297.681702 8.658053 -403.695343"/> - <quad p0="107:3" p1="107:2" p2="294.164581 8.483263 -385.374298" p3="285.307556 8.483266 -395.547272"/> - <quad p0="108:3" p1="108:2" p2="284.858459 8.408112 -374.996399" p3="273.416504 8.408114 -382.139099"/> - <quad p0="109:3" p1="109:2" p2="280.138153 8.474080 -362.836060" p3="267.018921 8.474083 -365.970184"/> - <quad p0="110:3" p1="110:2" p2="278.763916 8.624957 -350.110352" p3="265.286346 8.624961 -350.651978"/> - <quad p0="111:3" p1="111:2" p2="279.041473 8.804563 -337.326996" p3="265.558563 8.804564 -336.941101"/> - <quad p0="112:3" p1="112:2" p2="279.480530 8.956744 -324.854309" p3="265.993286 8.956747 -325.032227"/> - <quad p0="113:3" p1="113:2" p2="278.772064 9.025378 -313.131470" p3="265.476410 9.025382 -315.403809"/> - <quad p0="114:3" p1="114:2" p2="275.785370 8.954377 -302.553101" p3="263.609741 8.954381 -308.357422"/> - <quad p0="115:3" p1="115:2" p2="269.096527 8.687596 -292.870544" p3="258.818848 8.687600 -301.605804"/> - <quad p0="116:3" p1="116:2" p2="261.312286 8.329110 -285.650726" p3="252.629425 8.329114 -295.972809"/> - <quad p0="117:3" p1="117:2" p2="253.051682 7.902745 -279.411560" p3="245.579620 7.902749 -290.641235"/> - <quad p0="118:3" p1="118:2" p2="244.546707 7.422687 -274.476532" p3="238.602386 7.422691 -286.584503"/> - <quad p0="119:3" p1="119:2" p2="235.802124 6.903093 -270.922546" p3="231.718216 6.903097 -283.777863"/> - <quad p0="120:3" p1="120:2" p2="226.800903 6.358129 -268.819580" p3="224.859360 6.358130 -282.167480"/> - <quad p0="121:3" p1="121:2" p2="217.498795 5.801954 -268.245270" p3="217.847534 5.801958 -281.729187"/> - <quad p0="122:3" p1="122:2" p2="207.834595 5.248772 -269.302246" p3="210.433853 5.248774 -282.537842"/> - <quad p0="123:3" p1="123:2" p2="197.836502 4.712832 -272.090210" p3="202.727539 4.712837 -284.660614"/> - <quad p0="124:3" p1="124:2" p2="186.554260 4.123051 -277.563843" p3="193.700150 4.123055 -289.003784"/> - <quad p0="125:3" p1="125:2" p2="177.882446 3.639844 -284.509827" p3="187.347610 3.639850 -294.119598"/> - <quad p0="126:3" p1="126:2" p2="171.020645 3.254605 -292.891388" p3="182.121414 3.254609 -300.553619"/> - <quad p0="127:3" p1="127:2" p2="165.407745 2.958753 -302.640961" p3="177.440552 2.958754 -308.735901"/> - <quad p0="128:3" p1="128:2" p2="160.556335 2.743677 -313.604340" p3="173.026306 2.743680 -318.746033"/> - <quad p0="129:3" p1="129:2" p2="155.970551 2.600741 -325.557617" p3="168.567368 2.600745 -330.380127"/> - <quad p0="130:3" p1="130:2" p2="151.121063 2.521310 -338.250946" p3="163.617218 2.521313 -343.328644"/> - <quad p0="131:3" p1="131:2" p2="145.433350 2.496754 -351.463593" p3="157.548584 2.496758 -357.393005"/> - <quad p0="132:3" p1="132:2" p2="136.052399 2.641987 -369.023926" p3="147.599655 2.641989 -375.995117"/> - <quad p0="133:3" p1="133:2" p2="124.729424 3.038120 -385.735352" p3="135.434906 3.038120 -393.940796"/> - <quad p0="134:3" p1="134:2" p2="111.691673 3.625790 -400.784821" p3="121.244347 3.625791 -410.307556"/> - <quad p0="135:3" p1="135:2" p2="97.113365 4.345652 -413.401398" p3="105.006470 4.345652 -424.339233"/> - <quad p0="136:3" p1="136:2" p2="81.145203 5.138347 -422.771118" p3="86.602516 5.138347 -435.106232"/> - <quad p0="137:3" p1="137:2" p2="63.959770 5.944490 -427.993103" p3="65.998367 5.944493 -441.326538"/> - <quad p0="138:3" p1="138:2" p2="45.884003 6.704715 -428.093964" p3="43.781937 6.704717 -441.417572"/> - <quad p0="139:3" p1="139:2" p2="27.301374 7.359762 -422.138336" p3="20.778046 7.359762 -433.944427"/> - <quad p0="140:3" p1="140:2" p2="0.370130 8.127097 -403.041962" p3="-9.156101 8.127098 -412.591217"/> - <quad p0="141:3" p1="141:2" p2="-16.463556 8.383954 -378.328979" p3="-28.703753 8.383955 -383.996002"/> - <quad p0="142:3" p1="142:2" p2="-24.519220 8.256188 -349.510406" p3="-37.854538 8.256188 -351.536865"/> - <quad p0="143:3" p1="143:2" p2="-25.766535 7.869532 -317.773834" p3="-39.245949 7.869531 -317.281036"/> - <quad p0="144:3" p1="144:2" p2="-22.176336 7.349765 -283.992950" p3="-35.519089 7.349765 -282.016113"/> - <quad p0="145:3" p1="145:2" p2="-15.596212 6.822705 -248.980408" p3="-28.812048 6.822703 -246.282318"/> - <quad p0="146:3" p1="146:2" p2="-7.809156 6.414185 -213.584534" p3="-20.999647 6.414183 -210.765305"/> - <quad p0="147:3" p1="147:2" p2="-0.561110 6.250067 -178.637711" p3="-13.803267 6.250065 -176.071960"/> - <quad p0="148:3" p1="148:2" p2="2.394723 5.906845 -160.943787" p3="-10.948101 5.906845 -158.967407"/> - <quad p0="149:3" p1="149:2" p2="4.466957 4.985694 -144.697250" p3="-8.942724 4.985694 -143.242157"/> - <quad p0="150:3" p1="150:2" p2="5.819858 3.648952 -129.400299" p3="-7.634411 3.648951 -128.441315"/> - <quad p0="151:3" p1="151:2" p2="6.619591 2.058862 -114.528122" p3="-6.857767 2.058863 -113.982254"/> - <quad p0="152:3" p1="152:2" p2="7.030065 0.377888 -99.560684" p3="-6.455758 0.377887 -99.298035"/> - <quad p0="153:3" p1="153:2" p2="7.215342 -1.231069 -83.988121" p3="-6.272455 -1.231070 -83.858215"/> - <quad p0="154:3" p1="154:2" p2="7.341048 -2.604772 -67.311348" p3="-6.146646 -2.604771 -67.172638"/> - <quad p0="155:3" p1="155:2" p2="7.574196 -3.579637 -49.087162" p3="-5.913549 -3.579638 -48.955429"/> - <quad p0="156:3" p1="156:2" p2="7.568552 -3.730650 -44.231682" p3="-5.917654 -3.730650 -44.475243"/> - <quad p0="157:3" p1="157:2" p2="7.408055 -3.801431 -39.820583" p3="-6.064579 -3.801433 -40.472557"/> - <quad p0="158:3" p1="158:2" p2="7.151790 -3.810667 -35.640247" p3="-6.307169 -3.810668 -36.531059"/> - <quad p0="159:3" p1="159:2" p2="6.858890 -3.776843 -31.532837" p3="-6.598764 -3.776843 -32.443081"/> - <quad p0="160:3" p1="160:2" p2="6.591874 -3.718451 -27.352283" p3="-6.878504 -3.718452 -28.049374"/> - <quad p0="161:3" p1="161:2" p2="6.417422 -3.653947 -22.966440" p3="-7.068039 -3.653946 -23.248310"/> - <quad p0="162:3" p1="162:2" p2="6.403722 -3.601754 -18.253653" p3="-7.081944 -3.601754 -17.982304"/> - <quad p0="163:3" p1="163:2" p2="6.610883 -3.580266 -13.217347" p3="-6.867727 -3.580265 -12.704100"/> - <quad p0="164:3" p1="164:2" p2="6.227722 -3.580266 -3.074076" p3="-6.860426 -3.580267 -3.319141"/> + <quad p0="31.069660 -3.580266 -26.931189" p1="42.126385 -3.580266 -26.907518" p2="42.233513 -3.580267 -22.433567" p3="31.197355 -3.580268 -21.755892"/> + <quad p0="0:3" p1="0:2" p2="42.690163 -3.580266 -17.915825" p3="31.771564 -3.580265 -16.172092"/> + <quad p0="1:3" p1="1:2" p2="43.703751 -3.580267 -13.318302" p3="33.108322 -3.580269 -10.157070"/> + <quad p0="2:3" p1="2:2" p2="45.466225 -3.580267 -8.643681" p3="35.460941 -3.580268 -3.937241"/> + <quad p0="3:3" p1="3:2" p2="48.090744 -3.580266 -3.965691" p3="38.765305 -3.580265 1.975052"/> + <quad p0="4:3" p1="4:2" p2="50.832104 -3.597070 -0.209564" p3="42.247097 -3.597071 6.758526"/> + <quad p0="5:3" p1="5:2" p2="53.737808 -3.637881 2.994488" p3="45.983353 -3.637880 10.876373"/> + <quad p0="6:3" p1="6:2" p2="56.868198 -3.688309 5.725395" p3="50.111572 -3.688309 14.477760"/> + <quad p0="7:3" p1="7:2" p2="60.232872 -3.733953 8.010025" p3="54.565819 -3.733952 17.504250"/> + <quad p0="8:3" p1="8:2" p2="63.830650 -3.760388 9.886612" p3="59.237507 -3.760388 19.944405"/> + <quad p0="9:3" p1="9:2" p2="67.662704 -3.753172 11.409763" p3="64.028885 -3.753173 21.852509"/> + <quad p0="10:3" p1="10:2" p2="71.742645 -3.697867 12.645535" p3="68.892876 -3.697867 23.328934"/> + <quad p0="11:3" p1="11:2" p2="76.250008 -3.580062 13.691406" p3="74.454361 -3.580062 24.601570"/> + <quad p0="12:3" p1="12:2" p2="84.874680 -3.272042 14.803070" p3="84.198082 -3.272041 25.839287"/> + <quad p0="13:3" p1="13:2" p2="93.343918 -2.935133 14.725845" p3="94.066208 -2.935133 25.759186"/> + <quad p0="14:3" p1="14:2" p2="101.440964 -2.559891 13.725883" p3="103.260201 -2.559890 24.632156"/> + <quad p0="15:3" p1="15:2" p2="109.131660 -2.136874 12.098232" p3="111.720230 -2.136873 22.847908"/> + <quad p0="16:3" p1="16:2" p2="116.389236 -1.656626 10.130146" p3="119.415802 -1.656625 20.764793"/> + <quad p0="17:3" p1="17:2" p2="123.183517 -1.109673 8.100975" p3="126.302605 -1.109671 18.708870"/> + <quad p0="18:3" p1="18:2" p2="129.472046 -0.486495 6.282780" p3="132.286163 -0.486493 16.975639"/> + <quad p0="19:3" p1="19:2" p2="135.314423 0.222213 4.909580" p3="137.691406 0.222214 15.708031"/> + <quad p0="20:3" p1="20:2" p2="138.357483 0.666106 4.330814" p3="140.319305 0.666108 15.212334"/> + <quad p0="21:3" p1="21:2" p2="141.812225 1.196698 3.742260" p3="143.413910 1.196700 14.682579"/> + <quad p0="22:3" p1="22:2" p2="145.466827 1.767840 3.290558" p3="146.434692 1.767843 14.305054"/> + <quad p0="23:3" p1="23:2" p2="149.211334 2.333175 3.092541" p3="149.260635 2.333176 14.149391"/> + <quad p0="24:3" p1="24:2" p2="152.928375 2.846344 3.255859" p3="151.742584 2.846345 14.249039"/> + <quad p0="25:3" p1="25:2" p2="156.505005 3.261074 3.873657" p3="153.748840 3.261076 14.581589"/> + <quad p0="26:3" p1="26:2" p2="159.852173 3.531272 5.026363" p3="155.241455 3.531274 15.076126"/> + <quad p0="27:3" p1="27:2" p2="162.909729 3.611032 6.791363" p3="156.273300 3.611034 15.635208"/> + <quad p0="28:3" p1="28:2" p2="165.882660 3.647667 9.561245" p3="157.550293 3.647670 16.829536"/> + <quad p0="29:3" p1="29:2" p2="168.304443 3.808672 13.013870" p3="158.808563 3.808674 18.678162"/> + <quad p0="30:3" p1="30:2" p2="170.320557 4.068004 17.067497" p3="160.192810 4.068007 21.504326"/> + <quad p0="31:3" p1="31:2" p2="172.012299 4.399708 21.530571" p3="161.571106 4.399709 25.168930"/> + <quad p0="32:3" p1="32:2" p2="173.488068 4.777892 26.191689" p3="162.922302 4.777894 29.450607"/> + <quad p0="33:3" p1="33:2" p2="174.882507 5.176672 30.846634" p3="164.332886 5.176673 34.157471"/> + <quad p0="34:3" p1="34:2" p2="176.358017 5.570158 35.312881" p3="166.001831 5.570159 39.186554"/> + <quad p0="35:3" p1="35:2" p2="178.099304 5.932142 39.387009" p3="168.224396 5.932143 44.361168"/> + <quad p0="36:3" p1="36:2" p2="181.461182 6.418115 45.456062" p3="171.999924 6.418118 51.178047"/> + <quad p0="37:3" p1="37:2" p2="185.620987 6.767224 51.816353" p3="176.645172 6.767225 58.273193"/> + <quad p0="38:3" p1="38:2" p2="190.634445 6.996261 58.195221" p3="182.314972 6.996264 65.478271"/> + <quad p0="39:3" p1="39:2" p2="196.544525 7.121812 64.280174" p3="189.118820 7.121815 72.472542"/> + <quad p0="40:3" p1="40:2" p2="203.397217 7.160531 69.747658" p3="197.177582 7.160534 78.889435"/> + <quad p0="41:3" p1="41:2" p2="211.232986 7.129081 74.256714" p3="206.589508 7.129082 84.291351"/> + <quad p0="42:3" p1="42:2" p2="220.069839 7.044138 77.448410" p3="217.361359 7.044140 88.168503"/> + <quad p0="43:3" p1="43:2" p2="229.823792 6.922359 78.958664" p3="229.080444 6.922362 89.990601"/> + <quad p0="44:3" p1="44:2" p2="239.091965 6.909036 78.734085" p3="240.270523 6.909039 89.728058"/> + <quad p0="45:3" p1="45:2" p2="247.592712 7.096582 77.051384" p3="250.669327 7.096587 87.671677"/> + <quad p0="46:3" p1="46:2" p2="255.359497 7.444750 74.017319" p3="260.240540 7.444754 83.938599"/> + <quad p0="47:3" p1="47:2" p2="262.398376 7.913212 69.768898" p3="268.826660 7.913216 78.765198"/> + <quad p0="48:3" p1="48:2" p2="268.746094 8.461683 64.457504" p3="276.390076 8.461687 72.446541"/> + <quad p0="49:3" p1="49:2" p2="274.468475 9.049955 58.226524" p3="283.010132 9.049959 65.247604"/> + <quad p0="50:3" p1="50:2" p2="279.646393 9.637871 51.202019" p3="288.825989 9.637875 57.365723"/> + <quad p0="51:3" p1="51:2" p2="284.474976 10.185429 43.277092" p3="294.441284 10.185434 48.065506"/> + <quad p0="52:3" p1="52:2" p2="289.136261 10.944721 31.345543" p3="299.862854 10.944724 34.028000"/> + <quad p0="53:3" p1="53:2" p2="290.396545 11.704997 19.433456" p3="301.453308 11.705004 19.490486"/> + <quad p0="54:3" p1="54:2" p2="289.309998 12.434636 7.947086" p3="300.247833 12.434642 6.328419"/> + <quad p0="55:3" p1="55:2" p2="287.086395 13.102205 -3.150864" p3="297.919678 13.102212 -5.363796"/> + <quad p0="56:3" p1="56:2" p2="284.837769 13.676235 -13.955769" p3="295.751221 13.676238 -15.731262"/> + <quad p0="57:3" p1="57:2" p2="283.578491 14.125219 -24.540682" p3="294.631622 14.125224 -24.832054"/> + <quad p0="58:3" p1="58:2" p2="284.230347 14.417688 -35.014347" p3="295.077118 14.417692 -32.868729"/> + <quad p0="59:3" p1="59:2" p2="287.823975 14.522182 -45.890064" p3="298.042419 15.069298 -41.666264"/> + <quad p0="60:3" p1="60:2" p2="293.760132 14.590603 -57.907490" p3="303.643219 15.137720 -52.949570"/> + <quad p0="61:3" p1="61:2" p2="299.413269 15.407013 -68.970734" p3="309.221191 15.411442 -63.865726"/> + <quad p0="62:3" p1="62:2" p2="304.869049 15.662045 -79.249969" p3="314.595825 15.573147 -73.991997"/> + <quad p0="63:3" p1="63:2" p2="310.304443 15.954363 -89.117798" p3="319.952332 15.865467 -83.716469"/> + <quad p0="64:3" p1="64:2" p2="315.896729 16.246647 -98.946960" p3="325.477264 16.157751 -93.427032"/> + <quad p0="65:3" p1="65:2" p2="321.822784 16.668585 -109.108704" p3="331.354462 15.865582 -103.504845"/> + <quad p0="66:3" p1="66:2" p2="328.257965 16.809029 -119.971931" p3="337.761810 16.045898 -114.321030"/> + <quad p0="67:3" p1="67:2" p2="335.339813 16.114302 -131.843414" p3="344.718567 16.114307 -125.987244"/> + <quad p0="68:3" p1="68:2" p2="340.873810 16.247355 -140.193207" p3="349.781982 16.247360 -133.643326"/> + <quad p0="69:3" p1="69:2" p2="346.602661 16.598160 -147.172928" p3="354.790833 16.598167 -139.742645"/> + <quad p0="70:3" p1="70:2" p2="352.648926 17.094007 -153.162643" p3="360.065308 17.094013 -144.961777"/> + <quad p0="71:3" p1="71:2" p2="359.109619 17.662207 -158.471802" p3="365.814911 17.662212 -149.680038"/> + <quad p0="72:3" p1="72:2" p2="366.079407 18.230175 -163.394302" p3="372.239380 18.230181 -154.212219"/> + <quad p0="73:3" p1="73:2" p2="373.638977 18.725475 -168.211319" p3="379.477783 18.725483 -158.821716"/> + <quad p0="74:3" p1="74:2" p2="381.852020 19.075739 -173.198990" p3="387.598999 19.075745 -163.752930"/> + <quad p0="75:3" p1="75:2" p2="390.784119 19.208609 -178.642578" p3="396.669586 19.208614 -169.282166"/> + <quad p0="76:3" p1="76:2" p2="401.435211 19.278887 -185.515015" p3="407.670624 19.278893 -176.384003"/> + <quad p0="77:3" p1="77:2" p2="411.636322 19.428988 -192.889252" p3="418.462280 19.428995 -184.190903"/> + <quad p0="78:3" p1="78:2" p2="420.987244 19.567789 -200.870804" p3="428.625488 19.567799 -192.876175"/> + <quad p0="79:3" p1="79:2" p2="429.091431 19.604237 -209.589157" p3="437.744385 19.604246 -202.705688"/> + <quad p0="80:3" p1="80:2" p2="435.522797 19.447367 -219.183731" p3="445.282349 19.447374 -213.986954"/> + <quad p0="81:3" p1="81:2" p2="439.803345 19.006300 -229.767746" p3="450.486847 19.006308 -226.918076"/> + <quad p0="82:3" p1="82:2" p2="441.424774 18.190056 -241.359634" p3="452.481567 18.190063 -241.304428"/> + <quad p0="83:3" p1="83:2" p2="439.949310 16.907482 -253.867630" p3="450.687469 16.907490 -256.503296"/> + <quad p0="84:3" p1="84:2" p2="436.075531 15.614813 -262.842712" p3="445.300171 15.614819 -268.938904"/> + <quad p0="85:3" p1="85:2" p2="429.841034 14.157976 -269.225098" p3="436.440643 14.157985 -278.096527"/> + <quad p0="86:3" p1="86:2" p2="422.164093 12.639529 -273.376404" p3="426.451233 12.639536 -283.568420"/> + <quad p0="87:3" p1="87:2" p2="413.742706 11.164165 -276.105591" p3="416.719330 11.164171 -286.754395"/> + <quad p0="88:3" p1="88:2" p2="405.036560 9.836050 -278.201965" p3="407.670959 9.836057 -288.940460"/> + <quad p0="89:3" p1="89:2" p2="396.480347 8.758850 -280.337921" p3="399.645172 8.758857 -290.932251"/> + <quad p0="90:3" p1="90:2" p2="388.534760 8.036227 -283.096649" p3="393.091553 8.036234 -293.171021"/> + <quad p0="91:3" p1="91:2" p2="381.619202 7.772211 -286.992401" p3="388.277344 7.772218 -295.819916"/> + <quad p0="92:3" p1="92:2" p2="373.231903 7.866626 -294.656067" p3="381.503662 7.866632 -301.993225"/> + <quad p0="93:3" p1="93:2" p2="368.033173 8.116620 -302.284058" p3="377.724701 8.116626 -307.606720"/> + <quad p0="94:3" p1="94:2" p2="364.869659 8.472186 -309.966736" p3="375.328766 8.472195 -313.553406"/> + <quad p0="95:3" p1="95:2" p2="362.779907 8.883302 -317.746735" p3="373.479156 8.883307 -320.536194"/> + <quad p0="96:3" p1="96:2" p2="360.808746 9.299985 -325.569000" p3="371.364807 9.299990 -328.859192"/> + <quad p0="97:3" p1="97:2" p2="357.874023 9.672274 -333.282990" p3="367.653809 9.672279 -338.441681"/> + <quad p0="98:3" p1="98:2" p2="352.822540 9.950299 -340.501251" p3="360.717804 9.950305 -348.242096"/> + <quad p0="99:3" p1="99:2" p2="344.967834 10.084318 -346.511353" p3="350.824158 10.084325 -355.889984"/> + <quad p0="100:3" p1="100:2" p2="336.452362 10.061455 -350.798187" p3="340.924133 10.061461 -360.910492"/> + <quad p0="101:3" p1="101:2" p2="328.006073 9.930086 -354.028900" p3="331.351929 9.930090 -364.567474"/> + <quad p0="102:3" p1="102:2" p2="319.496735 9.719131 -356.174255" p3="321.463684 9.719137 -367.054840"/> + <quad p0="103:3" p1="103:2" p2="310.958984 9.457512 -357.103119" p3="311.290985 9.457516 -368.155060"/> + <quad p0="104:3" p1="104:2" p2="302.446655 9.174154 -356.680084" p3="300.943817 9.174159 -367.634460"/> + <quad p0="105:3" p1="105:2" p2="294.038269 8.898007 -354.779205" p3="290.630432 8.898013 -365.297882"/> + <quad p0="106:3" p1="106:2" p2="285.827393 8.658047 -351.299500" p3="280.617737 8.658052 -361.052277"/> + <quad p0="107:3" p1="107:2" p2="277.734619 8.483262 -346.033844" p3="270.474182 8.483265 -354.373016"/> + <quad p0="108:3" p1="108:2" p2="270.106079 8.408111 -337.526703" p3="260.726685 8.408113 -343.381836"/> + <quad p0="109:3" p1="109:2" p2="266.236633 8.474079 -327.558411" p3="255.482330 8.474082 -330.127563"/> + <quad p0="110:3" p1="110:2" p2="265.110138 8.624956 -317.126648" p3="254.062073 8.624960 -317.570648"/> + <quad p0="111:3" p1="111:2" p2="265.337646 8.804562 -306.647675" p3="254.285217 8.804564 -306.331329"/> + <quad p0="112:3" p1="112:2" p2="265.697571 8.956743 -296.423340" p3="254.641571 8.956746 -296.569183"/> + <quad p0="113:3" p1="113:2" p2="265.116821 9.025377 -286.813690" p3="254.217865 9.025381 -288.676392"/> + <quad p0="114:3" p1="114:2" p2="262.668518 8.954376 -278.142212" p3="252.687683 8.954380 -282.900208"/> + <quad p0="115:3" p1="115:2" p2="257.185425 8.687595 -270.205048" p3="248.760422 8.687599 -277.365662"/> + <quad p0="116:3" p1="116:2" p2="250.804367 8.329109 -264.286682" p3="243.686707 8.329113 -272.748108"/> + <quad p0="117:3" p1="117:2" p2="244.032837 7.902744 -259.172180" p3="237.907715 7.902748 -268.377594"/> + <quad p0="118:3" p1="118:2" p2="237.060989 7.422686 -255.126785" p3="232.188217 7.422690 -265.052124"/> + <quad p0="119:3" p1="119:2" p2="229.892731 6.903092 -252.213455" p3="226.544998 6.903096 -262.751434"/> + <quad p0="120:3" p1="120:2" p2="222.514099 6.358128 -250.489563" p3="220.922531 6.358130 -261.431335"/> + <quad p0="121:3" p1="121:2" p2="214.888809 5.801953 -250.018784" p3="215.174683 5.801957 -261.072052"/> + <quad p0="122:3" p1="122:2" p2="206.966705 5.248771 -250.885223" p3="209.097412 5.248773 -261.734924"/> + <quad p0="123:3" p1="123:2" p2="198.770889 4.712831 -253.170609" p3="202.780258 4.712836 -263.475037"/> + <quad p0="124:3" p1="124:2" p2="189.522415 4.123050 -257.657562" p3="195.380173 4.123054 -267.035339"/> + <quad p0="125:3" p1="125:2" p2="182.413803 3.639843 -263.351440" p3="190.172745 3.639849 -271.228943"/> + <quad p0="126:3" p1="126:2" p2="176.788925 3.254604 -270.222137" p3="185.888641 3.254608 -276.503174"/> + <quad p0="127:3" p1="127:2" p2="172.187820 2.958752 -278.214233" p3="182.051559 2.958753 -283.210480"/> + <quad p0="128:3" p1="128:2" p2="168.210938 2.743676 -287.201294" p3="178.433044 2.743679 -291.416138"/> + <quad p0="129:3" p1="129:2" p2="164.451797 2.600740 -296.999878" p3="174.777878 2.600744 -300.953064"/> + <quad p0="130:3" p1="130:2" p2="160.476501 2.521309 -307.405060" p3="170.720062 2.521312 -311.567444"/> + <quad p0="131:3" p1="131:2" p2="155.814056 2.496753 -318.235962" p3="165.745361 2.496758 -323.096527"/> + <quad p0="132:3" p1="132:2" p2="148.124146 2.641986 -332.630829" p3="157.589859 2.641988 -338.345367"/> + <quad p0="133:3" p1="133:2" p2="138.842285 3.038119 -346.329803" p3="147.617950 3.038119 -353.056122"/> + <quad p0="134:3" p1="134:2" p2="128.154755 3.625789 -358.666412" p3="135.985443 3.625790 -366.472565"/> + <quad p0="135:3" p1="135:2" p2="116.204361 4.345651 -369.008698" p3="122.674637 4.345651 -377.974854"/> + <quad p0="136:3" p1="136:2" p2="103.114662 5.138346 -376.689423" p3="107.588226 5.138346 -386.800964"/> + <quad p0="137:3" p1="137:2" p2="89.027115 5.944489 -380.970062" p3="90.698235 5.944492 -391.899994"/> + <quad p0="138:3" p1="138:2" p2="74.209732 6.704714 -381.052765" p3="72.486588 6.704716 -391.974609"/> + <quad p0="139:3" p1="139:2" p2="58.976856 7.359761 -376.170715" p3="53.629440 7.359761 -385.848602"/> + <quad p0="140:3" p1="140:2" p2="36.900303 8.127096 -360.516693" p3="29.091297 8.127097 -368.344574"/> + <quad p0="141:3" p1="141:2" p2="23.101101 8.383953 -340.258545" p3="13.067352 8.383954 -344.903992"/> + <quad p0="142:3" p1="142:2" p2="16.497572 8.256187 -316.634857" p3="5.566113 8.256187 -318.296021"/> + <quad p0="143:3" p1="143:2" p2="15.475101 7.869531 -290.619202" p3="4.425522 7.869530 -290.215240"/> + <quad p0="144:3" p1="144:2" p2="18.418121 7.349764 -262.927734" p3="7.480564 7.349764 -261.307251"/> + <quad p0="145:3" p1="145:2" p2="23.812096 6.822704 -234.226639" p3="12.978579 6.822702 -232.014923"/> + <quad p0="146:3" p1="146:2" p2="30.195438 6.414184 -205.211319" p3="19.382698 6.414182 -202.900284"/> + <quad p0="147:3" p1="147:2" p2="36.136932 6.250066 -176.564087" p3="25.281839 6.250064 -174.460846"/> + <quad p0="148:3" p1="148:2" p2="38.559940 5.906844 -162.059723" p3="27.622326 5.906844 -160.439606"/> + <quad p0="149:3" p1="149:2" p2="40.258629 4.985693 -148.741837" p3="29.266209 4.985693 -147.549042"/> + <quad p0="150:3" p1="150:2" p2="41.367649 3.648951 -136.202362" p3="30.338682 3.648950 -135.416229"/> + <quad p0="151:3" p1="151:2" p2="42.023224 2.058861 -124.011070" p3="30.975327 2.058862 -123.563599"/> + <quad p0="152:3" p1="152:2" p2="42.359703 0.377887 -111.741699" p3="31.304869 0.377886 -111.526398"/> + <quad p0="153:3" p1="153:2" p2="42.511581 -1.231070 -98.976288" p3="31.455128 -1.231071 -98.869797"/> + <quad p0="154:3" p1="154:2" p2="42.614628 -2.604773 -85.305710" p3="31.558260 -2.604772 -85.192001"/> + <quad p0="155:3" p1="155:2" p2="42.805748 -3.579638 -70.366661" p3="31.749336 -3.579639 -70.258667"/> + <quad p0="156:3" p1="156:2" p2="42.801121 -3.730651 -66.386444" p3="31.745972 -3.730651 -66.586098"/> + <quad p0="157:3" p1="157:2" p2="42.669556 -3.801432 -62.770496" p3="31.625532 -3.801434 -63.304943"/> + <quad p0="158:3" p1="158:2" p2="42.459484 -3.810668 -59.343719" p3="31.426674 -3.810669 -60.073952"/> + <quad p0="159:3" p1="159:2" p2="42.219383 -3.776844 -55.976719" p3="31.187641 -3.776844 -56.722881"/> + <quad p0="160:3" p1="160:2" p2="42.000504 -3.718452 -52.549763" p3="30.958328 -3.718453 -53.121193"/> + <quad p0="161:3" p1="161:2" p2="41.857498 -3.653948 -48.954521" p3="30.802959 -3.653947 -49.185581"/> + <quad p0="162:3" p1="162:2" p2="41.846268 -3.601755 -45.091274" p3="30.791561 -3.601755 -44.868839"/> + <quad p0="163:3" p1="163:2" p2="42.016083 -3.580266 -40.962826" p3="30.967163 -3.580266 -40.542099"/> + <quad p0="164:3" p1="164:2" p2="41.701992 -3.580267 -32.648006" p3="30.973148 -3.580268 -32.848896"/> <quad p0="165:3" p1="165:2" p2="0:1" p3="0:0"/> <!-- Driveline: a.003 --> - <quad p0="505.480927 17.018387 -276.343201" p1="498.266327 16.233582 -290.989563" p2="494.856995 16.282074 -297.975647" p3="508.394714 17.382790 -290.908325"/> - <quad p0="167:3" p1="167:2" p2="492.087280 15.350242 -306.518890" p3="505.187042 16.457893 -309.733704"/> - <quad p0="168:3" p1="168:2" p2="486.956726 15.473100 -322.428131" p3="499.515076 15.473100 -327.350037"/> - <quad p0="169:3" p1="169:2" p2="480.073730 14.514550 -337.218628" p3="491.977539 14.514552 -343.561768"/> - <quad p0="170:3" p1="170:2" p2="471.930176 13.668407 -350.653259" p3="483.106628 13.668409 -358.204773"/> - <quad p0="171:3" p1="171:2" p2="463.002930 13.020860 -362.497009" p3="473.373932 13.020860 -371.121521"/> - <quad p0="172:3" p1="172:2" p2="453.751404 12.658168 -372.516205" p3="463.182587 12.658167 -382.159332"/> - <quad p0="173:3" p1="173:2" p2="444.735504 12.666758 -380.376526" p3="453.335602 12.666756 -390.767700"/> - <quad p0="174:3" p1="174:2" p2="432.984283 12.986402 -389.724243" p3="441.573273 12.986402 -400.124573"/> - <quad p0="175:3" p1="175:2" p2="423.627625 13.266897 -397.804230" p3="432.621246 13.266895 -407.856720"/> - <quad p0="176:3" p1="176:2" p2="415.862152 13.523499 -405.045380" p3="425.184113 13.523500 -414.794067"/> - <quad p0="177:3" p1="177:2" p2="409.020203 13.771379 -411.775696" p3="418.504059 13.771379 -421.367065"/> - <quad p0="178:3" p1="178:2" p2="402.442261 14.025703 -418.315765" p3="411.855988 14.025702 -427.975891"/> - <quad p0="179:3" p1="179:2" p2="395.491333 14.301648 -424.955994" p3="404.605896 14.301648 -434.898987"/> - <quad p0="180:3" p1="180:2" p2="387.554443 14.614381 -431.958252" p3="396.215729 14.614379 -442.298462"/> - <quad p0="181:3" p1="181:2" p2="378.110779 14.979001 -439.517120" p3="386.513672 14.978999 -450.068359"/> - <quad p0="182:3" p1="182:2" p2="367.292664 15.274091 -448.095459" p3="375.803223 15.274089 -458.559998"/> - <quad p0="183:3" p1="183:2" p2="357.503265 15.349170 -456.276764" p3="366.159363 15.349172 -466.621277"/> - <quad p0="184:3" p1="184:2" p2="348.196625 15.307788 -464.074982" p3="356.718689 15.307786 -474.530121"/> - <quad p0="185:3" p1="185:2" p2="338.919678 15.253449 -471.419586" p3="346.985596 15.253451 -482.230591"/> - <quad p0="186:3" p1="186:2" p2="329.228271 15.289777 -478.217346" p3="336.500397 15.289781 -489.577484"/> - <quad p0="187:3" p1="187:2" p2="318.697174 15.520490 -484.353607" p3="324.878571 15.520490 -496.342285"/> - <quad p0="188:3" p1="188:2" p2="306.925507 16.049305 -489.707336" p3="311.830109 16.049309 -502.272430"/> - <quad p0="189:3" p1="189:2" p2="293.434296 16.979816 -494.196045" p3="296.747650 16.979816 -507.271179"/> - <quad p0="190:3" p1="190:2" p2="275.470459 18.601910 -497.662537" p3="277.032959 18.601910 -511.060120"/> - <quad p0="191:3" p1="191:2" p2="258.701599 20.358311 -498.224701" p3="258.319336 20.358311 -511.707733"/> - <quad p0="192:3" p1="192:2" p2="242.937607 22.147480 -496.748779" p3="241.171783 22.147480 -510.121124"/> - <quad p0="193:3" p1="193:2" p2="227.800003 23.868256 -494.153839" p3="225.405380 23.868256 -507.427948"/> - <quad p0="194:3" p1="194:2" p2="212.859970 25.419655 -491.325226" p3="210.631302 25.419655 -504.628296"/> - <quad p0="195:3" p1="195:2" p2="197.661636 26.700787 -489.097748" p3="196.348343 26.700787 -502.522095"/> - <quad p0="196:3" p1="196:2" p2="181.719666 27.610790 -488.266296" p3="181.936707 27.610790 -501.752899"/> - <quad p0="197:3" p1="197:2" p2="164.541870 28.048790 -489.615204" p3="166.749969 28.048794 -502.921631"/> - <quad p0="198:3" p1="198:2" p2="145.013657 27.837498 -494.360870" p3="149.116730 27.837494 -507.210022"/> - <quad p0="199:3" p1="199:2" p2="126.433243 26.949379 -501.798798" p3="131.987320 26.949375 -514.090637"/> - <quad p0="200:3" p1="200:2" p2="108.642387 25.563389 -510.813385" p3="114.947762 25.563389 -522.737305"/> - <quad p0="201:3" p1="201:2" p2="91.584679 23.858631 -520.233765" p3="97.987190 23.858631 -532.105713"/> - <quad p0="202:3" p1="202:2" p2="75.157944 22.014263 -528.867249" p3="80.911949 22.014263 -541.066711"/> - <quad p0="203:3" p1="203:2" p2="59.182449 20.209373 -535.489502" p3="63.220894 20.209377 -548.359070"/> - <quad p0="204:3" p1="204:2" p2="43.403976 18.622860 -538.751099" p3="44.126648 18.622860 -552.220093"/> - <quad p0="205:3" p1="205:2" p2="27.839382 17.434326 -537.071472" p3="23.929165 17.434326 -549.980652"/> - <quad p0="206:3" p1="206:2" p2="9.086721 16.188000 -528.513245" p3="2.071077 16.188000 -540.033508"/> - <quad p0="207:3" p1="207:2" p2="-8.029659 14.946700 -515.304810" p3="-17.227291 14.946698 -525.170959"/> - <quad p0="208:3" p1="208:2" p2="-23.487745 13.728336 -498.211304" p3="-34.115013 13.728338 -506.517822"/> - <quad p0="209:3" p1="209:2" p2="-37.291512 12.551095 -477.914673" p3="-48.855064 12.551095 -484.858856"/> - <quad p0="210:3" p1="210:2" p2="-49.421806 11.433134 -455.058838" p3="-61.615013 11.433133 -460.826233"/> - <quad p0="211:3" p1="211:2" p2="-59.836128 10.392610 -430.276001" p3="-72.467796 10.392609 -435.006531"/> - <quad p0="212:3" p1="212:2" p2="-68.476402 9.447677 -404.196777" p3="-81.423439 9.447678 -407.979736"/> - <quad p0="213:3" p1="213:2" p2="-75.272675 8.616479 -377.461670" p3="-88.444260 8.616479 -380.367981"/> - <quad p0="214:3" p1="214:2" p2="-80.419540 7.930895 -350.078430" p3="-93.755836 7.930895 -352.098419"/> - <quad p0="215:3" p1="215:2" p2="-83.161865 7.505750 -325.340302" p3="-96.623352 7.505751 -326.191986"/> - <quad p0="216:3" p1="216:2" p2="-83.442474 7.288965 -302.193634" p3="-96.918640 7.288964 -301.618927"/> - <quad p0="217:3" p1="217:2" p2="-81.211899 7.228446 -279.645203" p3="-94.543434 7.228446 -277.593994"/> - <quad p0="218:3" p1="218:2" p2="-76.450935 7.272074 -256.712860" p3="-89.520477 7.272073 -253.377579"/> - <quad p0="219:3" p1="219:2" p2="-69.159393 7.367737 -232.380890" p3="-81.949059 7.367737 -228.095901"/> - <quad p0="220:3" p1="220:2" p2="-59.329887 7.463336 -205.589584" p3="-71.900414 7.463336 -200.698914"/> - <quad p0="221:3" p1="221:2" p2="-46.938042 7.506789 -175.255676" p3="-59.374092 7.506789 -170.032501"/> - <quad p0="222:3" p1="222:2" p2="-39.816559 7.164291 -159.130478" p3="-52.069786 7.164293 -153.491745"/> - <quad p0="223:3" p1="223:2" p2="-33.355865 6.245140 -145.736450" p3="-45.433228 6.245141 -139.730255"/> - <quad p0="224:3" p1="224:2" p2="-27.477285 4.911274 -134.311569" p3="-39.444260 4.911274 -128.088348"/> - <quad p0="225:3" p1="225:2" p2="-22.103657 3.323932 -124.096222" p3="-34.088158 3.323933 -117.906830"/> - <quad p0="226:3" p1="226:2" p2="-17.145607 1.644233 -114.315201" p3="-29.297956 1.644232 -108.462219"/> - <quad p0="227:3" p1="227:2" p2="-12.493389 0.034288 -104.162964" p3="-24.913702 0.034288 -98.902481"/> - <quad p0="228:3" p1="228:2" p2="-8.183470 -1.344866 -93.829651" p3="-20.727880 -1.342600 -88.265678"/> - <quad p0="229:3" p1="229:2" p2="-5.781762 -2.257134 -81.506401" p3="-16.522388 -2.322656 -75.431068"/> - <quad p0="230:3" p1="230:2" p2="-0.588243 -2.726140 -65.467789" p3="-11.881498 -2.921949 -62.707508"/> - <quad p0="231:3" p1="231:2" p2="6.739372 -3.644457 -43.400169" p3="-6.483512 -3.555052 -44.204449"/> + <quad p0="450.958557 17.018387 -256.656952" p1="445.044495 16.233582 -268.663147" p2="442.249725 16.282074 -274.389893" p3="453.347107 17.382790 -268.596558"/> + <quad p0="167:3" p1="167:2" p2="439.979309 15.350241 -281.393127" p3="450.717651 16.457893 -284.028412"/> + <quad p0="168:3" p1="168:2" p2="435.773590 15.473099 -294.434509" p3="446.068146 15.473099 -298.469177"/> + <quad p0="169:3" p1="169:2" p2="430.131348 14.514549 -306.558838" p3="439.889343 14.514551 -311.758545"/> + <quad p0="170:3" p1="170:2" p2="423.455750 13.668406 -317.571716" p3="432.617523 13.668408 -323.761963"/> + <quad p0="171:3" p1="171:2" p2="416.137756 13.020859 -327.280457" p3="424.639252 13.020859 -334.350311"/> + <quad p0="172:3" p1="172:2" p2="408.553955 12.658167 -335.493591" p3="416.285034 12.658166 -343.398407"/> + <quad p0="173:3" p1="173:2" p2="401.163269 12.666757 -341.936981" p3="408.213104 12.666755 -350.455017"/> + <quad p0="174:3" p1="174:2" p2="391.530365 12.986401 -349.599640" p3="398.571075 12.986401 -358.125183"/> + <quad p0="175:3" p1="175:2" p2="383.860352 13.266896 -356.223114" p3="391.232758 13.266894 -364.463531"/> + <quad p0="176:3" p1="176:2" p2="377.494690 13.523498 -362.158966" p3="385.136261 13.523499 -370.150330"/> + <quad p0="177:3" p1="177:2" p2="371.886108 13.771378 -367.676056" p3="379.660370 13.771378 -375.538452"/> + <quad p0="178:3" p1="178:2" p2="366.493927 14.025702 -373.037201" p3="374.210693 14.025701 -380.955963"/> + <quad p0="179:3" p1="179:2" p2="360.795990 14.301647 -378.480438" p3="368.267517 14.301647 -386.631073"/> + <quad p0="180:3" p1="180:2" p2="354.289825 14.614380 -384.220459" p3="361.389801 14.614378 -392.696716"/> + <quad p0="181:3" p1="181:2" p2="346.548492 14.979000 -390.416748" p3="353.436646 14.978998 -399.065979"/> + <quad p0="182:3" p1="182:2" p2="337.680481 15.274090 -397.448730" p3="344.656891 15.274088 -406.026917"/> + <quad p0="183:3" p1="183:2" p2="329.655731 15.349169 -404.155243" p3="336.751465 15.349171 -412.635040"/> + <quad p0="184:3" p1="184:2" p2="322.026733 15.307787 -410.547729" p3="329.012573 15.307785 -419.118225"/> + <quad p0="185:3" p1="185:2" p2="314.422058 15.253448 -416.568390" p3="321.033997 15.253450 -425.430573"/> + <quad p0="186:3" p1="186:2" p2="306.477661 15.289776 -422.140778" p3="312.438904 15.289780 -431.453094"/> + <quad p0="187:3" p1="187:2" p2="297.844910 15.520489 -427.170898" p3="302.912048 15.520489 -436.998474"/> + <quad p0="188:3" p1="188:2" p2="288.195251 16.049305 -431.559540" p3="292.215729 16.049307 -441.859619"/> + <quad p0="189:3" p1="189:2" p2="277.135986 16.979815 -435.239105" p3="279.852081 16.979815 -445.957275"/> + <quad p0="190:3" p1="190:2" p2="262.410370 18.601910 -438.080719" p3="263.691223 18.601908 -449.063232"/> + <quad p0="191:3" p1="191:2" p2="248.664307 20.358311 -438.541534" p3="248.350937 20.358311 -449.594086"/> + <quad p0="192:3" p1="192:2" p2="235.741959 22.147480 -437.331665" p3="234.294449 22.147480 -448.293488"/> + <quad p0="193:3" p1="193:2" p2="223.333099 23.868256 -435.204498" p3="221.370132 23.868256 -446.085785"/> + <quad p0="194:3" p1="194:2" p2="211.086182 25.419655 -432.885803" p3="209.259262 25.419655 -443.790802"/> + <quad p0="195:3" p1="195:2" p2="198.627548 26.700787 -431.059845" p3="197.550995 26.700787 -442.064270"/> + <quad p0="196:3" p1="196:2" p2="185.559311 27.610790 -430.378265" p3="185.737228 27.610790 -441.433746"/> + <quad p0="197:3" p1="197:2" p2="171.478027 28.048790 -431.484009" p3="173.288086 28.048794 -442.391785"/> + <quad p0="198:3" p1="198:2" p2="155.470032 27.837498 -435.374207" p3="158.833466 27.837494 -445.907166"/> + <quad p0="199:3" p1="199:2" p2="140.238968 26.949379 -441.471375" p3="144.791840 26.949375 -451.547424"/> + <quad p0="200:3" p1="200:2" p2="125.655136 25.563389 -448.860962" p3="130.823883 25.563389 -458.635437"/> + <quad p0="201:3" p1="201:2" p2="111.672295 23.858629 -456.583191" p3="116.920670 23.858629 -466.315063"/> + <quad p0="202:3" p1="202:2" p2="98.206680 22.014263 -463.660370" p3="102.923454 22.014263 -473.660736"/> + <quad p0="203:3" p1="203:2" p2="85.110970 20.209373 -469.088867" p3="88.421432 20.209375 -479.638580"/> + <quad p0="204:3" p1="204:2" p2="72.176758 18.622858 -471.762543" p3="72.769165 18.622858 -482.803589"/> + <quad p0="205:3" p1="205:2" p2="59.417881 17.434324 -470.385712" p3="56.212532 17.434324 -480.967834"/> + <quad p0="206:3" p1="206:2" p2="44.045620 16.187998 -463.370209" p3="38.294636 16.187998 -472.813782"/> + <quad p0="207:3" p1="207:2" p2="30.014683 14.946699 -452.542755" p3="22.475039 14.946697 -460.630402"/> + <quad p0="208:3" p1="208:2" p2="17.343109 13.728335 -438.530579" p3="8.631542 13.728337 -445.339722"/> + <quad p0="209:3" p1="209:2" p2="6.027645 12.551094 -421.892670" p3="-3.451431 12.551094 -427.585052"/> + <quad p0="210:3" p1="210:2" p2="-3.916012 11.433133 -403.156860" p3="-13.911240 11.433132 -407.884613"/> + <quad p0="211:3" p1="211:2" p2="-12.453022 10.392609 -382.841461" p3="-22.807671 10.392608 -386.719238"/> + <quad p0="212:3" p1="212:2" p2="-19.535778 9.447676 -361.463348" p3="-30.148949 9.447677 -364.564362"/> + <quad p0="213:3" p1="213:2" p2="-25.106934 8.616478 -339.547577" p3="-35.904182 8.616478 -341.929962"/> + <quad p0="214:3" p1="214:2" p2="-29.326019 7.930894 -317.100494" p3="-40.258278 7.930894 -318.756348"/> + <quad p0="215:3" p1="215:2" p2="-31.574005 7.505749 -296.821716" p3="-42.608887 7.505750 -297.519897"/> + <quad p0="216:3" p1="216:2" p2="-31.804031 7.288964 -277.847534" p3="-42.850945 7.288963 -277.376404"/> + <quad p0="217:3" p1="217:2" p2="-29.975540 7.228445 -259.363739" p3="-40.903900 7.228445 -257.682281"/> + <quad p0="218:3" p1="218:2" p2="-26.072800 7.272073 -240.565231" p3="-36.786392 7.272072 -237.831177"/> + <quad p0="219:3" p1="219:2" p2="-20.095650 7.367736 -220.619400" p3="-30.579819 7.367736 -217.106827"/> + <quad p0="220:3" p1="220:2" p2="-12.038036 7.463335 -198.657562" p3="-22.342567 7.463335 -194.648499"/> + <quad p0="221:3" p1="221:2" p2="-1.879978 7.506788 -173.791718" p3="-12.074272 7.506788 -169.510086"/> + <quad p0="222:3" p1="222:2" p2="3.957771 7.164290 -160.573288" p3="-6.086662 7.164292 -155.951004"/> + <quad p0="223:3" p1="223:2" p2="9.253845 6.245139 -149.593704" p3="-0.646423 6.245140 -144.670197"/> + <quad p0="224:3" p1="224:2" p2="14.072735 4.911273 -140.228302" p3="4.262955 4.911273 -135.126892"/> + <quad p0="225:3" p1="225:2" p2="18.477699 3.323931 -131.854401" p3="8.653553 3.323932 -126.780724"/> + <quad p0="226:3" p1="226:2" p2="22.541998 1.644233 -123.836525" p3="12.580261 1.644231 -119.038612"/> + <quad p0="227:3" p1="227:2" p2="26.355597 0.034287 -115.514359" p3="16.174200 0.034287 -111.202141"/> + <quad p0="228:3" p1="228:2" p2="29.888599 -1.344867 -107.043747" p3="19.605474 -1.342601 -102.482758"/> + <quad p0="229:3" p1="229:2" p2="31.857368 -2.257135 -96.941925" p3="23.052874 -2.322657 -91.961746"/> + <quad p0="230:3" p1="230:2" p2="36.114689 -2.726140 -83.794479" p3="26.857185 -2.921950 -81.531769"/> + <quad p0="231:3" p1="231:2" p2="42.121410 -3.644458 -65.704819" p3="31.282118 -3.555053 -66.364113"/> </quads> Modified: main/trunk/data/tracks/jungle/scene.xml =================================================================== --- main/trunk/data/tracks/jungle/scene.xml 2010-04-20 17:12:09 UTC (rev 5216) +++ main/trunk/data/tracks/jungle/scene.xml 2010-04-20 17:20:31 UTC (rev 5217) @@ -1,60 +1,99 @@ <?xml version="1.0"?> -<!-- Saved with script $Revision: 4996 $ --> +<!-- Generated with script from SVN rev 5037 --> <scene> - <track model="jungle_track.b3d" x="0" y="0" z="0"> + <track model="jungle.track_track.b3d" x="0" y="0" z="0"> <animated-texture name="water_light.png" dy="0.1" /> </track> - <banana x="180.499603" y="29.915121" z="-496.571777" /> - <banana x="244.81987" y="29.915121" z="-510.653717" /> - <banana x="350.261932" y="17.250443" z="-475.256317" /> - <banana x="359.58078" y="17.250443" z="-459.359436" /> - <banana x="380.959351" y="17.250443" z="-445.107056" /> - <banana x="390.278198" y="17.250443" z="-433.047363" /> - <banana x="402.886078" y="14.335944" z="-430.306519" /> - <banana x="413.266144" y="14.335944" z="-429.364868" /> - <banana x="409.569427" y="14.335944" z="-413.558197" /> - <banana x="419.894745" y="14.335944" z="-399.153717" /> - <banana x="431.246613" y="14.335944" z="-408.271088" /> - <banana x="436.798096" y="14.335944" z="-388.180054" /> - <banana x="451.303406" y="14.335944" z="-383.934265" /> - <banana x="467.200287" y="14.335944" z="-371.874573" /> - <banana x="473.230133" y="14.335944" z="-353.236847" /> - <banana x="421.611542" y="14.335944" z="-411.339905" /> - <item x="483.578949" y="15.934458" z="-289.896179" /> - <item x="484.213531" y="15.934458" z="-295.924774" /> - <item x="484.848114" y="15.934458" z="-301.636078" /> - <item x="445.3414" y="22.841276" z="-189.363663" /> - <item x="415.329407" y="21.175222" z="-158.184525" /> - <item x="294.345398" y="11.274306" z="-392.964203" /> - <item x="271.424377" y="11.4778" z="-313.567505" /> - <item x="296.194244" y="11.274306" z="-390.058868" /> - <item x="161.148621" y="4.483377" z="-329.483612" /> - <item x="129.316437" y="4.619789" z="-385.189911" /> - <item x="291.704163" y="11.274306" z="-396.926056" /> - <item x="267.726654" y="11.4778" z="-314.359863" /> - <item x="275.65033" y="11.4778" z="-312.228149" /> - <item x="221.38623" y="11.274308" z="-276.662659" /> - <item x="148.805496" y="11.274308" z="53.600136" /> - <item x="153.237595" y="11.274308" z="49.779362" /> - <small-nitro x="314.926056" y="21.175222" z="-23.466064" /> - <small-nitro x="324.821106" y="21.175222" z="-34.883453" /> - <small-nitro x="328.246338" y="21.175222" z="-50.106636" /> - <small-nitro x="331.671539" y="21.175222" z="-64.568665" /> - <small-nitro x="341.56662" y="21.175222" z="-75.224892" /> - <small-nitro x="353.364594" y="21.175222" z="-85.500542" /> - <small-nitro x="355.648071" y="21.175222" z="-99.201408" /> - <small-nitro x="-22.110565" y="21.175219" z="-390.792297" /> - <small-nitro x="11.446986" y="21.175224" z="-413.164032" /> - <small-nitro x="33.268562" y="21.175222" z="-436.635986" /> - <small-nitro x="72.81411" y="21.175222" z="-426.749603" /> - <small-nitro x="99.051056" y="21.175222" z="-425.989105" /> - <zipper.ac x="-30.954056" y="9.543608" z="-341.325562" /> - <zipper.ac x="-34.350761" y="9.543608" z="-341.325562" /> - <zipper.ac x="-38.065907" y="9.543608" z="-341.219421" /> - <zipper.ac x="-27.345057" y="9.543608" z="-341.325562" /> + <banana x="352.928955" y="29.915121" z="-335.848022" /> + <banana x="237.284912" y="29.915121" z="-448.730072" /> + <banana x="351.031006" y="29.915121" z="-334.812744" /> + <banana x="348.097809" y="29.915121" z="-332.742249" /> + <banana x="349.995758" y="29.915121" z="-333.777527" /> + <banana x="344.301941" y="29.915121" z="-329.118958" /> + <banana x="342.403992" y="29.915121" z="-328.083679" /> + <banana x="345.337158" y="29.915121" z="-330.154175" /> + <banana x="372.336304" y="14.335945" z="-369.137238" /> + <banana x="347.235107" y="29.915121" z="-331.189423" /> + <banana x="390.105896" y="14.335945" z="-364.803192" /> + <banana x="394.656677" y="14.335945" z="-348.333801" /> + <banana x="414.816345" y="14.335945" z="-344.491821" /> + <banana x="423.330841" y="14.335945" z="-319.689575" /> + <item x="433.0047" y="15.934456" z="-267.766846" /> + <item x="433.524872" y="15.934456" z="-272.70871" /> + <item x="434.045044" y="15.934456" z="-277.390472" /> + <item x="401.659912" y="22.841276" z="-185.356567" /> + <item x="377.057983" y="21.175222" z="-159.797852" /> + <item x="277.882843" y="11.274307" z="-352.255554" /> + <item x="259.093628" y="11.477798" z="-287.171112" /> + <item x="279.398407" y="11.274307" z="-349.873962" /> + <item x="168.696457" y="4.483376" z="-300.21814" /> + <item x="142.602417" y="4.619789" z="-345.88269" /> + <item x="275.717712" y="11.274307" z="-355.503235" /> + <item x="256.062469" y="11.477798" z="-287.820648" /> + <item x="262.5578" y="11.477798" z="-286.073181" /> + <item x="218.075485" y="11.274307" z="-256.918823" /> + <item x="158.578339" y="11.274307" z="13.809967" /> + <item x="162.211487" y="11.274307" z="10.677933" /> + <item x="233.11647" y="11.274307" z="90.158752" /> + <item x="233.11647" y="11.274307" z="88.003235" /> + <item x="253.573837" y="11.274307" z="75.064667" h="-28.045729" /> + <item x="254.587311" y="11.274307" z="76.967072" h="-28.045729" /> + <item x="279.007629" y="11.274307" z="69.623688" h="-40.976942" /> + <item x="277.594147" y="11.274307" z="67.996323" h="-40.976942" /> + <item x="414.312195" y="15.934456" z="-343.973907" /> + <item x="424.085938" y="15.934456" z="-319.860352" /> + <item x="131.90596" y="1161.090942" z="-456.353302" h="50.550665" /> + <item x="373.108215" y="15.934456" z="-369.49884" /> + <item x="129.897812" y="1161.090942" z="-449.934296" h="50.550665" /> + <item x="130.773865" y="1161.090942" z="-452.617859" h="50.550665" /> + <item x="-9.101685" y="11.274307" z="-414.089172" h="-32.60009" /> + <item x="-2.967987" y="11.274307" z="-411.329834" h="-32.60009" /> + <item x="-5.527908" y="11.274307" z="-412.519684" h="-32.60009" /> + <item x="13.599341" y="15.934456" z="-114.781448" h="-100.990277" /> + <item x="35.366272" y="15.934456" z="-81.935165" h="-100.990277" /> + <big-nitro x="47.869904" y="21.175222" z="-461.04248" h="-46.198632" /> + <big-nitro x="-1.667099" y="21.175222" z="-438.763916" h="-46.198632" /> + <big-nitro x="-0.309802" y="21.175222" z="-185.164398" h="-46.198632" /> + <big-nitro x="19.453474" y="21.175222" z="-185.277924" h="-46.198632" /> + <small-nitro x="294.753601" y="21.175222" z="-49.364082" /> + <small-nitro x="302.864929" y="21.175222" z="-58.723343" /> + <small-nitro x="305.672729" y="21.175222" z="-71.202362" /> + <small-nitro x="308.480469" y="21.175222" z="-83.057426" /> + <small-nitro x="316.591858" y="21.175222" z="-91.792732" /> + <small-nitro x="326.263092" y="21.175222" z="-100.216072" /> + <small-nitro x="328.134949" y="21.175222" z="-111.447189" /> + <small-nitro x="18.472031" y="21.175219" z="-350.475159" /> + <small-nitro x="45.980408" y="21.175224" z="-368.814117" /> + <small-nitro x="63.868362" y="21.175222" z="-388.054962" /> + <small-nitro x="96.285347" y="21.175222" z="-379.950714" /> + <small-nitro x="117.792747" y="21.175222" z="-379.327332" /> + <small-nitro x="429.904449" y="21.175222" z="-206.432053" /> + <small-nitro x="433.948883" y="21.175222" z="-204.083679" /> + <small-nitro x="435.793701" y="21.175222" z="-208.941238" /> + <small-nitro x="433.427002" y="21.175222" z="-307.589783" /> + <small-nitro x="437.477966" y="21.175222" z="-308.940125" /> + <small-nitro x="-38.836182" y="21.175222" z="-249.244446" h="-46.198632" /> + <small-nitro x="309.937073" y="21.175222" z="-421.183594" h="-28.773224" /> + <small-nitro x="-23.70845" y="21.175222" z="-228.157318" h="-46.198632" /> + <small-nitro x="300.426208" y="21.175222" z="-438.475128" h="-30.45886" /> + <small-nitro x="-23.70845" y="21.175222" z="-198.450836" h="-46.198632" /> + <small-nitro x="166.317261" y="21.175222" z="-298.140472" /> + <small-nitro x="275.636932" y="21.175222" z="-435.819489" h="-46.198632" /> + <item x="44.442814" y="15.934456" z="-118.193748" h="-100.990277" /> + <small-nitro x="219.203613" y="21.175222" z="-251.968109" /> + <zipper.ac x="11.222687" y="9.54361" z="-309.925415" /> + <zipper.ac x="8.438278" y="9.54361" z="-309.925415" /> + <zipper.ac x="5.392838" y="9.54361" z="-309.83844" /> + <zipper.ac x="14.181105" y="9.54361" z="-309.925415" /> + <zipper.ac x="-26.50824" y="9.54361" z="-340.859558" h="7.278052" /> + <zipper.ac x="-35.23674" y="9.54361" z="-341.886597" h="7.278052" /> + <zipper.ac x="-39.396393" y="9.54361" z="-279.630127" /> + <zipper.ac x="-36.611984" y="9.54361" z="-279.630127" /> <checks> - <check-line kind="lap" p1="10.196639 3.928761" p2="-9.843615 3.899887" min-height="-3.580266"/> - <check-line kind="activate" other-id="0" p1="392.678406 -129.515015" p2="375.688049 -145.059036" + <check-line kind="lap" p1="31.069660 -26.931189" p2="42.126385 -26.907518" min-height="-3.580266"/> + <check-line kind="lap" p1="48.026516 -26.895636" p2="28.372366 -26.935194" + min-height="-3.588943"/> + <check-line kind="activate" other-id="1" p1="358.490112 -136.296371" p2="344.562469 -149.038391" min-height="15.896591"/> </checks> Modified: main/trunk/data/tracks/jungle/track.xml =================================================================== --- main/trunk/data/tracks/jungle/track.xml 2010-04-20 17:12:09 UTC (rev 5216) +++ main/trunk/data/tracks/jungle/track.xml 2010-04-20 17:20:31 UTC (rev 5217) @@ -1,9 +1,9 @@ -<!-- Saved with script $Revision: 4996 $ --> +<!-- Generated with script from SVN rev 5037 --> <?xml version="1.0"?> <... [truncated message content] |
From: <hik...@us...> - 2010-04-20 23:50:44
|
Revision: 5223 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5223&view=rev Author: hikerstk Date: 2010-04-20 23:50:38 +0000 (Tue, 20 Apr 2010) Log Message: ----------- Added (for testing) new explosion handling, which uses a fixed random animation to toss karts around after an explosion. Modified Paths: -------------- main/trunk/data/stk_config.xml main/trunk/src/Makefile.am main/trunk/src/ide/vc9/supertuxkart.vcproj main/trunk/src/input/input_manager.cpp main/trunk/src/karts/kart.cpp main/trunk/src/karts/kart.hpp main/trunk/src/karts/kart_properties.cpp main/trunk/src/karts/kart_properties.hpp main/trunk/src/karts/moveable.cpp Added Paths: ----------- main/trunk/src/karts/explosion_animation.cpp main/trunk/src/karts/explosion_animation.hpp Modified: main/trunk/data/stk_config.xml =================================================================== --- main/trunk/data/stk_config.xml 2010-04-20 23:48:29 UTC (rev 5222) +++ main/trunk/data/stk_config.xml 2010-04-20 23:50:38 UTC (rev 5223) @@ -222,6 +222,11 @@ the force a plunger/rubber band applies to the kart(s). duration is the duration a rubber band acts. --> <rubber-band max-length="50" force="1500" duration="1"/> + + <!-- Kart-specific explosion parameters. Height: how high this + this kart is being pushed in the sky by an explosion. + Time: how long it takes before the kart can drive again. --> + <explosion time="2" height="2" /> </general-kart-defaults> </config> Modified: main/trunk/src/Makefile.am =================================================================== --- main/trunk/src/Makefile.am 2010-04-20 23:48:29 UTC (rev 5222) +++ main/trunk/src/Makefile.am 2010-04-20 23:50:38 UTC (rev 5223) @@ -158,6 +158,8 @@ karts/controller/default_ai_controller.hpp \ karts/controller/end_controller.cpp \ karts/controller/end_controller.hpp \ + karts/explosion_animation.cpp \ + karts/explosion_animation.hpp \ karts/controller/kart_control.hpp \ karts/controller/new_ai_controller.cpp \ karts/controller/new_ai_controller.hpp \ Modified: main/trunk/src/ide/vc9/supertuxkart.vcproj =================================================================== --- main/trunk/src/ide/vc9/supertuxkart.vcproj 2010-04-20 23:48:29 UTC (rev 5222) +++ main/trunk/src/ide/vc9/supertuxkart.vcproj 2010-04-20 23:50:38 UTC (rev 5223) @@ -465,6 +465,10 @@ Name="karts" > <File + RelativePath="..\..\karts\explosion_animation.cpp" + > + </File> + <File RelativePath="..\..\karts\kart.cpp" > </File> @@ -1287,6 +1291,10 @@ Name="karts" > <File + RelativePath="..\..\karts\explosion_animation.hpp" + > + </File> + <File RelativePath="..\..\karts\kart.hpp" > </File> Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2010-04-20 23:48:29 UTC (rev 5222) +++ main/trunk/src/input/input_manager.cpp 2010-04-20 23:50:38 UTC (rev 5223) @@ -105,6 +105,7 @@ { Kart* kart = world->getLocalPlayerKart(0); kart->setPowerup(POWERUP_BUBBLEGUM, 10000); + kart->handleExplosion(kart->getXYZ(), true); } break; case KEY_F2: Added: main/trunk/src/karts/explosion_animation.cpp =================================================================== --- main/trunk/src/karts/explosion_animation.cpp (rev 0) +++ main/trunk/src/karts/explosion_animation.cpp 2010-04-20 23:50:38 UTC (rev 5223) @@ -0,0 +1,101 @@ +// $Id$ +// +// SuperTuxKart - a fun racing game with go-kart +// Copyright (C) 2010 Joerg Henrichs +// +// 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. + +#include "karts/explosion_animation.hpp" + +#include "karts/kart.hpp" +#include "modes/world.hpp" +#include "tracks/track.hpp" +#include "utils/constants.hpp" + +Vec3 m_add_rotation; +Vec3 m_curr_rotation; + +/** The constructor stores a pointer to the kart this object is animating, + * and initialised the timer. + * \param kart Pointer to the kart which is animated. + */ +ExplosionAnimation::ExplosionAnimation(Kart *kart) +{ + m_timer = -1; + m_kart = kart; +}; // ExplosionAnimation + +// ---------------------------------------------------------------------------- +/** Starts an explosion animation. + * \param pos The coordinates of the explosion. + * \param direct_hig True if the kart was hit directly --> maximal impact. + */ +void ExplosionAnimation::handleExplosion(const Vec3 &pos, bool direct_hit) +{ + // Avoid doing another explosion while a kart is thrown around in the air. + if(m_timer>=0) return; + + m_timer = 0; + m_xyz = m_kart->getXYZ(); + + float t = m_kart->getKartProperties()->getExplosionTime(); + + // Half of the overall time is spent in raising, so only use + // half of the explosion time here. + // Velocity after t seconds is: + // v(t) = m_up_velocity + t*gravity + // Since v(explosion_time*0.5) = 0, the following forumla computes + // the right initial velocity for a kart to land back after + // the specified time. + m_up_velocity = 0.5f * t * World::getWorld()->getTrack()->getGravity(); + World::getWorld()->getPhysics()->removeKart(m_kart); + + m_curr_rotation.setHPR(m_kart->getRotation()); + const int max_rotation = direct_hit ? 2 : 1; + // To get rotations in botb directions for each axis we determine a random + // number between -(max_rotation-1) and +(max_rotation-1) + float f=2.0f*M_PI/t; + m_add_rotation.setHeading( (rand()%(2*max_rotation+1)-max_rotation)*f ); + m_add_rotation.setPitch( (rand()%(2*max_rotation+1)-max_rotation)*f ); + m_add_rotation.setRoll( (rand()%(2*max_rotation+1)-max_rotation)*f ); + +} // handleExplosion + +// ---------------------------------------------------------------------------- +/** Updates the explosion animation. + * \param dt Time step size. + * \return True if the explosion is still shown, false if it has finished. + */ +bool ExplosionAnimation::update(float dt) +{ + assert(m_timer>=0); + m_timer += dt; + if(m_timer>m_kart->getKartProperties()->getExplosionTime()) + { + m_timer=-1; + World::getWorld()->getPhysics()->addKart(m_kart); + m_kart->getBody()->setLinearVelocity(btVector3(0,0,0)); + m_kart->getBody()->setAngularVelocity(btVector3(0,0,0)); + return false; + } + m_up_velocity -= dt*World::getWorld()->getTrack()->getGravity(); + m_xyz.setY(m_xyz.getY()+m_up_velocity*dt); + m_kart->setXYZ(m_xyz); + m_curr_rotation += dt*m_add_rotation; + btQuaternion q(m_curr_rotation.getHeading(), m_curr_rotation.getPitch(), + m_curr_rotation.getRoll()); + m_kart->setRotation(q); + return true; +} // update \ No newline at end of file Added: main/trunk/src/karts/explosion_animation.hpp =================================================================== --- main/trunk/src/karts/explosion_animation.hpp (rev 0) +++ main/trunk/src/karts/explosion_animation.hpp 2010-04-20 23:50:38 UTC (rev 5223) @@ -0,0 +1,66 @@ +// $Id$ +// +// SuperTuxKart - a fun racing game with go-kart +// Copyright (C) 2010 Joerg Henrichs +// +// 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_EXPLOSION_ANIMATION_HPP +#define HEADER_EXPLOSION_ANIMATION_HPP + +#include "utils/vec3.hpp" + +class Kart; + +/** This class is a 'mixin' for kart, and handles the animated explosion. + * I.e. it will throw the kart a certain amount in the air, rotate it + * randomly, and after the specified time period let it land at the + * same spot where it was hit, therefore avoiding any problems of + * karts being pushed on wrong parts of the track, and making explosion + * more 'fair' (it can't happen that one explosion give you actually + * a benefit by pushing you forwards. + * The object is a base class for kart, but will only be used if an + * explosion happens. + */ +class ExplosionAnimation +{ +private: + /** The coordinates where the kart was hit originally. */ + Vec3 m_xyz; + + /** The rotation of the kart at the time of the explosion. */ + Vec3 m_hpr; + + /** The upwards velocity. */ + float m_up_velocity; + + /** Timer for the explosion. */ + float m_timer; + + /** Duration for this explosion. This can potentially be set + * with different values for different karts, or depending + * on difficulty (so that on easy you can drive again earlier. */ + float m_duration; + + /** A pointer to the class to which this object belongs. */ + Kart *m_kart; + +public: + ExplosionAnimation(Kart *kart); + ~ExplosionAnimation() {}; + void handleExplosion(const Vec3& pos, bool direct_hit); + bool update(float dt); +}; // ExplosionAnimation +#endif Modified: main/trunk/src/karts/kart.cpp =================================================================== --- main/trunk/src/karts/kart.cpp 2010-04-20 23:48:29 UTC (rev 5222) +++ main/trunk/src/karts/kart.cpp 2010-04-20 23:50:38 UTC (rev 5223) @@ -64,7 +64,7 @@ Kart::Kart (const std::string& ident, int position, const btTransform& init_transform) : TerrainInfo(1), - Moveable(), m_powerup(this) + Moveable(), ExplosionAnimation(this), m_powerup(this) #if defined(WIN32) && !defined(__CYGWIN__) # pragma warning(1:4355) @@ -600,12 +600,15 @@ } // getActualWheelForce //----------------------------------------------------------------------------- -/** The kart is on ground if all 4 wheels touch the ground. +/** The kart is on ground if all 4 wheels touch the ground, and if no special + * animation (rescue or explosion) is happening). */ bool Kart::isOnGround() const { - return (m_vehicle->getNumWheelsOnGround() == m_vehicle->getNumWheels()); + return (m_vehicle->getNumWheelsOnGround() == m_vehicle->getNumWheels() + && m_kart_mode!=KM_RESCUE && m_kart_mode!=KM_EXPLOSION); } // isOnGround + //----------------------------------------------------------------------------- /** The kart is near the ground, but not necesarily on it (small jumps). This * is used to determine when to switch off the upright constraint, so that @@ -618,6 +621,7 @@ else return ((getXYZ().getZ() - getHoT()) < stk_config->m_near_ground); } // isNearGround + //----------------------------------------------------------------------------- /** Called when an explosion happens. * \param pos Position of the explosion. @@ -629,8 +633,13 @@ int sign_bits = rand(); // To select plus or minus randomnly, assuming 15 bit at least if(direct_hit) { + printf("he: "); + ExplosionAnimation::handleExplosion(pos, direct_hit); + m_kart_mode = KM_EXPLOSION; // Play associated kart sound playCustomSFX(SFXManager::CUSTOM_EXPLODE); + return; + float sign_a = (sign_bits & (0x1 << 8)) ? 1.0f : -1.0f; float sign_b = (sign_bits & (0x1 << 9)) ? 1.0f : -1.0f; float sign_c = (sign_bits & (0x1 << 10)) ? 1.0f : -1.0f; @@ -755,6 +764,12 @@ 0)); setRotation(getRotation()*q_roll*q_pitch); } // if rescue mode + else if ( m_kart_mode==KM_EXPLOSION) + { + if(!ExplosionAnimation::update(dt)) + m_kart_mode = KM_RACE; + } + m_attachment->update(dt); //smoke drawing control point @@ -764,6 +779,9 @@ m_water_splash_system->update(dt); m_nitro->update(dt); m_slip_stream->update(dt); + // update star effect (call will do nothing if stars are not activated) + m_stars_effect->update(dt); + } // UserConfigParams::m_graphical_effects updatePhysics(dt); @@ -1319,8 +1337,6 @@ ); #endif - // update star effect (call will do nothing if stars are not activated) - m_stars_effect->update(dt); } // updatePhysics //----------------------------------------------------------------------------- Modified: main/trunk/src/karts/kart.hpp =================================================================== --- main/trunk/src/karts/kart.hpp 2010-04-20 23:48:29 UTC (rev 5222) +++ main/trunk/src/karts/kart.hpp 2010-04-20 23:50:38 UTC (rev 5223) @@ -26,6 +26,7 @@ #include "graphics/camera.hpp" #include "items/attachment.hpp" #include "items/powerup.hpp" +#include "karts/explosion_animation.hpp" #include "karts/moveable.hpp" #include "karts/kart_properties.hpp" #include "karts/controller/controller.hpp" @@ -55,7 +56,7 @@ * is an object that is moved on the track, and has position and rotations) * and TerrainInfo, which manages the terrain the kart is on. */ -class Kart : public TerrainInfo, public Moveable +class Kart : public TerrainInfo, public Moveable, public ExplosionAnimation { private: /** Reset position. */ Modified: main/trunk/src/karts/kart_properties.cpp =================================================================== --- main/trunk/src/karts/kart_properties.cpp 2010-04-20 23:48:29 UTC (rev 5222) +++ main/trunk/src/karts/kart_properties.cpp 2010-04-20 23:50:38 UTC (rev 5223) @@ -72,7 +72,8 @@ m_slipstream_length = m_slipstream_collect_time = m_slipstream_use_time = m_slipstream_add_power = m_slipstream_min_speed = m_camera_distance = - m_rescue_time = m_rescue_height = UNDEFINED; + m_rescue_time = m_rescue_height = m_explosion_time = + m_explosion_height = UNDEFINED; m_gravity_center_shift = Vec3(UNDEFINED); m_has_skidmarks = true; m_version = 0; @@ -214,6 +215,12 @@ rescue_node->get("height", &m_rescue_height ); } + if(const XMLNode *explosion_node = root->getNode("explosion")) + { + explosion_node->get("time", &m_explosion_time ); + explosion_node->get("height", &m_explosion_height); + } + if(const XMLNode *skid_node = root->getNode("skid")) { skid_node->get("increase", &m_skid_increase ); @@ -469,6 +476,8 @@ CHECK_NEG(m_rescue_height, "rescue height" ); CHECK_NEG(m_rescue_time, "rescue time" ); CHECK_NEG(m_rescue_vert_offset, "rescue vert-offset" ); + CHECK_NEG(m_explosion_time, "explosion time" ); + CHECK_NEG(m_explosion_height, "explosion height" ); } // checkAllSet Modified: main/trunk/src/karts/kart_properties.hpp =================================================================== --- main/trunk/src/karts/kart_properties.hpp 2010-04-20 23:48:29 UTC (rev 5222) +++ main/trunk/src/karts/kart_properties.hpp 2010-04-20 23:50:38 UTC (rev 5223) @@ -112,6 +112,12 @@ /** Distance the kart is raised before dropped. */ float m_rescue_height; + /** Time an animated explosion is shown. Longer = more delay for kart. */ + float m_explosion_time; + + /** Height of an explosion animation. */ + float m_explosion_height; + /** Vertical offset after rescue. */ float m_rescue_vert_offset; @@ -247,8 +253,16 @@ float getRescueTime () const {return m_rescue_time; } /** Returns the height a kart is moved to during a rescue. */ float getRescueHeight () const {return m_rescue_height; } + /** Returns the time an explosion animation is shown. */ + float getExplosionTime () const {return m_explosion_time; } + /** Returns the height of the explosion animation. */ + float getExplosionHeight () const {return m_explosion_height; } + /** Returns how much a kart can roll/pitch before the upright constraint + * counteracts. */ float getUprightTolerance () const {return m_upright_tolerance; } + /** Returns the maximum value of the upright counteracting force. */ float getUprightMaxForce () const {return m_upright_max_force; } + /** Returns artificial acceleration to keep wheels on track. */ float getTrackConnectionAccel () const {return m_track_connection_accel; } /** Returns the maximum length of a rubber band before it breaks. */ float getRubberBandMaxLength () const {return m_rubber_band_max_length; } Modified: main/trunk/src/karts/moveable.cpp =================================================================== --- main/trunk/src/karts/moveable.cpp 2010-04-20 23:48:29 UTC (rev 5222) +++ main/trunk/src/karts/moveable.cpp 2010-04-20 23:50:38 UTC (rev 5223) @@ -94,6 +94,10 @@ } // reset //----------------------------------------------------------------------------- +/** Updates the current position and rotation from the corresponding physics + * body, and then calls updateGraphics to position the model correctly. + * \param float dt Time step size. + */ void Moveable::update(float dt) { m_motion_state->getWorldTransform(m_transform); @@ -113,6 +117,11 @@ } // update //----------------------------------------------------------------------------- +/** Creates the bullet rigid body for this moveable. + * \param mass Mass of this object. + * \param trans Transform (=position and orientation) for this object). + * \param shape Bullet collision shape for this object. + */ void Moveable::createBody(float mass, btTransform& trans, btCollisionShape *shape) { btVector3 inertia; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-04-22 13:18:17
|
Revision: 5237 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5237&view=rev Author: hikerstk Date: 2010-04-22 13:18:11 +0000 (Thu, 22 Apr 2010) Log Message: ----------- Textures for models are now taken from the models directory, not from the shared texture directory anymore (some work might still have to be done). Modified Paths: -------------- main/trunk/data/textures/materials.xml main/trunk/src/items/item_manager.cpp Added Paths: ----------- main/trunk/data/models/materials.xml Removed Paths: ------------- main/trunk/data/textures/banana.png main/trunk/data/textures/bonusblock1.png main/trunk/data/textures/bowling.png main/trunk/data/textures/bubblegum.png main/trunk/data/textures/cake.png main/trunk/data/textures/gift-box.png main/trunk/data/textures/gift-loop.png main/trunk/data/textures/gold.png main/trunk/data/textures/nitro-tank.png main/trunk/data/textures/plunger.png main/trunk/data/textures/tank-blue.png main/trunk/data/textures/tank-cyan.png main/trunk/data/textures/tank-green.png main/trunk/data/textures/tnt-bomb.png main/trunk/data/textures/warning.png main/trunk/data/textures/zipper.png Added: main/trunk/data/models/materials.xml =================================================================== --- main/trunk/data/models/materials.xml (rev 0) +++ main/trunk/data/models/materials.xml 2010-04-22 13:18:11 UTC (rev 5237) @@ -0,0 +1,14 @@ +<?xml version="1.0"?> +<materials> + <material name="banana.png" alpha="0.5" collide="N"/> + <material name="gift-box.png" sphere="N" collide="N"/> + <material name="gift-loop.png" sphere="Y" collide="N"/> + <material name="gold.png" light="Y" sphere="Y" collide="N"/> + <material name="nitro-tank.png" clampV="Y" transparency="Y" alpha="0.5" collide="N"/> + <material name="tank-blue.png" sphere="Y" collide="N"/> + <material name="tank-green.png" sphere="Y" collide="N"/> + <material name="tank-cyan.png" sphere="Y" collide="N"/> + <material name="parachute.png" backface-culling="n" ignore="Y" collide="N"/> + <material name="zipper.png" light="N" zipper="Y" collide="N"/> +</materials> + Deleted: main/trunk/data/textures/banana.png =================================================================== (Binary files differ) Deleted: main/trunk/data/textures/bonusblock1.png =================================================================== (Binary files differ) Deleted: main/trunk/data/textures/bowling.png =================================================================== (Binary files differ) Deleted: main/trunk/data/textures/bubblegum.png =================================================================== (Binary files differ) Deleted: main/trunk/data/textures/cake.png =================================================================== (Binary files differ) Deleted: main/trunk/data/textures/gift-box.png =================================================================== (Binary files differ) Deleted: main/trunk/data/textures/gift-loop.png =================================================================== (Binary files differ) Deleted: main/trunk/data/textures/gold.png =================================================================== (Binary files differ) Modified: main/trunk/data/textures/materials.xml =================================================================== --- main/trunk/data/textures/materials.xml 2010-04-22 00:42:56 UTC (rev 5236) +++ main/trunk/data/textures/materials.xml 2010-04-22 13:18:11 UTC (rev 5237) @@ -6,7 +6,6 @@ <material name="grass.jpg" collide="N" maxSpeed="0.6" slowdownTime="4" anisotropic="Y"/> <material name="chrome.png" light="N" sphere="Y" collide="N"/> <material name="chrome2.png" light="N" sphere="Y" collide="N"/> - <material name="gold.png" light="Y" sphere="Y" collide="N"/> <material name="railing.png" clampV="Y" transparency="Y" alpha="0.5" collide="N"/> <material name="wood.jpg" collide="N" anisotropic="Y"/> <material name="concrete.png" /> @@ -30,8 +29,6 @@ <material name="tinytux.png" clampU="Y" clampV="Y" transparency="Y" alpha="0.8" light="N" ignore="Y" collide="N"/> <material name="butterfly.png" clampU="Y" clampV="Y" transparency="Y" alpha="0.8" light="N" ignore="Y" collide="N"/> <material name="zipper_collect.png" light="N" zipper="Y" collide="N"/> - <material name="zipper.png" light="N" zipper="Y" collide="N"/> - <material name="banana.png" alpha="0.5" collide="N"/> <material name="bananawrap.png" clampU="Y" clampV="Y" transparency="Y" alpha="0.5" light="N" zipper="Y" collide="N"/> <material name="fuzzy.png" clampU="Y" clampV="Y" transparency="Y" alpha="0.2" light="N" ignore="Y" collide="N"/> <material name="generickartshadow.png" clampU="Y" clampV="Y" transparency="Y" light="N" ignore="Y" collide="N"/> @@ -43,7 +40,6 @@ <material name="magnet.png" clampU="Y" clampV="Y" transparency="Y" light="N" ignore="Y" collide="N"/> <material name="bzzt.png" transparency="Y" light="N" ignore="Y" collide="N"/> <material name="anchor-icon.png" clampU="Y" clampV="Y" transparency="Y" light="N" ignore="Y" collide="N"/> - <material name="parachute.png" backface-culling="n" ignore="Y" collide="N"/> <material name="parachute-icon.png" clampU="Y" clampV="Y" transparency="N" light="Y" ignore="Y" collide="N"/> <material name="speedback.png" clampU="Y" clampV="Y" transparency="Y" light="N" ignore="Y" collide="N"/> <material name="speedfore.png" clampU="Y" clampV="Y" transparency="Y" light="N" ignore="Y" collide="N"/> @@ -67,17 +63,10 @@ <material name="dirt.png" collide="N"/> <material name="city_asphalt_1.png" collide="N" anisotropic="Y"/> <material name="city_checker.png" collide="N"/> - <material name="nitro-tank.png" clampV="Y" transparency="Y" alpha="0.5" collide="N"/> - <material name="tank-blue.png" sphere="Y" collide="N"/> - <material name="tank-green.png" sphere="Y" collide="N"/> - <material name="tank-cyan.png" sphere="Y" collide="N"/> - <material name="gift-box.png" sphere="N" collide="N"/> - <material name="gift-loop.png" sphere="Y" collide="N"/> <material name="bowling-icon.png" transparency="Y" light="N" collide="N"/> <material name="bubblegum-icon.png" transparency="Y" light="N" collide="N"/> <material name="cake-icon.png" transparency="Y" light="N" collide="N"/> <material name="plunger-icon.png" transparency="Y" light="N" collide="N"/> - <material name="plungerface.png" transparency="Y" light="N" collide="N"/> <material name="menu_background.png" clampU="Y" clampV="Y" alpha="1.0" light="N"/> <material name="menu_background2.png" clampU="Y" clampV="Y" alpha="1.0" light="N"/> <material name="water-splash.png" alpha="Y" light="N" ignore="Y" collide="N"/> Deleted: main/trunk/data/textures/nitro-tank.png =================================================================== (Binary files differ) Deleted: main/trunk/data/textures/plunger.png =================================================================== (Binary files differ) Deleted: main/trunk/data/textures/tank-blue.png =================================================================== (Binary files differ) Deleted: main/trunk/data/textures/tank-cyan.png =================================================================== (Binary files differ) Deleted: main/trunk/data/textures/tank-green.png =================================================================== (Binary files differ) Deleted: main/trunk/data/textures/tnt-bomb.png =================================================================== (Binary files differ) Deleted: main/trunk/data/textures/warning.png =================================================================== (Binary files differ) Deleted: main/trunk/data/textures/zipper.png =================================================================== (Binary files differ) Modified: main/trunk/src/items/item_manager.cpp =================================================================== --- main/trunk/src/items/item_manager.cpp 2010-04-22 00:42:56 UTC (rev 5236) +++ main/trunk/src/items/item_manager.cpp 2010-04-22 13:18:11 UTC (rev 5237) @@ -94,6 +94,11 @@ //----------------------------------------------------------------------------- void ItemManager::loadDefaultItems() { + file_manager->pushTextureSearchPath(file_manager->getModelFile("")); + const std::string materials_file = file_manager->getModelFile("materials.xml"); + if(materials_file!="") + material_manager->pushTempMaterial(materials_file); + // The names must be given in the order of the definition of ItemType // in item.hpp. Note that bubblegum strictly isn't an item, // it is implemented as one, and so loaded here, too. @@ -125,6 +130,9 @@ m_item_mesh[i] = mesh; mesh->grab(); } // for i + if(materials_file!="") + material_manager->popTempMaterial(); + file_manager->popTextureSearchPath(); } // loadDefaultItems //----------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-04-23 12:54:21
|
Revision: 5247 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5247&view=rev Author: hikerstk Date: 2010-04-23 12:54:15 +0000 (Fri, 23 Apr 2010) Log Message: ----------- PowerupManager now loads its texture from models subdirectory, too (including materials.xml file). Moved icons for those models to model directory, too. Modified Paths: -------------- main/trunk/data/models/materials.xml main/trunk/data/textures/materials.xml main/trunk/src/items/item_manager.cpp main/trunk/src/main.cpp Added Paths: ----------- main/trunk/data/models/anchor-icon.png main/trunk/data/models/bowling-icon.png main/trunk/data/models/bubblegum-icon.png main/trunk/data/models/cake-icon.png main/trunk/data/models/parachute-icon.png main/trunk/data/models/plunger-icon.png main/trunk/data/models/swap-icon.png main/trunk/data/models/zipper_collect.png Removed Paths: ------------- main/trunk/data/textures/anchor-icon.png main/trunk/data/textures/anchor.png main/trunk/data/textures/bowling-icon.png main/trunk/data/textures/bubblegum-icon.png main/trunk/data/textures/cake-icon.png main/trunk/data/textures/parachute-icon.png main/trunk/data/textures/plunger-icon.png main/trunk/data/textures/swap-icon.png main/trunk/data/textures/zipper_collect.png Copied: main/trunk/data/models/anchor-icon.png (from rev 5246, main/trunk/data/textures/anchor-icon.png) =================================================================== (Binary files differ) Copied: main/trunk/data/models/bowling-icon.png (from rev 5246, main/trunk/data/textures/bowling-icon.png) =================================================================== (Binary files differ) Copied: main/trunk/data/models/bubblegum-icon.png (from rev 5246, main/trunk/data/textures/bubblegum-icon.png) =================================================================== (Binary files differ) Copied: main/trunk/data/models/cake-icon.png (from rev 5246, main/trunk/data/textures/cake-icon.png) =================================================================== (Binary files differ) Modified: main/trunk/data/models/materials.xml =================================================================== --- main/trunk/data/models/materials.xml 2010-04-23 02:19:22 UTC (rev 5246) +++ main/trunk/data/models/materials.xml 2010-04-23 12:54:15 UTC (rev 5247) @@ -1,14 +1,21 @@ <?xml version="1.0"?> <materials> - <material name="banana.png" alpha="0.5" collide="N"/> - <material name="gift-box.png" sphere="N" collide="N"/> - <material name="gift-loop.png" sphere="Y" collide="N"/> - <material name="gold.png" light="Y" sphere="Y" collide="N"/> - <material name="nitro-tank.png" clampV="Y" transparency="Y" alpha="0.5" collide="N"/> - <material name="tank-blue.png" sphere="Y" collide="N"/> - <material name="tank-green.png" sphere="Y" collide="N"/> - <material name="tank-cyan.png" sphere="Y" collide="N"/> - <material name="parachute.png" backface-culling="n" ignore="Y" collide="N"/> - <material name="zipper.png" light="N" zipper="Y" collide="N"/> + <material name="banana.png" alpha="0.5"/> + <material name="gift-box.png"/> + <material name="gift-loop.png" sphere="Y"/> + <material name="gold.png" light="Y" sphere="Y"/> + <material name="nitro-tank.png" clampV="Y" transparency="Y" alpha="0.5"/> + <material name="tank-blue.png" sphere="Y"/> + <material name="tank-green.png" sphere="Y"/> + <material name="tank-cyan.png" sphere="Y"/> + <material name="parachute.png" backface-culling="n" ignore="Y"/> + <material name="zipper.png" light="N" zipper="Y"/> + <material name="zipper_collect.png" light="N" zipper="Y"/> + <material name="bowling-icon.png" transparency="Y" light="N"/> + <material name="bubblegum-icon.png" transparency="Y" light="N"/> + <material name="cake-icon.png" transparency="Y" light="N" /> + <material name="anchor-icon.png" clampU="Y" clampV="Y" transparency="Y" light="N" ignore="Y"/> + <material name="plunger-icon.png" transparency="Y" light="N"/> + <material name="parachute-icon.png" clampU="Y" clampV="Y" ignore="Y"/> </materials> Copied: main/trunk/data/models/parachute-icon.png (from rev 5246, main/trunk/data/textures/parachute-icon.png) =================================================================== (Binary files differ) Copied: main/trunk/data/models/plunger-icon.png (from rev 5246, main/trunk/data/textures/plunger-icon.png) =================================================================== (Binary files differ) Copied: main/trunk/data/models/swap-icon.png (from rev 5246, main/trunk/data/textures/swap-icon.png) =================================================================== (Binary files differ) Copied: main/trunk/data/models/zipper_collect.png (from rev 5246, main/trunk/data/textures/zipper_collect.png) =================================================================== (Binary files differ) Deleted: main/trunk/data/textures/anchor-icon.png =================================================================== (Binary files differ) Deleted: main/trunk/data/textures/anchor.png =================================================================== (Binary files differ) Deleted: main/trunk/data/textures/bowling-icon.png =================================================================== (Binary files differ) Deleted: main/trunk/data/textures/bubblegum-icon.png =================================================================== (Binary files differ) Deleted: main/trunk/data/textures/cake-icon.png =================================================================== (Binary files differ) Modified: main/trunk/data/textures/materials.xml =================================================================== --- main/trunk/data/textures/materials.xml 2010-04-23 02:19:22 UTC (rev 5246) +++ main/trunk/data/textures/materials.xml 2010-04-23 12:54:15 UTC (rev 5247) @@ -28,7 +28,6 @@ <material name="chess.png" collide="N"/> <material name="tinytux.png" clampU="Y" clampV="Y" transparency="Y" alpha="0.8" light="N" ignore="Y" collide="N"/> <material name="butterfly.png" clampU="Y" clampV="Y" transparency="Y" alpha="0.8" light="N" ignore="Y" collide="N"/> - <material name="zipper_collect.png" light="N" zipper="Y" collide="N"/> <material name="bananawrap.png" clampU="Y" clampV="Y" transparency="Y" alpha="0.5" light="N" zipper="Y" collide="N"/> <material name="fuzzy.png" clampU="Y" clampV="Y" transparency="Y" alpha="0.2" light="N" ignore="Y" collide="N"/> <material name="generickartshadow.png" clampU="Y" clampV="Y" transparency="Y" light="N" ignore="Y" collide="N"/> @@ -39,8 +38,6 @@ <material name="nitro-particle.png" alpha="Y" light="N" ignore="Y" collide="N"/> <material name="magnet.png" clampU="Y" clampV="Y" transparency="Y" light="N" ignore="Y" collide="N"/> <material name="bzzt.png" transparency="Y" light="N" ignore="Y" collide="N"/> - <material name="anchor-icon.png" clampU="Y" clampV="Y" transparency="Y" light="N" ignore="Y" collide="N"/> - <material name="parachute-icon.png" clampU="Y" clampV="Y" transparency="N" light="Y" ignore="Y" collide="N"/> <material name="speedback.png" clampU="Y" clampV="Y" transparency="Y" light="N" ignore="Y" collide="N"/> <material name="speedfore.png" clampU="Y" clampV="Y" transparency="Y" light="N" ignore="Y" collide="N"/> <material name="water_light.png" light="N" reset="Y" collide="N"/> @@ -63,10 +60,6 @@ <material name="dirt.png" collide="N"/> <material name="city_asphalt_1.png" collide="N" anisotropic="Y"/> <material name="city_checker.png" collide="N"/> - <material name="bowling-icon.png" transparency="Y" light="N" collide="N"/> - <material name="bubblegum-icon.png" transparency="Y" light="N" collide="N"/> - <material name="cake-icon.png" transparency="Y" light="N" collide="N"/> - <material name="plunger-icon.png" transparency="Y" light="N" collide="N"/> <material name="menu_background.png" clampU="Y" clampV="Y" alpha="1.0" light="N"/> <material name="menu_background2.png" clampU="Y" clampV="Y" alpha="1.0" light="N"/> <material name="water-splash.png" alpha="Y" light="N" ignore="Y" collide="N"/> Deleted: main/trunk/data/textures/parachute-icon.png =================================================================== (Binary files differ) Deleted: main/trunk/data/textures/plunger-icon.png =================================================================== (Binary files differ) Deleted: main/trunk/data/textures/swap-icon.png =================================================================== (Binary files differ) Deleted: main/trunk/data/textures/zipper_collect.png =================================================================== (Binary files differ) Modified: main/trunk/src/items/item_manager.cpp =================================================================== --- main/trunk/src/items/item_manager.cpp 2010-04-23 02:19:22 UTC (rev 5246) +++ main/trunk/src/items/item_manager.cpp 2010-04-23 12:54:15 UTC (rev 5247) @@ -94,11 +94,6 @@ //----------------------------------------------------------------------------- void ItemManager::loadDefaultItems() { - file_manager->pushTextureSearchPath(file_manager->getModelFile("")); - const std::string materials_file = file_manager->getModelFile("materials.xml"); - if(materials_file!="") - material_manager->pushTempMaterial(materials_file); - // The names must be given in the order of the definition of ItemType // in item.hpp. Note that bubblegum strictly isn't an item, // it is implemented as one, and so loaded here, too. @@ -130,9 +125,6 @@ m_item_mesh[i] = mesh; mesh->grab(); } // for i - if(materials_file!="") - material_manager->popTempMaterial(); - file_manager->popTextureSearchPath(); } // loadDefaultItems //----------------------------------------------------------------------------- Modified: main/trunk/src/main.cpp =================================================================== --- main/trunk/src/main.cpp 2010-04-23 02:19:22 UTC (rev 5246) +++ main/trunk/src/main.cpp 2010-04-23 12:54:15 UTC (rev 5247) @@ -615,8 +615,22 @@ kart_properties_manager -> loadAllKarts (); unlock_manager = new UnlockManager(); projectile_manager -> loadData (); - powerup_manager -> loadAllPowerups (); - item_manager -> loadDefaultItems(); + + // Both item_manager and powerup_manager load models and therefore + // textures from the model directory. To avoid reading the + // materials.xml twice, we do this here once for both: + file_manager->pushTextureSearchPath(file_manager->getModelFile("")); + const std::string materials_file = file_manager->getModelFile("materials.xml"); + if(materials_file!="") + material_manager->pushTempMaterial(materials_file); + { + powerup_manager -> loadAllPowerups (); + item_manager -> loadDefaultItems(); + } + if(materials_file!="") + material_manager->popTempMaterial(); + file_manager->popTextureSearchPath(); + attachment_manager -> loadModels (); // Init GUI prepare main menu This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-04-25 17:14:17
|
Revision: 5262 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5262&view=rev Author: auria Date: 2010-04-25 17:14:10 +0000 (Sun, 25 Apr 2010) Log Message: ----------- Fixed help screen bug caused by the recent move of items. Also modifying the code to make it easier to debug such kind of problem in the future (print the details to stderr, don't just assert(false)) Modified Paths: -------------- main/trunk/data/gui/help2.stkgui main/trunk/src/guiengine/widgets/icon_button_widget.cpp Modified: main/trunk/data/gui/help2.stkgui =================================================================== --- main/trunk/data/gui/help2.stkgui 2010-04-25 01:27:24 UTC (rev 5261) +++ main/trunk/data/gui/help2.stkgui 2010-04-25 17:14:10 UTC (rev 5262) @@ -20,39 +20,39 @@ <spacer height="25" width="10"/> <div width="100%" proportion="1" layout="horizontal-row"> - <icon align="center" width="64" height="64" icon="textures/bubblegum-icon.png"/> + <icon align="center" width="64" height="64" icon="models/bubblegum-icon.png"/> <spacer width="25" height="25"/> <label proportion="1" height="100%" word_wrap="true" text="BubbleGum - leave a sticky pink puddle behind you"/> </div> <div width="100%" proportion="1" layout="horizontal-row"> - <icon align="center" width="64" height="64" icon="textures/cake-icon.png"/> + <icon align="center" width="64" height="64" icon="models/cake-icon.png"/> <spacer width="25" height="25"/> <label proportion="1" height="100%" word_wrap="true" text="Cake - thrown at the closest rival, best on short ranges and long straights"/> </div> <div width="100%" proportion="1" layout="horizontal-row"> - <icon align="center" width="64" height="64" icon="textures/plunger-icon.png"/> + <icon align="center" width="64" height="64" icon="models/plunger-icon.png"/> <spacer width="25" height="25"/> <label proportion="1" height="100%" word_wrap="true" text="Plunger - throw straight to pull an opponent back, or throw while looking back to make one lose sight!"/> </div> <div width="100%" proportion="1" layout="horizontal-row"> - <icon align="center" width="64" height="64" icon="textures/bowling-icon.png"/> + <icon align="center" width="64" height="64" icon="models/bowling-icon.png"/> <spacer width="25" height="25"/> <label proportion="1" height="100%" word_wrap="true" text="Bowling Ball - bounces off walls. If you are looking back, it will be thrown backwards."/> </div> <div width="100%" proportion="1" layout="horizontal-row"> - <icon align="center" width="64" height="64" icon="textures/parachute-icon.png"/> + <icon align="center" width="64" height="64" icon="models/parachute-icon.png"/> <spacer width="25" height="25"/> <label proportion="1" height="100%" word_wrap="true" text="Parachute - slows down all karts in a better position!"/> </div> <div width="100%" proportion="1" layout="horizontal-row"> - <icon align="center" width="64" height="64" icon="textures/anchor-icon.png"/> + <icon align="center" width="64" height="64" icon="models/anchor-icon.png"/> <spacer width="25" height="25"/> <label proportion="1" height="100%" word_wrap="true" text="Anchor - slows down greatly the kart in the first position"/> </div> Modified: main/trunk/src/guiengine/widgets/icon_button_widget.cpp =================================================================== --- main/trunk/src/guiengine/widgets/icon_button_widget.cpp 2010-04-25 01:27:24 UTC (rev 5261) +++ main/trunk/src/guiengine/widgets/icon_button_widget.cpp 2010-04-25 17:14:10 UTC (rev 5262) @@ -50,7 +50,13 @@ m_texture = irr_driver->getTexture((file_manager->getDataDir() + "/" +m_properties[PROP_ICON]).c_str()); } - assert(m_texture != NULL); + if (m_texture == NULL) + { + std::cerr << "IconButtonWidget::add() : error, cannot find texture " + << m_properties[PROP_ICON].c_str() << std::endl; + assert(false); // catch this error in debug mode + return; + } m_texture_w = m_texture->getSize().Width; m_texture_h = m_texture->getSize().Height; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |