[_GSoC Uni_] Merge to revision 13035

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/uni@13036 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
unitraxx 2013-06-30 00:56:57 +00:00
commit 6d37125348
174 changed files with 6378 additions and 6219 deletions

Binary file not shown.

View File

@ -19,5 +19,6 @@
<unlock kart="gnu"/>
<unlock kart="nolok"/>
<unlock difficulty="difficulty_best"/>
<unlock track="fortmagma"/>
</challenge>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

33
data/gfx/explosion.xml Normal file
View File

@ -0,0 +1,33 @@
<?xml version="1.0"?>
<particles emitter="sphere" radius="0.3">
<spreading angle="180" />
<velocity x="0.000"
y="0.0035"
z="0.000" />
<material file="explode.png" />
<!-- Amount of particles emitted per second -->
<rate min="500"
max="800" />
<!-- Minimal and maximal lifetime of a particle, in milliseconds. -->
<lifetime min="1000"
max="1200" />
<!-- Size of the particles -->
<size min="0.65"
max="0.95"
x-increase-factor="0.6"
y-increase-factor="0.6"
/>
<color min="255 255 255"
max="255 255 255" />
<!-- How much time in milliseconds before the particle is fully faded out -->
<fadeout time="800" />
</particles>

View File

@ -0,0 +1,33 @@
<?xml version="1.0"?>
<particles emitter="sphere" radius="0.3">
<spreading angle="180" />
<velocity x="0.000"
y="0.0035"
z="0.000" />
<material file="explode.png" />
<!-- Amount of particles emitted per second -->
<rate min="500"
max="800" />
<!-- Minimal and maximal lifetime of a particle, in milliseconds. -->
<lifetime min="1000"
max="1200" />
<!-- Size of the particles -->
<size min="0.65"
max="0.95"
x-increase-factor="0.6"
y-increase-factor="0.6"
/>
<color min="255 255 255"
max="255 255 255" />
<!-- How much time in milliseconds before the particle is fully faded out -->
<fadeout time="800" />
</particles>

View File

@ -0,0 +1,33 @@
<?xml version="1.0"?>
<particles emitter="sphere" radius="0.3">
<spreading angle="180" />
<velocity x="0.000"
y="0.0035"
z="0.000" />
<material file="explode.png" />
<!-- Amount of particles emitted per second -->
<rate min="500"
max="800" />
<!-- Minimal and maximal lifetime of a particle, in milliseconds. -->
<lifetime min="1000"
max="1200" />
<!-- Size of the particles -->
<size min="0.65"
max="0.95"
x-increase-factor="0.6"
y-increase-factor="0.6"
/>
<color min="255 255 255"
max="255 255 255" />
<!-- How much time in milliseconds before the particle is fully faded out -->
<fadeout time="800" />
</particles>

View File

@ -0,0 +1,33 @@
<?xml version="1.0"?>
<particles emitter="sphere" radius="0.3">
<spreading angle="180" />
<velocity x="0.000"
y="0.0003"
z="0.010" />
<material file="smoke.png" />
<!-- Amount of particles emitted per second -->
<rate min="250"
max="400" />
<!-- Minimal and maximal lifetime of a particle, in milliseconds. -->
<lifetime min="500"
max="600" />
<!-- Size of the particles -->
<size min="0.65"
max="0.95"
x-increase-factor="0.6"
y-increase-factor="0.6"
/>
<color min="255 255 255"
max="255 255 255" />
<!-- How much time in milliseconds before the particle is fully faded out -->
<fadeout time="1000" />
</particles>

30
data/gfx/nitro-smoke.xml Normal file
View File

@ -0,0 +1,30 @@
<?xml version="1.0"?>
<particles emitter="box" box_x="0.35" box_y="0.2" box_z="0.2">
<spreading angle="30" />
<velocity x="0.0"
y="0.001"
z="-0.003" />
<material file="smoke_nitro.png" />
<!-- Amount of particles emitted per second -->
<rate min="200"
max="300" />
<!-- Minimal and maximal lifetime of a particle, in milliseconds. -->
<lifetime min="400"
max="600" />
<!-- Size of the particles -->
<size min="0.20"
max="0.40" />
<color min="255 255 255"
max="255 255 255" />
<!-- How much time in milliseconds before the particle is fully faded out -->
<fadeout time="100" />
</particles>

View File

@ -1,30 +1,33 @@
<?xml version="1.0"?>
<particles emitter="box" box_x="0.35" box_y="0.2" box_z="0.2">
<particles emitter="box" box_x="0.05" box_y="0.05" box_z="0.05">
<spreading angle="30" />
<spreading angle="2" />
<velocity x="0.0"
y="0.001"
z="-0.003" />
z="0.000" />
<material file="nitro-particle.png" />
<!-- Amount of particles emitted per second -->
<rate min="400"
max="600" />
<rate min="100"
max="200" />
<!-- Minimal and maximal lifetime of a particle, in milliseconds. -->
<lifetime min="400"
max="600" />
<lifetime min="10"
max="20" />
<!-- Size of the particles -->
<size min="0.20"
max="0.40" />
<size min="0.1"
max="0.25"
x-increase-factor="1.2"
y-increase-factor="1.2"
/>
<color min="255 255 255"
max="255 255 255" />
<!-- How much time in milliseconds before the particle is fully faded out -->
<fadeout time="100" />
<fadeout time="5" />
</particles>

View File

@ -21,7 +21,7 @@
<!-- Size of the particles -->
<size min="0.35"
max="0.35" />
max="0.75" />
<color min="255 255 255"
max="255 255 255" />

View File

@ -16,8 +16,8 @@
<label id="size" width="100%" text=""/>
<label id="revision" width="100%" text=""/>
</div>
<div width="50%" height="100%" layout="vertical-row" >
<label id="rating" width="100%" text=""/>
<div width="50%" height="32" layout="vertical-row" >
<ratingbar id="rating" height="64" width="100%" />
</div>
</div>
<spacer height="10"/>

View File

@ -5,11 +5,22 @@
<div x="0" y="0" width="100%" layout="horizontal-row" height="8%">
<icon-button id="back" height="100%" icon="gui/back.png"/>
<header text_align="center" proportion="1" text="SuperTuxKart Addons" align="center"/>
<button id="reload" I18N="Reload button to reload addon data" text="Reload" />
<spacer width="15" height="10" />
<button id="reload" I18N="Reload button to reload addon data" text="Reload" />
</div>
<spacer height="15" width="10"/>
<box id="filter_box" width="97%" height="75" layout="vertical-row" align="center">
<div x="0" y="0" width="98%" height="100%" layout="horizontal-row" align="center">
<textbox id="filter_name" proportion="9" align="center" />
<spacer width="10" />
<label text="Updated" align="center" />
<spinner id="filter_date" proportion="5" align="center" min_value="0" wrap_around="true"/>
<label text="Rating >=" align="center"/>
<spinner id="filter_rating" proportion="3" align="center" min_value="0" wrap_around="true"/>
<icon-button id="filter_search" height="100%" icon="gui/search.png"/>
</div>
</box>
<spacer height="25" width="10"/>
<tabs id="category" height="10%" max_height="110" width="90%" align="center">
<icon-button id="tab_kart" width="128" height="128" icon="gui/karts.png"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -34,7 +34,7 @@
<buttonbar id="menu_bottomrow" x="0" y="0" width="20%" height="100%" align="center">
<icon-button id="sign_in" width="64" height="64" icon="gui/main_about.png" extend_label="50"
I18N="Main menu button" text="Sign In" label_location="hover"/>
<icon-button id="register" width="64" height="64" icon="gui/tutorial.png" extend_label="50"
<icon-button id="register" width="64" height="64" icon="gui/tutorial.png" extend_label="75"
I18N="Main menu button" text="Register" label_location="hover"/>
<icon-button id="sign_out" width="64" height="64" icon="gui/main_quit.png" extend_label="50"
I18N="Main menu button" text="Sign Out" label_location="hover"/>

BIN
data/gui/search.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@ -3,6 +3,7 @@
Glass skin by Marianne Gagnon, released under creative-commons BY-SA 3.0+
Except background.jpg, by elisee
Except left_arrow, right_arrow and list_sort_up by Dakal
Except stars, by s@f
To make your own skin, I suggest simply duplicating this file and modifying it as needed.
There are two types of images : some will be simply stretched as a whole, others will
@ -208,7 +209,12 @@ when the border that intersect at this corner are enabled.
<color type="dialog_background" state="neutral" a="120" r="0" g="0" b="0" />
<!-- Text field color -->
<color type="text_field" state="neutral" a="255" r="215" g="215" b="215" />
<color type="text_field" state="background" a="255" r="200" g="200" b="200" />
<color type="text_field" state="background_focused" a="255" r="195" g="222" b="194" />
<color type="text_field" state="neutral" a="255" r="138" g="138" b="138" />
<color type="text_field" state="focused" a="255" r="0" g="150" b="0" />
<!-- Rating star image -->
<element type="rating" state="neutral" image="glass/rating_star.png" />
</skin>

View File

@ -2,6 +2,7 @@
Ocean skin by Dakal and Marianne Gagnon, released under creative-commons BY-SA 3.0+
Except background.jpg, by elisee
Except stars, by s@f
To make your own skin, I suggest simply duplicating this file and modifying it as needed.
There are two types of images : some will be simply stretched as a whole, others will
@ -208,7 +209,12 @@ when the border that intersect at this corner are enabled.
<color type="dialog_background" state="neutral" a="120" r="0" g="0" b="0" />
<!-- Text field color -->
<color type="text_field" state="neutral" a="255" r="215" g="215" b="215" />
<color type="text_field" state="focused" a="255" r="138" g="138" b="138" />
<color type="text_field" state="background" a="255" r="200" g="200" b="200" />
<color type="text_field" state="background_focused" a="255" r="223" g="238" b="248" />
<color type="text_field" state="neutral" a="255" r="138" g="138" b="138" />
<color type="text_field" state="focused" a="255" r="42" g="169" b="211" />
<!-- Rating star image -->
<element type="rating" state="neutral" image="ocean/rating_star.png" />
</skin>

View File

@ -2,6 +2,7 @@
Peach skin by Dakal and Marianne Gagnon, released under creative-commons BY-SA 3.0+
Except background.jpg, by elisee
Except stars, by s@f
To make your own skin, I suggest simply duplicating this file and modifying it as needed.
There are two types of images : some will be simply stretched as a whole, others will
@ -207,7 +208,12 @@ when the border that intersect at this corner are enabled.
<color type="dialog_background" state="neutral" a="120" r="0" g="0" b="0" />
<!-- Text field color -->
<color type="text_field" state="neutral" a="255" r="215" g="215" b="215" />
<color type="text_field" state="focused" a="255" r="138" g="138" b="138" />
<color type="text_field" state="background" a="255" r="200" g="200" b="200" />
<color type="text_field" state="background_focused" a="255" r="236" g="226" b="201" />
<color type="text_field" state="neutral" a="255" r="138" g="138" b="138" />
<color type="text_field" state="focused" a="255" r="243" g="164" b="80" />
<!-- Rating star image -->
<element type="rating" state="neutral" image="peach/rating_star.png" />
</skin>

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -7,10 +7,10 @@
<material name="silver.png" light="Y" smooth-reflection="Y"/>
<material name="bronze.png" light="Y" smooth-reflection="Y"/>
<material name="nitro-tank.png" transparency="Y"/>
<material name="tank-blue.png" sphere="Y"/>
<material name="tank-green.png" sphere="Y"/>
<material name="tank-cyan.png" sphere="Y"/>
<material name="stk_mod_nitroBarrel.png" />
<material name="stk_mod_nitroBottle.png" />
<material name="stk_mod_nitroLogo.png" compositing="additive" light="N" disable-z-write="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"/>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

View File

@ -1034,7 +1034,7 @@ msgstr "Réglages visuels"
#. I18N: ./data/tracks/greenvalley/track.xml
#: data/po/gui_strings.h:8
msgid "Green Valley"
msgstr "Vallée luxuriente"
msgstr "Vallée luxuriante"
#: src/config/user_config.cpp:546
msgid "Guest"

View File

