Commit Graph

89 Commits

Author SHA1 Message Date
auria
76c6ddbc93 Fix FTL having no highscores as expected; don't display highscores in end-of-race dialogs when the mode has none
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4761 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-18 02:08:11 +00:00
hikerstk
31e3806fd0 Refactor end of race handling so that more functions are done in a base class only
(esp. code that was previously duplicated in the battle mode and standard race).
There is now time for an end animation, even if the player should finish last
(in which case the previous end camera would not be shown). This mostly in 
preparation for end animations.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4750 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-17 11:59:51 +00:00
hikerstk
da3de6d131 Big code refactoring: instead of having auto_kart, player_kart, the karts
now use a 'controller' object which is responsible for its steering, e.g.
a default_ai_controller, player_controller etc. This makes it easier to
switch a player kart to use a end-of-race computer controller to drive
the kart once the race is finished (though that's not implemented yet).
I expect some bugs with restarting race, and perhaps end of race
behaviour at this stage.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4714 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-15 00:54:28 +00:00
hikerstk
328373289a 1) Moved access to world object from race_manager to static functions in
world.
2) Removed more dujplicated/unnecessary functions from race_manager
   (getPlayerKart, getTrack).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4682 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-11 07:11:52 +00:00
hikerstk
b9ffb6fa13 Removed g++ compiler warnings.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4681 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-10 23:55:19 +00:00
hikerstk
4a96f98182 Removed player- and network-kart lists from world, so now
there is only one list used to access all karts in world.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4680 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-10 22:59:17 +00:00
hikerstk
47a1a1dfa2 Removed m_local_player_karts vector from world.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4678 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-10 12:47:18 +00:00
hikerstk
c6bf95a64c Started to remove the various kart lists in various objects.
1) Removed getKart from RaceManager.
2) Renamged RaceManager::getNumKarts() to getNumberOfKarts.
   This function should only be called when the world
   does not exist (or is not yet initialised). 	In all
   other cases world::getNumKarts() should be called.
3) Improved several 'const' functions.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4676 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-10 11:40:33 +00:00
hikerstk
4e36fc1f78 Moved WorldStatus enums into WorldStatus class.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4673 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-09 09:24:45 +00:00
hikerstk
9a68e6e130 1) Renamed clock.?pp (which stored the class TimedRace) to
world_status.?pp (storing the class WorldStatus).
2) Fixed end of race in case that player kart is last
   (race would never end till esc is pressed).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4668 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-08 12:59:03 +00:00
hikerstk
70f5f1044b Removed compiler warning.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4437 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-01-11 23:51:59 +00:00
hikerstk
2c60045223 Disabled new AI so that we know at least to which AI bug reports apply to.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4421 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-01-10 12:12:07 +00:00
mbjornstk
5fe41e5625 Run expand -t4 to convert tabs to spaces. No other whitespace fixes, but
there are still trailing spaces and lines with 5 spaces as indent (fix them
as the files are changed for other reasons). src/guiengine/CGUIFont.* and
src/bullet/ not processed to allow cleaner updates from upstream.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4320 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-12-18 00:36:35 +00:00
hikerstk
9f17650552 Bugfix: check_structures were reset before karts, which means that in the very first frame of a
restarted race incorrect checks would be triggered (e.g. causing a new lap to be counted).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4235 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-12-04 00:49:38 +00:00
hikerstk
ed9bd38402 Some redesign of split screen to enable proper handling of
ambient light changes.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4229 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-11-29 13:04:57 +00:00
hikerstk
a5a90be806 1) Started to add split screen (though not all parts of the race gui are displayed correctly yet).
2) The name of an AI kart will now only get the AI name added if it's profile mode (to prevent
   the name with AI name to be displayed in game)
3) Some code cleanup.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4226 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-11-23 05:20:05 +00:00
hikerstk
dd02e0726f 1) Added new AI, which is not yet too different from the current one.
2) AIs can now modify the kart name, which is used in printing profile results, to
   include an AI identifiert.
3) NewAI and DefaultRobot are created un turns: first AI is DefaultRobot, then 
   NewAI, then Default...
4) Made specific mode in VS project file for irrlicht 1.6 (will be removed soon).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4213 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-11-08 12:19:33 +00:00
hikerstk
39cb1129d1 Bugfix: For the duration of one frame the position of the karts was incorrect
when a kart is about to cross the starting line.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4151 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-10-23 01:54:05 +00:00
auria
5ff086d156 Fixed handling of wide strings in StringUtils::insertValues (the wide overlaod) + fixed aain assert import
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3979 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-09-01 21:18:07 +00:00
auria
c3f0f7ab82 Massive conversion from std::string to stringw for all strings that need to be translated. Currently, translation is broken (strings i try to transalte appear as junk) -- since irrlicht GUI widgets all use wchar_t, using std::string in UTF-8 just didn't make it
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3963 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-30 18:21:59 +00:00
auria
432da8b070 Improved display of highscores. IMPORTANT: Kart name in highscores used to be saved as user-visible name and not internal name. This is wrong, the user name can change or be translated and we still expect it to work. I changed the highscore code to save the kart's ident and not translated name, but you will need to delete/correct your current highscore file if you want kart from highscores to be displayed
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3953 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-29 18:59:25 +00:00
hikerstk
96dc2a8fe2 Cleaned up StringUtils: used 'better' names (e.g. getPath()
instead of path()), and used our convention of using capitalization
for words (and not _). Started adding support for additional track
directories, but that's not working yet.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3912 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-24 05:56:53 +00:00
hikerstk
6318008c87 Restructured modes to be easier to inerhit from:
- cleanly split into constructor and init()
  phase
