Clean up headers

Remove special RTL handling as it will be done when texting shaping
This commit is contained in:
Benau 2019-06-15 13:52:28 +08:00
parent caa0554127
commit a56343b7e3
126 changed files with 402 additions and 282 deletions

View File

@ -25,8 +25,10 @@
#include "config/player_manager.hpp"
#include "guiengine/message_queue.hpp"
#include "io/utf_writer.hpp"
#include "config/player_manager.hpp"
#include "io/xml_node.hpp"
#include "online/xml_request.hpp"
#include "utils/log.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <stdlib.h>

View File

@ -22,7 +22,10 @@
#include "achievements/achievement.hpp"
#include "achievements/achievements_status.hpp"
#include "config/player_manager.hpp"
#include "io/xml_node.hpp"
#include "utils/log.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <sstream>
#include <stdlib.h>
@ -249,4 +252,10 @@ int AchievementInfo::recursiveProgressCount(goalTree &parent)
return parent.children[0].value;
}
}
} // recursiveProgressCount
} // recursiveProgressCount
// ----------------------------------------------------------------------------
irr::core::stringw AchievementInfo::getDescription() const
{
return _(m_description.c_str());
} // recursiveProgressCount

View File

@ -20,16 +20,16 @@
#ifndef HEADER_ACHIEVEMENT_INFO_HPP
#define HEADER_ACHIEVEMENT_INFO_HPP
#include "io/xml_node.hpp"
#include "utils/translation.hpp"
#include "utils/types.hpp"
#include <irrString.h>
#include <string>
#include <vector>
// ============================================================================
class Achievement;
class XMLNode;
/** This class stores an achievement definition from the xml file, including
* title, description, but also how to achieve this achievement.
@ -91,8 +91,8 @@ public:
int getGoalCount() { return recursiveGoalCount(m_goal_tree); }
int getDepth() { return getRecursiveDepth(m_goal_tree); }
uint32_t getID() const { return m_id; }
irr::core::stringw getDescription() const { return _(m_description.c_str()); }
irr::core::stringw getName() const { return _LTR(m_name.c_str()); }
irr::core::stringw getDescription() const;
const irr::core::stringw& getName() const { return m_name; }
bool isSecret() const { return m_is_secret; }
// This function should not be called if copy already has children

View File

@ -24,11 +24,13 @@
#include "achievements/achievements_manager.hpp"
#include "config/player_manager.hpp"
#include "io/utf_writer.hpp"
#include "io/xml_node.hpp"
#include "online/xml_request.hpp"
#include "tracks/track.hpp"
#include "tracks/track_manager.hpp"
#include "utils/log.hpp"
#include "utils/ptr_vector.hpp"
#include "utils/translation.hpp"
#include "utils/string_utils.hpp"
#include <sstream>
#include <fstream>

View File

@ -20,14 +20,14 @@
#ifndef HEADER_ACHIEVEMENTS_SLOT_HPP
#define HEADER_ACHIEVEMENTS_SLOT_HPP
#include "achievements/achievement.hpp"
#include "online/request_manager.hpp"
#include "online/xml_request.hpp"
#include "utils/types.hpp"
#include <irrString.h>
#include <map>
#include <string>
#include <vector>
class Achievement;
class UTFWriter;
class XMLNode;
@ -205,12 +205,6 @@ private:
bool m_online;
bool m_valid;
class SyncAchievementsRequest : public Online::XMLRequest {
virtual void callback ();
public:
SyncAchievementsRequest() : Online::XMLRequest(true) {}
};
void setEnumToString();
void updateAchievementsProgress(UpdateType type, unsigned int enum_id);

View File

@ -228,3 +228,19 @@ void Addon::deleteInvalidIconFile()
file_manager->removeFile(icon);
m_installed = false;
} // redownloadIcon
// ----------------------------------------------------------------------------
/** A static function that checks if the given ID is an addon. This is
* done by testing if the directory name is in the addons directory.
*/
bool Addon::isAddon(const std::string &directory)
{
return StringUtils::startsWith(directory,file_manager->getAddonsDir());
} // isAddon
// ----------------------------------------------------------------------------
/** Returns the directory in which this addon is installed. */
std::string Addon::getDataDir() const
{
return file_manager->getAddonsFile(getTypeDirectory()+m_dir_name);
} // getDataDir

View File

@ -24,14 +24,14 @@
* Handles add-ons that can be downloaded
*/
#include "io/file_manager.hpp"
#include "utils/string_utils.hpp"
#include "utils/time.hpp"
#include <assert.h>
#include <string>
#include "irrString.h"
class XMLNode;
using namespace irr;
/**
* \ingroup addonsgroup
@ -59,14 +59,7 @@ public:
};
// ------------------------------------------------------------------------
/** A static function that checks if the given ID is an addon. This is
* done by testing if the directory name is in the addons directory.
*/
static bool isAddon(const std::string &directory)
{
return StringUtils::startsWith(directory,file_manager->getAddonsDir());
} // isAddon
static bool isAddon(const std::string &directory);
// ------------------------------------------------------------------------
/** Create an addon id by adding a 'addon_' prefix to the given id. */
static std::string createAddonId(const std::string &id)
@ -264,11 +257,7 @@ public:
/** Returns if a certain status flag is set. */
bool testStatus(AddonStatus n) const {return (m_status & n) !=0; }
// ------------------------------------------------------------------------
/** Returns the directory in which this addon is installed. */
std::string getDataDir() const
{
return file_manager->getAddonsFile(getTypeDirectory()+m_dir_name);
} // getDataDir
std::string getDataDir() const;
// ------------------------------------------------------------------------
bool filterByWords(const core::stringw words) const;
// ------------------------------------------------------------------------

View File

@ -25,6 +25,7 @@
#include "modes/world.hpp"
#include "race/race_manager.hpp"
#include "utils/profiler.hpp"
#include "utils/string_utils.hpp"
#include "utils/vs.hpp"
#include <pthread.h>

View File

