diff --git a/creatureui.cpp b/creatureui.cpp index 085d5988..615720fd 100644 --- a/creatureui.cpp +++ b/creatureui.cpp @@ -115,7 +115,6 @@ void CreatureUI::Blit(int x, int y, float scale, int map_x, int map_y) const g_engine->drawRectangleLines(x + walkoffx, y + walkoffy, 32*scale, 32*scale, oRGBA(0,0,0,0)); } - // FIXME (nfries88): RGBA colors aren't as expected for me. //Pink square around the attacked creature if(n->getID() == GlobalVariables::getAttackID()) { // "Deep Pink" - may not be the right color diff --git a/engine.cpp b/engine.cpp index dcd0034b..d095a3b6 100644 --- a/engine.cpp +++ b/engine.cpp @@ -222,7 +222,6 @@ void Engine::drawText(const char* text, const char* font, int x, int y, oRGBA co { if (color.r == color.g && color.g == color.b && color.b == 1.) { - f->resetColor(); } else diff --git a/mapui.cpp b/mapui.cpp index 8e80e2b1..b00b12cc 100644 --- a/mapui.cpp +++ b/mapui.cpp @@ -69,14 +69,15 @@ void MapUI::renderMap() //TODO: center game area horizontally (cipsoft's client does this) // FIXME (ivucica#2#) make renderMap use m_x,m_y and m_w,m_h - // set up scale if(!options.stretchGameWindow) m_scale = MIN(m_w/(15.*32), m_h/(11.*32)); else m_scale = 1.f; -// printf("m_w: %d, m_h: %d, m_scale: %g\n", m_w, m_h, m_scale); - float scaledSize = 32*m_scale; + // NOTE (nfries88): By flooring scaledSize, we assure a full pixel value for scaledSize. + // by then setting m_scale to this full pixel value / 32, we assure that all things are scaled equally. + float scaledSize = std::floor(32*m_scale); + m_scale = scaledSize/32; m_x = -scaledSize*2; m_y = -scaledSize*2; g_engine->setClipping(/*scaledSize*2 + m_x,scaledSize*2 + m_y,*/0,0,15*scaledSize,11*scaledSize); diff --git a/ui/charlist.h b/ui/charlist.h index 6e420dd7..80e8bce7 100644 --- a/ui/charlist.h +++ b/ui/charlist.h @@ -163,30 +163,29 @@ class winCharlist_t { std::stringstream s; s << chr.name << " (" << chr.world << ")"; - // FIXME (ivucica#5#) change "res" into "pnl" - glictPanel *res = new glictPanel; + glictPanel *pnl = new glictPanel; CharacterList_t *data = new CharacterList_t; *data = chr; data->extra = this; - res->SetBGActiveness(false); - res->SetBGColor(.4,.4,.4,1.); - res->SetOnClick(winCharlist_t::OnListbox); - res->SetCustomData(data); - res->SetCaption(s.str()); - res->SetFont("aafont"); - res->SetFocusable(false); + pnl->SetBGActiveness(false); + pnl->SetBGColor(.4,.4,.4,1.); + pnl->SetOnClick(winCharlist_t::OnListbox); + pnl->SetCustomData(data); + pnl->SetCaption(s.str()); + pnl->SetFont("aafont"); + pnl->SetFocusable(false); #if GLICT_APIREV < 68 #warning Aesthetic corrections on listboxes wont work without GLICT of apirev 68+ #else - res->SetTextOffset(4,2); + pnl->SetTextOffset(4,2); #endif - lsiChars.push_back(res); - lstChars.AddObject(res); + lsiChars.push_back(pnl); + lstChars.AddObject(pnl); if (lsiChars.size() == 1) { - OnListbox(NULL, res); + OnListbox(NULL, pnl); } }