- added new isRaceFinished() function
Some minor code cleanup.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3900 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-21 13:05:52 +00:00
hikerstk
ef175e94d4 1) Added alpha version of profile-mode (which replaces if-statements
in world).
2) Moved camera management into race gui, so that the number of split screens
   used can be adjusted (and not only indirect via number of player) - this
   allows e.g. debug modes where you can see 4 AI karts at the same time,
   for profile mode, ...
3) Code cleanup.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3899 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-21 00:32:24 +00:00
davemk
329124a3ba oops. Include btkart.hpp to world.cpp so it compiles again.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3887 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-19 13:48:28 +00:00
davemk
7315b74865 initially project karts onto track from slightly higher
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3886 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-19 13:45:44 +00:00
hikerstk
63e16e3e8a Removed scene.?pp (which didn't do much anyway except for
handling the cameras, which can as easily be handled by
player karts instead).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3883 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-19 04:03:25 +00:00
davemk
271a157c6c use kart projection for rescue and initial simulation
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3882 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-18 11:05:40 +00:00
davemk
9b45fdc547 more cosmetic changes
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3881 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-18 10:59:21 +00:00
hikerstk
1033bfdf59 1) Only Track is now using the ItemManager.
2) Fixed several memory leaks in animation code.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3849 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-13 11:12:26 +00:00
hikerstk
2b5a273b95 Renamed RaceManager::getKartName to getKartIdent, since this is was the function actually does :)
(prevents us printing the id instead of the name somewhere).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3846 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-13 04:53:51 +00:00
auria
8623a4a49a Fixed incorrect code (and warning)
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3792 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-02 18:04:16 +00:00
hikerstk
89b2eea124 Added first version of track mini map to race gui.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3784 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-07-30 02:40:30 +00:00
hikerstk
368604f379 Added speedometer.
NOTE: to use the speedometer, a patched version of irrlicht is needed. The replacement
files are included here, we hope that the necessary functions will be included in the
next irrlicht release (STK will still compile without a patched irrlicht version,
but not display the speedometer).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3781 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-07-27 11:56:09 +00:00
auria
85266dfe10 Started mammoth cleanup of GUI code. Separated the generic GUI engine and the STK-specific bits (still work to do on this side)
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3764 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-07-18 17:48:36 +00:00
auria
fbc3119dbc Continued cleaning up references to Player & ActivePlayer and docs
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3762 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-07-18 15:32:54 +00:00
auria
2c0a322b61 Started cleaning up references to Player to use ActivePlayer where relevant
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3761 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-07-18 15:21:16 +00:00
hikerstk
5f4b474e77 Fixed some memory leaks, code cleanup, started adding
mini map creation.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3755 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-07-16 12:09:15 +00:00
hikerstk
88b4b3b041 1) Added calls to new render functions which are
called during the irrlicht rendering, so calls
   to directly print etc. to the screen are possible.
2) Time and ready/set/go of the race gui now work.
3) Code cleanup.
4) Removed compiler warnings.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3740 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-07-12 11:54:21 +00:00
auria
a44b531525 Replaced usage of some confusing IDs with more explicit pointers
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3736 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-07-12 00:18:37 +00:00
hikerstk
8c1bba8abb Added initial support for checklines (though atm they don't do anything yet).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3703 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-07-06 13:35:33 +00:00
hikerstk
6cefc34b31 More work on animations (still work in progress)
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3680 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-06-30 12:51:38 +00:00
auria
2f6b05bace started converting user config to XML. Implementation is not 100% complete yet; saving works, not lodading. Implementation is not the prettiest but designed for minimal maintenance.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3625 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-06-21 01:10:43 +00:00
hikerstk
ee90eca26e 1) Created new config subdir and moved the last remaining files into
appropriate subdirs (only main.cpp and main_loop.?pp are now directly
   in the src directory).
2) Cleaned up all #include directives, so that all files now use
   the right subdirectories.
3) Some minor code cleanup.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3606 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-06-11 10:00:43 +00:00
hikerstk
96805cfc71 Moved race related files into new subdir 'race'.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3581 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-06-03 01:36:48 +00:00
auria
f4a76bc2ae removed 95% remaining dependencies on plib
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3479 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-05-11 01:28:18 +00:00
hikerstk
30de5e36f8 Removed callback manager, callbacks are not needed the way they were
with plib, and the track is now updating its animated textures and
physical objects.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3337 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-04-01 00:55:20 +00:00
hikerstk
4ccd7662ef 1) Added support for animated textures.
2) Removed static_ssg source files.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3335 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-03-31 23:45:20 +00:00
auria
4acc6fc7c8 first introduction of new GUI code. It does *not* work, consider this a backup (and the removal of the old UI)
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3256 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-03-13 13:50:24 +00:00
hikerstk
8a60edf241 Moved file manager to io subdir, made irrlicht compilation default,
started removing #ifdefs HAVE_IRRLICHT.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3239 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-03-12 03:49:31 +00:00