@ -1,856 +0,0 @@
//I18N: ./data/tracks/jungle/track.xml
_("Amazonian Journey")
//I18N: ./data/tracks/minigolf/track.xml
_("Minigolf Mischief")
//I18N: ./data/tracks/lighthouse/track.xml
_("Around the Lighthouse")
//I18N: ./data/tracks/subsea/track.xml
_("Subsea")
//I18N: ./data/tracks/city/track.xml
_("Shiny Suburbs")
//I18N: ./data/tracks/snowmountain/track.xml
_("Northern Resort")
//I18N: ./data/tracks/olivermath/track.xml
_("Oliver's Math Class")
//I18N: ./data/tracks/cave/track.xml
_("Cave X")
//I18N: ./data/tracks/battleisland/track.xml
_("Battle Island")
//I18N: ./data/tracks/alpha-planetarium/track.xml
_("planetarium")
//I18N: ./data/tracks/hacienda/track.xml
_("Hacienda")
//I18N: ./data/tracks/mines/track.xml
_("Old Mine")
//I18N: ./data/tracks/snowtuxpeak/track.xml
_("Snow Peak")
//I18N: ./data/tracks/islandtrack/track.xml
_("The Island")
//I18N: ./data/tracks/xr591/track.xml
_("XR591")
//I18N: ./data/tracks/mansion/track.xml
_("Blackhill Mansion")
//I18N: ./data/tracks/startrack/track.xml
_("Star Track")
//I18N: ./data/tracks/sandtrack/track.xml
_("Shifting Sands")
//I18N: ./data/tracks/stadium/track.xml
_("The Stadium")
//I18N: ./data/tracks/farm/track.xml
_("Bovine Barnyard")
//I18N: ./data/tracks/soccer_field/track.xml
_("Soccer field")
//I18N: ./data/tracks/fortmagma/track.xml
_("Fort Magma")
//I18N: ./data/tracks/scotland/track.xml
_("Scotland")
//I18N: ./data/tracks/greenvalley/track.xml
_("Green Valley")
//I18N: ./data/tracks/zengarden/track.xml
_("Zen Garden")
//I18N: Cutscene subtitle from ./data/tracks/introcutscene2/scene.xml
_("What's wrong, little hippies? Your great gnu leader is missing?")
//I18N: ./data/tracks/introcutscene2/scene.xml
_("What's wrong, little hippies? Your great gnu leader is missing?")
//I18N: Cutscene subtitle from ./data/tracks/introcutscene2/scene.xml
_("Oh yes, see, he's in my castle now and will be served for supper...")
//I18N: ./data/tracks/introcutscene2/scene.xml
_("Oh yes, see, he's in my castle now and will be served for supper...")
//I18N: Cutscene subtitle from ./data/tracks/introcutscene2/scene.xml
_("But I'm a fair creature, so I'll make you a deal.")
//I18N: ./data/tracks/introcutscene2/scene.xml
_("But I'm a fair creature, so I'll make you a deal.")
//I18N: Cutscene subtitle from ./data/tracks/introcutscene2/scene.xml
_("If you can beat me at racing, I will free the old codger.")
//I18N: ./data/tracks/introcutscene2/scene.xml
_("If you can beat me at racing, I will free the old codger.")
//I18N: Cutscene subtitle from ./data/tracks/introcutscene2/scene.xml
_(" But you pathetic little twerps will never be able to beat me - King of the Karts!")
//I18N: ./data/tracks/introcutscene2/scene.xml
_(" But you pathetic little twerps will never be able to beat me - King of the Karts!")
//I18N: ./data/grandprix/4_atworldsend.grandprix
_("At World's End")
//I18N: ./data/grandprix/2_offthebeatentrack.grandprix
_("Off the beaten track")
//I18N: ./data/grandprix/1_penguinplayground.grandprix
_("Penguin Playground")
//I18N: ./data/grandprix/3_tothemoonandback.grandprix
_("To the moon and back")
//I18N: ./data/gui/track_info_dialog.stkgui
_("= Highscores =")
//I18N: ./data/gui/track_info_dialog.stkgui
_("(Empty)")
//I18N: ./data/gui/track_info_dialog.stkgui
_("(Empty)")
//I18N: ./data/gui/track_info_dialog.stkgui
_("(Empty)")
//I18N: ./data/gui/track_info_dialog.stkgui
//I18N: Drive the track reverse
_("Reverse");
//I18N: ./data/gui/track_info_dialog.stkgui
//I18N: In the track setup screen (number of laps choice, where %i is the number)
_("%i laps");
//I18N: ./data/gui/track_info_dialog.stkgui
_("Start Race")
//I18N: ./data/gui/help2.stkgui
_("SuperTuxKart Help")
//I18N: ./data/gui/help2.stkgui
//I18N: Tab in help menu
_("General");
//I18N: ./data/gui/help2.stkgui
//I18N: Tab in help menu
_("Weapons");
//I18N: ./data/gui/help2.stkgui
//I18N: Tab in help menu
_("Game Modes");
//I18N: ./data/gui/help2.stkgui
//I18N: Tab in help menu
_("Multi­player");
//I18N: ./data/gui/help2.stkgui
//I18N: In the help menu
_("To help you win, there are some powerups you can collect :");
//I18N: ./data/gui/help2.stkgui
_("BubbleGum - leave a sticky pink puddle behind you.")
//I18N: ./data/gui/help2.stkgui
_("Cake - thrown at the closest rival, best on short ranges and long straights.")
//I18N: ./data/gui/help2.stkgui
_("Plunger - throw straight to pull an opponent back, or throw while looking back to make one lose sight.")
//I18N: ./data/gui/help2.stkgui
_("Bowling Ball - bounces off walls. If you are looking back, it will be thrown backwards.")
//I18N: ./data/gui/help2.stkgui
_("Parachute - slows down all karts in a better position.")
//I18N: ./data/gui/help2.stkgui
_("Anchor - slows down greatly the kart in the first position.")
//I18N: ./data/gui/help2.stkgui
_("Swapper - gift boxes are transformed into bananas and vice versa for a short time.")
//I18N: ./data/gui/help2.stkgui
_("Basket Ball - bounces after the leader, and might squash and slow down karts down on the way.")
//I18N: ./data/gui/help2.stkgui
_("Swatter - will squash karts close by, slowing them down.")
//I18N: ./data/gui/select_challenge.stkgui
_("Race Setup")
//I18N: ./data/gui/select_challenge.stkgui
//I18N: Type of race, in a challenge
_("Type :");
//I18N: ./data/gui/select_challenge.stkgui
//I18N: Difficulty
_("Novice");
//I18N: ./data/gui/select_challenge.stkgui
//I18N: Difficulty
_("Intermediate");
//I18N: ./data/gui/select_challenge.stkgui
//I18N: Difficulty
_("Expert");
//I18N: ./data/gui/confirm_dialog.stkgui
//I18N: In a 'are you sure?' dialog
_("Yes");
//I18N: ./data/gui/confirm_dialog.stkgui
//I18N: In a 'are you sure?' dialog
_("Cancel");
//I18N: ./data/gui/tutorial_message_dialog.stkgui
//I18N: Button in tutorial
_("Continue");
//I18N: ./data/gui/custom_video_settings.stkgui
_("Graphics Settings")
//I18N: ./data/gui/custom_video_settings.stkgui
//I18N: Video settings
_("Animated Scenery");
//I18N: ./data/gui/custom_video_settings.stkgui
//I18N: Video settings
_("Weather Effects");
//I18N: ./data/gui/custom_video_settings.stkgui
//I18N: Video settings
_("Animated Characters");
//I18N: ./data/gui/custom_video_settings.stkgui
//I18N: Video settings
_("Texture filtering");
//I18N: ./data/gui/custom_video_settings.stkgui
//I18N: Video settings
_("Anti-aliasing (requires restart)");
//I18N: ./data/gui/custom_video_settings.stkgui
//I18N: Video settings
_("Post-processing (motion blur)");
//I18N: ./data/gui/custom_video_settings.stkgui
//I18N: Video settings
_("Pixel Shaders");
//I18N: ./data/gui/custom_video_settings.stkgui
_("Close")
//I18N: ./data/gui/story_mode_lobby.stkgui
_("Select a Player")
//I18N: ./data/gui/story_mode_lobby.stkgui
_("Remember me")
//I18N: ./data/gui/story_mode_lobby.stkgui
//I18N: In story mode 'select a game slot' menu
_("Create a new player");
//I18N: ./data/gui/racesetup.stkgui
_("Race Setup")
//I18N: ./data/gui/racesetup.stkgui
//I18N: In race setup menu
_("Number of AI karts");
//I18N: ./data/gui/racesetup.stkgui
//I18N: Difficulty
_("Novice");
//I18N: ./data/gui/racesetup.stkgui
//I18N: Difficulty
_("Intermediate");
//I18N: ./data/gui/racesetup.stkgui
//I18N: Difficulty
_("Expert");
//I18N: ./data/gui/racesetup.stkgui
//I18N: Difficulty
_("Iron man");
//I18N: ./data/gui/racesetup.stkgui
_("Select a game mode")
//I18N: ./data/gui/help4.stkgui
_("SuperTuxKart Help")
//I18N: ./data/gui/help4.stkgui
//I18N: Tab in help menu
_("General");
//I18N: ./data/gui/help4.stkgui
//I18N: Tab in help menu
_("Weapons");
//I18N: ./data/gui/help4.stkgui
//I18N: Tab in help menu
_("Game Modes");
//I18N: ./data/gui/help4.stkgui
//I18N: Tab in help menu
_("Multi­player");
//I18N: ./data/gui/help4.stkgui
_("SuperTuxKart can be played in multiplayer mode on the same computer")
//I18N: ./data/gui/help4.stkgui
_("(network play is not yet available)")
//I18N: ./data/gui/help4.stkgui
//I18N: In the help menu
_("First, you will need several input devices (having multiple gamepads or joysticks is the best way to play with several people). Go in the input configuration screen and setup the gamepads. It is also possible to play on keyboard(s), however each player will need a different set of keys, and keep in mind that most keyboards are not appropriate for multiplayer gameplay because they do not support large number of keypresses.");
//I18N: ./data/gui/help4.stkgui
//I18N: In the help menu
_("When input devices are configured, you are ready to play. Select the 'multiplayer race' icon in the main menu. When it is time to choose a kart, each player can press on the 'fire' key of their gamepad or keyboard to join the game. Each player can use their input device to select their kart. The game continues when everyone selected their kart. Note that the mouse may not be used for this operation.");
//I18N: ./data/gui/challenges.stkgui
//I18N: Title for challenges screen
_("Challenges : Trophy Room");
//I18N: ./data/gui/tutorial.stkgui
//I18N: Title for tutorials screen
_("Tutorial : Selection Room");
//I18N: ./data/gui/tutorial.stkgui
_("Play all")
//I18N: ./data/gui/options_audio.stkgui
_("SuperTuxKart Options")
//I18N: ./data/gui/options_audio.stkgui
//I18N: Section in the settings menu
_("Audio");
//I18N: ./data/gui/options_audio.stkgui
//I18N: Section in the audio/video settings submenu
_("Music");
//I18N: ./data/gui/options_audio.stkgui
//I18N: Next to checkbox in settings menu
_("Enabled");
//I18N: ./data/gui/options_audio.stkgui
//I18N: Music volume in options
_("Volume");
//I18N: ./data/gui/options_audio.stkgui
//I18N: Section in audio/video settings submenu
_("Sound Effects");
//I18N: ./data/gui/options_audio.stkgui
//I18N: Next to checkbox in settings menu
_("Enabled");
//I18N: ./data/gui/options_audio.stkgui
//I18N: Sound volume in options
_("Volume");
//I18N: ./data/gui/options_video.stkgui
_("SuperTuxKart Options")
//I18N: ./data/gui/options_video.stkgui
//I18N: Section in the settings menu
_("Graphics");
//I18N: ./data/gui/options_video.stkgui
//I18N: In the graphics settings
_("Graphical Effects Level");
//I18N: ./data/gui/options_video.stkgui
//I18N: In the video settings
_("Custom settings...");
//I18N: ./data/gui/options_video.stkgui
//I18N: In the video settings
_("Vertical Sync (requires restart)");
//I18N: ./data/gui/options_video.stkgui
//I18N: In the video settings
_("Use Frame Buffer Objects (requires restart)");
//I18N: ./data/gui/options_video.stkgui
//I18N: In the graphics settings
_("Resolution");
//I18N: ./data/gui/options_video.stkgui
//I18N: In the video settings
_("Fullscreen");
//I18N: ./data/gui/options_video.stkgui
//I18N: In the video settings
_("Remember window location");
//I18N: ./data/gui/options_video.stkgui
//I18N: In the video settings menu
_("Apply new resolution");
//I18N: ./data/gui/soccer_setup.stkgui
_("Race Setup")
//I18N: ./data/gui/soccer_setup.stkgui
//I18N: In soccer setup menu
_("Number of goals to win");
//I18N: ./data/gui/soccer_setup.stkgui
//I18N: In soccer setup menu
_("Use left/right to choose your team");
//I18N: ./data/gui/soccer_setup.stkgui
_("VS")
//I18N: ./data/gui/soccer_setup.stkgui
//I18N: In soccer setup screen
_("Continue");
//I18N: ./data/gui/karts.stkgui
//I18N: In the kart selection (player setup) screen
_("Choose a Kart");
//I18N: ./data/gui/options_device.stkgui
_("SuperTuxKart Options")
//I18N: ./data/gui/options_device.stkgui
//I18N: Section in the settings menu
_("Controls");
//I18N: ./data/gui/options_device.stkgui
//I18N: To delete a keyboard configuration
_("Delete Configuration");
//I18N: ./data/gui/options_device.stkgui
//I18N: In the input configuration screen
_("Back to device list");
//I18N: ./data/gui/help3.stkgui
_("SuperTuxKart Help")
//I18N: ./data/gui/help3.stkgui
//I18N: Tab in help menu
_("General");
//I18N: ./data/gui/help3.stkgui
//I18N: Tab in help menu
_("Weapons");
//I18N: ./data/gui/help3.stkgui
//I18N: Tab in help menu
_("Game Modes");
//I18N: ./data/gui/help3.stkgui
//I18N: Tab in help menu
_("Multi­player");
//I18N: ./data/gui/help3.stkgui
_("SuperTuxKart features several game modes")
//I18N: ./data/gui/help3.stkgui
//I18N: In the help menu
_("Regular Race: all blows allowed, so catch weapons and make clever use of them!");
//I18N: ./data/gui/help3.stkgui
//I18N: In the help menu
_("Time Trial: Contains no powerups, so only your driving skills matter!");
//I18N: ./data/gui/help3.stkgui
//I18N: In the help menu
_("Follow the leader: run for second place, as the last kart will be disqualified every time the counter hits zero. Beware : going in front of the leader will get you eliminated too!");
//I18N: ./data/gui/help3.stkgui
//I18N: In the help menu
_("3 Strikes Battle: only in multiplayer games. Hit others with weapons until they lose all their lives.");
//I18N: ./data/gui/help3.stkgui
//I18N: In the help menu
_("* Most of these game modes can also be played in a Grand Prix fashion: instead of playing a single race, you play many in a row. The better you rank, the more points you get. In the end, the player with the most points wins the cup.");
//I18N: ./data/gui/confirm_resolution_dialog.stkgui
//I18N: In the 'confirm resolution' dialog, that's shown when switching resoluton
_("Keep this resolution");
//I18N: ./data/gui/confirm_resolution_dialog.stkgui
//I18N: In the 'confirm resolution' dialog, that's shown when switching resoluton
_("Cancel");
//I18N: ./data/gui/credits.stkgui
//I18N: Title in credits screen
_("Credits");
//I18N: ./data/gui/options_players.stkgui
_("SuperTuxKart Options")
//I18N: ./data/gui/options_players.stkgui
//I18N: Section in the settings menu
_("Players");
//I18N: ./data/gui/options_players.stkgui
_("You are playing as")
//I18N: ./data/gui/options_players.stkgui
//I18N: In players configuration menu
_("Press enter or double-click on a player to edit him/her");
//I18N: ./data/gui/options_players.stkgui
//I18N: In players configuration menu
_("Add Player");
//I18N: ./data/gui/overworld_dialog.stkgui
_("Paused")
//I18N: ./data/gui/overworld_dialog.stkgui
//I18N: Race paused button
_("Back to Game");
//I18N: ./data/gui/overworld_dialog.stkgui
//I18N: Race paused button
_("Select kart");
//I18N: ./data/gui/overworld_dialog.stkgui
//I18N: Race paused button
_("Options");
//I18N: ./data/gui/overworld_dialog.stkgui
//I18N: Race paused button
_("Help");
//I18N: ./data/gui/overworld_dialog.stkgui
//I18N: Race paused button
_("Back to menu");
//I18N: ./data/gui/story_mode_new.stkgui
_("New Game")
//I18N: ./data/gui/story_mode_new.stkgui
//I18N: In the new story mode game dialog
_("Select your identity");
//I18N: ./data/gui/story_mode_new.stkgui
//I18N: Difficulty
_("Novice");
//I18N: ./data/gui/story_mode_new.stkgui
//I18N: Difficulty
_("Intermediate");
//I18N: ./data/gui/story_mode_new.stkgui
//I18N: Difficulty
_("Expert");
//I18N: ./data/gui/story_mode_new.stkgui
_("Start Game")
//I18N: ./data/gui/story_mode_new.stkgui
_("Cancel")
//I18N: ./data/gui/enter_player_name_dialog.stkgui
//I18N: In the 'add new player' dialog
_("Enter the new player's name");
//I18N: ./data/gui/enter_player_name_dialog.stkgui
//I18N: When configuring input
_("Press ESC to cancel");
//I18N: ./data/gui/options_input.stkgui
_("SuperTuxKart Options")
//I18N: ./data/gui/options_input.stkgui
//I18N: Section in the settings menu
_("Controls");
//I18N: ./data/gui/options_input.stkgui
//I18N: In key bindings configuration menu
_("Press enter or double-click on a device to configure it");
//I18N: ./data/gui/options_input.stkgui
//I18N: In the input configuration screen
_("Add a device");
//I18N: ./data/gui/options_input.stkgui
_("* Which config to use will be inferred from which 'fire' key is pressed to join the game.")
//I18N: ./data/gui/grand_prix_win.stkgui
_("Continue")
//I18N: ./data/gui/addons_screen.stkgui
_("SuperTuxKart Addons")
//I18N: ./data/gui/addons_screen.stkgui
//I18N: Reload button to reload addon data
_("Reload");
//I18N: ./data/gui/addons_screen.stkgui
//I18N: Section in the addons menu
_("Karts");
//I18N: ./data/gui/addons_screen.stkgui
//I18N: Section in the addons menu
_("Tracks");
//I18N: ./data/gui/addons_screen.stkgui
//I18N: Section in the addons menu
_("Arenas");
//I18N: ./data/gui/feature_unlocked.stkgui
_("Continue")
//I18N: ./data/gui/race_paused_dialog.stkgui
_("Paused")
//I18N: ./data/gui/race_paused_dialog.stkgui
//I18N: Race paused button
_("Back to Race");
//I18N: ./data/gui/race_paused_dialog.stkgui
//I18N: Race paused button
_("Setup New Race");
//I18N: ./data/gui/race_paused_dialog.stkgui
//I18N: Race paused button
_("Restart Race");
//I18N: ./data/gui/race_paused_dialog.stkgui
//I18N: Race paused button
_("Give Up Race");
//I18N: ./data/gui/race_paused_dialog.stkgui
//I18N: Race paused button
_("Options");
//I18N: ./data/gui/race_paused_dialog.stkgui
//I18N: Race paused button
_("Help");
//I18N: ./data/gui/race_paused_dialog.stkgui
//I18N: Race paused button
_("Exit Race");
//I18N: ./data/gui/grand_prix_lose.stkgui
_("Continue")
//I18N: ./data/gui/options_ui.stkgui
_("SuperTuxKart Options")
//I18N: ./data/gui/options_ui.stkgui
//I18N: Section in the settings menu
_("User Interface");
//I18N: ./data/gui/options_ui.stkgui
//I18N: In the graphics settings
_("Skin");
//I18N: ./data/gui/options_ui.stkgui
//I18N: In the ui settings
_("Display FPS");
//I18N: ./data/gui/options_ui.stkgui
//I18N: In the ui settings
_("Allow STK to connect to the Internet");
//I18N: ./data/gui/options_ui.stkgui
//I18N: In the ui settings
_("Minimal Race GUI");
//I18N: ./data/gui/main.stkgui
//I18N: Main menu button
_("Story Mode");
//I18N: ./data/gui/main.stkgui
//I18N: Main menu button
_("Single-player");
//I18N: ./data/gui/main.stkgui
//I18N: Main menu button
_("Multiplayer");
//I18N: ./data/gui/main.stkgui
//I18N: Main menu button
_("Addons");
//I18N: ./data/gui/main.stkgui
//I18N: Main menu button
_("Options");
//I18N: ./data/gui/main.stkgui
//I18N: Main menu button
_("Help");
//I18N: ./data/gui/main.stkgui
//I18N: Main menu button
_("Tutorial");
//I18N: ./data/gui/main.stkgui
//I18N: Main menu button
_("About");
//I18N: ./data/gui/main.stkgui
//I18N: Main menu button
_("Quit");
//I18N: ./data/gui/press_a_key_dialog.stkgui
_("Press a key")
//I18N: ./data/gui/press_a_key_dialog.stkgui
//I18N: When configuring input
_("Assign to ESC key");
//I18N: ./data/gui/press_a_key_dialog.stkgui
//I18N: When configuring input
_("Press ESC to cancel");
//I18N: ./data/gui/tracks.stkgui
//I18N: Section in track selection screen
_("Grand Prix");
//I18N: ./data/gui/tracks.stkgui
//I18N: Section in track selection screen
_("All Tracks");
//I18N: ./data/gui/help1.stkgui
_("SuperTuxKart Help")
//I18N: ./data/gui/help1.stkgui
//I18N: Tab in help menu
_("General");
//I18N: ./data/gui/help1.stkgui
//I18N: Tab in help menu
_("Weapons");
//I18N: ./data/gui/help1.stkgui
//I18N: Tab in help menu
_("Game Modes");
//I18N: ./data/gui/help1.stkgui
//I18N: Tab in help menu
_("Multi­player");
//I18N: ./data/gui/help1.stkgui
_("Click here to play the tutorial")
//I18N: ./data/gui/help1.stkgui
//I18N: In the help menu
_("Collect blue boxes : they will give you weapons or other powerups");
//I18N: ./data/gui/help1.stkgui
//I18N: In the help menu
_("Avoid bananas!");
//I18N: ./data/gui/help1.stkgui
//I18N: In the help menu
_("Collecting nitro allows you to get speed boosts whenever you wish by pressing the appropriate key. You can see your current level of nitro in the bar at the right of the game screen.");
//I18N: ./data/gui/help1.stkgui
//I18N: In the help menu
_("If you see a button with a lock like this one, you need to complete a challenge to unlock it.");
//I18N: ./data/gui/help1.stkgui
//I18N: in the help menu
_("The 'skidding' key allows you to skid in sharp turns and get a boost.");
//I18N: ./data/gui/help1.stkgui
//I18N: in the help screen
_("* Current key bindings can be seen/changed in menu Options");
//I18N: ./data/gui/addons_loading.stkgui
//I18N: Add-on screen action
_("Install");
//I18N: ./data/gui/addons_loading.stkgui
//I18N: Add-on screen action
_("Uninstall");
//I18N: ./data/gui/addons_loading.stkgui
//I18N: Add-ons screen action
_("Back");
//I18N: ./data/gui/arenas.stkgui
//I18N: Section in arena tracks selection screen
_("Arenas");
//I18N: ./data/gui/arenas.stkgui
//I18N: track group
_("Standard");
//I18N: ./data/gui/arenas.stkgui
//I18N: track group
_("Add-Ons");
//I18N: ./data/gui/arenas.stkgui
//I18N: track group
_("All");
//I18N: ./data/grandprix/4_atworldsend.grandprix
_("At World's End")
//I18N: ./data/grandprix/2_offthebeatentrack.grandprix
_("Off the beaten track")
//I18N: ./data/grandprix/1_penguinplayground.grandprix
_("Penguin Playground")
//I18N: ./data/grandprix/3_tothemoonandback.grandprix
_("To the moon and back")
//I18N: ./data/karts/beagle/kart.xml
_("Beagle")
//I18N: ./data/karts/hexley/kart.xml
_("Hexley")
//I18N: ./data/karts/nolok/kart.xml
_("Nolok")
//I18N: ./data/karts/beastie/kart.xml
_("Beastie")
//I18N: ./data/karts/puffy/kart.xml
_("Puffy")
//I18N: ./data/karts/mozilla/kart.xml
_("Mozilla")
//I18N: ./data/karts/gnu/kart.xml
_("Gnu")
//I18N: ./data/karts/konqi/kart.xml
_("Konqi")
//I18N: ./data/karts/adiumy/kart.xml
_("Adiumy")
//I18N: ./data/karts/pidgin/kart.xml
_("Pidgin")
//I18N: ./data/karts/emule/kart.xml
_("Emule")
//I18N: ./data/karts/wilber/kart.xml
_("Wilber")
//I18N: ./data/karts/tux/kart.xml
_("Tux")
//I18N: ./data/karts/elephpant/kart.xml
_("Elephpant")
//I18N: ./data/karts/suzanne/kart.xml
_("Suzanne")

