Commit Graph

467 Commits

Author SHA1 Message Date
hikerstk
5963f31079 Removed physics.hpp #include from world.hpp.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11213 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-05-08 07:07:15 +00:00
hikerstk
c15528f903 First version of demo mode. Use --demo-mode T to start
a demo after T seconds of idle time, --demo-tracks a,b,c
to specify a list of tracks to use for demo mode, --demo-karts
to specify the number of karts.
This is WIP, esp. it crashes if ESC is pressed during a race
(other keys will successfully return to main menu).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11189 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-05-07 00:10:33 +00:00
hikerstk
48bac59013 Replaced simple cast with proper dynamic cast to avoid potential incorrect cast
problems (I can't figure out what this line is supposed to do ... as far as I
could see it appears not to be used at all, and m_phase never reaches FINISH_PHASE).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11188 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-05-06 23:54:53 +00:00
wardje
78e09b4d1b Make punishment for the players less brutal, see #486.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11172 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-04-29 11:00:58 +00:00
auria
8a919816e1 Fixed returning reference to temporary
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11145 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-04-23 23:41:51 +00:00
auria
db2cd01922 Allow going to a challenge in the overworld by clicking on the minimap
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11143 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-04-23 19:23:21 +00:00
wardje
9eed9409e5 Add functionality to end a race early (#486).
* Only adding for standard races (normal race + time trial), didn't make as
  much sense elsewhere.
* Places still active players at the back of the final result and gives
  them penalty time.
* Add button to race pause dialog, temporarily using options_ui.png.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11093 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-04-07 21:58:11 +00:00
auria
9e3ba88f98 Don't allow starting a race from overworld while being rescued
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11091 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-04-05 02:28:21 +00:00
hikerstk
ae5b3b923e Bugfix: Casting Kart to TerrainInfo is not correct anymore,
added getTerrainInfo() function instead and dynamic_casts.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11081 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-04-04 00:43:52 +00:00
hikerstk
eca5b3e570 Refactored handling of kart animations: instead of
using a fixed object in the kart, now each animation
(rescue, explosion, canon) has its own object and 
implementation using a common interface. This
simplifies AbstractKartInterface, and makes it
easier to add new functionailty. 
Instead of using: kart->rescue(...),  or kart->explode(...)
you use new ExplosionAnimation(kart, ...) etc. Memory
handling is done by the object (and abstract kart).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11070 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-04-01 22:57:41 +00:00
auria
b83202439c When returning to overworld, bring back player to approximately where they were upon leaving
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11067 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-04-01 17:17:36 +00:00
auria
74ab49b1ac Hide lap messages in overworld
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11066 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-04-01 15:45:10 +00:00
auria
6f58350098 Return to overworld when exiting a race if race was started from overworld
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11065 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-04-01 15:42:44 +00:00
auria
ea3d5ca9b5 Updated Xcode project, plus fix quite a few issues found by Clang (Xcode now uses clang by default) - some of them genuine nasty bugs, great
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11029 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-03-27 22:04:44 +00:00
hikerstk
e3de48350d Removed compiler warning.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11024 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-03-25 23:56:25 +00:00
hikerstk
ebbc1a71d8 Introduced an 'abstract kart' class, which is used to
de-couple kart implementation and its interface. This
significantly reduces compile time when changing kart.hpp,
but is at this stage still work in progress.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10997 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-03-19 20:21:11 +00:00
auria
40efd3fbfc Apply patch by Wardje to skip the ready-start-go pahse for voerworld, thanks
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10989 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-03-17 18:43:11 +00:00
hikerstk
bbb0954ae8 Applied Wardje's patch to have separate high scores for reverse mode.
Thanks a lot!


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10967 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-03-14 22:37:56 +00:00
hikerstk
629f9a27e2 Removed dependencies on controller.hpp from kart.hpp (to
reduce compile time on controller changes).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10952 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-03-08 22:56:33 +00:00
hikerstk
72070db1a0 Fixed memory leak: the virtual createPhysics function of
GhostKart was not called, since it was called during when
the contrsuctor of Kart was executed (at this time the
GhostKart vtable wasn't set up, so Kart::createPhysics)
was called - which resulted in a memory leak since all
physics parts of the kart were actually allocated (just
not used). To fix this, karts are not constructed in two
phases: first a constructor, followed by a call to init
(during which virtual function can be used).
Fixed several bugs were physics data for a GhostKart
were accessed.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10947 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-03-07 02:41:41 +00:00
hikerstk
3fc43d4d14 Refactored replay by splitting it into one base class, and dedicated
classes for recording and for replaying. Added compression (by use of
interpolation) settings to stk_config - atm only using a certain
frequency (delta-t setting in stk_config) is used.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10904 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-02-28 22:33:49 +00:00
hikerstk
4f1961044c Avoid crash in case of a kart-track collision while during resetAllKarts (which
apparently happens in doing-the-dishes with 20 karts).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10903 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-02-28 03:36:18 +00:00
hikerstk
bce6113fd7 Added first version of (uncompressed) replays - atm only
kart positions and rotations are saved.
To save a replay, press ctrl-F10 which will create a file
in the stk config dir 'trackname'.replay .
To replay, use --ghost command line, and select the
track with the same name (at this stage the replay is
loaded even if number of laps and difficulty is different).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10897 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-02-27 05:52:17 +00:00
auria
c953803f13 Start refactor to turn around a bad design decision regarding challenges. Oops. Number of required trophies moved from scene.xml to .challenge file.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10885 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-02-23 01:36:24 +00:00
hikerstk
579715a8d8 Merged trunk with this branch. ATM the track screenshot does not work -
I am going to fix this next.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/reverse_mode@10862 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-02-16 04:57:49 +00:00
hikerstk
94be2cfec2 Automatically switch to camera 0 when the lap line is crossed. This
improved handling of end cameras for reverse mode (otherwise one
additional end camera would need to be defined to be used just
when the lap line is crossed).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/reverse_mode@10850 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-02-15 05:23:21 +00:00
hikerstk
e13a7078d8 Fixed warnings being printed at race start when using 0 lap races.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/reverse_mode@10845 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-02-14 23:25:43 +00:00
hikerstk
fcdf44c764 1) Fixed computing of checkling requirements to work properly with
reverse tracks. Simplified code by moving some functionality
   from QuadGraph to CheckManager.
2) Added comments, renamed some functions to better indicate
   what they are doing.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/reverse_mode@10843 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-02-14 20:51:29 +00:00