@ -32,6 +32,8 @@
#include "replay/replay_play.hpp"
#include "tracks/track.hpp"
#include "tracks/track_manager.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
ChallengeData::ChallengeData(const std::string& filename)
{

View File

@ -80,19 +80,6 @@ PlayerProfile::OnlineState PlayerManager::getCurrentOnlineState()
return getCurrentPlayer()->getOnlineState();
} // getCurrentOnlineState
// ----------------------------------------------------------------------------
/** Returns the online name of this player.
*/
const irr::core::stringw& PlayerManager::getCurrentOnlineUserName()
{
if (getCurrentOnlineState() == PlayerProfile::OS_SIGNED_IN ||
getCurrentOnlineState() == PlayerProfile::OS_GUEST )
return getCurrentOnlineProfile()->getUserName();
static core::stringw not_signed_in = _("Currently not signed in");
return not_signed_in;
} // getCurrentOnlineUserName
// ----------------------------------------------------------------------------
/** Sends a request to the server to see if any new information is
* available. (online friends, notifications, etc.).
@ -270,7 +257,7 @@ void PlayerManager::save()
if(m_current_player)
{
players_file << " <current player=\""
<< StringUtils::xmlEncode(m_current_player->getName(true/*ignoreRTL*/)) << L"\"/>\n";
<< StringUtils::xmlEncode(m_current_player->getName()) << L"\"/>\n";
}
// Save all non-guest players
@ -328,8 +315,7 @@ void PlayerManager::enforceCurrentPlayer()
if (!player->isGuestAccount())
{
Log::info("PlayerManager", "Enforcing current player '%s'.",
StringUtils::wideToUtf8(player->getName(true/*ignoreRTL*/))
.c_str());
StringUtils::wideToUtf8(player->getName()).c_str());
m_current_player = player;
return;
}
@ -343,8 +329,7 @@ void PlayerManager::enforceCurrentPlayer()
if (!player->isGuestAccount())
{
Log::info("PlayerManager", "Enforcing current player '%s'.",
StringUtils::wideToUtf8(player->getName(true/*ignoreRTL*/))
.c_str());
StringUtils::wideToUtf8(player->getName()).c_str());
m_current_player = player;
return;
}
@ -392,12 +377,12 @@ void PlayerManager::createGuestPlayers(int n)
if(i==0)
{
// I18N: Name of first guest player (without number)
guest_name = _LTR("Guest");
guest_name = _("Guest");
}
else
{
// I18N: Name of further guest players, with a 1, 2, ... attached
guest_name = _LTR("Guest %d", i);
guest_name = _("Guest %d", i);
}
PlayerProfile *guest = new Online::OnlinePlayerProfile(guest_name,
/*guest*/ true);
@ -457,7 +442,7 @@ PlayerProfile *PlayerManager::getPlayer(const irr::core::stringw &name)
{
for (PlayerProfile* player : m_all_players)
{
if(player->getName(true/*ignoreRTL*/)==name)
if(player->getName()==name)
return player;
}
return NULL;

View File

@ -106,7 +106,6 @@ public:
static Online::OnlineProfile* getCurrentOnlineProfile();
static PlayerProfile::OnlineState getCurrentOnlineState();
static const irr::core::stringw& getCurrentOnlineUserName();
static void requestOnlinePoll();
static void resumeSavedSession();
static void onSTKQuit();

View File

@ -21,11 +21,12 @@
#include "achievements/achievements_manager.hpp"
#include "challenges/unlock_manager.hpp"
#include "config/player_manager.hpp"
#include "io/file_manager.hpp"
#include "io/utf_writer.hpp"
#include "io/xml_node.hpp"
#include "karts/kart_properties.hpp"
#include "karts/kart_properties_manager.hpp"
#include "online/online_player_profile.hpp"
#include "io/xml_node.hpp"
#include "io/utf_writer.hpp"
#include "utils/string_utils.hpp"
//------------------------------------------------------------------------------

View File

@ -24,7 +24,6 @@
#include "utils/leak_check.hpp"
#include "utils/no_copy.hpp"
#include "utils/types.hpp"
#include "utils/translation.hpp"
#include <irrString.h>
using namespace irr;
@ -158,17 +157,10 @@ public:
// ------------------------------------------------------------------------
/** Returns the name of this player. */
const core::stringw getName(bool ignore_rtl = false) const
const core::stringw& getName() const
{
assert(m_magic_number == 0xABCD1234);
if (ignore_rtl)
return m_local_name;
else
{
const core::stringw fribidized_name =
translations->fribidize(m_local_name);
return fribidized_name;
}
return m_local_name;
} // getName
// ------------------------------------------------------------------------
@ -182,16 +174,9 @@ public:
} // isGuestAccount
// ------------------------------------------------------------------------
/** Returns the last used online name. */
const core::stringw getLastOnlineName(bool ignore_rtl = false) const
const core::stringw& getLastOnlineName() const
{
if (ignore_rtl)
return m_last_online_name;
else
{
const core::stringw fribidized_name =
translations->fribidize(m_last_online_name);
return fribidized_name;
}
return m_last_online_name;
} // getLastOnlineName
// ------------------------------------------------------------------------
/** Sets the last used online name. */

View File

@ -28,6 +28,7 @@
#include "items/item.hpp"
#include "karts/kart_properties.hpp"
#include "utils/log.hpp"
#include "utils/string_utils.hpp"
STKConfig* stk_config=0;
float STKConfig::UNDEFINED = -99.9f;

View File

@ -71,6 +71,7 @@
#include "utils/constants.hpp"
#include "utils/log.hpp"
#include "utils/profiler.hpp"
#include "utils/string_utils.hpp"
#include "utils/vs.hpp"
#include <irrlicht.h>

View File

@ -25,6 +25,7 @@
#include "guiengine/message_queue.hpp"
#include "io/file_manager.hpp"
#include "utils/log.hpp"
#include "utils/string_utils.hpp"
#include <fstream>
#include <sstream>

View File

@ -684,6 +684,8 @@ namespace GUIEngine
#include "modes/world.hpp"
#include "states_screens/race_gui_base.hpp"
#include "utils/debug.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <algorithm>
#include <iostream>

View File

@ -19,6 +19,7 @@
#include "guiengine/screen.hpp"
#include "guiengine/engine.hpp"
#include "guiengine/widgets.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <iostream>
#include <irrXML.h>

View File

@ -34,6 +34,7 @@
#include "io/file_manager.hpp"
#include "states_screens/state_manager.hpp"
#include "utils/log.hpp"
#include "utils/string_utils.hpp"
using namespace GUIEngine;
using namespace irr;

View File

@ -24,7 +24,7 @@
#include "guiengine/scalable_font.hpp"
#include "io/file_manager.hpp"
#include "utils/log.hpp"
#include "utils/translation.hpp"
#include "utils/string_utils.hpp"
#include <iostream>
#include <IGUIElement.h>
@ -243,7 +243,6 @@ void IconButtonWidget::add()
setLabelFont();
m_label->setRightToLeft(translations->isRTLText(message));
m_label->setTextRestrainedInside(false);
}

View File

@ -29,6 +29,9 @@
#include "karts/kart_properties.hpp"
#include "karts/kart_properties_manager.hpp"
#include "states_screens/kart_selection.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <IGUIEnvironment.h>
using namespace GUIEngine;

View File

