summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-02 21:38:23 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-02 21:40:43 +0300
commit4cffca0da71771d0d51ba4cd4842d2d93aa2946e (patch)
tree99b974a5bab64174ebd29ef7a4761caef01acec8 /src/gui
parent1dab21b236d76900f3ddd2be32f9590aef394c2d (diff)
downloadplus-4cffca0da71771d0d51ba4cd4842d2d93aa2946e.tar.gz
plus-4cffca0da71771d0d51ba4cd4842d2d93aa2946e.tar.bz2
plus-4cffca0da71771d0d51ba4cd4842d2d93aa2946e.tar.xz
plus-4cffca0da71771d0d51ba4cd4842d2d93aa2946e.zip
Fix some conversions.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/charcreatedialog.cpp3
-rw-r--r--src/gui/minimap.cpp8
-rw-r--r--src/gui/npcdialog.cpp2
-rw-r--r--src/gui/npcdialog.h2
-rw-r--r--src/gui/questswindow.cpp4
-rw-r--r--src/gui/whoisonline.cpp4
6 files changed, 12 insertions, 11 deletions
diff --git a/src/gui/charcreatedialog.cpp b/src/gui/charcreatedialog.cpp
index 37839c7ee..d029b7083 100644
--- a/src/gui/charcreatedialog.cpp
+++ b/src/gui/charcreatedialog.cpp
@@ -96,7 +96,8 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
mCreateButton(new Button(_("Create"), "create", this)),
mCancelButton(new Button(_("Cancel"), "cancel", this)),
mRace(0),
- mPlayer(new Being(0, ActorSprite::PLAYER, mRace, nullptr)),
+ mPlayer(new Being(0, ActorSprite::PLAYER, static_cast<uint16_t>(mRace),
+ nullptr)),
mPlayerBox(new PlayerBox(mPlayer, "charcreate_playerbox.xml")),
mSlot(slot),
mAction(0),
diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp
index 5ed18f84e..1289fcd40 100644
--- a/src/gui/minimap.cpp
+++ b/src/gui/minimap.cpp
@@ -228,11 +228,11 @@ void Minimap::draw(gcn::Graphics *graphics)
mMapImage->mBounds.h > a.height)
{
const Vector &p = player_node->getPosition();
- mMapOriginX = (a.width / 2) - (static_cast<float>(p.x
- + viewport->getCameraRelativeX()) * mWidthProportion) / 32;
+ mMapOriginX = (a.width / 2) - (p.x + static_cast<float>(
+ viewport->getCameraRelativeX()) * mWidthProportion) / 32;
- mMapOriginY = (a.height / 2) - (static_cast<float>(p.y
- + viewport->getCameraRelativeY()) * mHeightProportion) / 32;
+ mMapOriginY = (a.height / 2) - (p.y + static_cast<float>(
+ viewport->getCameraRelativeY()) * mHeightProportion) / 32;
const int minOriginX = a.width - mMapImage->mBounds.w;
const int minOriginY = a.height - mMapImage->mBounds.h;
diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp
index 35c219846..57501a35f 100644
--- a/src/gui/npcdialog.cpp
+++ b/src/gui/npcdialog.cpp
@@ -690,7 +690,7 @@ void NpcDialog::restoreCamera()
mCameraMode = -1;
}
-void NpcDialog::showAvatar(const int avatarId)
+void NpcDialog::showAvatar(const uint16_t avatarId)
{
const bool needShow = (avatarId != 0);
if (needShow)
diff --git a/src/gui/npcdialog.h b/src/gui/npcdialog.h
index 86b6bdabd..be021d50f 100644
--- a/src/gui/npcdialog.h
+++ b/src/gui/npcdialog.h
@@ -192,7 +192,7 @@ class NpcDialog final : public Window, public gcn::ActionListener,
void refocus();
- void showAvatar(const int avatarId);
+ void showAvatar(const uint16_t avatarId);
void setAvatarDirection(const uint8_t direction);
diff --git a/src/gui/questswindow.cpp b/src/gui/questswindow.cpp
index 66a7d50cf..c9e05cd14 100644
--- a/src/gui/questswindow.cpp
+++ b/src/gui/questswindow.cpp
@@ -331,9 +331,9 @@ void QuestsWindow::rebuild(const bool playSound)
}
if (updatedQuest == -1)
- updatedQuest = mQuestLinks.size() - 1;
+ updatedQuest = static_cast<int>(mQuestLinks.size() - 1);
else if (updatedQuest >= static_cast<int>(mQuestLinks.size()))
- updatedQuest = mQuestLinks.size() - 1;
+ updatedQuest = static_cast<int>(mQuestLinks.size() - 1);
if (updatedQuest >= 0)
{
mQuestsListBox->setSelected(updatedQuest);
diff --git a/src/gui/whoisonline.cpp b/src/gui/whoisonline.cpp
index d3fcfa451..b522b8157 100644
--- a/src/gui/whoisonline.cpp
+++ b/src/gui/whoisonline.cpp
@@ -409,8 +409,8 @@ void WhoIsOnline::loadWebList()
if (!mShowLevel)
level = 0;
- OnlinePlayer *player = new OnlinePlayer(nick, 255, level,
- GENDER_UNSPECIFIED, -1);
+ OnlinePlayer *player = new OnlinePlayer(nick,
+ static_cast<char>(255), level, GENDER_UNSPECIFIED, -1);
mOnlinePlayers.insert(player);
mOnlineNicks.insert(nick);