commit
95c59b8d51
@ -114,7 +114,7 @@ Achievement * AchievementsStatus::getAchievement(uint32_t id)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
/** Synchronises the achievements between local and online usage. It takes
|
||||
* the list of online achievements, and marks them all to be achieved
|
||||
* the list of online achievements, and marks them all to be achieved
|
||||
* locally. Then it issues 'achieved' requests to the server for all local
|
||||
* achievements that are not set online.
|
||||
*/
|
||||
|
@ -87,7 +87,7 @@ public:
|
||||
|
||||
// ============================================================================
|
||||
/** List of all messages. */
|
||||
std::priority_queue<Message*, std::vector<Message*>,
|
||||
std::priority_queue<Message*, std::vector<Message*>,
|
||||
CompareMessages> g_all_messages;
|
||||
|
||||
/** How long the current message has been displayed. The special value
|
||||
@ -139,7 +139,7 @@ void add(MessageType mt, const irr::core::stringw &message)
|
||||
} // add
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
/** Update function called from the GUIEngine to handle displaying of the
|
||||
/** Update function called from the GUIEngine to handle displaying of the
|
||||
* messages. It will make sure that each message is shown for a certain
|
||||
* amount of time, before it is discarded and the next message (if any)
|
||||
* is displayed.
|
||||
@ -166,7 +166,7 @@ void update(float dt)
|
||||
}
|
||||
|
||||
Message *current = g_all_messages.top();
|
||||
GUIEngine::getSkin()->drawMessage(g_container, g_area,
|
||||
GUIEngine::getSkin()->drawMessage(g_container, g_area,
|
||||
current->getRenderType());
|
||||
gui::ScalableFont *font = GUIEngine::getFont();
|
||||
|
||||
|
@ -322,7 +322,7 @@ namespace Online
|
||||
|
||||
// Check if we are asked to abort the download. If so, signal this
|
||||
// back to libcurl by returning a non-zero status.
|
||||
if( (request_manager->getAbort() || request->isCancelled()) &&
|
||||
if( (request_manager->getAbort() || request->isCancelled()) &&
|
||||
request->isAbortable() )
|
||||
{
|
||||
// Indicates to abort the current download, which means that this
|
||||
|
@ -196,7 +196,7 @@ namespace Online
|
||||
// Even if no achievements were sent, we have to call sync
|
||||
// in order to upload local achievements to the server
|
||||
input->get("achieved", &achieved_string);
|
||||
std::vector<uint32_t> achieved_ids =
|
||||
std::vector<uint32_t> achieved_ids =
|
||||
StringUtils::splitToUInt(achieved_string, ' ');
|
||||
PlayerManager::getCurrentAchievementsStatus()->sync(achieved_ids);
|
||||
m_profile->fetchFriends();
|
||||
|
@ -220,7 +220,7 @@ namespace Online
|
||||
} // while
|
||||
|
||||
// Signal that the request manager can now be deleted.
|
||||
// We signal this even before cleaning up memory, since there's no
|
||||
// We signal this even before cleaning up memory, since there's no
|
||||
// need to keep the user waiting for STK to exit.
|
||||
me->setCanBeDeleted();
|
||||
|
||||
|
@ -67,7 +67,7 @@ namespace Online
|
||||
* manager which might be accessed if a download just finished before the
|
||||
* abort). On executing the quit request, the request manager will set
|
||||
* a flag that it is ready to be deleted (using the CanBeDeleted class).
|
||||
* The main thread will wait for a certain amount of time for the
|
||||
* The main thread will wait for a certain amount of time for the
|
||||
* RequestManager to be ready to be deleted (i.e. the sign-out and quit
|
||||
* request have been processes), before deleting the RequestManager.
|
||||
* Typically the RequestManager will finish while the rest of stk is
|
||||
|
@ -84,7 +84,7 @@ Physics::~Physics()
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
/** Adds a kart to the physics engine.
|
||||
* This adds the rigid body and the vehicle but only if the kart is not
|
||||
* This adds the rigid body and the vehicle but only if the kart is not
|
||||
* already in the physics world.
|
||||
* \param kart The kart to add.
|
||||
* \param vehicle The raycast vehicle object.
|
||||
|
@ -304,7 +304,7 @@ bool TriangleMesh::castRay(const btVector3 &from, const btVector3 &to,
|
||||
|
||||
btCollisionWorld::ClosestRayResultCallback result(from, to);
|
||||
|
||||
/** A special ray result class that stores the index of the triangle
|
||||
/** A special ray result class that stores the index of the triangle
|
||||
* that was hit. */
|
||||
class MaterialRayResult : public btCollisionWorld::ClosestRayResultCallback
|
||||
{
|
||||
@ -351,7 +351,7 @@ bool TriangleMesh::castRay(const btVector3 &from, const btVector3 &to,
|
||||
// the normal of the triangle interpolate the normal at the
|
||||
// hit position based on the three normals of the triangle.
|
||||
if(interpolate_normal)
|
||||
*normal = getInterpolatedNormal(ray_callback.m_index,
|
||||
*normal = getInterpolatedNormal(ray_callback.m_index,
|
||||
ray_callback.m_hitPointWorld);
|
||||
else
|
||||
*normal = ray_callback.m_hitNormalWorld;
|
||||
|
@ -452,7 +452,7 @@ bool UserInfoDialog::onEscapePressed()
|
||||
|
||||
void UserInfoDialog::onUpdate(float dt)
|
||||
{
|
||||
if(m_processing)
|
||||
if(m_processing)
|
||||
m_info_widget->setText(StringUtils::loadingDots(_("Processing")), false);
|
||||
|
||||
//If we want to open the registration dialog, we need to close this one first
|
||||
|
@ -160,8 +160,8 @@ void OnlineProfileAchievements::onUpdate(float delta)
|
||||
if (!m_visiting_profile->isReady())
|
||||
{
|
||||
// This will display an increasing number of dots while waiting.
|
||||
m_achievements_list_widget->renameItem("loading",
|
||||
StringUtils::loadingDots(_("Fetching achievements")));
|
||||
m_achievements_list_widget->renameItem("loading",
|
||||
StringUtils::loadingDots(_("Fetching achievements")));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ void OnlineProfileFriends::init()
|
||||
m_visiting_profile->fetchFriends();
|
||||
m_waiting_for_friends = true;
|
||||
m_friends_list_widget->clear();
|
||||
m_friends_list_widget->addItem("loading",
|
||||
m_friends_list_widget->addItem("loading",
|
||||
StringUtils::loadingDots(_("Fetching friends")));
|
||||
} // init
|
||||
|
||||
|
@ -275,7 +275,7 @@ void OnlineUserSearch::onUpdate(float dt)
|
||||
}
|
||||
else
|
||||
{
|
||||
m_user_list_widget->renameItem("loading",
|
||||
m_user_list_widget->renameItem("loading",
|
||||
StringUtils::loadingDots(_("Searching")) );
|
||||
}
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ private:
|
||||
/** Height of the digit font. */
|
||||
int m_font_height;
|
||||
|
||||
/** Animation state: none, getting smaller (old value),
|
||||
/** Animation state: none, getting smaller (old value),
|
||||
* getting bigger (new number). */
|
||||
enum AnimationState {AS_NONE, AS_SMALLER, AS_BIGGER};
|
||||
std::vector<AnimationState> m_animation_states;
|
||||
|
@ -89,7 +89,7 @@ void RegisterScreen::init()
|
||||
getWidget<CheckBoxWidget>("online")->setVisible(true);
|
||||
getWidget<LabelWidget>("label_online")->setVisible(true);
|
||||
onDialogClose();
|
||||
bool online = UserConfigParams::m_internet_status
|
||||
bool online = UserConfigParams::m_internet_status
|
||||
!= Online::RequestManager::IPERM_NOT_ALLOWED;
|
||||
getWidget<CheckBoxWidget>("online")->setState(online);
|
||||
makeEntryFieldsVisible(online);
|
||||
@ -108,7 +108,7 @@ void RegisterScreen::setRename(PlayerProfile *player)
|
||||
*/
|
||||
void RegisterScreen::onDialogClose()
|
||||
{
|
||||
bool online = UserConfigParams::m_internet_status
|
||||
bool online = UserConfigParams::m_internet_status
|
||||
!= Online::RequestManager::IPERM_NOT_ALLOWED;
|
||||
getWidget<CheckBoxWidget>("online")->setState(online);
|
||||
makeEntryFieldsVisible(online);
|
||||
|
@ -57,7 +57,7 @@ void TerrainInfo::update(const Vec3 &from)
|
||||
to.setY(-10000.0f);
|
||||
|
||||
const TriangleMesh &tm = World::getWorld()->getTrack()->getTriangleMesh();
|
||||
tm.castRay(from, to, &m_hit_point, &m_material, &m_normal,
|
||||
tm.castRay(from, to, &m_hit_point, &m_material, &m_normal,
|
||||
/*interpolate*/false);
|
||||
} // update
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -54,9 +54,9 @@ public:
|
||||
Log::verbose("Thread", "Start waiting %lf", start);
|
||||
while(1)
|
||||
{
|
||||
if(m_can_be_deleted.getAtomic())
|
||||
if(m_can_be_deleted.getAtomic())
|
||||
{
|
||||
Log::verbose("Thread",
|
||||
Log::verbose("Thread",
|
||||
"Waited %lf seconds for thread to become deleteable.",
|
||||
StkTime::getRealTime()-start);
|
||||
Log::verbose("Thread", "Stop waiting %lf", StkTime::getRealTime());
|
||||
@ -67,7 +67,7 @@ public:
|
||||
{
|
||||
Log::verbose("Thread", "Stop waiting %lf", StkTime::getRealTime());
|
||||
Log::verbose("Thread", "Waited for more than %f seconds for "
|
||||
"thread to become deleteable",
|
||||
"thread to become deleteable",
|
||||
waiting_time);
|
||||
return false;
|
||||
}
|
||||
@ -76,4 +76,4 @@ public:
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
}; // CanBeDeleted
|
||||
#endif
|
||||
#endif
|
||||
|
@ -531,9 +531,9 @@ namespace StringUtils
|
||||
*/
|
||||
irr::core::stringw loadingDots(float interval, int max_dots)
|
||||
{
|
||||
int nr_dots = int(floor(StkTime::getRealTime() / interval))
|
||||
int nr_dots = int(floor(StkTime::getRealTime() / interval))
|
||||
% (max_dots + 1);
|
||||
return irr::core::stringw((std::string(nr_dots, '.') +
|
||||
return irr::core::stringw((std::string(nr_dots, '.') +
|
||||
std::string(max_dots - nr_dots, ' ')).c_str());
|
||||
} // loadingDots
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user