@ -32,9 +32,9 @@
#include "states_screens/kart_selection.hpp"
#include "states_screens/state_manager.hpp"
#include "utils/log.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#define INPUT_MODE_DEBUG 0
static const char INPUT_FILE_NAME[] = "input.xml";

View File

@ -18,6 +18,7 @@
#include "input/gamepad_android_config.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <SKeyMap.h>

View File

@ -20,6 +20,7 @@
#include "io/xml_node.hpp"
#include "utils/interpolation_array.hpp"
#include "utils/log.hpp"
#include "utils/string_utils.hpp"
#include "utils/vec3.hpp"
#include <stdexcept>

View File

@ -33,7 +33,6 @@ using namespace irr;
#include "utils/leak_check.hpp"
#include "utils/no_copy.hpp"
#include "utils/string_utils.hpp"
#include "utils/time.hpp"
#include "utils/types.hpp"

View File

@ -33,6 +33,7 @@
#include "tracks/drive_node.hpp"
#include "tracks/track.hpp"
#include "utils/constants.hpp"
#include "utils/string_utils.hpp"
#include <IMeshSceneNode.h>
#include <ISceneManager.h>

View File

@ -32,6 +32,7 @@
#include "network/network_config.hpp"
#include "network/network_string.hpp"
#include "network/rewind_manager.hpp"
#include "utils/string_utils.hpp"
#include <typeinfo>

View File

@ -85,6 +85,7 @@ void AbstractKart::loadKartProperties(const std::string& new_ident,
kp = kart_properties_manager->getKart(std::string("tux"));
}
m_kart_properties->copyForPlayer(kp, difficulty);
m_name = m_kart_properties->getName();
m_difficulty = difficulty;
m_kart_animation = NULL;
assert(m_kart_properties);
@ -116,12 +117,6 @@ void AbstractKart::changeKart(const std::string& new_ident,
loadKartProperties(new_ident, difficulty, ri);
} // changeKart
// ----------------------------------------------------------------------------
/** Returns a name to be displayed for this kart. */
core::stringw AbstractKart::getName() const
{
return m_kart_properties->getName();
} // getName;
// ----------------------------------------------------------------------------
/** Returns a unique identifier for this kart (name of the directory the
* kart was loaded from). */

View File

@ -75,6 +75,9 @@ private:
/** Index of kart in world. */
unsigned int m_world_kart_id;
/** Name of the kart with translation. */
core::stringw m_name;
// ------------------------------------------------------------------------
void loadKartProperties(const std::string& new_ident,
PerPlayerDifficulty difficulty,
@ -113,7 +116,10 @@ public:
PerPlayerDifficulty difficulty,
std::shared_ptr<RenderInfo> ri);
virtual ~AbstractKart();
virtual core::stringw getName() const;
// ------------------------------------------------------------------------
/** Returns a name to be displayed for this kart. */
const core::stringw& getName() const { return m_name; }
// ------------------------------------------------------------------------
virtual void reset();
virtual void init(RaceManager::KartType type) = 0;
// ========================================================================

View File

@ -47,6 +47,7 @@
#include "tracks/track.hpp"
#include "utils/constants.hpp"
#include "utils/log.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
/** The constructor for a loca player kart, i.e. a player that is playing

View File

@ -38,6 +38,7 @@
#include "states_screens/race_gui_base.hpp"
#include "utils/constants.hpp"
#include "utils/log.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <cstdlib>

View File

@ -27,6 +27,8 @@
#include "tracks/arena_node.hpp"
#include "physics/physics.hpp"
#include "utils/random_generator.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <algorithm>

View File

@ -85,8 +85,10 @@
#include "tracks/track_sector.hpp"
#include "utils/constants.hpp"
#include "utils/log.hpp" //TODO: remove after debugging is done
#include "utils/vs.hpp"
#include "utils/profiler.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include "utils/vs.hpp"
#include <ICameraSceneNode.h>
#include <ISceneManager.h>

View File

@ -576,6 +576,13 @@ float KartProperties::getAccelerationEfficiency() const
return (sum / 10395);
} // getAccelerationEfficiency
// ----------------------------------------------------------------------------
/** Returns the name of this kart. */
core::stringw KartProperties::getName() const
{
return _(m_name.c_str());
} // getName
// ----------------------------------------------------------------------------
// Script-generated content generated by tools/create_kart_properties.py getter
// Please don't change the following tag. It will be automatically detected

View File

@ -251,14 +251,7 @@ public:
// ------------------------------------------------------------------------
void setHatMeshName(const std::string &hat_name);
// ------------------------------------------------------------------------
/** Returns the name of this kart.
\note Pass it through fridibi as needed, this is the LTR name
*/
core::stringw getName() const
{
return _LTR(m_name.c_str());
}
core::stringw getName() const;
// ------------------------------------------------------------------------
const std::string getNonTranslatedName() const {return m_name;}

View File

@ -36,6 +36,8 @@
#include "network/rewind_manager.hpp"
#include "network/network_string.hpp"
#include "physics/btKart.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include "utils/vec3.hpp"
#include <ISceneNode.h>

View File

@ -44,7 +44,9 @@
#include "race/race_manager.hpp"
#include "states_screens/state_manager.hpp"
#include "utils/profiler.hpp"
#include "utils/string_utils.hpp"
#include "utils/time.hpp"
#include "utils/translation.hpp"
#ifndef WIN32
#include <unistd.h>

View File

@ -33,6 +33,8 @@
#include "states_screens/race_gui.hpp"
#include "tracks/track.hpp"
#include "tracks/track_object_manager.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <algorithm>

View File

@ -41,6 +41,7 @@
#include "tracks/track_object_manager.hpp"
#include "utils/constants.hpp"
#include "utils/ptr_vector.hpp"
#include "utils/string_utils.hpp"
#include <IMeshSceneNode.h>
#include <ISceneManager.h>

View File