auria
da25bc6105 Fix entering garage in a cleaner way
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10817 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-02-07 01:25:56 +00:00
auria
a8dd687071 Revert change I did that introduced bug
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10811 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-02-06 02:55:41 +00:00
auria
65b4eed110 Implement going in the garage to change kart
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10807 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-02-05 19:32:17 +00:00
hikerstk
613173ff3d Set the world kart id in the constructor of karts, and not
later in a separate call.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10788 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-02-02 05:21:14 +00:00
hikerstk
a993cebca0 Applied first part of MCMic's patch to allow driving a track in reverse.
It adds a flag to the track.xml files, a (currently unnamed) checkbox
in the track selection screen, but doesn't do any actualy reversing (see
forum http://forum.freegamedev.net/viewtopic.php?f=18&t=2661 for
details).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/reverse_mode@10767 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-01-30 23:35:46 +00:00
auria
708d79b2f4 Add dialog asking to select challenge difficulty. Crashes for now so don't report bugs yet
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10736 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-01-28 02:06:44 +00:00
auria
57b727f68d Big overhaul of challenges. Bumped challenge XML file format to version 2.0. Now each challenge file speficies 3 difficulty levels. Started adapting unlock manager for these changes.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10727 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-01-26 19:12:48 +00:00
auria
ec0a20c319 Fix bug #557 by deactivating challenge orbs when the player doesn't have enough points for them
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10719 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-01-25 02:09:10 +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
auria
792aac1e68 Improve where rescue will drop you in overworld
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10696 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-01-20 01:14:15 +00:00
auria
aac43ad521 Improve starting challenge from overworld
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10695 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-01-20 00:43:51 +00:00
auria
cd6185c2ee Start work on starting challenges from overworld. Note that it does NOT yet fully work.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10668 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-01-15 02:46:59 +00:00
auria
2916e527da More work on overworld UI + give the player infinite nitro
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10620 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-01-09 01:25:27 +00:00
hikerstk
e06c8a05fa Split updatePhysics into several shorter functions to make the code easier to
understand. Removed and simplified some functions. This should not change
anything in actual game play.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10574 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-01-04 21:58:33 +00:00
hikerstk
87865b7dec Removed unnecessary include of kart.hpp from world.hpp.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10572 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-01-04 05:32:19 +00:00
auria
2a96276da5 The oveworld GUI now has its own class, will be easier to work the UI as I want
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10532 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-12-31 22:07:49 +00:00
auria
c2d69b24f9 Display number of trophies in overworld HUD
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10461 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-12-20 22:01:45 +00:00
auria
32f8666d10 Make overworld GUI cleaner by removing timer and rank
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10459 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-12-20 20:08:19 +00:00
auria
92b077a250 Create new world type for overworld for customized behavior. Hide overworld in track seelciton screen. Launch overworld when clicking on story mode button.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10443 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-12-19 02:26:07 +00:00
auria
92eb0ebd2a Ran a small bash script to remove all of those annoying strings. The only thing they gave us were the need to rebuild after committing
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10363 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-12-06 18:43:36 +00:00
auria
0455efd20d Massive refactor in challenge code to allow having more than 1 progression
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10349 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-12-05 22:00:42 +00:00
termina1
1d6953bcb3 Fix for ticket 450: use a largest accumulated distance to separate kart respawns in 3sb
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10335 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-12-04 15:10:59 +00:00