From c17cf14c724af9239233684c90acc125d8d2bd3d Mon Sep 17 00:00:00 2001 From: auria Date: Mon, 5 Oct 2009 00:07:08 +0000 Subject: [PATCH] Post-mammoth commit cleanup git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4078 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/guiengine/abstract_state_manager.cpp | 11 --- .../Xcode/STK_XCode.xcodeproj/project.pbxproj | 6 +- src/states_screens/main_menu_screen.cpp | 4 +- src/states_screens/options_screen_av.cpp | 9 -- src/states_screens/options_screen_input.cpp | 10 --- src/states_screens/options_screen_players.cpp | 7 -- src/states_screens/state_manager.cpp | 82 +------------------ 7 files changed, 7 insertions(+), 122 deletions(-) diff --git a/src/guiengine/abstract_state_manager.cpp b/src/guiengine/abstract_state_manager.cpp index 77b11541a..5ec55a01e 100644 --- a/src/guiengine/abstract_state_manager.cpp +++ b/src/guiengine/abstract_state_manager.cpp @@ -22,23 +22,12 @@ #include "main_loop.hpp" #include "audio/sound_manager.hpp" -#include "config/player.hpp" -#include "config/user_config.hpp" -#include "graphics/irr_driver.hpp" -#include "guiengine/cutscene.hpp" #include "guiengine/engine.hpp" -#include "guiengine/modaldialog.hpp" #include "guiengine/screen.hpp" -#include "guiengine/widget.hpp" #include "input/device_manager.hpp" #include "input/input_manager.hpp" -#include "io/file_manager.hpp" #include "modes/world.hpp" -#include "network/network_manager.hpp" #include "race/race_manager.hpp" -#include "states_screens/kart_selection.hpp" -#include "states_screens/credits.hpp" -#include "utils/translation.hpp" using namespace GUIEngine; diff --git a/src/ide/Xcode/STK_XCode.xcodeproj/project.pbxproj b/src/ide/Xcode/STK_XCode.xcodeproj/project.pbxproj index 047df5dcc..ae5188d86 100644 --- a/src/ide/Xcode/STK_XCode.xcodeproj/project.pbxproj +++ b/src/ide/Xcode/STK_XCode.xcodeproj/project.pbxproj @@ -337,8 +337,8 @@ 951C35800FC05BF400A48379 /* quad_graph.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = quad_graph.cpp; path = ../../tracks/quad_graph.cpp; sourceTree = SOURCE_ROOT; }; 9522F123107948AD0067ECF5 /* main_menu_screen.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = main_menu_screen.hpp; path = ../../states_screens/main_menu_screen.hpp; sourceTree = SOURCE_ROOT; }; 9522F124107948AD0067ECF5 /* main_menu_screen.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main_menu_screen.cpp; path = ../../states_screens/main_menu_screen.cpp; sourceTree = SOURCE_ROOT; }; - 9522F159107949780067ECF5 /* race_setup_screen.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = race_setup_screen.hpp; path = games/supertuxkart/src/states_screens/race_setup_screen.hpp; sourceTree = SYSTEM_DEVELOPER_DIR; }; - 9522F15A107949780067ECF5 /* race_setup_screen.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = race_setup_screen.cpp; path = games/supertuxkart/src/states_screens/race_setup_screen.cpp; sourceTree = SYSTEM_DEVELOPER_DIR; }; + 9522F159107949780067ECF5 /* race_setup_screen.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = race_setup_screen.hpp; path = ../../states_screens/race_setup_screen.hpp; sourceTree = SOURCE_ROOT; }; + 9522F15A107949780067ECF5 /* race_setup_screen.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = race_setup_screen.cpp; path = ../../states_screens/race_setup_screen.cpp; sourceTree = SOURCE_ROOT; }; 9522F15C10794A350067ECF5 /* tracks_screen.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = tracks_screen.cpp; path = ../../states_screens/tracks_screen.cpp; sourceTree = SOURCE_ROOT; }; 9522F15D10794A350067ECF5 /* tracks_screen.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = tracks_screen.hpp; path = ../../states_screens/tracks_screen.hpp; sourceTree = SOURCE_ROOT; }; 9522F1DE10795E8A0067ECF5 /* help_screen_1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = help_screen_1.cpp; path = ../../states_screens/help_screen_1.cpp; sourceTree = SOURCE_ROOT; }; @@ -1057,7 +1057,7 @@ 95ECA0FD10124C5000D47C5F /* spinner_widget.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = spinner_widget.hpp; path = ../../guiengine/widgets/spinner_widget.hpp; sourceTree = SOURCE_ROOT; }; 95ECA0FE10124C5000D47C5F /* text_box_widget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = text_box_widget.cpp; path = ../../guiengine/widgets/text_box_widget.cpp; sourceTree = SOURCE_ROOT; }; 95ECA0FF10124C5000D47C5F /* text_box_widget.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = text_box_widget.hpp; path = ../../guiengine/widgets/text_box_widget.hpp; sourceTree = SOURCE_ROOT; }; - 95ECA13C10124E6900D47C5F /* widgets.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = widgets.hpp; path = games/supertuxkart/src/guiengine/widgets.hpp; sourceTree = SYSTEM_DEVELOPER_DIR; }; + 95ECA13C10124E6900D47C5F /* widgets.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = widgets.hpp; path = ../../guiengine/widgets.hpp; sourceTree = SOURCE_ROOT; }; 95F423120E26E3DC00692113 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; 95F4231E0E26E44800692113 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 95F423400E26E65B00692113 /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = /System/Library/Frameworks/GLUT.framework; sourceTree = ""; }; diff --git a/src/states_screens/main_menu_screen.cpp b/src/states_screens/main_menu_screen.cpp index 30227cb36..d928a79a5 100644 --- a/src/states_screens/main_menu_screen.cpp +++ b/src/states_screens/main_menu_screen.cpp @@ -20,12 +20,14 @@ #include "guiengine/widget.hpp" #include "main_loop.hpp" #include "states_screens/credits.hpp" -#include "states_screens/feature_unlocked.hpp" #include "states_screens/kart_selection.hpp" #include "states_screens/help_screen_1.hpp" #include "states_screens/options_screen_av.hpp" #include "states_screens/state_manager.hpp" +// FIXME : remove, temporary test +#include "states_screens/feature_unlocked.hpp" + using namespace GUIEngine; MainMenuScreen::MainMenuScreen() : Screen("main.stkgui") diff --git a/src/states_screens/options_screen_av.cpp b/src/states_screens/options_screen_av.cpp index 6590aa362..d229e82b9 100644 --- a/src/states_screens/options_screen_av.cpp +++ b/src/states_screens/options_screen_av.cpp @@ -22,18 +22,9 @@ #include "audio/sound_manager.hpp" #include "audio/sfx_manager.hpp" #include "audio/sfx_base.hpp" -#include "config/player.hpp" -#include "config/device_config.hpp" -#include "graphics/irr_driver.hpp" -#include "guiengine/engine.hpp" #include "guiengine/screen.hpp" #include "guiengine/widget.hpp" -#include "input/input_manager.hpp" -#include "input/device_manager.hpp" #include "io/file_manager.hpp" -#include "states_screens/dialogs/enter_player_name_dialog.hpp" -#include "states_screens/dialogs/player_info_dialog.hpp" -#include "states_screens/dialogs/press_a_key_dialog.hpp" #include "states_screens/state_manager.hpp" diff --git a/src/states_screens/options_screen_input.cpp b/src/states_screens/options_screen_input.cpp index 1672a0a8f..6ade02db0 100644 --- a/src/states_screens/options_screen_input.cpp +++ b/src/states_screens/options_screen_input.cpp @@ -19,21 +19,11 @@ #include "states_screens/options_screen_av.hpp" #include "states_screens/options_screen_players.hpp" - -#include "audio/sound_manager.hpp" -#include "audio/sfx_manager.hpp" -#include "audio/sfx_base.hpp" -#include "config/player.hpp" -#include "config/device_config.hpp" -#include "graphics/irr_driver.hpp" -#include "guiengine/engine.hpp" #include "guiengine/screen.hpp" #include "guiengine/widget.hpp" #include "input/input_manager.hpp" #include "input/device_manager.hpp" #include "io/file_manager.hpp" -#include "states_screens/dialogs/enter_player_name_dialog.hpp" -#include "states_screens/dialogs/player_info_dialog.hpp" #include "states_screens/dialogs/press_a_key_dialog.hpp" #include "states_screens/state_manager.hpp" diff --git a/src/states_screens/options_screen_players.cpp b/src/states_screens/options_screen_players.cpp index d6ce22326..861699ff2 100644 --- a/src/states_screens/options_screen_players.cpp +++ b/src/states_screens/options_screen_players.cpp @@ -19,21 +19,14 @@ #include "states_screens/options_screen_av.hpp" #include "states_screens/options_screen_players.hpp" -#include "audio/sound_manager.hpp" -#include "audio/sfx_manager.hpp" -#include "audio/sfx_base.hpp" #include "config/player.hpp" #include "config/device_config.hpp" #include "graphics/irr_driver.hpp" #include "guiengine/engine.hpp" #include "guiengine/screen.hpp" #include "guiengine/widget.hpp" -#include "input/input_manager.hpp" -#include "input/device_manager.hpp" -#include "io/file_manager.hpp" #include "states_screens/dialogs/enter_player_name_dialog.hpp" #include "states_screens/dialogs/player_info_dialog.hpp" -#include "states_screens/dialogs/press_a_key_dialog.hpp" #include "states_screens/state_manager.hpp" diff --git a/src/states_screens/state_manager.cpp b/src/states_screens/state_manager.cpp index 6bb025a2a..8cc7de0eb 100644 --- a/src/states_screens/state_manager.cpp +++ b/src/states_screens/state_manager.cpp @@ -18,34 +18,11 @@ #include "states_screens/state_manager.hpp" -#include - -#include "main_loop.hpp" -#include "audio/sound_manager.hpp" -#include "challenges/unlock_manager.hpp" -#include "config/player.hpp" -#include "config/user_config.hpp" -#include "graphics/irr_driver.hpp" -#include "guiengine/engine.hpp" -#include "guiengine/screen.hpp" -#include "guiengine/widget.hpp" -#include "input/device_manager.hpp" +#include "guiengine/modaldialog.hpp" #include "input/input_manager.hpp" -#include "input/input_device.hpp" -#include "io/file_manager.hpp" -#include "network/network_manager.hpp" -#include "race/race_manager.hpp" -#include "states_screens/kart_selection.hpp" -#include "states_screens/credits.hpp" -#include "states_screens/dialogs/track_info_dialog.hpp" #include "states_screens/dialogs/race_paused_dialog.hpp" -#include "tracks/track.hpp" -#include "tracks/track_manager.hpp" #include "utils/translation.hpp" -// FIXME : remove, temporary test -#include "states_screens/feature_unlocked.hpp" - using namespace GUIEngine; StateManager* state_manager_singleton = NULL; @@ -123,63 +100,6 @@ void StateManager::resetActivePlayers() m_active_players.clearWithoutDeleting(); } - - -// ------------------------------------------------------------------------- -/** - * All widget events will be dispatched to this function; arguments are - * a pointer to the widget from which the event originates, and its internal - * name. There is one exception : right after showing a new screen, an event with - * name 'init' and widget set to NULL will be fired, so the screen can be filled - * with the right values or so. - */ -/* -void StateManager::eventCallback(Widget* widget, const std::string& name) -{ - std::cout << "event!! " << name.c_str() << std::endl; - - if (name == "lock") - { - unlock_manager->playLockSound(); - } - - Screen* topScreen = getCurrentScreen(); - if (topScreen == NULL) return; - const std::string& screen_name = topScreen->getName(); - - if( screen_name == "main.stkgui" ) - menuEventMain(widget, name); - else if( screen_name == "karts.stkgui" ) - KartSelectionScreen::menuEventKarts(widget, name); - else if( screen_name == "racesetup.stkgui" ) - menuEventRaceSetup(widget, name); - else if( screen_name == "tracks.stkgui" ) - menuEventTracks(widget, name); - else if( screen_name == "options_av.stkgui" || screen_name == "options_input.stkgui" || screen_name == "options_players.stkgui") - OptionsScreen::menuEventOptions(widget, name); - else if( screen_name == "help1.stkgui" || screen_name == "help2.stkgui" || screen_name == "help3.stkgui") - menuEventHelp(widget, name); - else if( screen_name == "credits.stkgui" ) - { - if(name == "init") - { - Widget* w = getCurrentScreen()->getWidget("animated_area"); - assert(w != NULL); - - Credits* credits = Credits::getInstance(); - credits->reset(); - credits->setArea(w->x, w->y, w->w, w->h); - } - else if(name == "back") - { - StateManager::escapePressed(); - } - } - else - std::cerr << "Warning, unknown menu " << screen_name << " in event callback\n"; - -}*/ - void StateManager::escapePressed() { // in input sensing mode