@ -23,6 +23,8 @@
#include "karts/ghost_kart.hpp"
#include "replay/replay_play.hpp"
#include "tracks/track.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
//-----------------------------------------------------------------------------
/** Constructor. Sets up the clock mode etc.

View File

@ -26,6 +26,7 @@
#include "karts/controller/controller.hpp"
#include "states_screens/race_gui_base.hpp"
#include "tracks/track.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <ISceneManager.h>

View File

@ -23,6 +23,7 @@
#include "network/protocols/game_events_protocol.hpp"
#include "network/stk_host.hpp"
#include "tracks/track.hpp"
#include "utils/string_utils.hpp"
#include <algorithm>
#include <utility>

View File

@ -29,6 +29,7 @@
#include <iomanip>
#include <iostream>
#include <sstream>
ProfileWorld::ProfileType ProfileWorld::m_profile_mode=PROFILE_NONE;
int ProfileWorld::m_num_laps = 0;

View File

@ -36,6 +36,8 @@
#include "tracks/track.hpp"
#include "tracks/track_object_manager.hpp"
#include "utils/constants.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <algorithm>
#include <string>

View File

@ -30,6 +30,7 @@
#include "network/stk_host.hpp"
#include "race/race_manager.hpp"
#include "utils/log.hpp"
#include "utils/string_utils.hpp"
#include <algorithm>
#include <fstream>

View File

@ -49,6 +49,8 @@
#include "network/server_config.hpp"
#include "network/stk_host.hpp"
#include "network/stk_peer.hpp"
#include "online/online_profile.hpp"
#include "online/xml_request.hpp"
#include "states_screens/online/networking_lobby.hpp"
#include "states_screens/online/network_kart_selection.hpp"
#include "states_screens/race_result_gui.hpp"
@ -56,6 +58,8 @@
#include "tracks/track.hpp"
#include "tracks/track_manager.hpp"
#include "utils/log.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
// ============================================================================
/** The protocol that manages starting a race with the server. It uses a
@ -397,7 +401,10 @@ void ClientLobby::update(int ticks)
{
ns->addUInt32(id).addUInt32(0);
if (id != 0)
ns->encodeString(PlayerManager::getCurrentOnlineUserName());
{
ns->encodeString(
PlayerManager::getCurrentOnlineProfile()->getUserName());
}
}
rest->encodeString(ServerConfig::m_private_server_password)
@ -1333,7 +1340,7 @@ void ClientLobby::sendChat(irr::core::stringw text)
PlayerProfile* player = PlayerManager::getCurrentPlayer();
if (PlayerManager::getCurrentOnlineState() ==
PlayerProfile::OS_SIGNED_IN)
name = PlayerManager::getCurrentOnlineUserName();
name = PlayerManager::getCurrentOnlineProfile()->getUserName();
else
name = player->getName();
chat->encodeString16(name + L": " + text);

View File

@ -19,6 +19,8 @@
#include "network/protocols/connect_to_server.hpp"
#include "config/user_config.hpp"
#include "io/file_manager.hpp"
#include "io/xml_node.hpp"
#include "network/crypto.hpp"
#include "network/event.hpp"
#include "network/network.hpp"

View File

@ -26,6 +26,8 @@
#include <memory>
#include <string>
#include "irrString.h"
class Server;
class ConnectToServer : public Protocol

View File

@ -42,7 +42,7 @@
#include "network/stk_host.hpp"
#include "network/stk_peer.hpp"
#include "online/online_profile.hpp"
#include "online/request_manager.hpp"
#include "online/xml_request.hpp"
#include "race/race_manager.hpp"
#include "states_screens/online/networking_lobby.hpp"
#include "states_screens/race_result_gui.hpp"
@ -51,6 +51,7 @@
#include "tracks/track_manager.hpp"
#include "utils/log.hpp"
#include "utils/random_generator.hpp"
#include "utils/string_utils.hpp"
#include "utils/time.hpp"
#include <algorithm>

View File

@ -186,4 +186,19 @@ Track* Server::getCurrentTrack() const
if (!m_current_track.empty())
return track_manager->getTrack(m_current_track);
return NULL;
}
} // getCurrentTrack
// ----------------------------------------------------------------------------
bool Server::searchByName(const std::string& lower_case_word)
{
auto list = StringUtils::split(lower_case_word, ' ', false);
bool server_name_found = true;
for (auto& word : list)
{
const std::string& for_search = m_lower_case_name +
m_lower_case_player_names;
server_name_found = server_name_found &&
for_search.find(word) != std::string::npos;
}
return server_name_found;
} // searchByName

View File

@ -161,19 +161,7 @@ public:
// ------------------------------------------------------------------------
void setSupportsEncryption(bool val) { m_supports_encrytion = val; }
// ------------------------------------------------------------------------
bool searchByName(const std::string& lower_case_word)
{
auto list = StringUtils::split(lower_case_word, ' ', false);
bool server_name_found = true;
for (auto& word : list)
{
const std::string& for_search = m_lower_case_name +
m_lower_case_player_names;
server_name_found = server_name_found &&
for_search.find(word) != std::string::npos;
}
return server_name_found;
}
bool searchByName(const std::string& lower_case_word);
// ------------------------------------------------------------------------
Track* getCurrentTrack() const;
// ------------------------------------------------------------------------

View File

@ -20,6 +20,7 @@
#include "config/stk_config.hpp"
#include "config/user_config.hpp"
#include "io/xml_node.hpp"
#include "network/network.hpp"
#include "network/network_config.hpp"
#include "network/network_string.hpp"

View File

@ -37,6 +37,7 @@
#include "tracks/track_manager.hpp"
#include "utils/log.hpp"
#include "utils/separate_process.hpp"
#include "utils/string_utils.hpp"
#include "utils/time.hpp"
#include "utils/vs.hpp"

View File

@ -18,6 +18,7 @@
#include "network/transport_address.hpp"
#include "utils/log.hpp"
#include "utils/string_utils.hpp"
#ifdef WIN32
# include <iphlpapi.h>
@ -28,6 +29,37 @@
# include <errno.h>
#endif
// ----------------------------------------------------------------------------
/** Construct an IO address from a string in the format x.x.x.x with a
* port number. */
TransportAddress::TransportAddress(const std::string& str, uint16_t port_number)
{
std::vector<uint32_t> ip = StringUtils::splitToUInt(str, '.');
m_ip = 0;
m_port = 0;
if (ip.size() >= 4)
m_ip = (ip[0] << 24) + (ip[1] << 16) + (ip[2] << 8) + ip[3];
m_port = port_number;
} // TransportAddress(string of ip, port number)
// ----------------------------------------------------------------------------
/** Construct an IO address from a string in the format x.x.x.x:x. */
TransportAddress::TransportAddress(const std::string& str)
{
std::string combined = StringUtils::replace(str, ":", ".");
std::vector<uint32_t> ip = StringUtils::splitToUInt(combined, '.');
m_ip = 0;
m_port = 0;
if (ip.size() >= 4)
m_ip = (ip[0] << 24) + (ip[1] << 16) + (ip[2] << 8) + ip[3];
if(ip.size()==5)
m_port = (uint16_t)(ip[4] < 65536 ? ip[4] : 0);
else
m_port = 0;
} // TransportAddress(string of ip)
// ----------------------------------------------------------------------------
/** Returns if this IP address belongs to a LAN, i.e. is in 192.168* or
* 10*, 172.16-31.*, or is on the same host, i.e. 127* or same public address.
@ -218,3 +250,20 @@ void TransportAddress::unitTesting()
assert(t20.getPort() == 123);
} // unitTesting
// ----------------------------------------------------------------------------
/** Returns a std::string representing the ip address and port in human
* readable format.
* \param show_port True if the port should be shown as well, otherwise
* only the ip address will be returned.
*/
std::string TransportAddress::toString(bool show_port) const
{
std::string s =
StringUtils::insertValues("%d.%d.%d.%d",
((m_ip >> 24) & 0xff), ((m_ip >> 16) & 0xff),
((m_ip >> 8) & 0xff), ((m_ip >> 0) & 0xff));
if (show_port)
s += StringUtils::insertValues(":%d", m_port);
return s;
} // toString