View File

@ -3,5 +3,5 @@
pkgdatadir = $(datadir)/games/@PACKAGE@/data/shaders
dist_pkgdata_DATA = $(shell find $(srcdir) -name "*.frag") \
$(shell find $(srcdir) -name "*.vert")
$(shell find $(srcdir) -name "*.vert")

View File

@ -7,7 +7,7 @@ void main()
{
gl_TexCoord[0] = gl_MultiTexCoord0;
gl_Position = ftransform();
float delta_x = cos(time*3.0) * sin( 4.0 * gl_TexCoord[0].st.s * 6.28318531 );
float delta_y = cos(time*2.0) * sin( 3.0 * gl_TexCoord[0].st.t * 6.28318531 );

View File

@ -9,7 +9,7 @@ void main()
{
vec4 color = texture2D(tex, gl_TexCoord[0].st);
vec4 solidColor = vec4(color.r, color.g, color.b, 1);
if (fog == 1)
{
if (coord.z > fogTo)

View File

@ -15,7 +15,7 @@ uniform vec2 center;
// The direction to which the blurring aims at
uniform vec2 direction;
// Radius of mask around the character in which no blurring happens
// Radius of mask around the character in which no blurring happens
// so that the kart doesn't get blurred.
uniform float mask_radius;
@ -28,10 +28,10 @@ uniform float max_tex_height;
void main()
{
vec2 texcoords = gl_TexCoord[0].st;
// Sample the color buffer
vec3 color = texture2D(color_buffer, texcoords).rgb;
// If no motion blur is needed, don't do any of the blur computation,
// just return the color from the texture.
if(boost_amount==0.0)
@ -39,25 +39,25 @@ void main()
gl_FragColor = vec4(color, 1.0);
return;
}
// Compute the blur direction.
// IMPORTANT: we don't normalize it so that it avoids a glitch around 'center',
// plus it naturally scales the motion blur in a cool way :)
vec2 blur_dir = direction - texcoords;
// Compute the blurring factor:
// - apply the mask, i.e. no blurring in a small circle around the kart
float blur_factor = max(0.0, length(texcoords - center) - mask_radius);
// - avoid blurring the top of the screen
blur_factor *= (max_tex_height - texcoords.t);
// - apply the boost amount
blur_factor *= boost_amount;
// Scale the blur direction
blur_dir *= blur_factor;
// Compute the blur
vec2 inc_vec = blur_dir / vec2(NB_SAMPLES);
vec2 blur_texcoords = texcoords + inc_vec;

View File

@ -1,11 +1,11 @@
// Shader based on work by Fabien Sanglard
// Released under the terms of CC-BY 3.0
uniform sampler2D BumpTex; //The bump-map
uniform sampler2D BumpTex; //The bump-map
uniform sampler2D DecalTex; //The texture
uniform sampler2D LightMapTex;
int HasLightMap;
// New bumpmapping
varying vec3 lightVec;
varying vec3 halfVec;
@ -17,11 +17,11 @@ void main()
// lookup normal from normal map, move from [0,1] to [-1, 1] range, normalize
vec3 normal = 2.0 * texture2D (BumpTex, gl_TexCoord[0].st).rgb - 1.0;
normal = normalize (normal);
// compute diffuse lighting
float lamberFactor = max (dot (lightVec, normal), 0.0) ;
vec4 diffuseMaterial;
diffuseMaterial = texture2D (DecalTex, gl_TexCoord[0].st);
if (HasLightMap < 1)
@ -33,4 +33,4 @@ void main()
{
gl_FragColor = diffuseMaterial * (0.5 + lamberFactor*0.5) * texture2D(LightMapTex, gl_TexCoord[0].st);
}
}
}

View File

@ -11,34 +11,34 @@ void main()
{
gl_TexCoord[0] = gl_MultiTexCoord0;
// Building the matrix Eye Space -> Tangent Space
vec3 n = normalize (gl_NormalMatrix * gl_Normal);
vec3 t = normalize (gl_NormalMatrix * gl_MultiTexCoord1.xyz); // tangent
vec3 b = cross (n, t);
vec3 vertexPosition = vec3(gl_ModelViewMatrix * gl_Vertex);
// transform light and half angle vectors by tangent basis
vec3 v;
v.x = dot (lightdir, t);
v.y = dot (lightdir, b);
v.z = dot (lightdir, n);
lightVec = normalize (v);
v.x = dot (vertexPosition, t);
v.y = dot (vertexPosition, b);
v.z = dot (vertexPosition, n);
eyeVec = normalize (v);
vertexPosition = normalize(vertexPosition);
// Normalize the halfVector to pass it to the fragment shader
// No need to divide by two, the result is normalized anyway.
// vec3 halfVector = normalize((vertexPosition + lightDir) / 2.0);
// vec3 halfVector = normalize((vertexPosition + lightDir) / 2.0);
vec3 halfVector = normalize(vertexPosition + lightdir);
v.x = dot (halfVector, t);
v.y = dot (halfVector, b);
@ -46,9 +46,9 @@ void main()
// No need to normalize, t,b,n and halfVector are normal vectors.
//normalize (v);
halfVec = v ;
halfVec = v ;
gl_Position = ftransform();
}

View File

@ -5,7 +5,7 @@
uniform mat4 JointTransform[MAX_JOINT_NUM];
void main()
void main()
{
int index;
vec4 ecPos;
@ -15,10 +15,10 @@ void main()
float dist;
mat4 ModelTransform = gl_ModelViewProjectionMatrix;
index = int(gl_Color.r * 255.99);
mat4 vertTran = JointTransform[index - 1];
index = int(gl_Color.g * 255.99);
if(index > 0)
vertTran += JointTransform[index - 1];
@ -26,15 +26,16 @@ void main()
index = int(gl_Color.b * 255.99);
if(index > 0)
vertTran += JointTransform[index - 1];
index = int(gl_Color.a * 255.99);
if(index > 0)
vertTran += JointTransform[index - 1];
ecPos = gl_ModelViewMatrix * vertTran * gl_Vertex;
normal = normalize(gl_NormalMatrix * mat3(vertTran) * gl_Normal);
normal = (vertTran * vec4(gl_Normal, 0.0)).xyz;
normal = normalize(gl_NormalMatrix * normal);
gl_FrontColor = vec4(0,0,0,0);
for(int i = 0;i < MAX_LIGHT_NUM;i++)
{
@ -45,15 +46,15 @@ void main()
gl_FrontColor += gl_LightSource[i].diffuse * n_dot_l;
}
gl_FrontColor = clamp(gl_FrontColor,0.3,1.0);
ModelTransform *= vertTran;
gl_Position = ModelTransform * gl_Vertex;
gl_TexCoord[0] = gl_MultiTexCoord0;
gl_TexCoord[1] = gl_MultiTexCoord1;
/*
/*
// Reflections.
vec3 r = reflect( ecPos.xyz , normal );
float m = 2.0 * sqrt( r.x*r.x + r.y*r.y + (r.z+1.0)*(r.z+1.0) );

View File

@ -10,26 +10,26 @@ varying vec3 lightVec;
void main()
{
vec3 forward = vec3(0.0, 0.0, 1.0);
// get the angle between the forward vector and the horizontal portion of the normal
vec3 normal_x = normalize(vec3(normal.x, 0.0, normal.z));
float sin_theta_x = length(cross( forward, normal_x )) * normal.x/abs(normal.x);
// get the angle between the forward vector and the vertical portion of the normal
vec3 normal_y = normalize(vec3(0.0, normal.y, normal.z));
float sin_theta_y = length(cross( forward, normal_y ))* normal.y/abs(normal.y);
vec4 detail0 = texture2D(texture, vec2(0.5 + sin_theta_x*0.5, 0.5 + sin_theta_y*0.5));
gl_FragColor = detail0 * (0.5 + dot(lightdir, normal)) * vertex_color; // 0.5 is the ambient light.
gl_FragColor = detail0 * (0.5 + dot(lightdir, normal)) * vertex_color; // 0.5 is the ambient light.
//gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
// specular (phong)
vec3 R = normalize(reflect(lightVec, normal));
float specular = max(dot(R,eyeVec),0.0);
//gl_FragColor = vec4(specular, specular, specular, 1.0);
if (specular > 0.0)
{
// weak specular
@ -37,7 +37,7 @@ void main()
specular = specular*specular;
float specular_weak = specular*2.0; //max(specular*1.1, 1.0);
gl_FragColor += vec4(specular_weak, specular_weak, specular_weak, 0.0);
/*
// strong specular
specular = specular*specular;

View File

@ -9,19 +9,19 @@ void main()
gl_TexCoord[0] = gl_MultiTexCoord0;
gl_Position = ftransform();
vertex_color = gl_Color;
//vec3 normal3 = normalize(gl_Normal);
//vec4 normal4 = vec4(normal3.x, normal3.y, normal3.z, 0.0)*gl_ModelViewMatrix;
//normal = normal4.xyz;
eyeVec = normalize(-gl_Position).xyz; // we are in Eye Coordinates, so EyePos is (0,0,0)
eyeVec = normalize(-gl_Position).xyz; // we are in Eye Coordinates, so EyePos is (0,0,0)
normal = normalize(gl_NormalMatrix*gl_Normal);
// Building the matrix Eye Space -> Tangent Space
// gl_MultiTexCoord1.xyz
vec3 t = normalize (gl_NormalMatrix * vec3(0.0, 0.0, 1.0)); // tangent
vec3 b = cross (normal, t);
// transform light and half angle vectors by tangent basis
vec3 v;
v.x = dot(lightdir, t);

View File

@ -18,7 +18,7 @@ void main()
vec4 detail2 = texture2D(tex_detail2, gl_TexCoord[0].st);
vec4 detail3 = texture2D(tex_detail3, gl_TexCoord[0].st);
vec4 detail4 = texture2D(tex_detail4, gl_TexCoord[0].st);
gl_FragColor = (splatting.r * detail0 +
splatting.g * detail1 +
splatting.b * detail2 +

View File

@ -9,7 +9,7 @@ void main()
gl_TexCoord[1] = gl_MultiTexCoord1;
gl_Position = ftransform();
vertex_color = gl_Color;
//normal = normalize(gl_NormalMatrix * gl_Normal);
normal = normalize(gl_Normal);
lightdir2 = normalize(lightdir);

View File

@ -17,13 +17,13 @@ void main()
// lookup normal from normal map, move from [0,1] to [-1, 1] range, normalize
vec3 normal = 2.0 * texture2D (BumpTex1, gl_TexCoord[0].st + delta1).rgb - 1.0;
vec3 normal2 = 2.0 * texture2D (BumpTex2, gl_TexCoord[0].st + delta2).rgb - 1.0;
// scale normals
normal.y = 4.0*normal.y;
normal2.y = 4.0*normal2.y;
normal = (normalize(normal) + normalize(normal2))/2.0;
// compute diffuse lighting
float lamberFactor = max (dot (lightVec, normal), 0.0);
vec4 diffuseMaterial;
@ -38,11 +38,11 @@ void main()
//}
gl_FragColor = diffuseMaterial * (0.3 + lamberFactor*0.7);
// specular (phong)
vec3 R = normalize(reflect(lightVec, normal));
float specular = max(dot(R,eyeVec),0.0);
if (specular > 0.0)
{
// weak specular
@ -50,7 +50,7 @@ void main()
specular = specular*specular;
float specular_weak = specular*0.05;
gl_FragColor += vec4(specular_weak, specular_weak, specular_weak, 0.0);
// strong specular
specular = specular*specular;
float specular_strong = specular*0.3;

View File

@ -11,15 +11,15 @@ void main()
{
gl_TexCoord[0] = gl_MultiTexCoord0;
// Building the matrix Eye Space -> Tangent Space
vec3 n = normalize (gl_NormalMatrix * gl_Normal);
// gl_MultiTexCoord1.xyz
vec3 t = normalize (gl_NormalMatrix * vec3(1.0, 0.0, 0.0)); // tangent
vec3 b = cross (n, t);
vec3 vertexPosition = vec3(gl_ModelViewMatrix * gl_Vertex);
// transform light and half angle vectors by tangent basis
vec3 v;
v.x = dot (lightdir, t);
@ -28,13 +28,13 @@ void main()
lightVec = normalize (v);
vertexPosition = normalize(vertexPosition);
eyeVec = normalize(-vertexPosition); // we are in Eye Coordinates, so EyePos is (0,0,0)
eyeVec = normalize(-vertexPosition); // we are in Eye Coordinates, so EyePos is (0,0,0)
// Normalize the halfVector to pass it to the fragment shader
// No need to divide by two, the result is normalized anyway.
// vec3 halfVector = normalize((vertexPosition + lightDir) / 2.0);
// vec3 halfVector = normalize((vertexPosition + lightDir) / 2.0);
vec3 halfVector = normalize(vertexPosition + lightdir);
v.x = dot (halfVector, t);
v.y = dot (halfVector, b);
@ -42,7 +42,7 @@ void main()
// No need to normalize, t,b,n and halfVector are normal vectors.
//normalize (v);
halfVec = v ;
halfVec = v ;
gl_Position = ftransform();
}

View File

@ -22,13 +22,13 @@ void main()
// lookup normal from normal map, move from [0,1] to [-1, 1] range, normalize
vec3 normal = 2.0 * texture2D (BumpTex1, gl_TexCoord[0].st + delta1).rgb - 1.0;
vec3 normal2 = 2.0 * texture2D (BumpTex2, gl_TexCoord[0].st + delta2).rgb - 1.0;
// scale normals
normal.y = 4.0*normal.y;
normal2.y = 4.0*normal2.y;
normal = (normalize(normal) + normalize(normal2))/2.0;
// compute diffuse lighting
float lamberFactor = max (dot (lightVec, normal), 0.0);
vec4 diffuseMaterial;
@ -43,11 +43,11 @@ void main()
//}
gl_FragColor = diffuseMaterial * (0.3 + lamberFactor*0.7);
// specular (phong)
vec3 R = normalize(reflect(lightVec, normal));
float specular = max(dot(R,eyeVec),0.0);
if (specular > 0.0)
{
// weak specular
@ -55,13 +55,13 @@ void main()
specular = specular*specular;
float specular_weak = specular*0.05;
gl_FragColor += vec4(specular_weak, specular_weak, specular_weak, 0.0);
// strong specular
specular = specular*specular;
float specular_strong = specular*0.3;
gl_FragColor += vec4(specular_strong, specular_strong, specular_strong, 0.0);
}
if (coord.z > fogTo)
{
gl_FragColor = fogColor;

View File

@ -11,15 +11,15 @@ void main()
{
gl_TexCoord[0] = gl_MultiTexCoord0;
// Building the matrix Eye Space -> Tangent Space
vec3 n = normalize (gl_NormalMatrix * gl_Normal);
// gl_MultiTexCoord1.xyz
vec3 t = normalize (gl_NormalMatrix * vec3(1.0, 0.0, 0.0)); // tangent
vec3 b = cross (n, t);
vec3 vertexPosition = vec3(gl_ModelViewMatrix * gl_Vertex);
// transform light and half angle vectors by tangent basis
vec3 v;
v.x = dot (lightdir, t);
@ -28,13 +28,13 @@ void main()
lightVec = normalize (v);
vertexPosition = normalize(vertexPosition);
eyeVec = normalize(-vertexPosition); // we are in Eye Coordinates, so EyePos is (0,0,0)
eyeVec = normalize(-vertexPosition); // we are in Eye Coordinates, so EyePos is (0,0,0)
// Normalize the halfVector to pass it to the fragment shader
// No need to divide by two, the result is normalized anyway.
// vec3 halfVector = normalize((vertexPosition + lightDir) / 2.0);
// vec3 halfVector = normalize((vertexPosition + lightDir) / 2.0);
vec3 halfVector = normalize(vertexPosition + lightdir);
v.x = dot (halfVector, t);
v.y = dot (halfVector, b);
@ -42,8 +42,8 @@ void main()
// No need to normalize, t,b,n and halfVector are normal vectors.
//normalize (v);
halfVec = v ;
halfVec = v ;
gl_Position = ftransform();
coord = gl_Position;
}

View File

@ -114,8 +114,8 @@
nolok-bubble-gum, easter egg -->
<switch time="5" items="1 0 4 4 2 5 2 7"/>
<!-- How often bubble gum get driven over before it disappears. -->
<bubble-gum disappear-counter="1"/>
<!-- How often bubblegum get driven over before it disappears. -->
<bubblegum disappear-counter="1"/>
<!-- explosion-impulse-objects is the impulse that pushes physical objects
away if there is an explosion. -->
@ -179,6 +179,14 @@
<nitro engine-force="500" consumption="1" small-container="1" big-container="3"
max-speed-increase="5" duration="1" fade-out-time="2" max="16"/>
<!-- Bubble gum data:
time: How long the bubblegum lasts.
speed-fraction: To what fraction of top-speed the speed is reduced.
torque: To rotate the kart somewhat.
fade-in-time: How quick the slowdown takes effect.
-->
<bubblegum time="1" speed-fraction="0.3" torque="500" fade-in-time="0.01"/>
<!-- time: Time a zipper is active.
force: Additional zipper force.
speed-gain: One time additional speed.
@ -389,6 +397,12 @@
restricted to. -->
<swatter duration="10" distance="3" squash-duration="5"
squash-slowdown="0.5"/>
<!-- Leaning related parameters, i.e. slightly leaning the karts when
driving a fast curve.
max: maximum leaning (i.e. when steering as much as possible at highest
speed), in degrees.
sped: Speed with which the leaning changes (in degree/second). -->
<lean max="8.6" speed="5.0" />
<!-- turn-radius defines the turn radius of the kart at
a given speed. The actual steering angle is dependent on the

View File

@ -105,15 +105,6 @@ source/Irrlicht/COBJMeshWriter.cpp
source/Irrlicht/CGUIScrollBar.cpp
source/Irrlicht/CAttributes.cpp
source/Irrlicht/CTRTextureGouraudAdd.cpp
source/Irrlicht/aesGladman/hmac.cpp
source/Irrlicht/aesGladman/sha1.cpp
source/Irrlicht/aesGladman/sha2.cpp
source/Irrlicht/aesGladman/fileenc.cpp
source/Irrlicht/aesGladman/prng.cpp
source/Irrlicht/aesGladman/aescrypt.cpp
source/Irrlicht/aesGladman/pwd2key.cpp
source/Irrlicht/aesGladman/aeskey.cpp
source/Irrlicht/aesGladman/aestab.cpp
source/Irrlicht/CGUIStaticText.cpp
source/Irrlicht/CSceneNodeAnimatorCollisionResponse.cpp
source/Irrlicht/CGUIFont.cpp
@ -657,27 +648,6 @@ include/IShaderConstantSetCallBack.h
include/ITexture.h
source/Irrlicht/lzma/LzmaDec.c
source/Irrlicht/lzma/Types.h
source/Irrlicht/lzma/LzmaDec.h
source/Irrlicht/bzip2/mk251.c
source/Irrlicht/bzip2/unzcrash.c
source/Irrlicht/bzip2/spewG.c
source/Irrlicht/bzip2/decompress.c
source/Irrlicht/bzip2/bzcompress.c
source/Irrlicht/bzip2/bzlib.c
source/Irrlicht/bzip2/huffman.c
source/Irrlicht/bzip2/bzip2recover.c
source/Irrlicht/bzip2/bzip2.c
source/Irrlicht/bzip2/crctable.c
source/Irrlicht/bzip2/randtable.c
source/Irrlicht/bzip2/blocksort.c
source/Irrlicht/bzip2/bzlib_private.h
source/Irrlicht/bzip2/bzlib.h
source/Irrlicht/zlib/infback.c
source/Irrlicht/zlib/deflate.c
source/Irrlicht/zlib/zutil.c

8
lib/irrlicht/changes.stk Normal file
View File

@ -0,0 +1,8 @@
The following changes have been made:
- config changes in IrrCompileConfig.h
- primary sort by material type
- stencil RTT support
- drawall types
- materialtype override
- skies respect Z
- partial backport to expose setCurrentRendertime in the scene mgr

View File

@ -84,7 +84,10 @@ namespace video
EMF_BLEND_OPERATION = 0x40000,
//! Flag for polygon offset
EMF_POLYGON_OFFSET = 0x80000
EMF_POLYGON_OFFSET = 0x80000,
//! MaterialType override
EMF_MATERIAL_TYPE = 0x100000
};
} // end namespace video

View File

@ -1152,8 +1152,9 @@ namespace scene
/** This can only be invoked between
IVideoDriver::beginScene() and IVideoDriver::endScene(). Please note that
the scene is not only drawn when calling this, but also animated
by existing scene node animators, culling of scene nodes is done, etc. */
virtual void drawAll() = 0;
by existing scene node animators, culling of scene nodes is done, etc.
\param flags Allows you to disable/enable specific render passes by passing bitwise OR combinations of E_SCENE_NODE_RENDER_PASS values*/
virtual void drawAll(u32 flags = 0xFFFFFFFF) = 0;
//! Creates a rotation animator, which rotates the attached scene node around itself.
/** \param rotationSpeed Specifies the speed of the animation in degree per 10 milliseconds.
@ -1638,6 +1639,8 @@ namespace scene
current callbacks manager and restore the default behavior. */
virtual void setLightManager(ILightManager* lightManager) = 0;
virtual void setCurrentRendertime(E_SCENE_NODE_RENDER_PASS pass) =0;
//! Get an instance of a geometry creator.
/** The geometry creator provides some helper methods to create various types of
basic geometry. This can be useful for custom scene nodes. */

View File

@ -192,6 +192,7 @@ namespace video
material.TextureLayer[0].TextureWrapU = Material.TextureLayer[0].TextureWrapU;
material.TextureLayer[0].TextureWrapV = Material.TextureLayer[0].TextureWrapV;
break;
case EMF_MATERIAL_TYPE: material.MaterialType = Material.MaterialType; break;
case EMF_ANTI_ALIASING: material.AntiAliasing = Material.AntiAliasing; break;
case EMF_COLOR_MASK: material.ColorMask = Material.ColorMask; break;
case EMF_COLOR_MATERIAL: material.ColorMaterial = Material.ColorMaterial; break;
@ -435,11 +436,13 @@ namespace video
shares the zbuffer with the screen buffer.
\param name An optional name for the RTT.
\param format The color format of the render target. Floating point formats are supported.
\param useStencil Whether to enable stencil for this RTT. Default false.
\return Pointer to the created texture or 0 if the texture
could not be created. This pointer should not be dropped. See
IReferenceCounted::drop() for more information. */
virtual ITexture* addRenderTargetTexture(const core::dimension2d<u32>& size,
const io::path& name = "rt", const ECOLOR_FORMAT format = ECF_UNKNOWN) =0;
const io::path& name = "rt", const ECOLOR_FORMAT format = ECF_UNKNOWN,
const bool useStencil = false) =0;
//! Removes a texture from the texture cache and deletes it.
/** This method can free a lot of memory!

View File

@ -165,14 +165,14 @@ define out. */
//! Define _IRR_COMPILE_WITH_SOFTWARE_ to compile the Irrlicht engine with software driver
/** If you do not need the software driver, or want to use Burning's Video instead,
comment this define out */
#define _IRR_COMPILE_WITH_SOFTWARE_
//#define _IRR_COMPILE_WITH_SOFTWARE_
#ifdef NO_IRR_COMPILE_WITH_SOFTWARE_
#undef _IRR_COMPILE_WITH_SOFTWARE_
#endif
//! Define _IRR_COMPILE_WITH_BURNINGSVIDEO_ to compile the Irrlicht engine with Burning's video driver
/** If you do not need this software driver, you can comment this define out. */
#define _IRR_COMPILE_WITH_BURNINGSVIDEO_
//#define _IRR_COMPILE_WITH_BURNINGSVIDEO_
#ifdef NO_IRR_COMPILE_WITH_BURNINGSVIDEO_
#undef _IRR_COMPILE_WITH_BURNINGSVIDEO_
#endif
@ -456,27 +456,27 @@ B3D, MS3D or X meshes */
#endif
//! Define _IRR_COMPILE_WITH_IRR_WRITER_ if you want to write static .irrMesh files
#define _IRR_COMPILE_WITH_IRR_WRITER_
//#define _IRR_COMPILE_WITH_IRR_WRITER_
#ifdef NO_IRR_COMPILE_WITH_IRR_WRITER_
#undef _IRR_COMPILE_WITH_IRR_WRITER_
#endif
//! Define _IRR_COMPILE_WITH_COLLADA_WRITER_ if you want to write Collada files
#define _IRR_COMPILE_WITH_COLLADA_WRITER_
//#define _IRR_COMPILE_WITH_COLLADA_WRITER_
#ifdef NO_IRR_COMPILE_WITH_COLLADA_WRITER_
#undef _IRR_COMPILE_WITH_COLLADA_WRITER_
#endif
//! Define _IRR_COMPILE_WITH_STL_WRITER_ if you want to write .stl files
#define _IRR_COMPILE_WITH_STL_WRITER_
//#define _IRR_COMPILE_WITH_STL_WRITER_
#ifdef NO_IRR_COMPILE_WITH_STL_WRITER_
#undef _IRR_COMPILE_WITH_STL_WRITER_
#endif
//! Define _IRR_COMPILE_WITH_OBJ_WRITER_ if you want to write .obj files
#define _IRR_COMPILE_WITH_OBJ_WRITER_
//#define _IRR_COMPILE_WITH_OBJ_WRITER_
#ifdef NO_IRR_COMPILE_WITH_OBJ_WRITER_
#undef _IRR_COMPILE_WITH_OBJ_WRITER_
#endif
//! Define _IRR_COMPILE_WITH_PLY_WRITER_ if you want to write .ply files
#define _IRR_COMPILE_WITH_PLY_WRITER_
//#define _IRR_COMPILE_WITH_PLY_WRITER_
#ifdef NO_IRR_COMPILE_WITH_PLY_WRITER_
#undef _IRR_COMPILE_WITH_PLY_WRITER_
#endif
@ -493,7 +493,7 @@ B3D, MS3D or X meshes */
#undef _IRR_COMPILE_WITH_JPG_LOADER_
#endif
//! Define _IRR_COMPILE_WITH_PCX_LOADER_ if you want to load .pcx files
#define _IRR_COMPILE_WITH_PCX_LOADER_
//#define _IRR_COMPILE_WITH_PCX_LOADER_
#ifdef NO_IRR_COMPILE_WITH_PCX_LOADER_
#undef _IRR_COMPILE_WITH_PCX_LOADER_
#endif
@ -503,12 +503,12 @@ B3D, MS3D or X meshes */
#undef _IRR_COMPILE_WITH_PNG_LOADER_
#endif
//! Define _IRR_COMPILE_WITH_PPM_LOADER_ if you want to load .ppm/.pgm/.pbm files
#define _IRR_COMPILE_WITH_PPM_LOADER_
//#define _IRR_COMPILE_WITH_PPM_LOADER_
#ifdef NO_IRR_COMPILE_WITH_PPM_LOADER_
#undef _IRR_COMPILE_WITH_PPM_LOADER_
#endif
//! Define _IRR_COMPILE_WITH_PSD_LOADER_ if you want to load .psd files
#define _IRR_COMPILE_WITH_PSD_LOADER_
//#define _IRR_COMPILE_WITH_PSD_LOADER_
#ifdef NO_IRR_COMPILE_WITH_PSD_LOADER_
#undef _IRR_COMPILE_WITH_PSD_LOADER_
#endif
@ -544,17 +544,17 @@ B3D, MS3D or X meshes */
#endif
//! Define _IRR_COMPILE_WITH_BMP_WRITER_ if you want to write .bmp files
#define _IRR_COMPILE_WITH_BMP_WRITER_
//#define _IRR_COMPILE_WITH_BMP_WRITER_
#ifdef NO_IRR_COMPILE_WITH_BMP_WRITER_
#undef _IRR_COMPILE_WITH_BMP_WRITER_
#endif
//! Define _IRR_COMPILE_WITH_JPG_WRITER_ if you want to write .jpg files
#define _IRR_COMPILE_WITH_JPG_WRITER_
//#define _IRR_COMPILE_WITH_JPG_WRITER_
#ifdef NO_IRR_COMPILE_WITH_JPG_WRITER_
#undef _IRR_COMPILE_WITH_JPG_WRITER_
#endif
//! Define _IRR_COMPILE_WITH_PCX_WRITER_ if you want to write .pcx files
#define _IRR_COMPILE_WITH_PCX_WRITER_
//#define _IRR_COMPILE_WITH_PCX_WRITER_
#ifdef NO_IRR_COMPILE_WITH_PCX_WRITER_
#undef _IRR_COMPILE_WITH_PCX_WRITER_
#endif
@ -564,17 +564,17 @@ B3D, MS3D or X meshes */
#undef _IRR_COMPILE_WITH_PNG_WRITER_
#endif
//! Define _IRR_COMPILE_WITH_PPM_WRITER_ if you want to write .ppm files
#define _IRR_COMPILE_WITH_PPM_WRITER_
//#define _IRR_COMPILE_WITH_PPM_WRITER_
#ifdef NO_IRR_COMPILE_WITH_PPM_WRITER_
#undef _IRR_COMPILE_WITH_PPM_WRITER_
#endif
//! Define _IRR_COMPILE_WITH_PSD_WRITER_ if you want to write .psd files
#define _IRR_COMPILE_WITH_PSD_WRITER_
//#define _IRR_COMPILE_WITH_PSD_WRITER_
#ifdef NO_IRR_COMPILE_WITH_PSD_WRITER_
#undef _IRR_COMPILE_WITH_PSD_WRITER_
#endif
//! Define _IRR_COMPILE_WITH_TGA_WRITER_ if you want to write .tga files
#define _IRR_COMPILE_WITH_TGA_WRITER_
//#define _IRR_COMPILE_WITH_TGA_WRITER_
#ifdef NO_IRR_COMPILE_WITH_TGA_WRITER_
#undef _IRR_COMPILE_WITH_TGA_WRITER_
#endif
@ -603,7 +603,7 @@ defined. */
#undef _IRR_USE_NON_SYSTEM_ZLIB_
#endif
//! Define _IRR_COMPILE_WITH_ZIP_ENCRYPTION_ if you want to read AES-encrypted ZIP archives
#define _IRR_COMPILE_WITH_ZIP_ENCRYPTION_
//#define _IRR_COMPILE_WITH_ZIP_ENCRYPTION_
#ifdef NO_IRR_COMPILE_WITH_ZIP_ENCRYPTION_
#undef _IRR_COMPILE_WITH_ZIP_ENCRYPTION_
#endif
@ -611,7 +611,7 @@ defined. */
/** bzip2 is superior to the original zip file compression modes, but requires
a certain amount of memory for decompression and adds several files to the
library. */
#define _IRR_COMPILE_WITH_BZIP2_
//#define _IRR_COMPILE_WITH_BZIP2_
#ifdef NO_IRR_COMPILE_WITH_BZIP2_
#undef _IRR_COMPILE_WITH_BZIP2_
#endif
@ -626,7 +626,7 @@ defined. */
//! Define _IRR_COMPILE_WITH_LZMA_ if you want to use LZMA compressed zip files.
/** LZMA is a very efficient compression code, known from 7zip. Irrlicht
currently only supports zip archives, though. */
#define _IRR_COMPILE_WITH_LZMA_
//#define _IRR_COMPILE_WITH_LZMA_
#ifdef NO_IRR_COMPILE_WITH_LZMA_
#undef _IRR_COMPILE_WITH_LZMA_
#endif
@ -638,12 +638,12 @@ currently only supports zip archives, though. */
#undef __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_
#endif
//! Define __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_ if you want to open ID software PAK archives
#define __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_
//#define __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_
#ifdef NO__IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_
#undef __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_
#endif
//! Define __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_ if you want to open Nebula Device NPK archives
#define __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_
//#define __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_
#ifdef NO__IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_
#undef __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_
#endif
@ -653,7 +653,7 @@ currently only supports zip archives, though. */
#undef __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_
#endif
//! Define __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ if you want to open WAD archives
#define __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_
//#define __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_
#ifdef NO__IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_
#undef __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_
#endif

View File

@ -617,6 +617,8 @@ namespace video
return BlendOperation != EBO_NONE;
case EMF_POLYGON_OFFSET:
return PolygonOffsetFactor != 0;
default:
break;
}
return false;

