From: <au...@us...> - 2009-12-19 18:49:12
|
Revision: 4321 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4321&view=rev Author: auria Date: 2009-12-19 18:49:06 +0000 (Sat, 19 Dec 2009) Log Message: ----------- Fixed glitch with "selection bubble" Modified Paths: -------------- main/trunk/data/gui/skins/glass.stkskin main/trunk/src/guiengine/skin.cpp Modified: main/trunk/data/gui/skins/glass.stkskin =================================================================== --- main/trunk/data/gui/skins/glass.stkskin 2009-12-18 00:36:35 UTC (rev 4320) +++ main/trunk/data/gui/skins/glass.stkskin 2009-12-19 18:49:06 UTC (rev 4321) @@ -103,7 +103,7 @@ left_border="6" right_border ="6" top_border="6" bottom_border="6" hborder_out_portion="1.0" /> -<!-- Stateless. No splitting into 9 areas is done; the image is just stretched. --> +<!-- Stateless. No splitting into 9 areas is done; the image is just resized. --> <element type="selectionHalo" image="glass/bubble.png" /> <element type="focusHalo" image="glass/glass_iconhighlight_focus.png" /> Modified: main/trunk/src/guiengine/skin.cpp =================================================================== --- main/trunk/src/guiengine/skin.cpp 2009-12-18 00:36:35 UTC (rev 4320) +++ main/trunk/src/guiengine/skin.cpp 2009-12-19 18:49:06 UTC (rev 4321) @@ -684,22 +684,27 @@ const bool mark_focused = focused || (parent_focused && w != NULL && w->m_mouse_focus == widget) || (mark_selected && !always_show_selection && parent_focused); - + /* draw "selection bubble" if relevant */ if (always_show_selection && mark_selected) { - core::rect< s32 > rect2 = rect; - rect2.UpperLeftCorner.X -= rect.getWidth() / 5; - rect2.UpperLeftCorner.Y -= rect.getHeight() / 5; - rect2.LowerRightCorner.X += rect.getWidth() / 5; - rect2.LowerRightCorner.Y += rect.getHeight() / 5; - ITexture* tex_bubble = SkinConfig::m_render_params["selectionHalo::neutral"].getImage(); const int texture_w = tex_bubble->getSize().Width; const int texture_h = tex_bubble->getSize().Height; + const float aspectRatio = (float)texture_w / (float)texture_h; core::rect<s32> source_area = core::rect<s32>(0, 0, texture_w, texture_h); + const float outgrow = 0.35f; // make slightly bigger than the icon it's on + const int rectHeight = rect.getHeight() * (1.0f + outgrow); + const int rectWidth = rectHeight * aspectRatio; + const int x_gap = (rect.getWidth() - rectWidth)/2; + const int y_shift_up = rect.getHeight() * (outgrow/2.0f); + + core::rect< s32 > rect2( position2d< s32 >(rect.UpperLeftCorner.X + x_gap, + rect.UpperLeftCorner.Y - y_shift_up), + dimension2d< s32 >(rectWidth, rectHeight) ); + GUIEngine::getDriver()->draw2DImage(tex_bubble, rect2, source_area, 0 /* no clipping */, 0, true /* alpha */); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2009-12-19 19:48:52
|
Revision: 4325 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4325&view=rev Author: auria Date: 2009-12-19 19:48:41 +0000 (Sat, 19 Dec 2009) Log Message: ----------- Moving towards adding support for multiple keyboard configs through the GUI Modified Paths: -------------- main/trunk/data/gui/options_input.stkgui main/trunk/src/Makefile.am main/trunk/src/ide/Xcode/STK_XCode.xcodeproj/project.pbxproj main/trunk/src/states_screens/options_screen_input.cpp Added Paths: ----------- main/trunk/src/states_screens/dialogs/add_device_dialog.cpp main/trunk/src/states_screens/dialogs/add_device_dialog.hpp Modified: main/trunk/data/gui/options_input.stkgui =================================================================== --- main/trunk/data/gui/options_input.stkgui 2009-12-19 19:25:12 UTC (rev 4324) +++ main/trunk/data/gui/options_input.stkgui 2009-12-19 19:48:41 UTC (rev 4325) @@ -103,6 +103,7 @@ <spacer width="50" height="10" /> + <button id="add_device" proportion="1" width="25%" I18N="In the input configuration screen" text="Add a device"/> </box> <spacer width="50" height="40" /> Modified: main/trunk/src/Makefile.am =================================================================== --- main/trunk/src/Makefile.am 2009-12-19 19:25:12 UTC (rev 4324) +++ main/trunk/src/Makefile.am 2009-12-19 19:48:41 UTC (rev 4325) @@ -254,6 +254,8 @@ states_screens/challenges.hpp \ states_screens/credits.cpp \ states_screens/credits.hpp \ + states_screens/dialogs/add_device_dialog.cpp \ + states_screens/dialogs/add_device_dialog.hpp \ states_screens/dialogs/enter_player_name_dialog.cpp \ states_screens/dialogs/enter_player_name_dialog.hpp \ states_screens/dialogs/player_info_dialog.hpp \ Modified: main/trunk/src/ide/Xcode/STK_XCode.xcodeproj/project.pbxproj =================================================================== --- main/trunk/src/ide/Xcode/STK_XCode.xcodeproj/project.pbxproj 2009-12-19 19:25:12 UTC (rev 4324) +++ main/trunk/src/ide/Xcode/STK_XCode.xcodeproj/project.pbxproj 2009-12-19 19:48:41 UTC (rev 4325) @@ -246,6 +246,7 @@ 955DE88310042701006A4F3C /* check_manager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 955DE88110042701006A4F3C /* check_manager.cpp */; }; 955DE88C1004273B006A4F3C /* check_structure.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 955DE8871004273B006A4F3C /* check_structure.cpp */; }; 956541BB10DD5F0A00C83E99 /* arenas_screen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 956541B910DD5F0A00C83E99 /* arenas_screen.cpp */; }; + 956541E110DD628C00C83E99 /* add_device_dialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 956541DF10DD628C00C83E99 /* add_device_dialog.cpp */; }; 956D36A710095035007FCB95 /* player.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 956D36A610095035007FCB95 /* player.cpp */; }; 958330CC10122B4A00C5137E /* engine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 958330B210122B4A00C5137E /* engine.cpp */; }; 958330CD10122B4A00C5137E /* event_handler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 958330B410122B4A00C5137E /* event_handler.cpp */; }; @@ -435,6 +436,8 @@ 955DE8881004273B006A4F3C /* check_structure.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = check_structure.hpp; path = ../../tracks/check_structure.hpp; sourceTree = SOURCE_ROOT; }; 956541B910DD5F0A00C83E99 /* arenas_screen.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = arenas_screen.cpp; path = games/supertuxkart/src/states_screens/arenas_screen.cpp; sourceTree = SYSTEM_DEVELOPER_DIR; }; 956541BA10DD5F0A00C83E99 /* arenas_screen.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = arenas_screen.hpp; path = games/supertuxkart/src/states_screens/arenas_screen.hpp; sourceTree = SYSTEM_DEVELOPER_DIR; }; + 956541DF10DD628C00C83E99 /* add_device_dialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = add_device_dialog.cpp; path = ../../states_screens/dialogs/add_device_dialog.cpp; sourceTree = SOURCE_ROOT; }; + 956541E010DD628C00C83E99 /* add_device_dialog.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = add_device_dialog.hpp; path = ../../states_screens/dialogs/add_device_dialog.hpp; sourceTree = SOURCE_ROOT; }; 956D36A610095035007FCB95 /* player.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = player.cpp; path = ../../config/player.cpp; sourceTree = SOURCE_ROOT; }; 958330B210122B4A00C5137E /* engine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = engine.cpp; path = ../../guiengine/engine.cpp; sourceTree = SOURCE_ROOT; }; 958330B310122B4A00C5137E /* engine.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = engine.hpp; path = ../../guiengine/engine.hpp; sourceTree = SOURCE_ROOT; }; @@ -1304,6 +1307,8 @@ 95833236101243ED00C5137E /* dialogs */ = { isa = PBXGroup; children = ( + 956541DF10DD628C00C83E99 /* add_device_dialog.cpp */, + 956541E010DD628C00C83E99 /* add_device_dialog.hpp */, 95833237101243ED00C5137E /* enter_player_name_dialog.cpp */, 95833238101243ED00C5137E /* enter_player_name_dialog.hpp */, 95833239101243ED00C5137E /* player_info_dialog.cpp */, @@ -2570,6 +2575,7 @@ 95FB16DB10A7796800645974 /* new_ai.cpp in Sources */, 953C3CCA10CAF3EE0025F78A /* CGUIFont.cpp in Sources */, 956541BB10DD5F0A00C83E99 /* arenas_screen.cpp in Sources */, + 956541E110DD628C00C83E99 /* add_device_dialog.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; Added: main/trunk/src/states_screens/dialogs/add_device_dialog.cpp =================================================================== --- main/trunk/src/states_screens/dialogs/add_device_dialog.cpp (rev 0) +++ main/trunk/src/states_screens/dialogs/add_device_dialog.cpp 2009-12-19 19:48:41 UTC (rev 4325) @@ -0,0 +1,109 @@ +// SuperTuxKart - a fun racing game with go-kart +// Copyright (C) 2009 Marianne Gagnon +// +// 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 "config/player.hpp" +#include "guiengine/engine.hpp" +#include "guiengine/widget.hpp" +#include "states_screens/dialogs/add_device_dialog.hpp" +#include "states_screens/options_screen_players.hpp" +#include "states_screens/state_manager.hpp" +#include "utils/string_utils.hpp" +#include "utils/translation.hpp" + +using namespace GUIEngine; +using namespace irr::gui; +using namespace irr::core; + +AddDeviceDialog::AddDeviceDialog() : ModalDialog(0.7f, 0.7f) +{ + IGUIFont* font = GUIEngine::getFont(); + const int textHeight = font->getDimension(L"X").Height; + const int buttonHeight = textHeight + 10; + + const int y_bottom = m_area.getHeight() - 2*(buttonHeight + 10) - 20; + + core::rect<s32> text_area( 15, 15, m_area.getWidth()-15, y_bottom-15 ); + + IGUIStaticText* b = GUIEngine::getGUIEnv()->addStaticText( _("To add a new Gamepad/Joystick device, simply start SuperTuxKart with it connected and it will appear in the list.\n\nTo add a keyboard config, you can use the button below, HOWEVER please note that most keyboards only support a limited amount of simultaneous keypresses and are thus inappropriate for multiplayer gameplay."), + text_area, false , true , // border, word warp + m_irrlicht_window); + b->setTabStop(false); + + + { + ButtonWidget* widget = new ButtonWidget(); + widget->m_properties[PROP_ID] = "addkeyboard"; + + //I18N: In the 'add new input device' dialog + widget->m_text = _("Add Keyboard Configuration"); + + const int textWidth = font->getDimension( widget->m_text.c_str() ).Width + 40; + + widget->x = m_area.getWidth()/2 - textWidth/2; + widget->y = y_bottom; + widget->w = textWidth; + widget->h = buttonHeight; + widget->setParent(m_irrlicht_window); + m_children.push_back(widget); + widget->add(); + } + { + ButtonWidget* widget = new ButtonWidget(); + widget->m_properties[PROP_ID] = "cancel"; + widget->m_text = _("Cancel"); + + const int textWidth = font->getDimension( widget->m_text.c_str() ).Width + 40; + + widget->x = m_area.getWidth()/2 - textWidth/2; + widget->y = y_bottom + buttonHeight + 20; + widget->w = textWidth; + widget->h = buttonHeight; + widget->setParent(m_irrlicht_window); + m_children.push_back(widget); + widget->add(); + + widget->setFocusForPlayer( GUI_PLAYER_ID ); + + } + +} +// ------------------------------------------------------------------------------------------------------ +void AddDeviceDialog::onEnterPressedInternal() +{ +} +// ------------------------------------------------------------------------------------------------------ +GUIEngine::EventPropagation AddDeviceDialog::processEvent(std::string& eventSource) +{ + + if (eventSource == "cancel") + { + // irrLicht is too stupid to remove focus from deleted widgets + // so do it by hand + //GUIEngine::getGUIEnv()->removeFocus( textCtrl->getIrrlichtElement() ); + //GUIEngine::getGUIEnv()->removeFocus( m_irrlicht_window ); + + ModalDialog::dismiss(); + return GUIEngine::EVENT_BLOCK; + } + else if (eventSource == "addkeyboard") + { + // TODO + } + + return GUIEngine::EVENT_LET; +} Property changes on: main/trunk/src/states_screens/dialogs/add_device_dialog.cpp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: main/trunk/src/states_screens/dialogs/add_device_dialog.hpp =================================================================== --- main/trunk/src/states_screens/dialogs/add_device_dialog.hpp (rev 0) +++ main/trunk/src/states_screens/dialogs/add_device_dialog.hpp 2009-12-19 19:48:41 UTC (rev 4325) @@ -0,0 +1,38 @@ +// SuperTuxKart - a fun racing game with go-kart +// Copyright (C) 2009 Marianne Gagnon +// +// 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. + + +#ifndef HEADER_ADD_DEVICE_DIALOG_HPP +#define HEADER_ADD_DEVICE_DIALOG_HPP + +#include "config/player.hpp" +#include "guiengine/modaldialog.hpp" + + +class AddDeviceDialog : public GUIEngine::ModalDialog +{ +public: + /** + * Creates a modal dialog with given percentage of screen width and height + */ + AddDeviceDialog(); + void onEnterPressedInternal(); + GUIEngine::EventPropagation processEvent(std::string& eventSource); +}; + + +#endif Property changes on: main/trunk/src/states_screens/dialogs/add_device_dialog.hpp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Modified: main/trunk/src/states_screens/options_screen_input.cpp =================================================================== --- main/trunk/src/states_screens/options_screen_input.cpp 2009-12-19 19:25:12 UTC (rev 4324) +++ main/trunk/src/states_screens/options_screen_input.cpp 2009-12-19 19:48:41 UTC (rev 4325) @@ -24,6 +24,7 @@ #include "input/input_manager.hpp" #include "input/device_manager.hpp" #include "io/file_manager.hpp" +#include "states_screens/dialogs/add_device_dialog.hpp" #include "states_screens/dialogs/press_a_key_dialog.hpp" #include "states_screens/state_manager.hpp" #include "utils/string_utils.hpp" @@ -238,7 +239,7 @@ { //const std::string& screen_name = this->getName(); - if(name == "options_choice") + if (name == "options_choice") { std::string selection = ((RibbonWidget*)widget)->getSelectionIDString(GUI_PLAYER_ID).c_str(); @@ -246,8 +247,12 @@ else if (selection == "players") StateManager::get()->replaceTopMostScreen(OptionsScreenPlayers::getInstance()); else if (selection == "controls") StateManager::get()->replaceTopMostScreen(OptionsScreenInput::getInstance()); } - else if(name == "back") + else if (name == "add_device") { + new AddDeviceDialog(); + } + else if (name == "back") + { StateManager::get()->escapePressed(); } else if (name == "devices") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2009-12-22 19:03:35
|
Revision: 4334 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4334&view=rev Author: auria Date: 2009-12-22 19:03:26 +0000 (Tue, 22 Dec 2009) Log Message: ----------- Debugged challenges : several challenge files were incorrect XML Modified Paths: -------------- main/trunk/data/grandprix/alltracks.challenge main/trunk/data/grandprix/atworldsend.challenge main/trunk/data/grandprix/snagdrive.challenge main/trunk/data/grandprix/tothemoonandback.challenge main/trunk/data/karts/gnu/gnu.challenge main/trunk/data/tracks/jungle/jungle.challenge main/trunk/src/states_screens/challenges.cpp Modified: main/trunk/data/grandprix/alltracks.challenge =================================================================== --- main/trunk/data/grandprix/alltracks.challenge 2009-12-22 19:02:32 UTC (rev 4333) +++ main/trunk/data/grandprix/alltracks.challenge 2009-12-22 19:03:26 UTC (rev 4334) @@ -2,8 +2,8 @@ <challenge id="worldsend" - name=_("Win the At World's End\nGrand Prix") - description=_("Come first in the At World's End\nGrand Prix with 3 'Racer'\nLevel AI karts.") + name="_(Win the At World's End\nGrand Prix)" + description="_(Come first in the At World's End\nGrand Prix with 3 'Racer'\nLevel AI karts.)" unlock-gp="alltracks" depend-on="islandfollow" major="grandprix" Modified: main/trunk/data/grandprix/atworldsend.challenge =================================================================== --- main/trunk/data/grandprix/atworldsend.challenge 2009-12-22 19:02:32 UTC (rev 4333) +++ main/trunk/data/grandprix/atworldsend.challenge 2009-12-22 19:03:26 UTC (rev 4334) @@ -2,8 +2,8 @@ <challenge id="islandfollow" - name=_("Follow the Leader on a\nDesert Island") - description=_("Win a Follow the Leader race\nwith 3 AI karts\non a Desert Island.") + name="_(Follow the Leader on a\nDesert Island)" + description="_(Win a Follow the Leader race\nwith 3 AI karts\non a Desert Island.)" unlock-gp="atworldsend" depend-on="tothemoonandbackgp tollwayhead2head tollwaytime citytime" major="single" Modified: main/trunk/data/grandprix/snagdrive.challenge =================================================================== --- main/trunk/data/grandprix/snagdrive.challenge 2009-12-22 19:02:32 UTC (rev 4333) +++ main/trunk/data/grandprix/snagdrive.challenge 2009-12-22 19:03:26 UTC (rev 4334) @@ -2,8 +2,8 @@ <challenge id="tothemoonandbackgp" - name=_("Win To the Moon and Back\nGrand Prix") - description=_("Win the To the Moon and Back\nGrand Prix with 3 'Racer'\nLevel AI karts.") + name="_(Win To the Moon and Back\nGrand Prix)" + description="_(Win the To the Moon and Back\nGrand Prix with 3 'Racer'\nLevel AI karts.)" unlock-gp="snagdrive" depend-on="energyshiftingsands junglefollow" major="grandprix" Modified: main/trunk/data/grandprix/tothemoonandback.challenge =================================================================== --- main/trunk/data/grandprix/tothemoonandback.challenge 2009-12-22 19:02:32 UTC (rev 4333) +++ main/trunk/data/grandprix/tothemoonandback.challenge 2009-12-22 19:03:26 UTC (rev 4334) @@ -2,8 +2,8 @@ <challenge id="energyshiftingsands" - name=_("Collect the Pharaohs Treasure") - description=_("Finish with at least 9 nitro \npoints on 3 laps of Shifting Sands\nin under 2:20 minutes.") + name="_(Collect the Pharaohs Treasure)" + description="_(Finish with at least 9 nitro \npoints on 3 laps of Shifting Sands\nin under 2:20 minutes.)" unlock-gp="tothemoonandback" depend-on="energymathclass racetracktime" major="single" Modified: main/trunk/data/karts/gnu/gnu.challenge =================================================================== --- main/trunk/data/karts/gnu/gnu.challenge 2009-12-22 19:02:32 UTC (rev 4333) +++ main/trunk/data/karts/gnu/gnu.challenge 2009-12-22 19:03:26 UTC (rev 4334) @@ -2,8 +2,8 @@ <challenge id="snowmountain" - name=_("Win a race on\nSnow Mountain") - description=_("Win a 4 lap race\non Snow Mountain against 4 'Racer'\nlevel AI kart.") + name="_(Win a race on\nSnow Mountain)" + description="_(Win a 4 lap race\non Snow Mountain against 4 'Racer'\nlevel AI kart.)" depend-on="worldsend" unlock-kart="gnu Gnu" major="single" Modified: main/trunk/data/tracks/jungle/jungle.challenge =================================================================== --- main/trunk/data/tracks/jungle/jungle.challenge 2009-12-22 19:02:32 UTC (rev 4333) +++ main/trunk/data/tracks/jungle/jungle.challenge 2009-12-22 19:03:26 UTC (rev 4334) @@ -2,8 +2,8 @@ <challenge id="racetracktime" - name=_("Finish Race track in 2:40") - description=_("Finish 3 laps in Racetrack\nwith 3 easy AI karts\nin under 2:40 minutes.") + name="_(Finish Race track in 2:40)" + description="_(Finish 3 laps in Racetrack\nwith 3 easy AI karts\nin under 2:40 minutes.)" unlock-track="jungle" major="single" minor="quickrace" Modified: main/trunk/src/states_screens/challenges.cpp =================================================================== --- main/trunk/src/states_screens/challenges.cpp 2009-12-22 19:02:32 UTC (rev 4333) +++ main/trunk/src/states_screens/challenges.cpp 2009-12-22 19:03:26 UTC (rev 4334) @@ -66,6 +66,7 @@ for (int n=0; n<activeChallengeAmount; n++) { sprintf(buffer, "challenge%i", n); + std::cout << "// Adding challenge " << buffer << " : <" << activeChallenges[n]->getId().c_str() << ">\n"; w->addItem(activeChallenges[n]->getName() + L"\n" + activeChallenges[n]->getChallengeDescription(), buffer, "/gui/challenge.png"); } @@ -74,11 +75,15 @@ // TODO : add bronze/silver/gold difficulties to challenges sprintf(buffer, "solved%i", n); w->addItem(solvedChallenges[n]->getName(), buffer, file_manager->getTextureFile("cup_gold.png")); + std::cout << "// Adding challenge " << buffer << " : <" << solvedChallenges[n]->getId().c_str() << ">\n"; + } for (int n=0; n<lockedChallengeAmount; n++) { w->addItem( _("Locked : solve active challenges to gain access to more!"), "locked", file_manager->getGUIDir() + "/challenge.png", true); + std::cout << "// Adding locked challenge <" << lockedChallenges[n]->getId().c_str() << ">\n"; + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2009-12-22 20:03:22
|
Revision: 4337 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4337&view=rev Author: auria Date: 2009-12-22 20:03:12 +0000 (Tue, 22 Dec 2009) Log Message: ----------- Made explosions better-looking. Fade-out affector still seems buggy; at one point it worked, now no more Modified Paths: -------------- main/trunk/data/textures/explode.png main/trunk/data/textures/materials.xml main/trunk/src/challenges/challenge_data.cpp main/trunk/src/graphics/explosion.cpp main/trunk/src/graphics/explosion.hpp Modified: main/trunk/data/textures/explode.png =================================================================== (Binary files differ) Modified: main/trunk/data/textures/materials.xml =================================================================== --- main/trunk/data/textures/materials.xml 2009-12-22 19:16:26 UTC (rev 4336) +++ main/trunk/data/textures/materials.xml 2009-12-22 20:03:12 UTC (rev 4337) @@ -34,7 +34,7 @@ <material name="fuzzy.png" clampU="Y" clampV="Y" transparency="Y" alpha="0.2" light="N" ignore="Y" collide="N"/> <material name="generickartshadow.png" clampU="Y" clampV="Y" transparency="Y" alpha="0.0" light="N" ignore="Y" collide="N"/> <material name="smoke.png" alpha="Y" light="N" ignore="Y" collide="N"/> - <material name="explode.png" clampU="Y" clampV="Y" transparency="Y" light="N" ignore="Y" collide="N"/> + <material name="explode.png" clampU="Y" clampV="Y" transparency="Y" light="Y" ignore="Y" collide="N"/> <material name="flames.png" alpha="0.9" light="N" ignore="Y" collide="N"/> <material name="nitro-particle.png" alpha="Y" light="N" ignore="Y" collide="N"/> <material name="magnet.png" clampU="Y" clampV="Y" transparency="Y" light="N" ignore="Y" collide="N"/> Modified: main/trunk/src/challenges/challenge_data.cpp =================================================================== --- main/trunk/src/challenges/challenge_data.cpp 2009-12-22 19:16:26 UTC (rev 4336) +++ main/trunk/src/challenges/challenge_data.cpp 2009-12-22 20:03:12 UTC (rev 4337) @@ -77,6 +77,7 @@ std::string s; if(!root->get("name", &s) ) error("name"); + std::cout << " // Challenge name = <" << s.c_str() << ">\n"; setName( _(s.c_str()) ); if(!root->get("id", &s) ) error("id"); @@ -84,6 +85,7 @@ if(!root->get("description", &s) ) error("description"); setChallengeDescription( _(s.c_str()) ); + std::cout << " // Challenge description = <" << s.c_str() << ">\n"; if(!root->get("karts", &m_num_karts) ) error("karts"); Modified: main/trunk/src/graphics/explosion.cpp =================================================================== --- main/trunk/src/graphics/explosion.cpp 2009-12-22 19:16:26 UTC (rev 4336) +++ main/trunk/src/graphics/explosion.cpp 2009-12-22 20:03:12 UTC (rev 4337) @@ -35,21 +35,26 @@ Material *m = material_manager->getMaterial("explode.png"); m_node->setMaterialTexture(0, m->getTexture()); m->setMaterialProperties(&(m_node->getMaterial(0))); - //m_node->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF); + //m->setMaterialProperties(SMaterial()); + m_node->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL); scene::IParticleEmitter* em = m_node->createPointEmitter(); - em->setDirection(core::vector3df(0.0f,0.0006f,0.0f)); // velocity in m/ms(!!) - em->setMinParticlesPerSecond(1); - em->setMaxParticlesPerSecond(5); - em->setMinStartSize(core::dimension2df(0.1f, 0.1f)); - em->setMaxStartSize(core::dimension2df(0.5f, 0.5f)); + em->setDirection(core::vector3df(0.0f,0.0013f,0.0f)); // velocity in m/ms(!!) + em->setMinParticlesPerSecond(5); + em->setMaxParticlesPerSecond(12); + em->setMinStartSize(core::dimension2df(0.6f, 0.6f)); + em->setMaxStartSize(core::dimension2df(1.5f, 1.5f)); m_node->setEmitter(em); // this grabs the emitter em->drop(); // so we can drop it here without deleting it - scene::IParticleAffector* paf = m_node->createFadeOutParticleAffector(); - m_node->addAffector(paf); // same goes for the affector - paf->drop(); + scene::IParticleAffector* fade_out_affector = m_node->createFadeOutParticleAffector(video::SColor(0, 120, 0, 0), 1500 /* fade out time */); + m_node->addAffector(fade_out_affector); // same goes for the affector + fade_out_affector->drop(); + scene::IParticleAffector* scale_affector = m_node->createScaleParticleAffector(core::dimension2df(2.0f, 2.0f)); + m_node->addAffector(scale_affector); // same goes for the affector + scale_affector->drop(); + //scene::IParticleAffector *paf = // m_node->createGravityAffector(Vec3(0, 0, -5).toIrrVector()); //m_node->addAffector(paf); @@ -82,14 +87,21 @@ m_remaining_time -=dt; // Do nothing more if the animation is still playing - if(m_remaining_time>0) return; - + if (m_remaining_time>0) return; + // Otherwise check that the sfx has finished, otherwise the // sfx will get aborted 'in the middle' when this explosion // object is removed. - if(m_explode_sound->getStatus() == SFXManager::SFX_PLAYING) + //if (m_explode_sound->getStatus() == SFXManager::SFX_PLAYING) + //{ + // m_remaining_time = 0; + //} + //else + if (m_remaining_time > -1.5f) { - m_remaining_time = 0; + // Stop the emitter and wait a little while for all particles to have time to fade out + m_node->getEmitter()->setMinParticlesPerSecond(0); + m_node->getEmitter()->setMaxParticlesPerSecond(0); } else { Modified: main/trunk/src/graphics/explosion.hpp =================================================================== --- main/trunk/src/graphics/explosion.hpp 2009-12-22 19:16:26 UTC (rev 4336) +++ main/trunk/src/graphics/explosion.hpp 2009-12-22 20:03:12 UTC (rev 4337) @@ -31,8 +31,7 @@ private: SFXBase* m_explode_sound; float m_remaining_time; - scene::IParticleSystemSceneNode - *m_node; + scene::IParticleSystemSceneNode *m_node; public: Explosion(const Vec3& coord, const int explosion_sound); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2009-12-22 21:57:24
|
Revision: 4342 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4342&view=rev Author: auria Date: 2009-12-22 21:57:15 +0000 (Tue, 22 Dec 2009) Log Message: ----------- Fixed a lot of translation crap related to XML, hacky challenge files, no GUI, etc... Modified Paths: -------------- main/trunk/data/followtheleader.challenge main/trunk/data/grandprix/alltracks.challenge main/trunk/data/grandprix/atworldsend.challenge main/trunk/data/grandprix/snagdrive.challenge main/trunk/data/grandprix/tothemoonandback.challenge main/trunk/data/karts/gnu/gnu.challenge main/trunk/data/po/extract_strings_from_XML.py main/trunk/data/po/fr/LC_MESSAGES/supertuxkart.mo main/trunk/data/po/fr.po main/trunk/data/po/supertuxkart.pot main/trunk/data/po/update_pot.sh main/trunk/data/tracks/canyon/canyon.challenge main/trunk/data/tracks/city/city.challenge main/trunk/data/tracks/crescentcrossing/crescentcrossing.challenge main/trunk/data/tracks/fortmagma/fortmagma.challenge main/trunk/data/tracks/jungle/jungle.challenge main/trunk/data/tracks/snowtuxpeak/snowtuxpeak.challenge main/trunk/src/challenges/challenge_data.cpp main/trunk/src/main.cpp main/trunk/src/race/race_manager.cpp main/trunk/src/race/race_manager.hpp main/trunk/src/states_screens/dialogs/race_paused_dialog.cpp main/trunk/src/states_screens/race_setup_screen.cpp Modified: main/trunk/data/followtheleader.challenge =================================================================== --- main/trunk/data/followtheleader.challenge 2009-12-22 20:54:43 UTC (rev 4341) +++ main/trunk/data/followtheleader.challenge 2009-12-22 21:57:15 UTC (rev 4342) @@ -2,9 +2,9 @@ <challenge id="penguinplaygroundgp" - name="_("Win Penguin Playground Grand\nPrix")" - description="_("Win Penguin Playground Grand\nPrix with 3 'Racer' Level AI karts.")" - unlock-mode="followtheleader _(Follow the Leader)" + name="Win Penguin Playground Grand\nPrix" + description="Win Penguin Playground Grand\nPrix with 3 'Racer' Level AI karts." + unlock-mode="FOLLOW_LEADER" major="grandprix" minor="quickrace" gp="penguinplayground" Modified: main/trunk/data/grandprix/alltracks.challenge =================================================================== --- main/trunk/data/grandprix/alltracks.challenge 2009-12-22 20:54:43 UTC (rev 4341) +++ main/trunk/data/grandprix/alltracks.challenge 2009-12-22 21:57:15 UTC (rev 4342) @@ -2,8 +2,8 @@ <challenge id="worldsend" - name="_(Win the At World's End\nGrand Prix)" - description="_(Come first in the At World's End\nGrand Prix with 3 'Racer'\nLevel AI karts.)" + name="Win the At World's End\nGrand Prix" + description="Come first in the At World's End\nGrand Prix with 3 'Racer'\nLevel AI karts." unlock-gp="alltracks" depend-on="islandfollow" major="grandprix" Modified: main/trunk/data/grandprix/atworldsend.challenge =================================================================== --- main/trunk/data/grandprix/atworldsend.challenge 2009-12-22 20:54:43 UTC (rev 4341) +++ main/trunk/data/grandprix/atworldsend.challenge 2009-12-22 21:57:15 UTC (rev 4342) @@ -2,8 +2,8 @@ <challenge id="islandfollow" - name="_(Follow the Leader on a\nDesert Island)" - description="_(Win a Follow the Leader race\nwith 3 AI karts\non a Desert Island.)" + name="Follow the Leader on a\nDesert Island" + description="Win a Follow the Leader race\nwith 3 AI karts\non a Desert Island." unlock-gp="atworldsend" depend-on="tothemoonandbackgp tollwayhead2head tollwaytime citytime" major="single" Modified: main/trunk/data/grandprix/snagdrive.challenge =================================================================== --- main/trunk/data/grandprix/snagdrive.challenge 2009-12-22 20:54:43 UTC (rev 4341) +++ main/trunk/data/grandprix/snagdrive.challenge 2009-12-22 21:57:15 UTC (rev 4342) @@ -2,8 +2,8 @@ <challenge id="tothemoonandbackgp" - name="_(Win To the Moon and Back\nGrand Prix)" - description="_(Win the To the Moon and Back\nGrand Prix with 3 'Racer'\nLevel AI karts.)" + name="Win To the Moon and Back\nGrand Prix" + description="Win the To the Moon and Back\nGrand Prix with 3 'Racer'\nLevel AI karts." unlock-gp="snagdrive" depend-on="energyshiftingsands junglefollow" major="grandprix" Modified: main/trunk/data/grandprix/tothemoonandback.challenge =================================================================== --- main/trunk/data/grandprix/tothemoonandback.challenge 2009-12-22 20:54:43 UTC (rev 4341) +++ main/trunk/data/grandprix/tothemoonandback.challenge 2009-12-22 21:57:15 UTC (rev 4342) @@ -2,8 +2,8 @@ <challenge id="energyshiftingsands" - name="_(Collect the Pharaohs Treasure)" - description="_(Finish with at least 9 nitro \npoints on 3 laps of Shifting Sands\nin under 2:20 minutes.)" + name="Collect the Pharaohs Treasure" + description="Finish with at least 9 nitro \npoints on 3 laps of Shifting Sands\nin under 2:20 minutes." unlock-gp="tothemoonandback" depend-on="energymathclass racetracktime" major="single" Modified: main/trunk/data/karts/gnu/gnu.challenge =================================================================== --- main/trunk/data/karts/gnu/gnu.challenge 2009-12-22 20:54:43 UTC (rev 4341) +++ main/trunk/data/karts/gnu/gnu.challenge 2009-12-22 21:57:15 UTC (rev 4342) @@ -2,8 +2,8 @@ <challenge id="snowmountain" - name="_(Win a race on\nSnow Mountain)" - description="_(Win a 4 lap race\non Snow Mountain against 4 'Racer'\nlevel AI kart.)" + name="Win a race on\nSnow Mountain" + description="Win a 4 lap race\non Snow Mountain against 4 'Racer'\nlevel AI kart." depend-on="worldsend" unlock-kart="gnu Gnu" major="single" Modified: main/trunk/data/po/extract_strings_from_XML.py =================================================================== --- main/trunk/data/po/extract_strings_from_XML.py 2009-12-22 20:54:43 UTC (rev 4341) +++ main/trunk/data/po/extract_strings_from_XML.py 2009-12-22 21:57:15 UTC (rev 4342) @@ -3,7 +3,7 @@ f = open('./data/po/gui_strings.h', 'w') -def traverse(node, level=0): +def traverse(node, isChallenge, level=0): for e in node.childNodes: if e.localName == None: @@ -14,23 +14,49 @@ comment = None if e.hasAttribute("I18N"): comment = e.getAttribute("I18N") - - if e.hasAttribute("text"): - # print "Label=", e.getAttribute("text"), " Comment=", comment - line = "" - if comment == None: - line += "_(\"" + e.getAttribute("text") + "\")\n\n" - else: - line += "//I18N: " + comment + "\n_(\"" + e.getAttribute("text") + "\");\n\n" - - f.write( line ) + + if isChallenge: + if e.hasAttribute("name"): + # print "Label=", e.getAttribute("name"), " Comment=", comment + line = "" + if comment == None: + line += "_(\"" + e.getAttribute("name") + "\")\n\n" + else: + line += "//I18N: " + comment + "\n_(\"" + e.getAttribute("name") + "\");\n\n" + + f.write( line ) + + if e.hasAttribute("description"): + # print "Label=", e.getAttribute("description"), " Comment=", comment + line = "" + if comment == None: + line += "_(\"" + e.getAttribute("description") + "\")\n\n" + else: + line += "//I18N: " + comment + "\n_(\"" + e.getAttribute("description") + "\");\n\n" + + f.write( line ) + else: + if e.hasAttribute("text"): + # print "Label=", e.getAttribute("text"), " Comment=", comment + line = "" + if comment == None: + line += "_(\"" + e.getAttribute("text") + "\")\n\n" + else: + line += "//I18N: " + comment + "\n_(\"" + e.getAttribute("text") + "\");\n\n" + + f.write( line ) - traverse(e, level+1) + traverse(e, isChallenge, level+1) filenames = sys.argv[1:] for file in filenames: print "Parsing", file + + isChallenge = False + if file.endswith(".challenge"): + isChallenge = True + doc = xml.dom.minidom.parse(file) - traverse(doc) + traverse(doc, isChallenge) Modified: main/trunk/data/po/fr/LC_MESSAGES/supertuxkart.mo =================================================================== (Binary files differ) Modified: main/trunk/data/po/fr.po =================================================================== --- main/trunk/data/po/fr.po 2009-12-22 20:54:43 UTC (rev 4341) +++ main/trunk/data/po/fr.po 2009-12-22 21:57:15 UTC (rev 4342) @@ -2,8 +2,8 @@ msgstr "" "Project-Id-Version: supertuxkart\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-08-29 21:48-0400\n" -"PO-Revision-Date: 2009-08-29 21:49-0500\n" +"POT-Creation-Date: 2009-12-22 16:54-0500\n" +"PO-Revision-Date: 2009-12-22 16:54-0500\n" "Last-Translator: Marianne Gagnon (Auria) <aur...@gm...>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -11,8 +11,19 @@ "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: French\n" -#: src/modes/world.cpp:448 +#. I18N: In the track setup screen (number of laps choice, where %i is the number) +#: src/states_screens/dialogs/track_info_dialog.cpp:65 #, c-format +msgid "%i laps" +msgstr "%i tours" + +#: src/states_screens/kart_selection.cpp:415 +#, c-format +msgid "%s is ready" +msgstr "%s est prêt" + +#: src/modes/world.cpp:458 +#, c-format msgid "" "'%s' has\n" "been eliminated." @@ -21,108 +32,108 @@ "été éliminé." #. I18N: for empty highscores entries -#: src/states_screens/dialogs/track_info_dialog.cpp:156 +#: src/states_screens/dialogs/track_info_dialog.cpp:168 msgid "(Empty)" msgstr "(Vide)" +#. I18N: In the kart selection (player setup) screen +#: data/po/gui_strings.h:127 +msgid "(more players can join by pressing 'fire' now)" +msgstr "(d'autres joueurs peuvent se joindre en appuyant sur 'feu')" + #. I18N: in the help screen -#: data/po/gui_strings.h:33 +#: data/po/gui_strings.h:58 msgid "* Current key bindings can be seen/changed in menu Options" msgstr "* Les contrôles peuvent être vus/modifiés dans les options." #. I18N: In the help menu -#: data/po/gui_strings.h:91 +#: data/po/gui_strings.h:118 msgid "* Most of these game modes can also be played in a Grand Prix fashion : instead of playing a single race, you play many in a row. The better you rank, the more points you get. In the end, the player with the most points wins the cup." msgstr "* La plupart de ces modes de jeu peuvent aussi être joués en Grand Prix : au lieu de faire une seule course, il s'agit d'une compétition comprenant plusieurs pistes. Ceux qui arrivent en premier ont plus de points; à la fin, celui qui a le plus de points gagne." #. I18N: In the help menu -#: data/po/gui_strings.h:88 +#: data/po/gui_strings.h:115 msgid "3 Strikes Battle : only in multiplayer games. Hit others with weapons until they lose all their lives." msgstr "Combat '3 prises' : seulement dans les jeux multijoueurs. Utilise des armes pour faire perdre leurs vies à tes rivaux !" -#: src/states_screens/state_manager.cpp:190 -msgid "" -"3-Strikes Battle\n" -"only in multiplayer games. Hit others with weapons until they lose all their lives." -msgstr "" -"Combat '3 prises' \n" -"seulement dans les jeux multijoueurs. Utilise des armes pour faire perdre leurs vies à tes rivaux !" - -#: src/states_screens/dialogs/track_info_dialog.cpp:95 +#: src/states_screens/dialogs/track_info_dialog.cpp:103 msgid "= Highscores =" msgstr "= Meilleurs scores =" #. I18N: Main menu button -#: data/po/gui_strings.h:126 +#: data/po/gui_strings.h:157 msgid "About" msgstr "À propos" #. I18N: Key binding -#: data/po/gui_strings.h:183 +#: data/po/gui_strings.h:215 msgid "Accelerate" msgstr "Accélérer" +#. I18N: In the 'add new input device' dialog +#: src/states_screens/dialogs/add_device_dialog.cpp:53 +msgid "Add Keyboard Configuration" +msgstr "Ajouter un clavier" + #. I18N: In players configuration menu -#: data/po/gui_strings.h:253 +#: data/po/gui_strings.h:289 msgid "Add Player" msgstr "Ajouter un joueur" +#. I18N: In the input configuration screen +#: data/po/gui_strings.h:269 +msgid "Add a device" +msgstr "Ajouter une configuration" + +#. I18N: track group #. I18N: Kart group #. I18N: track group -#: data/po/gui_strings.h:102 -#: data/po/gui_strings.h:296 +#: data/po/gui_strings.h:11 +#: data/po/gui_strings.h:133 +#: data/po/gui_strings.h:333 msgid "Add-Ons" msgstr "" +#. I18N: track group #. I18N: Kart group #. I18N: track group -#: data/po/gui_strings.h:108 -#: data/po/gui_strings.h:299 +#: data/po/gui_strings.h:14 +#: data/po/gui_strings.h:139 +#: data/po/gui_strings.h:336 msgid "All" msgstr "Tout" #. I18N: Section in track selection screen -#: data/po/gui_strings.h:287 +#: data/po/gui_strings.h:324 msgid "All Tracks" msgstr "Toutes les pistes" -#: data/grandprix/alltracks.grandprix:4 -msgid "All tracks" -msgstr "Toutes les pistes" +#: src/states_screens/race_setup_screen.cpp:164 +msgid "All blows allowed, so catch weapons and make clever use of them!" +msgstr "Tous les coups sont permis, alors collecte des armes et utilise-les astucieusement!" -#: data/grandprix/alltracks.grandprix:5 -msgid "All tracks included in SuperTuxKart" -msgstr "Toutes les pistes de SuperTuxKart" - -#: data/tracks/jungle/jungle.track:4 -msgid "Amazonian Journey" -msgstr "Voyage en Amazonie" - -#: data/po/gui_strings.h:61 +#: data/po/gui_strings.h:87 msgid "Anchor - slows down greatly the kart in the first position" msgstr "Ancre - ralentit beaucoup le premier kart" #. I18N: In the video settings menu -#: data/po/gui_strings.h:164 +#: data/po/gui_strings.h:195 msgid "Apply video changes" msgstr "Appliquer le mode vidéo" -#: data/tracks/lighthouse/lighthouse.track:4 -msgid "Around the Lighthouse" -msgstr "Autour du phare" +#. I18N: Section in arena tracks selection screen +#: data/po/gui_strings.h:2 +msgid "Arenas" +msgstr "Arènes" -#: data/po/gui_strings.h:284 +#: data/po/gui_strings.h:321 msgid "At World's End" msgstr "Au bout du monde" -#: data/grandprix/atworldsend.grandprix:4 -msgid "At world's end" -msgstr "Au bout du monde" - #. I18N: Section in the settings menu -#: data/po/gui_strings.h:134 -#: data/po/gui_strings.h:171 -#: data/po/gui_strings.h:241 +#: data/po/gui_strings.h:165 +#: data/po/gui_strings.h:203 +#: data/po/gui_strings.h:277 msgid "Audio/Video" msgstr "Audio/Vidéo" @@ -132,86 +143,91 @@ msgid "Axis %d %s" msgstr "Axe %d %s" -#: data/po/gui_strings.h:4 -#: data/po/gui_strings.h:35 -#: data/po/gui_strings.h:63 -#: data/po/gui_strings.h:93 -#: data/po/gui_strings.h:166 -#: data/po/gui_strings.h:236 -#: data/po/gui_strings.h:255 +#. I18N: In the help menu, to return to the previous screen +#. I18N: In the options menu, to go back to the main menu or game +#: data/po/gui_strings.h:61 +#: data/po/gui_strings.h:90 +#: data/po/gui_strings.h:121 +#: data/po/gui_strings.h:198 +#: data/po/gui_strings.h:272 +#: data/po/gui_strings.h:292 +msgid "Back" +msgstr "Retour" + +#: data/po/gui_strings.h:22 +#: data/po/gui_strings.h:27 msgid "Back to main menu" msgstr "Retour au menu principal" -#: data/po/gui_strings.h:57 +#: src/states_screens/dialogs/race_over_dialog.cpp:232 +#, fuzzy +msgid "Back to the main menu" +msgstr "Retour au menu principal" + +#: data/po/gui_strings.h:83 msgid "Bowling Ball - bounces off walls. If you are looking back, it will be thrown backwards." msgstr "Boule de Bowling - rebondit sur les murs. Tu peux aussi la lancer derrière toi en utilisant la touche 'regarder derrière'." #. I18N: Key binding -#: data/po/gui_strings.h:189 +#: data/po/gui_strings.h:221 msgid "Brake" msgstr "Freiner" -#: data/po/gui_strings.h:51 +#: data/po/gui_strings.h:77 msgid "BubbleGum - leave a sticky pink puddle behind you" msgstr "" "Chewing gum - laisse une mare de gomme\n" "rose et collante derrière toi" -#: data/po/gui_strings.h:53 +#: data/po/gui_strings.h:79 msgid "Cake - thrown at the closest rival, best on short ranges and long straights" msgstr "Gâteau - lance-le sur ton plus proche rival, idéal sur courtes distances et sur les routes droites" -#: src/states_screens/dialogs/enter_player_name_dialog.cpp:72 -#: src/states_screens/dialogs/player_info_dialog.cpp:81 +#: src/states_screens/dialogs/add_device_dialog.cpp:68 +#: src/states_screens/dialogs/enter_player_name_dialog.cpp:69 +#: src/states_screens/dialogs/player_info_dialog.cpp:85 msgid "Cancel" msgstr "Annuler" #. I18N: In the player info dialog (when deleting) -#: src/states_screens/dialogs/player_info_dialog.cpp:155 +#: src/states_screens/dialogs/player_info_dialog.cpp:165 msgid "Cancel Remove" msgstr "Annuler la supression" -#: data/tracks/canyon/canyon.track:4 -msgid "Canyon" -msgstr "Canyon" - -#: data/tracks/cave/cave.track:4 -msgid "Cave X" -msgstr "Caverne X" - #. I18N: Main menu button -#: data/po/gui_strings.h:117 +#: data/po/gui_strings.h:148 msgid "Challenges" msgstr "Défis" +#. I18N: Title for challenges screen +#: data/po/gui_strings.h:17 +msgid "Challenges : Trophy Room" +msgstr "Défis : salle des trophées" + #. I18N: In the kart selection (player setup) screen -#: data/po/gui_strings.h:96 -msgid "Choose a Kart (more players can join by pressing 'fire' now)" -msgstr "Choisis ton kart (d'autres joueurs peuvent se joindre en appuyant sur 'feu')" +#: data/po/gui_strings.h:124 +msgid "Choose a Kart" +msgstr "Choisis un Kart" -#: data/tracks/city/city.track:4 -msgid "City" -msgstr "Ville" - -#: data/tracks/crescentcrossing/crescentcrossing.challenge:5 +#: data/po/gui_strings.h:370 msgid "Collect Nitro in Math Class" msgstr "Nitro dans la classe de maths !" #. I18N: In the help menu -#: data/po/gui_strings.h:21 +#: data/po/gui_strings.h:46 msgid "Collect blue boxes : they will give you weapons or other powerups" msgstr "Ramasse les boîtes bleues : elles contiennent des armes et divers bonus" -#: data/grandprix/tothemoonandback.challenge:5 +#: data/po/gui_strings.h:354 msgid "Collect the Pharaohs Treasure" msgstr "Le trésor du Pharaon" #. I18N: In the help menu -#: data/po/gui_strings.h:24 +#: data/po/gui_strings.h:49 msgid "Collecting nitro allows you to get speed boosts whenever you wish by pressing the appropriate key. You can see your current level of nitro in the bar at the right of the game screen." msgstr "La nitro que tu collectes peut être ensuite utilisée pour te propulser vers l'avant en utilisant la touche correspondante. Ton niveau de nitro est visible dans la barre à la droite de l'écran." -#: data/grandprix/alltracks.challenge:6 +#: data/po/gui_strings.h:344 msgid "" "Come first in the At World's End\n" "Grand Prix with 3 'Racer'\n" @@ -222,68 +238,61 @@ "virtuels de niveau élevé." #. I18N: In the player info dialog (when deleting) -#: src/states_screens/dialogs/player_info_dialog.cpp:138 +#: src/states_screens/dialogs/player_info_dialog.cpp:147 msgid "Confirm Remove" msgstr "Confirme la suppression" +#: src/states_screens/race_setup_screen.cpp:169 +msgid "Contains no powerups, so only your driving skills matter!" +msgstr "Aucun bonus dans les pistes - seule ton habileté compte !" + +#: data/po/gui_strings.h:29 +msgid "Continue" +msgstr "Continuer" + +#: src/states_screens/dialogs/race_over_dialog.cpp:227 +msgid "Continue Grand Prix" +msgstr "Continuer le Grand Prix" + #. I18N: Section in the settings menu -#: data/po/gui_strings.h:140 -#: data/po/gui_strings.h:177 -#: data/po/gui_strings.h:247 +#: data/po/gui_strings.h:171 +#: data/po/gui_strings.h:209 +#: data/po/gui_strings.h:283 msgid "Controls" -msgstr "" +msgstr "Contrôles" -#: data/tracks/beach/beach.track:6 -#: data/tracks/lighthouse/lighthouse.track:6 -msgid "" -"Created by Ingo Ruhnke,\n" -"modified by M. Gagnon" -msgstr "" -"Créé par Ingo Ruhnke,\n" -"modifié par M. Gagnon" - -#: data/tracks/fortmagma/fortmagma.track:6 -#: data/tracks/sandtrack/sandtrack.track:6 -#: data/tracks/snowtuxpeak/snowtuxpeak.track:6 -msgid "" -"Created by Oliver & Steve Baker\n" -"modified by Marianne Gagnon" -msgstr "" -"Créé par Oliver & Steve Baker\n" -"modifié par Marianne Gagnon" - #. I18N: Title in credits screen -#: data/po/gui_strings.h:2 +#: data/po/gui_strings.h:25 msgid "Credits" msgstr "Crédits" -#: data/tracks/crescentcrossing/crescentcrossing.track:4 -msgid "Crescent Crossing" -msgstr "Sous la pleine lune" - #. I18N: In the player info dialog (when deleting) -#: src/states_screens/dialogs/player_info_dialog.cpp:126 +#: src/states_screens/dialogs/player_info_dialog.cpp:131 #, c-format msgid "Do you really want to delete player '%s' ?" msgstr "Voulez-vous vraiment supprimer le joueur '%s' ?" #. I18N: Next to checkbox in settings menu -#: data/po/gui_strings.h:146 -#: data/po/gui_strings.h:152 +#: data/po/gui_strings.h:177 +#: data/po/gui_strings.h:183 msgid "Enabled" msgstr "Activé" #. I18N: In the 'add new player' dialog -#: src/states_screens/dialogs/enter_player_name_dialog.cpp:38 +#: src/states_screens/dialogs/enter_player_name_dialog.cpp:35 msgid "Enter the new player's name" msgstr "Entre le nom du nouveau joueur" #. I18N: Difficulty -#: data/po/gui_strings.h:269 +#: data/po/gui_strings.h:306 msgid "Expert" msgstr "Expert" -#: data/tracks/jungle/jungle.challenge:6 +#: src/states_screens/feature_unlocked.cpp:253 +msgid "Feature Unlocked" +msgstr "Fonctionnalité Déverouillée" + +#: data/po/gui_strings.h:380 msgid "" "Finish 3 laps in Racetrack\n" "with 3 easy AI karts\n" @@ -293,7 +302,7 @@ "course' avec trois opposants\n" "virtuels novices en 2:40." -#: data/tracks/snowtuxpeak/snowtuxpeak.challenge:6 +#: data/po/gui_strings.h:384 msgid "" "Finish 3 laps on the City track\n" "with 3 AI karts\n" @@ -303,7 +312,7 @@ "'Ville' contre 3 opposants\n" "virtuels en 4:20." -#: data/tracks/canyon/canyon.challenge:6 +#: data/po/gui_strings.h:364 msgid "" "Finish 3 laps on the Tux Tollway\n" "track with 3 AI karts\n" @@ -313,19 +322,19 @@ "de Tux' contre 3 opposants\n" "virtuels en 3:35." -#: data/tracks/jungle/jungle.challenge:5 +#: data/po/gui_strings.h:378 msgid "Finish Race track in 2:40" msgstr "Piste de course en 2:40" -#: data/tracks/canyon/canyon.challenge:5 +#: data/po/gui_strings.h:362 msgid "Finish Tux Tollway track in 3:35" msgstr "L'autoroute de Tux en 3:35" -#: data/tracks/snowtuxpeak/snowtuxpeak.challenge:5 +#: data/po/gui_strings.h:382 msgid "Finish the City track in 4:20" msgstr "Course dans la ville en 4:20" -#: data/tracks/crescentcrossing/crescentcrossing.challenge:6 +#: data/po/gui_strings.h:372 #, fuzzy msgid "" "Finish with at least 6 points\n" @@ -338,7 +347,7 @@ "de 'La classe de Maths\n" "d'Oliver' en 52 secondes." -#: data/grandprix/tothemoonandback.challenge:6 +#: data/po/gui_strings.h:356 msgid "" "Finish with at least 9 nitro \n" "points on 3 laps of Shifting Sands\n" @@ -350,20 +359,16 @@ "mouvants' en 2:20." #. I18N: Shown at the end of a race -#: src/states_screens/race_gui.cpp:491 +#: src/states_screens/race_gui.cpp:593 msgid "Finished" msgstr "Fini" #. I18N: Key binding -#: data/po/gui_strings.h:207 +#: data/po/gui_strings.h:239 msgid "Fire" msgstr "Tirer" -#: data/grandprix/penguinplayground.grandprix:5 -msgid "First grand prix, easy to get started" -msgstr "Premier grand prix, facile pour commencer" - -#: src/states_screens/state_manager.cpp:187 +#: src/states_screens/race_setup_screen.cpp:181 msgid "" "Follow the Leader\n" "run for second place, as the last kart will be disqualified every time the counter hits zero. Beware : going in front of the leader will get you eliminated too!" @@ -371,11 +376,11 @@ "Suis le meneur\n" "vise la seconde place, car lorsque le compte à rebours atteint zéro, le dernier est éliminé. Attention: dépasser le meneur n'est pas non plus recommendé, car là aussi tu risques l'élimination!" -#: data/tracks/city/city.challenge:5 +#: data/po/gui_strings.h:366 msgid "Follow the Leader in the Jungle" msgstr "Suis le meneur dans la jungle" -#: data/grandprix/atworldsend.challenge:5 +#: data/po/gui_strings.h:346 msgid "" "Follow the Leader on a\n" "Desert Island" @@ -384,23 +389,19 @@ "île déserte" #. I18N: In the help menu -#: data/po/gui_strings.h:85 +#: data/po/gui_strings.h:112 msgid "Follow the leader: run for second place, as the last kart will be disqualified every time the counter hits zero. Beware : going in front of the leader will get you eliminated too!" msgstr "Suis le meneur: vise la seconde place, car lorsque le compte à rebours atteint zéro, le dernier est éliminé. Attention: dépasser le meneur n'est pas non plus recommendé, car là aussi tu risques l'élimination!" -#: data/tracks/fortmagma/fortmagma.track:4 -msgid "Fort Magma" -msgstr "Fort Magma" - #. I18N: In the video settings -#: data/po/gui_strings.h:158 +#: data/po/gui_strings.h:189 msgid "Fullscreen" msgstr "Plein-écran" #. I18N: Tab in help menu -#: data/po/gui_strings.h:15 -#: data/po/gui_strings.h:46 -#: data/po/gui_strings.h:74 +#: data/po/gui_strings.h:40 +#: data/po/gui_strings.h:72 +#: data/po/gui_strings.h:101 msgid "Game Modes" msgstr "Modes de jeu" @@ -417,74 +418,82 @@ msgstr "" #. I18N: Tab in help menu -#: data/po/gui_strings.h:9 -#: data/po/gui_strings.h:40 -#: data/po/gui_strings.h:68 +#: data/po/gui_strings.h:34 +#: data/po/gui_strings.h:66 +#: data/po/gui_strings.h:95 msgid "General" msgstr "Général" #. I18N: as in "ready, set, go", shown at the beginning of the race -#: src/states_screens/race_gui.cpp:678 +#: src/states_screens/race_gui.cpp:786 msgid "Go!" msgstr "Partez!" #. I18N: Section in track selection screen -#: data/po/gui_strings.h:276 +#: data/po/gui_strings.h:313 msgid "Grand Prix" msgstr "Grand Prix" #. I18N: Main menu button -#: data/po/gui_strings.h:123 +#: data/po/gui_strings.h:154 msgid "Help" msgstr "Aide" -#: data/tracks/icetrack/icetrack.track:4 -msgid "Ice Track" +#: src/states_screens/dialogs/race_over_dialog.cpp:153 +#, fuzzy +msgid "Highscores" +msgstr "= Meilleurs scores =" + +#: src/states_screens/race_setup_screen.cpp:189 +#, fuzzy +msgid "Hit others with weapons until they lose all their lives. (Only in multiplayer games)" msgstr "" +"Combat '3 prises' \n" +"seulement dans les jeux multijoueurs. Utilise des armes pour faire perdre leurs vies à tes rivaux !" #. I18N: In the help menu -#: data/po/gui_strings.h:27 +#: data/po/gui_strings.h:52 msgid "If you see a button with a lock like this one, you need to complete a challenge to unlock it." msgstr "Certains boutons ont un cadenas comme celui-ci. Tu dois réussir un défi pour en gagner l'accès." -#: data/tracks/industry/industry.track:4 -msgid "Industry" -msgstr "" - #. I18N: Difficulty -#: data/po/gui_strings.h:266 +#: data/po/gui_strings.h:303 msgid "Intermediate" msgstr "Intermédiaire" -#: data/tracks/castle/castle.track:4 -msgid "King Weird's Castle" -msgstr "Château du Roi Tordu" +#: src/states_screens/options_screen_input.cpp:114 +#, c-format +msgid "Keyboard %i" +msgstr "Clavier %i" -#: src/states_screens/race_gui.cpp:498 -#: src/states_screens/race_gui.cpp:499 +#: src/states_screens/race_gui.cpp:601 +#: src/states_screens/race_gui.cpp:604 msgid "Lap" msgstr "Tour" -#: data/grandprix/atworldsend.grandprix:5 -msgid "Last grand prix, longer and harder" -msgstr "Dernier grand prix, plus long et difficile" - #: src/modes/follow_the_leader.cpp:152 msgid "Leader" msgstr "Meneur" #. I18N: Key binding -#: data/po/gui_strings.h:195 +#: data/po/gui_strings.h:227 msgid "Left" msgstr "Gauche" +#: src/states_screens/arenas_screen.cpp:83 +#: src/states_screens/challenges.cpp:83 +#: src/states_screens/race_setup_screen.cpp:174 +#: src/states_screens/tracks_screen.cpp:101 +msgid "Locked : solve active challenges to gain access to more!" +msgstr "Barré : relève des défis pour accéder à plus!" + #. I18N: Key binding -#: data/po/gui_strings.h:231 +#: data/po/gui_strings.h:263 msgid "Look Back" msgstr "Regarder en arrière" #. I18N: In the help menu -#: data/po/gui_strings.h:18 +#: data/po/gui_strings.h:43 msgid "Make your rivals bite dust!" msgstr "Fais mordre la poussière à tes rivaux!" @@ -501,20 +510,16 @@ msgstr "Souris, bouton %d" #. I18N: Section in the audio/video settings submenu -#: data/po/gui_strings.h:143 +#: data/po/gui_strings.h:174 msgid "Music" msgstr "Musique" -#: data/tracks/mystery_island/mystery_island.track:4 -msgid "Mystery Island" -msgstr "" - #. I18N: Main menu button -#: data/po/gui_strings.h:114 +#: data/po/gui_strings.h:145 msgid "Networking" msgstr "Jeu en ligne" -#: src/challenges/challenge.cpp:119 +#: src/challenges/challenge.cpp:123 #, c-format msgid "" "New Grand Prix '%s'\n" @@ -523,7 +528,7 @@ "Nouveau grand prix\n" "'%s' déverrouillé" -#: src/challenges/challenge.cpp:125 +#: src/challenges/challenge.cpp:129 #, c-format msgid "" "New difficulty\n" @@ -534,11 +539,11 @@ "'%s'\n" "déverrouillée" -#: src/modes/linear_world.cpp:250 +#: src/modes/linear_world.cpp:251 msgid "New fastest lap" msgstr "Meilleur temps" -#: src/challenges/challenge.cpp:112 +#: src/challenges/challenge.cpp:116 #, c-format msgid "" "New game mode\n" @@ -549,7 +554,7 @@ "jeu déverrouillé :\n" "'%s'" -#: src/challenges/challenge.cpp:131 +#: src/challenges/challenge.cpp:135 #, c-format msgid "" "New kart\n" @@ -560,7 +565,7 @@ "'%s'\n" "déverrouillé" -#: src/challenges/challenge.cpp:106 +#: src/challenges/challenge.cpp:110 #, c-format msgid "" "New track '%s'\n" @@ -571,242 +576,206 @@ "déverrouillée" #. I18N: Key binding -#: data/po/gui_strings.h:213 +#: data/po/gui_strings.h:245 msgid "Nitro" msgstr "Nitro" #. I18N: Difficulty -#: data/po/gui_strings.h:263 +#: data/po/gui_strings.h:300 msgid "Novice" msgstr "Débutant" #. I18N: In race setup menu -#: data/po/gui_strings.h:260 +#: data/po/gui_strings.h:297 #, fuzzy msgid "Number of AI karts" msgstr "Nombre de karts IA" -#: data/tracks/olivermath/olivermath.track:4 -msgid "Oliver's Math Class" -msgstr "Classe de maths d'Oliver" - -#: data/tracks/beach/beach.track:4 -msgid "On the Beach" -msgstr "Sur la plage" - #. I18N: Main menu button -#: data/po/gui_strings.h:120 +#: data/po/gui_strings.h:151 msgid "Options" msgstr "Options" -#: data/po/gui_strings.h:59 +#: data/po/gui_strings.h:85 msgid "Parachute - slows down all karts in a better position!" msgstr "Parachute - ralentit tous les karts en meilleure position que toi !" -#: src/states_screens/race_gui.cpp:708 +#: src/states_screens/dialogs/race_paused_dialog.cpp:50 +msgid "Paused" +msgstr "Pause" + +#: src/karts/player_kart.cpp:254 msgid "Penalty time!!" msgstr "Temps de pénalité !" -#: data/grandprix/penguinplayground.grandprix:4 -#: data/po/gui_strings.h:278 +#: data/po/gui_strings.h:315 msgid "Penguin Playground" msgstr "Pour jeunes pingouins" #. I18N: In kart selection screen (Will read like 'Player 1 (foobartech gamepad)') -#: src/states_screens/kart_selection.cpp:120 -#: src/states_screens/kart_selection.cpp:210 +#: src/states_screens/kart_selection.cpp:234 +#: src/states_screens/kart_selection.cpp:347 #, c-format msgid "Player %i (%s)" msgstr "Joueur %i (%s)" #. I18N: Section in the settings menu -#: data/po/gui_strings.h:137 -#: data/po/gui_strings.h:174 -#: data/po/gui_strings.h:244 +#: data/po/gui_strings.h:168 +#: data/po/gui_strings.h:206 +#: data/po/gui_strings.h:280 msgid "Players" msgstr "Joueurs" -#: data/po/gui_strings.h:55 +#: data/po/gui_strings.h:81 msgid "Plunger - throw straight to pull an opponent back, or throw while looking back to make one lose sight!" msgstr "Débouchoir à ventouse - lance-le droit devant pour tirer un opposant vers l'arrière, ou lance-le en regardant vers l'arrière pour lui obstruer la vue !" -#: data/tracks/prehistoric/prehistoric.track:4 -msgid "Prehistoric Island" -msgstr "Île préhistorique" - -#: src/states_screens/dialogs/press_a_key_dialog.cpp:48 +#: src/states_screens/dialogs/press_a_key_dialog.cpp:49 msgid "Press ESC to cancel" msgstr "Appuie sur <ESC> pour annuler" -#: src/states_screens/dialogs/press_a_key_dialog.cpp:31 +#: src/states_screens/dialogs/press_a_key_dialog.cpp:32 msgid "Press a key" msgstr "Appuie sur une touche" #. I18N: In players configuration menu -#: data/po/gui_strings.h:250 +#: data/po/gui_strings.h:286 msgid "Press enter or double-click on a player to edit him/her" msgstr "Tu peux éditer un joeur avec la touche entrée ou un double-clic" #. I18N: Main menu button -#: data/po/gui_strings.h:129 +#: data/po/gui_strings.h:160 msgid "Quit" msgstr "Quitter" #. I18N: Main menu button -#: data/po/gui_strings.h:111 +#: data/po/gui_strings.h:142 msgid "Race" msgstr "Course" -#: data/po/gui_strings.h:257 +#: src/states_screens/dialogs/race_over_dialog.cpp:61 +msgid "Race Results" +msgstr "Résultats de la course" + +#: data/po/gui_strings.h:294 #, fuzzy msgid "Race Setup" msgstr "Réglages de la course" -#: data/tracks/racetrack/racetrack.track:4 -msgid "Racetrack" -msgstr "Piste de course" +#: src/states_screens/dialogs/race_over_dialog.cpp:213 +msgid "Race in this track again" +msgstr "Rejouer cette piste" -#: src/states_screens/kart_selection.cpp:428 +#: src/states_screens/arenas_screen.cpp:90 +msgid "Random Arena" +msgstr "Arène aléatoire" + +#: src/states_screens/kart_selection.cpp:652 +#: src/states_screens/kart_selection.cpp:926 +#: src/states_screens/kart_selection.cpp:1111 msgid "Random Kart" msgstr "Kart aléatoire" +#: src/states_screens/tracks_screen.cpp:108 +msgid "Random Track" +msgstr "Piste aléatoire" + #. I18N: as in "ready, set, go", shown at the beginning of the race -#: src/states_screens/race_gui.cpp:656 +#: src/states_screens/race_gui.cpp:764 msgid "Ready!" msgstr "À vos marques..." #. I18N: In the help menu -#: data/po/gui_strings.h:79 -msgid "Regular Race (TODO - find a better name :( ) - all blows allowed, so catch weapons and make clever use of them!" +#: data/po/gui_strings.h:106 +msgid "Regular Race - all blows allowed, so catch weapons and make clever use of them!" msgstr "" #. I18N: In the player info dialog -#: src/states_screens/dialogs/player_info_dialog.cpp:99 +#: src/states_screens/dialogs/player_info_dialog.cpp:103 msgid "Remove" msgstr "Supprimer" #. I18N: In the player info dialog -#: src/states_screens/dialogs/player_info_dialog.cpp:66 +#: src/states_screens/dialogs/player_info_dialog.cpp:70 msgid "Rename" msgstr "Renommer" #. I18N: Key binding -#: data/po/gui_strings.h:225 +#: data/po/gui_strings.h:257 msgid "Rescue" msgstr "Sauvetage" #. I18N: Key binding -#: data/po/gui_strings.h:201 +#: data/po/gui_strings.h:233 msgid "Right" msgstr "Droite" -#: data/grandprix/tothemoonandback.grandprix:5 -msgid "Second grand prix" -msgstr "Second grand prix" - -#: data/tracks/secretgarden/secretgarden.track:4 -msgid "Secret Garden" -msgstr "Jardin Secret" - -#: data/po/gui_strings.h:271 +#: data/po/gui_strings.h:308 msgid "Select a game mode" msgstr "Choisis un mode de jeu" #. I18N: as in "ready, set, go", shown at the beginning of the race -#: src/states_screens/race_gui.cpp:667 +#: src/states_screens/race_gui.cpp:775 msgid "Set!" msgstr "Prêts" +#: src/states_screens/dialogs/race_over_dialog.cpp:201 +msgid "Setup New Race" +msgstr "Nouvelle course" + #. I18N: Key binding -#: data/po/gui_strings.h:219 +#: data/po/gui_strings.h:251 msgid "Sharp Turn" msgstr "Virage brusque" -#: data/tracks/sandtrack/sandtrack.track:4 -msgid "Shifting Sands" -msgstr "Sables mouvants" - -#: data/tracks/skyline/skyline.track:4 -msgid "Skyline" -msgstr "" - -#: data/grandprix/snagdrive.grandprix:4 -#: data/po/gui_strings.h:280 +#: data/po/gui_strings.h:317 msgid "Snag Drive" msgstr "Chemin des Embûches" -#: src/states_screens/state_manager.cpp:181 -msgid "" -"Snaky Competition\n" -"All blows allowed, so catch weapons and make clever use of them!" -msgstr "" - -#: data/tracks/snowmountain/snowmountain.track:4 -msgid "Snow Mountain" -msgstr "Sommet enneigé" - -#: data/tracks/snowtuxpeak/snowtuxpeak.track:4 -msgid "SnowTux Peak" -msgstr "Mont Bonhomme-Tux" - #. I18N: Section in audio/video settings submenu -#: data/po/gui_strings.h:149 +#: data/po/gui_strings.h:180 msgid "Sound Effects" msgstr "Effets sonores" #. I18N: Kart group -#: data/po/gui_strings.h:105 +#: data/po/gui_strings.h:136 msgid "Special" msgstr "Spécial" +#. I18N: track group #. I18N: Kart group #. I18N: track group -#: data/po/gui_strings.h:99 -#: data/po/gui_strings.h:293 +#: data/po/gui_strings.h:8 +#: data/po/gui_strings.h:130 +#: data/po/gui_strings.h:330 msgid "Standard" msgstr "Standard" -#: data/tracks/startrack/startrack.track:4 -msgid "Star Track" -msgstr "Dans les étoiles" - -#: src/states_screens/dialogs/track_info_dialog.cpp:68 +#: src/states_screens/dialogs/track_info_dialog.cpp:76 msgid "Start Race" msgstr "Commencer la course" -#: data/tracks/subseatrack/subseatrack.track:4 -msgid "Sub Sea" -msgstr "Fonds marins" - -#: data/po/gui_strings.h:6 -#: data/po/gui_strings.h:37 -#: data/po/gui_strings.h:65 +#: data/po/gui_strings.h:31 +#: data/po/gui_strings.h:63 +#: data/po/gui_strings.h:92 msgid "SuperTuxKart Help" msgstr "SuperTuxKart : Aide" -#: data/po/gui_strings.h:131 -#: data/po/gui_strings.h:168 -#: data/po/gui_strings.h:238 +#: data/po/gui_strings.h:162 +#: data/po/gui_strings.h:200 +#: data/po/gui_strings.h:274 msgid "SuperTuxKart Options" msgstr "SuperTuxKart : Options" -#: data/po/gui_strings.h:76 -msgid "SuperTuxKart features several game modes (TO BE UPDATED FOR NEW GUI LAYOUT!!)" -msgstr "" +#: data/po/gui_strings.h:103 +msgid "SuperTuxKart features several game modes" +msgstr "SuperTuxKart contient plusieurs modes de jeu" #. I18N: in the help menu -#: data/po/gui_strings.h:30 +#: data/po/gui_strings.h:55 msgid "The 'sharp turn' key allows you to do sharp turns and have better control in tight curves" msgstr "La touche 'virage brusque' te permet de faire des virages rapides et d'avoir un meilleur contrôle dans les courbes prononcées" -#: data/tracks/islandtrack/islandtrack.track:4 -msgid "The Island" -msgstr "L'île" - -#: data/tracks/ring/ring.track:4 -msgid "The Ring" -msgstr "" - #: src/race/highscore_manager.cpp:107 msgid "" "The highscore file was too old,\n" @@ -815,72 +784,78 @@ "Le fichier des meilleurs scores était\n" "trop vieux, il a donc été supprimé." -#: data/tracks/mines/mines.track:4 -msgid "The old mine" -msgstr "La vieille mine" +#. I18N: In the help menu +#: data/po/gui_strings.h:109 +msgid "Time Trial: Contains no powerups, so only your driving skills matter!" +msgstr "Contre la montre : aucun bonus dans les pistes - seule ton habileté compte !" -#: data/grandprix/snagdrive.grandprix:5 -msgid "Third grand prix" -msgstr "Troisième grand prix" - -#: src/states_screens/state_manager.cpp:184 +#: src/states_screens/dialogs/add_device_dialog.cpp:42 msgid "" -"Time Trial\n" -"Contains no powerups, so only your driving skills matter!" +"To add a new Gamepad/Joystick device, simply start SuperTuxKart with it connected and it will appear in the list.\n" +"\n" +"To add a keyboard config, you can use the button below, HOWEVER please note that most keyboards only support a limited amount of simultaneous keypresses and are thus inappropriate for multiplayer gameplay." msgstr "" -"Contre la montre\n" -"Aucun bonus dans les pistes - seule ton habileté compte !" +"Pour ajouter un nouveau Gamepad ou Joystick, assure-toi simplement qu'il est connecté avant d'ouvrir SuperTuxKart, il apparaitra automatiquement dans la liste.\n" +"\n" +"Pour ajouter une configuration clavier supplémentaire, tu peux utiliser le bouton ci-dessous. TOUTEFOIS, il est important de noter que la majorité des claviers ne peuvent pas gérer plus de quelques touches enfoncées à la fois, ce serait donc inapproprié pour le jeu multijoueur." #. I18N: In the help menu -#: data/po/gui_strings.h:82 -msgid "Time Trial: Contains no powerups, so only your driving skills matter!" -msgstr "Contre la montre : aucun bonus dans les pistes - seule ton habileté compte !" - -#. I18N: In the help menu -#: data/po/gui_strings.h:49 +#: data/po/gui_strings.h:75 msgid "To help you win, there are some powerups you can collect :" msgstr "Pour t'aider à gagner, voici certains bonus que tu peux ramasser :" -#: data/grandprix/tothemoonandback.grandprix:4 -#: data/po/gui_strings.h:282 +#: data/po/gui_strings.h:319 msgid "To the Moon and Back" msgstr "Jusqu'à la lune" #. I18N: when showing who is the author of track '%s' (place %s where the name of the author should appear) -#: src/states_screens/dialogs/track_info_dialog.cpp:171 +#: src/states_screens/dialogs/track_info_dialog.cpp:183 #, c-format msgid "Track by %s" msgstr "Piste par %s" -#: data/tracks/tuxtollway/tuxtollway.track:4 -msgid "Tux Tollway" -msgstr "Autoroute de Tux" - #. I18N: Section in the audio/video settings submenu -#: data/po/gui_strings.h:155 +#: data/po/gui_strings.h:186 msgid "Video" msgstr "Vidéo" -#: src/modes/linear_world.cpp:602 +#: src/modes/linear_world.cpp:606 msgid "WRONG WAY!" msgstr "MAUVAISE DIRECTION !" #. I18N: Tab in help menu -#: data/po/gui_strings.h:12 -#: data/po/gui_strings.h:43 -#: data/po/gui_strings.h:71 +#: data/po/gui_strings.h:37 +#: data/po/gui_strings.h:69 +#: data/po/gui_strings.h:98 msgid "Weapons" msgstr "Armes" -#: data/grandprix/snagdrive.challenge:5 +#: data/po/gui_strings.h:338 msgid "" +"Win Penguin Playground Grand\n" +"Prix" +msgstr "Gagne le Grnd Prix'Pour jeunes pingouins'" + +#: data/po/gui_strings.h:340 +#, fuzzy +msgid "" +"Win Penguin Playground Grand\n" +"Prix with 3 'Racer' Level AI karts." +msgstr "" +"Remporte le grand prix 'Jusqu'à\n" +"la lune' contre 3 opposants\n" +"virtuels expérimentés." + +#: data/po/gui_strings.h:350 +#, fuzzy +msgid "" "Win To the Moon and Back\n" "Grand Prix" msgstr "" "Remporte le grand prix\n" "'Jusqu'à la lune'." -#: data/tracks/fortmagma/fortmagma.challenge:6 +#: data/po/gui_strings.h:376 msgid "" "Win a 1 lap Head to Head\n" "on Tux Tollway against 1 'Racer'\n" @@ -890,7 +865,7 @@ "sur l'Autoroute de Tux contre\n" "un opposant virtuel expérimenté." -#: data/karts/gnu/gnu.challenge:6 +#: data/po/gui_strings.h:360 #, fuzzy msgid "" "Win a 4 lap race\n" @@ -901,7 +876,7 @@ "sur l'Autoroute de Tux contre\n" "un opposant virtuel expérimenté." -#: data/tracks/city/city.challenge:6 +#: data/po/gui_strings.h:368 msgid "" "Win a Follow the Leader race\n" "with 3 AI karts\n" @@ -911,7 +886,7 @@ "'Suis le meneur' contre 3\n" "opposants dans la jungle." -#: data/grandprix/atworldsend.challenge:6 +#: data/po/gui_strings.h:348 msgid "" "Win a Follow the Leader race\n" "with 3 AI karts\n" @@ -921,7 +896,7 @@ "'Suis le meneur' contre 3\n" "opposants sur un île déserte." -#: data/tracks/fortmagma/fortmagma.challenge:5 +#: data/po/gui_strings.h:374 msgid "" "Win a Head to Head on\n" "Tux Tollway" @@ -929,14 +904,14 @@ "Remporte un duel sur\n" "l'Autoroute de Tux." -#: data/karts/gnu/gnu.challenge:5 +#: data/po/gui_strings.h:358 #, fuzzy msgid "" "Win a race on\n" "Snow Mountain" msgstr "Sommet enneigé" -#: data/grandprix/alltracks.challenge:5 +#: data/po/gui_strings.h:342 msgid "" "Win the At World's End\n" "Grand Prix" @@ -944,7 +919,7 @@ "Remporte le grand prix\n" "'Au bout du monde'." -#: data/grandprix/snagdrive.challenge:6 +#: data/po/gui_strings.h:352 msgid "" "Win the To the Moon and Back\n" "Grand Prix with 3 'Racer'\n" @@ -954,15 +929,11 @@ "la lune' contre 3 opposants\n" "virtuels expérimentés." -#: data/tracks/xr591/xr591.track:4 -msgid "XR591" -msgstr "XR591" - -#: src/karts/player_kart.cpp:332 +#: src/karts/player_kart.cpp:346 msgid "You finished the race!" msgstr "Tu as fini la course !" -#: src/modes/world.cpp:444 +#: src/modes/world.cpp:454 msgid "" "You have been\n" "eliminated!" @@ -970,39 +941,108 @@ "Tu as été\n" "éliminé !" -#: src/karts/player_kart.cpp:331 +#: src/karts/player_kart.cpp:345 msgid "You won the race!" msgstr "Tu as gagné la course !" #. I18N: Unbound key binding #: src/input/input.cpp:39 -#: data/po/gui_strings.h:186 -#: data/po/gui_strings.h:192 -#: data/po/gui_strings.h:198 -#: data/po/gui_strings.h:204 -#: data/po/gui_strings.h:210 -#: data/po/gui_strings.h:216 -#: data/po/gui_strings.h:222 -#: data/po/gui_strings.h:228 -#: data/po/gui_strings.h:234 +#: data/po/gui_strings.h:218 +#: data/po/gui_strings.h:224 +#: data/po/gui_strings.h:230 +#: data/po/gui_strings.h:236 +#: data/po/gui_strings.h:242 +#: data/po/gui_strings.h:248 +#: data/po/gui_strings.h:254 +#: data/po/gui_strings.h:260 +#: data/po/gui_strings.h:266 msgid "[none]" msgstr "[aucun]" #. I18N: Ignore -#: data/po/gui_strings.h:161 -#: data/po/gui_strings.h:180 +#: data/po/gui_strings.h:192 +#: data/po/gui_strings.h:212 msgid "all" msgstr "" #. I18N: Ignore -#: data/po/gui_strings.h:273 -#: data/po/gui_strings.h:290 +#: data/po/gui_strings.h:5 +#: data/po/gui_strings.h:20 +#: data/po/gui_strings.h:310 +#: data/po/gui_strings.h:327 msgid "bottom" msgstr "" -#: data/tracks/mystery_island/mystery_island.track:7 -msgid "sj04736" -msgstr "" +#~ msgid "All tracks" +#~ msgstr "Toutes les pistes" +#~ msgid "All tracks included in SuperTuxKart" +#~ msgstr "Toutes les pistes de SuperTuxKart" +#~ msgid "Amazonian Journey" +#~ msgstr "Voyage en Amazonie" +#~ msgid "Around the Lighthouse" +#~ msgstr "Autour du phare" +#~ msgid "At world's end" +#~ msgstr "Au bout du monde" +#~ msgid "Canyon" +#~ msgstr "Canyon" +#~ msgid "Cave X" +#~ msgstr "Caverne X" +#~ msgid "City" +#~ msgstr "Ville" +#~ msgid "" +#~ "Created by Ingo Ruhnke,\n" +#~ "modified by M. Gagnon" +#~ msgstr "" +#~ "Créé par Ingo Ruhnke,\n" +#~ "modifié par M. Gagnon" +#~ msgid "" +#~ "Created by Oliver & Steve Baker\n" +#~ "modified by Marianne Gagnon" +#~ msgstr "" +#~ "Créé par Oliver & Steve Baker\n" +#~ "modifié par Marianne Gagnon" +#~ msgid "Crescent Crossing" +#~ msgstr "Sous la pleine lune" +#~ msgid "First grand prix, easy to get started" +#~ msgstr "Premier grand prix, facile pour commencer" +#~ msgid "Fort Magma" +#~ msgstr "Fort Magma" +#~ msgid "King Weird's Castle" +#~ msgstr "Château du Roi Tordu" +#~ msgid "Last grand prix, longer and harder" +#~ msgstr "Dernier grand prix, plus long et difficile" +#~ msgid "Oliver's Math Class" +#~ msgstr "Classe de maths d'Oliver" +#~ msgid "On the Beach" +#~ msgstr "Sur la plage" +#~ msgid "Prehistoric Island" +#~ msgstr "Île préhistorique" +#~ msgid "Racetrack" +#~ msgstr "Piste de course" +#~ msgid "Second grand prix" +#~ msgstr "Second grand prix" +#~ msgid "Secret Garden" +#~ msgstr "Jardin Secret" +#~ msgid "Shifting Sands" +#~ msgstr "Sables mouvants" +#~ msgid "Snow Mountain" +#~ msgstr "Sommet enneigé" +#~ msgid "SnowTux Peak" +#~ msgstr "Mont Bonhomme-Tux" +#~ msgid "Star Track" +#~ msgstr "Dans les étoiles" +#~ msgid "Sub Sea" +#~ msgstr "Fonds marins" +#~ msgid "The Island" +#~ msgstr "L'île" +#~ msgid "The old mine" +#~ msgstr "La vieille mine" +#~ msgid "Third grand prix" +#~ msgstr "Troisième grand prix" +#~ msgid "Tux Tollway" +#~ msgstr "Autoroute de Tux" +#~ msgid "XR591" +#~ msgstr "XR591" #, fuzzy #~ msgid "Player %i (" Modified: main/trunk/data/po/supertuxkart.pot =================================================================== --- main/trunk/data/po/supertuxkart.pot 2009-12-22 20:54:43 UTC (rev 4341) +++ main/trunk/data/po/supertuxkart.pot 2009-12-22 21:57:15 UTC (rev 4342) @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-08-29 21:48-0400\n" +"POT-Creation-Date: 2009-12-22 16:54-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -16,25 +16,41 @@ "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: src/modes/world.cpp:448 +#. I18N: In the track setup screen (number of laps choice, where %i is the number) +#: src/states_screens/dialogs/track_info_dialog.cpp:65 #, c-format +msgid "%i laps" +msgstr "" + +#: src/states_screens/kart_selection.cpp:415 +#, c-format +msgid "%s is ready" +msgstr "" + +#: src/modes/world.cpp:458 +#, c-format msgid "" "'%s' has\n" "been eliminated." msgstr "" #. I18N: for empty highscores entries -#: src/states_screens/dialogs/track_info_dialog.cpp:156 +#: src/states_screens/dialogs/track_info_dialog.cpp:168 msgid "(Empty)" msgstr "" +#. I18N: In the kart selection (player setup) screen +#: data/po/gui_strings.h:127 +msgid "(more players can join by pressing 'fire' now)" +msgstr "" + #. I18N: in the help screen -#: data/po/gui_strings.h:33 +#: data/po/gui_strings.h:58 msgid "* Current key bindings can be seen/changed in menu Options" msgstr "" #. I18N: In the help menu -#: data/po/gui_strings.h:91 +#: data/po/gui_strings.h:118 msgid "" "* Most of these game modes can also be played in a Grand Prix fashion : " "instead of playing a single race, you play many in a row. The better you " @@ -43,91 +59,87 @@ msgstr "" #. I18N: In the help menu -#: data/po/gui_strings.h:88 +#: data/po/gui_strings.h:115 msgid "" "3 Strikes Battle : only in multiplayer games. Hit others with weapons until " "they lose all their lives." msgstr "" -#: src/states_screens/state_manager.cpp:190 -msgid "" -"3-Strikes Battle\n" -"only in multiplayer games. Hit others with weapons until they lose all their " -"lives." -msgstr "" - -#: src/states_screens/dialogs/track_info_dialog.cpp:95 +#: src/states_screens/dialogs/track_info_dialog.cpp:103 msgid "= Highscores =" msgstr "" #. I18N: Main menu button -#: data/po/gui_strings.h:126 +#: data/po/gui_strings.h:157 msgid "About" msgstr "" #. I18N: Key binding -#: data/po/gui_strings.h:183 +#: data/po/gui_strings.h:215 msgid "Accelerate" msgstr "" +#. I18N: In the 'add new input device' dialog +#: src/states_screens/dialogs/add_device_dialog.cpp:53 +msgid "Add Keyboard Configuration" +msgstr "" + #. I18N: In players configuration menu -#: data/po/gui_strings.h:253 +#: data/po/gui_strings.h:289 msgid "Add Player" msgstr "" +#. I18N: In the input configuration screen +#: data/po/gui_strings.h:269 +msgid "Add a device" +msgstr "" + +#. I18N: track group #. I18N: Kart group #. I18N: track group -#: data/po/gui_strings.h:102 data/po/gui_strings.h:296 +#: data/po/gui_strings.h:11 data/po/gui_strings.h:133 +#: data/po/gui_strings.h:333 msgid "Add-Ons" msgstr "" +#. I18N: track group #. I18N: Kart group #. I18N: track group -#: data/po/gui_strings.h:108 data/po/gui_strings.h:299 +#: data/po/gui_strings.h:14 data/po/gui_strings.h:139 +#: data/po/gui_strings.h:336 msgid "All" msgstr "" #. I18N: Section in track selection screen -#: data/po/gui_strings.h:287 +#: data/po/gui_strings.h:324 msgid "All Tracks" msgstr "" -#: data/grandprix/alltracks.grandprix:4 -msgid "All tracks" +#: src/states_screens/race_setup_screen.cpp:164 +msgid "All blows allowed, so catch weapons and make clever use of them!" msgstr "" -#: data/grandprix/alltracks.grandprix:5 -msgid "All tracks included in SuperTuxKart" -msgstr "" - -#: data/tracks/jungle/jungle.track:4 -msgid "Amazonian Journey" -msgstr "" - -#: data/po/gui_strings.h:61 +#: data/po/gui_strings.h:87 msgid "Anchor - slows down greatly the kart in the first position" msgstr "" #. I18N: In the video settings menu -#: data/po/gui_strings.h:164 +#: data/po/gui_strings.h:195 msgid "Apply video changes" msgstr "" -#: data/tracks/lighthouse/lighthouse.track:4 -msgid "Around the Lighthouse" +#. I18N: Section in arena tracks selection screen +#: data/po/gui_strings.h:2 +msgid "Arenas" msgstr "" -#: data/po/gui_strings.h:284 +#: data/po/gui_strings.h:321 msgid "At World's End" msgstr "" -#: data/grandprix/atworldsend.grandprix:4 -msgid "At world's end" -msgstr "" - #. I18N: Section in the settings menu -#: data/po/gui_strings.h:134 data/po/gui_strings.h:171 -#: data/po/gui_strings.h:241 +#: data/po/gui_strings.h:165 data/po/gui_strings.h:203 +#: data/po/gui_strings.h:277 msgid "Audio/Video" msgstr "" @@ -137,86 +149,90 @@ msgid "Axis %d %s" msgstr "" -#: data/po/gui_strings.h:4 data/po/gui_strings.h:35 data/po/gui_strings.h:63 -#: data/po/gui_strings.h:93 data/po/gui_strings.h:166 -#: data/po/gui_strings.h:236 data/po/gui_strings.h:255 +#. I18N: In the help menu, to return to the previous screen +#. I18N: In the options menu, to go back to the main menu or game +#: data/po/gui_strings.h:61 data/po/gui_strings.h:90 data/po/gui_strings.h:121 +#: data/po/gui_strings.h:198 data/po/gui_strings.h:272 +#: data/po/gui_strings.h:292 +msgid "Back" +msgstr "" + +#: data/po/gui_strings.h:22 data/po/gui_strings.h:27 msgid "Back to main menu" msgstr "" -#: data/po/gui_strings.h:57 +#: src/states_screens/dialogs/race_over_dialog.cpp:232 +msgid "Back to the main menu" +msgstr "" + +#: data/po/gui_strings.h:83 msgid "" "Bowling Ball - bounces off walls. If you are looking back, it will be thrown " "backwards." msgstr "" #. I18N: Key binding -#: data/po/gui_strings.h:189 +#: data/po/gui_strings.h:221 msgid "Brake" msgstr "" -#: data/po/gui_strings.h:51 +#: data/po/gui_strings.h:77 msgid "BubbleGum - leave a sticky pink puddle behind you" msgstr "" -#: data/po/gui_strings.h:53 +#: data/po/gui_strings.h:79 msgid "" "Cake - thrown at the closest rival, best on short ranges and long straights" msgstr "" -#: src/states_screens/dialogs/enter_player_name_dialog.cpp:72 -#: src/states_screens/dialogs/player_info_dialog.cpp:81 +#: src/states_screens/dialogs/add_device_dialog.cpp:68 +#: src/states_screens/dialogs/enter_player_name_dialog.cpp:69 +#: src/states_screens/dialogs/player_info_dialog.cpp:85 msgid "Cancel" msgstr "" #. I18N: In the player info dialog (when deleting) -#: src/states_screens/dialogs/player_info_dialog.cpp:155 +#: src/states_screens/dialogs/player_info_dialog.cpp:165 msgid "Cancel Remove" msgstr "" -#: data/tracks/canyon/canyon.track:4 -msgid "Canyon" -msgstr "" - -#: data/tracks/cave/cave.track:4 -msgid "Cave X" -msgstr "" - #. I18N: Main menu button -#: data/po/gui_strings.h:117 +#: data/po/gui_strings.h:148 msgid "Challenges" msgstr "" -#. I18N: In the kart selection (player setup) screen -#: data/po/gui_strings.h:96 -msgid "Choose a Kart (more players can join by pressing 'fire' now)" +#. I18N: Title for challenges screen +#: data/po/gui_strings.h:17 +msgid "Challenges : Trophy Room" msgstr "" -#: data/tracks/city/city.track:4 -msgid "City" +#. I18N: In the kart selection (player setup) screen +#: data/po/gui_strings.h:124 +msgid "Choose a Kart" msgstr "" -#: data/tracks/crescentcrossing/crescentcrossing.challenge:5 +#: data/po/gui_strings.h:370 msgid "Collect Nitro in Math Class" msgstr "" #. I18N: In the help menu -#: data/po/gui_strings.h:21 +#: data/po/gui_strings.h:46 msgid "Collect blue boxes : they will give you weapons or other powerups" msgstr "" -#: data/grandprix/tothemoonandback.challenge:5 +#: data/po/gui_strings.h:354 msgid "Collect the Pharaohs Treasure" msgstr "" #. I18N: In the help menu -#: data/po/gui_strings.h:24 +#: data/po/gui_strings.h:49 msgid "" "Collecting nitro allows you to get speed boosts whenever you wish by " "pressing the appropriate key. You can see your current level of nitro in the " "bar at the right of the game screen." msgstr "" -#: data/grandprix/alltracks.challenge:6 +#: data/po/gui_strings.h:344 msgid "" "Come first in the At World's End\n" "Grand Prix with 3 'Racer'\n" @@ -224,94 +240,92 @@ msgstr "" #. I18N: In the player info dialog (when deleting) -#: src/states_screens/dialogs/player_info_dialog.cpp:138 +#: src/states_screens/dialogs/player_info_dialog.cpp:147 msgid "Confirm Remove" msgstr "" -#. I18N: Section in the settings menu -#: data/po/gui_strings.h:140 data/po/gui_strings.h:177 -#: data/po/gui_strings.h:247 -msgid "Controls" +#: src/states_screens/race_setup_screen.cpp:169 +msgid "Contains no powerups, so only your driving skills matter!" msgstr "" -#: data/tracks/beach/beach.track:6 data/tracks/lighthouse/lighthouse.track:6 -msgid "" -"Created by Ingo Ruhnke,\n" -"modified by M. Gagnon" +#: data/po/gui_strings.h:29 +msgid "Continue" msgstr "" -#: data/tracks/fortmagma/fortmagma.track:6 -#: data/tracks/sandtrack/sandtrack.track:6 -#: data/tracks/snowtuxpeak/snowtuxpeak.track:6 -msgid "" -"Created by Oliver & Steve Baker\n" -"modified by Marianne Gagnon" +#: src/states_screens/dialogs/race_over_dialog.cpp:227 +msgid "Continue Grand Prix" msgstr "" +#. I18N: Section in the settings menu +#: data/po/gui_strings.h:171 data/po/gui_strings.h:209 +#: data/po/gui_strings.h:283 +msgid "Controls" +msgstr "" + #. I18N: Title in credits screen -#: data/po/gui_strings.h:2 +#: data/po/gui_strings.h:25 msgid "Credits" msgstr "" -#: data/tracks/crescentcrossing/crescentcrossing.track:4 -msgid "Crescent Crossing" -msgstr "" - #. I18N: In the player info dialog (when deleting) -#: src/states_screens/dialogs/player_info_dialog.cpp:126 +#: src/states_screens/dialogs/player_info_dialog.cpp:131 #, c-format msgid "Do you really want to delete player '%s' ?" msgstr "" #. I18N: Next to checkbox in settings menu -#: data/po/gui_strings.h:146 data/po/gui_strings.h:152 +#: data/po/gui_strings.h:177 data/po/gui_strings.h:183 msgid "Enabled" msgstr "" #. I18N: In the 'add new player' dialog -#: src/states_screens/dialogs/enter_player_name_dialog.cpp:38 +#: src/states_screens/dialogs/enter_player_name_dialog.cpp:35 msgid "Enter the new player's name" msgstr "" #. I18N: Difficulty -#: data/po/gui_strings.h:269 +#: data/po/gui_strings.h:306 msgid "Expert" msgstr "" -#: data/tracks/jungle/jungle.challenge:6 +#: src/states_screens/feature_unlocked.cpp:253 +msgid "Feature Unlocked" +msgstr "" + +#: data/po/gui_strings.h:380 msgid "" "Finish 3 laps in Racetrack\n" "with 3 easy AI karts\n" "in under 2:40 minutes." msgstr "" -#: data/tracks/snowtuxpeak/snowtuxpeak.challenge:6 +#: data/po/gui_strings.h:384 msgid "" "Finish 3 laps on the City track\n" "with 3 AI karts\n" "in under 4:20 minutes." msgstr "" -#: data/tracks/canyon/canyon.challenge:6 +#: data/po/gui_strings.h:364 msgid "" "Finish 3 laps on the Tux Tollway\n" "track with 3 AI karts\n" "in under 3:35 minutes." msgstr "" -#: data/tracks/jungle/jungle.challenge:5 +#: data/po/gui_strings.h:378 msgid "Finish Race track in 2:40" msgstr "" -#: data/tracks/canyon/canyon.challenge:5 +#: data/po/gui_strings.h:362 msgid "Finish Tux Tollway track in 3:35" msgstr "" -#: data/tracks/snowtuxpeak/snowtuxpeak.challenge:5 +#: data/po/gui_strings.h:382 msgid "Finish the City track in 4:20" msgstr "" -#: data/tracks/crescentcrossing/crescentcrossing.challenge:6 +#: data/po/gui_strings.h:372 msgid "" "Finish with at least 6 points\n" " of intro on three laps of\n" @@ -319,7 +333,7 @@ "in under 52 seconds." msgstr "" -#: data/grandprix/tothemoonandback.challenge:6 +#: data/po/gui_strings.h:356 msgid "" "Finish with at least 9 nitro \n" "points on 3 laps of Shifting Sands\n" @@ -327,20 +341,16 @@ msgstr "" #. I18N: Shown at the end of a race -#: src/states_screens/race_gui.cpp:491 +#: src/states_screens/race_gui.cpp:593 msgid "Finished" msgstr "" #. I18N: Key binding -#: data/po/gui_strings.h:207 +#: data/po/gui_strings.h:239 msgid "Fire" msgstr "" -#: data/grandprix/penguinplayground.grandprix:5 -msgid "First grand prix, easy to get started" -msgstr "" - -#: src/states_screens/state_manager.cpp:187 +#: src/states_screens/race_setup_screen.cpp:181 msgid "" "Follow the Leader\n" "run for second place, as the last kart will be disqualified every time the " @@ -348,35 +358,31 @@ "eliminated too!" msgstr "" -#: data/tracks/city/city.challenge:5 +#: data/po/gui_strings.h:366 msgid "Follow the Leader in the Jungle" msgstr "" -#: data/grandprix/atworldsend.challenge:5 +#: data/po/gui_strings.h:346 msgid "" "Follow the Leader on a\n" "Desert Island" msgstr "" #. I18N: In the help menu -#: data/po/gui_strings.h:85 ... [truncated message content] |
From: <mbj...@us...> - 2009-12-24 01:00:58
|
Revision: 4348 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4348&view=rev Author: mbjornstk Date: 2009-12-24 01:00:47 +0000 (Thu, 24 Dec 2009) Log Message: ----------- Improve explosions. Fading still not working but needed. Once fading works, maybe increase quantity for thicker start. Modified Paths: -------------- main/trunk/data/textures/explode.png main/trunk/src/graphics/explosion.cpp Modified: main/trunk/data/textures/explode.png =================================================================== (Binary files differ) Modified: main/trunk/src/graphics/explosion.cpp =================================================================== --- main/trunk/src/graphics/explosion.cpp 2009-12-23 16:58:10 UTC (rev 4347) +++ main/trunk/src/graphics/explosion.cpp 2009-12-24 01:00:47 UTC (rev 4348) @@ -29,32 +29,33 @@ Explosion::Explosion(const Vec3& coord, const int explosion_sound) { - m_remaining_time = 1.5f; + m_remaining_time = 0.1f; // short emision time, explosion, not constant flame m_node = irr_driver->addParticleNode(); m_node->setPosition(coord.toIrrVector()); Material *m = material_manager->getMaterial("explode.png"); m_node->setMaterialTexture(0, m->getTexture()); m->setMaterialProperties(&(m_node->getMaterial(0))); - //m->setMaterialProperties(SMaterial()); - m_node->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL); + m_node->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); - scene::IParticleEmitter* em = m_node->createPointEmitter(); - em->setDirection(core::vector3df(0.0f,0.0013f,0.0f)); // velocity in m/ms(!!) - em->setMinParticlesPerSecond(5); - em->setMaxParticlesPerSecond(12); - em->setMinStartSize(core::dimension2df(0.6f, 0.6f)); - em->setMaxStartSize(core::dimension2df(1.5f, 1.5f)); + scene::IParticleEmitter* em = m_node->createSphereEmitter(core::vector3df(0.0f,0.0f,0.0f), 0.5f, + core::vector3df(0.0f,0.005f,0.0f), // velocity in m/ms + 600, 900, // min max particles per sec + video::SColor(0, 0, 0, 0), video::SColor(0, 0, 0, 0), // min max colour + 1000, 1500, // min max life ms + 90, // max angle + core::dimension2df(0.3f, 0.3f), core::dimension2df(0.75f, 0.75f) // min max start size + ); m_node->setEmitter(em); // this grabs the emitter em->drop(); // so we can drop it here without deleting it - scene::IParticleAffector* fade_out_affector = m_node->createFadeOutParticleAffector(video::SColor(0, 120, 0, 0), 1500 /* fade out time */); + scene::IParticleAffector* fade_out_affector = m_node->createFadeOutParticleAffector(video::SColor(0, 0, 0, 0), 10000 /* fade out time */); m_node->addAffector(fade_out_affector); // same goes for the affector fade_out_affector->drop(); - scene::IParticleAffector* scale_affector = m_node->createScaleParticleAffector(core::dimension2df(2.0f, 2.0f)); + scene::IParticleAffector* scale_affector = m_node->createScaleParticleAffector(core::dimension2df(3.0f, 3.0f)); m_node->addAffector(scale_affector); // same goes for the affector scale_affector->drop(); - + //scene::IParticleAffector *paf = // m_node->createGravityAffector(Vec3(0, 0, -5).toIrrVector()); //m_node->addAffector(paf); @@ -88,7 +89,7 @@ // Do nothing more if the animation is still playing if (m_remaining_time>0) return; - + // Otherwise check that the sfx has finished, otherwise the // sfx will get aborted 'in the middle' when this explosion // object is removed. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2009-12-24 02:58:58
|
Revision: 4349 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4349&view=rev Author: auria Date: 2009-12-24 02:58:50 +0000 (Thu, 24 Dec 2009) Log Message: ----------- Fixed explosion fade-out Modified Paths: -------------- main/trunk/data/textures/materials.xml main/trunk/src/graphics/explosion.cpp main/trunk/src/graphics/explosion.hpp Modified: main/trunk/data/textures/materials.xml =================================================================== --- main/trunk/data/textures/materials.xml 2009-12-24 01:00:47 UTC (rev 4348) +++ main/trunk/data/textures/materials.xml 2009-12-24 02:58:50 UTC (rev 4349) @@ -34,7 +34,7 @@ <material name="fuzzy.png" clampU="Y" clampV="Y" transparency="Y" alpha="0.2" light="N" ignore="Y" collide="N"/> <material name="generickartshadow.png" clampU="Y" clampV="Y" transparency="Y" alpha="0.0" light="N" ignore="Y" collide="N"/> <material name="smoke.png" alpha="Y" light="N" ignore="Y" collide="N"/> - <material name="explode.png" clampU="Y" clampV="Y" transparency="Y" light="Y" ignore="Y" collide="N"/> + <material name="explode.png" clampU="Y" clampV="Y" transparency="Y" light="N" ignore="Y" collide="N"/> <material name="flames.png" alpha="0.9" light="N" ignore="Y" collide="N"/> <material name="nitro-particle.png" alpha="Y" light="N" ignore="Y" collide="N"/> <material name="magnet.png" clampU="Y" clampV="Y" transparency="Y" light="N" ignore="Y" collide="N"/> Modified: main/trunk/src/graphics/explosion.cpp =================================================================== --- main/trunk/src/graphics/explosion.cpp 2009-12-24 01:00:47 UTC (rev 4348) +++ main/trunk/src/graphics/explosion.cpp 2009-12-24 02:58:50 UTC (rev 4349) @@ -27,30 +27,37 @@ #include "items/projectile_manager.hpp" #include "utils/vec3.hpp" +const float explosion_time = 1.5f; +const float burst_time = 0.1f; + Explosion::Explosion(const Vec3& coord, const int explosion_sound) { - m_remaining_time = 0.1f; // short emision time, explosion, not constant flame + m_remaining_time = burst_time; // short emision time, explosion, not constant flame m_node = irr_driver->addParticleNode(); m_node->setPosition(coord.toIrrVector()); - Material *m = material_manager->getMaterial("explode.png"); + Material* m = material_manager->getMaterial("explode.png"); m_node->setMaterialTexture(0, m->getTexture()); m->setMaterialProperties(&(m_node->getMaterial(0))); - m_node->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); + m_node->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR ); scene::IParticleEmitter* em = m_node->createSphereEmitter(core::vector3df(0.0f,0.0f,0.0f), 0.5f, core::vector3df(0.0f,0.005f,0.0f), // velocity in m/ms 600, 900, // min max particles per sec video::SColor(0, 0, 0, 0), video::SColor(0, 0, 0, 0), // min max colour - 1000, 1500, // min max life ms + (burst_time + explosion_time)*1000.0f, + (burst_time + explosion_time)*1000.0f, // min max life ms 90, // max angle core::dimension2df(0.3f, 0.3f), core::dimension2df(0.75f, 0.75f) // min max start size ); m_node->setEmitter(em); // this grabs the emitter em->drop(); // so we can drop it here without deleting it - scene::IParticleAffector* fade_out_affector = m_node->createFadeOutParticleAffector(video::SColor(0, 0, 0, 0), 10000 /* fade out time */); + /* + // doesn't work; instead we'll be doing it by hand below + scene::IParticleAffector* fade_out_affector = m_node->createFadeOutParticleAffector(video::SColor(0, 0, 0, 0), 10000); m_node->addAffector(fade_out_affector); // same goes for the affector fade_out_affector->drop(); + */ scene::IParticleAffector* scale_affector = m_node->createScaleParticleAffector(core::dimension2df(3.0f, 3.0f)); m_node->addAffector(scale_affector); // same goes for the affector @@ -85,8 +92,27 @@ //----------------------------------------------------------------------------- void Explosion::update(float dt) { - m_remaining_time -=dt; - + m_remaining_time -= dt; + + if (m_remaining_time < 0.0f && m_remaining_time >= -explosion_time) + { + + const float intensity = 255-(m_remaining_time/-explosion_time)*255; + m_node->getMaterial(0).AmbientColor.setGreen(intensity); + m_node->getMaterial(0).DiffuseColor.setGreen(intensity); + m_node->getMaterial(0).EmissiveColor.setGreen(intensity); + + m_node->getMaterial(0).AmbientColor.setBlue(intensity); + m_node->getMaterial(0).DiffuseColor.setBlue(intensity); + m_node->getMaterial(0).EmissiveColor.setBlue(intensity); + + m_node->getMaterial(0).AmbientColor.setRed(intensity); + m_node->getMaterial(0).DiffuseColor.setRed(intensity); + m_node->getMaterial(0).EmissiveColor.setRed(intensity); + + } + + // Do nothing more if the animation is still playing if (m_remaining_time>0) return; @@ -98,7 +124,7 @@ // m_remaining_time = 0; //} //else - if (m_remaining_time > -1.5f) + if (m_remaining_time > -explosion_time) { // Stop the emitter and wait a little while for all particles to have time to fade out m_node->getEmitter()->setMinParticlesPerSecond(0); Modified: main/trunk/src/graphics/explosion.hpp =================================================================== --- main/trunk/src/graphics/explosion.hpp 2009-12-24 01:00:47 UTC (rev 4348) +++ main/trunk/src/graphics/explosion.hpp 2009-12-24 02:58:50 UTC (rev 4349) @@ -32,7 +32,7 @@ SFXBase* m_explode_sound; float m_remaining_time; scene::IParticleSystemSceneNode *m_node; - + public: Explosion(const Vec3& coord, const int explosion_sound); ~Explosion(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2009-12-28 19:38:11
|
Revision: 4358 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4358&view=rev Author: auria Date: 2009-12-28 19:37:59 +0000 (Mon, 28 Dec 2009) Log Message: ----------- Added 'starts rotating around head' effect for hit karts Modified Paths: -------------- main/trunk/data/textures/materials.xml main/trunk/src/Makefile.am main/trunk/src/graphics/irr_driver.cpp main/trunk/src/graphics/irr_driver.hpp main/trunk/src/ide/Xcode/STK_XCode.xcodeproj/project.pbxproj main/trunk/src/karts/kart.cpp main/trunk/src/karts/kart.hpp Added Paths: ----------- main/trunk/src/graphics/stars.cpp main/trunk/src/graphics/stars.hpp Modified: main/trunk/data/textures/materials.xml =================================================================== --- main/trunk/data/textures/materials.xml 2009-12-28 18:13:24 UTC (rev 4357) +++ main/trunk/data/textures/materials.xml 2009-12-28 19:37:59 UTC (rev 4358) @@ -15,6 +15,7 @@ <material name="stonewall.png" alpha="0.0" collide="N"/> <material name="pebbles.png" alpha="0.0" collide="N"/> <material name="egypt.png" alpha="0.0"/> + <material name="starparticle.png" clampU="Y" clampV="Y" transparency="Y" collide="N" ignore="Y" light="N"/> <material name="pyramidwall.png" alpha="0.0" collide="N"/> <material name="lava.png" alpha="0.0" light="N" reset="Y"/> <material name="metalgrid.png" transparency="Y" alpha="0.3" collide="N"/> Modified: main/trunk/src/Makefile.am =================================================================== --- main/trunk/src/Makefile.am 2009-12-28 18:13:24 UTC (rev 4357) +++ main/trunk/src/Makefile.am 2009-12-28 19:37:59 UTC (rev 4358) @@ -70,6 +70,8 @@ graphics/skid_marks.hpp \ graphics/smoke.cpp \ graphics/smoke.hpp \ + graphics/stars.cpp \ + graphics/stars.hpp \ graphics/water_splash.hpp \ graphics/water_splash.cpp \ guiengine/CGUIFont.cpp \ Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2009-12-28 18:13:24 UTC (rev 4357) +++ main/trunk/src/graphics/irr_driver.cpp 2009-12-28 19:37:59 UTC (rev 4358) @@ -365,6 +365,17 @@ } // addMesh // ---------------------------------------------------------------------------- +/** Adds a billboard node to scene. + */ +scene::ISceneNode *IrrDriver::addBillboard(const core::dimension2d< f32 > size, video::ITexture *texture, scene::ISceneNode* parent) +{ + scene::IBillboardSceneNode* node = m_scene_manager->addBillboardSceneNode(parent, size); + assert(node->getMaterialCount() > 0); + node->setMaterialTexture(0, texture); + return node; +} // addMesh + +// ---------------------------------------------------------------------------- /** Creates a quad mesh buffer and adds it to the scene graph. (FIXME: wrong docs? I don't think it does) */ scene::IMesh *IrrDriver::createQuadMesh(const video::SMaterial *material, Modified: main/trunk/src/graphics/irr_driver.hpp =================================================================== --- main/trunk/src/graphics/irr_driver.hpp 2009-12-28 18:13:24 UTC (rev 4357) +++ main/trunk/src/graphics/irr_driver.hpp 2009-12-28 19:37:59 UTC (rev 4358) @@ -89,6 +89,8 @@ float wave_speed, float wave_length); scene::ISceneNode *addOctTree(scene::IMesh *mesh); scene::ISceneNode *addMesh(scene::IMesh *mesh); + scene::ISceneNode *addBillboard(const core::dimension2d< f32 > size, video::ITexture *texture, scene::ISceneNode* parent=NULL); + scene::IParticleSystemSceneNode *addParticleNode(bool default_emitter=true); scene::ISceneNode *addSkyDome(const std::string &texture, int hori_res, Added: main/trunk/src/graphics/stars.cpp =================================================================== --- main/trunk/src/graphics/stars.cpp (rev 0) +++ main/trunk/src/graphics/stars.cpp 2009-12-28 19:37:59 UTC (rev 4358) @@ -0,0 +1,124 @@ +// SuperTuxKart - a fun racing game with go-kart +// +// 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 "graphics/stars.hpp" + +#include "graphics/irr_driver.hpp" +#include "graphics/material.hpp" +#include "graphics/material_manager.hpp" + +#include "irrlicht.h" +#include <cmath> + +const int STAR_AMOUNT = 8; +const float RADIUS = 0.7f; +const float STAR_SIZE = 0.4f; + +Stars::Stars(scene::IAnimatedMeshSceneNode* parentKart) +{ + m_parent_kart_node = parentKart; + m_enabled = false; + + video::ITexture* texture = irr_driver->getTexture("starparticle.png"); + Material* star_material = material_manager->getMaterial("starparticle.png"); + + m_center = core::vector3df(0.0f, 0.6f, 0.0f); + + for (int n=0; n<STAR_AMOUNT; n++) + { + scene::ISceneNode* billboard = irr_driver->addBillboard(core::dimension2d< f32 >(STAR_SIZE, STAR_SIZE), + texture, + parentKart); + star_material->setMaterialProperties(&(billboard->getMaterial(0))); + billboard->setMaterialTexture(0, star_material->getTexture()); + + billboard->setVisible(false); + + m_nodes.push_back(billboard); + } + + // for debugging + //m_enabled = true; + //m_remaining_time = 99999.0f; + //update(0); +} + +// ---------------------------------------------------------------------------- + +Stars::~Stars() +{ + const int nodeAmount = m_nodes.size(); + for (int n=0; n<nodeAmount; n++) + { + m_parent_kart_node->removeChild(m_nodes[n]); + } +} + +// ---------------------------------------------------------------------------- + +void Stars::showFor(float time) +{ + m_enabled = true; + m_remaining_time = time; + + const int nodeAmount = m_nodes.size(); + for (int n=0; n<nodeAmount; n++) + { + m_nodes[n]->setVisible(true); + } + + // set stars initial position + update(0); +} + +// ---------------------------------------------------------------------------- + +void Stars::update(float delta_t) +{ + if (!m_enabled) return; + + m_remaining_time -= delta_t; + if (m_remaining_time < 0) + { + m_enabled = false; + + const int nodeAmount = m_nodes.size(); + for (int n=0; n<nodeAmount; n++) + { + m_nodes[n]->setVisible(false); + } + return; + } + + const int nodeAmount = m_nodes.size(); + for (int n=0; n<nodeAmount; n++) + { + // do one full rotation every 4 seconds (this "ranges" ranges from 0 to 1) + float angle = (m_remaining_time / 4.0f) - (int)(m_remaining_time / 4); + + // each star must be at a different angle + angle += n * (1.0f / STAR_AMOUNT); + + // keep angle in range [0, 1[ + angle -= (int)angle; + + // set position + m_nodes[n]->setPosition(m_center + core::vector3df( std::cos(angle*M_PI*2.0f)*RADIUS, + 0.0f, + std::sin(angle*M_PI*2.0f)*RADIUS)); + } +} + Property changes on: main/trunk/src/graphics/stars.cpp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: main/trunk/src/graphics/stars.hpp =================================================================== --- main/trunk/src/graphics/stars.hpp (rev 0) +++ main/trunk/src/graphics/stars.hpp 2009-12-28 19:37:59 UTC (rev 4358) @@ -0,0 +1,59 @@ +// SuperTuxKart - a fun racing game with go-kart +// +// 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. + +#ifndef HEADER_STARS_HPP +#define HEADER_STARS_HPP + +#include <vector> + +#include "irrlicht.h" +using namespace irr; + +/** + * This class is used to display rotating stars around a kart's head. + */ +class Stars +{ +private: + + /** Vector containing the stars */ + std::vector<scene::ISceneNode*> m_nodes; + + /** The scene node of the kart to which this shadow belongs. */ + scene::ISceneNode *m_parent_kart_node; + + /** Center around which stars rotate */ + core::vector3df m_center; + + /** Whether stars are currently enabled */ + bool m_enabled; + + float m_remaining_time; + + public: + Stars (scene::IAnimatedMeshSceneNode* parentKart); + ~Stars (); + //void show (); + void showFor (float time); + //void hide (); + void update (float delta_t); + +}; +#endif + +/* EOF */ + + Property changes on: main/trunk/src/graphics/stars.hpp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Modified: main/trunk/src/ide/Xcode/STK_XCode.xcodeproj/project.pbxproj =================================================================== --- main/trunk/src/ide/Xcode/STK_XCode.xcodeproj/project.pbxproj 2009-12-28 18:13:24 UTC (rev 4357) +++ main/trunk/src/ide/Xcode/STK_XCode.xcodeproj/project.pbxproj 2009-12-28 19:37:59 UTC (rev 4358) @@ -269,6 +269,7 @@ 95C77D631069589B0080838E /* ambient_light_sphere.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95C77D621069589B0080838E /* ambient_light_sphere.cpp */; }; 95C77D66106958A50080838E /* check_line.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95C77D65106958A50080838E /* check_line.cpp */; }; 95C77D6F106958E10080838E /* check_sphere.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95C77D6D106958E10080838E /* check_sphere.cpp */; }; + 95C9C97210E93456005A418D /* stars.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95C9C97010E93456005A418D /* stars.cpp */; }; 95CB476C0FF30EF400413BAE /* bezier_curve.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95CB476B0FF30EF400413BAE /* bezier_curve.cpp */; }; 95D1F5F70FC8C3E300FF6968 /* input.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95D1F5F60FC8C3E300FF6968 /* input.cpp */; }; 95D2343F1078227A00625256 /* feature_unlocked.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95D2343E1078227A00625256 /* feature_unlocked.cpp */; }; @@ -868,6 +869,8 @@ 95C77D65106958A50080838E /* check_line.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = check_line.cpp; path = ../../tracks/check_line.cpp; sourceTree = SOURCE_ROOT; }; 95C77D6D106958E10080838E /* check_sphere.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = check_sphere.cpp; path = ../../tracks/check_sphere.cpp; sourceTree = SOURCE_ROOT; }; 95C77D6E106958E10080838E /* check_sphere.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = check_sphere.hpp; path = ../../tracks/check_sphere.hpp; sourceTree = SOURCE_ROOT; }; + 95C9C97010E93456005A418D /* stars.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = stars.cpp; path = ../../graphics/stars.cpp; sourceTree = SOURCE_ROOT; }; + 95C9C97110E93456005A418D /* stars.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = stars.hpp; path = ../../graphics/stars.hpp; sourceTree = SOURCE_ROOT; }; 95CA59F60F82FCB7003323DB /* physical_object.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = physical_object.hpp; path = ../../physics/physical_object.hpp; sourceTree = SOURCE_ROOT; }; 95CA59F70F82FCB7003323DB /* physical_object.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = physical_object.cpp; path = ../../physics/physical_object.cpp; sourceTree = SOURCE_ROOT; }; 95CB476A0FF30EF400413BAE /* bezier_curve.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = bezier_curve.hpp; path = ../../tracks/bezier_curve.hpp; sourceTree = SOURCE_ROOT; }; @@ -1211,6 +1214,8 @@ 952A1540103F66D600B1895D /* skid_marks.hpp */, 952A1541103F66D600B1895D /* smoke.cpp */, 952A1542103F66D600B1895D /* smoke.hpp */, + 95C9C97010E93456005A418D /* stars.cpp */, + 95C9C97110E93456005A418D /* stars.hpp */, 952A1543103F66D600B1895D /* water_splash.cpp */, 952A1544103F66D600B1895D /* water_splash.hpp */, ); @@ -2576,6 +2581,7 @@ 953C3CCA10CAF3EE0025F78A /* CGUIFont.cpp in Sources */, 956541BB10DD5F0A00C83E99 /* arenas_screen.cpp in Sources */, 956541E110DD628C00C83E99 /* add_device_dialog.cpp in Sources */, + 95C9C97210E93456005A418D /* stars.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; Modified: main/trunk/src/karts/kart.cpp =================================================================== --- main/trunk/src/karts/kart.cpp 2009-12-28 18:13:24 UTC (rev 4357) +++ main/trunk/src/karts/kart.cpp 2009-12-28 19:37:59 UTC (rev 4358) @@ -34,6 +34,7 @@ #include "graphics/shadow.hpp" #include "graphics/skid_marks.hpp" #include "graphics/smoke.hpp" +#include "graphics/stars.hpp" #include "graphics/water_splash.hpp" #include "modes/world.hpp" #include "io/file_manager.hpp" @@ -75,6 +76,7 @@ m_shadow_enabled = false; m_shadow = NULL; m_smoke_system = NULL; + m_stars_effect = NULL; m_water_splash_system = NULL; m_nitro = NULL; m_skidmarks = NULL; @@ -278,6 +280,7 @@ if(m_nitro) delete m_nitro; delete m_shadow; + delete m_stars_effect; if(m_skidmarks) delete m_skidmarks ; @@ -511,6 +514,8 @@ getVehicle()->getRigidBody()->applyTorqueImpulse(btVector3(sign_c * float(rand()%32*5), sign_d * float(rand()%32*5), sign_e * float(rand()%32*5))); + + m_stars_effect->showFor(6.0f); } else // only affected by a distant explosion { @@ -533,6 +538,7 @@ float sign_a = (sign_bits & (0x1 << 8)) ? 1.0f : -1.0f; getVehicle()->getRigidBody()->applyTorqueImpulse(btVector3(0, 0, sign_a * float(rand()%32*5))); } + } // handleExplosion //----------------------------------------------------------------------------- @@ -1152,6 +1158,9 @@ ,getHPR().getHeading() ); #endif + + // update star effect (call will do nothing if stars are not activated) + m_stars_effect->update(dt); } // updatePhysics //----------------------------------------------------------------------------- @@ -1195,7 +1204,8 @@ m_shadow = new Shadow(file_manager->getKartFile(m_kart_properties->getShadowFile(), getIdent() ), - m_animated_node); + m_animated_node); + m_stars_effect = new Stars(m_animated_node); } // loadData //----------------------------------------------------------------------------- Modified: main/trunk/src/karts/kart.hpp =================================================================== --- main/trunk/src/karts/kart.hpp 2009-12-28 18:13:24 UTC (rev 4357) +++ main/trunk/src/karts/kart.hpp 2009-12-28 19:37:59 UTC (rev 4358) @@ -42,6 +42,7 @@ class btKart; class btVehicleTuning; class Quad; +class Stars; class Kart : public TerrainInfo, public Moveable { @@ -84,14 +85,20 @@ // ----------------- /** The shadow of a kart. */ Shadow *m_shadow; + /** If a kart is flying, the shadow is disabled (since it is * stuck to the kart, i.e. the shadow would be flying, too). */ bool m_shadow_enabled; + /** Smoke from skidding. */ Smoke *m_smoke_system; + /** Water splash when driving in water. */ WaterSplash *m_water_splash_system; + /** For stars rotating around head effect */ + Stars *m_stars_effect; + /** Graphical effect when using a nitro. */ Nitro *m_nitro; float m_wheel_rotation; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2009-12-28 20:06:50
|
Revision: 4359 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4359&view=rev Author: auria Date: 2009-12-28 20:06:41 +0000 (Mon, 28 Dec 2009) Log Message: ----------- Improved stars effect with fade in and fade out Modified Paths: -------------- main/trunk/data/textures/materials.xml main/trunk/src/graphics/stars.cpp main/trunk/src/graphics/stars.hpp Modified: main/trunk/data/textures/materials.xml =================================================================== --- main/trunk/data/textures/materials.xml 2009-12-28 19:37:59 UTC (rev 4358) +++ main/trunk/data/textures/materials.xml 2009-12-28 20:06:41 UTC (rev 4359) @@ -15,7 +15,7 @@ <material name="stonewall.png" alpha="0.0" collide="N"/> <material name="pebbles.png" alpha="0.0" collide="N"/> <material name="egypt.png" alpha="0.0"/> - <material name="starparticle.png" clampU="Y" clampV="Y" transparency="Y" collide="N" ignore="Y" light="N"/> + <material name="starparticle.png" clampU="Y" clampV="Y" alpha="Y" collide="N" ignore="Y" light="N"/> <material name="pyramidwall.png" alpha="0.0" collide="N"/> <material name="lava.png" alpha="0.0" light="N" reset="Y"/> <material name="metalgrid.png" transparency="Y" alpha="0.3" collide="N"/> Modified: main/trunk/src/graphics/stars.cpp =================================================================== --- main/trunk/src/graphics/stars.cpp 2009-12-28 19:37:59 UTC (rev 4358) +++ main/trunk/src/graphics/stars.cpp 2009-12-28 20:06:41 UTC (rev 4359) @@ -43,6 +43,7 @@ texture, parentKart); star_material->setMaterialProperties(&(billboard->getMaterial(0))); + //billboard->getMaterial(0).MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL; billboard->setMaterialTexture(0, star_material->getTexture()); billboard->setVisible(false); @@ -73,11 +74,13 @@ { m_enabled = true; m_remaining_time = time; + m_fade_in_time = 1.0f; const int nodeAmount = m_nodes.size(); for (int n=0; n<nodeAmount; n++) { m_nodes[n]->setVisible(true); + ((scene::IBillboardSceneNode*)m_nodes[n])->setSize( core::dimension2d< f32 >(0.01f, 0.01f) ); } // set stars initial position @@ -115,10 +118,40 @@ // keep angle in range [0, 1[ angle -= (int)angle; + float radius = RADIUS; + + + // manage "fade-in" + if (m_fade_in_time > 0.0f) + { + //m_nodes[n]->getMaterial(0).AmbientColor.setAlpha((1.0f - m_fade_in_time)*255.0f); + //m_nodes[n]->getMaterial(0).DiffuseColor.setAlpha((1.0f - m_fade_in_time)*255.0f); + + float fade = (1.0f - m_fade_in_time); + + ((scene::IBillboardSceneNode*)m_nodes[n])->setSize( + core::dimension2d< f32 >(fade*STAR_SIZE, fade*STAR_SIZE) ); + + radius *= fade; + } + // manage "fade-out" + else if (m_remaining_time < 1.0f) + { + //m_nodes[n]->getMaterial(0).AmbientColor.setAlpha(m_remaining_time*255.0f); + //m_nodes[n]->getMaterial(0).DiffuseColor.setAlpha(m_remaining_time*255.0f); + + radius *= m_remaining_time; + + ((scene::IBillboardSceneNode*)m_nodes[n])->setSize( core::dimension2d< f32 >(m_remaining_time*STAR_SIZE, + m_remaining_time*STAR_SIZE) ); + } + // set position - m_nodes[n]->setPosition(m_center + core::vector3df( std::cos(angle*M_PI*2.0f)*RADIUS, - 0.0f, - std::sin(angle*M_PI*2.0f)*RADIUS)); - } + m_nodes[n]->setPosition(m_center + core::vector3df( std::cos(angle*M_PI*2.0f)*radius, + 0.0f, + std::sin(angle*M_PI*2.0f)*radius)); + } // end for + + if (m_fade_in_time > 0.0f) m_fade_in_time -= delta_t; } Modified: main/trunk/src/graphics/stars.hpp =================================================================== --- main/trunk/src/graphics/stars.hpp 2009-12-28 19:37:59 UTC (rev 4358) +++ main/trunk/src/graphics/stars.hpp 2009-12-28 20:06:41 UTC (rev 4359) @@ -41,6 +41,7 @@ /** Whether stars are currently enabled */ bool m_enabled; + float m_fade_in_time; float m_remaining_time; public: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2009-12-30 18:00:30
|
Revision: 4366 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4366&view=rev Author: auria Date: 2009-12-30 18:00:23 +0000 (Wed, 30 Dec 2009) Log Message: ----------- Cleanup up a few font-related harcoded constants or duplicated code Modified Paths: -------------- main/trunk/data/gui/License.txt main/trunk/src/guiengine/engine.cpp main/trunk/src/guiengine/engine.hpp main/trunk/src/guiengine/widgets/dynamic_ribbon_widget.cpp main/trunk/src/guiengine/widgets/icon_button_widget.cpp main/trunk/src/guiengine/widgets/ribbon_widget.cpp main/trunk/src/states_screens/dialogs/add_device_dialog.cpp main/trunk/src/states_screens/dialogs/enter_player_name_dialog.cpp main/trunk/src/states_screens/dialogs/player_info_dialog.cpp main/trunk/src/states_screens/dialogs/press_a_key_dialog.cpp main/trunk/src/states_screens/dialogs/race_over_dialog.cpp main/trunk/src/states_screens/dialogs/race_paused_dialog.cpp Modified: main/trunk/data/gui/License.txt =================================================================== --- main/trunk/data/gui/License.txt 2009-12-30 17:43:06 UTC (rev 4365) +++ main/trunk/data/gui/License.txt 2009-12-30 18:00:23 UTC (rev 4366) @@ -15,6 +15,8 @@ title_font, by Marianne Gagnon (Auria), released under CC-BY-SA 3+ +screen*.png, by Marianne Gagnon (Auria), including elements from the public domain Tango icon set + ==== Glass Skin by Auria, under CC-BY-SA 3+ Modified: main/trunk/src/guiengine/engine.cpp =================================================================== --- main/trunk/src/guiengine/engine.cpp 2009-12-30 17:43:06 UTC (rev 4365) +++ main/trunk/src/guiengine/engine.cpp 2009-12-30 18:00:23 UTC (rev 4366) @@ -88,7 +88,13 @@ // otherwise check if the focus is the given widget return g_focus_for_player[playerID]->isSameIrrlichtWidgetAs(w); } - + + int getFontHeight() + { + // FIXME: this needs to be reset when changing resolution + static int fh = g_font->getDimension( L"X" ).Height; + return fh; + } // ----------------------------------------------------------------------------- void clear() { Modified: main/trunk/src/guiengine/engine.hpp =================================================================== --- main/trunk/src/guiengine/engine.hpp 2009-12-30 17:43:06 UTC (rev 4365) +++ main/trunk/src/guiengine/engine.hpp 2009-12-30 18:00:23 UTC (rev 4366) @@ -258,6 +258,9 @@ inline AbstractStateManager* getStateManager() { return Private::g_state_manager; } inline Skin* getSkin() { return Private::g_skin; } + /** Returns the height of the font in pixels */ + int getFontHeight(); + float getLatestDt(); /** Add a cutscene to the list of screens known by the gui engine */ Modified: main/trunk/src/guiengine/widgets/dynamic_ribbon_widget.cpp =================================================================== --- main/trunk/src/guiengine/widgets/dynamic_ribbon_widget.cpp 2009-12-30 17:43:06 UTC (rev 4365) +++ main/trunk/src/guiengine/widgets/dynamic_ribbon_widget.cpp 2009-12-30 18:00:23 UTC (rev 4366) @@ -60,7 +60,7 @@ if (m_has_label) { // FIXME - won't work with multiline labels. - m_label_height = GUIEngine::getFont()->getDimension( L"X" ).Height; + m_label_height = GUIEngine::getFontHeight(); } else { Modified: main/trunk/src/guiengine/widgets/icon_button_widget.cpp =================================================================== --- main/trunk/src/guiengine/widgets/icon_button_widget.cpp 2009-12-30 17:43:06 UTC (rev 4365) +++ main/trunk/src/guiengine/widgets/icon_button_widget.cpp 2009-12-30 18:00:23 UTC (rev 4366) @@ -70,7 +70,7 @@ 0 : atoi(m_properties[PROP_EXTEND_LABEL].c_str()) ); widget_size = rect<s32>(x - label_extra_size/2, y + h, x + w + label_extra_size/2, y + h*2); - m_label = GUIEngine::getGUIEnv()->addStaticText(message.c_str(), widget_size, false, false /* word wrap */, m_parent); + m_label = GUIEngine::getGUIEnv()->addStaticText(message.c_str(), widget_size, false, true /* word wrap */, m_parent); m_label->setTextAlignment(EGUIA_CENTER, EGUIA_UPPERLEFT); m_label->setTabStop(false); } Modified: main/trunk/src/guiengine/widgets/ribbon_widget.cpp =================================================================== --- main/trunk/src/guiengine/widgets/ribbon_widget.cpp 2009-12-30 17:43:06 UTC (rev 4365) +++ main/trunk/src/guiengine/widgets/ribbon_widget.cpp 2009-12-30 18:00:23 UTC (rev 4366) @@ -159,9 +159,8 @@ { // how much space to keep for the label under the button const bool has_label = m_children[i].m_text.size() > 0; - const int needed_space_under_button = has_label ? 30 : 10; // quite arbitrary for now + const int needed_space_under_button = has_label ? GUIEngine::getFontHeight() : 10; - // For now, the image stretches to keep the aspect ratio of the widget (FIXME, doesn't work) float imageRatio = (float)m_children[i].w/(float)m_children[i].h; // size of the image Modified: main/trunk/src/states_screens/dialogs/add_device_dialog.cpp =================================================================== --- main/trunk/src/states_screens/dialogs/add_device_dialog.cpp 2009-12-30 17:43:06 UTC (rev 4365) +++ main/trunk/src/states_screens/dialogs/add_device_dialog.cpp 2009-12-30 18:00:23 UTC (rev 4366) @@ -35,7 +35,7 @@ AddDeviceDialog::AddDeviceDialog() : ModalDialog(0.7f, 0.7f) { IGUIFont* font = GUIEngine::getFont(); - const int textHeight = font->getDimension(L"X").Height; + const int textHeight = GUIEngine::getFontHeight(); const int buttonHeight = textHeight + 10; const int y_bottom = m_area.getHeight() - 2*(buttonHeight + 10) - 20; Modified: main/trunk/src/states_screens/dialogs/enter_player_name_dialog.cpp =================================================================== --- main/trunk/src/states_screens/dialogs/enter_player_name_dialog.cpp 2009-12-30 17:43:06 UTC (rev 4365) +++ main/trunk/src/states_screens/dialogs/enter_player_name_dialog.cpp 2009-12-30 18:00:23 UTC (rev 4366) @@ -47,7 +47,7 @@ // ---- IGUIFont* font = GUIEngine::getFont(); - const int textHeight = font->getDimension(L"X").Height; + const int textHeight = GUIEngine::getFontHeight(); const int textAreaYFrom = m_area.getHeight()/2 - textHeight/2; Modified: main/trunk/src/states_screens/dialogs/player_info_dialog.cpp =================================================================== --- main/trunk/src/states_screens/dialogs/player_info_dialog.cpp 2009-12-30 17:43:06 UTC (rev 4365) +++ main/trunk/src/states_screens/dialogs/player_info_dialog.cpp 2009-12-30 18:00:23 UTC (rev 4366) @@ -46,7 +46,7 @@ const int y4 = m_area.getHeight()*5/6; IGUIFont* font = GUIEngine::getFont(); - const int textHeight = font->getDimension(L"X").Height; + const int textHeight = GUIEngine::getFontHeight(); const int buttonHeight = textHeight + 10; { @@ -122,7 +122,7 @@ IGUIFont* font = GUIEngine::getFont(); - const int textHeight = font->getDimension(L"X").Height; + const int textHeight = GUIEngine::getFontHeight(); const int buttonHeight = textHeight + 10; Modified: main/trunk/src/states_screens/dialogs/press_a_key_dialog.cpp =================================================================== --- main/trunk/src/states_screens/dialogs/press_a_key_dialog.cpp 2009-12-30 17:43:06 UTC (rev 4365) +++ main/trunk/src/states_screens/dialogs/press_a_key_dialog.cpp 2009-12-30 18:00:23 UTC (rev 4366) @@ -41,8 +41,8 @@ widget->add(); - IGUIFont* font = GUIEngine::getFont(); - const int textHeight = font->getDimension(L"X").Height; + //IGUIFont* font = GUIEngine::getFont(); + const int textHeight = GUIEngine::getFontHeight(); ButtonWidget* widget2 = new ButtonWidget(); widget2->m_properties[PROP_ID] = "cancel"; Modified: main/trunk/src/states_screens/dialogs/race_over_dialog.cpp =================================================================== --- main/trunk/src/states_screens/dialogs/race_over_dialog.cpp 2009-12-30 17:43:06 UTC (rev 4365) +++ main/trunk/src/states_screens/dialogs/race_over_dialog.cpp 2009-12-30 18:00:23 UTC (rev 4366) @@ -45,7 +45,7 @@ //const int h = m_area.getHeight(); IGUIFont* font = GUIEngine::getFont(); - const int text_height = font->getDimension(L"X").Height; + const int text_height = GUIEngine::getFontHeight(); const int button_h = text_height + 6; const int margin_between_buttons = 12; Modified: main/trunk/src/states_screens/dialogs/race_paused_dialog.cpp =================================================================== --- main/trunk/src/states_screens/dialogs/race_paused_dialog.cpp 2009-12-30 17:43:06 UTC (rev 4365) +++ main/trunk/src/states_screens/dialogs/race_paused_dialog.cpp 2009-12-30 18:00:23 UTC (rev 4366) @@ -41,7 +41,7 @@ RaceManager::getWorld()->pause(); IGUIFont* font = GUIEngine::getTitleFont(); - const int text_height = font->getDimension(L"X").Height; + const int text_height = GUIEngine::getFontHeight(); IGUIFont* titlefont = GUIEngine::getTitleFont(); const int title_height = font->getDimension(L"X").Height; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-01-02 02:08:31
|
Revision: 4382 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4382&view=rev Author: auria Date: 2010-01-02 02:08:25 +0000 (Sat, 02 Jan 2010) Log Message: ----------- Added more documentation to the input screen, answering a few of our recurrent FAQs Modified Paths: -------------- main/trunk/data/gui/options_input.stkgui main/trunk/src/states_screens/dialogs/add_device_dialog.cpp Modified: main/trunk/data/gui/options_input.stkgui =================================================================== --- main/trunk/data/gui/options_input.stkgui 2010-01-02 01:55:20 UTC (rev 4381) +++ main/trunk/data/gui/options_input.stkgui 2010-01-02 02:08:25 UTC (rev 4382) @@ -103,7 +103,11 @@ <spacer width="50" height="10" /> - <button id="add_device" proportion="1" width="25%" I18N="In the input configuration screen" text="Add a device"/> + <button id="add_device" proportion="1" width="25%" I18N="In the input configuration screen" text="Add a device"/> + + <label text="* Which config to use will be inferred from which 'fire' key is pressed to join the game." + proportion="2" word_wrap="true"/> + <spacer width="50" height="10" /> </box> <spacer width="50" height="40" /> Modified: main/trunk/src/states_screens/dialogs/add_device_dialog.cpp =================================================================== --- main/trunk/src/states_screens/dialogs/add_device_dialog.cpp 2010-01-02 01:55:20 UTC (rev 4381) +++ main/trunk/src/states_screens/dialogs/add_device_dialog.cpp 2010-01-02 02:08:25 UTC (rev 4382) @@ -42,7 +42,7 @@ core::rect<s32> text_area( 15, 15, m_area.getWidth()-15, y_bottom-15 ); - IGUIStaticText* b = GUIEngine::getGUIEnv()->addStaticText( _("To add a new Gamepad/Joystick device, simply start SuperTuxKart with it connected and it will appear in the list.\n\nTo add a keyboard config, you can use the button below, HOWEVER please note that most keyboards only support a limited amount of simultaneous keypresses and are thus inappropriate for multiplayer gameplay."), + IGUIStaticText* b = GUIEngine::getGUIEnv()->addStaticText( _("To add a new Gamepad/Joystick device, simply start SuperTuxKart with it connected and it will appear in the list.\n\nTo add a keyboard config, you can use the button below, HOWEVER please note that most keyboards only support a limited amount of simultaneous keypresses and are thus inappropriate for multiplayer gameplay. (You can, however, connect multiple keyboards to the computer. Remember that everyone still needs different keybindings in this case.)"), text_area, false , true , // border, word warp m_irrlicht_window); b->setTabStop(false); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-01-02 20:55:28
|
Revision: 4388 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4388&view=rev Author: auria Date: 2010-01-02 20:55:19 +0000 (Sat, 02 Jan 2010) Log Message: ----------- Improved buttons to have their size depend on text contents; made the 'enter' key trigger a PA_FIRE action Modified Paths: -------------- main/trunk/data/gui/options_av.stkgui main/trunk/data/gui/options_players.stkgui main/trunk/src/guiengine/widget.cpp main/trunk/src/guiengine/widget.hpp main/trunk/src/guiengine/widgets/button_widget.hpp main/trunk/src/guiengine/widgets/spinner_widget.hpp main/trunk/src/guiengine/widgets/text_box_widget.hpp main/trunk/src/input/input_manager.cpp Modified: main/trunk/data/gui/options_av.stkgui =================================================================== --- main/trunk/data/gui/options_av.stkgui 2010-01-02 16:58:19 UTC (rev 4387) +++ main/trunk/data/gui/options_av.stkgui 2010-01-02 20:55:19 UTC (rev 4388) @@ -62,7 +62,7 @@ <spacer height="10" width="10"/> - <button id="apply_resolution" width="40%" height="30" + <button id="apply_resolution" height="35" I18N="In the video settings menu" text="Apply video changes" /> </box> Modified: main/trunk/data/gui/options_players.stkgui =================================================================== --- main/trunk/data/gui/options_players.stkgui 2010-01-02 16:58:19 UTC (rev 4387) +++ main/trunk/data/gui/options_players.stkgui 2010-01-02 20:55:19 UTC (rev 4388) @@ -27,7 +27,7 @@ <list id="players" proportion="5" width="75%" align="center"/> <spacer width="20" height="25"/> - <button id="addplayer" x="20" width="35%" height="30" + <button id="addplayer" x="20" height="35" I18N="In players configuration menu" text="Add Player" align="center"/> <!-- Modified: main/trunk/src/guiengine/widget.cpp =================================================================== --- main/trunk/src/guiengine/widget.cpp 2010-01-02 16:58:19 UTC (rev 4387) +++ main/trunk/src/guiengine/widget.cpp 2010-01-02 20:55:19 UTC (rev 4388) @@ -314,10 +314,10 @@ { IGUIFont* font = (m_title_font ? GUIEngine::getTitleFont() : GUIEngine::getFont()); core::dimension2d< u32 > dim = font->getDimension( m_text.c_str() ); - label_w = dim.Width; + label_w = dim.Width + getWidthNeededAroundLabel(); // FIXME - won't work with multiline labels. thus, for now, when multiple // lines are required, we need to specify a height explicitely - label_h = dim.Height; + label_h = dim.Height + getHeightNeededAroundLabel(); } // ---- read dimension Modified: main/trunk/src/guiengine/widget.hpp =================================================================== --- main/trunk/src/guiengine/widget.hpp 2010-01-02 16:58:19 UTC (rev 4387) +++ main/trunk/src/guiengine/widget.hpp 2010-01-02 20:55:19 UTC (rev 4388) @@ -173,7 +173,15 @@ bool m_player_focus[MAX_PLAYER_COUNT]; bool m_reserve_id; - + + /** When inferring widget size from its label length, this method will be called to + * if/how much space must be added to the raw label's size for the widget to be large enough */ + virtual int getWidthNeededAroundLabel() const { return 0; } + + /** When inferring widget size from its label length, this method will be called to + * if/how much space must be added to the raw label's size for the widget to be large enough */ + virtual int getHeightNeededAroundLabel() const { return 0; } + public: /** * This is set to NULL by default; set to something else in a widget to mean Modified: main/trunk/src/guiengine/widgets/button_widget.hpp =================================================================== --- main/trunk/src/guiengine/widgets/button_widget.hpp 2010-01-02 16:58:19 UTC (rev 4387) +++ main/trunk/src/guiengine/widgets/button_widget.hpp 2010-01-02 20:55:19 UTC (rev 4388) @@ -30,6 +30,14 @@ /** A text button widget. See guiengine/engine.hpp for a detailed overview */ class ButtonWidget : public Widget { + /** When inferring widget size from its label length, this method will be called to + * if/how much space must be added to the raw label's size for the widget to be large enough */ + virtual int getWidthNeededAroundLabel() const { return 35; } + + /** When inferring widget size from its label length, this method will be called to + * if/how much space must be added to the raw label's size for the widget to be large enough */ + virtual int getHeightNeededAroundLabel() const { return 16; } + public: ButtonWidget(); virtual ~ButtonWidget() {} Modified: main/trunk/src/guiengine/widgets/spinner_widget.hpp =================================================================== --- main/trunk/src/guiengine/widgets/spinner_widget.hpp 2010-01-02 16:58:19 UTC (rev 4387) +++ main/trunk/src/guiengine/widgets/spinner_widget.hpp 2010-01-02 20:55:19 UTC (rev 4388) @@ -38,6 +38,15 @@ EventPropagation transmitEvent(Widget* w, std::string& originator, const int playerID); EventPropagation rightPressed(const int playerID); EventPropagation leftPressed(const int playerID); + + /** When inferring widget size from its label length, this method will be called to + * if/how much space must be added to the raw label's size for the widget to be large enough */ + virtual int getWidthNeededAroundLabel() const { return 25; } + + /** When inferring widget size from its label length, this method will be called to + * if/how much space must be added to the raw label's size for the widget to be large enough */ + virtual int getHeightNeededAroundLabel() const { return 16; } + public: SpinnerWidget(const bool gauge=false); Modified: main/trunk/src/guiengine/widgets/text_box_widget.hpp =================================================================== --- main/trunk/src/guiengine/widgets/text_box_widget.hpp 2010-01-02 16:58:19 UTC (rev 4387) +++ main/trunk/src/guiengine/widgets/text_box_widget.hpp 2010-01-02 20:55:19 UTC (rev 4388) @@ -30,6 +30,14 @@ /** A text field widget. See guiengine/engine.hpp for a detailed overview */ class TextBoxWidget : public Widget { + /** When inferring widget size from its label length, this method will be called to + * if/how much space must be added to the raw label's size for the widget to be large enough */ + virtual int getWidthNeededAroundLabel() const { return 10; } + + /** When inferring widget size from its label length, this method will be called to + * if/how much space must be added to the raw label's size for the widget to be large enough */ + virtual int getHeightNeededAroundLabel() const { return 10; } + public: TextBoxWidget(); ~TextBoxWidget() Modified: main/trunk/src/input/input_manager.cpp =================================================================== --- main/trunk/src/input/input_manager.cpp 2010-01-02 16:58:19 UTC (rev 4387) +++ main/trunk/src/input/input_manager.cpp 2010-01-02 20:55:19 UTC (rev 4388) @@ -264,17 +264,18 @@ bool action_found = m_device_manager->translateInput( type, deviceID, btnID, axisDirection, value, &player, &action); // in menus, some keyboard keys are standard (before each player selected his device) - // FIXME: should enter always work to accept for a player using keyboard? + // So if a key could not be mapped to any known binding, fall back to check the defaults. if (!action_found && StateManager::get()->getGameState() != GUIEngine::GAME && type == Input::IT_KEYBOARD && m_mode == MENU && m_device_manager->getAssignMode() == NO_ASSIGN) { action = PA_FIRST; - if (btnID == KEY_UP) action = PA_ACCEL; - else if (btnID == KEY_DOWN) action = PA_BRAKE; - else if (btnID == KEY_LEFT) action = PA_LEFT; - else if (btnID == KEY_RIGHT) action = PA_RIGHT; - else if (btnID == KEY_SPACE) action = PA_FIRE; + if (btnID == KEY_UP) action = PA_ACCEL; + else if (btnID == KEY_DOWN) action = PA_BRAKE; + else if (btnID == KEY_LEFT) action = PA_LEFT; + else if (btnID == KEY_RIGHT) action = PA_RIGHT; + else if (btnID == KEY_SPACE) action = PA_FIRE; + else if (btnID == KEY_RETURN) action = PA_FIRE; if (btnID == KEY_RETURN && GUIEngine::ModalDialog::isADialogActive()) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-01-08 00:26:58
|
Revision: 4412 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4412&view=rev Author: auria Date: 2010-01-08 00:23:31 +0000 (Fri, 08 Jan 2010) Log Message: ----------- Attempt at using iconv. Fails miserably for me atm because gettext will only return latin-1 and not UTF-8 like I ask it Modified Paths: -------------- main/trunk/data/tracks/beach/scene.xml main/trunk/src/graphics/irr_driver.cpp main/trunk/src/ide/Xcode/Config.xcconfig main/trunk/src/utils/translation.cpp Modified: main/trunk/data/tracks/beach/scene.xml =================================================================== --- main/trunk/data/tracks/beach/scene.xml 2010-01-08 00:17:25 UTC (rev 4411) +++ main/trunk/data/tracks/beach/scene.xml 2010-01-08 00:23:31 UTC (rev 4412) @@ -7,7 +7,7 @@ <camera final-position ="-5 12 3" final-hpr ="-150 -10 0"/> <sun xyz="0 100 100"/> - <sky-dome texture="lighthouse_sky.png" + <sky-dome texture="/tracks/beach/lighthouse_sky.png" horizontal="16" vertical="16" speed-x="1" speed-y="1" texture-percent="0.5" sphere-percent="1.3"/> Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2010-01-08 00:17:25 UTC (rev 4411) +++ main/trunk/src/graphics/irr_driver.cpp 2010-01-08 00:23:31 UTC (rev 4412) @@ -593,7 +593,16 @@ */ video::ITexture *IrrDriver::getTexture(const std::string &filename) { - return m_scene_manager->getVideoDriver()->getTexture(filename.c_str()); + video::ITexture* out = m_scene_manager->getVideoDriver()->getTexture(filename.c_str()); + +#ifndef NDEBUG + if (out == NULL) + { + printf("Put a breakpoint at line %s:%i to debug!\n", __FILE__, __LINE__ ); + } +#endif + + return out; } // getTexture // ---------------------------------------------------------------------------- Modified: main/trunk/src/ide/Xcode/Config.xcconfig =================================================================== --- main/trunk/src/ide/Xcode/Config.xcconfig 2010-01-08 00:17:25 UTC (rev 4411) +++ main/trunk/src/ide/Xcode/Config.xcconfig 2010-01-08 00:23:31 UTC (rev 4412) @@ -4,5 +4,5 @@ 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=1 -OTHER_LDFLAGS = -lirrlicht +OTHER_LDFLAGS = -lirrlicht -liconv LIBRARY_SEARCH_PATHS = /usr/local/lib /usr/lib Modified: main/trunk/src/utils/translation.cpp =================================================================== --- main/trunk/src/utils/translation.cpp 2010-01-08 00:17:25 UTC (rev 4411) +++ main/trunk/src/utils/translation.cpp 2010-01-08 00:23:31 UTC (rev 4412) @@ -26,14 +26,267 @@ #include "irrlicht.h" #include "utils/translation.hpp" +#include "io/file_manager.hpp" #include <locale.h> +#include <stdio.h> +#include <errno.h> +#include <string.h> +#include <iconv.h> +#include <stdlib.h> +#include <iostream> -#include "io/file_manager.hpp" +enum CONVERT_TO +{ + UTF_16 = 0, + UTF_32 = 1 +}; +const char* CODE_NAMES[] = +{ + "UTF-16", + "UTF-32" +}; +/* + The code below is based on Solaris' man pages code. No license was specified, but I assume that + they wrote man pages for people to use them... + */ + +/* + * For state-dependent encodings, changes the state of the conversion + * descriptor to initial shift state. Also, outputs the byte sequence + * to change the state to initial state. + * This code is assuming the iconv call for initializing the state + * won't fail due to lack of space in the output buffer. + */ +#define INIT_SHIFT_STATE(cd, fptr, ileft, tptr, oleft) \ +{ \ +fptr = NULL; \ +ileft = 0; \ +tptr = to; \ +oleft = BUFSIZ; \ +(void) iconv(cd, (&fptr), &ileft, &tptr, &oleft); \ +} + +bool convertToEncoding(const char* from, char* to, const int BUF_SIZE, const char* from_code, CONVERT_TO to_code) +{ + iconv_t cd; + char *tptr; + const char *fptr; + size_t ileft, oleft, ret; + + cd = iconv_open(CODE_NAMES[to_code], from_code); + if (cd == (iconv_t)-1) + { + // failed + fprintf(stderr, "iconv_open(%s, %s) failed\n", CODE_NAMES[to_code], from_code); + return false; + } + + ileft = strlen(from); + + + fptr = from; + for (;;) + { + tptr = to; + oleft = BUFSIZ; + + ret = iconv(cd, (&fptr), &ileft, &tptr, &oleft); + if (ret != (size_t)-1) + { + // iconv succeeded + + // Manually add ending '\0' + const int curr_offset = BUFSIZ - oleft; + + to[curr_offset] = '\0'; + + if (curr_offset+1 >= BUFSIZ) + { + fprintf(stderr, "iconv failed : error while adding '\\0' character (Output buffer not big enough) \n"); + return false; + } + to[curr_offset+1] = '\0'; + + // UTF-32 needs 2 more bytes at 0 + if (to_code == UTF_32) + { + to[curr_offset+2] = '\0'; + + if (curr_offset+3 >= BUFSIZ) + { + fprintf(stderr, "iconv failed : error while adding '\\0' character (Output buffer not big enough) \n"); + return false; + } + to[curr_offset+3] = '\0'; + } + break; + } + + // iconv failed + if (errno == EINVAL) + { + fprintf(stderr, "iconv failed : EINVAL error (Incomplete character or shift sequence) \n"); + break; + } + else if (errno == E2BIG) + { + // Lack of space in output buffer + fprintf(stderr, "iconv failed : E2BIG error (Output buffer not big enough) \n"); + + std::cout << "So far, I have :\n"; + for (int i=0; i<BUF_SIZE; i++) + { + std::cout << " " << to[i] << " (" << (unsigned int)to[i] << ")\n"; + } + + //Outputs converted characters + //fwrite(to, 1, BUFSIZ - oleft, stdout); + + // Tries to convert remaining characters in + // input buffer with emptied output buffer + return false; + } + else if (errno == EILSEQ) + { + + fprintf(stderr, "iconv failed : EILSEQ error (Illegal character or shift sequence) \n"); + + std::cout << "Original :\n"; + for (int i=0; ; i++) + { + std::cout << " " << from[i] << " (" << std::hex << (unsigned int)from[i] << ")\n"; + if (from[i] == 0) break; + } + + // Outputs converted characters + //fwrite(to, 1, BUFSIZ - oleft, stdout); + + // Initializes the conversion descriptor and + // outputs the sequence to change the state to + // initial state. + INIT_SHIFT_STATE(cd, fptr, ileft, tptr, oleft); + iconv_close(cd); + + return false; + } + else if (errno == EBADF) + { + fprintf(stderr, "iconv failed : EBADF error (invalid conversion description) \n"); + return false; + } + else + { + fprintf(stderr, "iconv failed : other error\n"); + return false; + } + } + + /* + * Initializes the conversion descriptor and outputs + * the sequence to change the state to initial state. + */ + INIT_SHIFT_STATE(cd, fptr, ileft, tptr, oleft); + + iconv_close(cd); + return true; +} + +// TODO: use a type that works on all platforms +typedef unsigned int uint32; + +/** + * \param input_text Some UTF-8 text + * \return The appropriate representation of this text in the platform's native wchar_t type, or + * NULL if conversion failed (in this case a message will be printed to the console) + */ +wchar_t* utf8_to_wchar_t(const char* input_text) +{ + const int buffer_size = 2048; // let's arbitrarly support 2048 chars + const int byte_size = buffer_size*sizeof(wchar_t); // we need more space if the system uses UTF-32 + + static char output_buffer[byte_size]; + static wchar_t wide_form[buffer_size*2]; // Allow for some surrogate pairs + + + if (sizeof(wchar_t) == 2) + { + // UTF-16 + if (!convertToEncoding(input_text, output_buffer, byte_size, "UTF-8", UTF_16)) return NULL; + + return ((wchar_t*)output_buffer)+1; // Skip initial Unicode header + + + for (int n=0; true; n+=2) + { + wide_form[n/2] = (uint32(output_buffer[n ]) << 8) | + uint32(output_buffer[n+1] ); + + //std::cout << "char : <" << to[n] << ", " << to[n+1] << ">; wide char = " << std::hex << (uint32)wide_form[n/2] << "\n"; + + if (wide_form[n/2] == 0) break; + } + + return &wide_form[1]; + + } + else if (sizeof(wchar_t) == 4) + { + // UTF-32 + if (!convertToEncoding(input_text, output_buffer, byte_size, "UTF-8", UTF_32)) return NULL; + + //return ((wchar_t*)output_buffer)+1; // Skip initial Unicode header + + + for (int n=0; true; n+=4) + { + wide_form[n/4] = (uint32(output_buffer[ n ]) << 24) | + (uint32(output_buffer[n+1]) << 16) | + (uint32(output_buffer[n+2]) << 8 ) | + uint32(output_buffer[n+3]) ; + + //std::cout << "char : <" << to[n] << ", " << to[n+1] << ", " << to[n+2] << ", " << to[n+3] + // << ">; wide char = " << std::hex << (uint32)wide_form[n/4] << "\n"; + + if (wide_form[n/4] == 0) break; + } + return &wide_form[1]; + } + else + { + std::cout << "ERROR : Unknown wchar_t size!\n"; + return NULL; + } +} + +/* +int main() +{ + const char* from = "Some text in plain ASCII. z"; + + + wchar_t* out_ptr = utf8_to_wchar_t(from); + + if (out_ptr == NULL) + { + std::cout << "ERROR!\n"; + return 1; + } + else + { + std::wcout << L"Converted text : <" << out_ptr << L">\n"; + } + + return 0; +} +*/ + + Translations* translations=NULL; -Translations::Translations() { +Translations::Translations() +{ #ifdef HAVE_GETTEXT // LC_ALL does not work, sscanf will then not always be able // to scan for example: s=-1.1,-2.3,-3.3 correctly, which is @@ -45,24 +298,41 @@ setlocale(LC_MESSAGES, ""); #endif bindtextdomain (PACKAGE, file_manager->getTranslationDir().c_str()); - //bind_textdomain_codeset(PACKAGE, "UTF-8"); - bind_textdomain_codeset(PACKAGE, "iso-8859-1"); + bind_textdomain_codeset(PACKAGE, "UTF-8"); + //bind_textdomain_codeset(PACKAGE, "iso-8859-1"); textdomain (PACKAGE); #endif } // Translations -const int BUFFER_SIZE = 512; -wchar_t out_buffer[BUFFER_SIZE]; +//const int BUFFER_SIZE = 512; +//wchar_t out_buffer[BUFFER_SIZE]; wchar_t* w_gettext(const char* original) { + if (original[0] == '\0') return L""; + + std::cout << "Translating " << original << "\n"; + #if ENABLE_NLS const char* original_t = gettext(original); #else const char* original_t = original; #endif + wchar_t* out_ptr = utf8_to_wchar_t(original_t); + + if (out_ptr == NULL) + { + std::cerr << " ERROR in w_gettext! could not be converted to wchar_t.\n"; + } + + std::wcout << L" translation : " << out_ptr << std::endl; + + return out_ptr; + + + /* int index = 0; for (const char* c=original_t; *c != 0; c++) { @@ -74,4 +344,5 @@ //mbstowcs(out_buffer, original_t, BUFFER_SIZE); return out_buffer; + */ } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-01-10 13:27:55
|
Revision: 4422 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4422&view=rev Author: hikerstk Date: 2010-01-10 12:16:32 +0000 (Sun, 10 Jan 2010) Log Message: ----------- Added some code to add a 'push to the side' when crashing into a kart. This code is for now disabled in the stk_config.xml file, since it needs changes to the physics to be better playable. Modified Paths: -------------- main/trunk/data/stk_config.xml main/trunk/src/karts/kart_properties.cpp main/trunk/src/karts/kart_properties.hpp main/trunk/src/physics/physics.cpp main/trunk/src/physics/triangle_mesh.hpp Modified: main/trunk/data/stk_config.xml =================================================================== --- main/trunk/data/stk_config.xml 2010-01-10 12:12:07 UTC (rev 4421) +++ main/trunk/data/stk_config.xml 2010-01-10 12:16:32 UTC (rev 4422) @@ -147,7 +147,15 @@ will cause the kart to start rising, till it is pulled back by gravity. A higher value means higher Z velocity, meaning the kart will rise faster and higher, and will be in the air longer - + +collision-side-impulse is an additional (artificial) impulse that pushes +the slower kart out of the way of the faster karts (i.e. sideways to the +faster kart) when a collision happens. This is for now disables, since +it needs tuning and additionally has the problem that the amount of push +a hit kart receives depends on the orientation - if a kart is pushed +in the direction it is driving, it will be more (no friction from tires), +while when pushed to the side, hardly anything happens. + z-rescue-offset is the z-axis offset when kart is being put back on track after being rescued, it's a fraction of kart height @@ -211,6 +219,7 @@ suspension-rest="0.2" suspension-travel-cm="19" jump-velocity="3.0" + collision-side-impulse="0" z-rescue-offset="0.0" wheel-front-right="0.38 0.6 0" wheel-front-left="-0.38 0.6 0" Modified: main/trunk/src/karts/kart_properties.cpp =================================================================== --- main/trunk/src/karts/kart_properties.cpp 2010-01-10 12:12:07 UTC (rev 4421) +++ main/trunk/src/karts/kart_properties.cpp 2010-01-10 12:16:32 UTC (rev 4422) @@ -62,7 +62,7 @@ m_wheel_radius = m_chassis_linear_damping = m_chassis_angular_damping = m_suspension_rest = m_max_speed_reverse_ratio = m_jump_velocity = - m_z_rescue_offset = m_upright_tolerance = + m_z_rescue_offset = m_upright_tolerance = m_collision_side_impulse = m_upright_max_force = m_suspension_travel_cm = m_track_connection_accel = m_min_speed_turn = m_angle_at_min = m_max_speed_turn = m_angle_at_max = @@ -314,6 +314,7 @@ root->get("suspension-rest", &m_suspension_rest); root->get("suspension-travel-cm", &m_suspension_travel_cm); root->get("jump-velocity", &m_jump_velocity); + root->get("collision-side-impulse", &m_collision_side_impulse); root->get("z-rescue-offset", &m_z_rescue_offset); //TODO: wheel front right and wheel front left is not loaded, yet is listed as an attribute in the xml file after wheel-radius @@ -432,6 +433,7 @@ lisp->get("gravity-center-shift", m_gravity_center_shift ); lisp->get("suspension-rest", m_suspension_rest ); lisp->get("suspension-travel-cm", m_suspension_travel_cm ); + lisp->get("collision-side-impulse", m_collision_side_impulse ); lisp->get("jump-velocity", m_jump_velocity ); lisp->get("z-rescue-offset", m_z_rescue_offset ); lisp->get("upright-tolerance", m_upright_tolerance ); @@ -527,6 +529,7 @@ CHECK_NEG(m_max_speed_reverse_ratio, "max-speed-reverse-ratio" ); CHECK_NEG(m_suspension_rest, "suspension-rest" ); CHECK_NEG(m_suspension_travel_cm, "suspension-travel-cm" ); + CHECK_NEG(m_collision_side_impulse, "collision-side-impulse" ); CHECK_NEG(m_jump_velocity, "jump-velocity" ); CHECK_NEG(m_z_rescue_offset, "z-rescue-offset" ); CHECK_NEG(m_upright_tolerance, "upright-tolerance" ); Modified: main/trunk/src/karts/kart_properties.hpp =================================================================== --- main/trunk/src/karts/kart_properties.hpp 2010-01-10 12:12:07 UTC (rev 4421) +++ main/trunk/src/karts/kart_properties.hpp 2010-01-10 12:16:32 UTC (rev 4422) @@ -127,6 +127,9 @@ * loses contact with the track. */ float m_suspension_rest; float m_suspension_travel_cm; + /** An additional artifical side-impulse that pushes the slower kart + * out of the way of the faster kart in case of a collision. */ + float m_collision_side_impulse; float m_jump_velocity; // z velocity set when jumping float m_z_rescue_offset; // z offset after rescue float m_upright_tolerance; @@ -224,6 +227,9 @@ float getSuspensionRest () const {return m_suspension_rest; } float getSuspensionTravelCM () const {return m_suspension_travel_cm; } float getJumpVelocity () const {return m_jump_velocity; } + /** Returns the (artificial) collision side impulse this kart will apply + * to a slower kart in case of a collision. */ + float getCollisionSideImpulse () const {return m_collision_side_impulse; } float getZRescueOffset () const {return m_z_rescue_offset; } float getUprightTolerance () const {return m_upright_tolerance; } float getUprightMaxForce () const {return m_upright_max_force; } Modified: main/trunk/src/physics/physics.cpp =================================================================== --- main/trunk/src/physics/physics.cpp 2010-01-10 12:12:07 UTC (rev 4421) +++ main/trunk/src/physics/physics.cpp 2010-01-10 12:16:32 UTC (rev 4422) @@ -166,8 +166,8 @@ //----------------------------------------------------------------------------- /** Handles the special case of two karts colliding with each other, which means * that bombs must be passed on. If both karts have a bomb, they'll explode - * immediately. This function is called from physics::update on the server - * (and if no networking is used), and from race_state on the client to replay + * immediately. This function is called from physics::update() on the server + * and if no networking is used, and from race_state on the client to replay * what happened on the server. * \param kartA First kart involved in the collision. * \param kartB Second kart involved in the collision. @@ -205,10 +205,45 @@ } else { - // No bombs exchanged, no explosions, tell the other driver to move it! kartA->playCustomSFX(SFXManager::CUSTOM_CRASH); kartB->playCustomSFX(SFXManager::CUSTOM_CRASH); } + + // If bouncing crashes is enabled, add an additional force to the + // slower kart + Kart *faster_kart, *slower_kart; + if(kartA->getSpeed()>=kartB->getSpeed()) + { + faster_kart = kartA; + slower_kart = kartB; + } + else + { + faster_kart = kartB; + slower_kart = kartA; + } + float side_impulse = faster_kart->getKartProperties()->getCollisionSideImpulse(); + if(side_impulse>0) + { + Vec3 forwards_ws(0, 1, 0); + Vec3 forwards = faster_kart->getTrans()*forwards_ws; + core::line2df f(faster_kart->getXYZ().getX(), + faster_kart->getXYZ().getY(), + forwards.getX(), forwards.getY()); + core::vector2df p(slower_kart->getXYZ().getX(), + slower_kart->getXYZ().getY()); + + float orientation=f.getPointOrientation(p); + // Now compute the vector to the side (right or left depending + // on where the kart was hit). + Vec3 side((orientation>=0) ? -1.0f : 1.0f, 0, 0); + float speed_frac = faster_kart->getSpeed()/faster_kart->getMaxSpeed(); + Vec3 impulse = + faster_kart->getTrans().getRotation()*side*side_impulse*speed_frac; + printf("orientation is %f impulse is %f %f %f\n", + orientation, impulse.getX(),impulse.getY(),impulse.getZ()); + slower_kart->getBody()->applyCentralImpulse(impulse); + } } // KartKartCollision //----------------------------------------------------------------------------- Modified: main/trunk/src/physics/triangle_mesh.hpp =================================================================== --- main/trunk/src/physics/triangle_mesh.hpp 2010-01-10 12:12:07 UTC (rev 4421) +++ main/trunk/src/physics/triangle_mesh.hpp 2010-01-10 12:16:32 UTC (rev 4422) @@ -40,7 +40,7 @@ btDefaultMotionState *m_motion_state; btCollisionShape *m_collision_shape; public: - TriangleMesh() : m_mesh() {}; + TriangleMesh() : m_mesh() {}; ~TriangleMesh(); void addTriangle(const btVector3 &t1, const btVector3 &t2, const btVector3 &t3, const Material* m); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-01-16 00:02:34
|
Revision: 4476 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4476&view=rev Author: auria Date: 2010-01-16 00:02:27 +0000 (Sat, 16 Jan 2010) Log Message: ----------- Fixed the 'property overloading' in GUI XML files that caused a couple internal strings to be exported to pot files, confusing translators Modified Paths: -------------- main/trunk/data/gui/arenas.stkgui main/trunk/data/gui/challenges.stkgui main/trunk/data/gui/options_av.stkgui main/trunk/data/gui/options_input.stkgui main/trunk/data/gui/racesetup.stkgui main/trunk/data/gui/tracks.stkgui main/trunk/src/guiengine/engine.hpp main/trunk/src/guiengine/screen_loader.cpp main/trunk/src/guiengine/widget.hpp main/trunk/src/guiengine/widgets/dynamic_ribbon_widget.cpp main/trunk/src/ide/Xcode/STK_XCode.xcodeproj/project.pbxproj Modified: main/trunk/data/gui/arenas.stkgui =================================================================== --- main/trunk/data/gui/arenas.stkgui 2010-01-15 21:58:57 UTC (rev 4475) +++ main/trunk/data/gui/arenas.stkgui 2010-01-16 00:02:27 UTC (rev 4476) @@ -7,7 +7,7 @@ <box proportion="1" width="100%" layout="vertical-row"> <ribbon_grid id="tracks" proportion="1" width="100%" square_items="true" - I18N="Ignore" text="bottom" align="center" child_width="160" child_height="120" /> + label_location="bottom" align="center" child_width="160" child_height="120" /> <spacer width="20" height="13" /> </box> Modified: main/trunk/data/gui/challenges.stkgui =================================================================== --- main/trunk/data/gui/challenges.stkgui 2010-01-15 21:58:57 UTC (rev 4475) +++ main/trunk/data/gui/challenges.stkgui 2010-01-16 00:02:27 UTC (rev 4476) @@ -7,7 +7,7 @@ <box id="animated_area" width="100%" proportion="1" layout="vertical-row"> <ribbon_grid id="challenges" proportion="3" width="100%" - I18N="Ignore" text="bottom" align="center" child_width="128" child_height="128" /> + label_location="bottom" align="center" child_width="128" child_height="128" /> <spacer proportion="1" width="100%"/> Modified: main/trunk/data/gui/options_av.stkgui =================================================================== --- main/trunk/data/gui/options_av.stkgui 2010-01-15 21:58:57 UTC (rev 4475) +++ main/trunk/data/gui/options_av.stkgui 2010-01-16 00:02:27 UTC (rev 4476) @@ -56,7 +56,7 @@ <label proportion="1" height="100%" I18N="In the video settings" text="Fullscreen"/> </div> - <scrollable_ribbon id="resolutions" proportion="2" I18N="Ignore" text="all" + <scrollable_ribbon id="resolutions" proportion="2" label_location="each" width="100%" square_items="false" align="center" child_width="128" child_height="128" max_height="150" /> Modified: main/trunk/data/gui/options_input.stkgui =================================================================== --- main/trunk/data/gui/options_input.stkgui 2010-01-15 21:58:57 UTC (rev 4475) +++ main/trunk/data/gui/options_input.stkgui 2010-01-16 00:02:27 UTC (rev 4476) @@ -16,7 +16,7 @@ <box proportion="1" width="100%" layout="vertical-row"> - <scrollable_ribbon id="devices" proportion="3" I18N="Ignore" text="all" width="100%" + <scrollable_ribbon id="devices" proportion="3" label_location="each" width="100%" square_items="false" align="center" child_width="256" child_height="128" /> Modified: main/trunk/data/gui/racesetup.stkgui =================================================================== --- main/trunk/data/gui/racesetup.stkgui 2010-01-15 21:58:57 UTC (rev 4475) +++ main/trunk/data/gui/racesetup.stkgui 2010-01-16 00:02:27 UTC (rev 4476) @@ -30,7 +30,8 @@ <label width="100%" height="25" text="Select a game mode" align="center" text_align="left" /> - <scrollable_toolbar id="gamemode" height="135" width="85%" text="bottom" align="center" child_width="135" child_height="135" /> + <scrollable_toolbar id="gamemode" height="135" width="85%" label_location="bottom" align="center" + child_width="135" child_height="135" /> <spacer proportion="2" width="25"/> Modified: main/trunk/data/gui/tracks.stkgui =================================================================== --- main/trunk/data/gui/tracks.stkgui 2010-01-15 21:58:57 UTC (rev 4475) +++ main/trunk/data/gui/tracks.stkgui 2010-01-16 00:02:27 UTC (rev 4476) @@ -17,7 +17,7 @@ <box proportion="1" width="100%" layout="vertical-row"> <ribbon_grid id="tracks" proportion="1" width="100%" square_items="true" - I18N="Ignore" text="bottom" align="center" child_width="160" child_height="120" /> + label_location="bottom" align="center" child_width="160" child_height="120" /> <spacer width="20" height="13" /> </box> Modified: main/trunk/src/guiengine/engine.hpp =================================================================== --- main/trunk/src/guiengine/engine.hpp 2010-01-15 21:58:57 UTC (rev 4475) +++ main/trunk/src/guiengine/engine.hpp 2010-01-16 00:02:27 UTC (rev 4476) @@ -24,6 +24,7 @@ _______________________________________________________ Internal constant Name in XML files _______________________________________________________ + WTYPE_RIBBON "ribbon", "buttonbar", "tabs" appears an horizontal bar containing elements laid in a row, each being and icon and/or a label the "ribbon" subcategory will behave a bit like a radio button group, i.e. one element must selected. @@ -81,14 +82,15 @@ NOT of spawn type (<ribbon_grid .../>), contents must be programmatically set at runtime. Property PROP_SQUARE can be set to tell the engine if the ribbon's contents are rectangular or icons (this will affect the type of highlighting used). -PROP_CHILD_WIDTH and PROP_CHILD_HEIGHT are mandatory (so at least aspect ratio of elements that will later be added is nown) -An interesting aspect of PROP_CHILD_WIDTH and PROP_CHILD_HEIGHT is that you can use them to show textures to any aspect ratio -you want (so you can e.g. save textures to a power-of-two size like 256x256, but then show it in 4:3 ratio). -Supports an optional label at the bottom if PROP_TEXT is set. Gives a special meaning to the text parameter. A value of "bottom" -means to display the name of the selected icon at the bottom. A value of "all" means that each icon shall have its name under it. -The "scrollable_ribbon" and "scrollable_toolbar" subtypes are single-line scrollable ribbons. The difference between both is that -'scrollable_ribbon' always has a value selected (like in a combo box, or radio buttons), while 'scrollable_toolbar' is a -scrollable list of buttons that can be pressed to trigger actions. +PROP_CHILD_WIDTH and PROP_CHILD_HEIGHT are mandatory (so at least aspect ratio of elements that will later be added +is nown) An interesting aspect of PROP_CHILD_WIDTH and PROP_CHILD_HEIGHT is that you can use them to show textures +to any aspect ratio you want (so you can e.g. save textures to a power-of-two size like 256x256, but then show it +in 4:3 ratio). +Supports an optional label at the bottom if PROP_LABELS_LOCATION is set (see more on PROP_LABELS_LOCATION below). +The "scrollable_ribbon" and "scrollable_toolbar" subtypes are single-line +scrollable ribbons. The difference between both is that 'scrollable_ribbon' always has a value selected (like in +a combo box, or radio buttons), while 'scrollable_toolbar' is a scrollable list of buttons that can be pressed to +trigger actions. WTYPE_MODEL_VIEW "model" Displays a model. Currently incomplete. Contents must be set programmatically. @@ -119,6 +121,7 @@ PROP_TEXT_ALIGN "text_align" used exclusively by label components. Value can be "right" or "center" (left used if not specified). + PROP_WORD_WRAP "word_wrap" used exclusively by label components. Value can be "true" to indicate that long text should spawn on multiple lines. @@ -182,12 +185,17 @@ PROP_SQUARE "square_items" Valid on Ribbons or RibbonGrids. Can be "true" (omitting it means "false"). Indicates whether the contents -use rectangular icons (this will affect the type of focus/highlighting used) +use rectangular icons as opposed to "round" icons (this will affect the type of focus/highlighting used) PROP_EXTEND_LABEL "extend_label" How many pixels the label is allowed to expand beyond the boundaries of the widget itself. Currently only -allowed on icon widgets, +allowed on icon widgets. +PROP_LABELS_LOCATION "label_location" +Currently only used by dynamic ribbons. Decides where the label is. Value can be "each", "bottom", or "none" +(if ommitted, "none" is the default). "each" means that every item has its own label. "bottom" means there +is a single label for all at the bottom, that displays the name of the current item. + +--------------------------+ + Using the Engine in Code + +--------------------------+ Modified: main/trunk/src/guiengine/screen_loader.cpp =================================================================== --- main/trunk/src/guiengine/screen_loader.cpp 2010-01-15 21:58:57 UTC (rev 4475) +++ main/trunk/src/guiengine/screen_loader.cpp 2010-01-16 00:02:27 UTC (rev 4476) @@ -184,6 +184,7 @@ READ_PROPERTY(max_width, PROP_MAX_WIDTH); READ_PROPERTY(max_height, PROP_MAX_HEIGHT); READ_PROPERTY(extend_label, PROP_EXTEND_LABEL); + READ_PROPERTY(label_location, PROP_LABELS_LOCATION); #undef READ_PROPERTY const char* text = xml->getAttributeValue( "text" ); Modified: main/trunk/src/guiengine/widget.hpp =================================================================== --- main/trunk/src/guiengine/widget.hpp 2010-01-15 21:58:57 UTC (rev 4475) +++ main/trunk/src/guiengine/widget.hpp 2010-01-16 00:02:27 UTC (rev 4476) @@ -72,7 +72,8 @@ PROP_MAX_WIDTH, PROP_MAX_HEIGHT, PROP_SQUARE, - PROP_EXTEND_LABEL + PROP_EXTEND_LABEL, + PROP_LABELS_LOCATION }; bool isWithinATextBox(); Modified: main/trunk/src/guiengine/widgets/dynamic_ribbon_widget.cpp =================================================================== --- main/trunk/src/guiengine/widgets/dynamic_ribbon_widget.cpp 2010-01-15 21:58:57 UTC (rev 4475) +++ main/trunk/src/guiengine/widgets/dynamic_ribbon_widget.cpp 2010-01-16 00:02:27 UTC (rev 4476) @@ -55,8 +55,13 @@ { //printf("****DynamicRibbonWidget::add()****\n"); - m_has_label = (m_text == "bottom"); + m_has_label = (m_properties[PROP_LABELS_LOCATION] == "bottom"); + assert( m_properties[PROP_LABELS_LOCATION] == "bottom" || + m_properties[PROP_LABELS_LOCATION] == "each" || + m_properties[PROP_LABELS_LOCATION] == "none" || + m_properties[PROP_LABELS_LOCATION] == ""); + if (m_has_label) { // FIXME - won't work with multiline labels. @@ -235,7 +240,9 @@ icon->w = atoi(icon->m_properties[PROP_WIDTH].c_str()); icon->h = atoi(icon->m_properties[PROP_HEIGHT].c_str()); - if (m_text == "all") icon->m_text = " "; // FIXME: what's that?? + // If we want each icon to have its own label, we must make it non-empty, otherwise + // it will assume there is no label and none will be created (FIXME: that's ugly) + if (m_properties[PROP_LABELS_LOCATION] == "each") icon->m_text = " "; // std::cout << "ribbon text = " << m_properties[PROP_TEXT].c_str() << std::endl; Modified: main/trunk/src/ide/Xcode/STK_XCode.xcodeproj/project.pbxproj =================================================================== --- main/trunk/src/ide/Xcode/STK_XCode.xcodeproj/project.pbxproj 2010-01-15 21:58:57 UTC (rev 4475) +++ main/trunk/src/ide/Xcode/STK_XCode.xcodeproj/project.pbxproj 2010-01-16 00:02:27 UTC (rev 4476) @@ -1408,6 +1408,7 @@ 9507E9260FC1C8C100BD2B92 /* OpenGL */, 95C2AC6E0F296541000D3E5D /* src */, ); + includeInIndex = 0; name = bullet; path = ../../bullet; sourceTree = SOURCE_ROOT; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-01-19 02:44:03
|
Revision: 4488 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4488&view=rev Author: auria Date: 2010-01-19 02:43:57 +0000 (Tue, 19 Jan 2010) Log Message: ----------- improvements to layout engine & improvements to help menu Modified Paths: -------------- main/trunk/data/gui/help1.stkgui main/trunk/data/gui/help2.stkgui main/trunk/data/gui/help3.stkgui main/trunk/src/guiengine/engine.hpp main/trunk/src/guiengine/screen.cpp main/trunk/src/guiengine/skin.cpp main/trunk/src/guiengine/widgets/label_widget.cpp Added Paths: ----------- main/trunk/data/gui/gift.png main/trunk/data/gui/nitro.png Added: main/trunk/data/gui/gift.png =================================================================== (Binary files differ) Property changes on: main/trunk/data/gui/gift.png ___________________________________________________________________ Added: svn:mime-type + image/png Modified: main/trunk/data/gui/help1.stkgui =================================================================== --- main/trunk/data/gui/help1.stkgui 2010-01-19 00:30:13 UTC (rev 4487) +++ main/trunk/data/gui/help1.stkgui 2010-01-19 02:43:57 UTC (rev 4488) @@ -18,39 +18,38 @@ <label align="center" I18N="In the help menu" text="Make your rivals bite dust!"/> - <spacer height="25" width="10"/> - <div width="100%" proportion="2" layout="horizontal-row"> - <icon align="center" icon="textures/bonusblock2.png"/> + <icon align="center" width="64" height="64" icon="gui/gift.png"/> <spacer width="25" height="25"/> - <label proportion="1" height="100%" align="left" word_wrap="true" + <label proportion="2" height="100%" word_wrap="true" I18N="In the help menu" text="Collect blue boxes : they will give you weapons or other powerups"/> </div> <div width="100%" proportion="2" layout="horizontal-row"> - <icon align="center" icon="textures/nitro-particle.png"/> + <icon align="center" width="64" height="64" icon="gui/nitro.png"/> <spacer width="25" height="25"/> - <label proportion="1" height="100%" align="left" word_wrap="true" + <label proportion="3" height="100%" word_wrap="true" I18N="In the help menu" text="Collecting nitro allows you to get speed boosts whenever you wish by pressing the appropriate key. You can see your current level of nitro in the bar at the right of the game screen."/> </div> <div width="100%" proportion="2" layout="horizontal-row"> - <icon align="center" icon="textures/gui_lock.png"/> + <icon align="center" width="64" height="64" icon="textures/gui_lock.png"/> <spacer width="25" height="25"/> - <label proportion="1" height="100%" align="left" word_wrap="true" + <label proportion="2" height="100%" word_wrap="true" I18N="In the help menu" text="If you see a button with a lock like this one, you need to complete a challenge to unlock it."/> </div> - <label align="left" word_wrap="true" width="100%" proportion="2" + <label align="left" word_wrap="true" width="100%" proportion="1" I18N="in the help menu" text="The 'sharp turn' key allows you to do sharp turns and have better control in tight curves"/> - <spacer proportion="1" width="10"/> + <spacer height="10" width="10"/> <label align="center" I18N="in the help screen" text="* Current key bindings can be seen/changed in menu Options"/> + <spacer height="10" width="10"/> </box> <spacer width="50" height="45" /> Modified: main/trunk/data/gui/help2.stkgui =================================================================== --- main/trunk/data/gui/help2.stkgui 2010-01-19 00:30:13 UTC (rev 4487) +++ main/trunk/data/gui/help2.stkgui 2010-01-19 02:43:57 UTC (rev 4488) @@ -20,41 +20,41 @@ <spacer height="25" width="10"/> <div width="100%" proportion="1" layout="horizontal-row"> - <icon align="center" icon="textures/bubblegum-icon.png"/> + <icon align="center" width="64" height="64" icon="textures/bubblegum-icon.png"/> <spacer width="25" height="25"/> - <label proportion="1" height="100%" align="left" word_wrap="true" text="BubbleGum - leave a sticky pink puddle behind you"/> + <label proportion="1" height="100%" word_wrap="true" text="BubbleGum - leave a sticky pink puddle behind you"/> </div> <div width="100%" proportion="1" layout="horizontal-row"> - <icon align="center" icon="textures/cake-icon.png"/> + <icon align="center" width="64" height="64" icon="textures/cake-icon.png"/> <spacer width="25" height="25"/> - <label proportion="1" height="100%" align="left" word_wrap="true" + <label proportion="1" height="100%" word_wrap="true" text="Cake - thrown at the closest rival, best on short ranges and long straights"/> </div> <div width="100%" proportion="1" layout="horizontal-row"> - <icon align="center" icon="textures/plunger-icon.png"/> + <icon align="center" width="64" height="64" icon="textures/plunger-icon.png"/> <spacer width="25" height="25"/> - <label proportion="1" height="100%" align="left" word_wrap="true" text="Plunger - throw straight to pull an opponent back, or throw while looking back to make one lose sight!"/> + <label proportion="1" height="100%" word_wrap="true" text="Plunger - throw straight to pull an opponent back, or throw while looking back to make one lose sight!"/> </div> <div width="100%" proportion="1" layout="horizontal-row"> - <icon align="center" icon="textures/bowling-icon.png"/> + <icon align="center" width="64" height="64" icon="textures/bowling-icon.png"/> <spacer width="25" height="25"/> - <label proportion="1" height="100%" align="left" word_wrap="true" + <label proportion="1" height="100%" word_wrap="true" text="Bowling Ball - bounces off walls. If you are looking back, it will be thrown backwards."/> </div> <div width="100%" proportion="1" layout="horizontal-row"> - <icon align="center" icon="textures/parachute.png"/> + <icon align="center" width="64" height="64" icon="textures/parachute.png"/> <spacer width="25" height="25"/> - <label proportion="1" height="100%" align="left" word_wrap="true" text="Parachute - slows down all karts in a better position!"/> + <label proportion="1" height="100%" word_wrap="true" text="Parachute - slows down all karts in a better position!"/> </div> <div width="100%" proportion="1" layout="horizontal-row"> - <icon align="center" icon="textures/anchor-icon.png"/> + <icon align="center" width="64" height="64" icon="textures/anchor-icon.png"/> <spacer width="25" height="25"/> - <label proportion="1" height="100%" align="left" word_wrap="true" text="Anchor - slows down greatly the kart in the first position"/> + <label proportion="1" height="100%" word_wrap="true" text="Anchor - slows down greatly the kart in the first position"/> </div> </box> Modified: main/trunk/data/gui/help3.stkgui =================================================================== --- main/trunk/data/gui/help3.stkgui 2010-01-19 00:30:13 UTC (rev 4487) +++ main/trunk/data/gui/help3.stkgui 2010-01-19 02:43:57 UTC (rev 4488) @@ -16,44 +16,40 @@ <box proportion="1" width="100%" layout="vertical-row"> <label align="center" text="SuperTuxKart features several game modes"/> - - <spacer height="25" width="10"/> - + <div width="100%" proportion="1" layout="horizontal-row"> - <icon align="center" icon="gui/mode_normal.png"/> + <icon align="center" width="64" height="64" icon="gui/mode_normal.png"/> <spacer width="25" height="25"/> - <label proportion="1" height="100%" align="left" word_wrap="true" + <label proportion="1" height="100%" word_wrap="true" I18N="In the help menu" text="Regular Race - all blows allowed, so catch weapons and make clever use of them!"/> </div> <div width="100%" proportion="1" layout="horizontal-row"> - <icon align="center" icon="gui/mode_tt.png"/> + <icon align="center" width="64" height="64" icon="gui/mode_tt.png"/> <spacer width="25" height="25"/> - <label proportion="1" height="100%" align="left" word_wrap="true" + <label proportion="1" height="100%" word_wrap="true" I18N="In the help menu" text="Time Trial: Contains no powerups, so only your driving skills matter!"/> </div> <div width="100%" proportion="1" layout="horizontal-row"> - <icon align="center" icon="gui/mode_ftl.png"/> + <icon align="center" width="64" height="64" icon="gui/mode_ftl.png"/> <spacer width="25" height="25"/> - <label proportion="1" height="100%" align="left" word_wrap="true" + <label proportion="1" height="100%" word_wrap="true" I18N="In the help menu" text="Follow the leader: run for second place, as the last kart will be disqualified every time the counter hits zero. Beware : going in front of the leader will get you eliminated too!"/> </div> <div width="100%" proportion="1" layout="horizontal-row"> - <icon align="center" icon="gui/mode_3strikes.png"/> + <icon align="center" width="64" height="64" icon="gui/mode_3strikes.png"/> <spacer width="25" height="25"/> - <label proportion="1" height="100%" align="left" word_wrap="true" + <label proportion="1" height="100%" word_wrap="true" I18N="In the help menu" text="3 Strikes Battle : only in multiplayer games. Hit others with weapons until they lose all their lives."/> </div> - - - <label proportion="1" width="100%" align="left" word_wrap="true" I18N="In the help menu" + <label proportion="1" width="100%" word_wrap="true" I18N="In the help menu" text="* Most of these game modes can also be played in a Grand Prix fashion : instead of playing a single race, you play many in a row. The better you rank, the more points you get. In the end, the player with the most points wins the cup."/> </box> Added: main/trunk/data/gui/nitro.png =================================================================== (Binary files differ) Property changes on: main/trunk/data/gui/nitro.png ___________________________________________________________________ Added: svn:mime-type + image/png Modified: main/trunk/src/guiengine/engine.hpp =================================================================== --- main/trunk/src/guiengine/engine.hpp 2010-01-19 00:30:13 UTC (rev 4487) +++ main/trunk/src/guiengine/engine.hpp 2010-01-19 02:43:57 UTC (rev 4488) @@ -170,8 +170,10 @@ layed-out div will ignore all x/y coordinates you may give them as parameter. PROP_ALIGN "align" -For widgets located inside a vertical-row layout div. Value can be "left", "center" or "right". Determines how -the x coord of the widget will be determined. +For widgets located inside a vertical-row layout div : Changes how the x coord of the widget is determined. + value can be "left", "center" or "right". +For widgets located inside a horizontal-row layout div : Changes how the y coord of the widget is determined. + value can be "top", "center" or "bottom". PROP_PROPORTION "proportion" Helps determining widget size dynamically (according to available screen space) in layed-out divs. In a Modified: main/trunk/src/guiengine/screen.cpp =================================================================== --- main/trunk/src/guiengine/screen.cpp 2010-01-19 00:30:13 UTC (rev 4487) +++ main/trunk/src/guiengine/screen.cpp 2010-01-19 02:43:57 UTC (rev 4488) @@ -166,7 +166,7 @@ // ---- lay widgets in row int x = parent->x, y = parent->y; - for(int n=0; n<widgets_amount; n++) + for (int n=0; n<widgets_amount; n++) { std::string prop = widgets[n].m_properties[ PROP_PROPORTION ]; if(prop.size() != 0) @@ -174,26 +174,37 @@ // proportional size int proportion = 1; std::istringstream myStream(prop); - if(!(myStream >> proportion)) + if (!(myStream >> proportion)) std::cerr << "/!\\ Warning /!\\ : proportion '" << prop.c_str() << "' is not a number in widget " << widgets[n].m_properties[PROP_ID].c_str() << std::endl; const float fraction = (float)proportion/(float)total_proportion; - if(horizontal) + if (horizontal) { widgets[n].x = x; - if(widgets[n].m_properties[ PROP_Y ].size() > 0) - widgets[n].y = atoi(widgets[n].m_properties[ PROP_Y ].c_str()); - else - widgets[n].y = y; + std::string align = widgets[n].m_properties[ PROP_ALIGN ]; + if (align.size() < 1) + { + if (widgets[n].m_properties[ PROP_Y ].size() > 0) + widgets[n].y = atoi(widgets[n].m_properties[ PROP_Y ].c_str()); + else + widgets[n].y = y; + } + else if (align == "top") widgets[n].y = y; + else if (align == "center") widgets[n].y = y + h/2 - widgets[n].h/2; + else if (align == "bottom") widgets[n].y = y + h - widgets[n].h; + else std::cerr << "/!\\ Warning /!\\ : alignment '" << align.c_str() + << "' is unknown (widget '" << widgets[n].m_properties[PROP_ID].c_str() + << "', in a horiozntal-row layout)\n"; + widgets[n].w = (int)(left_space*fraction); - if(widgets[n].m_properties[PROP_MAX_WIDTH].size() > 0) + if (widgets[n].m_properties[PROP_MAX_WIDTH].size() > 0) { const int max_width = atoi( widgets[n].m_properties[PROP_MAX_WIDTH].c_str() ); - if(widgets[n].w > max_width) widgets[n].w = max_width; + if (widgets[n].w > max_width) widgets[n].w = max_width; } x += widgets[n].w; @@ -202,24 +213,26 @@ { widgets[n].h = (int)(left_space*fraction); - if(widgets[n].m_properties[PROP_MAX_HEIGHT].size() > 0) + if (widgets[n].m_properties[PROP_MAX_HEIGHT].size() > 0) { const int max_height = atoi( widgets[n].m_properties[PROP_MAX_HEIGHT].c_str() ); if(widgets[n].h > max_height) widgets[n].h = max_height; } std::string align = widgets[n].m_properties[ PROP_ALIGN ]; - if(align.size() < 1) + if (align.size() < 1) { - if(widgets[n].m_properties[ PROP_X ].size() > 0) + if (widgets[n].m_properties[ PROP_X ].size() > 0) widgets[n].x = atoi(widgets[n].m_properties[ PROP_X ].c_str()); else widgets[n].x = x; } - else if(align == "left") widgets[n].x = x; - else if(align == "center") widgets[n].x = x + w/2 - widgets[n].w/2; - else if(align == "right") widgets[n].x = x + w - widgets[n].w; - else std::cerr << "/!\\ Warning /!\\ : alignment '" << align.c_str() << "' is unknown in widget " << widgets[n].m_properties[PROP_ID].c_str() << std::endl; + else if (align == "left") widgets[n].x = x; + else if (align == "center") widgets[n].x = x + w/2 - widgets[n].w/2; + else if (align == "right") widgets[n].x = x + w - widgets[n].w; + else std::cerr << "/!\\ Warning /!\\ : alignment '" << align.c_str() + << "' is unknown (widget '" << widgets[n].m_properties[PROP_ID].c_str() + << "', in a vertical-row layout)\n"; widgets[n].y = y; y += widgets[n].h; @@ -229,14 +242,23 @@ { // absolute size - if(horizontal) + if (horizontal) { widgets[n].x = x; - if(widgets[n].m_properties[ PROP_Y ].size() > 0) - widgets[n].y = atoi(widgets[n].m_properties[ PROP_Y ].c_str()); - else - widgets[n].y = y; + std::string align = widgets[n].m_properties[ PROP_ALIGN ]; + + if (align.size() < 1) + { + if (widgets[n].m_properties[ PROP_Y ].size() > 0) + widgets[n].y = atoi(widgets[n].m_properties[ PROP_Y ].c_str()); + else + widgets[n].y = y; + } + else if (align == "top") widgets[n].y = y; + else if (align == "center") widgets[n].y = y + h/2 - widgets[n].h/2; + else if (align == "bottom") widgets[n].y = y + h - widgets[n].h; + else std::cerr << "/!\\ Warning /!\\ : alignment '" << align.c_str() << "' is unknown in widget " << widgets[n].m_properties[PROP_ID].c_str() << std::endl; x += widgets[n].w; } @@ -246,16 +268,16 @@ std::string align = widgets[n].m_properties[ PROP_ALIGN ]; - if(align.size() < 1) + if (align.size() < 1) { - if(widgets[n].m_properties[ PROP_X ].size() > 0) + if (widgets[n].m_properties[ PROP_X ].size() > 0) widgets[n].x = atoi(widgets[n].m_properties[ PROP_X ].c_str()); else widgets[n].x = x; } - else if(align == "left") widgets[n].x = x; - else if(align == "center") widgets[n].x = x + w/2 - widgets[n].w/2; - else if(align == "right") widgets[n].x = x + w - widgets[n].w; + else if (align == "left") widgets[n].x = x; + else if (align == "center") widgets[n].x = x + w/2 - widgets[n].w/2; + else if (align == "right") widgets[n].x = x + w - widgets[n].w; else std::cerr << "/!\\ Warning /!\\ : alignment '" << align.c_str() << "' is unknown in widget " << widgets[n].m_properties[PROP_ID].c_str() << std::endl; widgets[n].y = y; Modified: main/trunk/src/guiengine/skin.cpp =================================================================== --- main/trunk/src/guiengine/skin.cpp 2010-01-19 00:30:13 UTC (rev 4487) +++ main/trunk/src/guiengine/skin.cpp 2010-01-19 02:43:57 UTC (rev 4488) @@ -702,7 +702,7 @@ const int y_shift_up = (int)(rect.getHeight() * (outgrow/2.0f)); core::rect< s32 > rect2( position2d< s32 >(rect.UpperLeftCorner.X + x_gap, - rect.UpperLeftCorner.Y - y_shift_up), + rect.UpperLeftCorner.Y - y_shift_up), dimension2d< s32 >(rectWidth, rectHeight) ); GUIEngine::getDriver()->draw2DImage(tex_bubble, rect2, source_area, Modified: main/trunk/src/guiengine/widgets/label_widget.cpp =================================================================== --- main/trunk/src/guiengine/widgets/label_widget.cpp 2010-01-19 00:30:13 UTC (rev 4487) +++ main/trunk/src/guiengine/widgets/label_widget.cpp 2010-01-19 02:43:57 UTC (rev 4488) @@ -34,8 +34,8 @@ stringw& message = m_text; EGUI_ALIGNMENT align = EGUIA_UPPERLEFT; - if(m_properties[PROP_TEXT_ALIGN] == "center") align = EGUIA_CENTER; - else if(m_properties[PROP_TEXT_ALIGN] == "right") align = EGUIA_LOWERRIGHT; + if (m_properties[PROP_TEXT_ALIGN] == "center") align = EGUIA_CENTER; + else if (m_properties[PROP_TEXT_ALIGN] == "right") align = EGUIA_LOWERRIGHT; EGUI_ALIGNMENT valign = EGUIA_CENTER ; // TODO - make confiurable through XML file? IGUIStaticText* irrwidget = GUIEngine::getGUIEnv()->addStaticText(message.c_str(), widget_size, false, word_wrap, m_parent, -1); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-01-19 23:15:48
|
Revision: 4493 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4493&view=rev Author: hikerstk Date: 2010-01-19 23:15:25 +0000 (Tue, 19 Jan 2010) Log Message: ----------- Added some slip stream graphical effects (which are disabled by default) - pretty much work in progress. Modified Paths: -------------- main/trunk/data/stk_config.xml main/trunk/src/Makefile.am main/trunk/src/graphics/moving_texture.cpp main/trunk/src/graphics/moving_texture.hpp main/trunk/src/ide/vc9/supertuxkart.vcproj main/trunk/src/karts/kart.cpp main/trunk/src/karts/kart.hpp main/trunk/src/karts/kart_properties.cpp main/trunk/src/karts/kart_properties.hpp Added Paths: ----------- main/trunk/src/graphics/slip_stream.cpp main/trunk/src/graphics/slip_stream.hpp Modified: main/trunk/data/stk_config.xml =================================================================== --- main/trunk/data/stk_config.xml 2010-01-19 23:11:09 UTC (rev 4492) +++ main/trunk/data/stk_config.xml 2010-01-19 23:15:25 UTC (rev 4493) @@ -120,8 +120,9 @@ skid-max: maximum skidding factor = maximum increase of steering angle. time-till-max-skid: Time till maximum skidding is reached. skid-visual: Additional graphical rotation of kart. -slipstrea slipstream-length: How far behind a kart slipstream works -slipstream-time: How many seconds of sstream give maximum benefit +slipstream slipstream-length: How far behind a kart slipstream works +slipstream-collect-time: How many seconds of sstream give maximum benefit +slipstream-use-time: How long the benefit will last. slipstream-add-power: Additional power due to sstreaming. 1 = +100% slipstream-min-speed: Minimum speed necessary for slipstream to take effect. @@ -195,10 +196,11 @@ skid-max="2.5" time-till-max-skid="0.4" skid-visual="0.16" - slipstream-length="5" - slipstream-time="5" + slipstream-length="10" + slipstream-collect-time="2" + slipstream-use-time="5" slipstream-add-power="3" - slipstream-min-speed="15" + slipstream-min-speed="10" brake-factor="11.0" min-speed-radius="0 3" Modified: main/trunk/src/Makefile.am =================================================================== --- main/trunk/src/Makefile.am 2010-01-19 23:11:09 UTC (rev 4492) +++ main/trunk/src/Makefile.am 2010-01-19 23:15:25 UTC (rev 4493) @@ -68,6 +68,8 @@ graphics/shadow.hpp \ graphics/skid_marks.cpp \ graphics/skid_marks.hpp \ + graphics/slip_stream.cpp \ + graphics/slip_stream.hpp \ graphics/smoke.cpp \ graphics/smoke.hpp \ graphics/stars.cpp \ Modified: main/trunk/src/graphics/moving_texture.cpp =================================================================== --- main/trunk/src/graphics/moving_texture.cpp 2010-01-19 23:11:09 UTC (rev 4492) +++ main/trunk/src/graphics/moving_texture.cpp 2010-01-19 23:15:25 UTC (rev 4493) @@ -53,9 +53,19 @@ core::vector3df v = m_matrix->getTranslation(); m_x = v.X; m_y = v.Y; -} // Moving Texture +} // MovingTexture //----------------------------------------------------------------------------- +MovingTexture::MovingTexture(float dx, float dy) +{ + m_dx = dx; + m_dy = dy; + m_x = 0; + m_y = 0; + m_matrix = NULL; +} // MovingTexture + +//----------------------------------------------------------------------------- /** Destructor for an animated texture. */ MovingTexture::~MovingTexture() @@ -63,6 +73,15 @@ } // ~MovingTexture //----------------------------------------------------------------------------- +/** Resets at (re)start of a race. + */ +void MovingTexture::reset() +{ + m_x = m_y = 0; + m_matrix->setTextureTranslate(m_x, m_y); +} // reset + +//----------------------------------------------------------------------------- /** Updates the transform of an animated texture. * \param dt Time step size. */ Modified: main/trunk/src/graphics/moving_texture.hpp =================================================================== --- main/trunk/src/graphics/moving_texture.hpp 2010-01-19 23:11:09 UTC (rev 4492) +++ main/trunk/src/graphics/moving_texture.hpp 2010-01-19 23:15:25 UTC (rev 4493) @@ -39,9 +39,15 @@ public: MovingTexture(core::matrix4 *matrix, const XMLNode &node); MovingTexture(core::matrix4 *matrix, float dx, float dy); + MovingTexture(float dx, float dy); ~MovingTexture(); - void update (float dt); - void init () {}; + + /** Sets the speed of the animation. */ + void setSpeed(float dx, float dy) {m_dx = dx; m_dy = dy;} + /** Sets the texture matrix. */ + void setTextureMatrix(core::matrix4 *matrix) {m_matrix=matrix;} + virtual void update (float dt); + virtual void reset (); } ; // MovingTexture Added: main/trunk/src/graphics/slip_stream.cpp =================================================================== --- main/trunk/src/graphics/slip_stream.cpp (rev 0) +++ main/trunk/src/graphics/slip_stream.cpp 2010-01-19 23:15:25 UTC (rev 4493) @@ -0,0 +1,149 @@ +// $Id: slip_stream.cpp 1681 2008-04-09 13:52:48Z hikerstk $ +// +// SuperTuxKart - a fun racing game with go-kart +// Copyright (C) 2010 Joerg Henrichs +// +// 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 "graphics/slip_stream.hpp" + +#include "graphics/material_manager.hpp" +#include "graphics/irr_driver.hpp" +#include "io/file_manager.hpp" +#include "karts/kart.hpp" +#include "utils/constants.hpp" + +/** Creates the slip stream object using a moving texture. + * \param kart Pointer to the kart to which the slip stream + * belongs to. + */ +SlipStream::SlipStream(Kart* kart) : m_kart(kart), MovingTexture(0, 0) +{ + video::SMaterial m; + Material *material = material_manager->getMaterial("slipstream.png"); + m.setTexture(0, material->getTexture()); + m.setFlag(video::EMF_BACK_FACE_CULLING, false); + m.MaterialType = video::EMT_TRANSPARENT_VERTEX_ALPHA; + createMesh(m); + m_node = irr_driver->addMesh(m_mesh); + m_node->setParent(m_kart->getNode()); + m_node->setPosition(core::vector3df(0, + 0*0.25f, + m_kart->getKartLength()) ); + setTextureMatrix(&(m_node->getMaterial(0).getTextureMatrix(0))); +} // SlipStream + +//----------------------------------------------------------------------------- +/** Removes the node from the scene graph. + */ +SlipStream::~SlipStream() +{ + irr_driver->removeNode(m_node); +} // ~SlipStream + +//----------------------------------------------------------------------------- +/** Creates the mesh for the slipstream effect. This function creates a + * first a series of circles (with a certain number of vertices each and + * distance from each other. Then it will create the triangles and add + * texture coordniates. + * \param material The material to use. + */ +void SlipStream::createMesh(const video::SMaterial &material) +{ + // All radius, starting with the one closest to the kart (and + // widest) to the one furthest away. A 0 indicates the end of the list + float radius[] = {3.0f, 2.0f, 1.0f, 0.0f}; + + // The distance of each of the circle from the kart. The number of + // entries in this array must be the same as the number of non-zero + // entries in the radius[] array above. No 'end of list' entry required. + float distance[] = {0.0f, 2.0f, 4.0f }; + + // The alpha values for the rings, no 'end of list' entry required. + int alphas[] = {0, 255, 0}; + + // Loop through all given radius to determine the number + // of segments to create. + unsigned int num_circles; + for(num_circles=0; radius[num_circles]!=0; num_circles++) ; + + // Length is distance of last circle to distance of first circle: + float length = distance[num_circles-1] - distance[0]; + + // The number of points for each circle. + const int num_segments = 15; + const float f = 2*M_PI/float(num_segments); + scene::SMeshBuffer *buffer = new scene::SMeshBuffer(); + buffer->Material = material; + for(unsigned int j=0; j<num_circles; j++) + { + float curr_distance = distance[j]-distance[0]; + // Create the vertices for each of the circle + for(unsigned int i=0; i<num_segments; i++) + { + video::S3DVertex v; + v.Pos.X = sin(i*f)*radius[j]; + v.Pos.Y = -cos(i*f)*radius[j]; + v.Pos.Z = distance[j]; + v.Color = video::SColor(alphas[j], 255, 0, 0); + v.TCoords.X = curr_distance/length; + v.TCoords.Y = (float)i/(num_segments-1); + buffer->Vertices.push_back(v); + } // for i<num_segments + } // while radius[num_circles]!=0 + + // Now create the triangles. + for(unsigned int j=0; j<num_circles-1; j++) + { + for(unsigned int i=0; i<num_segments-1; i++) + { + buffer->Indices.push_back( j *num_segments+i ); + buffer->Indices.push_back((j+1)*num_segments+i ); + buffer->Indices.push_back( j *num_segments+i+1); + buffer->Indices.push_back( j *num_segments+i+1); + buffer->Indices.push_back((j+1)*num_segments+i ); + buffer->Indices.push_back((j+1)*num_segments+i+1); + } + } // for j<num_circles-1 + + scene::SMesh *mesh = new scene::SMesh(); + mesh->addMeshBuffer(buffer); + mesh->recalculateBoundingBox(); + + buffer->drop(); + m_mesh = mesh; +} // createMesh + +//----------------------------------------------------------------------------- +/** Sets the animation intensity (or speed). + * \param f Intensity: 0 = no slip stream, + * 1 = collecting + * 2 = using slip stream bonus + */ +void SlipStream::setIntensity(float f) +{ + // For now: disable them permanently + m_node->setVisible(false); + return; + + // For real testing in game: this needs some tuning! + //m_node->setVisible(f!=0); + //MovingTexture::setSpeed(f*0.1f, 0); + + // For debugging: make the slip stream effect visible all the time + m_node->setVisible(true); + MovingTexture::setSpeed(1.0f, 0.0f); +} // setIntensity + Added: main/trunk/src/graphics/slip_stream.hpp =================================================================== --- main/trunk/src/graphics/slip_stream.hpp (rev 0) +++ main/trunk/src/graphics/slip_stream.hpp 2010-01-19 23:15:25 UTC (rev 4493) @@ -0,0 +1,51 @@ +// $Id: slip_stream.hpp 1681 2008-04-09 13:52:48Z hikerstk $ +// +// SuperTuxKart - a fun racing game with go-kart +// Copyright (C) 2010 Joerg Henrichs +// +// 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. + +#ifndef HEADER_SLIP_STREAM_HPP +#define HEADER_SLIP_STREAM_HPP + +#include "irrlicht.h" +using namespace irr; + +#include "graphics/moving_texture.hpp" +class Kart; + +class SlipStream : public MovingTexture +{ +private: + /** The kart to which this smoke belongs. */ + Kart *m_kart; + + /** The scene node. */ + scene::ISceneNode *m_node; + + /** The actual mesh. */ + scene::IMesh *m_mesh; + + /** The texture matrix for the slipstream effect. */ + core::matrix4 *m_matrix; + + void createMesh(const video::SMaterial &m); +public: + SlipStream (Kart* kart); + virtual ~SlipStream (); + void setIntensity(float f); +}; // SlipStream +#endif + Modified: main/trunk/src/ide/vc9/supertuxkart.vcproj =================================================================== --- main/trunk/src/ide/vc9/supertuxkart.vcproj 2010-01-19 23:11:09 UTC (rev 4492) +++ main/trunk/src/ide/vc9/supertuxkart.vcproj 2010-01-19 23:15:25 UTC (rev 4493) @@ -130,7 +130,7 @@ <Tool Name="VCCLCompilerTool" WholeProgramOptimization="true" - AdditionalIncludeDirectories="../../../src;../../../src/bullet/src;"$(STK_INCLUDE)";../../../src/enet/include;"$(IRR_INCLUDE)"" + AdditionalIncludeDirectories="../../../src;../../../src/bullet/src;"$(STK_INCLUDE)";../../../src/enet/include;"C:\cygwin\home\jh235117\local\irrlicht-1.7\include"" PreprocessorDefinitions="HAVE_OPENAL;HAVE_OGGVORBIS;NDEBUG;_CONSOLE;WIN32;NOMINMAX;VERSION=\"SVN\";_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;BT_NO_PROFILE;PACKAGE=\"supertuxkart\";HAVE_GETTEXT;ENABLE_NLS;HAVE_GLUT;HAVE_IRRLICHT;IRR_SVN" RuntimeLibrary="2" UsePrecompiledHeader="0" @@ -152,7 +152,7 @@ AdditionalDependencies="opengl32.lib user32.lib gdi32.lib winmm.lib advapi32.lib SDL.lib SDLmain.lib OpenAL32.lib libogg.lib libvorbis.lib libvorbisfile.lib intl.lib Irrlicht.lib ws2_32.lib" OutputFile="./../../../$(ProjectName).exe" LinkIncremental="1" - AdditionalLibraryDirectories=""$(STK_LIB)";"$(IRR_LIB)"" + AdditionalLibraryDirectories=""$(STK_LIB)";"C:\cygwin\home\jh235117\local\irrlicht-1.7\lib\Win32-visualstudio"" IgnoreDefaultLibraryNames="libcmt.lib" GenerateDebugInformation="true" SubSystem="1" @@ -741,6 +741,10 @@ > </File> <File + RelativePath="..\..\graphics\slip_stream.cpp" + > + </File> + <File RelativePath="..\..\graphics\smoke.cpp" > </File> @@ -1571,6 +1575,10 @@ > </File> <File + RelativePath="..\..\graphics\slip_stream.hpp" + > + </File> + <File RelativePath="..\..\graphics\smoke.hpp" > </File> Modified: main/trunk/src/karts/kart.cpp =================================================================== --- main/trunk/src/karts/kart.cpp 2010-01-19 23:11:09 UTC (rev 4492) +++ main/trunk/src/karts/kart.cpp 2010-01-19 23:15:25 UTC (rev 4493) @@ -33,6 +33,7 @@ #include "graphics/nitro.hpp" #include "graphics/shadow.hpp" #include "graphics/skid_marks.hpp" +#include "graphics/slip_stream.hpp" #include "graphics/smoke.hpp" #include "graphics/stars.hpp" #include "graphics/water_splash.hpp" @@ -79,6 +80,7 @@ m_stars_effect = NULL; m_water_splash_system = NULL; m_nitro = NULL; + m_slip_stream = NULL; m_skidmarks = NULL; m_animated_node = NULL; @@ -133,8 +135,8 @@ Vec3 p1(-getKartWidth()*0.5f, -getKartLength()*0.5f-l, 0); Vec3 p2( getKartWidth()*0.5f, -getKartLength()*0.5f-l, 0); Vec3 p3( getKartWidth()*0.5f, -getKartLength()*0.5f, 0); - m_slipstream_original_area = new Quad(p0, p1, p2, p3); - m_slipstream_area = new Quad(p0, p1, p2, p3); + m_slipstream_original_quad = new Quad(p0, p1, p2, p3); + m_slipstream_quad = new Quad(p0, p1, p2, p3); reset(); } // Kart @@ -278,6 +280,7 @@ if(m_smoke_system) delete m_smoke_system; if(m_water_splash_system) delete m_water_splash_system; if(m_nitro) delete m_nitro; + if(m_slip_stream) delete m_slip_stream; delete m_shadow; delete m_stars_effect; @@ -293,8 +296,8 @@ { delete m_kart_chassis.getChildShape(i); } - delete m_slipstream_original_area; - delete m_slipstream_area; + delete m_slipstream_original_quad; + delete m_slipstream_quad; } // ~Kart //----------------------------------------------------------------------------- @@ -372,6 +375,7 @@ m_time_last_crash = 0.0f; m_max_speed_reduction = 0.0f; m_power_reduction = 50.0f; + m_slipstream_mode = SS_NONE; m_controls.m_steer = 0.0f; m_controls.m_accel = 0.0f; @@ -382,6 +386,7 @@ m_controls.m_look_back = false; // Reset star effect in case that it is currently being shown. m_stars_effect->reset(); + m_slip_stream->reset(); m_vehicle->deactivateZipper(); // Set the brakes so that karts don't slide downhill @@ -613,6 +618,7 @@ m_smoke_system->update(dt); m_water_splash_system->update(dt); m_nitro->update(dt); + m_slip_stream->update(dt); } // UserConfigParams::m_graphical_effects updatePhysics(dt); @@ -782,24 +788,29 @@ //----------------------------------------------------------------------------- /** This function manages slipstreaming. It adds up the time a kart was - * slipstreaming, and returns the potential power boost due to coming - * out of slipstream. + * slipstreaming, and if a kart was slipstreaming long enough, it will + * add power to the kart for a certain amount of time. */ float Kart::handleSlipstream(float dt) { + // First see if we are currently using accumulated slipstream credits: + // ------------------------------------------------------------------- + if(m_slipstream_mode==SS_USE) + { + printf("Using slipstream\n"); + m_slipstream_time -= dt; + if(m_slipstream_time<0) m_slipstream_mode=SS_NONE; + return m_kart_properties->getSlipstreamAddPower(); + } + // If this kart is too slow for slipstreaming taking effect, do nothing + // -------------------------------------------------------------------- if(getSpeed()<m_kart_properties->getSlipstreamMinSpeed()) return 0; - m_slipstream_original_area->transform(getTrans(), m_slipstream_area); + // Then test if this kart is in the slipstream range of another kart: + // ------------------------------------------------------------------ + m_slipstream_original_quad->transform(getTrans(), m_slipstream_quad); - // Note: there is a slight inconsistency here: Karts are updated one - // after another. So if the position of this kart is compared with the - // slipstream area of a kart already updated, it will use the new - // slipstream area of that kart, but for karts not yet updated the - // old position will be used. The differences should not be noticable, - // and simplifies the update process (which would otherwise have to be - // done in two stages). Besides, the same problem exists everywhere - // in the kart update process. unsigned int n = race_manager->getNumKarts(); bool is_sstreaming = false; for(unsigned int i=0; i<n; i++) @@ -810,41 +821,43 @@ // If the kart we are testing against is too slow, no need to test // slipstreaming. Note: We compare the speed of the other kart - // against the minimum slipstream kart of this kart - not entirely - // sure if this makes sense, but it makes it easier to give karts - // different slipstream properties. + // against the minimum slipstream speed kart of this kart - not + // entirely sure if this makes sense, but it makes it easier to + // give karts different slipstream properties. if(kart->getSpeed()<m_kart_properties->getSlipstreamMinSpeed()) continue; // Quick test: the kart must be not more than // slipstream length+kart_length() away from the other kart Vec3 delta = getXYZ() - kart->getXYZ(); - float l = kart->m_kart_properties->getSlipstreamLength() + kart->getKartLength()*0.5f; + float l = kart->m_kart_properties->getSlipstreamLength() + + kart->getKartLength()*0.5f; if(delta.length2_2d() > l*l) continue; - if(kart->m_slipstream_area->pointInQuad(getXYZ())) + if(kart->m_slipstream_quad->pointInQuad(getXYZ())) { - is_sstreaming = true; + is_sstreaming = true; break; } } - float add_power = 0; - - if(m_slipstream_time >0 && !is_sstreaming) + if(!is_sstreaming) { - // Kart is using slipstream advantage - add_power = getMaxPower() * m_kart_properties->getSlipstreamAddPower(); - m_slipstream_time = std::max(m_slipstream_time - dt, 0.0f); + m_slipstream_time -=dt; + if(m_slipstream_time<0) m_slipstream_mode = SS_NONE; + return 0; } - else if(is_sstreaming) + + // Accumulate slipstream credits now + m_slipstream_time = m_slipstream_mode==SS_NONE ? dt + : m_slipstream_time+dt; + printf("Collecting slipstream %f\n", m_slipstream_time); + m_slipstream_mode = SS_COLLECT; + if(m_slipstream_time>m_kart_properties->getSlipstreamCollectTime()) { - // Kart is collecting sliptstream advantage - m_slipstream_time = std::min(m_slipstream_time + dt, - m_kart_properties->getSlipstreamTime()); - + m_slipstream_mode = SS_USE; + return m_kart_properties->getSlipstreamAddPower(); } - - return add_power; + return 0; } // handleSlipstream @@ -1207,6 +1220,7 @@ m_smoke_system = new Smoke(this); m_water_splash_system = new WaterSplash(this); m_nitro = new Nitro(this); + m_slip_stream = new SlipStream(this); if(m_kart_properties->hasSkidmarks()) m_skidmarks = new SkidMarks(*this); @@ -1282,6 +1296,12 @@ // become a huge unsigned number in the particle scene node! m_nitro->setCreationRate(m_controls.m_nitro && m_collected_energy>0 ? (10.0f + fabsf(getSpeed())*20.0f) : 0); + float f=0; + if(m_slipstream_mode==SS_COLLECT) + f=1.0f; + else if(m_slipstream_mode==SS_USE) + f=2.0f; + m_slip_stream->setIntensity(f); float speed_ratio = getSpeed()/getMaxSpeed(); float offset_heading = getSteerPercent()*m_kart_properties->getSkidVisual() Modified: main/trunk/src/karts/kart.hpp =================================================================== --- main/trunk/src/karts/kart.hpp 2010-01-19 23:11:09 UTC (rev 4492) +++ main/trunk/src/karts/kart.hpp 2010-01-19 23:15:25 UTC (rev 4493) @@ -37,6 +37,7 @@ class Smoke; class WaterSplash; class Nitro; +class SlipStream; class SFXBase; class btUprightConstraint; class btKart; @@ -101,6 +102,10 @@ /** Graphical effect when using a nitro. */ Nitro *m_nitro; + + /** Graphical effect when slipstreaming. */ + SlipStream *m_slip_stream; + float m_wheel_rotation; /** For each wheel it stores the suspension length after the karts are at * the start position, i.e. the suspension will be somewhat compressed. @@ -115,13 +120,19 @@ // --------------------------- /** The quad inside which another kart is considered to be slipstreaming. * This value is current area, i.e. takes the kart position into account. */ - Quad *m_slipstream_area; + Quad *m_slipstream_quad; + /** This is slipstream area if the kart is at 0,0,0 without rotation. From * this value m_slipstream_area is computed by applying the kart transform. */ - Quad *m_slipstream_original_area; + Quad *m_slipstream_original_quad; + /** The time a kart was in slipstream. */ float m_slipstream_time; + /** Slipstream mode: either nothing happening, or the kart is collecting + * 'slipstream credits', or the kart is using accumulated credits. */ + enum {SS_NONE, SS_COLLECT, SS_USE} m_slipstream_mode; + float m_finish_time; bool m_finished_race; Modified: main/trunk/src/karts/kart_properties.cpp =================================================================== --- main/trunk/src/karts/kart_properties.cpp 2010-01-19 23:11:09 UTC (rev 4492) +++ main/trunk/src/karts/kart_properties.cpp 2010-01-19 23:15:25 UTC (rev 4493) @@ -72,7 +72,8 @@ m_rubber_band_duration = m_time_till_max_skid = m_skid_decrease = m_skid_increase = m_skid_visual = m_skid_max = m_camera_max_accel = m_camera_max_brake = - m_slipstream_length = m_slipstream_time = m_slipstream_add_power = + m_slipstream_length = m_slipstream_collect_time = + m_slipstream_use_time = m_slipstream_add_power = m_slipstream_min_speed = m_camera_distance = UNDEFINED; m_gravity_center_shift = Vec3(UNDEFINED); m_has_skidmarks = true; @@ -242,7 +243,8 @@ root->get("time-till-max-skid", &m_time_till_max_skid); root->get("skid-visual", &m_skid_visual); root->get("slipstream-length", &m_slipstream_length); - root->get("slipstream-time", &m_slipstream_time); + root->get("slipstream-collect-time", &m_slipstream_collect_time); + root->get("slipstream-use-time", &m_slipstream_use_time); root->get("slipstream-add-power", &m_slipstream_add_power); root->get("slipstream-min-speed", &m_slipstream_min_speed); root->get("brake-factor", &m_brake_factor); @@ -453,7 +455,8 @@ lisp->get("skid-max", m_skid_max ); lisp->get("skid-visual", m_skid_visual ); lisp->get("slipstream-length", m_slipstream_length ); - lisp->get("slipstream-time", m_slipstream_time ); + lisp->get("slipstream-collect-time", m_slipstream_collect_time ); + lisp->get("slipstream-use-time", m_slipstream_use_time ); lisp->get("slipstream-add-power", m_slipstream_add_power ); lisp->get("slipstream-min-speed", m_slipstream_min_speed ); @@ -547,7 +550,8 @@ CHECK_NEG(m_skid_max, "skid-max" ); CHECK_NEG(m_skid_visual, "skid-visual" ); CHECK_NEG(m_slipstream_length, "slipstream-length" ); - CHECK_NEG(m_slipstream_time, "slipstream-time" ); + CHECK_NEG(m_slipstream_collect_time, "slipstream-collect-time" ); + CHECK_NEG(m_slipstream_use_time, "slipstream-use-time" ); CHECK_NEG(m_slipstream_add_power, "slipstream-add-power" ); CHECK_NEG(m_slipstream_min_speed, "slipstream-min-speed" ); Modified: main/trunk/src/karts/kart_properties.hpp =================================================================== --- main/trunk/src/karts/kart_properties.hpp 2010-01-19 23:11:09 UTC (rev 4492) +++ main/trunk/src/karts/kart_properties.hpp 2010-01-19 23:15:25 UTC (rev 4493) @@ -140,8 +140,9 @@ * when skidding. */ float m_slipstream_length; /**< How far behind a kart slipstreaming * is effective. */ - float m_slipstream_time; /**< Time after which sstream has maxium - * benefit. */ + float m_slipstream_collect_time; /**< Time after which sstream gives a + * bonus. */ + float m_slipstream_use_time; /**< Time sstream bonus is effective. */ float m_slipstream_add_power; /**< Additional power due to sstreaming. */ float m_slipstream_min_speed; /**< Minimum speed for slipstream to take * effect. */ @@ -246,7 +247,9 @@ /** Returns how far behind a kart slipstreaming works. */ float getSlipstreamLength () const {return m_slipstream_length; } /** Returns time after which slipstream has maximum effect. */ - float getSlipstreamTime () const {return m_slipstream_time; } + float getSlipstreamCollectTime () const {return m_slipstream_collect_time; } + /** Returns time after which slipstream has maximum effect. */ + float getSlipstreamUseTime () const {return m_slipstream_use_time; } /** Returns additional power due to slipstreaming. */ float getSlipstreamAddPower () const {return m_slipstream_add_power; } /** Returns the minimum slipstream speed. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-01-20 01:24:04
|
Revision: 4495 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4495&view=rev Author: hikerstk Date: 2010-01-20 01:23:57 +0000 (Wed, 20 Jan 2010) Log Message: ----------- Renamed 'slowdownTime' in materials.xml file to 'slowdown' which more accurately reflects what it is. Re-scaled the slowdown from '10' = normal to '1' =normal and removed stk_config paramter for this scaling factor. Modified Paths: -------------- main/trunk/data/stk_config.xml main/trunk/data/tracks/beach/materials.xml main/trunk/src/graphics/material.cpp main/trunk/src/karts/kart.cpp Modified: main/trunk/data/stk_config.xml =================================================================== --- main/trunk/data/stk_config.xml 2010-01-20 01:13:58 UTC (rev 4494) +++ main/trunk/data/stk_config.xml 2010-01-20 01:23:57 UTC (rev 4495) @@ -24,9 +24,6 @@ max-skidmarks is the max. number o skidmarks per kart. skid-fadeout-time is the time till the skid marks fade out -slowdown-factor is the engine reduction depending on terrain; see kart for -details - near-ground is the distance above ground when the upright constraint will be disabled to allow more violent explosions. @@ -50,7 +47,6 @@ max-history="10000" max-skidmarks="100" skid-fadeout-time="60" - slowdown-factor="10" near-ground="2" delay-finish-time="10" music-credit-time="10" Modified: main/trunk/data/tracks/beach/materials.xml =================================================================== --- main/trunk/data/tracks/beach/materials.xml 2010-01-20 01:13:58 UTC (rev 4494) +++ main/trunk/data/tracks/beach/materials.xml 2010-01-20 01:23:57 UTC (rev 4495) @@ -1,9 +1,9 @@ <?xml version="1.0"?> <materials> <material name="chess.jpg" collide="N"/> - <material name="grass.jpg" collide="N" maxSpeed="0.6" slowdownTime="4"/> - <material name="sand.jpg" collide="N" maxSpeed="0.4" slowdownTime="4"/> - <material name="sandgrass.jpg" collide="N" maxSpeed="0.4" slowdownTime="4"/> + <material name="grass.jpg" collide="N" maxSpeed="0.6" slowdown="0.4"/> + <material name="sand.jpg" collide="N" maxSpeed="0.4" slowdown="0.4"/> + <material name="sandgrass.jpg" collide="N" maxSpeed="0.4" slowdown="0.4"/> <material name="stonetex.jpg" collide="N"/> <material name="track.jpg" collide="N"/> <material name="trackborder.jpg" light="N" collide="N"/> Modified: main/trunk/src/graphics/material.cpp =================================================================== --- main/trunk/src/graphics/material.cpp 2010-01-20 01:13:58 UTC (rev 4494) +++ main/trunk/src/graphics/material.cpp 2010-01-20 01:23:57 UTC (rev 4495) @@ -58,7 +58,7 @@ node->get("reset", &m_resetter ); node->get("collide", &m_collideable ); node->get("maxSpeed", &m_max_speed_fraction); - node->get("slowdownTime", &m_slowdown ); + node->get("slowdown", &m_slowdown ); std::string s(""); node->get("graphical-effect", &s ); if(s=="water") @@ -107,7 +107,7 @@ m_resetter = false; m_collideable = true; m_max_speed_fraction = 1.0f; - m_slowdown = stk_config->m_slowdown_factor; + m_slowdown = 1.0f; m_graphical_effect = GE_NONE; } Modified: main/trunk/src/karts/kart.cpp =================================================================== --- main/trunk/src/karts/kart.cpp 2010-01-20 01:13:58 UTC (rev 4494) +++ main/trunk/src/karts/kart.cpp 2010-01-20 01:23:57 UTC (rev 4495) @@ -374,7 +374,7 @@ m_skidding = 1.0f; m_time_last_crash = 0.0f; m_max_speed_reduction = 0.0f; - m_power_reduction = 50.0f; + m_power_reduction = 1.0f; m_slipstream_mode = SS_NONE; m_controls.m_steer = 0.0f; @@ -672,7 +672,7 @@ m_body->getBroadphaseHandle()->m_collisionFilterGroup = old_group; } const Material* material=getMaterial(); - m_power_reduction = 50.0f; + m_power_reduction = 1.0f; if (getHoT()==Track::NOHIT) // kart falling off the track { // let kart fall a bit before rescuing @@ -983,7 +983,7 @@ // update() depending on terrain type. Don't apply this if kart is already // going slowly, this would make it hard accelerating to get out of there if(m_speed > 4.0) - engine_power *= m_power_reduction/stk_config->m_slowdown_factor; + engine_power *= m_power_reduction; // Lose some traction when skidding, so it is not abused by player // The AI will be allowed to cheat on medium and hard difficulty in @@ -1031,7 +1031,7 @@ // normal terrain (power_reduction/slowdown_factor should // be 2.5 (which was experimentally determined to feel // right). - float f = 2.5f - 3.8f*(1-m_power_reduction/stk_config->m_slowdown_factor); + float f = 2.5f - 3.8f*(1-m_power_reduction); // Avoid that a kart gets really stuck: if(f<0.1f) f=0.1f; m_vehicle->applyEngineForce(-engine_power*f, 2); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-01-20 02:34:51
|
Revision: 4499 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4499&view=rev Author: hikerstk Date: 2010-01-20 02:34:43 +0000 (Wed, 20 Jan 2010) Log Message: ----------- Removed unused 'collideable' attribute for materials, renamed 'maxSpeed' to 'max-speed' to be consistent with other names in stk. Modified Paths: -------------- main/trunk/data/tracks/beach/materials.xml main/trunk/src/graphics/material.cpp main/trunk/src/graphics/material.hpp Modified: main/trunk/data/tracks/beach/materials.xml =================================================================== --- main/trunk/data/tracks/beach/materials.xml 2010-01-20 02:13:58 UTC (rev 4498) +++ main/trunk/data/tracks/beach/materials.xml 2010-01-20 02:34:43 UTC (rev 4499) @@ -1,9 +1,9 @@ <?xml version="1.0"?> <materials> <material name="chess.jpg" collide="N"/> - <material name="grass.jpg" collide="N" maxSpeed="0.6" slowdown="0.4"/> - <material name="sand.jpg" collide="N" maxSpeed="0.4" slowdown="0.4"/> - <material name="sandgrass.jpg" collide="N" maxSpeed="0.4" slowdown="0.4"/> + <material name="grass.jpg" collide="N" max-speed="0.6" slowdown="0.4"/> + <material name="sand.jpg" collide="N" max-speed="0.4" slowdown="0.4"/> + <material name="sandgrass.jpg" collide="N" max-speed="0.4" slowdown="0.4"/> <material name="stonetex.jpg" collide="N"/> <material name="track.jpg" collide="N"/> <material name="trackborder.jpg" light="N" collide="N"/> Modified: main/trunk/src/graphics/material.cpp =================================================================== --- main/trunk/src/graphics/material.cpp 2010-01-20 02:13:58 UTC (rev 4498) +++ main/trunk/src/graphics/material.cpp 2010-01-20 02:34:43 UTC (rev 4499) @@ -56,8 +56,7 @@ node->get("ignore", &m_ignore ); node->get("zipper", &m_zipper ); node->get("reset", &m_resetter ); - node->get("collide", &m_collideable ); - node->get("maxSpeed", &m_max_speed_fraction); + node->get("max-speed", &m_max_speed_fraction); node->get("slowdown", &m_slowdown ); std::string s(""); node->get("graphical-effect", &s ); @@ -105,7 +104,6 @@ m_ignore = false; m_zipper = false; m_resetter = false; - m_collideable = true; m_max_speed_fraction = 1.0f; m_slowdown = 1.0f; m_graphical_effect = GE_NONE; Modified: main/trunk/src/graphics/material.hpp =================================================================== --- main/trunk/src/graphics/material.hpp 2010-01-20 02:13:58 UTC (rev 4498) +++ main/trunk/src/graphics/material.hpp 2010-01-20 02:34:43 UTC (rev 4499) @@ -37,7 +37,6 @@ unsigned int m_index; std::string m_texname; GraphicalEffect m_graphical_effect; - bool m_collideable; bool m_zipper; bool m_resetter; bool m_ignore; @@ -66,7 +65,6 @@ bool isIgnore () const { return m_ignore; } bool isZipper () const { return m_zipper; } bool isSphereMap () const { return m_sphere_map; } - bool isCrashable () const { return m_collideable; } bool isReset () const { return m_resetter; } float getFriction () const { return m_friction; } const std::string& This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-01-20 17:00:48
|
Revision: 4501 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4501&view=rev Author: auria Date: 2010-01-20 17:00:41 +0000 (Wed, 20 Jan 2010) Log Message: ----------- Added new font, thanks to Arthur_D Modified Paths: -------------- main/trunk/src/guiengine/engine.cpp Added Paths: ----------- main/trunk/data/gui/LayneHansom.xml main/trunk/data/gui/LayneHansom0.png Added: main/trunk/data/gui/LayneHansom.xml =================================================================== --- main/trunk/data/gui/LayneHansom.xml (rev 0) +++ main/trunk/data/gui/LayneHansom.xml 2010-01-20 17:00:41 UTC (rev 4501) @@ -0,0 +1,343 @@ +\xFF\xFE< |
From: <au...@us...> - 2010-01-24 00:43:02
|
Revision: 4524 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4524&view=rev Author: auria Date: 2010-01-24 00:26:41 +0000 (Sun, 24 Jan 2010) Log Message: ----------- Moved fonts to the (duh) /fonts directory in /data Modified Paths: -------------- main/trunk/src/guiengine/CGUIFont.cpp main/trunk/src/guiengine/engine.cpp Added Paths: ----------- main/trunk/data/fonts/LayneHansom.xml main/trunk/data/fonts/LayneHansom0.png main/trunk/data/fonts/title_font.png main/trunk/data/fonts/title_font.xml main/trunk/data/fonts/title_font_2.png Removed Paths: ------------- main/trunk/data/gui/LayneHansom.xml main/trunk/data/gui/LayneHansom0.png main/trunk/data/gui/title_font.png main/trunk/data/gui/title_font.xml main/trunk/data/gui/title_font_2.png Copied: main/trunk/data/fonts/LayneHansom.xml (from rev 4508, main/trunk/data/gui/LayneHansom.xml) =================================================================== --- main/trunk/data/fonts/LayneHansom.xml (rev 0) +++ main/trunk/data/fonts/LayneHansom.xml 2010-01-24 00:26:41 UTC (rev 4524) @@ -0,0 +1,343 @@ +\xFF\xFE< |
From: <au...@us...> - 2010-01-24 01:30:51
|
Revision: 4525 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4525&view=rev Author: auria Date: 2010-01-24 01:30:33 +0000 (Sun, 24 Jan 2010) Log Message: ----------- Added preliminary support for greek and russian. Chinese is also supported if the SungTil files are present (I'm not committing them yet since they're quite large, so we need to decide first if we want to ship them by default or separately) Modified Paths: -------------- main/trunk/data/gui/License.txt main/trunk/src/guiengine/CGUIFont.cpp main/trunk/src/guiengine/engine.cpp Added Paths: ----------- main/trunk/data/fonts/AR PL SungtiL GB0.png main/trunk/data/fonts/StkFont.xml Removed Paths: ------------- main/trunk/data/fonts/LayneHansom.xml Added: main/trunk/data/fonts/AR PL SungtiL GB0.png =================================================================== (Binary files differ) Property changes on: main/trunk/data/fonts/AR PL SungtiL GB0.png ___________________________________________________________________ Added: svn:mime-type + image/png Deleted: main/trunk/data/fonts/LayneHansom.xml =================================================================== --- main/trunk/data/fonts/LayneHansom.xml 2010-01-24 00:26:41 UTC (rev 4524) +++ main/trunk/data/fonts/LayneHansom.xml 2010-01-24 01:30:33 UTC (rev 4525) @@ -1,343 +0,0 @@ -\xFF\xFE< |
From: <au...@us...> - 2010-01-24 15:34:55
|
Revision: 4528 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4528&view=rev Author: auria Date: 2010-01-24 15:34:46 +0000 (Sun, 24 Jan 2010) Log Message: ----------- Added missing string to the pot Modified Paths: -------------- main/trunk/data/po/supertuxkart.pot main/trunk/src/modes/linear_world.cpp Modified: main/trunk/data/po/supertuxkart.pot =================================================================== --- main/trunk/data/po/supertuxkart.pot 2010-01-24 03:46:22 UTC (rev 4527) +++ main/trunk/data/po/supertuxkart.pot 2010-01-24 15:34:46 UTC (rev 4528) @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-01-15 19:02-0500\n" +"POT-Creation-Date: 2010-01-24 10:33-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -22,6 +22,12 @@ msgid "%i laps" msgstr "" +#. I18N: as in "fastest lap: 60 seconds by Wilber" +#: src/modes/linear_world.cpp:263 +#, c-format +msgid "%s by %s" +msgstr "" + #: src/states_screens/kart_selection.cpp:417 #, c-format msgid "%s is ready" Modified: main/trunk/src/modes/linear_world.cpp =================================================================== --- main/trunk/src/modes/linear_world.cpp 2010-01-24 03:46:22 UTC (rev 4527) +++ main/trunk/src/modes/linear_world.cpp 2010-01-24 15:34:46 UTC (rev 4528) @@ -259,8 +259,8 @@ std::string s = StringUtils::timeToString(time_per_lap); irr::core::stringw m_fastest_lap_message; - m_fastest_lap_message += (s + " by ").c_str(); - m_fastest_lap_message += kart->getName(); + //I18N: as in "fastest lap: 60 seconds by Wilber" + m_fastest_lap_message += StringUtils::insertValues(_("%s by %s"), s.c_str(), kart->getName().c_str()).c_str(); m_race_gui->addMessage(m_fastest_lap_message, NULL, 2.0f, 40, video::SColor(255, 100, 210, 100)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-01-24 23:57:57
|
Revision: 4535 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4535&view=rev Author: auria Date: 2010-01-24 23:57:50 +0000 (Sun, 24 Jan 2010) Log Message: ----------- RIP domestic manners Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp main/trunk/src/graphics/irr_driver.hpp main/trunk/src/states_screens/race_gui.cpp Removed Paths: ------------- main/trunk/data/fonts/DomesticManners.xml main/trunk/data/fonts/DomesticManners0.png main/trunk/data/fonts/DomesticManners1.png Deleted: main/trunk/data/fonts/DomesticManners.xml =================================================================== --- main/trunk/data/fonts/DomesticManners.xml 2010-01-24 18:36:03 UTC (rev 4534) +++ main/trunk/data/fonts/DomesticManners.xml 2010-01-24 23:57:50 UTC (rev 4535) @@ -1,241 +0,0 @@ -\xFF\xFE< |
From: <au...@us...> - 2010-01-29 00:59:46
|
Revision: 4553 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4553&view=rev Author: auria Date: 2010-01-29 00:19:17 +0000 (Fri, 29 Jan 2010) Log Message: ----------- Added features to manually control size of each texture in a font (this is useful for our 'composite font', where chinese characters are larger than latin ones) Modified Paths: -------------- main/trunk/data/fonts/StkFont.xml main/trunk/src/guiengine/CGUIFont.cpp main/trunk/src/guiengine/CGUIFont.h Modified: main/trunk/data/fonts/StkFont.xml =================================================================== --- main/trunk/data/fonts/StkFont.xml 2010-01-28 12:01:28 UTC (rev 4552) +++ main/trunk/data/fonts/StkFont.xml 2010-01-29 00:19:17 UTC (rev 4553) @@ -12,70 +12,70 @@ |