View File

@ -22,7 +22,6 @@
#ifndef HEADER_TRANSPORT_ADDRESS_HPP
#define HEADER_TRANSPORT_ADDRESS_HPP
#include "utils/string_utils.hpp"
#include "utils/types.hpp"
#include "enet/enet.h"
@ -65,36 +64,9 @@ public:
} // TransportAddress(EnetAddress)
// ------------------------------------------------------------------------
/** Construct an IO address from a string in the format x.x.x.x with a
* port number. */
TransportAddress(const std::string& str, uint16_t port_number)
{
std::vector<uint32_t> ip = StringUtils::splitToUInt(str, '.');
m_ip = 0;
m_port = 0;
if (ip.size() >= 4)
m_ip = (ip[0] << 24) + (ip[1] << 16) + (ip[2] << 8) + ip[3];
m_port = port_number;
} // TransportAddress(string of ip, port number)
TransportAddress(const std::string& str, uint16_t port_number);
// ------------------------------------------------------------------------
/** Construct an IO address from a string in the format x.x.x.x:x. */
TransportAddress(const std::string& str)
{
std::string combined = StringUtils::replace(str, ":", ".");
std::vector<uint32_t> ip = StringUtils::splitToUInt(combined, '.');
m_ip = 0;
m_port = 0;
if (ip.size() >= 4)
m_ip = (ip[0] << 24) + (ip[1] << 16) + (ip[2] << 8) + ip[3];
if(ip.size()==5)
m_port = (uint16_t)(ip[4] < 65536 ? ip[4] : 0);
else
m_port = 0;
} // TransportAddress(string of ip)
TransportAddress(const std::string& str);
// ------------------------------------------------------------------------
~TransportAddress() {}
// ------------------------------------------------------------------------
@ -163,21 +135,7 @@ public:
return other.m_ip != m_ip || other.m_port != m_port;
} // operator!=
// ------------------------------------------------------------------------
/** Returns a std::string representing the ip address and port in human
* readable format.
* \param show_port True if the port should be shown as well, otherwise
* only the ip address will be returned.
*/
std::string toString(bool show_port = true) const
{
std::string s =
StringUtils::insertValues("%d.%d.%d.%d",
((m_ip >> 24) & 0xff), ((m_ip >> 16) & 0xff),
((m_ip >> 8) & 0xff), ((m_ip >> 0) & 0xff));
if (show_port)
s += StringUtils::insertValues(":%d", m_port);
return s;
} // toString
std::string toString(bool show_port = true) const;
}; // TransportAddress
#endif // TYPES_HPP

View File

@ -18,6 +18,7 @@
#include "config/user_config.hpp"
#include "config/stk_config.hpp"
#include "io/file_manager.hpp"
#include "online/request_manager.hpp"
#include "utils/constants.hpp"
#include "utils/translation.hpp"

View File

@ -19,7 +19,6 @@
#ifndef HEADER_HTTP_REQUEST_HPP
#define HEADER_HTTP_REQUEST_HPP
#include "io/file_manager.hpp"
#include "online/request.hpp"
#include "utils/cpp2011.hpp"
#include "utils/string_utils.hpp"

View File

