Fixed compiler warnings.
This commit is contained in:
parent
18f14ae142
commit
aa36f7856f
@ -89,7 +89,7 @@ RaceGUI::RaceGUI()
|
||||
else if (UserConfigParams::m_multitouch_enabled)
|
||||
{
|
||||
m_map_left = irr_driver->getActualScreenSize().Width - m_map_width;
|
||||
m_map_bottom = irr_driver->getActualScreenSize().Height * 0.55f;
|
||||
m_map_bottom = int(irr_driver->getActualScreenSize().Height * 0.55f);
|
||||
}
|
||||
|
||||
m_is_tutorial = (race_manager->getTrackName() == "tutorial");
|
||||
@ -912,26 +912,27 @@ void RaceGUI::initMultitouchSteering()
|
||||
const float small_ratio = 0.6f;
|
||||
|
||||
device->addButton(BUTTON_STEERING,
|
||||
0.5f * margin, h - 0.5f * margin - btn2_size,
|
||||
btn2_size, btn2_size);
|
||||
int(0.5f * margin), int(h - 0.5f * margin - btn2_size),
|
||||
int(btn2_size), int(btn2_size));
|
||||
device->addButton(BUTTON_ESCAPE,
|
||||
top_margin, small_ratio * margin,
|
||||
small_ratio * btn_size, small_ratio * btn_size);
|
||||
int(top_margin), int(small_ratio * margin),
|
||||
int(small_ratio * btn_size), int(small_ratio * btn_size));
|
||||
device->addButton(BUTTON_RESCUE,
|
||||
top_margin + small_ratio * col_size, small_ratio * margin,
|
||||
small_ratio * btn_size, small_ratio * btn_size);
|
||||
int(top_margin + small_ratio * col_size),
|
||||
int(small_ratio * margin),
|
||||
int(small_ratio * btn_size), int(small_ratio * btn_size));
|
||||
device->addButton(BUTTON_NITRO,
|
||||
w - 1 * col_size, h - 2 * col_size,
|
||||
btn_size, btn_size);
|
||||
int(w - 1 * col_size), int(h - 2 * col_size),
|
||||
int(btn_size), int(btn_size));
|
||||
device->addButton(BUTTON_SKIDDING,
|
||||
w - 1 * col_size, h - 1 * col_size,
|
||||
btn_size, btn_size);
|
||||
int(w - 1 * col_size), int(h - 1 * col_size),
|
||||
int(btn_size), int(btn_size));
|
||||
device->addButton(BUTTON_FIRE,
|
||||
w - 2 * col_size, h - 2 * col_size,
|
||||
btn_size, btn_size);
|
||||
int(w - 2 * col_size), int(h - 2 * col_size),
|
||||
int(btn_size), int(btn_size));
|
||||
device->addButton(BUTTON_LOOK_BACKWARDS,
|
||||
w - 2 * col_size, h - 1 * col_size,
|
||||
btn_size, btn_size);
|
||||
int(w - 2 * col_size), int(h - 1 * col_size),
|
||||
int(btn_size), int(btn_size));
|
||||
|
||||
} // initMultitouchSteering
|
||||
|
||||
@ -973,8 +974,8 @@ void RaceGUI::drawMultitouchSteering(const AbstractKart* kart,
|
||||
float w = (float)(button->width) / 20.0f;
|
||||
float h = (float)(button->height) / 20.0f;
|
||||
|
||||
core::rect<s32> pos2(round(x - w), round(y - h),
|
||||
round(x + w), round(y + h));
|
||||
core::rect<s32> pos2(int(round(x - w)), int(round(y - h)),
|
||||
int(round(x + w)), int(round(y + h)) );
|
||||
|
||||
draw2DImage(tex, pos2, coords, NULL, NULL, true);
|
||||
}
|
||||
@ -982,10 +983,10 @@ void RaceGUI::drawMultitouchSteering(const AbstractKart* kart,
|
||||
{
|
||||
if (button->pressed)
|
||||
{
|
||||
core::rect<s32> pos2(button->x - button->width * 0.2f,
|
||||
button->y - button->height * 0.2f,
|
||||
button->x + button->width * 1.2f,
|
||||
button->y + button->height * 1.2f);
|
||||
core::rect<s32> pos2(int(button->x - button->width * 0.2f),
|
||||
int(button->y - button->height * 0.2f),
|
||||
int(button->x + button->width * 1.2f),
|
||||
int(button->y + button->height * 1.2f) );
|
||||
|
||||
video::ITexture* tex = irr_driver->getTexture(FileManager::GUI,
|
||||
"icons-frame.png");
|
||||
|
Loading…
x
Reference in New Issue
Block a user