From d8ddc4236b778a7fc609da8989db388865592108 Mon Sep 17 00:00:00 2001 From: OnionKnight Date: Mon, 17 Aug 2009 17:19:09 +0000 Subject: [PATCH] Shipyard window fixed. --- client/GUIClasses.cpp | 12 ++++++++++-- hch/CObjectHandler.cpp | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/client/GUIClasses.cpp b/client/GUIClasses.cpp index 151951680..1977bc30b 100644 --- a/client/GUIClasses.cpp +++ b/client/GUIClasses.cpp @@ -4118,6 +4118,14 @@ CShipyardWindow::CShipyardWindow(const std::vector &cost, int state, const blitAt(bgtemp, 100, 69, bg); SDL_FreeSurface(bgtemp); + // Draw resource icons and costs. + std::string woodCost = boost::lexical_cast(10); + std::string goldCost = boost::lexical_cast(1000); + blitAt(graphics->resources32->ourImages[0].bitmap, 100, 244, bg); + printAtMiddle(woodCost.c_str(), 116, 290, GEOR13, zwykly, bg); + blitAt(graphics->resources32->ourImages[6].bitmap, 196, 244, bg); + printAtMiddle(goldCost.c_str(), 212, 290, GEOR13, zwykly, bg); + bool affordable = true; for(int i = 0; i < cost.size(); i++) { @@ -4135,6 +4143,6 @@ CShipyardWindow::CShipyardWindow(const std::vector &cost, int state, const if(!affordable) build->block(true); - printAtMiddle(CGI->generaltexth->jktexts[15], 165, 26, GEOR13, zwykly, bg); //Resource cost: - printAtMiddle(CGI->generaltexth->jktexts[14], 165, 218, GEOR16, tytulowy, bg); //Build A New Ship + printAtMiddle(CGI->generaltexth->jktexts[13], 165, 28, GEORXX, tytulowy, bg); //Build A New Ship + printAtMiddle(CGI->generaltexth->jktexts[14], 165, 218, GEOR16, zwykly, bg); //Resource cost: } diff --git a/hch/CObjectHandler.cpp b/hch/CObjectHandler.cpp index b933f197c..04a511923 100644 --- a/hch/CObjectHandler.cpp +++ b/hch/CObjectHandler.cpp @@ -3969,7 +3969,7 @@ IShipyard * IShipyard::castFrom( CGObjectInstance *obj ) } else { - tlog1 << "Cannot cast to IShipyar object with ID " << obj->ID << std::endl; + tlog1 << "Cannot cast to IShipyard object with ID " << obj->ID << std::endl; return NULL; } }