@ -26,6 +26,8 @@
#include "network/network_config.hpp"
#include "online/online_profile.hpp"
#include "online/profile_manager.hpp"
#include "online/request_manager.hpp"
#include "online/xml_request.hpp"
#include "states_screens/main_menu_screen.hpp"
#include "states_screens/online/online_profile_friends.hpp"
#include "states_screens/options/user_screen.hpp"
@ -44,6 +46,25 @@ using namespace Online;
namespace Online
{
namespace PrivateRequest
{
// ----------------------------------------------------------------
class SignInRequest : public XMLRequest
{
virtual void callback();
public:
SignInRequest(bool manage_memory)
: XMLRequest(manage_memory, /*priority*/10) {}
}; // SignInRequest
// ----------------------------------------------------------------
class PollRequest : public XMLRequest
{
virtual void callback();
public:
PollRequest();
}; // PollRequest
}
// ------------------------------------------------------------------------
/** Adds the login credential to a http request. It sets the name of
* the script to invokce, token, and user id.
@ -94,7 +115,8 @@ namespace Online
{
if (m_online_state == OS_SIGNED_OUT && hasSavedSession())
{
SignInRequest *request = new SignInRequest(true);
PrivateRequest::SignInRequest *request =
new PrivateRequest::SignInRequest(true);
setUserDetails(request, "saved-session");
// The userid must be taken from the saved data,
@ -118,7 +140,8 @@ namespace Online
// logout stil happening.
assert(m_online_state == OS_SIGNED_OUT ||
m_online_state == OS_SIGNING_OUT);
SignInRequest * request = new SignInRequest(true);
PrivateRequest::SignInRequest * request =
new PrivateRequest::SignInRequest(true);
// We can't use setUserDetail here, since there is no token yet
request->setApiURL(API::USER_PATH, "connect");
@ -134,7 +157,7 @@ namespace Online
// ------------------------------------------------------------------------
/** Called when the signin request is finished.
*/
void OnlinePlayerProfile::SignInRequest::callback()
void PrivateRequest::SignInRequest::callback()
{
PlayerManager::getCurrentPlayer()->signIn(isSuccess(), getXMLData());
GUIEngine::Screen *screen = GUIEngine::getCurrentScreen();
@ -149,8 +172,7 @@ namespace Online
PlayerProfile *player = PlayerManager::get()->getPlayer(i);
if(player != current &&
player->hasSavedSession() &&
player->getLastOnlineName(true/*ignoreRTL*/) ==
current->getLastOnlineName(true/*ignoreRTL*/))
player->getLastOnlineName() == current->getLastOnlineName())
{
player->clearSession();
}
@ -339,13 +361,14 @@ namespace Online
{
assert(m_online_state == OS_SIGNED_IN);
OnlinePlayerProfile::PollRequest *request = new OnlinePlayerProfile::PollRequest();
PrivateRequest::PollRequest *request =
new PrivateRequest::PollRequest();
setUserDetails(request, "poll");
request->queue();
} // requestPoll()
// ------------------------------------------------------------------------
OnlinePlayerProfile::PollRequest::PollRequest()
PrivateRequest::PollRequest::PollRequest()
: XMLRequest(true)
{
} // PollRequest
@ -354,7 +377,7 @@ namespace Online
/** Callback for the poll request. Parses the information and spawns
* notifications accordingly.
*/
void OnlinePlayerProfile::PollRequest::callback()
void PrivateRequest::PollRequest::callback()
{
// connection error
if (!isSuccess())

View File

@ -20,10 +20,6 @@
#define HEADER_CURRENT_ONLINE_USER_HPP
#include "config/player_profile.hpp"
#include "online/http_request.hpp"
#include "online/online_profile.hpp"
#include "online/request_manager.hpp"
#include "online/xml_request.hpp"
#include "utils/synchronised.hpp"
#include "utils/types.hpp"
@ -38,32 +34,12 @@ namespace Online
{
class OnlineProfile;
// ============================================================================
/**
* \brief Class that represents an online registered user
* \ingroup online
*/
class OnlinePlayerProfile : public PlayerProfile
{
public:
// ----------------------------------------------------------------
class SignInRequest : public XMLRequest
{
virtual void callback ();
public:
SignInRequest(bool manage_memory)
: XMLRequest(manage_memory, /*priority*/10) {}
}; // SignInRequest
// ----------------------------------------------------------------
class PollRequest : public XMLRequest
{
virtual void callback ();
public:
PollRequest();
}; // PollRequest
private:
std::string m_token;
OnlineProfile *m_profile;

View File

@ -20,10 +20,12 @@
#include "config/player_manager.hpp"
#include "config/user_config.hpp"
#include "io/xml_node.hpp"
#include "online/profile_manager.hpp"
#include "online/request_manager.hpp"
#include "online/xml_request.hpp"
#include "utils/log.hpp"
#include "utils/translation.hpp"
#include "utils/string_utils.hpp"
#include <sstream>
#include <stdlib.h>

View File

@ -19,16 +19,17 @@
#ifndef HEADER_ONLINE_PROFILE_HPP
#define HEADER_ONLINE_PROFILE_HPP
#include "online/request_manager.hpp"
#include "online/xml_request.hpp"
#include "utils/types.hpp"
#include "utils/ptr_vector.hpp"
#include "irrString.h"
#include <atomic>
#include <irrString.h>
#include <map>
#include <string>
class XMLNode;
namespace Online
{
/** Class that represents an online profile. It manages the online profile
@ -102,7 +103,7 @@ private:
bool m_has_fetched_achievements;
std::vector<uint32_t> m_achievements;
std::map<uint32_t, core::stringw> m_friend_server_map;
std::map<uint32_t, irr::core::stringw> m_friend_server_map;
bool m_cache_bit;
void storeFriends(const XMLNode * input);
@ -123,7 +124,7 @@ public:
const IDList& getAchievements();
void merge(OnlineProfile * profile);
// ------------------------------------------------------------------------
std::map<uint32_t, core::stringw>& getFriendServerMap()
std::map<uint32_t, irr::core::stringw>& getFriendServerMap()
{ return m_friend_server_map; }
// ------------------------------------------------------------------------
/** Returns true if the achievements for this profile have been fetched. */

View File

@ -19,11 +19,9 @@
#ifndef HEADER_ONLINE_REQUEST_HPP
#define HEADER_ONLINE_REQUEST_HPP
#include "io/file_manager.hpp"
#include "utils/cpp2011.hpp"
#include "utils/leak_check.hpp"
#include "utils/no_copy.hpp"
#include "utils/string_utils.hpp"
#include "utils/synchronised.hpp"
#ifdef WIN32

View File

@ -21,10 +21,8 @@
#ifndef HEADER_REQUEST_MANAGER_HPP
#define HEADER_REQUEST_MANAGER_HPP
#include "io/xml_node.hpp"
#include "online/request.hpp"
#include "utils/can_be_deleted.hpp"
#include "utils/string_utils.hpp"
#include "utils/synchronised.hpp"
#include <irrString.h>

View File

@ -17,8 +17,10 @@
#include "online/xml_request.hpp"
#include "config/user_config.hpp"
#include "online/request_manager.hpp"
#include "io/file_manager.hpp"
#include "io/xml_node.hpp"
#include "utils/constants.hpp"
#include "utils/log.hpp"
#include "utils/translation.hpp"
#ifdef WIN32

View File

@ -19,10 +19,8 @@
#ifndef HEADER_XML_REQUEST_HPP
#define HEADER_XML_REQUEST_HPP
#include "io/file_manager.hpp"
#include "online/http_request.hpp"
#include "utils/cpp2011.hpp"
#include "utils/string_utils.hpp"
#include "utils/synchronised.hpp"
#ifdef WIN32
@ -33,6 +31,7 @@
#include <memory>
#include <string>
class XMLNode;
namespace Online
{

View File

@ -609,4 +609,18 @@ void GrandPrixData::remove(const unsigned int track)
m_reversed.erase(m_reversed.begin() + track);
}
// ----------------------------------------------------------------------------
irr::core::stringw GrandPrixData::getRandomGPName()
{
return _("Random Grand Prix");
}
// ----------------------------------------------------------------------------
/** @return the (potentially translated) user-visible name of the Grand
* Prix, m_editable is true if it's custom GP name. */
irr::core::stringw GrandPrixData::getName() const
{
return m_editable ? m_name.c_str() : _(m_name.c_str());
}
/* EOF */

View File

@ -24,8 +24,6 @@
#include <string>
#include <vector>
#include "utils/translation.hpp"
using irr::core::stringw;
class Track;
@ -149,9 +147,7 @@ public:
void remove(const unsigned int track);
// -------------------------------------------------------------------------
/** @return the (potentially translated) user-visible name of the Grand
* Prix (apply fribidi as needed) */
irr::core::stringw getName() const { return m_editable ? m_name.c_str() : _LTR(m_name.c_str()); }
irr::core::stringw getName() const;
// -------------------------------------------------------------------------
/** @return the internal indentifier of the Grand Prix (not translated) */
@ -171,7 +167,7 @@ public:
enum GPReverseType getReverseType()
const { return m_reverse_type; }
static const char* getRandomGPID() { return "random"; }
static irr::core::stringw getRandomGPName() { return _LTR("Random Grand Prix"); }
static irr::core::stringw getRandomGPName();
}; // GrandPrixData
#endif

View File

@ -60,6 +60,7 @@
#include "states_screens/state_manager.hpp"
#include "tracks/track_manager.hpp"
#include "utils/ptr_vector.hpp"
#include "utils/string_utils.hpp"
RaceManager* race_manager= NULL;
@ -1129,3 +1130,46 @@ void RaceManager::clearNetworkGrandPrixResult()
m_reverse_track.clear();
} // clearNetworkGrandPrixResult
//-----------------------------------------------------------------------------
/** Returns a (translated) name of a minor race mode.
* \param mode Minor race mode.
*/
const core::stringw RaceManager::getNameOf(const MinorRaceModeType mode)
{
switch (mode)
{
//I18N: Game mode
case MINOR_MODE_NORMAL_RACE: return _("Normal Race");
//I18N: Game mode
case MINOR_MODE_TIME_TRIAL: return _("Time Trial");
//I18N: Game mode
case MINOR_MODE_FOLLOW_LEADER: return _("Follow the Leader");
//I18N: Game mode
case MINOR_MODE_3_STRIKES: return _("3 Strikes Battle");
//I18N: Game mode
case MINOR_MODE_FREE_FOR_ALL: return _("Free-For-All");
//I18N: Game mode
case MINOR_MODE_CAPTURE_THE_FLAG: return _("Capture The Flag");
//I18N: Game mode
case MINOR_MODE_EASTER_EGG: return _("Egg Hunt");
//I18N: Game mode
case MINOR_MODE_SOCCER: return _("Soccer");
default: assert(false); return L"";
}
} // getNameOf
//-----------------------------------------------------------------------------
/** Returns the specified difficulty as a string. */
core::stringw RaceManager::getDifficultyName(Difficulty diff) const
{
switch (diff)
{
case RaceManager::DIFFICULTY_EASY: return _("Novice"); break;
case RaceManager::DIFFICULTY_MEDIUM: return _("Intermediate"); break;
case RaceManager::DIFFICULTY_HARD: return _("Expert"); break;
case RaceManager::DIFFICULTY_BEST: return _("SuperTux"); break;
default: assert(false);
}
return "";
} // getDifficultyName

View File

@ -176,33 +176,7 @@ public:
} // getIconOf
// ------------------------------------------------------------------------
/** Returns a (translated) name of a minor race mode.
* \param mode Minor race mode.
*/
static const core::stringw getNameOf(const MinorRaceModeType mode)
{
switch (mode)
{
//I18N: Game mode
case MINOR_MODE_NORMAL_RACE: return _("Normal Race");
//I18N: Game mode
case MINOR_MODE_TIME_TRIAL: return _("Time Trial");
//I18N: Game mode
case MINOR_MODE_FOLLOW_LEADER: return _("Follow the Leader");
//I18N: Game mode
case MINOR_MODE_3_STRIKES: return _("3 Strikes Battle");
//I18N: Game mode
case MINOR_MODE_FREE_FOR_ALL: return _("Free-For-All");
//I18N: Game mode
case MINOR_MODE_CAPTURE_THE_FLAG: return _("Capture The Flag");
//I18N: Game mode
case MINOR_MODE_EASTER_EGG: return _("Egg Hunt");
//I18N: Game mode
case MINOR_MODE_SOCCER: return _("Soccer");
default: assert(false); return L"";
}
} // getNameOf
static const core::stringw getNameOf(const MinorRaceModeType mode);
// ------------------------------------------------------------------------
/** Returns if the currently set minor game mode can be used by the AI. */
bool hasAI()
@ -601,19 +575,7 @@ public:
} // getDifficultyAsString
// ------------------------------------------------------------------------
/** Returns the specified difficulty as a string. */
core::stringw getDifficultyName(Difficulty diff) const
{
switch (diff)
{
case RaceManager::DIFFICULTY_EASY: return _("Novice"); break;
case RaceManager::DIFFICULTY_MEDIUM: return _("Intermediate"); break;
case RaceManager::DIFFICULTY_HARD: return _("Expert"); break;
case RaceManager::DIFFICULTY_BEST: return _("SuperTux"); break;
default: assert(false);
}
return "";
} // getDifficultyName
core::stringw getDifficultyName(Difficulty diff) const;
// ------------------------------------------------------------------------
const std::string& getTrackName() const { return m_tracks[m_track_number];}
// ------------------------------------------------------------------------

View File

@ -26,6 +26,7 @@
#include "race/race_manager.hpp"
#include "tracks/track.hpp"
#include "tracks/track_manager.hpp"
#include "utils/string_utils.hpp"
#include <irrlicht.h>
#include <stdio.h>

View File

@ -34,6 +34,8 @@
#include "physics/btKart.hpp"
#include "race/race_manager.hpp"
#include "tracks/track.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <algorithm>
#include <stdio.h>

View File

@ -28,6 +28,7 @@
#include "tracks/track.hpp"
#include "tracks/track_object.hpp"
#include "tracks/track_object_manager.hpp"
#include "utils/string_utils.hpp"
#include <angelscript.h>
#include "scriptarray.hpp"

View File

@ -37,6 +37,7 @@
#include "tracks/track.hpp"
#include "tracks/track_object.hpp"
#include "tracks/track_object_manager.hpp"
#include "utils/string_utils.hpp"
#include <IBillboardTextSceneNode.h>
#include <angelscript.h>

View File

@ -29,6 +29,7 @@
#include "tracks/track.hpp"
#include "tracks/track_object.hpp"
#include "tracks/track_object_manager.hpp"
#include "utils/string_utils.hpp"
#include <angelscript.h>

View File

@ -30,8 +30,9 @@
#include "states_screens/dialogs/addons_loading.hpp"
#include "states_screens/dialogs/message_dialog.hpp"
#include "states_screens/state_manager.hpp"
#include "utils/translation.hpp"
#include "utils/string_utils.hpp"
#include "utils/ptr_vector.hpp"
#include "utils/translation.hpp"
#include <iostream>

View File

@ -29,6 +29,7 @@
#include "tracks/track.hpp"
#include "tracks/track_manager.hpp"
#include "utils/random_generator.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <iostream>

View File

@ -26,6 +26,7 @@
#include "guiengine/widgets/list_widget.hpp"
#include "guiengine/widgets/ribbon_widget.hpp"
#include "states_screens/state_manager.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <IGUIEnvironment.h>

View File

@ -28,6 +28,8 @@
#include "guiengine/widgets.hpp"
#include "input/input_manager.hpp"
#include "io/file_manager.hpp"
#include "online/request_manager.hpp"
#include "online/xml_request.hpp"
#include "states_screens/addons_screen.hpp"
#include "states_screens/dialogs/message_dialog.hpp"
#include "states_screens/dialogs/vote_dialog.hpp"
@ -169,18 +171,18 @@ void AddonsLoading::beforeAddingWidgets()
float f = ((int)(n/1024.0f/1024.0f*10.0f+0.5f))/10.0f;
char s[32];
sprintf(s, "%.1f", f);
unit = _LTR("%s MB", s);
unit = _("%s MB", s);
}
else if(n>1024)
{
float f = ((int)(n/1024.0f*10.0f+0.5f))/10.0f;
char s[32];
sprintf(s, "%.1f", f);
unit = _LTR("%s KB", s);
unit = _("%s KB", s);
}
else
// Anything smaller just let it be 1 KB
unit = _LTR("%s KB", 1);
unit = _("%s KB", 1);
core::stringw size = _("Size: %s", unit.c_str());
getWidget<LabelWidget>("size")->setText(size, false);
#endif

