Remove compiler warnings
This commit is contained in:
parent
007f611c10
commit
7538f36bed
@ -387,8 +387,6 @@ void EventHandler::deallocate()
|
||||
// -----------------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
const bool NAVIGATION_DEBUG = false;
|
||||
|
||||
#if 0
|
||||
#pragma mark -
|
||||
#pragma mark Private methods
|
||||
|
@ -912,19 +912,19 @@ void Skin::drawRibbon(const core::recti &rect, Widget* widget,
|
||||
{
|
||||
} // drawRibbon
|
||||
|
||||
SColorf GetPlayerColor(int player_id)
|
||||
// ----------------------------------------------------------------------------
|
||||
SColorf Skin::getPlayerColor(int player_id)
|
||||
{
|
||||
|
||||
SColorHSL col = { 0,100,50 };
|
||||
col.Hue += (360 / 4) * (player_id % 4);
|
||||
int color_id = player_id % 4;
|
||||
SColorf color_rgb = { 0,0,0,1 };
|
||||
|
||||
|
||||
col.Saturation = col.Saturation * (1.0f / (floorf(float(player_id / 4)) + 1) );
|
||||
|
||||
col.Saturation = col.Saturation *
|
||||
(1.0f / (floorf(float(player_id / 4)) + 1));
|
||||
col.toRGB(color_rgb);
|
||||
return color_rgb;
|
||||
}
|
||||
} // getPlayerColor
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
/**
|
||||
* @param focused whether this element is focus by the master player (whether
|
||||
@ -1209,7 +1209,7 @@ void Skin::drawRibbonChild(const core::recti &rect, Widget* widget,
|
||||
short green_previous = parentRibbonWidget->m_skin_g;
|
||||
short blue_previous = parentRibbonWidget->m_skin_b;
|
||||
|
||||
SColorf color_rgb = GetPlayerColor(i);
|
||||
SColorf color_rgb = getPlayerColor(i);
|
||||
|
||||
parentRibbonWidget->m_skin_r = short(color_rgb.r * 255.0f);
|
||||
parentRibbonWidget->m_skin_g = short(color_rgb.g * 255.0f);
|
||||
@ -1304,7 +1304,7 @@ void Skin::drawSpinnerBody(const core::recti &rect, Widget* widget,
|
||||
params = &SkinConfig::m_render_params[
|
||||
"spinner::deactivated"];
|
||||
|
||||
color_rgb = GetPlayerColor(player_id);
|
||||
color_rgb = getPlayerColor(player_id);
|
||||
|
||||
texture = "squareFocusHaloBW::neutral";
|
||||
}
|
||||
|
@ -316,7 +316,7 @@ namespace GUIEngine
|
||||
const bool pressed, const bool bottomArrow);
|
||||
|
||||
void drawTooltip(Widget* widget, bool atMouse);
|
||||
|
||||
irr::video::SColorf getPlayerColor(int player_id);
|
||||
|
||||
public:
|
||||
|
||||
|
2
src/karts/controller/network_player_controller.hpp
Executable file → Normal file
2
src/karts/controller/network_player_controller.hpp
Executable file → Normal file
@ -49,7 +49,7 @@ public:
|
||||
* latency the predicted path will curve way too much. By automatically
|
||||
* reducing it, this error is reduced. And even if the player steers more
|
||||
* the error is hopefully acceptable. */
|
||||
virtual void update(int ticks)
|
||||
virtual void update(int ticks) OVERRIDE
|
||||
{
|
||||
PlayerController::update(ticks);
|
||||
if (NetworkConfig::get()->isClient())
|
||||
|
@ -81,7 +81,7 @@ void InitAndroidDialog::beforeAddingWidgets()
|
||||
Widget* accelerometer = &control_type->getChildren()[index];
|
||||
accelerometer->setActive(false);
|
||||
|
||||
if (UserConfigParams::m_multitouch_controls = 2)
|
||||
if (UserConfigParams::m_multitouch_controls == 2)
|
||||
{
|
||||
UserConfigParams::m_multitouch_controls = 1;
|
||||
}
|
||||
|
@ -216,9 +216,10 @@ GUIEngine::EventPropagation SelectChallengeDialog::processEvent(const std::strin
|
||||
//StateManager::get()->resetActivePlayers();
|
||||
|
||||
// Use latest used device
|
||||
#ifdef DEBUG
|
||||
InputDevice* device = input_manager->getDeviceManager()->getLatestUsedDevice();
|
||||
assert(device != NULL);
|
||||
|
||||
#endif
|
||||
// Set up race manager appropriately
|
||||
race_manager->setNumPlayers(1);
|
||||
race_manager->setPlayerKart(0, UserConfigParams::m_default_kart);
|
||||
|
@ -69,9 +69,10 @@ void EasterEggScreen::eventCallback(Widget* widget, const std::string& name, con
|
||||
|
||||
if (selection == "random_track")
|
||||
{
|
||||
#ifdef DEBUG
|
||||
RibbonWidget* tabs = this->getWidget<RibbonWidget>("trackgroups");
|
||||
assert( tabs != NULL );
|
||||
|
||||
#endif
|
||||
if (m_random_track_list.empty()) return;
|
||||
|
||||
std::string track = m_random_track_list.front();
|
||||
|
@ -84,8 +84,6 @@ const float KARTS_INITIAL_Z[3] = { 44.9f, 40.9f, 36.9f };
|
||||
|
||||
// Locations for karts to go to, should be the locations of the podiums (End Stage 1)
|
||||
const float KARTS_PODIUM_X[3] = { 20.5f, 20.75f, 21.0f };
|
||||
const float KARTS_PODIUM_Y[3] = {KARTS_INITIAL_Y[0], KARTS_INITIAL_Y[1], KARTS_INITIAL_Y[2]};
|
||||
const float KARTS_PODIUM_Z[3] = {KARTS_INITIAL_Z[0], KARTS_INITIAL_Z[1], KARTS_INITIAL_Z[2]};
|
||||
|
||||
// Rotations for karts to go to in Stage 2
|
||||
const float KARTS_AND_PODIUMS_FINAL_ROTATION[3] = { 270.0f, 270.0f, 270.0f };
|
||||
|
Loading…
Reference in New Issue
Block a user