From c2efedab22275302f0a10cc197424d345a021d18 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 17 Jun 2012 20:13:48 +0300 Subject: Replace SDL int types to C++ types. --- src/gui/gui.cpp | 2 +- src/gui/npcdialog.cpp | 1 + src/gui/sdlfont.cpp | 6 +++--- src/gui/viewport.cpp | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) (limited to 'src/gui') diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index feabd79d5..f513c31a1 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -368,7 +368,7 @@ void Gui::draw() getTop()->draw(mGraphics); int mouseX, mouseY; - Uint8 button = SDL_GetMouseState(&mouseX, &mouseY); + uint8_t button = SDL_GetMouseState(&mouseX, &mouseY); if ((SDL_GetAppState() & SDL_APPMOUSEFOCUS || button & SDL_BUTTON(1)) && mMouseCursors && mCustomCursor && mMouseCursorAlpha > 0.0f) diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp index c5143a136..e67213bd8 100644 --- a/src/gui/npcdialog.cpp +++ b/src/gui/npcdialog.cpp @@ -220,6 +220,7 @@ void NpcDialog::showCloseButton() void NpcDialog::action(const gcn::ActionEvent &event) { + logger->log(event.getId()); if (event.getId() == "ok") { if (mActionState == NPC_ACTION_NEXT) diff --git a/src/gui/sdlfont.cpp b/src/gui/sdlfont.cpp index b623337eb..e1310ef2e 100644 --- a/src/gui/sdlfont.cpp +++ b/src/gui/sdlfont.cpp @@ -69,9 +69,9 @@ class SDLTextChunk void generate(TTF_Font *font, float alpha) { SDL_Color sdlCol; - sdlCol.b = static_cast(color.b); - sdlCol.r = static_cast(color.r); - sdlCol.g = static_cast(color.g); + sdlCol.b = static_cast(color.b); + sdlCol.r = static_cast(color.r); + sdlCol.g = static_cast(color.g); getSafeUtf8String(text, strBuf); diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 2a69428b4..c2429c550 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -284,12 +284,12 @@ void Viewport::logic() void Viewport::_followMouse() { - Uint8 button = SDL_GetMouseState(&mMouseX, &mMouseY); + uint8_t button = SDL_GetMouseState(&mMouseX, &mMouseY); // If the left button is dragged if (mPlayerFollowMouse && button & SDL_BUTTON(1)) { // We create a mouse event and send it to mouseDragged. - Uint8 *keys = SDL_GetKeyState(nullptr); + uint8_t *keys = SDL_GetKeyState(nullptr); gcn::MouseEvent mouseEvent(nullptr, (keys[SDLK_LSHIFT] || keys[SDLK_RSHIFT]), false, -- cgit v1.2.3-70-g09d2