View File

@ -21,9 +21,10 @@
#include "config/player_manager.hpp"
#include "guiengine/engine.hpp"
#include "guiengine/widgets.hpp"
#include "online/xml_request.hpp"
#include "states_screens/state_manager.hpp"
#include "utils/translation.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <IGUIEnvironment.h>
#include <irrString.h>

View File

@ -24,6 +24,8 @@
#include "utils/translation.hpp"
#include "graphics/central_settings.hpp"
#include "graphics/irr_driver.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <IGUIEnvironment.h>

View File

@ -28,6 +28,8 @@
#include "states_screens/state_manager.hpp"
#include "tracks/track.hpp"
#include "tracks/track_manager.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
using namespace GUIEngine;
using namespace irr::core;

View File

@ -29,6 +29,8 @@
#include "guiengine/widgets/model_view_widget.hpp"
#include "guiengine/widgets/spinner_widget.hpp"
#include "states_screens/state_manager.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
using namespace GUIEngine;

View File

@ -21,6 +21,7 @@
#include "guiengine/widgets/ribbon_widget.hpp"
#include "modes/world.hpp"
#include "states_screens/state_manager.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
using namespace GUIEngine;

View File

@ -40,6 +40,7 @@
#include "states_screens/race_setup_screen.hpp"
#include "states_screens/options/options_screen_general.hpp"
#include "states_screens/state_manager.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
using namespace GUIEngine;

