Compare commits
91 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
2d4580de0f | ||
|
7462c74837 | ||
|
51c18095da | ||
|
3e3b3a9d36 | ||
|
68ac5b6049 | ||
|
76dd77fa0e | ||
|
25acd49f93 | ||
|
23bec446e5 | ||
|
7dd4a4d69c | ||
|
7537550926 | ||
|
6781868a16 | ||
|
f36c57a4e4 | ||
|
688655ae22 | ||
|
ce4996fa01 | ||
|
c444efc2bc | ||
|
cd0b692d9e | ||
|
dbbfd7cbe6 | ||
|
552bbf172d | ||
|
45a0c20462 | ||
|
1608752ad3 | ||
|
8f1ad7525e | ||
|
725c62c78e | ||
|
17984b215c | ||
|
743d6f75e0 | ||
|
7a79b466cf | ||
|
c282ab3caa | ||
|
96fbeaafce | ||
|
1b31799153 | ||
|
3d5d27a059 | ||
|
155fad7929 | ||
|
a3d931a488 | ||
|
43e36cecb6 | ||
|
fcf101b2a5 | ||
|
3e5f643fd5 | ||
|
135d66887d | ||
|
8b9276fef3 | ||
|
104a7a6d19 | ||
|
f96868266e | ||
|
b1bd06bcae | ||
|
98cd74dc77 | ||
|
573710cdad | ||
|
861850eb40 | ||
|
9e5f881635 | ||
|
77c1250858 | ||
|
05ab2f0bda | ||
|
68f39c9f49 | ||
|
9fc39f2faf | ||
|
2d9b556f88 | ||
|
d37de50712 | ||
|
06d040bdd9 | ||
|
26876468a2 | ||
|
5f2d9d18f0 | ||
|
54e5ae5b31 | ||
|
449db12694 | ||
|
ca246c9152 | ||
|
604eb83ef0 | ||
|
c4d7510d9b | ||
|
85ca47164c | ||
|
d285b4d754 | ||
|
84bef0a580 | ||
|
b1eb9d8e59 | ||
|
bc1b6eb881 | ||
|
212554f512 | ||
|
d92756e961 | ||
|
96c9c20f61 | ||
|
8d9e549585 | ||
|
460aac62c8 | ||
|
7513e660d2 | ||
|
a1aa1af795 | ||
|
cf45ec1006 | ||
|
ab14b3e0c7 | ||
|
3de4dac8d0 | ||
|
4a1bbbefbb | ||
|
087c8603bc | ||
|
b293f25d74 | ||
|
456d3b8ffc | ||
|
ab24f029b0 | ||
|
68a9c9bf49 | ||
|
af44c2cb05 | ||
|
166d445980 | ||
|
12b8457100 | ||
|
f4092af132 | ||
|
e0a1461d97 | ||
|
65aad8181b | ||
|
986b31fd6b | ||
|
058ee32483 | ||
|
938ace76b4 | ||
|
3f53168cbc | ||
|
2e0b3a7b09 | ||
|
d81959e499 | ||
|
5f564d52fb |
16
ChangeLog
@@ -1,3 +1,19 @@
|
||||
SuperTuxKart 0.7.2
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
* Added in-game addon manager
|
||||
* Fixed major memory leaks
|
||||
* New Snow Peak track by Samuncle
|
||||
* Improved star track UFO by Rudy
|
||||
* New Beastie kart.
|
||||
* Show when you get a highscore
|
||||
* Improve gamepad configuration under Windows (add ability to tell gamepads apart)
|
||||
* Various other tweaks done and glitches fixed
|
||||
|
||||
SuperTuxkart 0.7.1b
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
* Fix circular dependency in challenges
|
||||
* Updated translations
|
||||
|
||||
SuperTuxKart 0.7.1
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
* Particle (smoke, splash, fire) and weather effects
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Process this file with autogen.sh to produce a configure script.
|
||||
|
||||
AC_INIT(supertuxkart,SVN)
|
||||
AC_INIT(supertuxkart,0.7.2)
|
||||
AC_CONFIG_SRCDIR([src/main.cpp])
|
||||
|
||||
AC_PREREQ(2.61)
|
||||
@@ -318,7 +318,7 @@ AC_TRY_RUN(
|
||||
if test x$irrlicht_min_version_met = xfalse; then
|
||||
AC_MSG_ERROR([Your irrLicht is too old, please update irrLicht.
|
||||
You need irrlicht 1.8.
|
||||
While irrlicht 1.8 is not released, we recommend using version 3629 from irrlicht SVN trunk.])
|
||||
While irrlicht 1.8 is not released, we recommend using version 3843 from irrlicht SVN trunk.])
|
||||
else
|
||||
echo "yes"
|
||||
fi
|
||||
|
BIN
data/CREDITS
@@ -12,7 +12,7 @@
|
||||
track="tuxtollway"
|
||||
difficulty="hard"
|
||||
laps="3"
|
||||
karts="4"
|
||||
karts="5"
|
||||
position="1"
|
||||
/>
|
||||
|
||||
|
Before Width: | Height: | Size: 154 KiB After Width: | Height: | Size: 155 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 28 KiB |
@@ -13,6 +13,7 @@
|
||||
<label id="name" width="100%" text_align="left"/>
|
||||
<label id="size" width="100%" text=""/>
|
||||
<label id="revision" width="100%" text=""/>
|
||||
<spacer height="10"/>
|
||||
<label id="flags" width="100%" text="" word_wrap="true"/>
|
||||
</div>
|
||||
</div>
|
||||
|
BIN
data/gui/no-package-featured.png
Normal file
After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 11 KiB |
BIN
data/gui/package-featured.png
Normal file
After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 12 KiB |
@@ -156,11 +156,6 @@ when the border that intersect at this corner are enabled.
|
||||
<element type="listitem" state="focused" image="glass/glasssgauge_fill.png"
|
||||
left_border="0" right_border="0" top_border="0" bottom_border="0"
|
||||
hborder_out_portion="0.0" vborder_out_portion="0.0" />
|
||||
|
||||
<element type="listitem" state="down" image="glass/glassbutton.png"
|
||||
left_border="80" right_border="80" top_border="0" bottom_border="36"
|
||||
hborder_out_portion="1.0" vborder_out_portion="1.0"
|
||||
areas="body" />
|
||||
|
||||
<!-- Scrollbars. Background and thumb have no state (always neutral state).
|
||||
The buttons are the top and bottom arrows. Image must be top arrow, will
|
||||
@@ -172,8 +167,8 @@ when the border that intersect at this corner are enabled.
|
||||
<element type="scrollbar_button" image="glass/scrollbar_btn.png" />
|
||||
<element type="scrollbar_button" state="down" image="glass/scrollbar_btn_down.png" />
|
||||
|
||||
<element type="left_arrow" state="neutrual" image="glass/left_arrow.png" />
|
||||
<element type="right_arrow" state="neutrual" image="glass/right_arrow.png" />
|
||||
<element type="left_arrow" state="neutral" image="glass/left_arrow.png" />
|
||||
<element type="right_arrow" state="neutral" image="glass/right_arrow.png" />
|
||||
<element type="left_arrow" state="focus" image="glass/left_arrow_focus.png" />
|
||||
<element type="right_arrow" state="focus" image="glass/right_arrow_focus.png" />
|
||||
|
||||
|
@@ -156,10 +156,6 @@ when the border that intersect at this corner are enabled.
|
||||
left_border="0" right_border="0" top_border="0" bottom_border="0"
|
||||
hborder_out_portion="0.0" vborder_out_portion="0.0" />
|
||||
|
||||
<element type="listitem" state="down" image="ocean/glassbutton.png"
|
||||
left_border="80" right_border="80" top_border="0" bottom_border="36"
|
||||
hborder_out_portion="1.0" vborder_out_portion="1.0"
|
||||
areas="body" />
|
||||
|
||||
<!-- Scrollbars. Background and thumb have no state (always neutral state).
|
||||
The buttons are the top and bottom arrows. Image must be top arrow, will
|
||||
|
@@ -156,11 +156,6 @@ when the border that intersect at this corner are enabled.
|
||||
left_border="0" right_border="0" top_border="0" bottom_border="0"
|
||||
hborder_out_portion="0.0" vborder_out_portion="0.0" />
|
||||
|
||||
<element type="listitem" state="down" image="peach/glassbutton.png"
|
||||
left_border="80" right_border="80" top_border="0" bottom_border="36"
|
||||
hborder_out_portion="1.0" vborder_out_portion="1.0"
|
||||
areas="body" />
|
||||
|
||||
<!-- Scrollbars. Background and thumb have no state (always neutral state).
|
||||
The buttons are the top and bottom arrows. Image must be top arrow, will
|
||||
be mirrorred for bottom. Buttons can be in neutral or down state.
|
||||
|
1927
data/po/bg.po
761
data/po/ca.po
913
data/po/cs.po
2311
data/po/da.po
782
data/po/de.po
1908
data/po/el.po
774
data/po/es.po
1912
data/po/eu.po
1907
data/po/fa.po
781
data/po/fi.po
790
data/po/fr.po
806
data/po/ga.po
995
data/po/gl.po
817
data/po/he.po
1940
data/po/hi.po
769
data/po/hr.po
769
data/po/hu.po
1914
data/po/is.po
778
data/po/it.po
1955
data/po/ja.po
1995
data/po/ko.po
776
data/po/lt.po
772
data/po/nb.po
788
data/po/nl.po
788
data/po/nn.po
784
data/po/pl.po
761
data/po/pt.po
801
data/po/pt_BR.po
2402
data/po/ro.po
790
data/po/ru.po
761
data/po/sk.po
772
data/po/sl.po
769
data/po/sr.po
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: supertuxkart\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2011-05-31 21:56-0400\n"
|
||||
"POT-Creation-Date: 2011-07-09 21:49-0400\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -16,8 +16,10 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#. I18N: Do NOT literally translate this string!! Please enter Y as the translation if your language is a RTL (right-to-left) language, N (or nothing) otherwise
|
||||
#: src/utils/translation.cpp:197
|
||||
#. I18N: Do NOT literally translate this string!! Please enter Y as the
|
||||
#. translation if your language is a RTL (right-to-left) language,
|
||||
#. N (or nothing) otherwise
|
||||
#: src/utils/translation.cpp:255
|
||||
msgid " Is this a RTL language?"
|
||||
msgstr ""
|
||||
|
||||
@@ -90,25 +92,25 @@ msgstr ""
|
||||
msgid "%i. %s : survived for %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:141
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:145
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:153
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:157
|
||||
#, c-format
|
||||
msgid "%s KB"
|
||||
msgstr ""
|
||||
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:134
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:146
|
||||
#, c-format
|
||||
msgid "%s MB"
|
||||
msgstr ""
|
||||
|
||||
#. I18N: as in "fastest lap: 60 seconds by Wilber"
|
||||
#: src/modes/linear_world.cpp:374
|
||||
#: src/modes/linear_world.cpp:376
|
||||
#, c-format
|
||||
msgid "%s by %s"
|
||||
msgstr ""
|
||||
|
||||
#. I18N: as in: The Old Island by Johannes Sjolund\t27.04.2011
|
||||
#: src/states_screens/addons_screen.cpp:132
|
||||
#: src/states_screens/addons_screen.cpp:165
|
||||
#, c-format
|
||||
msgid "%s by %s\t%s"
|
||||
msgstr ""
|
||||
@@ -124,7 +126,7 @@ msgstr ""
|
||||
msgid "%s is practicing with a blue, big, spheric yo-yo"
|
||||
msgstr ""
|
||||
|
||||
#: src/states_screens/kart_selection.cpp:511
|
||||
#: src/states_screens/kart_selection.cpp:523
|
||||
#, c-format
|
||||
msgid "%s is ready"
|
||||
msgstr ""
|
||||
@@ -152,7 +154,7 @@ msgid "'%s' has been eliminated."
|
||||
msgstr ""
|
||||
|
||||
#. I18N: for empty highscores entries
|
||||
#: src/states_screens/dialogs/track_info_dialog.cpp:267
|
||||
#: src/states_screens/dialogs/track_info_dialog.cpp:265
|
||||
msgid "(Empty)"
|
||||
msgstr ""
|
||||
|
||||
@@ -241,11 +243,15 @@ msgstr ""
|
||||
#. I18N: kart group name
|
||||
#. I18N: ./data/gui/arenas.stkgui
|
||||
#. I18N: track group
|
||||
#: src/states_screens/kart_selection.cpp:899
|
||||
#: src/states_screens/tracks_screen.cpp:200 data/po/gui_strings.h:211
|
||||
#: src/states_screens/kart_selection.cpp:911
|
||||
#: src/states_screens/tracks_screen.cpp:195 data/po/gui_strings.h:211
|
||||
msgid "Add-Ons"
|
||||
msgstr ""
|
||||
|
||||
#: src/states_screens/addons_screen.cpp:76
|
||||
msgid "Add-on name"
|
||||
msgstr ""
|
||||
|
||||
#. I18N: ./data/gui/main.stkgui
|
||||
#. I18N: Main menu button
|
||||
#: data/po/gui_strings.h:442
|
||||
@@ -264,9 +270,9 @@ msgstr ""
|
||||
#. I18N: ./data/gui/arenas.stkgui
|
||||
#. I18N: track group
|
||||
#: src/states_screens/arenas_screen.cpp:84
|
||||
#: src/states_screens/kart_selection.cpp:891
|
||||
#: src/states_screens/options_screen_video.cpp:276
|
||||
#: src/states_screens/tracks_screen.cpp:215 data/po/gui_strings.h:215
|
||||
#: src/states_screens/kart_selection.cpp:903
|
||||
#: src/states_screens/options_screen_video.cpp:291
|
||||
#: src/states_screens/tracks_screen.cpp:187 data/po/gui_strings.h:215
|
||||
msgid "All"
|
||||
msgstr ""
|
||||
|
||||
@@ -294,19 +300,19 @@ msgid "Anchor - slows down greatly the kart in the first position"
|
||||
msgstr ""
|
||||
|
||||
#. I18N: in graphical options
|
||||
#: src/states_screens/options_screen_video.cpp:287
|
||||
#: src/states_screens/options_screen_video.cpp:302
|
||||
#, c-format
|
||||
msgid "Animated Characters : %s"
|
||||
msgstr ""
|
||||
|
||||
#. I18N: in graphical options
|
||||
#: src/states_screens/options_screen_video.cpp:283
|
||||
#: src/states_screens/options_screen_video.cpp:298
|
||||
#, c-format
|
||||
msgid "Animated Scenery : %s"
|
||||
msgstr ""
|
||||
|
||||
#. I18N: in graphical options
|
||||
#: src/states_screens/options_screen_video.cpp:290
|
||||
#: src/states_screens/options_screen_video.cpp:305
|
||||
#, c-format
|
||||
msgid "Anti-aliasing (requires restart) : %s"
|
||||
msgstr ""
|
||||
@@ -374,7 +380,7 @@ msgstr ""
|
||||
|
||||
#. I18N: ./data/gui/addons_loading.stkgui
|
||||
#. I18N: Addons
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:205 data/po/gui_strings.h:184
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:226 data/po/gui_strings.h:184
|
||||
msgid "Back"
|
||||
msgstr ""
|
||||
|
||||
@@ -407,6 +413,11 @@ msgstr ""
|
||||
msgid "Beagle"
|
||||
msgstr ""
|
||||
|
||||
#. I18N: ./data/karts/beastie/kart.xml
|
||||
#: data/po/gui_strings.h:786
|
||||
msgid "Beastie"
|
||||
msgstr ""
|
||||
|
||||
#. I18N: when failing a GP
|
||||
#: src/states_screens/grand_prix_lose.cpp:258
|
||||
msgid "Better luck next time!"
|
||||
@@ -457,7 +468,7 @@ msgstr ""
|
||||
#. I18N: ./data/gui/confirm_resolution_dialog.stkgui
|
||||
#. I18N: In the 'confirm resolution' dialog, that's shown when switching resoluton
|
||||
#: src/states_screens/dialogs/add_device_dialog.cpp:81
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:176
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:197
|
||||
#: src/states_screens/dialogs/player_info_dialog.cpp:100
|
||||
#: data/po/gui_strings.h:227 data/po/gui_strings.h:235
|
||||
msgid "Cancel"
|
||||
@@ -604,7 +615,7 @@ msgid "Disable Device"
|
||||
msgstr ""
|
||||
|
||||
#. I18N: in the graphical options tooltip; indicates a graphical feature is disabled
|
||||
#: src/states_screens/options_screen_video.cpp:274
|
||||
#: src/states_screens/options_screen_video.cpp:289
|
||||
msgid "Disabled"
|
||||
msgstr ""
|
||||
|
||||
@@ -633,17 +644,17 @@ msgstr ""
|
||||
msgid "Down"
|
||||
msgstr ""
|
||||
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:200
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:221
|
||||
msgid "Download failed."
|
||||
msgstr ""
|
||||
|
||||
#. I18N: ./data/karts/elephpant/kart.xml
|
||||
#: data/po/gui_strings.h:786
|
||||
#: data/po/gui_strings.h:789
|
||||
msgid "Elephpant"
|
||||
msgstr ""
|
||||
|
||||
#. I18N: ./data/karts/emule/kart.xml
|
||||
#: data/po/gui_strings.h:789
|
||||
#: data/po/gui_strings.h:792
|
||||
msgid "Emule"
|
||||
msgstr ""
|
||||
|
||||
@@ -656,7 +667,7 @@ msgstr ""
|
||||
#. I18N: in the graphical options tooltip; indicates a graphical feature is enabled
|
||||
#. I18N: ./data/gui/options_audio.stkgui
|
||||
#. I18N: Next to checkbox in settings menu
|
||||
#: src/states_screens/options_screen_video.cpp:272 data/po/gui_strings.h:473
|
||||
#: src/states_screens/options_screen_video.cpp:287 data/po/gui_strings.h:473
|
||||
#: data/po/gui_strings.h:485
|
||||
msgid "Enabled"
|
||||
msgstr ""
|
||||
@@ -666,7 +677,7 @@ msgid "Energy"
|
||||
msgstr ""
|
||||
|
||||
#. I18N: Enter the name of YOUR language here, do not literally translate the word "English"
|
||||
#: src/states_screens/main_menu_screen.cpp:140
|
||||
#: src/states_screens/main_menu_screen.cpp:168
|
||||
msgid "English"
|
||||
msgstr ""
|
||||
|
||||
@@ -676,7 +687,7 @@ msgstr ""
|
||||
msgid "Enter the new player's name"
|
||||
msgstr ""
|
||||
|
||||
#: src/states_screens/kart_selection.cpp:1117
|
||||
#: src/states_screens/kart_selection.cpp:1134
|
||||
msgid ""
|
||||
"Everyone:\n"
|
||||
"Press 'Fire' now to join the game!"
|
||||
@@ -698,7 +709,7 @@ msgstr ""
|
||||
msgid "Feature Unlocked"
|
||||
msgstr ""
|
||||
|
||||
#: src/modes/linear_world.cpp:292
|
||||
#: src/modes/linear_world.cpp:295
|
||||
msgid "Final lap!"
|
||||
msgstr ""
|
||||
|
||||
@@ -859,7 +870,7 @@ msgid "Geronimo!!!"
|
||||
msgstr ""
|
||||
|
||||
#. I18N: ./data/karts/gnu/kart.xml
|
||||
#: data/po/gui_strings.h:792
|
||||
#: data/po/gui_strings.h:795
|
||||
msgid "Gnu"
|
||||
msgstr ""
|
||||
|
||||
@@ -868,7 +879,7 @@ msgid "Go!"
|
||||
msgstr ""
|
||||
|
||||
#. I18N: ./data/karts/gooey/kart.xml
|
||||
#: data/po/gui_strings.h:795
|
||||
#: data/po/gui_strings.h:798
|
||||
msgid "Gooey"
|
||||
msgstr ""
|
||||
|
||||
@@ -912,7 +923,7 @@ msgid "Help"
|
||||
msgstr ""
|
||||
|
||||
#. I18N: ./data/karts/hexley/kart.xml
|
||||
#: data/po/gui_strings.h:798
|
||||
#: data/po/gui_strings.h:801
|
||||
msgid "Hexley"
|
||||
msgstr ""
|
||||
|
||||
@@ -981,7 +992,7 @@ msgid "Keyboard %i"
|
||||
msgstr ""
|
||||
|
||||
#. I18N: ./data/karts/konqi/kart.xml
|
||||
#: data/po/gui_strings.h:801
|
||||
#: data/po/gui_strings.h:804
|
||||
msgid "Konqi"
|
||||
msgstr ""
|
||||
|
||||
@@ -991,7 +1002,7 @@ msgstr ""
|
||||
msgid "Lap"
|
||||
msgstr ""
|
||||
|
||||
#: src/modes/linear_world.cpp:317
|
||||
#: src/modes/linear_world.cpp:320
|
||||
#, c-format
|
||||
msgid "Lap %i"
|
||||
msgstr ""
|
||||
@@ -1009,23 +1020,23 @@ msgstr ""
|
||||
msgid "Loading"
|
||||
msgstr ""
|
||||
|
||||
#: src/states_screens/kart_selection.cpp:803
|
||||
#: src/states_screens/kart_selection.cpp:815
|
||||
msgid "Locked"
|
||||
msgstr ""
|
||||
|
||||
#: src/states_screens/arenas_screen.cpp:193
|
||||
#: src/states_screens/arenas_screen.cpp:216
|
||||
#: src/states_screens/challenges.cpp:97
|
||||
#: src/states_screens/kart_selection.cpp:808
|
||||
#: src/states_screens/kart_selection.cpp:1763
|
||||
#: src/states_screens/kart_selection.cpp:1789
|
||||
#: src/states_screens/kart_selection.cpp:820
|
||||
#: src/states_screens/kart_selection.cpp:1786
|
||||
#: src/states_screens/kart_selection.cpp:1812
|
||||
#: src/states_screens/race_setup_screen.cpp:208
|
||||
#: src/states_screens/tracks_screen.cpp:323
|
||||
#: src/states_screens/tracks_screen.cpp:348
|
||||
#: src/states_screens/tracks_screen.cpp:310
|
||||
#: src/states_screens/tracks_screen.cpp:335
|
||||
msgid "Locked : solve active challenges to gain access to more!"
|
||||
msgstr ""
|
||||
|
||||
#: src/states_screens/tracks_screen.cpp:266
|
||||
#: src/states_screens/tracks_screen.cpp:253
|
||||
msgid "Locked!"
|
||||
msgstr ""
|
||||
|
||||
@@ -1045,7 +1056,7 @@ msgid "Make your rivals bite dust!"
|
||||
msgstr ""
|
||||
|
||||
#. I18N: if some kart animations are enabled
|
||||
#: src/states_screens/options_screen_video.cpp:278
|
||||
#: src/states_screens/options_screen_video.cpp:293
|
||||
msgid "Me Only"
|
||||
msgstr ""
|
||||
|
||||
@@ -1073,7 +1084,7 @@ msgid "Mouse button %d"
|
||||
msgstr ""
|
||||
|
||||
#. I18N: ./data/karts/mozilla/kart.xml
|
||||
#: data/po/gui_strings.h:804
|
||||
#: data/po/gui_strings.h:807
|
||||
msgid "Mozilla"
|
||||
msgstr ""
|
||||
|
||||
@@ -1112,7 +1123,7 @@ msgstr ""
|
||||
msgid "New difficulty '%s' now available"
|
||||
msgstr ""
|
||||
|
||||
#: src/modes/linear_world.cpp:368
|
||||
#: src/modes/linear_world.cpp:381
|
||||
msgid "New fastest lap"
|
||||
msgstr ""
|
||||
|
||||
@@ -1121,7 +1132,7 @@ msgstr ""
|
||||
msgid "New game mode '%s' now available"
|
||||
msgstr ""
|
||||
|
||||
#: src/states_screens/race_result_gui.cpp:687
|
||||
#: src/states_screens/race_result_gui.cpp:697
|
||||
msgid "New highscore!"
|
||||
msgstr ""
|
||||
|
||||
@@ -1141,12 +1152,12 @@ msgid "Nitro"
|
||||
msgstr ""
|
||||
|
||||
#. I18N: ./data/karts/nolok/kart.xml
|
||||
#: data/po/gui_strings.h:807
|
||||
#: data/po/gui_strings.h:810
|
||||
msgid "Nolok"
|
||||
msgstr ""
|
||||
|
||||
#. I18N: if no kart animations are enabled
|
||||
#: src/states_screens/options_screen_video.cpp:280
|
||||
#: src/states_screens/options_screen_video.cpp:295
|
||||
msgid "None"
|
||||
msgstr ""
|
||||
|
||||
@@ -1220,7 +1231,7 @@ msgid "Penguin Playground"
|
||||
msgstr ""
|
||||
|
||||
#. I18N: ./data/karts/pidgin/kart.xml
|
||||
#: data/po/gui_strings.h:810
|
||||
#: data/po/gui_strings.h:813
|
||||
msgid "Pidgin"
|
||||
msgstr ""
|
||||
|
||||
@@ -1276,18 +1287,18 @@ msgstr ""
|
||||
msgid "Press enter or double-click on a player to edit him/her"
|
||||
msgstr ""
|
||||
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:249
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:270
|
||||
#, c-format
|
||||
msgid "Problems installing the addon '%s'."
|
||||
msgstr ""
|
||||
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:263
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:284
|
||||
#, c-format
|
||||
msgid "Problems removing the addon '%s'."
|
||||
msgstr ""
|
||||
|
||||
#. I18N: ./data/karts/puffy/kart.xml
|
||||
#: data/po/gui_strings.h:813
|
||||
#: data/po/gui_strings.h:816
|
||||
msgid "Puffy"
|
||||
msgstr ""
|
||||
|
||||
@@ -1320,12 +1331,12 @@ msgstr ""
|
||||
msgid "Random Arena"
|
||||
msgstr ""
|
||||
|
||||
#: src/states_screens/kart_selection.cpp:792
|
||||
#: src/states_screens/kart_selection.cpp:1806
|
||||
#: src/states_screens/kart_selection.cpp:804
|
||||
#: src/states_screens/kart_selection.cpp:1829
|
||||
msgid "Random Kart"
|
||||
msgstr ""
|
||||
|
||||
#: src/states_screens/tracks_screen.cpp:362
|
||||
#: src/states_screens/tracks_screen.cpp:349
|
||||
msgid "Random Track"
|
||||
msgstr ""
|
||||
|
||||
@@ -1444,7 +1455,7 @@ msgstr ""
|
||||
msgid "Shiny Suburbs"
|
||||
msgstr ""
|
||||
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:146
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:158
|
||||
#, c-format
|
||||
msgid "Size: %s"
|
||||
msgstr ""
|
||||
@@ -1541,7 +1552,7 @@ msgstr ""
|
||||
msgid "SuperTuxKart features several game modes"
|
||||
msgstr ""
|
||||
|
||||
#: src/main.cpp:995
|
||||
#: src/main.cpp:1006
|
||||
msgid ""
|
||||
"SuperTuxKart may connect to a news server to display updates. Would you like "
|
||||
"this feature to be enabled? (To change this setting at a later time, go to "
|
||||
@@ -1556,7 +1567,7 @@ msgid ""
|
||||
msgstr ""
|
||||
|
||||
#. I18N: in the language choice, to select the same language as the OS
|
||||
#: src/states_screens/main_menu_screen.cpp:225
|
||||
#: src/states_screens/main_menu_screen.cpp:253
|
||||
msgid "System Language"
|
||||
msgstr ""
|
||||
|
||||
@@ -1648,7 +1659,7 @@ msgstr ""
|
||||
msgid "Tracks"
|
||||
msgstr ""
|
||||
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:273
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:294
|
||||
msgid "Try again"
|
||||
msgstr ""
|
||||
|
||||
@@ -1659,7 +1670,7 @@ msgid "Tutorial : Selection Room"
|
||||
msgstr ""
|
||||
|
||||
#. I18N: ./data/karts/tux/kart.xml
|
||||
#: data/po/gui_strings.h:816
|
||||
#: data/po/gui_strings.h:819
|
||||
msgid "Tux"
|
||||
msgstr ""
|
||||
|
||||
@@ -1668,7 +1679,7 @@ msgstr ""
|
||||
msgid "Tux Tollway"
|
||||
msgstr ""
|
||||
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:63
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:66
|
||||
msgid "Uninstall"
|
||||
msgstr ""
|
||||
|
||||
@@ -1677,10 +1688,14 @@ msgstr ""
|
||||
msgid "Up"
|
||||
msgstr ""
|
||||
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:61
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:64
|
||||
msgid "Update"
|
||||
msgstr ""
|
||||
|
||||
#: src/states_screens/addons_screen.cpp:77
|
||||
msgid "Updated date"
|
||||
msgstr ""
|
||||
|
||||
#. I18N: ./data/gui/options_video.stkgui
|
||||
#. I18N: In the video settings
|
||||
#: data/po/gui_strings.h:579
|
||||
@@ -1697,7 +1712,7 @@ msgstr ""
|
||||
msgid "User Interface"
|
||||
msgstr ""
|
||||
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:79
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:92
|
||||
#, c-format
|
||||
msgid "Version: %d"
|
||||
msgstr ""
|
||||
@@ -1716,7 +1731,7 @@ msgstr ""
|
||||
msgid "Volume"
|
||||
msgstr ""
|
||||
|
||||
#: src/modes/linear_world.cpp:821
|
||||
#: src/modes/linear_world.cpp:827
|
||||
msgid "WRONG WAY!"
|
||||
msgstr ""
|
||||
|
||||
@@ -1741,7 +1756,7 @@ msgid "Weapons"
|
||||
msgstr ""
|
||||
|
||||
#. I18N: in graphical options
|
||||
#: src/states_screens/options_screen_video.cpp:285
|
||||
#: src/states_screens/options_screen_video.cpp:300
|
||||
#, c-format
|
||||
msgid "Weather Effects : %s"
|
||||
msgstr ""
|
||||
@@ -1759,7 +1774,7 @@ msgid ""
|
||||
msgstr ""
|
||||
|
||||
#. I18N: ./data/karts/wilber/kart.xml
|
||||
#: data/po/gui_strings.h:819
|
||||
#: data/po/gui_strings.h:822
|
||||
msgid "Wilber"
|
||||
msgstr ""
|
||||
|
||||
@@ -1864,7 +1879,7 @@ msgstr ""
|
||||
msgid "You completed the Grand Prix!"
|
||||
msgstr ""
|
||||
|
||||
#: src/karts/kart.cpp:601 src/karts/kart.cpp:620
|
||||
#: src/karts/kart.cpp:603 src/karts/kart.cpp:622
|
||||
msgid "You finished the race!"
|
||||
msgstr ""
|
||||
|
||||
@@ -1872,7 +1887,7 @@ msgstr ""
|
||||
msgid "You have been eliminated!"
|
||||
msgstr ""
|
||||
|
||||
#: src/states_screens/race_result_gui.cpp:687
|
||||
#: src/states_screens/race_result_gui.cpp:697
|
||||
msgid "You topped the highscore list!"
|
||||
msgstr ""
|
||||
|
||||
@@ -1881,7 +1896,7 @@ msgstr ""
|
||||
msgid "You unlocked a new feature!"
|
||||
msgstr ""
|
||||
|
||||
#: src/karts/kart.cpp:601 src/karts/kart.cpp:620
|
||||
#: src/karts/kart.cpp:603 src/karts/kart.cpp:622
|
||||
msgid "You won the race!"
|
||||
msgstr ""
|
||||
|
||||
@@ -1911,13 +1926,13 @@ msgstr ""
|
||||
msgid "by"
|
||||
msgstr ""
|
||||
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:107
|
||||
#: src/states_screens/dialogs/addons_loading.cpp:120
|
||||
msgid "featured"
|
||||
msgstr ""
|
||||
|
||||
#. I18N: kart group name
|
||||
#: src/states_screens/kart_selection.cpp:897
|
||||
#: src/states_screens/tracks_screen.cpp:198
|
||||
#: src/states_screens/kart_selection.cpp:909
|
||||
#: src/states_screens/tracks_screen.cpp:193
|
||||
msgid "standard"
|
||||
msgstr ""
|
||||
|
||||
|
769
data/po/sv.po
1272
data/po/tr.po
2143
data/po/uk.po
1919
data/po/vi.po
777
data/po/zh_CN.po
775
data/po/zh_TW.po
@@ -59,6 +59,11 @@ Addon::Addon(const XMLNode &xml)
|
||||
xml.get("revision", &m_revision );
|
||||
xml.get("file", &m_zip_file );
|
||||
xml.get("description", &m_description );
|
||||
|
||||
// resolve XML entities
|
||||
m_description = StringUtils::replace(m_description, " ", "\n");
|
||||
m_description = StringUtils::replace(m_description, " ", ""); // ignore \r
|
||||
|
||||
xml.get("image", &m_icon_url );
|
||||
// If there is no image, use the icon to display
|
||||
if(m_icon_url=="")
|
||||
|
@@ -36,7 +36,7 @@ public:
|
||||
AS_ALPHA = 0x0002,
|
||||
AS_BETA = 0x0004,
|
||||
AS_RC = 0x0008,
|
||||
//AS_FAN = 0x0010, currently not supported
|
||||
AS_INVISIBLE= 0x0010,
|
||||
//AS_HQ = 0x0020, currently not supported
|
||||
AS_DFSG = 0x0040,
|
||||
AS_FEATURED = 0x0080,
|
||||
|
@@ -480,6 +480,12 @@ CURLcode NetworkHttp::downloadFileInternal(Request *request)
|
||||
curl_easy_setopt(m_curl_session, CURLOPT_PROGRESSDATA, request);
|
||||
FILE * fout = fopen((full_save+".part").c_str(), "wb");
|
||||
|
||||
if(!fout)
|
||||
{
|
||||
printf("[addons] Can't open '%s' for writing, ignored.\n",
|
||||
(full_save+".part").c_str());
|
||||
return CURLE_WRITE_ERROR;
|
||||
}
|
||||
//from and out
|
||||
curl_easy_setopt(m_curl_session, CURLOPT_WRITEDATA, fout );
|
||||
curl_easy_setopt(m_curl_session, CURLOPT_WRITEFUNCTION, fwrite);
|
||||
|
@@ -80,8 +80,8 @@ bool extract_zip(const std::string &from, const std::string &to)
|
||||
if(current_file[0]=='.') continue;
|
||||
const std::string base = StringUtils::getBasename(current_file);
|
||||
|
||||
IReadFile* src_file =
|
||||
file_system->createAndOpenFile(current_file.c_str());
|
||||
IReadFile* src_file =
|
||||
zip_archive->createAndOpenFile(current_file.c_str());
|
||||
if(!src_file)
|
||||
{
|
||||
printf("[addons] Can't read file '%s'.\n", current_file.c_str());
|
||||
|
@@ -90,7 +90,8 @@ Material::Material(const XMLNode *node, int index)
|
||||
node->get("slowdown-time", &m_slowdown_time );
|
||||
node->get("backface-culling", &m_backface_culling );
|
||||
node->get("disable-z-write", &m_disable_z_write );
|
||||
|
||||
node->get("fog", &m_fog );
|
||||
|
||||
node->get("mask", &m_mask);
|
||||
|
||||
if (node->get("normal-map", &m_normal_map_tex))
|
||||
@@ -224,6 +225,7 @@ void Material::init(unsigned int index)
|
||||
m_crash_reset = false;
|
||||
m_add = false;
|
||||
m_disable_z_write = false;
|
||||
m_fog = true;
|
||||
m_max_speed_fraction = 1.0f;
|
||||
m_slowdown_time = 1.0f;
|
||||
m_sfx_name = "";
|
||||
@@ -586,5 +588,13 @@ void Material::setMaterialProperties(video::SMaterial *m) const
|
||||
if (UserConfigParams::m_fullscreen_antialiasing)
|
||||
m->AntiAliasing = video::EAAM_LINE_SMOOTH;
|
||||
|
||||
|
||||
} // setMaterialProperties
|
||||
} // setMaterialProperties
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void Material::adjustForFog(scene::ISceneNode* parent, video::SMaterial *m, bool use_fog) const
|
||||
{
|
||||
//printf("<%s> Fog enable : %i\n", m_texname.c_str(), m_fog);
|
||||
m->setFlag(video::EMF_FOG_ENABLE, m_fog && use_fog);
|
||||
parent->setMaterialFlag(video::EMF_FOG_ENABLE, m_fog && use_fog);
|
||||
}
|
||||
|
@@ -27,6 +27,7 @@
|
||||
namespace irr
|
||||
{
|
||||
namespace video { class ITexture; class SMaterial; }
|
||||
namespace scene { class ISceneNode; }
|
||||
}
|
||||
using namespace irr;
|
||||
|
||||
@@ -84,6 +85,8 @@ private:
|
||||
bool m_ignore;
|
||||
bool m_add;
|
||||
|
||||
bool m_fog;
|
||||
|
||||
ParticleKind* m_particles_effects[EMIT_KINDS_COUNT];
|
||||
|
||||
/** For normal maps */
|
||||
@@ -159,6 +162,8 @@ public:
|
||||
|
||||
void setSFXSpeed(SFXBase *sfx, float speed) const;
|
||||
void setMaterialProperties(video::SMaterial *m) const;
|
||||
void adjustForFog(scene::ISceneNode* parent, video::SMaterial *m, bool use_fog) const;
|
||||
|
||||
/** Returns the ITexture associated with this material. */
|
||||
video::ITexture *getTexture() const { return m_texture; }
|
||||
bool isIgnore () const { return m_ignore; }
|
||||
@@ -212,6 +217,8 @@ public:
|
||||
const std::string &
|
||||
getSFXName () const { return m_sfx_name; }
|
||||
|
||||
bool isFogEnabled() const { return m_fog; }
|
||||
|
||||
/**
|
||||
* \brief Get the kind of particles that are to be used on this material, in the given conditions
|
||||
* \return The particles to use, or NULL if none
|
||||
|
@@ -89,7 +89,28 @@ void MaterialManager::setAllMaterialFlags(video::ITexture* t,
|
||||
}
|
||||
|
||||
} // setAllMaterialFlags
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void MaterialManager::adjustForFog(video::ITexture* t,
|
||||
scene::IMeshBuffer *mb,
|
||||
scene::ISceneNode* parent,
|
||||
bool use_fog) const
|
||||
{
|
||||
const std::string image = StringUtils::getBasename(core::stringc(t->getName()).c_str());
|
||||
// Search backward so that temporary (track) textures are found first
|
||||
for(int i = (int)m_materials.size()-1; i>=0; i-- )
|
||||
{
|
||||
if (m_materials[i]->getTexFname()==image)
|
||||
{
|
||||
m_materials[i]->adjustForFog(parent, &(mb->getMaterial()), use_fog);
|
||||
return;
|
||||
}
|
||||
} // for i
|
||||
} // adjustForFog
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void MaterialManager::setAllUntexturedMaterialFlags(scene::IMeshBuffer *mb) const
|
||||
{
|
||||
for(int i = (int)m_materials.size()-1; i>=0; i-- )
|
||||
|
@@ -25,7 +25,7 @@
|
||||
namespace irr
|
||||
{
|
||||
namespace video { class ITexture; }
|
||||
namespace scene { class IMeshBuffer; }
|
||||
namespace scene { class IMeshBuffer; class ISceneNode; }
|
||||
}
|
||||
using namespace irr;
|
||||
|
||||
@@ -52,6 +52,10 @@ public:
|
||||
void loadMaterial ();
|
||||
void setAllMaterialFlags(video::ITexture* t,
|
||||
scene::IMeshBuffer *mb) const;
|
||||
void adjustForFog(video::ITexture* t,
|
||||
scene::IMeshBuffer *mb,
|
||||
scene::ISceneNode* parent,
|
||||
bool use_fog) const;
|
||||
|
||||
void setAllUntexturedMaterialFlags(scene::IMeshBuffer *mb) const;
|
||||
|
||||
|
@@ -59,14 +59,17 @@ void AbstractTopLevelContainer::addWidgetsRecursively(PtrVector<Widget>& widgets
|
||||
// adjusts to its contents)
|
||||
if ((widgets[n].m_w < 1 || widgets[n].m_h < 1) &&
|
||||
widgets[n].getType() != WTYPE_RIBBON &&
|
||||
widgets[n].getType() != WTYPE_ICON_BUTTON)
|
||||
widgets[n].getType() != WTYPE_ICON_BUTTON &&
|
||||
widgets[n].getType() != WTYPE_SPACER)
|
||||
{
|
||||
std::cerr << "/!\\ Warning /!\\ : widget " << widgets[n].m_properties[PROP_ID].c_str() << " has no dimensions" << std::endl;
|
||||
std::cerr << "/!\\ Warning /!\\ : widget " << widgets[n].m_properties[PROP_ID].c_str()
|
||||
<< " of type " << widgets[n].getType() << " has no dimensions" << std::endl;
|
||||
}
|
||||
|
||||
if (widgets[n].m_x == -1 || widgets[n].m_y == -1)
|
||||
{
|
||||
std::cerr << "/!\\ Warning /!\\ : widget " << widgets[n].m_properties[PROP_ID].c_str() << " has no position" << std::endl;
|
||||
std::cerr << "/!\\ Warning /!\\ : widget " << widgets[n].m_properties[PROP_ID].c_str()
|
||||
<< " of type " << widgets[n].getType() << " has no position" << std::endl;
|
||||
}
|
||||
|
||||
widgets[n].add();
|
||||
|
@@ -73,6 +73,8 @@ void ModalDialog::loadFromFile(const char* xmlFile)
|
||||
beforeAddingWidgets();
|
||||
|
||||
addWidgetsRecursively(m_widgets);
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -103,6 +103,9 @@ namespace GUIEngine
|
||||
*/
|
||||
virtual void beforeAddingWidgets() {}
|
||||
|
||||
/** \brief Optional callback invoked after widgets have been add()ed */
|
||||
virtual void init() {}
|
||||
|
||||
/**
|
||||
* \brief Implementing callback from AbstractTopLevelContainer
|
||||
*/
|
||||
|
@@ -32,6 +32,7 @@ ScalableFont::ScalableFont(IGUIEnvironment *env, const io::path& filename)
|
||||
m_fallback_kerning_width = 0;
|
||||
m_fallback_font_scale = 1.0f;
|
||||
m_scale = 1.0f;
|
||||
m_tab_stop = 0.5f;
|
||||
m_is_hollow_copy = false;
|
||||
m_black_border = false;
|
||||
m_shadow = false;
|
||||
@@ -479,8 +480,8 @@ void ScalableFont::draw(const core::stringw& text,
|
||||
{
|
||||
const int where = text.findFirst(L'\t');
|
||||
core::stringw substr = text.subString(0, where-1);
|
||||
text_dimension = getDimension(text.c_str());
|
||||
offset.X += (position.getWidth()/2 - text_dimension.Width);
|
||||
text_dimension = getDimension(substr.c_str()) + getDimension(L"XX");
|
||||
offset.X += (int)(position.getWidth()*m_tab_stop - text_dimension.Width);
|
||||
}
|
||||
|
||||
// ---- collect character locations
|
||||
@@ -493,10 +494,11 @@ void ScalableFont::draw(const core::stringw& text,
|
||||
{
|
||||
wchar_t c = text[i];
|
||||
|
||||
//hack: one tab character is supported, it moves the cursor to the middle of the area
|
||||
//hack: one tab character is supported, it moves the cursor to the tab stop
|
||||
if (c == L'\t')
|
||||
{
|
||||
offset.X = position.UpperLeftCorner.X + position.getWidth()/2;
|
||||
offset.X = (int)(position.UpperLeftCorner.X
|
||||
+ position.getWidth()*m_tab_stop);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@@ -59,6 +59,10 @@ class ScalableFont : public IGUIFontBitmap
|
||||
|
||||
bool m_is_hollow_copy;
|
||||
bool m_rtl;
|
||||
|
||||
/** Position in range [0..1] of the single tab stop we support */
|
||||
float m_tab_stop;
|
||||
|
||||
public:
|
||||
|
||||
bool m_black_border;
|
||||
@@ -136,6 +140,9 @@ public:
|
||||
|
||||
void updateRTL();
|
||||
|
||||
/** \param pos position of the tab stop, in range [0..1] */
|
||||
void setTabStop(float pos) { m_tab_stop = pos; }
|
||||
|
||||
private:
|
||||
|
||||
struct SFontArea
|
||||
|
@@ -143,7 +143,7 @@ void Screen::parseScreenFileDiv(irr::io::IXMLReader* xml, PtrVector<Widget>& app
|
||||
}
|
||||
else if (wcscmp(L"spacer", xml->getNodeName()) == 0)
|
||||
{
|
||||
append_to.push_back(new Widget(WTYPE_NONE));
|
||||
append_to.push_back(new Widget(WTYPE_SPACER));
|
||||
}
|
||||
else if (wcscmp(L"ribbon_grid", xml->getNodeName()) == 0)
|
||||
{
|
||||
|
@@ -621,6 +621,7 @@ X##_yflip.LowerRightCorner.Y = w->m_skin_dest_y + (w->m_skin_dest_y2 - w->m_skin
|
||||
*/
|
||||
void Skin::drawButton(Widget* w, const core::rect< s32 > &rect, const bool pressed, const bool focused)
|
||||
{
|
||||
|
||||
// if within an appearing dialog, grow
|
||||
if (m_dialog && m_dialog_size < 1.0f && w->m_parent != NULL && w->m_parent->getType() == gui::EGUIET_WINDOW)
|
||||
{
|
||||
@@ -737,6 +738,12 @@ void Skin::drawRibbonChild(const core::rect< s32 > &rect, Widget* widget, const
|
||||
/* tab-bar ribbons */
|
||||
if (type == RIBBON_TABS)
|
||||
{
|
||||
video::SMaterial& material2D = irr_driver->getVideoDriver()->getMaterial2D();
|
||||
for (unsigned int n=0; n<MATERIAL_MAX_TEXTURES; n++)
|
||||
{
|
||||
material2D.UseMipMaps = false;
|
||||
}
|
||||
|
||||
const bool mouseIn = rect.isPointInside(irr_driver->getDevice()->getCursorControl()->getPosition());
|
||||
|
||||
BoxRenderParams* params;
|
||||
@@ -765,7 +772,10 @@ void Skin::drawRibbonChild(const core::rect< s32 > &rect, Widget* widget, const
|
||||
|
||||
drawBoxFromStretchableTexture(widget, rect2, *params, parentRibbon->m_deactivated || widget->m_deactivated);
|
||||
|
||||
|
||||
for (unsigned int n=0; n<MATERIAL_MAX_TEXTURES; n++)
|
||||
{
|
||||
material2D.UseMipMaps = true;
|
||||
}
|
||||
}
|
||||
/* icon ribbons */
|
||||
else
|
||||
@@ -1268,16 +1278,8 @@ void Skin::drawListSelection(const core::rect< s32 > &rect, Widget* widget, bool
|
||||
ListWidget* list = dynamic_cast<ListWidget*>(widget);
|
||||
assert(list != NULL);
|
||||
|
||||
if (focused)
|
||||
{
|
||||
drawBoxFromStretchableTexture(&list->m_selection_skin_info, rect,
|
||||
SkinConfig::m_render_params["listitem::focused"], false, clip);
|
||||
}
|
||||
else
|
||||
{
|
||||
drawBoxFromStretchableTexture(&list->m_selection_skin_info, rect,
|
||||
SkinConfig::m_render_params["listitem::down"], false, clip);
|
||||
}
|
||||
drawBoxFromStretchableTexture(&list->m_selection_skin_info, rect,
|
||||
SkinConfig::m_render_params["listitem::focused"], false, clip);
|
||||
}
|
||||
|
||||
void Skin::drawListHeader(const irr::core::rect< irr::s32 > &rect, Widget* widget)
|
||||
|
@@ -58,6 +58,7 @@ void BubbleWidget::add()
|
||||
irrwidget = GUIEngine::getGUIEnv()->addStaticText(message.c_str(), m_shrinked_size,
|
||||
false, true /* word wrap */, m_parent,
|
||||
(m_focusable ? getNewID() : getNewNoFocusID()));
|
||||
irrwidget->setTextRestrainedInside(false);
|
||||
|
||||
#if IRRLICHT_VERSION_MAJOR > 1 || (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR >= 8)
|
||||
irrwidget->setRightToLeft( translations->isRTLLanguage() );
|
||||
|
@@ -1042,9 +1042,9 @@ bool DynamicRibbonWidget::findItemInRows(const char* name, int* p_row, int* p_id
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
bool DynamicRibbonWidget::setSelection(int item_id, const int playerID, const bool focusIt)
|
||||
bool DynamicRibbonWidget::setSelection(int item_id, const int playerID, const bool focusIt, bool evenIfDeactivated)
|
||||
{
|
||||
if (m_deactivated) return false;
|
||||
if (m_deactivated && !evenIfDeactivated) return false;
|
||||
|
||||
//printf("****DynamicRibbonWidget::setSelection()****\n");
|
||||
|
||||
@@ -1098,16 +1098,16 @@ bool DynamicRibbonWidget::setSelection(int item_id, const int playerID, const bo
|
||||
return true;
|
||||
}
|
||||
// -----------------------------------------------------------------------------
|
||||
bool DynamicRibbonWidget::setSelection(const std::string item_codename, const int playerID, const bool focusIt)
|
||||
bool DynamicRibbonWidget::setSelection(const std::string item_codename, const int playerID, const bool focusIt, bool evenIfDeactivated)
|
||||
{
|
||||
if (m_deactivated) return false;
|
||||
if (m_deactivated && !evenIfDeactivated) return false;
|
||||
|
||||
const int item_count = m_items.size();
|
||||
for (int n=0; n<item_count; n++)
|
||||
{
|
||||
if (m_items[n].m_code_name == item_codename)
|
||||
{
|
||||
return setSelection(n, playerID, focusIt);
|
||||
return setSelection(n, playerID, focusIt, evenIfDeactivated);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
@@ -250,14 +250,14 @@ namespace GUIEngine
|
||||
* \param item_id In range [0 .. number of items added through 'addItem' - 1]
|
||||
* \return Whether setting the selection was successful (whether the item exists)
|
||||
*/
|
||||
bool setSelection(int item_id, const int playerID, const bool focusIt);
|
||||
bool setSelection(int item_id, const int playerID, const bool focusIt, bool evenIfDeactivated=false);
|
||||
|
||||
/**
|
||||
* \brief Select an item from its codename.
|
||||
*
|
||||
* \return Whether setting the selection was successful (whether the item exists)
|
||||
*/
|
||||
bool setSelection(const std::string item_codename, const int playerID, const bool focusIt);
|
||||
bool setSelection(const std::string item_codename, const int playerID, const bool focusIt, bool evenIfDeactivated=false);
|
||||
|
||||
/** \brief Callback from parent class Widget. */
|
||||
virtual void elementRemoved();
|
||||
|
@@ -43,7 +43,7 @@ ListWidget::ListWidget() : Widget(WTYPE_LIST)
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void ListWidget::setIcons(STKModifiedSpriteBank* icons)
|
||||
void ListWidget::setIcons(STKModifiedSpriteBank* icons, int size)
|
||||
{
|
||||
m_use_icons = (icons != NULL);
|
||||
m_icons = icons;
|
||||
@@ -57,12 +57,19 @@ void ListWidget::setIcons(STKModifiedSpriteBank* icons)
|
||||
|
||||
// determine needed height
|
||||
int item_height = 0;
|
||||
const core::array< core::rect<s32> >& rects = m_icons->getPositions();
|
||||
const int count = rects.size();
|
||||
for (int n=0; n<count; n++)
|
||||
if (size > 0)
|
||||
{
|
||||
const int h = rects[n].getHeight();
|
||||
if (h > item_height) item_height = h;
|
||||
item_height = size;
|
||||
}
|
||||
else
|
||||
{
|
||||
const core::array< core::rect<s32> >& rects = m_icons->getPositions();
|
||||
const int count = rects.size();
|
||||
for (int n=0; n<count; n++)
|
||||
{
|
||||
const int h = rects[n].getHeight();
|
||||
if (h > item_height) item_height = h;
|
||||
}
|
||||
}
|
||||
|
||||
if (item_height > 0)
|
||||
@@ -90,8 +97,15 @@ void ListWidget::add()
|
||||
|
||||
if (m_header.size() > 0)
|
||||
{
|
||||
const int col_size = m_w / m_header.size();
|
||||
//const int col_size = m_w / m_header.size();
|
||||
|
||||
int proportion_total = 0;
|
||||
for (unsigned int n=0; n<m_header.size(); n++)
|
||||
{
|
||||
proportion_total += m_header[n].m_proportion;
|
||||
}
|
||||
|
||||
int x = m_x;
|
||||
for (unsigned int n=0; n<m_header.size(); n++)
|
||||
{
|
||||
std::ostringstream name;
|
||||
@@ -106,10 +120,13 @@ void ListWidget::add()
|
||||
header->m_y = m_y;
|
||||
header->m_h = header_height;
|
||||
|
||||
header->m_x = m_x + col_size*n;
|
||||
header->m_w = col_size;
|
||||
header->m_x = x;
|
||||
header->m_w = (int)(m_w * float(m_header[n].m_proportion)
|
||||
/ float(proportion_total));
|
||||
|
||||
header->setText( m_header[n] );
|
||||
x += header->m_w;
|
||||
|
||||
header->setText( m_header[n].m_text );
|
||||
header->m_properties[PROP_ID] = name.str();
|
||||
|
||||
header->add();
|
||||
|
@@ -66,8 +66,20 @@ namespace GUIEngine
|
||||
|
||||
ButtonWidget* m_selected_column;
|
||||
|
||||
struct Column
|
||||
{
|
||||
irr::core::stringw m_text;
|
||||
int m_proportion;
|
||||
|
||||
Column(irr::core::stringw text, int proportion)
|
||||
{
|
||||
m_text = text;
|
||||
m_proportion = proportion;
|
||||
}
|
||||
};
|
||||
|
||||
/** Leave empty for no header */
|
||||
std::vector< irr::core::stringw > m_header;
|
||||
std::vector< Column > m_header;
|
||||
|
||||
IListWidgetHeaderListener* m_listener;
|
||||
|
||||
@@ -94,7 +106,7 @@ namespace GUIEngine
|
||||
* you're done with it (but do not delete it when the list widget is still active)
|
||||
* \pre may only be called after the widget has been added to the screen with add()
|
||||
*/
|
||||
void setIcons(irr::gui::STKModifiedSpriteBank* icons);
|
||||
void setIcons(irr::gui::STKModifiedSpriteBank* icons, int size=-1);
|
||||
|
||||
|
||||
// ---- contents management
|
||||
@@ -193,8 +205,11 @@ namespace GUIEngine
|
||||
}
|
||||
|
||||
/** To be called before Widget::add(); columns are persistent across multiple add/remove cycles
|
||||
* \param proportion A column with proportion 2 will be twice as large as a column with proportion 1
|
||||
*/
|
||||
void addColumn(irr::core::stringw col) { m_header.push_back( col ); }
|
||||
void addColumn(irr::core::stringw col, int proportion=1) { m_header.push_back( Column(col, proportion) ); }
|
||||
|
||||
void clearColumns() { m_header.clear(); }
|
||||
};
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
// Xcode build configuration
|
||||
|
||||
HEADER_SEARCH_PATHS = /usr/local/include /usr/include /Library/Frameworks/IrrFramework.framework/Versions/A/Headers/ "$(PROJECT_DIR)/../../" "$(PROJECT_DIR)/../../bullet/src" "$(PROJECT_DIR)/../../enet/include" /Library/Frameworks/fribidi.framework/Headers
|
||||
HEADER_SEARCH_PATHS = /Library/Frameworks/IrrFramework.framework/Versions/A/Headers/ "$(PROJECT_DIR)/../../" "$(PROJECT_DIR)/../../bullet/src" "$(PROJECT_DIR)/../../enet/include" /Library/Frameworks/fribidi.framework/Headers /Library/Frameworks/Ogg.framework/Headers /Library/Frameworks/Vorbis.framework/Headers /usr/local/include /usr/include
|
||||
|
||||
OTHER_CFLAGS = -Wall -DHAVE_OGGVORBIS=1 -DHAS_SOCKLEN_T -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAS_POLL=1 -DHAS_FCNTL=1 -DHAS_INET_PTON=1 -DHAS_INET_NTOP=1 -DHAS_MSGHDR_FLAGS=1 -DENABLE_NLS=1 -DHAVE_GETTEXT=1 -DHAVE_GLUT=1 -DHAVE_IRRLICHT=1 -DPACKAGE="\"supertuxkart\"" -D__MACOSX__=1 -DHAVE_RTT=0 -DENABLE_BIDI=1 -fvisibility=hidden
|
||||
|
||||
|
@@ -15,9 +15,9 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.7.1b</string>
|
||||
<string>0.7.2</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.7.1b</string>
|
||||
<string>0.7.2</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
<key>CFBundleIdentifier</key>
|
||||
|
@@ -539,6 +539,10 @@ void FileManager::checkAndCreateConfigDir()
|
||||
} // checkAndCreateConfigDir
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
/** Creates the directories for the addons data. This will set m_addons_dir
|
||||
* with the appropriate path, and also create the subdirectories in this
|
||||
* directory.
|
||||
*/
|
||||
void FileManager::checkAndCreateAddonsDir()
|
||||
{
|
||||
#if defined(WIN32)
|
||||
@@ -548,40 +552,60 @@ void FileManager::checkAndCreateAddonsDir()
|
||||
m_addons_dir += "/Library/Application Support/SuperTuxKart/Addons";
|
||||
#else
|
||||
// Remaining unix variants. Use the new standards for config directory
|
||||
// i.e. either XDG_CONFIG_HOME or $HOME/.config
|
||||
if (getenv("XDG_DATA_HOME")!=NULL){
|
||||
// i.e. either XDG_CONFIG_HOME or $HOME/.local/share
|
||||
|
||||
bool dir_ok = false;
|
||||
|
||||
if (getenv("XDG_DATA_HOME")!=NULL)
|
||||
{
|
||||
m_addons_dir = getenv("XDG_DATA_HOME");
|
||||
dir_ok = checkAndCreateDirectory(m_addons_dir);
|
||||
if(!dir_ok)
|
||||
std::cerr << "[FileManager] Cannot create $XDG_DATA_HOME.\n";
|
||||
|
||||
// Do an additional test here, e.g. in case that XDG_DATA_HOME is '/'
|
||||
// and since dir_ok is set, it would not test any of the other options
|
||||
// like $HOME/.local/share
|
||||
dir_ok = checkAndCreateDirectory(m_addons_dir+"/supertuxkart");
|
||||
if(!dir_ok)
|
||||
std::cerr << "[FileManager] Cannot create $XDG_DATA_HOME/supertuxkart.\n";
|
||||
}
|
||||
else if (!getenv("HOME"))
|
||||
{
|
||||
std::cerr << "No home directory, this should NOT happen "
|
||||
<< "- trying '.addons' for addons files!\n";
|
||||
m_addons_dir = "stkaddons";
|
||||
}
|
||||
else
|
||||
|
||||
if(!dir_ok && getenv("HOME"))
|
||||
{
|
||||
// Use ~/.local/share :
|
||||
m_addons_dir = getenv("HOME");
|
||||
m_addons_dir += "/.local/share";
|
||||
if(!checkAndCreateDirectory(m_config_dir))
|
||||
{
|
||||
// If $HOME/.config can not be created:
|
||||
fprintf(stderr,
|
||||
"Can't create dir '%s', falling back to use '%s'.\n",
|
||||
m_config_dir.c_str(), getenv("HOME"));
|
||||
m_addons_dir = getenv("HOME");
|
||||
m_addons_dir += ".";
|
||||
}
|
||||
// This tests for ".local" and then for ".local/share"
|
||||
dir_ok = checkAndCreateDirectoryP(m_addons_dir);
|
||||
if(!dir_ok)
|
||||
std::cerr << "[FileManager] Cannot create $HOME/.local/share.\n";
|
||||
}
|
||||
if(!dir_ok && getenv("HOME"))
|
||||
{
|
||||
// Use ~/.stkaddons :
|
||||
m_addons_dir = getenv("HOME");
|
||||
m_addons_dir += "/.stkaddons";
|
||||
dir_ok = checkAndCreateDirectory(m_addons_dir);
|
||||
if(!dir_ok)
|
||||
std::cerr << "[FileManager] Cannot create $HOME/.stkaddons.\n";
|
||||
}
|
||||
|
||||
if(!dir_ok)
|
||||
{
|
||||
std::cerr << "[FileManager] Falling back to use '.'.";
|
||||
m_addons_dir = ".";
|
||||
}
|
||||
|
||||
m_addons_dir += "/supertuxkart";
|
||||
if(!checkAndCreateDirectory(m_config_dir))
|
||||
dir_ok = checkAndCreateDirectory(m_addons_dir);
|
||||
if(!dir_ok)
|
||||
{
|
||||
// If $HOME/.config can not be created:
|
||||
fprintf(stderr,
|
||||
"Can't create dir '%s', falling back to use '%s'.\n",
|
||||
m_config_dir.c_str(), getenv("HOME"));
|
||||
m_addons_dir = getenv("HOME");
|
||||
m_addons_dir += ".";
|
||||
// If the directory can not be created, abort
|
||||
std::cerr << " [FileManager] Cannot create directory '"
|
||||
<< m_addons_dir<<"', falling back to use '.'.\n";
|
||||
m_addons_dir=".";
|
||||
|
||||
}
|
||||
m_addons_dir += "/addons";
|
||||
|
||||
@@ -590,19 +614,20 @@ void FileManager::checkAndCreateAddonsDir()
|
||||
if(!checkAndCreateDirectory(m_addons_dir))
|
||||
{
|
||||
fprintf(stderr,
|
||||
"Can not create add-ons dir '%s', falling back to '.'.\n",
|
||||
"[FileManager] Can not create add-ons dir '%s', falling back to '.'.\n",
|
||||
m_addons_dir.c_str());
|
||||
m_config_dir = ".";
|
||||
m_addons_dir = ".";
|
||||
}
|
||||
std::cout << "[FileManager] Addons files will be stored in '"<<m_addons_dir<<"'.\n";
|
||||
|
||||
if (!checkAndCreateDirectory(m_addons_dir + "/icons/"))
|
||||
{
|
||||
fprintf(stderr, "Failed to create add-ons icon dir at '%s'\n",
|
||||
fprintf(stderr, "[FileManager] Failed to create add-ons icon dir at '%s'\n",
|
||||
(m_addons_dir + "/icons/").c_str());
|
||||
}
|
||||
if (!checkAndCreateDirectory(m_addons_dir + "/tmp/"))
|
||||
{
|
||||
fprintf(stderr, "Failed to create add-ons tmp dir at '%s'\n",
|
||||
fprintf(stderr, "[FileManager] Failed to create add-ons tmp dir at '%s'\n",
|
||||
(m_addons_dir + "/tmp/").c_str());
|
||||
}
|
||||
} // checkAndCreateAddonsDir
|
||||
|
@@ -113,6 +113,7 @@ void PowerupManager::loadAllPowerups()
|
||||
for(unsigned int i=0; i<root->getNumNodes(); i++)
|
||||
{
|
||||
const XMLNode *node=root->getNode(i);
|
||||
if(node->getName()!="item") continue;
|
||||
std::string name;
|
||||
node->get("name", &name);
|
||||
PowerupType type = getPowerupType(name);
|
||||
|
22
src/main.cpp
@@ -235,9 +235,9 @@ void cmdLineHelp (char* invocation)
|
||||
"Run SuperTuxKart, a racing game with go-kart that features"
|
||||
" the Tux and friends.\n\n"
|
||||
"Options:\n"
|
||||
" -N, --no-start-screen Immediatgely start race without showing a menu.\n"
|
||||
" -N, --no-start-screen Immediately start race without showing a menu.\n"
|
||||
" -t, --track NAME Start at track NAME (see --list-tracks).\n"
|
||||
" --gp name Start the specified Grand Prix."
|
||||
" --gp name Start the specified Grand Prix.\n"
|
||||
" --stk-config FILE use ./data/FILE instead of ./data/stk_config.xml\n"
|
||||
" -l, --list-tracks Show available tracks.\n"
|
||||
" -k, --numkarts NUM Number of karts on the racetrack.\n"
|
||||
@@ -588,6 +588,17 @@ int handleCmdLine(int argc, char **argv)
|
||||
{
|
||||
race_manager->setTrack(argv[i+1]);
|
||||
fprintf ( stdout, "You choose to start in track: %s.\n", argv[i+1] ) ;
|
||||
|
||||
Track* t = track_manager->getTrack(argv[i+1]);
|
||||
if (t == NULL)
|
||||
{
|
||||
fprintf(stderr, "Can't find track named <%s>\n", argv[i+1]);
|
||||
exit(1);
|
||||
}
|
||||
if (t->isArena())
|
||||
{
|
||||
race_manager->setMinorMode(RaceManager::MINOR_MODE_3_STRIKES);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -974,6 +985,12 @@ int main(int argc, char *argv[] )
|
||||
UserConfigParams::m_internet_status = NetworkHttp::IPERM_ALLOWED;
|
||||
GUIEngine::ModalDialog::dismiss();
|
||||
network_http = new NetworkHttp();
|
||||
// Note that the network thread must be started after
|
||||
// the assignment to network_http (since the thread
|
||||
// might use network_http, otherwise a race condition
|
||||
// can be introduced resulting in a crash).
|
||||
network_http->startNetworkThread();
|
||||
|
||||
} // onConfirm
|
||||
// --------------------------------------------------------
|
||||
virtual void onCancel()
|
||||
@@ -982,6 +999,7 @@ int main(int argc, char *argv[] )
|
||||
UserConfigParams::m_internet_status = NetworkHttp::IPERM_NOT_ALLOWED;
|
||||
GUIEngine::ModalDialog::dismiss();
|
||||
network_http = new NetworkHttp();
|
||||
network_http->startNetworkThread();
|
||||
} // onCancel
|
||||
}; // ConfirmServer
|
||||
|
||||
|
@@ -50,6 +50,9 @@ LinearWorld::LinearWorld() : WorldWithRank()
|
||||
void LinearWorld::init()
|
||||
{
|
||||
WorldWithRank::init();
|
||||
|
||||
assert(!m_track->isArena());
|
||||
|
||||
m_last_lap_sfx_played = false;
|
||||
m_last_lap_sfx_playing = false;
|
||||
const unsigned int kart_amount = m_karts.size();
|
||||
@@ -564,12 +567,12 @@ void LinearWorld::moveKartAfterRescue(Kart* kart)
|
||||
info.m_track_sector = info.m_last_valid_sector;
|
||||
}
|
||||
|
||||
// Removing 1 here makes it less likely to fall in a rescue loop since the
|
||||
// kart moves back on each attempt. This is still a weak hack. Also some
|
||||
// other code depends on 1 being substracted, like 'forceRescue'
|
||||
if ( info.m_track_sector > 0 ) info.m_track_sector-- ;
|
||||
info.m_last_valid_sector = info.m_track_sector;
|
||||
if ( info.m_last_valid_sector > 0 ) info.m_last_valid_sector --;
|
||||
// Using the predecessor has the additional afvantage (besides punishing
|
||||
// the player a bit more) that it makes it less likely to fall in a
|
||||
// rescue loop since the kart moves back on each attempt.
|
||||
const QuadGraph &qg = m_track->getQuadGraph();
|
||||
info.m_track_sector = qg.getNode(info.m_track_sector).getPredecessor();
|
||||
info.m_last_valid_sector= qg.getNode(info.m_track_sector).getPredecessor();
|
||||
|
||||
kart->setXYZ( m_track->trackToSpatial(info.m_track_sector) );
|
||||
|
||||
|
@@ -185,6 +185,12 @@ void ThreeStrikesBattle::updateKartRanks()
|
||||
*/
|
||||
bool ThreeStrikesBattle::isRaceOver()
|
||||
{
|
||||
// for tests : never over when we have a single player there :)
|
||||
if (race_manager->getNumPlayers() < 2)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return getCurrentNumKarts()==1 || getCurrentNumPlayers()==0;
|
||||
} // isRaceOver
|
||||
|
||||
|
@@ -103,9 +103,6 @@ void WorldStatus::enterRaceOverState()
|
||||
*/
|
||||
void WorldStatus::terminateRace()
|
||||
{
|
||||
// FIXME JH: this is not necessary anymore,
|
||||
// since registering the gui with the state manager
|
||||
// does the same. pause(RESULT_DISPLAY_PHASE);
|
||||
if(network_manager->getMode()==NetworkManager::NW_SERVER)
|
||||
network_manager->sendRaceResults();
|
||||
} // terminateRace
|
||||
@@ -130,8 +127,17 @@ void WorldStatus::update(const float dt)
|
||||
m_track_intro_sound->play();
|
||||
return;
|
||||
case TRACK_INTRO_PHASE:
|
||||
if(m_track_intro_sound->getStatus()==SFXManager::SFX_PLAYING)
|
||||
m_auxiliary_timer += dt;
|
||||
// Work around a bug that occurred on linux once:
|
||||
// the sfx_manager kept on reporting that it is playing,
|
||||
// while it was not - so STK would never reach the ready
|
||||
// ... phase. Since the sound effect is about 3 seconds
|
||||
// long, we use the aux timer to force the next phase
|
||||
// after 3.5 seconds.
|
||||
if(m_track_intro_sound->getStatus()==SFXManager::SFX_PLAYING
|
||||
&& m_auxiliary_timer<3.5f)
|
||||
return;
|
||||
m_auxiliary_timer = 0.0f;
|
||||
m_prestart_sound->play();
|
||||
m_phase = READY_PHASE;
|
||||
for(unsigned int i=0; i<World::getWorld()->getNumKarts(); i++)
|
||||
|
@@ -52,7 +52,7 @@ GrandPrixData::GrandPrixData(const std::string filename) throw(std::logic_error)
|
||||
delete root;
|
||||
throw std::logic_error("File contents are incomplete or corrupt");
|
||||
}
|
||||
m_name = _LTR(temp_name.c_str());
|
||||
m_name = temp_name.c_str();
|
||||
foundName = true;
|
||||
}
|
||||
else
|
||||
|
@@ -27,15 +27,15 @@
|
||||
#include <irrString.h>
|
||||
#include <stdexcept>
|
||||
|
||||
#include "utils/translation.hpp"
|
||||
|
||||
/** Simple class that hold the data relevant to a 'grand_prix', aka. a number
|
||||
* of races that has to be completed one after the other
|
||||
* \ingroup race
|
||||
*/
|
||||
class GrandPrixData
|
||||
{
|
||||
irr::core::stringw m_name; //!< The name of the grand prix - might be translated!
|
||||
|
||||
//irr::core::stringw m_description; //!< Description for this GP
|
||||
irr::core::stringw m_name; //!< The name of the grand prix
|
||||
|
||||
std::string m_id; //!< Internal name of the grand prix, not translated
|
||||
std::string m_filename; //!< Original filename, only for error handling needed
|
||||
@@ -58,8 +58,8 @@ public:
|
||||
GrandPrixData (const std::string filename) throw(std::logic_error);
|
||||
GrandPrixData () {}; // empty for initialising
|
||||
|
||||
/** @return the (potentially translated) user-visible name of the Grand Prix */
|
||||
const irr::core::stringw& getName () const { return m_name; }
|
||||
/** @return the (potentially translated) user-visible name of the Grand Prix (apply fribidi as needed) */
|
||||
const irr::core::stringw getName () const { return _LTR(m_name.c_str()); }
|
||||
|
||||
/** @return the (potentially translated) user-visible description of the Grand Prix */
|
||||
//const irr::core::stringw& getDescription () const { return m_description; }
|
||||
|
@@ -84,6 +84,7 @@ void RaceManager::setPlayerKart(unsigned int player_id, const RemoteKartInfo& ki
|
||||
|
||||
void RaceManager::setLocalKartInfo(unsigned int player_id, const std::string& kart)
|
||||
{
|
||||
assert(kart.size() > 0);
|
||||
assert(0<=player_id && player_id <m_local_player_karts.size());
|
||||
assert(kart_properties_manager->getKart(kart) != NULL);
|
||||
|
||||
|
@@ -21,9 +21,10 @@
|
||||
|
||||
#include "addons/addons_manager.hpp"
|
||||
#include "addons/network_http.hpp"
|
||||
#include "guiengine/CGUISpriteBank.h"
|
||||
#include "guiengine/scalable_font.hpp"
|
||||
#include "guiengine/widget.hpp"
|
||||
#include "guiengine/widgets/ribbon_widget.hpp"
|
||||
#include "guiengine/CGUISpriteBank.h"
|
||||
#include "io/file_manager.hpp"
|
||||
#include "states_screens/dialogs/addons_loading.hpp"
|
||||
#include "states_screens/state_manager.hpp"
|
||||
@@ -48,19 +49,34 @@ void AddonsScreen::loadedFromFile()
|
||||
+ "/no-package.png" );
|
||||
video::ITexture* icon3 = irr_driver->getTexture( file_manager->getGUIDir()
|
||||
+ "/package-update.png" );
|
||||
|
||||
video::ITexture* icon4 = irr_driver->getTexture( file_manager->getGUIDir()
|
||||
+ "/package-featured.png");
|
||||
video::ITexture* icon5 = irr_driver->getTexture( file_manager->getGUIDir()
|
||||
+ "/no-package-featured.png");
|
||||
|
||||
m_icon_bank = new irr::gui::STKModifiedSpriteBank( GUIEngine::getGUIEnv());
|
||||
m_icon_installed = m_icon_bank->addTextureAsSprite(icon1);
|
||||
m_icon_not_installed = m_icon_bank->addTextureAsSprite(icon2);
|
||||
m_icon_bank->addTextureAsSprite(icon4);
|
||||
m_icon_bank->addTextureAsSprite(icon5);
|
||||
m_icon_needs_update = m_icon_bank->addTextureAsSprite(icon3);
|
||||
|
||||
GUIEngine::ListWidget* w_list =
|
||||
getWidget<GUIEngine::ListWidget>("list_addons");
|
||||
w_list->addColumn( L"Add-on name" );
|
||||
w_list->addColumn( L"Updated date" );
|
||||
GUIEngine::ListWidget* w_list = getWidget<GUIEngine::ListWidget>("list_addons");
|
||||
w_list->setColumnListener(this);
|
||||
} // loadedFromFile
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void AddonsScreen::beforeAddingWidget()
|
||||
{
|
||||
GUIEngine::ListWidget* w_list = getWidget<GUIEngine::ListWidget>("list_addons");
|
||||
assert(w_list != NULL);
|
||||
w_list->clearColumns();
|
||||
w_list->addColumn( _("Add-on name"), 2 );
|
||||
w_list->addColumn( _("Updated date"), 1 );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void AddonsScreen::init()
|
||||
@@ -68,13 +84,19 @@ void AddonsScreen::init()
|
||||
Screen::init();
|
||||
getWidget<GUIEngine::RibbonWidget>("category")->setDeactivated();
|
||||
|
||||
// FIXME: return tab stop to the center when leaving this screen!!
|
||||
GUIEngine::getFont()->setTabStop(0.66f);
|
||||
|
||||
if(UserConfigParams::logAddons())
|
||||
std::cout << "[addons] Using directory <" + file_manager->getAddonsDir()
|
||||
<< ">\n";
|
||||
|
||||
GUIEngine::ListWidget* w_list =
|
||||
getWidget<GUIEngine::ListWidget>("list_addons");
|
||||
w_list->setIcons(m_icon_bank);
|
||||
|
||||
float wanted_icon_height = getHeight()/8.0f;
|
||||
m_icon_bank->setScale(wanted_icon_height/128.0f);
|
||||
w_list->setIcons(m_icon_bank, (int)(wanted_icon_height));
|
||||
|
||||
m_type = "kart";
|
||||
|
||||
@@ -83,6 +105,13 @@ void AddonsScreen::init()
|
||||
loadList();
|
||||
} // init
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void AddonsScreen::tearDown()
|
||||
{
|
||||
GUIEngine::getFont()->setTabStop(0.5f);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
/** Loads the list of all addons of the given type. The gui element will be
|
||||
* updated.
|
||||
@@ -97,6 +126,9 @@ void AddonsScreen::loadList()
|
||||
const Addon &addon = addons_manager->getAddon(i);
|
||||
// Ignore addons of a different type
|
||||
if(addon.getType()!=m_type) continue;
|
||||
// Ignore invisible addons
|
||||
if(addon.testStatus(Addon::AS_INVISIBLE))
|
||||
continue;
|
||||
if(!UserConfigParams::m_artist_debug_mode &&
|
||||
!addon.testStatus(Addon::AS_APPROVED) )
|
||||
continue;
|
||||
@@ -133,15 +165,20 @@ void AddonsScreen::loadList()
|
||||
s = _("%s by %s\t%s", addon->getName().c_str(),
|
||||
addon->getDesigner().c_str(),
|
||||
addon->getDateAsString().c_str());
|
||||
|
||||
// we have no icon for featured+updateme, so if an add-on is updatable forget about the featured icon
|
||||
if (addon->testStatus(Addon::AS_FEATURED) && icon != m_icon_needs_update)
|
||||
{
|
||||
icon += 2;
|
||||
}
|
||||
|
||||
w_list->addItem(addon->getId(), s.c_str(), icon);
|
||||
|
||||
// Highlight the entry if it's features for normal users,
|
||||
// or if it's not approved in artists debug mode.
|
||||
if( (!UserConfigParams::m_artist_debug_mode &&
|
||||
addon->testStatus(Addon::AS_FEATURED)) ||
|
||||
(UserConfigParams::m_artist_debug_mode &&
|
||||
!addon->testStatus(Addon::AS_APPROVED)))
|
||||
// Highlight if it's not approved in artists debug mode.
|
||||
if(UserConfigParams::m_artist_debug_mode && !addon->testStatus(Addon::AS_APPROVED))
|
||||
{
|
||||
w_list->markItemRed(addon->getId(), true);
|
||||
}
|
||||
}
|
||||
|
||||
getWidget<GUIEngine::RibbonWidget>("category")->setActivated();
|
||||
|
@@ -71,9 +71,13 @@ public:
|
||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||
virtual void eventCallback(GUIEngine::Widget* widget, const std::string& name, const int playerID);
|
||||
|
||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||
virtual void beforeAddingWidget();
|
||||
|
||||
virtual void onColumnClicked(int columnId);
|
||||
|
||||
virtual void init();
|
||||
virtual void tearDown();
|
||||
|
||||
void setLastSelected();
|
||||
|
||||
|
@@ -150,8 +150,9 @@ void ChallengesScreen::eventCallback(GUIEngine::Widget* widget, const std::strin
|
||||
InputDevice* device = input_manager->getDeviceList()->getLatestUsedDevice();
|
||||
|
||||
// Create player and associate player with device (FIXME: ask for player ident)
|
||||
StateManager::get()->createActivePlayer( UserConfigParams::m_all_players.get(0), device );
|
||||
|
||||
int id = StateManager::get()->createActivePlayer( UserConfigParams::m_all_players.get(0), device );
|
||||
input_manager->getDeviceList()->setSinglePlayer( StateManager::get()->getActivePlayer(id) );
|
||||
|
||||
// Set up race manager appropriately
|
||||
race_manager->setNumLocalPlayers(1);
|
||||
race_manager->setLocalKartInfo(0, UserConfigParams::m_default_kart);
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include "addons/request.hpp"
|
||||
#include "config/user_config.hpp"
|
||||
#include "guiengine/engine.hpp"
|
||||
#include "guiengine/scalable_font.hpp"
|
||||
#include "guiengine/widgets.hpp"
|
||||
#include "input/input_manager.hpp"
|
||||
#include "io/file_manager.hpp"
|
||||
@@ -98,8 +99,8 @@ void AddonsLoading::beforeAddingWidgets()
|
||||
{
|
||||
// In non artist-debug-mode only approved items will be shown anyway,
|
||||
// but give even tester an idea about the status:
|
||||
if(m_addon.testStatus(Addon::AS_APPROVED))
|
||||
l.push_back("approved");
|
||||
if (!m_addon.testStatus(Addon::AS_APPROVED))
|
||||
l.push_back("NOT APPROVED");
|
||||
|
||||
// Note that an approved addon should never have alpha, beta, or
|
||||
// RC status - and only one of those should be used
|
||||
@@ -118,7 +119,6 @@ void AddonsLoading::beforeAddingWidgets()
|
||||
if(m_addon.testStatus(Addon::AS_FEATURED))
|
||||
l.push_back(_("featured"));
|
||||
|
||||
//
|
||||
GUIEngine::LabelWidget *flags = getWidget<LabelWidget>("flags");
|
||||
if(flags)
|
||||
{
|
||||
@@ -159,6 +159,15 @@ void AddonsLoading::beforeAddingWidgets()
|
||||
getWidget<LabelWidget>("size")->setText(size, false);
|
||||
} // AddonsLoading
|
||||
|
||||
void AddonsLoading::init()
|
||||
{
|
||||
GUIEngine::LabelWidget* flags = getWidget<LabelWidget>("flags");
|
||||
if (flags)
|
||||
{
|
||||
flags->getIrrlichtElement<IGUIStaticText>()->setOverrideFont(GUIEngine::getSmallFont());
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
GUIEngine::EventPropagation
|
||||
|
@@ -63,6 +63,8 @@ public:
|
||||
|
||||
virtual void beforeAddingWidgets();
|
||||
|
||||
virtual void init();
|
||||
|
||||
/** This function is called by the GUI, all the frame (or somthing like
|
||||
* that). It checks the flags (m_can_load_icon and
|
||||
* and do the necessary.
|
||||
|
@@ -245,12 +245,10 @@ void TrackInfoDialog::updateHighScores()
|
||||
|
||||
// Check if this entry is filled or still empty
|
||||
if (n < amount)
|
||||
{
|
||||
char buffer[256];
|
||||
|
||||
{
|
||||
highscores->getEntry(n, kart_name, name, &time);
|
||||
|
||||
sprintf(buffer, " : %.2f s\n", time);
|
||||
|
||||
std::string time_string = StringUtils::timeToString(time);
|
||||
|
||||
const KartProperties* prop = kart_properties_manager->getKart(kart_name);
|
||||
if (prop != NULL)
|
||||
@@ -259,7 +257,7 @@ void TrackInfoDialog::updateHighScores()
|
||||
ITexture* kart_icon_texture = irr_driver->getTexture( icon_path );
|
||||
m_kart_icons[n]->setImage(kart_icon_texture);
|
||||
}
|
||||
line = name + buffer;
|
||||
line = name + "\t" + core::stringw(time_string.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -236,7 +236,8 @@ public:
|
||||
std::string m_kartInternalName;
|
||||
|
||||
PlayerKartWidget(KartSelectionScreen* parent, StateManager::ActivePlayer* associatedPlayer,
|
||||
core::recti area, const int playerID, const int irrlichtWidgetID=-1) : Widget(WTYPE_DIV)
|
||||
core::recti area, const int playerID, std::string kartGroup,
|
||||
const int irrlichtWidgetID=-1) : Widget(WTYPE_DIV)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
assert(associatedPlayer->ok());
|
||||
@@ -312,13 +313,23 @@ public:
|
||||
// Init kart model
|
||||
const std::string default_kart = UserConfigParams::m_default_kart;
|
||||
const KartProperties* props = kart_properties_manager->getKart(default_kart);
|
||||
|
||||
if(!props)
|
||||
{
|
||||
// If the default kart can't be found (e.g. previously a addon
|
||||
// kart was used, but the addon package was removed), use the
|
||||
// first kart as a default. This way we don't have to hardcode
|
||||
// any kart names.
|
||||
props = kart_properties_manager->getKartById(0);
|
||||
int id = kart_properties_manager->getKartByGroup(kartGroup, 0);
|
||||
if (id == -1)
|
||||
{
|
||||
props = kart_properties_manager->getKartById(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
props = kart_properties_manager->getKartById(id);
|
||||
}
|
||||
|
||||
if(!props)
|
||||
{
|
||||
fprintf(stderr,
|
||||
@@ -327,11 +338,12 @@ public:
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
m_kartInternalName = props->getIdent();
|
||||
|
||||
const KartModel &kart_model = props->getMasterKartModel();
|
||||
|
||||
m_model_view->addModel( kart_model.getModel(), Vec3(0,0,0),
|
||||
(float)kart_model.getBaseFrame() );
|
||||
m_model_view->addModel( kart_model.getModel(), Vec3(0,0,0), Vec3(35.0f, 35.0f, 35.0f),
|
||||
kart_model.getBaseFrame() );
|
||||
m_model_view->addModel( kart_model.getWheelModel(0),
|
||||
kart_model.getWheelGraphicsPosition(0) );
|
||||
m_model_view->addModel( kart_model.getWheelModel(1),
|
||||
@@ -1093,8 +1105,13 @@ bool KartSelectionScreen::playerJoin(InputDevice* device, bool firstPlayer)
|
||||
const int new_player_id = StateManager::get()->createActivePlayer( profileToUse, device );
|
||||
StateManager::ActivePlayer* aplayer = StateManager::get()->getActivePlayer(new_player_id);
|
||||
|
||||
RibbonWidget* tabs = getWidget<RibbonWidget>("kartgroups");
|
||||
assert(tabs != NULL);
|
||||
|
||||
std::string selected_kart_group = tabs->getSelectionIDString(PLAYER_ID_GAME_MASTER);
|
||||
|
||||
// ---- Create player/kart widget
|
||||
PlayerKartWidget* newPlayerWidget = new PlayerKartWidget(this, aplayer, kartsArea, m_kart_widgets.size());
|
||||
PlayerKartWidget* newPlayerWidget = new PlayerKartWidget(this, aplayer, kartsArea, m_kart_widgets.size(), selected_kart_group);
|
||||
|
||||
manualAddWidget(newPlayerWidget);
|
||||
m_kart_widgets.push_back(newPlayerWidget);
|
||||
@@ -1306,6 +1323,12 @@ void KartSelectionScreen::playerConfirm(const int playerID)
|
||||
{
|
||||
UserConfigParams::m_default_kart = selection;
|
||||
}
|
||||
|
||||
if (m_kart_widgets[playerID].getKartInternalName().size() == 0)
|
||||
{
|
||||
sfx_manager->quickSound( "anvil" );
|
||||
return;
|
||||
}
|
||||
|
||||
const int amount = m_kart_widgets.size();
|
||||
|
||||
|