merging trunk and fixing compilation issues
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/hilnius@13689 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
commit
262f70205c
@ -292,7 +292,7 @@ endif()
|
||||
install(TARGETS supertuxkart RUNTIME DESTINATION ${STK_INSTALL_BINARY_DIR} BUNDLE DESTINATION .)
|
||||
install(DIRECTORY ${STK_DATA_DIR} DESTINATION ${STK_INSTALL_DATA_DIR} PATTERN ".svn" EXCLUDE)
|
||||
install(FILES ${PROJECT_BINARY_DIR}/supertuxkart.desktop DESTINATION share/applications)
|
||||
install(FILES data/supertuxkart_32.xpm data/supertuxkart_64.xpm DESTINATION share/pixmaps)
|
||||
install(FILES data/supertuxkart_32.png data/supertuxkart_128.png DESTINATION share/pixmaps)
|
||||
|
||||
set(PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
configure_file(data/supertuxkart_desktop.template supertuxkart.desktop)
|
||||
|
@ -14,7 +14,7 @@ desktopdir = $(prefix)/share/applications
|
||||
desktop_DATA = supertuxkart.desktop
|
||||
|
||||
icondir = $(prefix)/share/pixmaps
|
||||
dist_icon_DATA = supertuxkart_32.xpm supertuxkart_64.xpm
|
||||
dist_icon_DATA = supertuxkart_32.png supertuxkart_128.png
|
||||
|
||||
|
||||
# The desktop file needs the absolute path to the binary
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 13 KiB |
@ -26,7 +26,7 @@
|
||||
<icon-button id="expert" width="128" height="128" icon="gui/difficulty_hard.png"
|
||||
I18N="Difficulty" text="Expert"/>
|
||||
<icon-button id="best" width="128" height="128" icon="gui/difficulty_best.png"
|
||||
I18N="Difficulty" text="Iron man"/>
|
||||
I18N="Difficulty" text="SuperTux"/>
|
||||
</ribbon>
|
||||
|
||||
<spacer proportion="1" width="25"/>
|
||||
|
BIN
data/supertuxkart_128.png
Normal file
BIN
data/supertuxkart_128.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
BIN
data/supertuxkart_32.png
Normal file
BIN
data/supertuxkart_32.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
@ -1,226 +0,0 @@
|
||||
/* XPM */
|
||||
static char * supertuxkart_32_xpm[] = {
|
||||
"32 32 191 2",
|
||||
" c None",
|
||||
". c #000000",
|
||||
"+ c #C4C4C4",
|
||||
"@ c #939392",
|
||||
"# c #888887",
|
||||
"$ c #BDBCB4",
|
||||
"% c #FACA00",
|
||||
"& c #CFA400",
|
||||
"* c #262315",
|
||||
"= c #850303",
|
||||
"- c #920000",
|
||||
"; c #8A0002",
|
||||
"> c #820000",
|
||||
", c #860000",
|
||||
"' c #860001",
|
||||
") c #700000",
|
||||
"! c #050200",
|
||||
"~ c #D2AB00",
|
||||
"{ c #D9B100",
|
||||
"] c #D4AD00",
|
||||
"^ c #E6B900",
|
||||
"/ c #C84C4A",
|
||||
"( c #B90000",
|
||||
"_ c #B70000",
|
||||
": c #C32D2B",
|
||||
"< c #A50000",
|
||||
"[ c #B40000",
|
||||
"} c #AD0000",
|
||||
"| c #AE0004",
|
||||
"1 c #AC0000",
|
||||
"2 c #A30106",
|
||||
"3 c #FEFFFF",
|
||||
"4 c #E8C115",
|
||||
"5 c #E9C019",
|
||||
"6 c #FFFFFF",
|
||||
"7 c #2E2D2B",
|
||||
"8 c #462C1D",
|
||||
"9 c #F7F7F7",
|
||||
"0 c #FAFAF8",
|
||||
"a c #FAFAFA",
|
||||
"b c #434343",
|
||||
"c c #262726",
|
||||
"d c #6A6A6A",
|
||||
"e c #F6F6F6",
|
||||
"f c #EEECEC",
|
||||
"g c #FEFDFD",
|
||||
"h c #020202",
|
||||
"i c #575857",
|
||||
"j c #E1E2E1",
|
||||
"k c #0C0C0C",
|
||||
"l c #1E1F1E",
|
||||
"m c #F0C9B3",
|
||||
"n c #EEEEEE",
|
||||
"o c #232323",
|
||||
"p c #F4F4F4",
|
||||
"q c #6B6B6B",
|
||||
"r c #040404",
|
||||
"s c #070807",
|
||||
"t c #262626",
|
||||
"u c #141514",
|
||||
"v c #C0A291",
|
||||
"w c #010100",
|
||||
"x c #5A5A5A",
|
||||
"y c #474747",
|
||||
"z c #B5B5B5",
|
||||
"A c #595959",
|
||||
"B c #10100F",
|
||||
"C c #6F5447",
|
||||
"D c #CACACA",
|
||||
"E c #0A0A0A",
|
||||
"F c #8C8C8C",
|
||||
"G c #8E8E8E",
|
||||
"H c #030303",
|
||||
"I c #BB0000",
|
||||
"J c #CB0000",
|
||||
"K c #F0F0F0",
|
||||
"L c #575757",
|
||||
"M c #8E0000",
|
||||
"N c #6A0000",
|
||||
"O c #390000",
|
||||
"P c #B60000",
|
||||
"Q c #F9F9F9",
|
||||
"R c #FBFBFA",
|
||||
"S c #FAFAFB",
|
||||
"T c #D4D4D4",
|
||||
"U c #E6E6E6",
|
||||
"V c #656565",
|
||||
"W c #6E0000",
|
||||
"X c #9E0000",
|
||||
"Y c #A40000",
|
||||
"Z c #220000",
|
||||
"` c #464646",
|
||||
" . c #A10000",
|
||||
".. c #9F0000",
|
||||
"+. c #B80000",
|
||||
"@. c #560000",
|
||||
"#. c #242424",
|
||||
"$. c #FBFCFF",
|
||||
"%. c #F8F8F8",
|
||||
"&. c #FEFEFE",
|
||||
"*. c #ACB4D2",
|
||||
"=. c #A95A01",
|
||||
"-. c #D97B00",
|
||||
";. c #190000",
|
||||
">. c #4A0000",
|
||||
",. c #A60000",
|
||||
"'. c #BC0000",
|
||||
"). c #DB0000",
|
||||
"!. c #B49500",
|
||||
"~. c #E9BD00",
|
||||
"{. c #EABF00",
|
||||
"]. c #E8BA00",
|
||||
"^. c #EDCF59",
|
||||
"/. c #FCFFFF",
|
||||
"(. c #CCAA11",
|
||||
"_. c #BF9C01",
|
||||
":. c #E9BF00",
|
||||
"<. c #E7BC00",
|
||||
"[. c #F4DF00",
|
||||
"}. c #9E0200",
|
||||
"|. c #5B0000",
|
||||
"1. c #A20000",
|
||||
"2. c #EFC800",
|
||||
"3. c #EDC500",
|
||||
"4. c #EECA00",
|
||||
"5. c #EDCB00",
|
||||
"6. c #F0CF00",
|
||||
"7. c #F2D700",
|
||||
"8. c #4D4702",
|
||||
"9. c #C36800",
|
||||
"0. c #A82400",
|
||||
"a. c #980000",
|
||||
"b. c #C20000",
|
||||
"c. c #640000",
|
||||
"d. c #430000",
|
||||
"e. c #0E0000",
|
||||
"f. c #C10000",
|
||||
"g. c #9C0000",
|
||||
"h. c #A30200",
|
||||
"i. c #680000",
|
||||
"j. c #A00000",
|
||||
"k. c #310000",
|
||||
"l. c #2D2D2D",
|
||||
"m. c #A70000",
|
||||
"n. c #E6EDED",
|
||||
"o. c #000101",
|
||||
"p. c #A1A1A1",
|
||||
"q. c #010101",
|
||||
"r. c #B50000",
|
||||
"s. c #A30000",
|
||||
"t. c #B30000",
|
||||
"u. c #5C0000",
|
||||
"v. c #B00000",
|
||||
"w. c #9D0000",
|
||||
"x. c #A80000",
|
||||
"y. c #AA0000",
|
||||
"z. c #900000",
|
||||
"A. c #212120",
|
||||
"B. c #150000",
|
||||
"C. c #A90000",
|
||||
"D. c #AB0000",
|
||||
"E. c #B20000",
|
||||
"F. c #B10000",
|
||||
"G. c #2E2E2E",
|
||||
"H. c #AF0000",
|
||||
"I. c #AE0000",
|
||||
"J. c #BE4E4E",
|
||||
"K. c #DD9C9C",
|
||||
"L. c #F8FFFF",
|
||||
"M. c #F9FFFF",
|
||||
"N. c #B91A1A",
|
||||
"O. c #B52323",
|
||||
"P. c #C46161",
|
||||
"Q. c #D17D7D",
|
||||
"R. c #E4C2C2",
|
||||
"S. c #EFFBFB",
|
||||
"T. c #F1FFFF",
|
||||
"U. c #F0FCFC",
|
||||
"V. c #F0F2F2",
|
||||
"W. c #F3F2F1",
|
||||
"X. c #F4F1F1",
|
||||
"Y. c #F1EFEF",
|
||||
"Z. c #ECF2F2",
|
||||
"`. c #EAEDED",
|
||||
" + c #E9EBEB",
|
||||
".+ c #EBEAEA",
|
||||
"++ c #EAE8E8",
|
||||
"@+ c #EFEDEC",
|
||||
"#+ c #F0ECEA",
|
||||
"$+ c #F1F0F1",
|
||||
"%+ c #E7E6E7",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" . . . . ",
|
||||
" . . . . ",
|
||||
" . . + @ # . ",
|
||||
" . . $ % & * ",
|
||||
" = - ; > , ' ) . ! ~ { ] ^ / ( ",
|
||||
" _ : < [ } | 1 2 . . 3 4 5 6 ",
|
||||
" 7 8 . . 9 0 0 a b ",
|
||||
" c . . d 9 e 6 f g h ",
|
||||
" i j k l m h . n 6 o p 6 q . . ",
|
||||
" r s t u . v w . . x y z n A . . ",
|
||||
" B . . . C . . . . D E . F G H . . . ",
|
||||
" . . . . . . I J . . 6 6 K L 6 . r 6 M N . . . ",
|
||||
" . . . . . O < P P . . Q R S 6 T U V 6 W X Y Z . ",
|
||||
" ` . . . . . ...+.@.. #.$.6 $.%.&.. *.=.-.X ;.) ",
|
||||
" . . . . >.Y ,. .'.).. !.~.{.].^./.(._.{.:.<.[.}. ",
|
||||
" . . . . |...X .1. .2.3.4.5.6.7.8.6.. 9.0.a.< b.. . . . . ",
|
||||
" . . . . . 1 W c.d.e.. f.1. .Y .g.h.i.( j.Y j.k.. l.. . . . ",
|
||||
" . . . . . . . . . . . . j. .Y .< .1.1 1.1.1.m.. n.o.. . . . ",
|
||||
" . p.q.. . . . r.,.j.j.< X < m.j.1.s.1.j.s._ t.u.. . ",
|
||||
" . d q.. . . . v.1.< j.Y j.g.m.j.1... ...w.s.< x.y.z.",
|
||||
" A.q.. . B.b.,.C.,.D...1.,. .s.1.1.Y D.1 E.r.E.F.[ F.",
|
||||
" G.. . } x.x.} E.t.t.F.F.H.I.} I.I.H.1 1 < x.J.K.L.M.",
|
||||
" . . 6 N.v.H.1 C.x.x.y.O.P.Q.R.S.T.U.V.W.X. ",
|
||||
" Y.Z.`. +.+++@+#+$+%+ ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
@ -1,627 +0,0 @@
|
||||
/* XPM */
|
||||
static char * supertuxkart_64_xpm[] = {
|
||||
"64 64 560 2",
|
||||
" c None",
|
||||
". c #000000",
|
||||
"+ c #010101",
|
||||
"@ c #AFAFAF",
|
||||
"# c #FFFFFF",
|
||||
"$ c #0B0B0B",
|
||||
"% c #696969",
|
||||
"& c #7A7A7A",
|
||||
"* c #C4C4C4",
|
||||
"= c #454545",
|
||||
"- c #939392",
|
||||
"; c #040405",
|
||||
"> c #888887",
|
||||
", c #D1D1D1",
|
||||
"' c #8E8E8E",
|
||||
") c #676768",
|
||||
"! c #6D7490",
|
||||
"~ c #080000",
|
||||
"{ c #484D63",
|
||||
"] c #848487",
|
||||
"^ c #282829",
|
||||
"/ c #565963",
|
||||
"( c #BDBCB4",
|
||||
"_ c #927600",
|
||||
": c #FACA00",
|
||||
"< c #FFDC01",
|
||||
"[ c #CFA400",
|
||||
"} c #BFBA7E",
|
||||
"| c #262315",
|
||||
"1 c #181300",
|
||||
"2 c #FFE300",
|
||||
"3 c #EABC00",
|
||||
"4 c #ECC200",
|
||||
"5 c #E7BE01",
|
||||
"6 c #E6BD00",
|
||||
"7 c #EAC001",
|
||||
"8 c #ECBE00",
|
||||
"9 c #EAC500",
|
||||
"0 c #980000",
|
||||
"a c #850303",
|
||||
"b c #8F0000",
|
||||
"c c #920000",
|
||||
"d c #950000",
|
||||
"e c #8A0002",
|
||||
"f c #A40001",
|
||||
"g c #820000",
|
||||
"h c #860000",
|
||||
"i c #770001",
|
||||
"j c #860001",
|
||||
"k c #900000",
|
||||
"l c #700000",
|
||||
"m c #AA0000",
|
||||
"n c #050200",
|
||||
"o c #FFDB00",
|
||||
"p c #D2AB00",
|
||||
"q c #D7B000",
|
||||
"r c #D9B100",
|
||||
"s c #D5AE00",
|
||||
"t c #D4AD00",
|
||||
"u c #D5AD01",
|
||||
"v c #E6B900",
|
||||
"w c #705A69",
|
||||
"x c #C84C4A",
|
||||
"y c #AE0000",
|
||||
"z c #B90000",
|
||||
"A c #B20000",
|
||||
"B c #AD0000",
|
||||
"C c #A50000",
|
||||
"D c #CF8181",
|
||||
"E c #EBDBDB",
|
||||
"F c #6F0000",
|
||||
"G c #8B0101",
|
||||
"H c #8A0000",
|
||||
"I c #970000",
|
||||
"J c #660000",
|
||||
"K c #A70000",
|
||||
"L c #9A0000",
|
||||
"M c #8C0000",
|
||||
"N c #9F0000",
|
||||
"O c #A20000",
|
||||
"P c #A10000",
|
||||
"Q c #A90000",
|
||||
"R c #AB0000",
|
||||
"S c #010000",
|
||||
"T c #81763E",
|
||||
"U c #F3CE2D",
|
||||
"V c #ECBC00",
|
||||
"W c #EBC000",
|
||||
"X c #ECC100",
|
||||
"Y c #EDC300",
|
||||
"Z c #ECBB00",
|
||||
"` c #E0D9AA",
|
||||
" . c #241918",
|
||||
".. c #FFF8F7",
|
||||
"+. c #BC0202",
|
||||
"@. c #CA0000",
|
||||
"#. c #B70000",
|
||||
"$. c #B80000",
|
||||
"%. c #C32D2B",
|
||||
"&. c #AC0303",
|
||||
"*. c #B40000",
|
||||
"=. c #B00002",
|
||||
"-. c #AE0004",
|
||||
";. c #AC0000",
|
||||
">. c #A60001",
|
||||
",. c #A30106",
|
||||
"'. c #710000",
|
||||
"). c #BDBDBC",
|
||||
"!. c #FEFFFF",
|
||||
"~. c #F5ECB8",
|
||||
"{. c #E8C115",
|
||||
"]. c #E7B700",
|
||||
"^. c #E9C019",
|
||||
"/. c #F8F7E1",
|
||||
"(. c #303030",
|
||||
"_. c #F8F7F6",
|
||||
":. c #FBFBFC",
|
||||
"<. c #FDFFFF",
|
||||
"[. c #FBFBFA",
|
||||
"}. c #FCFCFD",
|
||||
"|. c #D9D9D9",
|
||||
"1. c #1B1A19",
|
||||
"2. c #2E2D2B",
|
||||
"3. c #462C1D",
|
||||
"4. c #F7F7F7",
|
||||
"5. c #FAFAFA",
|
||||
"6. c #FAFAF8",
|
||||
"7. c #F9FAF7",
|
||||
"8. c #F9FAFB",
|
||||
"9. c #434343",
|
||||
"0. c #202120",
|
||||
"a. c #262726",
|
||||
"b. c #8C5E47",
|
||||
"c. c #4F4F4F",
|
||||
"d. c #FBFBFB",
|
||||
"e. c #FCFCFC",
|
||||
"f. c #FCFCFB",
|
||||
"g. c #A8A8A8",
|
||||
"h. c #212321",
|
||||
"i. c #4E4038",
|
||||
"j. c #6A6A6A",
|
||||
"k. c #F9F9F9",
|
||||
"l. c #F6F6F6",
|
||||
"m. c #ECEBEB",
|
||||
"n. c #EEECEC",
|
||||
"o. c #FEFDFD",
|
||||
"p. c #020202",
|
||||
"q. c #646764",
|
||||
"r. c #525552",
|
||||
"s. c #2F312F",
|
||||
"t. c #010301",
|
||||
"u. c #1E1F1E",
|
||||
"v. c #272827",
|
||||
"w. c #242623",
|
||||
"x. c #F4E2D9",
|
||||
"y. c #030303",
|
||||
"z. c #7E7C7C",
|
||||
"A. c #B1B0AF",
|
||||
"B. c #D6D4D5",
|
||||
"C. c #EFEFEF",
|
||||
"D. c #777676",
|
||||
"E. c #090909",
|
||||
"F. c #292827",
|
||||
"G. c #030302",
|
||||
"H. c #575857",
|
||||
"I. c #6E706E",
|
||||
"J. c #E1E2E1",
|
||||
"K. c #626462",
|
||||
"L. c #0C0C0C",
|
||||
"M. c #F0C9B3",
|
||||
"N. c #030202",
|
||||
"O. c #EEEEEE",
|
||||
"P. c #FDFDFD",
|
||||
"Q. c #232323",
|
||||
"R. c #2C2C2C",
|
||||
"S. c #F4F4F4",
|
||||
"T. c #6B6B6B",
|
||||
"U. c #0D0D0C",
|
||||
"V. c #2A2B2A",
|
||||
"W. c #676967",
|
||||
"X. c #C4C6C4",
|
||||
"Y. c #4B4D4B",
|
||||
"Z. c #181A18",
|
||||
"`. c #293039",
|
||||
" + c #82BCDF",
|
||||
".+ c #D9B39C",
|
||||
"++ c #020101",
|
||||
"@+ c #818182",
|
||||
"#+ c #202020",
|
||||
"$+ c #C5C5C5",
|
||||
"%+ c #F8F8F8",
|
||||
"&+ c #F2F2F2",
|
||||
"*+ c #6D6F6D",
|
||||
"=+ c #040404",
|
||||
"-+ c #070807",
|
||||
";+ c #181918",
|
||||
">+ c #262626",
|
||||
",+ c #141514",
|
||||
"'+ c #080B08",
|
||||
")+ c #42484F",
|
||||
"!+ c #C0A291",
|
||||
"~+ c #010100",
|
||||
"{+ c #3A3A3A",
|
||||
"]+ c #5A5A5A",
|
||||
"^+ c #050505",
|
||||
"/+ c #474747",
|
||||
"(+ c #B5B5B5",
|
||||
"_+ c #595959",
|
||||
":+ c #727272",
|
||||
"<+ c #404240",
|
||||
"[+ c #040604",
|
||||
"}+ c #020302",
|
||||
"|+ c #9A8273",
|
||||
"1+ c #D3D3D3",
|
||||
"2+ c #1C1C1C",
|
||||
"3+ c #7B7B7B",
|
||||
"4+ c #515151",
|
||||
"5+ c #10100F",
|
||||
"6+ c #6F5447",
|
||||
"7+ c #CACACA",
|
||||
"8+ c #707070",
|
||||
"9+ c #0A0A0A",
|
||||
"0+ c #272727",
|
||||
"a+ c #8C8C8C",
|
||||
"b+ c #0D0D0D",
|
||||
"c+ c #273331",
|
||||
"d+ c #220807",
|
||||
"e+ c #1F0000",
|
||||
"f+ c #1E1309",
|
||||
"g+ c #BEBEBE",
|
||||
"h+ c #818181",
|
||||
"i+ c #393939",
|
||||
"j+ c #616161",
|
||||
"k+ c #414141",
|
||||
"l+ c #595858",
|
||||
"m+ c #BB0000",
|
||||
"n+ c #CF0000",
|
||||
"o+ c #CB0000",
|
||||
"p+ c #EB0000",
|
||||
"q+ c #020000",
|
||||
"r+ c #2E2E2E",
|
||||
"s+ c #F8F9F9",
|
||||
"t+ c #F0F0F0",
|
||||
"u+ c #575757",
|
||||
"v+ c #8A8A8A",
|
||||
"w+ c #ECECEC",
|
||||
"x+ c #6A7373",
|
||||
"y+ c #8E0000",
|
||||
"z+ c #6A0000",
|
||||
"A+ c #380000",
|
||||
"B+ c #780000",
|
||||
"C+ c #AF0000",
|
||||
"D+ c #D50000",
|
||||
"E+ c #FAFAFB",
|
||||
"F+ c #E1E1E1",
|
||||
"G+ c #151515",
|
||||
"H+ c #D7D7D7",
|
||||
"I+ c #F9FAFA",
|
||||
"J+ c #6F7474",
|
||||
"K+ c #680000",
|
||||
"L+ c #9E0000",
|
||||
"M+ c #A30000",
|
||||
"N+ c #390000",
|
||||
"O+ c #BE0000",
|
||||
"P+ c #B60000",
|
||||
"Q+ c #D80000",
|
||||
"R+ c #D4D4D4",
|
||||
"S+ c #E6E6E6",
|
||||
"T+ c #656565",
|
||||
"U+ c #5B6060",
|
||||
"V+ c #6E0000",
|
||||
"W+ c #B00000",
|
||||
"X+ c #A40000",
|
||||
"Y+ c #850000",
|
||||
"Z+ c #220000",
|
||||
"`+ c #1E0000",
|
||||
" @ c #BC0000",
|
||||
".@ c #BA0000",
|
||||
"+@ c #D10000",
|
||||
"@@ c #1A0000",
|
||||
"#@ c #F7F8F8",
|
||||
"$@ c #424242",
|
||||
"%@ c #14191A",
|
||||
"&@ c #6D0001",
|
||||
"*@ c #B50000",
|
||||
"=@ c #9D0000",
|
||||
"-@ c #540000",
|
||||
";@ c #131313",
|
||||
">@ c #464646",
|
||||
",@ c #060606",
|
||||
"'@ c #BD0000",
|
||||
")@ c #C30000",
|
||||
"!@ c #560000",
|
||||
"~@ c #242424",
|
||||
"{@ c #FBFCFF",
|
||||
"]@ c #FEFEFE",
|
||||
"^@ c #E5E5E5",
|
||||
"/@ c #9E9E9D",
|
||||
"(@ c #ACB4D2",
|
||||
"_@ c #A95A01",
|
||||
":@ c #D97100",
|
||||
"<@ c #D97B00",
|
||||
"[@ c #C31400",
|
||||
"}@ c #730000",
|
||||
"|@ c #190000",
|
||||
"1@ c #030000",
|
||||
"2@ c #070706",
|
||||
"3@ c #313131",
|
||||
"4@ c #300000",
|
||||
"5@ c #800000",
|
||||
"6@ c #313545",
|
||||
"7@ c #FEEFA5",
|
||||
"8@ c #EFD26A",
|
||||
"9@ c #EBC62E",
|
||||
"0@ c #EDCD4F",
|
||||
"a@ c #F6E591",
|
||||
"b@ c #FCFDFF",
|
||||
"c@ c #FDFDFC",
|
||||
"d@ c #494D59",
|
||||
"e@ c #121318",
|
||||
"f@ c #FFDF00",
|
||||
"g@ c #EFC600",
|
||||
"h@ c #E9BF00",
|
||||
"i@ c #E9C000",
|
||||
"j@ c #EEDA00",
|
||||
"k@ c #EABF00",
|
||||
"l@ c #D05C00",
|
||||
"m@ c #830100",
|
||||
"n@ c #A80000",
|
||||
"o@ c #840000",
|
||||
"p@ c #1F1E1E",
|
||||
"q@ c #4A0000",
|
||||
"r@ c #A60000",
|
||||
"s@ c #DB0000",
|
||||
"t@ c #B49500",
|
||||
"u@ c #FFD800",
|
||||
"v@ c #E9BD00",
|
||||
"w@ c #E8BE00",
|
||||
"x@ c #E8BA00",
|
||||
"y@ c #E6B500",
|
||||
"z@ c #EDCF59",
|
||||
"A@ c #FBF1BA",
|
||||
"B@ c #FCFFFF",
|
||||
"C@ c #F5E9B0",
|
||||
"D@ c #CCAA11",
|
||||
"E@ c #BF9C01",
|
||||
"F@ c #E4BA00",
|
||||
"G@ c #E9BC00",
|
||||
"H@ c #E7BC00",
|
||||
"I@ c #EBC700",
|
||||
"J@ c #F4DF00",
|
||||
"K@ c #9E0200",
|
||||
"L@ c #2B2D2D",
|
||||
"M@ c #590000",
|
||||
"N@ c #500000",
|
||||
"O@ c #8B7600",
|
||||
"P@ c #FFDD00",
|
||||
"Q@ c #E6BC00",
|
||||
"R@ c #E8BF00",
|
||||
"S@ c #EABF03",
|
||||
"T@ c #E8BD00",
|
||||
"U@ c #EFBE00",
|
||||
"V@ c #A98800",
|
||||
"W@ c #EFBF00",
|
||||
"X@ c #211700",
|
||||
"Y@ c #413300",
|
||||
"Z@ c #FFD700",
|
||||
"`@ c #EAC200",
|
||||
" # c #EFCC00",
|
||||
".# c #F2D600",
|
||||
"+# c #F1D300",
|
||||
"@# c #E8B300",
|
||||
"## c #E19B00",
|
||||
"$# c #AD1600",
|
||||
"%# c #323232",
|
||||
"&# c #5B0000",
|
||||
"*# c #F6BB00",
|
||||
"=# c #EFC800",
|
||||
"-# c #E8C200",
|
||||
";# c #EDC500",
|
||||
"># c #ECC700",
|
||||
",# c #EECA00",
|
||||
"'# c #EFCD00",
|
||||
")# c #EDCB00",
|
||||
"!# c #EFCB00",
|
||||
"~# c #F0CF00",
|
||||
"{# c #F2D700",
|
||||
"]# c #FCE201",
|
||||
"^# c #4D4702",
|
||||
"/# c #FFED00",
|
||||
"(# c #AB8300",
|
||||
"_# c #C36800",
|
||||
":# c #B84C00",
|
||||
"<# c #A82400",
|
||||
"[# c #C20000",
|
||||
"}# c #490000",
|
||||
"|# c #151617",
|
||||
"1# c #C70000",
|
||||
"2# c #9C0000",
|
||||
"3# c #B10000",
|
||||
"4# c #BF0000",
|
||||
"5# c #E45200",
|
||||
"6# c #ED6E00",
|
||||
"7# c #DA6B00",
|
||||
"8# c #BF6600",
|
||||
"9# c #C05E00",
|
||||
"0# c #B75200",
|
||||
"a# c #B64900",
|
||||
"b# c #B95100",
|
||||
"c# c #B95000",
|
||||
"d# c #B43F00",
|
||||
"e# c #AF2E00",
|
||||
"f# c #AA1C00",
|
||||
"g# c #960000",
|
||||
"h# c #940000",
|
||||
"i# c #440000",
|
||||
"j# c #A00000",
|
||||
"k# c #A20200",
|
||||
"l# c #A80200",
|
||||
"m# c #A00100",
|
||||
"n# c #B30000",
|
||||
"o# c #640000",
|
||||
"p# c #430000",
|
||||
"q# c #290000",
|
||||
"r# c #0E0000",
|
||||
"s# c #090000",
|
||||
"t# c #C10000",
|
||||
"u# c #9B0000",
|
||||
"v# c #A20100",
|
||||
"w# c #A30200",
|
||||
"x# c #A50100",
|
||||
"y# c #310000",
|
||||
"z# c #080808",
|
||||
"A# c #2D2D2D",
|
||||
"B# c #520000",
|
||||
"C# c #230000",
|
||||
"D# c #570000",
|
||||
"E# c #810000",
|
||||
"F# c #5B5B5B",
|
||||
"G# c #C3C3C3",
|
||||
"H# c #990000",
|
||||
"I# c #5D6565",
|
||||
"J# c #E6EDED",
|
||||
"K# c #050707",
|
||||
"L# c #000101",
|
||||
"M# c #5A0000",
|
||||
"N# c #750808",
|
||||
"O# c #984545",
|
||||
"P# c #551616",
|
||||
"Q# c #777777",
|
||||
"R# c #A1A1A1",
|
||||
"S# c #3B0000",
|
||||
"T# c #7A0000",
|
||||
"U# c #5C0000",
|
||||
"V# c #050000",
|
||||
"W# c #B2B2B2",
|
||||
"X# c #C50000",
|
||||
"Y# c #1C0000",
|
||||
"Z# c #4A4A4A",
|
||||
"`# c #A70101",
|
||||
" $ c #C00000",
|
||||
".$ c #A20101",
|
||||
"+$ c #212120",
|
||||
"@$ c #150000",
|
||||
"#$ c #760000",
|
||||
"$$ c #A10202",
|
||||
"%$ c #A70202",
|
||||
"&$ c #2F0000",
|
||||
"*$ c #AD0202",
|
||||
"=$ c #B20808",
|
||||
"-$ c #C34F4F",
|
||||
";$ c #DC7E7E",
|
||||
">$ c #610000",
|
||||
",$ c #B01515",
|
||||
"'$ c #BE4E4E",
|
||||
")$ c #CC7777",
|
||||
"!$ c #DD9C9C",
|
||||
"~$ c #ECE1E1",
|
||||
"{$ c #F8FFFF",
|
||||
"]$ c #FBFFFF",
|
||||
"^$ c #F9FFFF",
|
||||
"/$ c #738484",
|
||||
"($ c #DFA0A0",
|
||||
"_$ c #AD0303",
|
||||
":$ c #B92E2E",
|
||||
"<$ c #C15252",
|
||||
"[$ c #C87474",
|
||||
"}$ c #D38383",
|
||||
"|$ c #DDAAAA",
|
||||
"1$ c #E8D8D8",
|
||||
"2$ c #F3FFFF",
|
||||
"3$ c #F6FFFF",
|
||||
"4$ c #F5FFFF",
|
||||
"5$ c #F1FCFC",
|
||||
"6$ c #EEF1F1",
|
||||
"7$ c #ECEDED",
|
||||
"8$ c #F6F5F4",
|
||||
"9$ c #F5F2F1",
|
||||
"0$ c #585757",
|
||||
"a$ c #EEF9F9",
|
||||
"b$ c #B91A1A",
|
||||
"c$ c #B52323",
|
||||
"d$ c #BB4040",
|
||||
"e$ c #C46161",
|
||||
"f$ c #CA7373",
|
||||
"g$ c #D17D7D",
|
||||
"h$ c #DA9C9C",
|
||||
"i$ c #E4C2C2",
|
||||
"j$ c #EBE5E5",
|
||||
"k$ c #EFFBFB",
|
||||
"l$ c #F1FFFF",
|
||||
"m$ c #F2FFFF",
|
||||
"n$ c #F0FCFC",
|
||||
"o$ c #F0F5F5",
|
||||
"p$ c #F0F2F2",
|
||||
"q$ c #F3F2F1",
|
||||
"r$ c #F5F2F0",
|
||||
"s$ c #F4F1F1",
|
||||
"t$ c #F0ECEC",
|
||||
"u$ c #424040",
|
||||
"v$ c #CE7878",
|
||||
"w$ c #CA7272",
|
||||
"x$ c #CD7C7C",
|
||||
"y$ c #D17F7F",
|
||||
"z$ c #D68181",
|
||||
"A$ c #D99393",
|
||||
"B$ c #DEA6A6",
|
||||
"C$ c #E3BABA",
|
||||
"D$ c #E5CBCB",
|
||||
"E$ c #EADFDF",
|
||||
"F$ c #EDEDED",
|
||||
"G$ c #EFF8F8",
|
||||
"H$ c #F4FFFF",
|
||||
"I$ c #EFFDFD",
|
||||
"J$ c #EEF7F7",
|
||||
"K$ c #EDF2F1",
|
||||
"L$ c #EDEFF0",
|
||||
"M$ c #EAE8E8",
|
||||
"N$ c #F2EFEE",
|
||||
"O$ c #F2EEEC",
|
||||
"P$ c #F6F4F3",
|
||||
"Q$ c #EFEDEE",
|
||||
"R$ c #F1EFEF",
|
||||
"S$ c #F5FAFA",
|
||||
"T$ c #ECF2F2",
|
||||
"U$ c #EAEDED",
|
||||
"V$ c #E9ECEC",
|
||||
"W$ c #E9EBEB",
|
||||
"X$ c #E8E9E9",
|
||||
"Y$ c #EBEAEA",
|
||||
"Z$ c #ECEBEA",
|
||||
"`$ c #EAE9E8",
|
||||
" % c #EFEDEC",
|
||||
".% c #F5F1EE",
|
||||
"+% c #F0ECEA",
|
||||
"@% c #F4F2F1",
|
||||
"#% c #F1F0F1",
|
||||
"$% c #E7E6E7",
|
||||
"%% c #F3F4F4",
|
||||
"&% c #F1F1F2",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" . . . . . ",
|
||||
" . . . . . . . ",
|
||||
" . . . . . . . . . ",
|
||||
" . . . . . . + . . ",
|
||||
" . . . . @ # $ . # % . ",
|
||||
" . . . & * = - ; > , . ",
|
||||
" . . . ' ) . ! ~ { ] ^ ",
|
||||
" . . . / ( _ : < [ } | ",
|
||||
" . . 1 2 3 4 5 6 7 8 9 ",
|
||||
" 0 a b c d e f g c h i j k l m . . n o p q r s t u v w x y z ",
|
||||
" A B C D E F G H I J K L M N C O P Q R . S . T U V W X Y Z ` ...A +. ",
|
||||
" @.#.$.%.# C &.*.A B =.-.A ;.>.,.R '.. . . ).!.~.{.].^./.# (. ",
|
||||
" . . . . . . # _.:.<.!.<.[.}.|. ",
|
||||
" 1.2. 3.. . . . # 4.5.6.7.6.8.5.# 9. ",
|
||||
" 0.0.a. b.. S . . c.# 5.d.d.e.e.f.e.# g.. ",
|
||||
" a.h. i.. . . . j.5.4.k.l.m.# # n.# o.. p.. ",
|
||||
" q.r.s.t.u.v.w. x.. y.. . . z.A.B.C.# D.. . E.. F.G.. . . ",
|
||||
" H.I.J.K.L.y.u. M.. p.. . N.O.P.# P.Q.R.S.# # # T.. . . . ",
|
||||
" U.V.W.X.Y.Z.. . `. +.+. ++. . @+# # # #+. $+# %+}.&+. . . . . ",
|
||||
" *+=+. -+;+>+#+,+'+. )+!+. ~+. . . . {+]+^+/+. (+# O.. _+:+. + . ",
|
||||
" <+. . . . [+}++ . . |+. . . . . y.. . 1+# # 2+3+. 4+# (+. . . . . . . . . ",
|
||||
" 5+^+. . . . . . 6+. . . . . . . . , 7+8+9+. . 0+a+b+' . y.. . . . . . . ",
|
||||
" . . . . . . . . . . c+d+e+f+. . Q.# g+3+h+i+. . j+k+. . . . + # l+. . . . . . . . . ",
|
||||
" . . . . . . . . . . . . m+n+o+p+. q+. r+# s+# # t+. u+# # v+. . =+w+# x+y+K z+A+. . . . . ",
|
||||
" . . . . . . . . . . . . . B+K C+B C+D+. q+. 2+# 5.E+5.P.F+G+. . . . . H+I+# J+K+L+M+;.$.N+. . . . ",
|
||||
" . . . . . . . . . . . N+O+C N P+*.P+Q+. q+. . k.d.[.5.E+5.# # R+&+S+. T+# # U+V+W+L+N X+Y+Z+. . . ",
|
||||
" . b+. . . . . . . . `+ @P N L+K .@$.+@@@. . . (+# 5.d.d.d.%+%+4.#@# $@. # # %@&@*@.@K =@*@I -@. . ",
|
||||
" ;@>@,@. . . . . . . #.P M+P N N '@$.)@!@. . . ~@# {@!.# <.{@d.%+d.]@^@. /@(@. _@:@<@[@L+}@|@l l 1@ ",
|
||||
" 2@3@=+. . . . . . 4@B M+N X+P =@.@$..@5@. . . . 6@7@8@9@0@a@# <.b@c@# d@e@f@o g@h@i@j@k@l@z+m@n@o@ ",
|
||||
" p@. . . . . . . . q@K X+N r@P P M+ @#.s@. . n t@u@v@w@k@i@x@y@z@A@B@C@D@. E@F@k@h@h@G@H@I@J@N K@O ",
|
||||
" L@. . . . . . . . M@O X+P N P M+P O .@)@N@O@P@w@Q@k@h@k@h@R@S@T@U@V@W@o X@Y@Z@`@ #.#J@+#@###$#B #.)@ . . ",
|
||||
" %#. . . . . . . . &#Q N O L+N P M+O L+P *#=#-#;#>#,#'#)#!#~#+#{#]#^#/#~#(#. <@_#:#<#L+0 I C W+[#}#. . . . . . . . . . ",
|
||||
" |#. . . . . . . . q+1#2#n@M+C m 3#*@4#)@5#6#7#8#9#0#a#b#c#d#e#f#g#I L h##.~+i#n@O j#k#l#m#N n#M+. 1@. . . . . . . . . . ",
|
||||
" . . . . . . . . . . N ;.c V+z+o#&#p#q#r#. . s#t#u#O O P P X+C P v#2#w#w#x#K+. z L+j#N X+O j#y y#. . z#A#. . . . . . . . . ",
|
||||
" . . . . . . . . . . B#0 . . . . . . . S q+q+. C#$.P P P j#P O X+M+O M+P N #.. D#M+O P P O P K E#. . F#G#. p.. . . . . . . ",
|
||||
" . . . . . . . . . . . S . . . . . . . . . . . H#j#M+P O X+X+P X+C j#P N O n#;.N O M+O j#O P K N . I#J#K#L#. . . . . . . . ",
|
||||
" . . S . ;@. . . . . . . . . . M#P r@K X+O X+M+M+N N j#M+P O j#L+P j#O X+N O j#r@u#N#O#P#@@. . . . . . . . ",
|
||||
" . Q#R#. + . . . . . . . . S#*@M+r@M+j#j#j#O C j#L+O C O K L+j#O O P M+N O j#j#M+M+;.#.[#n#T#U#V#. . . ",
|
||||
" . W#|.. p.. . . . . . . . . @.r@X+P P j#j#O P K L+N C C M+X+N N O =@K N X+M+X+j#O P O C X+X+;.X#2#Y#. ",
|
||||
" . Z#j.. + . . . . . . . . q@W+u#O r@C j#j#M+X+M+j#M+2#r@K O j#0 O N N `#P C N O =@M+M+K C n@n@r@m X#k ",
|
||||
" y.+ . . . . . . . . . K+ $R n@m O n@X+r@M+j#P r@r@L+P O X+O m d =@.$2#K L+C =@I I L+M+n@Q n@;.;.y B ;.)@",
|
||||
" +$. + . . . . . @$#$[#m r@;.Q ;.r@r@R Q N P O L+r@O P P M+$$O P O %$X+;.R B ;.W+A n#*@*.A n#3#3#*.n#3#m+",
|
||||
" {+. + . . &$T#z *.Q Q B Q B m m W+K R K Q L+P O X+*$n@B R B B B y y C+C+W+W+y y B B R R R Q r@X+K =$-$;$",
|
||||
" r+. . . . >$B R n@y n@W+B C+A R n#y n#3#3#W+3#3#C+y y ;.B B y y y C+C+B ;.;.;.Q C X+n@,$'$)$!$~${$]$^$<.",
|
||||
" . . . . . /$($n@C+B 3#A n#R W+;.R R R ;.y y 3#C+C+W+W+B m n@r@X+C K _$:$<$[$}$|$1$2$3$4$5$6$7$8$9$9$ ",
|
||||
" . . . . 0$# a$b$R W+W+C+B ;.R Q n@n@r@n@n@m y c$d$e$f$g$h$i$j$k$2$l$m$n$o$p$t+q$r$s$t$ ",
|
||||
" . . . u$# n.3$v$w$x$y$z$A$B$C$D$E$F$G$2$H$2$l$I$J$K$L$w+m.M$N$O$P$Q$Q$ ",
|
||||
" l.R$S$T$U$U$V$W$X$Y$Z$M$`$ %.%+%@%#%P$$% ",
|
||||
" 5.%%&% ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
@ -1,6 +1,6 @@
|
||||
[Desktop Entry]
|
||||
Name=SuperTuxKart
|
||||
Icon=@PREFIX@/share/pixmaps/supertuxkart_64.xpm
|
||||
Icon=@PREFIX@/share/pixmaps/supertuxkart_128.png
|
||||
GenericName=A kart racing game
|
||||
GenericName[de_DE]=Ein Kart-Rennspiel
|
||||
GenericName[fr_FR]=Un jeu de karting
|
||||
|
@ -5,8 +5,10 @@ The following changes have been made:
|
||||
- drawall types
|
||||
- materialtype override
|
||||
- skies respect Z
|
||||
- partial backport to expose setCurrentRendertime in the scene mgr
|
||||
- partial backport to expose setCurrentRendertime in the scene mgr (upstream)
|
||||
- a workaround for every other RTTs flipping
|
||||
- aabbox intersection support
|
||||
- aabbox intersection support (upstream)
|
||||
- texture override
|
||||
- non-triangle VBO support
|
||||
- extension order mismatch
|
||||
- support for some RG texture formats
|
||||
|
@ -111,6 +111,14 @@ public:
|
||||
return 24;
|
||||
case ECF_A8R8G8B8:
|
||||
return 32;
|
||||
case ECF_R8:
|
||||
return 8;
|
||||
case ECF_R8G8:
|
||||
return 16;
|
||||
case ECF_R16:
|
||||
return 16;
|
||||
case ECF_R16G16:
|
||||
return 32;
|
||||
case ECF_R16F:
|
||||
return 16;
|
||||
case ECF_G16R16F:
|
||||
|
@ -31,6 +31,12 @@ namespace video
|
||||
//! Default 32 bit color format. 8 bits are used for every component: red, green, blue and alpha.
|
||||
ECF_A8R8G8B8,
|
||||
|
||||
//! The normalized non-float formats from the _rg extension
|
||||
ECF_R8,
|
||||
ECF_R8G8,
|
||||
ECF_R16,
|
||||
ECF_R16G16,
|
||||
|
||||
/** Floating Point formats. The following formats may only be used for render target textures. */
|
||||
|
||||
//! 16 bit floating point format using 16 bits for the red channel.
|
||||
|
@ -4425,6 +4425,23 @@ IImage* COpenGLDriver::createScreenShot(video::ECOLOR_FORMAT format, video::E_RE
|
||||
else
|
||||
type = GL_UNSIGNED_BYTE;
|
||||
break;
|
||||
case ECF_R8G8:
|
||||
// GL_ARB_texture_rg is considered always available in headers. No ifdefs.
|
||||
fmt = GL_RG;
|
||||
type = GL_UNSIGNED_BYTE;
|
||||
break;
|
||||
case ECF_R16G16:
|
||||
fmt = GL_RG;
|
||||
type = GL_UNSIGNED_SHORT;
|
||||
break;
|
||||
case ECF_R8:
|
||||
fmt = GL_RED;
|
||||
type = GL_UNSIGNED_BYTE;
|
||||
break;
|
||||
case ECF_R16:
|
||||
fmt = GL_RED;
|
||||
type = GL_UNSIGNED_SHORT;
|
||||
break;
|
||||
case ECF_R16F:
|
||||
if (FeatureAvailable[IRR_ARB_texture_rg])
|
||||
fmt = GL_RED;
|
||||
|
@ -562,8 +562,8 @@ class COpenGLExtensionHandler
|
||||
IRR_ARB_fragment_shader,
|
||||
IRR_ARB_framebuffer_object,
|
||||
IRR_ARB_framebuffer_sRGB,
|
||||
IRR_ARB_geometry_shader4,
|
||||
IRR_ARB_get_program_binary,
|
||||
IRR_ARB_geometry_shader4,
|
||||
IRR_ARB_gpu_shader5,
|
||||
IRR_ARB_gpu_shader_fp64,
|
||||
IRR_ARB_half_float_pixel,
|
||||
|
@ -159,6 +159,28 @@ GLint COpenGLTexture::getOpenGLFormatAndParametersFromColorFormat(ECOLOR_FORMAT
|
||||
type=GL_UNSIGNED_INT_8_8_8_8_REV;
|
||||
internalformat = GL_RGBA;
|
||||
break;
|
||||
// _rg formats.
|
||||
case ECF_R8:
|
||||
colorformat = GL_RED;
|
||||
type = GL_UNSIGNED_BYTE;
|
||||
internalformat = GL_R8;
|
||||
break;
|
||||
case ECF_R16:
|
||||
colorformat = GL_RED;
|
||||
type = GL_UNSIGNED_SHORT;
|
||||
internalformat = GL_R16;
|
||||
break;
|
||||
case ECF_R8G8:
|
||||
colorformat = GL_RG;
|
||||
type = GL_UNSIGNED_BYTE;
|
||||
internalformat = GL_RG8;
|
||||
break;
|
||||
case ECF_R16G16:
|
||||
colorformat = GL_RG;
|
||||
type = GL_UNSIGNED_SHORT;
|
||||
internalformat = GL_RG16;
|
||||
break;
|
||||
|
||||
// Floating Point texture formats. Thanks to Patryk "Nadro" Nadrowski.
|
||||
case ECF_R16F:
|
||||
{
|
||||
|
@ -288,6 +288,7 @@ src/utils/log.cpp
|
||||
src/utils/profiler.cpp
|
||||
src/utils/random_generator.cpp
|
||||
src/utils/string_utils.cpp
|
||||
src/utils/time.cpp
|
||||
src/utils/translation.cpp
|
||||
src/utils/vec3.cpp
|
||||
)
|
||||
|
@ -510,6 +510,7 @@ supertuxkart_SOURCES = \
|
||||
utils/string_utils.hpp \
|
||||
utils/synchronised.hpp \
|
||||
utils/time.hpp \
|
||||
utils/time.cpp \
|
||||
utils/translation.cpp \
|
||||
utils/translation.hpp \
|
||||
utils/utf8.h \
|
||||
|
@ -162,7 +162,7 @@ void Addon::writeXML(std::ofstream *out_stream)
|
||||
// ----------------------------------------------------------------------------
|
||||
std::string Addon::getDateAsString() const
|
||||
{
|
||||
return Time::toString(m_date);
|
||||
return StkTime::toString(m_date);
|
||||
} // getDateAsString
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -99,7 +99,7 @@ private:
|
||||
* in the addons.xml file. */
|
||||
bool m_still_exists;
|
||||
/** Date when the addon was added. */
|
||||
Time::TimeType m_date;
|
||||
StkTime::TimeType m_date;
|
||||
/** A description of this addon. */
|
||||
core::stringw m_description;
|
||||
/** The URL of the icon (relative to the server) */
|
||||
@ -171,7 +171,7 @@ public:
|
||||
// ------------------------------------------------------------------------
|
||||
/** Returns the date (in seconds since epoch) when the addon was
|
||||
* uploaded. */
|
||||
Time::TimeType getDate() const { return m_date; }
|
||||
StkTime::TimeType getDate() const { return m_date; }
|
||||
// ------------------------------------------------------------------------
|
||||
/** Returns a user readable date as a string. */
|
||||
std::string getDateAsString() const;
|
||||
|
@ -270,7 +270,7 @@ CURLcode NetworkHttp::init(bool forceRefresh)
|
||||
bool download = UserConfigParams::m_news_last_updated==0 ||
|
||||
UserConfigParams::m_news_last_updated
|
||||
+UserConfigParams::m_news_frequency
|
||||
< Time::getTimeSinceEpoch() || forceRefresh;
|
||||
< StkTime::getTimeSinceEpoch() || forceRefresh;
|
||||
|
||||
if(!download)
|
||||
{
|
||||
@ -303,7 +303,7 @@ CURLcode NetworkHttp::init(bool forceRefresh)
|
||||
{
|
||||
std::string xml_file = file_manager->getAddonsFile("news.xml");
|
||||
if(download)
|
||||
UserConfigParams::m_news_last_updated = Time::getTimeSinceEpoch();
|
||||
UserConfigParams::m_news_last_updated = StkTime::getTimeSinceEpoch();
|
||||
const XMLNode *xml = new XMLNode(xml_file);
|
||||
|
||||
// A proper news file has at least a version number, mtime, and
|
||||
@ -319,7 +319,7 @@ CURLcode NetworkHttp::init(bool forceRefresh)
|
||||
status = downloadFileInternal(&r);
|
||||
if(status==CURLE_OK)
|
||||
UserConfigParams::m_news_last_updated =
|
||||
Time::getTimeSinceEpoch();
|
||||
StkTime::getTimeSinceEpoch();
|
||||
delete xml;
|
||||
xml = new XMLNode(xml_file);
|
||||
}
|
||||
@ -416,7 +416,7 @@ CURLcode NetworkHttp::loadAddonsList(const XMLNode *xml,
|
||||
bool forceRefresh)
|
||||
{
|
||||
std::string addon_list_url("");
|
||||
Time::TimeType mtime(0);
|
||||
StkTime::TimeType mtime(0);
|
||||
const XMLNode *include = xml->getNode("include");
|
||||
if(include)
|
||||
{
|
||||
@ -456,7 +456,7 @@ CURLcode NetworkHttp::loadAddonsList(const XMLNode *xml,
|
||||
{
|
||||
std::string xml_file = file_manager->getAddonsFile("addons.xml");
|
||||
if(download)
|
||||
UserConfigParams::m_addons_last_updated=Time::getTimeSinceEpoch();
|
||||
UserConfigParams::m_addons_last_updated=StkTime::getTimeSinceEpoch();
|
||||
const XMLNode *xml = new XMLNode(xml_file);
|
||||
addons_manager->initOnline(xml);
|
||||
if(UserConfigParams::logAddons())
|
||||
|
@ -50,7 +50,7 @@ NewsManager::~NewsManager()
|
||||
*/
|
||||
void NewsManager::init()
|
||||
{
|
||||
UserConfigParams::m_news_last_updated = Time::getTimeSinceEpoch();
|
||||
UserConfigParams::m_news_last_updated = StkTime::getTimeSinceEpoch();
|
||||
|
||||
std::string xml_file = file_manager->getAddonsFile("news.xml");
|
||||
const XMLNode *xml = new XMLNode(xml_file);
|
||||
|
@ -20,11 +20,11 @@
|
||||
#if HAVE_OGGVORBIS
|
||||
|
||||
#include "audio/sfx_openal.hpp"
|
||||
|
||||
#include "audio/sfx_buffer.hpp"
|
||||
#include "config/user_config.hpp"
|
||||
#include "io/file_manager.hpp"
|
||||
#include "race/race_manager.hpp"
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
|
||||
#ifdef __APPLE__
|
||||
# include <OpenAL/al.h>
|
||||
@ -32,8 +32,16 @@
|
||||
# include <AL/al.h>
|
||||
#endif
|
||||
|
||||
#include "config/user_config.hpp"
|
||||
#include "io/file_manager.hpp"
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
|
||||
#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
|
||||
# define isnan _isnan
|
||||
#else
|
||||
# include <math.h>
|
||||
#endif
|
||||
|
||||
|
||||
SFXOpenAL::SFXOpenAL(SFXBuffer* buffer, bool positional, float gain, bool ownsBuffer) : SFXBase()
|
||||
{
|
||||
@ -121,7 +129,7 @@ bool SFXOpenAL::init()
|
||||
*/
|
||||
void SFXOpenAL::speed(float factor)
|
||||
{
|
||||
if(!m_ok) return;
|
||||
if(!m_ok || isnan(factor)) return;
|
||||
|
||||
//OpenAL only accepts pitches in the range of 0.5 to 2.0
|
||||
if(factor > 2.0f)
|
||||
|
@ -79,7 +79,7 @@ void PlayerProfile::incrementUseFrequency()
|
||||
//------------------------------------------------------------------------------
|
||||
int64_t PlayerProfile::generateUniqueId(const char* playerName)
|
||||
{
|
||||
return ((int64_t)(Time::getTimeSinceEpoch()) << 32) |
|
||||
return ((int64_t)(StkTime::getTimeSinceEpoch()) << 32) |
|
||||
((rand() << 16) & 0xFFFF0000) |
|
||||
(StringUtils::simpleHash(playerName) & 0xFFFF);
|
||||
}
|
||||
|
@ -398,7 +398,7 @@ void IntUserConfigParam::findYourDataInAnAttributeOf(const XMLNode* node)
|
||||
} // findYourDataInAnAttributeOf
|
||||
|
||||
// ============================================================================
|
||||
TimeUserConfigParam::TimeUserConfigParam(Time::TimeType default_value,
|
||||
TimeUserConfigParam::TimeUserConfigParam(StkTime::TimeType default_value,
|
||||
const char* param_name,
|
||||
const char* comment)
|
||||
{
|
||||
@ -410,7 +410,7 @@ TimeUserConfigParam::TimeUserConfigParam(Time::TimeType default_value,
|
||||
} // TimeUserConfigParam
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
TimeUserConfigParam::TimeUserConfigParam(Time::TimeType default_value,
|
||||
TimeUserConfigParam::TimeUserConfigParam(StkTime::TimeType default_value,
|
||||
const char* param_name,
|
||||
GroupUserConfigParam* group,
|
||||
const char* comment)
|
||||
|
@ -171,14 +171,14 @@ public:
|
||||
// ============================================================================
|
||||
class TimeUserConfigParam : public UserConfigParam
|
||||
{
|
||||
Time::TimeType m_value;
|
||||
Time::TimeType m_default_value;
|
||||
StkTime::TimeType m_value;
|
||||
StkTime::TimeType m_default_value;
|
||||
|
||||
public:
|
||||
|
||||
TimeUserConfigParam(Time::TimeType default_value, const char* param_name,
|
||||
TimeUserConfigParam(StkTime::TimeType default_value, const char* param_name,
|
||||
const char* comment = NULL);
|
||||
TimeUserConfigParam(Time::TimeType default_value, const char* param_name,
|
||||
TimeUserConfigParam(StkTime::TimeType default_value, const char* param_name,
|
||||
GroupUserConfigParam* group, const char* comment=NULL);
|
||||
|
||||
void write(XMLWriter& stream) const;
|
||||
@ -187,10 +187,10 @@ public:
|
||||
|
||||
irr::core::stringw toString() const;
|
||||
void revertToDefaults() { m_value = m_default_value; }
|
||||
operator Time::TimeType() const { return m_value; }
|
||||
Time::TimeType& operator=(const Time::TimeType& v)
|
||||
operator StkTime::TimeType() const { return m_value; }
|
||||
StkTime::TimeType& operator=(const StkTime::TimeType& v)
|
||||
{ m_value = v; return m_value; }
|
||||
Time::TimeType& operator=(const TimeUserConfigParam& v)
|
||||
StkTime::TimeType& operator=(const TimeUserConfigParam& v)
|
||||
{ m_value = (int)v; return m_value; }
|
||||
}; // TimeUserConfigParam
|
||||
|
||||
|
@ -442,19 +442,12 @@ void Camera::getCameraSettings(float *above_kart, float *cam_angle,
|
||||
*/
|
||||
void Camera::update(float dt)
|
||||
{
|
||||
if (UserConfigParams::m_graphical_effects)
|
||||
{
|
||||
if (m_rain)
|
||||
{
|
||||
m_rain->setPosition( getCameraSceneNode()->getPosition() );
|
||||
m_rain->update(dt);
|
||||
}
|
||||
} // UserConfigParams::m_graphical_effects
|
||||
|
||||
float above_kart, cam_angle, side_way, distance;
|
||||
bool smoothing;
|
||||
|
||||
// The following settings give a debug camera which shows the track from
|
||||
// high above the kart straight down.
|
||||
if(UserConfigParams::m_camera_debug)
|
||||
if (UserConfigParams::m_camera_debug)
|
||||
{
|
||||
core::vector3df xyz = m_kart->getXYZ().toIrrVector();
|
||||
m_camera->setTarget(xyz);
|
||||
@ -464,24 +457,18 @@ void Camera::update(float dt)
|
||||
// To view inside tunnels (FIXME 27>15 why??? makes no sense
|
||||
// - the kart should not be visible, but it works)
|
||||
m_camera->setNearValue(27.0);
|
||||
return;
|
||||
}
|
||||
|
||||
if(m_mode==CM_FINAL)
|
||||
else if (m_mode==CM_FINAL)
|
||||
{
|
||||
handleEndCamera(dt);
|
||||
return;
|
||||
}
|
||||
|
||||
float above_kart, cam_angle, side_way, distance;
|
||||
bool smoothing;
|
||||
getCameraSettings(&above_kart, &cam_angle, &side_way, &distance,
|
||||
&smoothing);
|
||||
|
||||
// If an explosion is happening, stop moving the camera,
|
||||
// but keep it target on the kart.
|
||||
if(dynamic_cast<ExplosionAnimation*>(m_kart->getKartAnimation()))
|
||||
else if (dynamic_cast<ExplosionAnimation*>(m_kart->getKartAnimation()))
|
||||
{
|
||||
getCameraSettings(&above_kart, &cam_angle, &side_way, &distance, &smoothing);
|
||||
// The camera target needs to be 'smooth moved', otherwise
|
||||
// there will be a noticable jump in the first frame
|
||||
|
||||
@ -495,10 +482,19 @@ void Camera::update(float dt)
|
||||
current_target += ((wanted_target-current_target)*m_target_speed)*dt;
|
||||
|
||||
m_camera->setTarget(current_target);
|
||||
return;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
getCameraSettings(&above_kart, &cam_angle, &side_way, &distance, &smoothing);
|
||||
positionCamera(dt, above_kart, cam_angle, side_way, distance, smoothing);
|
||||
}
|
||||
|
||||
if (UserConfigParams::m_graphical_effects && m_rain)
|
||||
{
|
||||
m_rain->setPosition( getCameraSceneNode()->getPosition() );
|
||||
m_rain->update(dt);
|
||||
} // UserConfigParams::m_graphical_effects
|
||||
} // update
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "guiengine/engine.hpp"
|
||||
#include "guiengine/scalable_font.hpp"
|
||||
#include "guiengine/widget.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "io/file_manager.hpp"
|
||||
#include "utils/ptr_vector.hpp"
|
||||
|
||||
@ -28,10 +29,10 @@
|
||||
|
||||
using namespace GUIEngine;
|
||||
|
||||
using namespace irr;
|
||||
using namespace core;
|
||||
using namespace gui;
|
||||
using namespace io;
|
||||
using namespace irr;
|
||||
using namespace scene;
|
||||
using namespace video;
|
||||
|
||||
|
@ -1557,9 +1557,9 @@ void Skin::drawListSelection(const core::recti &rect, Widget* widget,
|
||||
void Skin::drawListHeader(const irr::core::rect< irr::s32 > &rect,
|
||||
Widget* widget)
|
||||
{
|
||||
bool isSelected =(((ListWidget*)widget->m_event_handler)->m_selected_column
|
||||
== widget);
|
||||
|
||||
bool isSelected =
|
||||
(((ListWidget*)widget->m_event_handler)->m_selected_column == widget &&
|
||||
((ListWidget*)widget->m_event_handler)->m_sort_default == false);
|
||||
|
||||
drawBoxFromStretchableTexture(widget, rect,
|
||||
(isSelected ? SkinConfig::m_render_params["list_header::down"]
|
||||
@ -1572,10 +1572,11 @@ void Skin::drawListHeader(const irr::core::rect< irr::s32 > &rect,
|
||||
ITexture* img;
|
||||
if (((ListWidget*)widget->m_event_handler)->m_sort_desc)
|
||||
img =
|
||||
SkinConfig::m_render_params["list_sort_down::neutral"].getImage();
|
||||
SkinConfig::m_render_params["list_sort_up::neutral"].getImage();
|
||||
else
|
||||
img =
|
||||
SkinConfig::m_render_params["list_sort_up::neutral"].getImage();
|
||||
SkinConfig::m_render_params["list_sort_down::neutral"].getImage();
|
||||
|
||||
core::recti destRect(rect.UpperLeftCorner,
|
||||
core::dimension2di(rect.getHeight(),
|
||||
rect.getHeight()));
|
||||
|
@ -26,9 +26,9 @@
|
||||
*/
|
||||
|
||||
|
||||
Time::TimeType getTime()
|
||||
StkTime::TimeType getTime()
|
||||
{
|
||||
return Time::getTimeSinceEpoch();
|
||||
return StkTime::getTimeSinceEpoch();
|
||||
}
|
||||
|
||||
//! constructor
|
||||
|
@ -149,7 +149,7 @@ using namespace gui;
|
||||
gui::IGUIFont *OverrideFont, *LastBreakFont;
|
||||
IOSOperator* Operator;
|
||||
|
||||
Time::TimeType BlinkStartTime;
|
||||
StkTime::TimeType BlinkStartTime;
|
||||
s32 CursorPos;
|
||||
s32 HScrollPos, VScrollPos; // scroll position in characters
|
||||
u32 Max;
|
||||
|
@ -115,7 +115,7 @@ void CGUISTKListBox::removeItem(u32 id)
|
||||
else if ((u32)Selected > id)
|
||||
{
|
||||
Selected -= 1;
|
||||
selectTime = (u32)Time::getTimeSinceEpoch();
|
||||
selectTime = (u32)StkTime::getTimeSinceEpoch();
|
||||
}
|
||||
|
||||
Items.erase(id);
|
||||
@ -205,7 +205,7 @@ void CGUISTKListBox::setSelected(s32 id)
|
||||
else
|
||||
Selected = id;
|
||||
|
||||
selectTime = (u32)Time::getTimeSinceEpoch();
|
||||
selectTime = (u32)StkTime::getTimeSinceEpoch();
|
||||
|
||||
recalculateScrollPos();
|
||||
}
|
||||
@ -397,7 +397,7 @@ bool CGUISTKListBox::OnEvent(const SEvent& event)
|
||||
|
||||
void CGUISTKListBox::selectNew(s32 ypos, bool onlyHover)
|
||||
{
|
||||
u32 now = (u32)Time::getTimeSinceEpoch();
|
||||
u32 now = (u32)StkTime::getTimeSinceEpoch();
|
||||
s32 oldSelected = Selected;
|
||||
|
||||
Selected = getItemAt(AbsoluteRect.UpperLeftCorner.X, ypos);
|
||||
@ -511,7 +511,7 @@ void CGUISTKListBox::draw()
|
||||
iconPos, &clientClip,
|
||||
hasItemOverrideColor(i, EGUI_LBC_ICON_HIGHLIGHT) ?
|
||||
getItemOverrideColor(i, EGUI_LBC_ICON_HIGHLIGHT) : getItemDefaultColor(EGUI_LBC_ICON_HIGHLIGHT),
|
||||
selectTime, (u32)Time::getTimeSinceEpoch(), false, true);
|
||||
selectTime, (u32)StkTime::getTimeSinceEpoch(), false, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -520,7 +520,7 @@ void CGUISTKListBox::draw()
|
||||
iconPos,
|
||||
&clientClip,
|
||||
hasItemOverrideColor(i, EGUI_LBC_ICON) ? getItemOverrideColor(i, EGUI_LBC_ICON) : getItemDefaultColor(EGUI_LBC_ICON),
|
||||
0 , (i==Selected) ? (u32)Time::getTimeSinceEpoch() : 0, false, true);
|
||||
0 , (i==Selected) ? (u32)StkTime::getTimeSinceEpoch() : 0, false, true);
|
||||
}
|
||||
textRect.UpperLeftCorner.X += ItemsIconWidth;
|
||||
}
|
||||
|
@ -41,6 +41,7 @@ ListWidget::ListWidget() : Widget(WTYPE_LIST)
|
||||
m_listener = NULL;
|
||||
m_selected_column = NULL;
|
||||
m_sort_desc = true;
|
||||
m_sort_default = true;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@ -358,6 +359,8 @@ void ListWidget::elementRemoved()
|
||||
}
|
||||
m_header_elements.clearAndDeleteAll();
|
||||
m_selected_column = NULL;
|
||||
m_sort_desc = true;
|
||||
m_sort_default = true;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@ -413,12 +416,22 @@ EventPropagation ListWidget::transmitEvent(Widget* w,
|
||||
|
||||
if (originator.find(m_properties[PROP_ID] + "_column_") != std::string::npos)
|
||||
{
|
||||
int col = originator[ (m_properties[PROP_ID] + "_column_").size() ] - '0';
|
||||
if (m_sort_col != originator[(m_properties[PROP_ID] + "_column_").size()] - '0')
|
||||
{
|
||||
m_sort_desc = false;
|
||||
m_sort_default = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_sort_default = m_sort_desc && !m_sort_default;
|
||||
if (!m_sort_default) m_sort_desc = !m_sort_desc;
|
||||
}
|
||||
|
||||
m_selected_column = m_header_elements.get(col);
|
||||
m_sort_col = originator[(m_properties[PROP_ID] + "_column_").size()] - '0';
|
||||
m_selected_column = m_header_elements.get(m_sort_col);
|
||||
|
||||
/** \brief Allows sort icon to change depending on sort order **/
|
||||
m_sort_desc = !m_sort_desc;
|
||||
|
||||
/*
|
||||
for (int n=0; n<m_header_elements.size(); n++)
|
||||
{
|
||||
@ -427,7 +440,7 @@ EventPropagation ListWidget::transmitEvent(Widget* w,
|
||||
m_header_elements[col].getIrrlichtElement<IGUIButton>()->setPressed(true);
|
||||
*/
|
||||
|
||||
if (m_listener) m_listener->onColumnClicked(col);
|
||||
if (m_listener) m_listener->onColumnClicked(m_sort_col);
|
||||
|
||||
return EVENT_BLOCK;
|
||||
}
|
||||
|
@ -64,6 +64,12 @@ namespace GUIEngine
|
||||
/** \brief whether this list is sorted in descending order */
|
||||
bool m_sort_desc;
|
||||
|
||||
/** true when deault sorting is enabled */
|
||||
bool m_sort_default;
|
||||
|
||||
/** index of column*/
|
||||
int m_sort_col;
|
||||
|
||||
struct Column
|
||||
{
|
||||
irr::core::stringw m_text;
|
||||
|
@ -313,6 +313,7 @@
|
||||
<ClCompile Include="..\..\utils\profiler.cpp" />
|
||||
<ClCompile Include="..\..\utils\random_generator.cpp" />
|
||||
<ClCompile Include="..\..\utils\string_utils.cpp" />
|
||||
<ClCompile Include="..\..\utils\time.cpp" />
|
||||
<ClCompile Include="..\..\utils\translation.cpp" />
|
||||
<ClCompile Include="..\..\utils\vec3.cpp" />
|
||||
<ClCompile Include="..\..\audio\music_information.cpp" />
|
||||
|
@ -870,6 +870,9 @@
|
||||
<ClCompile Include="..\..\guiengine\widgets\rating_bar_widget.cpp">
|
||||
<Filter>Source Files\guiengine\widgets</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\utils\time.cpp">
|
||||
<Filter>Source Files\utils</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\main_loop.hpp">
|
||||
|
@ -757,6 +757,10 @@
|
||||
RelativePath="..\..\utils\string_utils.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\utils\time.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\utils\translation.cpp"
|
||||
>
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "guiengine/event_handler.hpp"
|
||||
#include "guiengine/modaldialog.hpp"
|
||||
#include "guiengine/screen.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "input/device_manager.hpp"
|
||||
#include "input/input.hpp"
|
||||
#include "karts/controller/controller.hpp"
|
||||
|
@ -244,7 +244,7 @@ FileManager::~FileManager()
|
||||
}
|
||||
struct stat mystat;
|
||||
stat(full_path.c_str(), &mystat);
|
||||
Time::TimeType current = Time::getTimeSinceEpoch();
|
||||
StkTime::TimeType current = StkTime::getTimeSinceEpoch();
|
||||
if(current - mystat.st_ctime <24*3600)
|
||||
{
|
||||
if(UserConfigParams::logAddons())
|
||||
|
@ -222,7 +222,7 @@ void RubberBall::getNextControlPoint()
|
||||
|
||||
int next = getSuccessorToHitTarget(m_last_aimed_graph_node, &dist);
|
||||
float d = QuadGraph::get()->getDistanceFromStart(next)-f;
|
||||
while(d<m_st_min_interpolation_distance && d>0)
|
||||
while(d<m_st_min_interpolation_distance && d>=0)
|
||||
{
|
||||
next = getSuccessorToHitTarget(next, &dist);
|
||||
d = QuadGraph::get()->getDistanceFromStart(next)-f;
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "config/user_config.hpp"
|
||||
#include "graphics/camera.hpp"
|
||||
#include "graphics/explosion.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "graphics/material_manager.hpp"
|
||||
#include "graphics/particle_emitter.hpp"
|
||||
#include "graphics/particle_kind.hpp"
|
||||
@ -124,6 +125,7 @@ Kart::Kart (const std::string& ident, unsigned int world_kart_id,
|
||||
m_jump_time = 0;
|
||||
m_is_jumping = false;
|
||||
m_min_nitro_time = 0.0f;
|
||||
m_fire_clicked = 0;
|
||||
|
||||
m_view_blocked_by_plunger = 0;
|
||||
m_has_caught_nolok_bubblegum = false;
|
||||
@ -1145,16 +1147,17 @@ void Kart::update(float dt)
|
||||
|
||||
updatePhysics(dt);
|
||||
|
||||
if(m_controls.m_fire && !m_kart_animation)
|
||||
if(!m_controls.m_fire) m_fire_clicked = 0;
|
||||
|
||||
if(m_controls.m_fire && !m_fire_clicked && !m_kart_animation)
|
||||
{
|
||||
// use() needs to be called even if there currently is no collecteable
|
||||
// since use() can test if something needs to be switched on/off.
|
||||
m_powerup->use() ;
|
||||
World::getWorld()->onFirePressed(getController());
|
||||
m_bubble_drop = true;
|
||||
m_fire_clicked = 1;
|
||||
}
|
||||
// Reset the fire button
|
||||
m_controls.m_fire = 0;
|
||||
|
||||
/* (TODO: add back when properly done)
|
||||
for (int n = 0; n < SFXManager::NUM_CUSTOMS; n++)
|
||||
|
@ -136,6 +136,9 @@ private:
|
||||
/** The torque to apply after hitting a bubble gum. */
|
||||
float m_bubblegum_torque;
|
||||
|
||||
/** True if fire button was pushed and not released */
|
||||
bool m_fire_clicked;
|
||||
|
||||
|
||||
|
||||
// Bullet physics parameters
|
||||
|
@ -196,6 +196,8 @@
|
||||
#include "utils/log.hpp"
|
||||
#include "utils/translation.hpp"
|
||||
|
||||
static void cleanSuperTuxKart();
|
||||
|
||||
// ============================================================================
|
||||
// gamepad visualisation screen
|
||||
// ============================================================================
|
||||
@ -1098,8 +1100,12 @@ int handleCmdLine(int argc, char **argv)
|
||||
#endif
|
||||
else
|
||||
{
|
||||
// invalid param needs to go to console
|
||||
UserConfigParams::m_log_errors_to_console = true;
|
||||
|
||||
Log::error("main", "Invalid parameter: %s.\n", argv[i] );
|
||||
cmdLineHelp(argv[0]);
|
||||
cleanSuperTuxKart();
|
||||
return 0;
|
||||
}
|
||||
} // for i <argc
|
||||
@ -1239,7 +1245,7 @@ void initRest()
|
||||
//=============================================================================
|
||||
/** Frees all manager and their associated memory.
|
||||
*/
|
||||
void cleanSuperTuxKart()
|
||||
static void cleanSuperTuxKart()
|
||||
{
|
||||
irr_driver->updateConfigIfRelevant();
|
||||
|
||||
|
@ -82,7 +82,7 @@ float MainLoop::getLimitedDt()
|
||||
int wait_time = 1000/max_fps - 1000/current_fps;
|
||||
if(wait_time < 1) wait_time = 1;
|
||||
|
||||
Time::sleep(wait_time);
|
||||
StkTime::sleep(wait_time);
|
||||
}
|
||||
else break;
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ void CutsceneWorld::update(float dt)
|
||||
curr->reset();
|
||||
}
|
||||
m_time = 0.01f;
|
||||
m_time_at_second_reset = Time::getRealTime();
|
||||
m_time_at_second_reset = StkTime::getRealTime();
|
||||
m_second_reset = true;
|
||||
}
|
||||
else if (m_second_reset)
|
||||
@ -213,7 +213,7 @@ void CutsceneWorld::update(float dt)
|
||||
}
|
||||
|
||||
//m_time_at_second_reset = m_time;
|
||||
m_time_at_second_reset = Time::getRealTime();
|
||||
m_time_at_second_reset = StkTime::getRealTime();
|
||||
m_time = 0.01f;
|
||||
}
|
||||
else
|
||||
@ -221,7 +221,7 @@ void CutsceneWorld::update(float dt)
|
||||
// this way of calculating time and dt is more in line with what
|
||||
// irrlicht does andprovides better synchronisation
|
||||
double prev_time = m_time;
|
||||
double now = Time::getRealTime();
|
||||
double now = StkTime::getRealTime();
|
||||
m_time = now - m_time_at_second_reset;
|
||||
dt = (float)(m_time - prev_time);
|
||||
}
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "audio/music_manager.hpp"
|
||||
#include "audio/sfx_base.hpp"
|
||||
#include "io/file_manager.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "karts/abstract_kart.hpp"
|
||||
#include "karts/kart.hpp"
|
||||
#include "karts/kart_model.hpp"
|
||||
@ -104,9 +105,9 @@ void SoccerWorld::onCheckGoalTriggered(bool first_goal)
|
||||
{
|
||||
//I18N: soccer mode
|
||||
m_race_gui->addMessage(_("GOAL!"), NULL,
|
||||
/* time */ 3.0f,
|
||||
/* time */ 5.0f,
|
||||
video::SColor(255,255,255,255),
|
||||
/*important*/ true,
|
||||
/*important*/ false,
|
||||
/*big font*/ true);
|
||||
m_team_goals[first_goal ? 0 : 1]++;
|
||||
//printf("Score:\nTeam One %d : %d Team Two\n", m_team_goals[0], m_team_goals[1]);
|
||||
@ -389,11 +390,11 @@ AbstractKart *SoccerWorld::createKart(const std::string &kart_ident, int index,
|
||||
int posIndex = index;
|
||||
if(race_manager->getLocalKartInfo(index).getSoccerTeam() == SOCCER_TEAM_RED)
|
||||
{
|
||||
if(index % 2 != 0) posIndex += 1;
|
||||
if(index % 2 != 1) posIndex += 1;
|
||||
}
|
||||
else if(race_manager->getLocalKartInfo(index).getSoccerTeam() == SOCCER_TEAM_BLUE)
|
||||
{
|
||||
if(index % 2 != 1) posIndex += 1;
|
||||
if(index % 2 != 0) posIndex += 1;
|
||||
}
|
||||
int position = index+1;
|
||||
btTransform init_pos = m_track->getStartTransform(posIndex);
|
||||
|
@ -41,20 +41,15 @@ class Controller;
|
||||
class SoccerWorld : public WorldWithRank
|
||||
{
|
||||
private:
|
||||
/** Number of goals each team scored
|
||||
*/
|
||||
/** Number of goals each team scored */
|
||||
int m_team_goals[NB_SOCCER_TEAMS];
|
||||
/** Number of goals needed to win
|
||||
*/
|
||||
/** Number of goals needed to win */
|
||||
int m_goal_target;
|
||||
/** Whether or not goals can be scored (they are disabled when a point is scored
|
||||
and re-enabled when the next game can be played)*/
|
||||
bool m_can_score_points;
|
||||
SFXBase *m_goal_sound;
|
||||
|
||||
/** Team karts */
|
||||
|
||||
|
||||
public:
|
||||
|
||||
SoccerWorld();
|
||||
|
@ -741,6 +741,7 @@ void World::updateWorld(float dt)
|
||||
race_manager->setNumKarts( 1 );
|
||||
race_manager->setTrack( "tutorial" );
|
||||
race_manager->setDifficulty(RaceManager::DIFFICULTY_EASY);
|
||||
race_manager->setReverseTrack(false);
|
||||
|
||||
// Use keyboard 0 by default (FIXME: let player choose?)
|
||||
InputDevice* device = input_manager->getDeviceList()->getKeyboard(0);
|
||||
|
@ -34,7 +34,7 @@ void* protocolManagerUpdate(void* data)
|
||||
while(manager && !manager->exit())
|
||||
{
|
||||
manager->update();
|
||||
Time::sleep(2);
|
||||
StkTime::sleep(2);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@ -45,7 +45,7 @@ void* protocolManagerAsynchronousUpdate(void* data)
|
||||
while(manager && !manager->exit())
|
||||
{
|
||||
manager->asynchronousUpdate();
|
||||
Time::sleep(2);
|
||||
StkTime::sleep(2);
|
||||
}
|
||||
manager->m_asynchronous_thread_running = false;
|
||||
return NULL;
|
||||
@ -82,10 +82,8 @@ ProtocolManager::~ProtocolManager()
|
||||
void ProtocolManager::abort()
|
||||
{
|
||||
pthread_mutex_unlock(&m_exit_mutex); // will stop the update function
|
||||
while (m_asynchronous_thread_running) // wait the thread to finish before we delete all mutexes etc..
|
||||
{
|
||||
Time::sleep(2);
|
||||
}
|
||||
pthread_join(*m_asynchronous_update_thread, NULL);
|
||||
|
||||
pthread_mutex_lock(&m_events_mutex);
|
||||
pthread_mutex_lock(&m_protocols_mutex);
|
||||
pthread_mutex_lock(&m_asynchronous_protocols_mutex);
|
||||
@ -153,7 +151,7 @@ void ProtocolManager::notifyEvent(Event* event)
|
||||
if (protocols_ids.size() != 0)
|
||||
{
|
||||
EventProcessingInfo epi;
|
||||
epi.arrival_time = Time::getTimeSinceEpoch();
|
||||
epi.arrival_time = StkTime::getTimeSinceEpoch();
|
||||
epi.event = event2;
|
||||
epi.protocols_ids = protocols_ids;
|
||||
m_events_to_process.push_back(epi); // add the event to the queue
|
||||
@ -346,7 +344,7 @@ bool ProtocolManager::propagateEvent(EventProcessingInfo* event, bool synchronou
|
||||
index++;
|
||||
}
|
||||
}
|
||||
if (event->protocols_ids.size() == 0 || (Time::getTimeSinceEpoch()-event->arrival_time) >= TIME_TO_KEEP_EVENTS)
|
||||
if (event->protocols_ids.size() == 0 || (StkTime::getTimeSinceEpoch()-event->arrival_time) >= TIME_TO_KEEP_EVENTS)
|
||||
{
|
||||
// because we made a copy of the event
|
||||
delete event->event->peer; // no more need of that
|
||||
|
@ -97,7 +97,7 @@ void ConnectToPeer::asynchronousUpdate()
|
||||
char data[] = "aloha_stk\0";
|
||||
host->sendRawPacket((uint8_t*)(data), 10, broadcast_address);
|
||||
Log::info("ConnectToPeer", "Broadcast aloha sent.");
|
||||
Time::sleep(1);
|
||||
StkTime::sleep(1);
|
||||
broadcast_address.ip = 0x7f000001; // 127.0.0.1 (localhost)
|
||||
broadcast_address.port = m_peer_address.port;
|
||||
host->sendRawPacket((uint8_t*)(data), 10, broadcast_address);
|
||||
|
@ -243,9 +243,9 @@ void ConnectToServer::asynchronousUpdate()
|
||||
case CONNECTING: // waiting the server to answer our connection
|
||||
{
|
||||
static double timer = 0;
|
||||
if (Time::getRealTime() > timer+5.0) // every 5 seconds
|
||||
if (StkTime::getRealTime() > timer+5.0) // every 5 seconds
|
||||
{
|
||||
timer = Time::getRealTime();
|
||||
timer = StkTime::getRealTime();
|
||||
NetworkManager::getInstance()->connect(m_server_address);
|
||||
Log::info("ConnectToServer", "Trying to connect to %u:%u", m_server_address.ip, m_server_address.port);
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ void KartUpdateProtocol::update()
|
||||
if (!World::getWorld())
|
||||
return;
|
||||
static double time = 0;
|
||||
double current_time = Time::getRealTime();
|
||||
double current_time = StkTime::getRealTime();
|
||||
if (current_time > time + 0.1) // 10 updates per second
|
||||
{
|
||||
time = current_time;
|
||||
|
@ -28,7 +28,7 @@
|
||||
class RaceConfig
|
||||
{
|
||||
int m_world_type;
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
* \class LobbyRoomProtocol
|
||||
|
@ -38,9 +38,9 @@ void PingProtocol::setup()
|
||||
|
||||
void PingProtocol::asynchronousUpdate()
|
||||
{
|
||||
if (Time::getRealTime() > m_last_ping_time+m_delay_between_pings)
|
||||
if (StkTime::getRealTime() > m_last_ping_time+m_delay_between_pings)
|
||||
{
|
||||
m_last_ping_time = Time::getRealTime();
|
||||
m_last_ping_time = StkTime::getRealTime();
|
||||
uint8_t data = 0;
|
||||
NetworkManager::getInstance()->getHost()->sendRawPacket(&data, 1, m_ping_dst);
|
||||
Log::info("PingProtocol", "Ping message sent");
|
||||
|
@ -164,9 +164,9 @@ void ServerLobbyRoomProtocol::checkIncomingConnectionRequests()
|
||||
{
|
||||
// first poll every 5 seconds
|
||||
static double last_poll_time = 0;
|
||||
if (Time::getRealTime() > last_poll_time+10.0)
|
||||
if (StkTime::getRealTime() > last_poll_time+10.0)
|
||||
{
|
||||
last_poll_time = Time::getRealTime();
|
||||
last_poll_time = StkTime::getRealTime();
|
||||
TransportAddress addr = NetworkManager::getInstance()->getPublicAddress();
|
||||
Online::XMLRequest* request = new Online::XMLRequest();
|
||||
request->setURL((std::string)UserConfigParams::m_server_multiplayer + "address-management.php");
|
||||
|
@ -96,7 +96,7 @@ bool SynchronizationProtocol::notifyEventAsynchronous(Event* event)
|
||||
Log::warn("SynchronizationProtocol", "The sequence# %u isn't known.", sequence);
|
||||
return true;
|
||||
}
|
||||
double current_time = Time::getRealTime();
|
||||
double current_time = StkTime::getRealTime();
|
||||
m_total_diff[peer_id] += current_time - m_pings[peer_id][sequence];
|
||||
Log::verbose("SynchronizationProtocol", "InstantPing is %u",
|
||||
(unsigned int)((current_time - m_pings[peer_id][sequence])*1000));
|
||||
@ -121,8 +121,8 @@ void SynchronizationProtocol::setup()
|
||||
|
||||
void SynchronizationProtocol::asynchronousUpdate()
|
||||
{
|
||||
static double timer = Time::getRealTime();
|
||||
double current_time = Time::getRealTime();
|
||||
static double timer = StkTime::getRealTime();
|
||||
double current_time = StkTime::getRealTime();
|
||||
if (m_countdown_activated)
|
||||
{
|
||||
m_countdown -= (current_time - m_last_countdown_update);
|
||||
@ -178,6 +178,6 @@ void SynchronizationProtocol::startCountdown(int ms_countdown)
|
||||
{
|
||||
m_countdown_activated = true;
|
||||
m_countdown = (double)(ms_countdown)/1000.0;
|
||||
m_last_countdown_update = Time::getRealTime();
|
||||
m_last_countdown_update = StkTime::getRealTime();
|
||||
Log::info("SynchronizationProtocol", "Countdown started with value %f", m_countdown);
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ void* waitInput2(void* data)
|
||||
uint32_t id = ProtocolManager::getInstance()->requestStart(new StopServer());
|
||||
while(ProtocolManager::getInstance()->getProtocolState(id) != PROTOCOL_STATE_TERMINATED)
|
||||
{
|
||||
Time::sleep(1);
|
||||
StkTime::sleep(1);
|
||||
}
|
||||
|
||||
main_loop->abort();
|
||||
|
@ -43,9 +43,9 @@ void STKHost::logPacket(const NetworkString ns, bool incoming)
|
||||
return;
|
||||
pthread_mutex_lock(&m_log_mutex);
|
||||
if (incoming)
|
||||
fprintf(m_log_file, "[%d\t] <-- ", (int)(Time::getRealTime()));
|
||||
fprintf(m_log_file, "[%d\t] <-- ", (int)(StkTime::getRealTime()));
|
||||
else
|
||||
fprintf(m_log_file, "[%d\t] --> ", (int)(Time::getRealTime()));
|
||||
fprintf(m_log_file, "[%d\t] --> ", (int)(StkTime::getRealTime()));
|
||||
for (int i = 0; i < ns.size(); i++)
|
||||
{
|
||||
fprintf(m_log_file, "%d.", ns[i]);
|
||||
@ -170,10 +170,7 @@ void STKHost::stopListening()
|
||||
if(m_listening_thread)
|
||||
{
|
||||
pthread_mutex_unlock(&m_exit_mutex); // will stop the update function on its next update
|
||||
while (m_listening == true)
|
||||
{
|
||||
Time::sleep(1);
|
||||
}
|
||||
pthread_join(*m_listening_thread, NULL); // wait the thread to end
|
||||
}
|
||||
}
|
||||
|
||||
@ -210,7 +207,7 @@ uint8_t* STKHost::receiveRawPacket()
|
||||
{
|
||||
i++;
|
||||
len = recv(m_host->socket,(char*)buffer,2048, 0);
|
||||
Time::sleep(1);
|
||||
StkTime::sleep(1);
|
||||
}
|
||||
STKHost::logPacket(NetworkString(std::string((char*)(buffer), len)), true);
|
||||
return buffer;
|
||||
@ -236,7 +233,7 @@ uint8_t* STKHost::receiveRawPacket(TransportAddress* sender)
|
||||
{
|
||||
i++;
|
||||
len = recvfrom(m_host->socket, (char*)buffer, 2048, 0, (struct sockaddr*)(&addr), &from_len);
|
||||
Time::sleep(1); // wait 1 millisecond between two checks
|
||||
StkTime::sleep(1); // wait 1 millisecond between two checks
|
||||
}
|
||||
if (len == SOCKET_ERROR)
|
||||
{
|
||||
@ -284,7 +281,7 @@ uint8_t* STKHost::receiveRawPacket(TransportAddress sender, int max_tries)
|
||||
uint32_t addr2 = sender.ip;
|
||||
uint32_t addr3 = ntohl(addr1);
|
||||
uint32_t addr4 = ntohl(addr2);
|
||||
Time::sleep(1); // wait 1 millisecond between two checks
|
||||
StkTime::sleep(1); // wait 1 millisecond between two checks
|
||||
if (i >= max_tries && max_tries != -1)
|
||||
{
|
||||
Log::verbose("STKHost", "No answer from the server on %u.%u.%u.%u:%u", (m_host->address.host&0xff),
|
||||
|
@ -92,7 +92,7 @@ namespace Online
|
||||
// ------------------------------------------------------------------------
|
||||
irr::core::stringw loadingDots(bool spaces, float interval, int max_dots)
|
||||
{
|
||||
int nr_dots = int(floor(Time::getRealTime() * (1 / interval))) % (max_dots+1);
|
||||
int nr_dots = int(floor(StkTime::getRealTime() * (1 / interval))) % (max_dots+1);
|
||||
return irr::core::stringw((std::string(nr_dots,'.') + std::string(max_dots-nr_dots,' ')).c_str());
|
||||
}
|
||||
} // namespace messages
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
#include "online/http_manager.hpp"
|
||||
#include "utils/translation.hpp"
|
||||
#include "utils/constants.hpp"
|
||||
|
||||
#ifdef WIN32
|
||||
# include <winsock2.h>
|
||||
|
@ -72,7 +72,7 @@ namespace Online{
|
||||
ServersManager::RefreshRequest * ServersManager::refreshRequest(bool request_now) const
|
||||
{
|
||||
RefreshRequest * request = NULL;
|
||||
if(Time::getRealTime() - m_last_load_time.getAtomic() > SERVER_REFRESH_INTERVAL)
|
||||
if(StkTime::getRealTime() - m_last_load_time.getAtomic() > SERVER_REFRESH_INTERVAL)
|
||||
{
|
||||
request = new RefreshRequest();
|
||||
request->setURL((std::string)UserConfigParams::m_server_multiplayer + "client-user.php");
|
||||
@ -93,7 +93,7 @@ namespace Online{
|
||||
{
|
||||
addServer(new Server(*servers_xml->getNode(i)));
|
||||
}
|
||||
m_last_load_time.setAtomic((float)Time::getRealTime());
|
||||
m_last_load_time.setAtomic((float)StkTime::getRealTime());
|
||||
}
|
||||
//FIXME error message
|
||||
}
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
#include "physics/irr_debug_drawer.hpp"
|
||||
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "karts/abstract_kart.hpp"
|
||||
#include "modes/world.hpp"
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "animations/three_d_animation.hpp"
|
||||
#include "karts/abstract_kart.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "karts/kart_properties.hpp"
|
||||
#include "karts/rescue_animation.hpp"
|
||||
#include "items/flyable.hpp"
|
||||
|
@ -137,6 +137,8 @@ void AddonsScreen::init()
|
||||
m_reloading = false;
|
||||
|
||||
m_sort_desc = true;
|
||||
m_sort_default = true;
|
||||
m_sort_col = 0;
|
||||
|
||||
getWidget<GUIEngine::RibbonWidget>("category")->setDeactivated();
|
||||
|
||||
@ -205,8 +207,8 @@ void AddonsScreen::loadList()
|
||||
GUIEngine::SpinnerWidget* w_filter_date =
|
||||
getWidget<GUIEngine::SpinnerWidget>("filter_date");
|
||||
int date_index = w_filter_date->getValue();
|
||||
Time::TimeType date = Time::getTimeSinceEpoch();
|
||||
date = Time::addInterval(date,
|
||||
StkTime::TimeType date = StkTime::getTimeSinceEpoch();
|
||||
date = StkTime::addInterval(date,
|
||||
-m_date_filters[date_index].year,
|
||||
-m_date_filters[date_index].month,
|
||||
-m_date_filters[date_index].day);
|
||||
@ -238,7 +240,7 @@ void AddonsScreen::loadList()
|
||||
continue;
|
||||
|
||||
// Filter by date.
|
||||
if (date_index != 0 && Time::compareTime(date, addon.getDate()) > 0)
|
||||
if (date_index != 0 && StkTime::compareTime(date, addon.getDate()) > 0)
|
||||
continue;
|
||||
|
||||
// Filter by name, designer and description.
|
||||
@ -381,14 +383,30 @@ void AddonsScreen::loadList()
|
||||
// ----------------------------------------------------------------------------
|
||||
void AddonsScreen::onColumnClicked(int column_id)
|
||||
{
|
||||
if (m_sort_col != column_id)
|
||||
{
|
||||
m_sort_desc = false;
|
||||
m_sort_default = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_sort_default = m_sort_desc && !m_sort_default;
|
||||
if (!m_sort_default) m_sort_desc = !m_sort_desc;
|
||||
}
|
||||
|
||||
m_sort_col = column_id;
|
||||
|
||||
switch(column_id)
|
||||
{
|
||||
case 0: Addon::setSortOrder(Addon::SO_NAME); break;
|
||||
case 1: Addon::setSortOrder(Addon::SO_DATE); break;
|
||||
case 0:
|
||||
Addon::setSortOrder(m_sort_default ? Addon::SO_DEFAULT : Addon::SO_NAME);
|
||||
break;
|
||||
case 1:
|
||||
Addon::setSortOrder(m_sort_default ? Addon::SO_DEFAULT : Addon::SO_DATE);
|
||||
break;
|
||||
default: assert(0); break;
|
||||
} // switch
|
||||
/** \brief Toggle the sort order after column click **/
|
||||
m_sort_desc = !m_sort_desc;
|
||||
loadList();
|
||||
} // onColumnClicked
|
||||
|
||||
|
@ -77,6 +77,10 @@ private:
|
||||
/** \brief To check (and set) if sort order is descending **/
|
||||
bool m_sort_desc;
|
||||
|
||||
bool m_sort_default;
|
||||
|
||||
int m_sort_col;
|
||||
|
||||
/** List of date filters **/
|
||||
std::vector<DateFilter> m_date_filters;
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
#include "challenges/unlock_manager.hpp"
|
||||
#include "config/user_config.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "guiengine/engine.hpp"
|
||||
#include "guiengine/widgets/icon_button_widget.hpp"
|
||||
#include "guiengine/widgets/label_widget.hpp"
|
||||
|
@ -58,6 +58,7 @@ void HelpScreen1::eventCallback(Widget* widget, const std::string& name, const i
|
||||
race_manager->setNumKarts( 1 );
|
||||
race_manager->setTrack( "tutorial" );
|
||||
race_manager->setDifficulty(RaceManager::DIFFICULTY_EASY);
|
||||
race_manager->setReverseTrack(false);
|
||||
|
||||
// Use keyboard 0 by default (FIXME: let player choose?)
|
||||
InputDevice* device = input_manager->getDeviceList()->getKeyboard(0);
|
||||
|
@ -309,6 +309,7 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name,
|
||||
race_manager->setNumKarts( 1 );
|
||||
race_manager->setTrack( "tutorial" );
|
||||
race_manager->setDifficulty(RaceManager::DIFFICULTY_EASY);
|
||||
race_manager->setReverseTrack(false);
|
||||
|
||||
// Use keyboard 0 by default (FIXME: let player choose?)
|
||||
InputDevice* device = input_manager->getDeviceList()->getKeyboard(0);
|
||||
|
@ -602,11 +602,11 @@ void RaceGUI::drawEnergyMeter(int x, int y, const AbstractKart *kart,
|
||||
} // drawEnergyMeter
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void RaceGUI::drawSpeedAndEnergy(const AbstractKart* kart,
|
||||
const core::recti &viewport,
|
||||
const core::vector2df &scaling)
|
||||
{
|
||||
|
||||
float minRatio = std::min(scaling.X, scaling.Y);
|
||||
const int SPEEDWIDTH = 128;
|
||||
int meter_width = (int)(SPEEDWIDTH*minRatio);
|
||||
@ -722,7 +722,14 @@ void RaceGUI::drawSpeedAndEnergy(const AbstractKart* kart,
|
||||
pos.LowerRightCorner.X=(int)(offset.X + 0.8f*meter_width);
|
||||
pos.LowerRightCorner.Y=(int)(offset.X - 0.5f*meter_height);
|
||||
|
||||
gui::ScalableFont* font = GUIEngine::getLargeFont();
|
||||
gui::ScalableFont* font;
|
||||
|
||||
if (pos.getWidth() > 55)
|
||||
font = GUIEngine::getLargeFont();
|
||||
else if (pos.getWidth() > 40)
|
||||
font = GUIEngine::getFont();
|
||||
else
|
||||
font = GUIEngine::getSmallFont();
|
||||
|
||||
static video::SColor color = video::SColor(255, 255, 255, 255);
|
||||
char str[256];
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "modes/cutscene_world.hpp"
|
||||
#include "modes/demo_world.hpp"
|
||||
#include "modes/overworld.hpp"
|
||||
#include "modes/soccer_world.hpp"
|
||||
#include "modes/world_with_rank.hpp"
|
||||
#include "race/highscores.hpp"
|
||||
#include "states_screens/feature_unlocked.hpp"
|
||||
@ -784,6 +785,12 @@ void RaceResultGUI::determineGPLayout()
|
||||
void RaceResultGUI::displayOneEntry(unsigned int x, unsigned int y,
|
||||
unsigned int n, bool display_points)
|
||||
{
|
||||
SoccerWorld* soccerWorld = (SoccerWorld*)World::getWorld();
|
||||
bool isSoccerMode = race_manager->getMinorMode() == RaceManager::MINOR_MODE_SOCCER;
|
||||
int m_team_goals[2] = {soccerWorld->getScore(0), soccerWorld->getScore(1)};
|
||||
|
||||
if (isSoccerMode && n > 0) return;
|
||||
|
||||
RowInfo *ri = &(m_all_row_infos[n]);
|
||||
video::SColor color = ri->m_is_player_kart
|
||||
? video::SColor(255,255,0, 0 )
|
||||
@ -804,7 +811,8 @@ void RaceResultGUI::displayOneEntry(unsigned int x, unsigned int y,
|
||||
|
||||
// First draw the icon
|
||||
// -------------------
|
||||
if(ri->m_kart_icon)
|
||||
|
||||
if(ri->m_kart_icon && !isSoccerMode)
|
||||
{
|
||||
core::recti source_rect(core::vector2di(0,0),
|
||||
ri->m_kart_icon->getSize());
|
||||
@ -819,11 +827,34 @@ void RaceResultGUI::displayOneEntry(unsigned int x, unsigned int y,
|
||||
|
||||
// Draw the name
|
||||
// -------------
|
||||
if (!isSoccerMode)
|
||||
{
|
||||
core::recti pos_name(current_x, y,
|
||||
UserConfigParams::m_width, y+m_distance_between_rows);
|
||||
m_font->draw(ri->m_kart_name, pos_name, color, false, false, NULL,
|
||||
true /* ignoreRTL */);
|
||||
current_x += m_width_kart_name + m_width_column_space;
|
||||
}
|
||||
|
||||
// Draw name of team which won in soccer mode
|
||||
// ------------------------------------------
|
||||
if (isSoccerMode)
|
||||
{
|
||||
core::stringw text;
|
||||
core::recti pos_name(current_x, y,
|
||||
UserConfigParams::m_width, y+m_distance_between_rows);
|
||||
|
||||
if (m_team_goals[0] > m_team_goals[1])
|
||||
text = core::stringw(_("Red team won"));
|
||||
else if (m_team_goals[0] < m_team_goals[1])
|
||||
text = core::stringw(_("Blue team won"));
|
||||
else
|
||||
text = core::stringw(_("Draw"));
|
||||
|
||||
m_font->draw(text, pos_name, color, false, false, NULL, true /* ignoreRTL */);
|
||||
core::dimension2du rect = m_font->getDimension(text.c_str());
|
||||
current_x += rect.Width + m_width_column_space;
|
||||
}
|
||||
|
||||
// Draw the time except in FTL mode
|
||||
// --------------------------------
|
||||
@ -869,6 +900,15 @@ void RaceResultGUI::displayOneEntry(unsigned int x, unsigned int y,
|
||||
true /* ignoreRTL */);
|
||||
}
|
||||
|
||||
if (isSoccerMode)
|
||||
{
|
||||
char score[256];
|
||||
sprintf(score, "%d : %d", m_team_goals[0], m_team_goals[1]);
|
||||
core::recti dest_rect = core::recti(current_x, y, current_x+100, y+10);
|
||||
m_font->draw(score, dest_rect, color, false, false, NULL,
|
||||
true /* ignoreRTL */);
|
||||
}
|
||||
|
||||
} // displayOneEntry
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "guiengine/widgets/dynamic_ribbon_widget.hpp"
|
||||
#include "guiengine/widgets/ribbon_widget.hpp"
|
||||
#include "guiengine/widgets/spinner_widget.hpp"
|
||||
#include "input/input_manager.hpp"
|
||||
#include "io/file_manager.hpp"
|
||||
#include "race/race_manager.hpp"
|
||||
#include "states_screens/arenas_screen.hpp"
|
||||
@ -222,6 +223,7 @@ void RaceSetupScreen::onGameModeChanged()
|
||||
void RaceSetupScreen::init()
|
||||
{
|
||||
Screen::init();
|
||||
input_manager->setMasterPlayerOnly(true);
|
||||
RibbonWidget* w = getWidget<RibbonWidget>("difficulty");
|
||||
assert( w != NULL );
|
||||
|
||||
@ -288,6 +290,7 @@ void RaceSetupScreen::init()
|
||||
}
|
||||
|
||||
#ifdef ENABLE_SOCCER_MODE
|
||||
if (race_manager->getNumLocalPlayers() > 1 || UserConfigParams::m_artist_debug_mode)
|
||||
{
|
||||
irr::core::stringw name5 = irr::core::stringw(
|
||||
RaceManager::getNameOf(RaceManager::MINOR_MODE_SOCCER)) + L"\n";
|
||||
|
@ -35,7 +35,7 @@ using namespace GUIEngine;
|
||||
DEFINE_SCREEN_SINGLETON( SoccerSetupScreen );
|
||||
|
||||
#define KART_CONTINUOUS_ROTATION_SPEED 35.f
|
||||
#define KART_CONFIRMATION_ROTATION_SPEED 4.f
|
||||
#define KART_CONFIRMATION_ROTATION_SPEED 0.f
|
||||
#define KART_CONFIRMATION_TARGET_ANGLE 10.f
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@ -57,6 +57,7 @@ void SoccerSetupScreen::eventCallback(Widget* widget, const std::string& name, c
|
||||
{
|
||||
StateManager::get()->pushScreen( ArenasScreen::getInstance() );
|
||||
race_manager->setMaxGoal(getWidget<SpinnerWidget>("goalamount")->getValue());
|
||||
input_manager->setMasterPlayerOnly(true);
|
||||
}
|
||||
else if (name == "back")
|
||||
{
|
||||
@ -147,7 +148,7 @@ void SoccerSetupScreen::init()
|
||||
bt_continue->setDeactivated();
|
||||
|
||||
// We need players to be able to choose their teams
|
||||
input_manager->getDeviceList()->setAssignMode(ASSIGN);
|
||||
//~ input_manager->getDeviceList()->setAssignMode(ASSIGN);
|
||||
input_manager->setMasterPlayerOnly(false);
|
||||
}
|
||||
|
||||
@ -244,7 +245,7 @@ GUIEngine::EventPropagation SoccerSetupScreen::filterActions( PlayerAction acti
|
||||
ButtonWidget* bt_continue = getWidget<ButtonWidget>("continue");
|
||||
if(areAllKartsConfirmed())
|
||||
{
|
||||
bt_continue->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
|
||||
//~ bt_continue->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
|
||||
bt_continue->setActivated();
|
||||
|
||||
for(int i=0 ; i < nb_players ; i++)
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "tracks/track_object.hpp"
|
||||
|
||||
#include "animations/three_d_animation.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "io/file_manager.hpp"
|
||||
#include "io/xml_node.hpp"
|
||||
#include "input/device_manager.hpp"
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "audio/sfx_base.hpp"
|
||||
#include "audio/sfx_buffer.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "graphics/material_manager.hpp"
|
||||
#include "graphics/particle_emitter.hpp"
|
||||
#include "graphics/particle_kind_manager.hpp"
|
||||
|
@ -165,7 +165,7 @@ void Log::printMessage(int level, const char *component, const char *format,
|
||||
}
|
||||
|
||||
// If we don't have a console file, write to stdout and hope for the best
|
||||
if(!m_file_stdout ||
|
||||
if(!m_file_stdout || level >= LL_WARN ||
|
||||
UserConfigParams::m_log_errors_to_console) // log to console & file
|
||||
{
|
||||
VALIST out;
|
||||
|
29
src/utils/time.cpp
Normal file
29
src/utils/time.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
//
|
||||
// SuperTuxKart - a fun racing game with go-kart
|
||||
// Copyright (C) 2004 Steve Baker <sjbaker1@airmail.net>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 3
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
#include "utils/time.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
|
||||
/** Returns a time based on an arbitrary 'epoch' (e.g. could be start
|
||||
* time of the application, 1.1.1970, ...).
|
||||
* The value is a double precision floating point value in seconds.
|
||||
*/
|
||||
double StkTime::getRealTime(long startAt)
|
||||
{
|
||||
return irr_driver->getRealTime()/1000.0;
|
||||
} // getTimeSinceEpoch
|
@ -31,9 +31,9 @@
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include <stdio.h>
|
||||
|
||||
class Time
|
||||
class StkTime
|
||||
{
|
||||
public:
|
||||
typedef time_t TimeType;
|
||||
@ -83,10 +83,7 @@ public:
|
||||
* time of the application, 1.1.1970, ...).
|
||||
* The value is a double precision floating point value in seconds.
|
||||
*/
|
||||
static double getRealTime(long startAt=0)
|
||||
{
|
||||
return irr_driver->getDevice()->getTimer()->getRealTime()/1000.0;
|
||||
}; // getTimeSinceEpoch
|
||||
static double getRealTime(long startAt=0);
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user