View File

@ -2315,7 +2315,8 @@ s32 CNullDriver::addShaderMaterialFromFiles(const io::path& vertexShaderProgramF
//! Creates a render target texture.
ITexture* CNullDriver::addRenderTargetTexture(const core::dimension2d<u32>& size,
const io::path&name, const ECOLOR_FORMAT format)
const io::path&name, const ECOLOR_FORMAT format,
const bool useStencil)
{
return 0;
}

View File

@ -315,7 +315,8 @@ namespace video
//! Creates a render target texture.
virtual ITexture* addRenderTargetTexture(const core::dimension2d<u32>& size,
const io::path& name, const ECOLOR_FORMAT format = ECF_UNKNOWN);
const io::path& name, const ECOLOR_FORMAT format = ECF_UNKNOWN,
const bool useStencil = false);
//! Creates an 1bit alpha channel of the texture based of an color key.
virtual void makeColorKeyTexture(video::ITexture* texture, video::SColor color, bool zeroTexels) const;

View File

@ -8,7 +8,6 @@
#ifdef _IRR_COMPILE_WITH_OPENGL_
#include "COpenGLTexture.h"
#include "COpenGLMaterialRenderer.h"
#include "COpenGLShaderMaterialRenderer.h"
#include "COpenGLSLMaterialRenderer.h"
@ -3994,7 +3993,8 @@ IVideoDriver* COpenGLDriver::getVideoDriver()
ITexture* COpenGLDriver::addRenderTargetTexture(const core::dimension2d<u32>& size,
const io::path& name,
const ECOLOR_FORMAT format)
const ECOLOR_FORMAT format,
const bool useStencil)
{
//disable mip-mapping
bool generateMipLevels = getTextureCreationFlag(ETCF_CREATE_MIP_MAPS);
@ -4010,7 +4010,7 @@ ITexture* COpenGLDriver::addRenderTargetTexture(const core::dimension2d<u32>& si
{
bool success = false;
addTexture(rtt);
ITexture* tex = createDepthTexture(rtt);
ITexture* tex = createDepthTexture(rtt, useStencil);
if (tex)
{
success = static_cast<video::COpenGLFBODepthTexture*>(tex)->attach(rtt);
@ -4566,7 +4566,7 @@ IImage* COpenGLDriver::createScreenShot(video::ECOLOR_FORMAT format, video::E_RE
//! get depth texture for the given render target texture
ITexture* COpenGLDriver::createDepthTexture(ITexture* texture, bool shared)
ITexture* COpenGLDriver::createDepthTexture(ITexture* texture, const bool useStencil, const bool shared)
{
if ((texture->getDriverType() != EDT_OPENGL) || (!texture->isRenderTarget()))
return 0;
@ -4579,16 +4579,17 @@ ITexture* COpenGLDriver::createDepthTexture(ITexture* texture, bool shared)
{
for (u32 i=0; i<DepthTextures.size(); ++i)
{
if (DepthTextures[i]->getSize()==texture->getSize())
if (DepthTextures[i]->getSize()==texture->getSize() &&
useStencil == DepthTextures[i]->hasStencil())
{
DepthTextures[i]->grab();
return DepthTextures[i];
}
}
DepthTextures.push_back(new COpenGLFBODepthTexture(texture->getSize(), "depth1", this));
DepthTextures.push_back(new COpenGLFBODepthTexture(texture->getSize(), "depth1", this, useStencil));
return DepthTextures.getLast();
}
return (new COpenGLFBODepthTexture(texture->getSize(), "depth1", this));
return (new COpenGLFBODepthTexture(texture->getSize(), "depth1", this, useStencil));
}

View File

@ -23,6 +23,7 @@ namespace irr
#include "IMaterialRendererServices.h"
// also includes the OpenGL stuff
#include "COpenGLExtensionHandler.h"
#include "COpenGLTexture.h"
#ifdef _IRR_COMPILE_WITH_CG_
#include "Cg/cg.h"
@ -344,7 +345,8 @@ namespace video
virtual u32 getMaximalPrimitiveCount() const;
virtual ITexture* addRenderTargetTexture(const core::dimension2d<u32>& size,
const io::path& name, const ECOLOR_FORMAT format = ECF_UNKNOWN);
const io::path& name, const ECOLOR_FORMAT format = ECF_UNKNOWN,
const bool useStencil = false);
//! set or reset render target
virtual bool setRenderTarget(video::E_RENDER_TARGET target, bool clearTarget,
@ -390,7 +392,8 @@ namespace video
//! Returns the maximum texture size supported.
virtual core::dimension2du getMaxTextureSize() const;
ITexture* createDepthTexture(ITexture* texture, bool shared=true);
ITexture* createDepthTexture(ITexture* texture, const bool useStencil = false,
const bool shared = true);
void removeDepthTexture(ITexture* texture);
//! Removes a texture from the texture cache and deletes it, freeing lot of memory.
@ -543,7 +546,7 @@ namespace video
}
};
STextureStageCache CurrentTexture;
core::array<ITexture*> DepthTextures;
core::array<COpenGLFBODepthTexture*> DepthTextures;
struct SUserClipPlane
{
SUserClipPlane() : Enabled(false) {}

View File

@ -893,6 +893,11 @@ void COpenGLFBODepthTexture::unbindRTT()
{
}
bool COpenGLFBODepthTexture::hasStencil()
{
return UseStencil;
}
bool checkFBOStatus(COpenGLDriver* Driver)
{

View File

@ -190,6 +190,8 @@ public:
bool attach(ITexture*);
bool hasStencil();
protected:
GLuint DepthRenderBuffer;
GLuint StencilRenderBuffer;

View File

@ -337,40 +337,7 @@ void CParticleSystemSceneNode::render()
{
const SParticle& particle = Particles[i];
#if 0
core::vector3df horizontal = camera->getUpVector().crossProduct(view);
horizontal.normalize();
horizontal *= 0.5f * particle.size.Width;
core::vector3df vertical = horizontal.crossProduct(view);
vertical.normalize();
vertical *= 0.5f * particle.size.Height;
#else
f32 f;
f = 0.5f * particle.size.Width;
const core::vector3df horizontal ( m[0] * f, m[4] * f, m[8] * f );
f = -0.5f * particle.size.Height;
const core::vector3df vertical ( m[1] * f, m[5] * f, m[9] * f );
#endif
Buffer->Vertices[0+idx].Pos = particle.pos + horizontal + vertical;
Buffer->Vertices[0+idx].Color = particle.color;
Buffer->Vertices[0+idx].Normal = view;
Buffer->Vertices[1+idx].Pos = particle.pos + horizontal - vertical;
Buffer->Vertices[1+idx].Color = particle.color;
Buffer->Vertices[1+idx].Normal = view;
Buffer->Vertices[2+idx].Pos = particle.pos - horizontal - vertical;
Buffer->Vertices[2+idx].Color = particle.color;
Buffer->Vertices[2+idx].Normal = view;
Buffer->Vertices[3+idx].Pos = particle.pos - horizontal + vertical;
Buffer->Vertices[3+idx].Color = particle.color;
Buffer->Vertices[3+idx].Normal = view;
drawBillboardParticle(idx, particle, view, m);
idx +=4;
}
@ -397,6 +364,38 @@ void CParticleSystemSceneNode::render()
}
}
//! Draw billboard particle
void CParticleSystemSceneNode::drawBillboardParticle(const irr::s32 &idx,
const SParticle &particle, const core::vector3df &view, const irr::core::matrix4 &m)
{
f32 f;
f = 0.5f * particle.size.Width;
const core::vector3df horizontal ( m[0] * f, m[4] * f, m[8] * f );
f = -0.5f * particle.size.Height;
const core::vector3df vertical ( m[1] * f, m[5] * f, m[9] * f );
Buffer->Vertices[0+idx].Pos = particle.pos + horizontal + vertical;
Buffer->Vertices[0+idx].Color = particle.color;
Buffer->Vertices[0+idx].Normal = view;
Buffer->Vertices[1+idx].Pos = particle.pos + horizontal - vertical;
Buffer->Vertices[1+idx].Color = particle.color;
Buffer->Vertices[1+idx].Normal = view;
Buffer->Vertices[2+idx].Pos = particle.pos - horizontal - vertical;
Buffer->Vertices[2+idx].Color = particle.color;
Buffer->Vertices[2+idx].Normal = view;
Buffer->Vertices[3+idx].Pos = particle.pos - horizontal + vertical;
Buffer->Vertices[3+idx].Color = particle.color;
Buffer->Vertices[3+idx].Normal = view;
}
//! returns the axis aligned bounding box of this node
const core::aabbox3d<f32>& CParticleSystemSceneNode::getBoundingBox() const

View File

@ -59,6 +59,13 @@ public:
//! render
virtual void render();
//! Draw billboard particle
void drawBillboardParticle(
const irr::s32 &idx,
const scene::SParticle &particle,
const core::vector3df &view,
const irr::core::matrix4 &m);
//! returns the axis aligned bounding box of this node
virtual const core::aabbox3d<f32>& getBoundingBox() const;

View File

@ -1343,7 +1343,7 @@ u32 CSceneManager::registerNodeForRendering(ISceneNode* node, E_SCENE_NODE_RENDE
//! This method is called just before the rendering process of the whole scene.
//! draws all scene nodes
void CSceneManager::drawAll()
void CSceneManager::drawAll(u32 flags)
{
if (!Driver)
return;
@ -1383,6 +1383,40 @@ void CSceneManager::drawAll()
// let all nodes register themselves
OnRegisterSceneNode();
//Disable unwanted render passes
if ( flags != 0xFFFFFFFF )
{
//Disable all but the specified passes
if ((flags & ESNRP_CAMERA) != ESNRP_CAMERA )
{
CameraList.clear();
}
if ((flags & ESNRP_LIGHT) != ESNRP_LIGHT )
{
LightList.clear();
}
if ((flags & ESNRP_SKY_BOX) != ESNRP_SKY_BOX )
{
SkyBoxList.clear();
}
if ((flags & ESNRP_SOLID) != ESNRP_SOLID )
{
SolidNodeList.clear();
}
if ((flags & ESNRP_TRANSPARENT) != ESNRP_TRANSPARENT )
{
TransparentNodeList.clear();
}
if ((flags & ESNRP_TRANSPARENT_EFFECT) != ESNRP_TRANSPARENT_EFFECT )
{
TransparentEffectNodeList.clear();
}
if ((flags & ESNRP_SHADOW) != ESNRP_SHADOW )
{
ShadowNodeList.clear();
}
}
if (LightManager)
LightManager->OnPreRender(LightList);

View File

@ -111,7 +111,7 @@ namespace scene
virtual u32 registerNodeForRendering(ISceneNode* node, E_SCENE_NODE_RENDER_PASS pass = ESNRP_AUTOMATIC);
//! draws all scene nodes
virtual void drawAll();
virtual void drawAll(u32 flags = 0xFFFFFFFF);
//! Adds a scene node for rendering using a octree to the scene graph. This a good method for rendering
//! scenes with lots of geometry. The Octree is built on the fly from the mesh, much
@ -532,20 +532,27 @@ namespace scene
struct DefaultNodeEntry
{
DefaultNodeEntry(ISceneNode* n) :
Node(n), TextureValue(0)
Node(n), TextureValue(0), MaterialType(video::EMT_SOLID)
{
if (n->getMaterialCount())
{
TextureValue = (n->getMaterial(0).getTexture(0));
MaterialType = n->getMaterial(0).MaterialType;
}
}
bool operator < (const DefaultNodeEntry& other) const
{
return (TextureValue < other.TextureValue);
if (MaterialType == other.MaterialType)
return (TextureValue < other.TextureValue);
else
return (MaterialType < other.MaterialType);
}
ISceneNode* Node;
private:
void* TextureValue;
video::E_MATERIAL_TYPE MaterialType;
};
//! sort on distance (center) to camera

View File

@ -38,7 +38,6 @@ CSkyBoxSceneNode::CSkyBoxSceneNode(video::ITexture* top, video::ITexture* bottom
video::SMaterial mat;
mat.Lighting = false;
mat.ZBuffer = video::ECFN_NEVER;
mat.ZWriteEnable = false;
mat.AntiAliasing=0;
mat.TextureLayer[0].TextureWrapU = video::ETC_CLAMP_TO_EDGE;

View File

@ -46,7 +46,6 @@ CSkyDomeSceneNode::CSkyDomeSceneNode(video::ITexture* sky, u32 horiRes, u32 vert
Buffer = new SMeshBuffer();
Buffer->Material.Lighting = false;
Buffer->Material.ZBuffer = video::ECFN_NEVER;
Buffer->Material.ZWriteEnable = false;
Buffer->Material.AntiAliasing = video::EAAM_OFF;
Buffer->Material.setTexture(0, sky);

View File

@ -73,6 +73,7 @@ src/guiengine/widgets/progress_bar_widget.cpp
src/guiengine/widgets/ribbon_widget.cpp
src/guiengine/widgets/spinner_widget.cpp
src/guiengine/widgets/text_box_widget.cpp
src/guiengine/widgets/rating_bar_widget.cpp
src/input/binding.cpp
src/input/device_manager.cpp
src/input/input_device.cpp
@ -324,6 +325,7 @@ src/guiengine/widgets/progress_bar_widget.hpp
src/guiengine/widgets/ribbon_widget.hpp
src/guiengine/widgets/spinner_widget.hpp
src/guiengine/widgets/text_box_widget.hpp
src/guiengine/widgets/rating_bar_widget.hpp
src/input/binding.hpp
src/input/device_manager.hpp
src/input/input_device.hpp

View File

@ -164,6 +164,8 @@ supertuxkart_SOURCES = \
guiengine/widgets/text_box_widget.hpp \
guiengine/widgets/progress_bar_widget.cpp \
guiengine/widgets/progress_bar_widget.hpp \
guiengine/widgets/rating_bar_widget.cpp \
guiengine/widgets/rating_bar_widget.hpp \
input/binding.cpp \
input/binding.hpp \
input/device_manager.cpp \

View File

@ -177,3 +177,42 @@ bool Addon::testIncluded(const std::string &min_ver, const std::string &max_ver)
return (min_version <= current_version && max_version >= current_version);
}
// ----------------------------------------------------------------------------
/**
* \brief Filter the add-on with a list of words.
* \param words A list of words separated by ' '.
* \return true if the add-on contains one of the words, otherwise false.
*/
bool Addon::filterByWords(const core::stringw words) const
{
if (words == NULL || words.empty())
return true;
std::vector<core::stringw> list = StringUtils::split(words, ' ', false);
for (unsigned int i = 0; i < list.size(); i++)
{
list[i].make_lower();
core::stringw name = core::stringw(m_name).make_lower();
if (name.find(list[i].c_str()) != -1)
{
return true;
}
core::stringw designer = core::stringw(m_designer).make_lower();
if (designer.find(list[i].c_str()) != -1)
{
return true;
}
core::stringw description = core::stringw(m_description).make_lower();
if (description.find(list[i].c_str()) != -1)
{
return true;
}
}
return false;
} // filterByWords

View File

@ -266,6 +266,9 @@ public:
return file_manager->getAddonsFile(getTypeDirectory()+m_dir_name);
} // getDataDir
// ------------------------------------------------------------------------
bool filterByWords(const core::stringw words) const;
// ------------------------------------------------------------------------
/** Compares two addons according to the sort order currently defined.
* \param a The addon to compare this addon to.
*/

View File

@ -30,7 +30,6 @@
#include "addons/inetwork_http.hpp"
#include "addons/request.hpp"
#include "addons/zip.hpp"
#include "graphics/irr_driver.hpp"
#include "io/file_manager.hpp"
#include "io/xml_node.hpp"
#include "karts/kart_properties.hpp"

View File

@ -179,7 +179,7 @@ void *NetworkHttp::mainLoop(void *obj)
switch(me->m_current_request->getCommand())
{
case Request::HC_INIT:
status = me->init();
status = me->init(false);
break;
case Request::HC_REINIT:
status = me->reInit();
@ -269,7 +269,7 @@ NetworkHttp::~NetworkHttp()
* \return 0 if an error happened and no online connection will be available,
* 1 otherwise.
*/
CURLcode NetworkHttp::init()
CURLcode NetworkHttp::init(bool forceRefresh)
{
news_manager->clearErrorMessage();
core::stringw error_message("");
@ -278,7 +278,7 @@ CURLcode NetworkHttp::init()
bool download = UserConfigParams::m_news_last_updated==0 ||
UserConfigParams::m_news_last_updated
+UserConfigParams::m_news_frequency
< Time::getTimeSinceEpoch();
< Time::getTimeSinceEpoch() || forceRefresh;
if(!download)
{
@ -332,7 +332,7 @@ CURLcode NetworkHttp::init()
xml = new XMLNode(xml_file);
}
news_manager->init();
status = loadAddonsList(xml, xml_file);
status = loadAddonsList(xml, xml_file, forceRefresh);
delete xml;
if(status==CURLE_OK)
{
@ -401,14 +401,10 @@ CURLcode NetworkHttp::reInit()
m_all_requests.getData().pop();
m_all_requests.unlock();
std::string news_file = file_manager->getAddonsFile("news.xml");
file_manager->removeFile(news_file);
std::string addons_file = file_manager->getAddonsFile("addons.xml");
file_manager->removeFile(addons_file);
if(UserConfigParams::logAddons())
printf("[addons] Xml files deleted, re-initialising addon manager.\n");
return init();
return init(true /* force refresh */);
} // reInit
@ -424,7 +420,8 @@ CURLcode NetworkHttp::reInit()
* \return curl error code (esp. CURLE_OK if no error occurred)
*/
CURLcode NetworkHttp::loadAddonsList(const XMLNode *xml,
const std::string &filename)
const std::string &filename,
bool forceRefresh)
{
std::string addon_list_url("");
Time::TimeType mtime(0);
@ -445,7 +442,8 @@ CURLcode NetworkHttp::loadAddonsList(const XMLNode *xml,
return CURLE_COULDNT_CONNECT;
}
bool download = mtime > UserConfigParams::m_addons_last_updated;
bool download = (mtime > UserConfigParams::m_addons_last_updated) || forceRefresh;
if(!download)
{
std::string filename=file_manager->getAddonsFile("addons.xml");
@ -453,6 +451,11 @@ CURLcode NetworkHttp::loadAddonsList(const XMLNode *xml,
download = true;
}
if (download)
Log::info("NetworkHttp", "Downloading updated addons.xml");
else
Log::info("NetworkHttp", "Using cached addons.xml");
Request r(Request::HC_DOWNLOAD_FILE, 9999, false,
addon_list_url, "addons.xml");
CURLcode status = download ? downloadFileInternal(&r)

View File

@ -65,9 +65,10 @@ private:
CURL *m_curl_session;
static void *mainLoop(void *obj);
CURLcode init();
CURLcode init(bool forceRefresh);
CURLcode loadAddonsList(const XMLNode *xml,
const std::string &filename);
const std::string &filename,
bool forceRefresh);
CURLcode downloadFileInternal(Request *request);
static int progressDownload(void *clientp, double dltotal, double dlnow,
double ultotal, double ulnow);

View File

@ -19,8 +19,6 @@
#include "animations/animation_base.hpp"
#include "animations/ipo.hpp"
#include "config/user_config.hpp"
#include "graphics/irr_driver.hpp"
#include "io/file_manager.hpp"
#include "io/xml_node.hpp"

View File

@ -21,7 +21,6 @@
#include <stdio.h>
#include "audio/sfx_base.hpp"
#include "graphics/irr_driver.hpp"
#include "graphics/material.hpp"
#include "graphics/material_manager.hpp"
#include "graphics/mesh_tools.hpp"

View File

@ -23,7 +23,6 @@
#include "audio/music_dummy.hpp"
#include "audio/music_ogg.hpp"
#include "config/user_config.hpp"
#include "io/file_manager.hpp"
#include "tracks/track.hpp"
#include "tracks/track_manager.hpp"

View File

@ -29,7 +29,6 @@
#include "audio/music_manager.hpp"
#include "audio/sfx_manager.hpp"
#include "config/user_config.hpp"
#include "utils/constants.hpp"
MusicOggStream::MusicOggStream()

View File

@ -331,9 +331,7 @@ void ChallengeData::setUnlocks(const std::string &id, RewardType reward)
}
case UNLOCK_DIFFICULTY:
{
//TODO: difficulty names when unlocking
irr::core::stringw user_name = "?";
addUnlockDifficultyReward(id, user_name);
addUnlockDifficultyReward(id, core::stringw(id.c_str()));
break;
}
case UNLOCK_KART: {

View File

@ -57,7 +57,6 @@ public:
}; // UnlockableFeature
// ------------------------------------------------------------------------
private:
/** The various types of challenges that we support, which esp. determine
* when a challenge is tested if it is fulfilled. For now we have GP
* (a GP challenge, tested at the end of a GP), Race (tested at the
@ -74,6 +73,9 @@ private:
CM_ANY
};
private:
/** The challenge mode of this challenge. */
ChallengeModeType m_mode;

View File

@ -434,12 +434,12 @@ void UnlockManager::findWhatWasUnlocked(int points_before, int points_now,
if (c->getNumTrophies() > points_before &&
c->getNumTrophies() <= points_now )
{
if (c->getTrackId() != "")
if (c->getMode() == ChallengeData::CM_SINGLE_RACE && c->getTrackId() != "")
{
if (!getCurrentSlot()->isLocked(c->getTrackId()))
tracks.push_back(c->getTrackId());
}
else if (c->getGPId() != "")
else if (c->getMode() == ChallengeData::CM_GRAND_PRIX && c->getGPId() != "")
{
if (!getCurrentSlot()->isLocked(c->getGPId()))
gps.push_back(c->getGPId());

View File

@ -117,7 +117,7 @@ void STKConfig::load(const std::string &filename)
CHECK_NEG(m_anvil_time, "anvil-time" );
CHECK_NEG(m_anvil_weight, "anvil-weight" );
CHECK_NEG(m_item_switch_time, "item-switch-time" );
CHECK_NEG(m_bubble_gum_counter, "bubblegum disappear counter");
CHECK_NEG(m_bubblegum_counter, "bubblegum disappear counter");
CHECK_NEG(m_explosion_impulse_objects, "explosion-impulse-objects" );
CHECK_NEG(m_max_history, "max-history" );
CHECK_NEG(m_max_skidmarks, "max-skidmarks" );
@ -158,7 +158,7 @@ void STKConfig::init_defaults()
m_near_ground = m_item_switch_time =
m_smooth_angle_limit =
m_penalty_time = m_explosion_impulse_objects = UNDEFINED;
m_bubble_gum_counter = -100;
m_bubblegum_counter = -100;
m_max_karts = -100;
m_max_history = -100;
m_max_skidmarks = -100;
@ -333,9 +333,9 @@ void STKConfig::getAllData(const XMLNode * root)
switch_node->get("time", &m_item_switch_time);
}
if(const XMLNode *bubble_gum_node= root->getNode("bubble-gum"))
if(const XMLNode *bubblegum_node= root->getNode("bubblegum"))
{
bubble_gum_node->get("disappear-counter", &m_bubble_gum_counter);
bubblegum_node->get("disappear-counter", &m_bubblegum_counter);
}
if(const XMLNode *explosion_node= root->getNode("explosion"))

View File

@ -74,7 +74,7 @@ public:
passed on. */
float m_anvil_time; /**<Time an anvil is active. */
float m_item_switch_time; /**< Time items will be switched. */
int m_bubble_gum_counter; /**< How many times bananas must be eaten
int m_bubblegum_counter; /**< How many times bananas must be eaten
before they disappear. */
float m_explosion_impulse_objects;/**<Impulse of explosion on moving
objects, e.g. road cones, ... */

View File

@ -23,6 +23,8 @@
#include "graphics/irr_driver.hpp"
#include "graphics/material.hpp"
#include "graphics/material_manager.hpp"
#include "graphics/particle_emitter.hpp"
#include "graphics/particle_kind_manager.hpp"
#include "items/projectile_manager.hpp"
#include "race/race_manager.hpp"
#include "utils/vec3.hpp"
@ -32,44 +34,15 @@
const float burst_time = 0.1f;
/** Creates an explosion effect. */
Explosion::Explosion(const Vec3& coord, const char* explosion_sound)
Explosion::Explosion(const Vec3& coord, const char* explosion_sound, const char * particle_file)
: HitSFX(coord, explosion_sound)
{
// short emision time, explosion, not constant flame
m_remaining_time = burst_time;
m_node = irr_driver->addParticleNode();
m_node->grab();
#ifdef DEBUG
m_node->setName("explosion");
#endif
m_node->setPosition(coord.toIrrVector());
Material* m = material_manager->getMaterial("explode.png");
m_node->setMaterialTexture(0, m->getTexture());
m->setMaterialProperties(&(m_node->getMaterial(0)), NULL);
m_node->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR );
scene::IParticleEmitter* em =
m_node->createSphereEmitter(core::vector3df(0.0f,0.0f,0.0f), 0.5f,
/* velocity in m/ms */core::vector3df(0.0f,0.005f,0.0f),
600, 900, // min max particles per sec
video::SColor(0, 0, 0, 0), // min colour
video::SColor(0, 0, 0, 0), // max colour
(int)((burst_time + explosion_time)
*1000.0f), // min life ms
(int)((burst_time + explosion_time)
*1000.0f), // max max life ms
90, // max angle
// min and max start size
core::dimension2df(0.3f, 0.3f),
core::dimension2df(0.75f, 0.75f)
);
m_node->setEmitter(em); // this grabs the emitter
em->drop(); // so we can drop it here without deleting it
scene::IParticleAffector* scale_affector =
m_node->createScaleParticleAffector(core::dimension2df(3.0f, 3.0f));
m_node->addAffector(scale_affector); // same goes for the affector
scale_affector->drop();
ParticleKindManager* pkm = ParticleKindManager::get();
ParticleKind* particles = pkm->getParticles(particle_file);
m_emitter = new ParticleEmitter(particles, coord, NULL);
} // Explosion
//-----------------------------------------------------------------------------
@ -77,12 +50,9 @@ Explosion::Explosion(const Vec3& coord, const char* explosion_sound)
*/
Explosion::~Explosion()
{
if(m_node)
if(m_emitter)
{
m_node->drop();
// Remove from scene node by removing from parent.
irr_driver->removeNode(m_node);
m_node = NULL;
delete m_emitter;
}
} // ~Explosion
@ -101,19 +71,20 @@ bool Explosion::updateAndDelete(float dt)
if (m_remaining_time < 0.0f && m_remaining_time >= -explosion_time)
{
scene::ISceneNode* node = m_emitter->getNode();
const int intensity = (int)(255-(m_remaining_time/-explosion_time)*255);
m_node->getMaterial(0).AmbientColor.setGreen(intensity);
m_node->getMaterial(0).DiffuseColor.setGreen(intensity);
m_node->getMaterial(0).EmissiveColor.setGreen(intensity);
node->getMaterial(0).AmbientColor.setGreen(intensity);
node->getMaterial(0).DiffuseColor.setGreen(intensity);
node->getMaterial(0).EmissiveColor.setGreen(intensity);
m_node->getMaterial(0).AmbientColor.setBlue(intensity);
m_node->getMaterial(0).DiffuseColor.setBlue(intensity);
m_node->getMaterial(0).EmissiveColor.setBlue(intensity);
node->getMaterial(0).AmbientColor.setBlue(intensity);
node->getMaterial(0).DiffuseColor.setBlue(intensity);
node->getMaterial(0).EmissiveColor.setBlue(intensity);
m_node->getMaterial(0).AmbientColor.setRed(intensity);
m_node->getMaterial(0).DiffuseColor.setRed(intensity);
m_node->getMaterial(0).EmissiveColor.setRed(intensity);
node->getMaterial(0).AmbientColor.setRed(intensity);
node->getMaterial(0).DiffuseColor.setRed(intensity);
node->getMaterial(0).EmissiveColor.setRed(intensity);
}
@ -127,8 +98,8 @@ bool Explosion::updateAndDelete(float dt)
if (m_remaining_time > -explosion_time)
{
// Stop the emitter and wait a little while for all particles to have time to fade out
m_node->getEmitter()->setMinParticlesPerSecond(0);
m_node->getEmitter()->setMaxParticlesPerSecond(0);
m_emitter->getNode()->getEmitter()->setMinParticlesPerSecond(0);
m_emitter->getNode()->getEmitter()->setMaxParticlesPerSecond(0);
}
else
{

View File

@ -30,6 +30,7 @@ using namespace irr;
class Vec3;
class SFXBase;
class ParticleEmitter;
const float explosion_time = 1.5f;
@ -39,11 +40,11 @@ const float explosion_time = 1.5f;
class Explosion : public HitSFX
{
private:
float m_remaining_time;
scene::IParticleSystemSceneNode *m_node;
float m_remaining_time;
ParticleEmitter* m_emitter;
public:
Explosion(const Vec3& coord, const char* explosion_sound);
Explosion(const Vec3& coord, const char* explosion_sound, const char * particle_file );
~Explosion();
bool updateAndDelete(float delta_t);
bool hasEnded () { return m_remaining_time <= -explosion_time; }

View File

@ -384,6 +384,13 @@ void IrrDriver::initDevice()
m_glsl = m_video_driver->queryFeature(video::EVDF_ARB_GLSL) &&
m_video_driver->queryFeature(video::EVDF_TEXTURE_NPOT);
// This remaps the window, so it has to be done before the clear to avoid flicker
m_device->setResizable(false);
// Immediate clear to black for a nicer user loading experience
m_video_driver->beginScene(/*backBuffer clear*/true, /* Z */ false);
m_video_driver->endScene();
if (m_glsl)
{
Log::info("irr_driver", "GLSL supported.");
@ -409,7 +416,6 @@ void IrrDriver::initDevice()
classhint);
XFree(classhint);
#endif
m_device->setResizable(false);
m_device->setWindowCaption(L"SuperTuxKart");
m_device->getVideoDriver()
->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, true);

View File

@ -62,8 +62,6 @@ private:
* m_forced_lod is >=0, only this level is be used. */
int m_forced_lod;
int getLevel();
enum PreviousVisibility
{
FIRST_PASS,
@ -81,6 +79,8 @@ public:
//! returns the axis aligned bounding box of this node
virtual const core::aabbox3d<f32>& getBoundingBox() const { return Box; }
int getLevel();
/*
//! Returns a reference to the current relative transformation matrix.
//! This is the matrix, this scene node uses instead of scale, translation

View File

@ -34,6 +34,7 @@
#include "utils/string_utils.hpp"
#include "modes/world.hpp"
#include "tracks/track.hpp"
#include "utils/log.hpp"
#include <IGPUProgrammingServices.h>
#include <IMaterialRendererServices.h>
@ -873,9 +874,9 @@ void Material::initParticlesEffect(const XMLNode *node)
node->get("base", &base);
if (base.size() < 1)
{
fprintf(stderr, "[Material::initParticlesEffect] WARNING: Invalid "
"particle settings for material '%s'\n",
m_texname.c_str());
Log::warn("Material::initParticlesEffect"
"Invalid particle settings for material '%s'\n",
m_texname.c_str());
return;
}
@ -883,12 +884,19 @@ void Material::initParticlesEffect(const XMLNode *node)
try
{
particles = pkm->getParticles(base.c_str());
if (particles == NULL)
{
Log::warn("Material::initParticlesEffect",
"Error loading particles '%s' for material '%s'\n",
base.c_str(), m_texname.c_str());
}
}
catch (...)
{
fprintf(stderr, "[Material::initParticlesEffect] WARNING: Cannot find "
"particles '%s' for material '%s'\n",
base.c_str(), m_texname.c_str());
Log::warn("Material::initParticlesEffect",
"Cannot find particles '%s' for material '%s'\n",
base.c_str(), m_texname.c_str());
return;
}

View File

@ -284,7 +284,8 @@ void MaterialManager::popTempMaterial()
Material *MaterialManager::getMaterial(const std::string& fname,
bool is_full_path,
bool make_permanent,
bool complain_if_not_found)
bool complain_if_not_found,
bool strip_path)
{
if(fname=="")
{
@ -297,8 +298,13 @@ Material *MaterialManager::getMaterial(const std::string& fname,
return NULL;
}
std::string basename=StringUtils::getBasename(fname);
std::string basename;
if (strip_path)
basename = StringUtils::getBasename(fname);
else
basename = fname;
// Search backward so that temporary (track) textures are found first
for(int i = (int)m_materials.size()-1; i>=0; i-- )
{

View File

@ -65,7 +65,8 @@ public:
Material *getMaterial (const std::string& t,
bool is_full_path=false,
bool make_permanent=false,
bool complain_if_not_found=true);
bool complain_if_not_found=true,
bool strip_path=true);
void addSharedMaterial(const std::string& filename, bool deprecated = false);
bool pushTempMaterial (const std::string& filename, bool deprecated = false);
bool pushTempMaterial (const XMLNode *root, const std::string& filename, bool deprecated = false);

View File

@ -381,14 +381,16 @@ void ParticleEmitter::setParticleType(const ParticleKind* type)
m_node->setMaterialTexture(0, irr_driver->getTexture((file_manager->getDataDir() + "gui/main_help.png").c_str()));
}
// velocity in m/ms
core::vector3df velocity(m_particle_type->getVelocityX(),
m_particle_type->getVelocityY(),
m_particle_type->getVelocityZ());
switch (type->getShape())
{
case EMITTER_POINT:
{
m_emitter = m_node->createPointEmitter(core::vector3df(m_particle_type->getVelocityX(),
m_particle_type->getVelocityY(),
m_particle_type->getVelocityZ()), // velocity in m/ms
m_emitter = m_node->createPointEmitter(velocity,
type->getMinRate(), type->getMaxRate(),
type->getMinColor(), type->getMaxColor(),
lifeTimeMin, lifeTimeMax,
@ -404,13 +406,11 @@ void ParticleEmitter::setParticleType(const ParticleKind* type)
m_emitter = m_node->createBoxEmitter(core::aabbox3df(-box_size_x, -box_size_y, -0.6f,
box_size_x, box_size_y, -0.6f - type->getBoxSizeZ()),
core::vector3df(m_particle_type->getVelocityX(),
m_particle_type->getVelocityY(),
m_particle_type->getVelocityZ()), // velocity in m/ms
velocity,
type->getMinRate(), type->getMaxRate(),
type->getMinColor(), type->getMaxColor(),
lifeTimeMin, lifeTimeMax,
m_particle_type->getAngleSpread() /* angle */
m_particle_type->getAngleSpread()
);
#if VISUALIZE_BOX_EMITTER
@ -435,6 +435,18 @@ void ParticleEmitter::setParticleType(const ParticleKind* type)
#endif
break;
}
case EMITTER_SPHERE:
{
m_emitter = m_node->createSphereEmitter(core::vector3df(0.0f,0.0f,0.0f) /* center */,
m_particle_type->getSphereRadius(),
velocity,
type->getMinRate(), type->getMaxRate(),
type->getMinColor(), type->getMaxColor(),
lifeTimeMin, lifeTimeMax,
m_particle_type->getAngleSpread()
);
break;
}
default:
{
fprintf(stderr, "[ParticleEmitter] Unknown shape\n");
@ -476,6 +488,16 @@ void ParticleEmitter::setParticleType(const ParticleKind* type)
m_node->addAffector(faa);
faa->drop();
}
if (type->hasScaleAffector())
{
core::dimension2df factor = core::dimension2df(type->getScaleAffectorFactorX(),
type->getScaleAffectorFactorY());
scene::IParticleAffector* scale_affector =
m_node->createScaleParticleAffector(factor);
m_node->addAffector(scale_affector);
scale_affector->drop();
}
}
} // setParticleType

View File

@ -20,7 +20,6 @@
#include "graphics/material.hpp"
#include "graphics/material_manager.hpp"
#include "graphics/irr_driver.hpp"
#include "io/file_manager.hpp"
#include "io/xml_node.hpp"
#include "utils/constants.hpp"
@ -42,6 +41,7 @@ ParticleKind::ParticleKind(const std::string file) : m_min_start_color(255,255,2
m_box_x = 0.5f;
m_box_y = 0.5f;
m_box_z = 0.5f;
m_sphere_radius = 0.5f;
m_angle_spread = 45;
m_velocity_x = 0.001f;
m_velocity_y = 0.001f;
@ -51,6 +51,9 @@ ParticleKind::ParticleKind(const std::string file) : m_min_start_color(255,255,2
m_fade_away_end = -1.0f;
m_force_lost_to_gravity_time = 1000;
m_emission_decay_rate = 0;
m_has_scale_affector = NULL;
m_scale_affector_factor_x = 0.0f;
m_scale_affector_factor_y = 0.0f;
// ----- Read XML file
@ -87,6 +90,12 @@ ParticleKind::ParticleKind(const std::string file) : m_min_start_color(255,255,2
xml->get("box_y", &m_box_y);
xml->get("box_z", &m_box_z);
}
else if (emitterShape == "sphere")
{
m_shape = EMITTER_SPHERE;
xml->get("radius", &m_sphere_radius);
}
else
{
fprintf(stderr, "[ParticleKind] <particles> main node has unknown value for attribute 'emitter'\n");
@ -154,6 +163,10 @@ ParticleKind::ParticleKind(const std::string file) : m_min_start_color(255,255,2
size->get("min", &m_min_size);
size->get("max", &m_max_size);
}
bool has_x = size->get("x-increase-factor", &m_scale_affector_factor_x);
bool has_y = size->get("y-increase-factor", &m_scale_affector_factor_y);
m_has_scale_affector = (has_x || has_y);
//std::cout << "m_particle_size = " << m_particle_size << "\n";
//std::cout << "m_min_size = " << m_min_size << "\n";

View File

@ -30,6 +30,7 @@ class Material;
enum EmitterShape
{
EMITTER_POINT,
EMITTER_SPHERE,
EMITTER_BOX
};
@ -77,6 +78,9 @@ private:
/** For box emitters only */
float m_box_x, m_box_y, m_box_z;
/** For sphere emitters only */
float m_sphere_radius;
/** Distance from camera at which particles start fading out, or negative if disabled */
float m_fade_away_start, m_fade_away_end;
@ -86,6 +90,10 @@ private:
std::string m_material_file;
bool m_has_scale_affector;
float m_scale_affector_factor_x;
float m_scale_affector_factor_y;
public:
/**
@ -119,6 +127,8 @@ public:
float getBoxSizeY () const { return m_box_y; }
float getBoxSizeZ () const { return m_box_z; }
float getSphereRadius() const { return m_sphere_radius; }
int getAngleSpread () const { return m_angle_spread; }
float getVelocityX () const { return m_velocity_x; }
@ -138,6 +148,11 @@ public:
int getEmissionDecayRate() const { return m_emission_decay_rate; }
bool hasScaleAffector() const { return m_has_scale_affector; }
float getScaleAffectorFactorX() const { return m_scale_affector_factor_x; }
float getScaleAffectorFactorY() const { return m_scale_affector_factor_y; };
std::string getName() const { return m_name; }
};

View File

@ -109,11 +109,11 @@ void SkidMarks::update(float dt, bool force_skid_marks,
// raycast result --> delta is 0, which is considered to be not skidding.
const Skidding *skid = m_kart.getSkidding();
bool is_skidding = raycast_right.m_isInContact &&
( force_skid_marks ||
( (skid->getSkidState()==Skidding::SKID_ACCUMULATE_LEFT ||
skid->getSkidState()==Skidding::SKID_ACCUMULATE_RIGHT )
&& m_kart.getSkidding()->getGraphicalJumpOffset()<=0
&& delta.length2()>=0.0001f ) );
( force_skid_marks ||
( (skid->getSkidState()==Skidding::SKID_ACCUMULATE_LEFT||
skid->getSkidState()==Skidding::SKID_ACCUMULATE_RIGHT )
&& skid->getGraphicalJumpOffset()<=0
&& delta.length2()>=0.0001f ) );
if(m_skid_marking)
{

View File

@ -15,7 +15,6 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "graphics/irr_driver.hpp"
#include "guiengine/abstract_top_level_container.hpp"
#include "guiengine/engine.hpp"
#include "guiengine/scalable_font.hpp"

Some files were not shown because too many files have changed in this diff Show More