View File

@ -21,6 +21,7 @@
#include "config/player_manager.hpp"
#include "guiengine/widgets/label_widget.hpp"
#include "io/xml_node.hpp"
#include "online/xml_request.hpp"
#include <memory>

View File

@ -20,6 +20,7 @@
#include "audio/sfx_manager.hpp"
#include "config/player_manager.hpp"
#include "guiengine/engine.hpp"
#include "online/xml_request.hpp"
#include "states_screens/state_manager.hpp"
#include "utils/translation.hpp"
#include "utils/string_utils.hpp"

View File

@ -35,6 +35,8 @@
#include "tracks/track_manager.hpp"
#include "tracks/track.hpp"
#include "utils/log.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
using namespace GUIEngine;

View File

@ -25,6 +25,8 @@
#include "network/protocols/lobby_protocol.hpp"
#include "network/stk_host.hpp"
#include "states_screens/state_manager.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
using namespace GUIEngine;

View File

@ -31,6 +31,7 @@
#include "guiengine/widgets/spinner_widget.hpp"
#include "network/network_config.hpp"
#include "states_screens/online/networking_lobby.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <IGUIEnvironment.h>

View File

@ -21,10 +21,12 @@
#include "guiengine/dialog_queue.hpp"
#include "guiengine/engine.hpp"
#include "online/online_profile.hpp"
#include "online/xml_request.hpp"
#include "states_screens/online/online_profile_achievements.hpp"
#include "states_screens/online/online_profile_friends.hpp"
#include "states_screens/state_manager.hpp"
#include "utils/translation.hpp"
#include "utils/string_utils.hpp"
#include <IGUIEnvironment.h>

View File

@ -21,9 +21,10 @@
#include "audio/sfx_manager.hpp"
#include "config/player_manager.hpp"
#include "guiengine/engine.hpp"
#include "online/xml_request.hpp"
#include "states_screens/state_manager.hpp"
#include "utils/translation.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <IGUIEnvironment.h>

View File

@ -29,6 +29,7 @@
#include "states_screens/track_info_screen.hpp"
#include "tracks/track.hpp"
#include "tracks/track_manager.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <iostream>

View File

@ -28,7 +28,8 @@
#include "states_screens/state_manager.hpp"
#include "tracks/track.hpp"
#include "tracks/track_manager.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
using namespace GUIEngine;
@ -253,7 +254,7 @@ void EditGPScreen::loadList(const int selected)
m_icons.push_back(m_icon_bank->addTextureAsSprite(screenShot));
row.push_back(GUIEngine::ListWidget::ListCell(
_LTR(m_gp->getTrackName(i).c_str()), m_icons[i], 3, false));
_(m_gp->getTrackName(i).c_str()), m_icons[i], 3, false));
row.push_back(GUIEngine::ListWidget::ListCell(
StringUtils::toWString<unsigned int>(m_gp->getLaps(i)), -1, 1, true));
row.push_back(GUIEngine::ListWidget::ListCell(

View File

@ -26,7 +26,8 @@
#include "states_screens/state_manager.hpp"
#include "tracks/track.hpp"
#include "tracks/track_manager.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
using namespace GUIEngine;
using namespace irr::core;

View File

@ -45,6 +45,7 @@
#include "states_screens/state_manager.hpp"
#include "tracks/track.hpp"
#include "tracks/track_manager.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <IAnimatedMeshSceneNode.h>

View File

@ -29,6 +29,7 @@
#include "states_screens/online/tracks_screen.hpp"
#include "tracks/track.hpp"
#include "tracks/track_manager.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
using namespace GUIEngine;

View File

@ -37,6 +37,7 @@
#include "states_screens/state_manager.hpp"
#include "tracks/track.hpp"
#include "tracks/track_manager.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <IGUIEnvironment.h>

View File

@ -25,6 +25,8 @@
#include "states_screens/grand_prix_editor_screen.hpp"
#include "states_screens/dialogs/general_text_field_dialog.hpp"
#include "tracks/track_manager.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <string>
#include <vector>

View File

@ -31,6 +31,7 @@
#include "states_screens/dialogs/general_text_field_dialog.hpp"
#include "tracks/track.hpp"
#include "tracks/track_manager.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
using namespace GUIEngine;

View File

@ -43,6 +43,7 @@
#include "tracks/track.hpp"
#include "tracks/track_object.hpp"
#include "tracks/track_object_manager.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
#include <ISceneManager.h>

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