Commit Graph

39 Commits

Author SHA1 Message Date
Benau
b903baf226 Fix crash sound only working once if the timer counts backwards 2016-07-08 23:43:12 +08:00
Tobias Markus
d8cce95b0e Add forgotten override's where necessary 2016-02-21 01:36:15 +01:00
hiker
7799e9835d Added a getStartTransform function to World. Use this to change
the start position of the non-leader karts in a FTL race, so that
those karts now start at the end of all start positions, and not
directly behind the leader.
2015-07-30 17:12:48 +10:00
hiker
b18d0275fd Display a finish (survival) time in FTL result screen. 2015-07-29 17:27:43 +10:00
hiker
5efb44a430 Fixed scores in FTL GPs. All score handling is now done by the World,
not race manager (which removes if tests).
2015-07-28 09:39:00 +10:00
hiker
8d07d26c25 Updated (c) year to include 2015. 2015-03-30 11:42:50 +11:00
hikerstk
c5b8732087 Probably biggest commit (in terms of number of files) ever -
updated the (c) line of all files to -2013, added missing (c), 
changed format in some cases so that it will be easier in
the future to change them by script. No actualy code change.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14447 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-11-15 11:43:21 +00:00
auria
6139f6ef77 Improve what happens when you lose FTL. Should now be pretty clear
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14338 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-10-29 01:20:59 +00:00
curaga
57c3cbae3e Space cleanup pass on the headers
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12817 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-05-30 19:47:39 +00:00
hikerstk
820ebd2673 Refactoring: removed code duplication in some init() and restartRace()
functions of game modes (caused by restartRace only called in case of
a restart, not the first time a race is started). The function restartRace()
was renamed to reset(), which is now called always before a race is started
or restarted.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12591 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-04-03 06:05:34 +00:00
hikerstk
d77471b446 Refactored information exchange between modes and race GUIs:
instead of each mode maintaining an array of data for each kart
which is used by the race GUI, use one array in race_gui_base,
which is then filled by the game mode.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12186 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-12-05 04:04:01 +00:00
auria
e5a3a45153 Add missing file
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11243 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-05-16 00:21:34 +00:00
auria
a5a630f410 Use the new OVERRIDE macro in a couple more places
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11232 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-05-14 00:20:00 +00:00
hikerstk
808ffa85f8 Removed compiler warning.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10709 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-01-24 03:22:59 +00:00
hikerstk
3185c5fcc9 Cleaned up world.hpp:
- sorted declarations so that all virtual functions
  are together.
- Renamed *_IDENT variables to IDENT_* so that the
  naming is consistent
- Using std::string& for IDENT_* instead of char*
- Use pointer for out variables in getDefaultCollectibles.
- Moved m_fastest_lap variable from world to LinearWorld.
- Many many cosmetic changes to follow our style guide.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9852 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-09-16 01:49:38 +00:00
hikerstk
d3d0b87d93 Replaced #include with forward reference to reduce dependencies.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9821 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-09-13 23:43:15 +00:00
hikerstk
2c98d511fe Fixed graphical error in FTL races when music is enabled
(see bug 3072740): the countdown timer caused incorrect
values to be used for the 'music credit' display.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6121 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-09-23 07:17:04 +00:00
hikerstk
ebf6f561a9 Completely removed getRaceResultOrder functions, added debug support
for duplicated ranks to world_with_rank.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5898 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-09-05 14:05:59 +00:00
hikerstk
3480562b78 Added a new object in the world hierarchy (WorldWithRank) which
contains all codes related to ranking the karts (which is used
to display the icons in the race gui and the end result table).
The battle mode should now be fixed, but follow-the-leader
has still issues and will most likely crash at the end.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5864 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-09-02 13:14:07 +00:00
hikerstk
626f83087a Added new base class for race gui (in prepration for improved
result gui).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5680 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-07-11 23:03:54 +00:00
auria
c3fe0cb910 More work to enhance Doxygen output
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5250 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-04-23 20:48:56 +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
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
auria
870c470eab Highscores are now displayed in the track screen
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3951 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-29 18:12:31 +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
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
hikerstk
634b6044ae Enabled anvil for FTL races again.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2868 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-01-08 23:25:19 +00:00
auria
bb56beb7f9 allow modes to disallow some types of powerups, for instance no anvil should be collected in battle mode...
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2423 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2008-11-08 02:52:29 +00:00
auria
35c1c3eb32 work towards encapsulation of race results display
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2344 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2008-10-16 19:53:37 +00:00
auria
0c945d61d3 Made World derive from 'Clock' (now 'TimedRace') simplifying a lot of things, especially the race end process
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2323 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2008-10-04 17:32:40 +00:00
auria
f38e47954c full encapsulation of 'raceHasLaps'
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2318 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2008-10-01 01:53:35 +00:00
auria
11bec6a781 fixed memory leak
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2314 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2008-09-30 20:38:11 +00:00
auria
019eaca2cf Mammoth patch to try and encapsulate sector and lap code better in modes. Still work in progress so expect suboptimal implementations and breakage. Known to be broken at this stage : opponents' times at the end of a lap, rescue button and rescuing in general, shortcut detection
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2303 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2008-09-27 19:43:57 +00:00
auria
e1df51b631 made faster music a choice of the base class. various 'for' loop optimisations. replaced incorrect 'int' with 'bool'
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2299 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2008-09-24 00:43:45 +00:00
auria
0e5106bfb9 started highscores refactor, also fixing them (they had been broken during the world refactor)
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2296 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2008-09-23 01:16:50 +00:00
auria
cc61f53ff8 more cleanup, replaced World global variable with singleton-like implementation, removed lots of includes to world.hpp
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2291 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2008-09-21 16:07:56 +00:00
hikerstk
1738961f68 1) Bugfix: World::Karts was protected (causing a compilation error on
linux)
2) Removed several warning (e.g. no newline at end of file).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2288 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2008-09-21 06:04:38 +00:00
auria
67c514f1ed first iteration of new game mode code. most things seem okay, maybe high scores/rankings should be double-checked, also the end-of-race screen seems a bit messed up
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2287 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2008-09-20 23:45:22 +00:00