From 34795be130503e46a422a00fc1ad220f27f72144 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Sat, 31 Oct 2009 14:08:01 +0000 Subject: [PATCH] Some more renaming --- include/GameScreens.hpp | 2 +- src/Billboard.cpp | 16 +++--- src/Editor.cpp | 88 ++++++++++++++--------------- src/Game.cpp | 112 ++++++++++++++++++------------------- src/Main.cpp | 14 ++--- src/ModelViewer.cpp | 2 +- src/SmokeTrail.cpp | 28 +++++----- src/gui2/RenderContext.cpp | 4 +- 8 files changed, 133 insertions(+), 133 deletions(-) diff --git a/include/GameScreens.hpp b/include/GameScreens.hpp index 0165010..0cc01d7 100644 --- a/include/GameScreens.hpp +++ b/include/GameScreens.hpp @@ -30,7 +30,7 @@ IScreenPtr makeGameScreen(IMapPtr aMap); IScreenPtr make_ui_demo(); // Access to the window the game is running in -IWindowPtr getGameWindow(); +IWindowPtr get_game_window(); // Add editor GUI controls void addEditorGUI(); diff --git a/src/Billboard.cpp b/src/Billboard.cpp index 24a880e..b53b801 100644 --- a/src/Billboard.cpp +++ b/src/Billboard.cpp @@ -22,7 +22,7 @@ using namespace std; namespace { - Vector theCameraPosition; + Vector camera_position; } // Common functions used by billboards @@ -174,9 +174,9 @@ void SphericalBillboard::render() const // objToCamProj is the vector in world coordinates from the // local origin to the camera projected in the XZ plane - objToCamProj = makeVector(theCameraPosition.x - myX, + objToCamProj = makeVector(::camera_position.x - myX, 0.0f, - theCameraPosition.z - myZ); + ::camera_position.z - myZ); // This is the original lookAt vector for the object // in world coordinates @@ -207,9 +207,9 @@ void SphericalBillboard::render() const // objToCam is the vector in world coordinates from // the local origin to the camera - objToCam = makeVector(theCameraPosition.x - myX, - theCameraPosition.y - myY, - theCameraPosition.z - myZ); + objToCam = makeVector(::camera_position.x - myX, + ::camera_position.y - myY, + ::camera_position.z - myZ); // Normalize to get the cosine afterwards objToCam.normalise(); @@ -249,10 +249,10 @@ IBillboardPtr makeSphericalBillboard(ITexturePtr aTexture) void setBillboardCameraOrigin(Vector aPosition) { - theCameraPosition = aPosition; + ::camera_position = aPosition; } float distanceToCamera(Vector aPosition) { - return (theCameraPosition - aPosition).length(); + return (::camera_position - aPosition).length(); } diff --git a/src/Editor.cpp b/src/Editor.cpp index 176e701..6f48464 100644 --- a/src/Editor.cpp +++ b/src/Editor.cpp @@ -62,7 +62,7 @@ public: }; void setTool(Tool aTool) { myTool = aTool; } - IMapPtr map() { return myMap; } + IMapPtr get_map() { return map; } void setMap(IMapPtr aMap); private: @@ -76,9 +76,9 @@ private: void dragBoxBounds(int& xMin, int& xMax, int &yMin, int& yMax) const; void deleteObjects(); - IMapPtr myMap; + IMapPtr map; - ILightPtr mySun; + ILightPtr sun; Vector myPosition; Tool myTool; @@ -170,7 +170,7 @@ namespace { { if (aResult == OK) anEditor->setMap(aMap); - else if (!anEditor->map()) + else if (!anEditor->get_map()) throw runtime_error("No map to edit!"); } @@ -185,7 +185,7 @@ namespace { void onSaveClick(Fl_Widget* aWidget) { - theEditor->map()->save(); + theEditor->get_map()->save(); } void onNewClick(Fl_Widget* aWidget) @@ -241,15 +241,15 @@ void addEditorGUI() } Editor::Editor(IMapPtr aMap) - : myMap(aMap), myPosition(4.5, -17.5, -21.5), + : map(aMap), myPosition(4.5, -17.5, -21.5), myTool(TRACK_TOOL), amScrolling(false), amDragging(false) { - mySun = makeSunLight(); + sun = make_sun_light(); theEditor = this; - if (myMap) { - myMap->setGrid(true); + if (map) { + map->setGrid(true); log() << "Editing " << aMap->name(); } @@ -262,8 +262,8 @@ Editor::~Editor() void Editor::setMap(IMapPtr aMap) { - myMap = aMap; - myMap->setGrid(true); + map = aMap; + map->setGrid(true); } // Calculate the bounds of the drag box accounting for the different @@ -280,14 +280,14 @@ void Editor::dragBoxBounds(int& xMin, int& xMax, int &yMin, int& yMax) const // Render the next frame void Editor::display(IGraphicsPtr aContext) const { - if (!myMap) + if (!map) return; aContext->setCamera(myPosition, makeVector(45.0f, 45.0f, 0.0f)); - mySun->apply(); + sun->apply(); - myMap->render(aContext); + map->render(aContext); // Draw the highlight if we are dragging track if (amDragging) { @@ -296,7 +296,7 @@ void Editor::display(IGraphicsPtr aContext) const for (int x = xmin; x <= xmax; x++) { for (int y = ymin; y <= ymax; y++) - myMap->highlightTile(aContext, makePoint(x, y), + map->highlightTile(aContext, makePoint(x, y), make_tuple(1.0f, 1.0f, 1.0f)); } } @@ -319,10 +319,10 @@ void Editor::update(IPickBufferPtr aPickBuffer, int aDelta) bool Editor::canConnect(const Point& aFirstPoint, const Point& aSecondPoint) const { - if (!myMap->isValidTrack(aFirstPoint)) + if (!map->isValidTrack(aFirstPoint)) return false; - ITrackSegmentPtr track = myMap->trackAt(aFirstPoint); + ITrackSegmentPtr track = map->trackAt(aFirstPoint); Vector dir = makeVector (aFirstPoint.x - aSecondPoint.x, 0, @@ -336,10 +336,10 @@ bool Editor::canConnect(const Point& aFirstPoint, // Returns `false' if track cannot be placed here bool Editor::drawTrackTile(const Point& aPoint, const track::Direction& anAxis) { - if (myMap->isValidTrack(aPoint)) { - ITrackSegmentPtr merged = myMap->trackAt(aPoint)->mergeExit(aPoint, anAxis); + if (map->isValidTrack(aPoint)) { + ITrackSegmentPtr merged = map->trackAt(aPoint)->mergeExit(aPoint, anAxis); if (merged) { - myMap->setTrackAt(aPoint, merged); + map->setTrackAt(aPoint, merged); return true; } else { @@ -348,7 +348,7 @@ bool Editor::drawTrackTile(const Point& aPoint, const track::Direction& anA } } else { - myMap->setTrackAt(aPoint, makeStraightTrack(anAxis)); + map->setTrackAt(aPoint, makeStraightTrack(anAxis)); return true; } } @@ -383,18 +383,18 @@ void Editor::drawDraggedTrack() const track::Direction mergeAxis = xlen > ylen ? (myDragBegin.x < myDragEnd.x ? -axis::X : axis::X) : (myDragBegin.y < myDragEnd.y ? -axis::Y : axis::Y); - if (myMap->isValidTrack(myDragEnd)) { + if (map->isValidTrack(myDragEnd)) { ITrackSegmentPtr merged = - myMap->trackAt(myDragEnd)->mergeExit(myDragBegin, mergeAxis); + map->trackAt(myDragEnd)->mergeExit(myDragBegin, mergeAxis); if (merged) { // Erase all the tiles covered for (int x = xmin; x <= xmax; x++) { for (int y = ymin; y <= ymax; y++) - myMap->eraseTile(x, y); + map->eraseTile(x, y); } - myMap->setTrackAt(myDragEnd, merged); + map->setTrackAt(myDragEnd, merged); return; } } @@ -542,7 +542,7 @@ void Editor::drawDraggedTrack() bool ok = true; for (list >::iterator it = exits.begin(); it != exits.end(); ++it) { - if (myMap->isValidTrack(*it)) { + if (map->isValidTrack(*it)) { warn() << "Cannot place curve here"; ok = false; break; @@ -550,7 +550,7 @@ void Editor::drawDraggedTrack() } if (ok) - myMap->setTrackAt(where, track); + map->setTrackAt(where, track); } } @@ -562,7 +562,7 @@ void Editor::deleteObjects() for (int x = xmin; x <= xmax; x++) { for (int y = ymin; y <= ymax; y++) - myMap->eraseTile(x, y); + map->eraseTile(x, y); } } @@ -571,14 +571,14 @@ void Editor::onMouseMove(IPickBufferPtr aPickBuffer, int x, int y, { if (amDragging) { // Extend the selection rectangle - myMap->setPickMode(true); + map->setPickMode(true); IGraphicsPtr pickContext = aPickBuffer->beginPick(x, y); display(pickContext); int id = aPickBuffer->endPick(); - myMap->setPickMode(false); + map->setPickMode(false); if (id > 0) - myDragEnd = myMap->pickPosition(id); + myDragEnd = map->pickPosition(id); } else if (amScrolling) { const float speed = 0.05f; @@ -590,7 +590,7 @@ void Editor::onMouseMove(IPickBufferPtr aPickBuffer, int x, int y, myPosition.z -= yrel * speed; } - getGameWindow()->redrawHint(); + get_game_window()->redrawHint(); } void Editor::onMouseClick(IPickBufferPtr aPickBuffer, int x, int y, @@ -602,15 +602,15 @@ void Editor::onMouseClick(IPickBufferPtr aPickBuffer, int x, int y, } else if (aButton == MOUSE_LEFT) { // See if the user clicked on something in the map - myMap->setPickMode(true); + map->setPickMode(true); IGraphicsPtr pickContext = aPickBuffer->beginPick(x, y); display(pickContext); int id = aPickBuffer->endPick(); - myMap->setPickMode(false); + map->setPickMode(false); if (id > 0) { // Begin dragging a selection rectangle - Point where = myMap->pickPosition(id); + Point where = map->pickPosition(id); myDragBegin = myDragEnd = where; amDragging = true; @@ -623,7 +623,7 @@ void Editor::onMouseClick(IPickBufferPtr aPickBuffer, int x, int y, myPosition.y += 0.5; } - getGameWindow()->redrawHint(); + get_game_window()->redrawHint(); } void Editor::onMouseRelease(IPickBufferPtr aPickBuffer, int x, int y, @@ -636,25 +636,25 @@ void Editor::onMouseRelease(IPickBufferPtr aPickBuffer, int x, int y, drawDraggedTrack(); break; case RAISE_TOOL: - myMap->raiseArea(myDragBegin, myDragEnd); + map->raiseArea(myDragBegin, myDragEnd); break; case LOWER_TOOL: - myMap->lowerArea(myDragBegin, myDragEnd); + map->lowerArea(myDragBegin, myDragEnd); break; case LEVEL_TOOL: - myMap->levelArea(myDragBegin, myDragEnd); + map->levelArea(myDragBegin, myDragEnd); break; case DELETE_TOOL: deleteObjects(); break; case START_TOOL: - myMap->setStart(myDragBegin.x, myDragBegin.y); + map->setStart(myDragBegin.x, myDragBegin.y); break; case STATION_TOOL: - myMap->extendStation(myDragBegin, myDragEnd); + map->extendStation(myDragBegin, myDragEnd); break; case BUILDING_TOOL: - myMap->placeBuilding(myDragBegin, theBuildingPicker->active(), + map->placeBuilding(myDragBegin, theBuildingPicker->active(), theModelViewer->angle()); break; } @@ -665,7 +665,7 @@ void Editor::onMouseRelease(IPickBufferPtr aPickBuffer, int x, int y, amScrolling = false; } - getGameWindow()->redrawHint(); + get_game_window()->redrawHint(); } void Editor::onKeyUp(SDLKey aKey) @@ -678,7 +678,7 @@ void Editor::onKeyDown(SDLKey aKey) switch (aKey) { case SDLK_g: // Toggle grid - myMap->setGrid(true); + map->setGrid(true); break; default: break; diff --git a/src/Game.cpp b/src/Game.cpp index 46d0e83..0d64492 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -52,18 +52,18 @@ public: void onMouseRelease(IPickBufferPtr aPickBuffer, int x, int y, MouseButton aButton) {} private: - void lookAhead(); - void setStatus(const string& aString) { myStatusMsg = aString; } - void nearStation(IStationPtr aStation); - void leftStation(); + void look_ahead(); + void set_status(const string& aString) { myStatusMsg = aString; } + void near_station(IStationPtr aStation); + void left_station(); Vector cameraPosition(float aRadius) const; - IMapPtr myMap; - ITrainPtr myTrain; + IMapPtr map; + ITrainPtr train; ILightPtr sun; // Station the train is either approaching or stopped at - IStationPtr myActiveStation; + IStationPtr active_station; // Camera position float myHorizAngle, myVertAngle, myViewRadius; @@ -88,15 +88,15 @@ private: }; Game::Game(IMapPtr aMap) - : myMap(aMap), + : map(aMap), myHorizAngle(2.5f), myVertAngle(1.0f), myViewRadius(10.0f), myCameraHTarget(2.5f), myCameraVTarget(1.0f), myCameraSpeed(1.0f), myCameraMode(CAMERA_FLOATING) { - myTrain = makeTrain(myMap); + train = makeTrain(map); sun = make_sun_light(); - myMap->setGrid(false); + map->setGrid(false); // Build the GUI myStatsPanel = makeFlowBox(FLOW_BOX_VERT); @@ -130,7 +130,7 @@ Game::Game(IMapPtr aMap) myStatsPanel->setOrigin(5, 10); - layout = gui::make_layout("layouts/game.xml"); + //layout = gui::make_layout("layouts/game.xml"); } Game::~Game() @@ -143,7 +143,7 @@ Vector Game::cameraPosition(float aRadius) const // Two angles give unique position on surface of a sphere // Look up ``spherical coordinates'' const float yCentre = 0.9f; - Vector position = myTrain->front(); + Vector position = train->front(); position.x += aRadius * cosf(myHorizAngle) * sinf(myVertAngle); position.z += aRadius * sinf(myHorizAngle) * sinf(myVertAngle); position.y = aRadius * cosf(myVertAngle) + yCentre; @@ -153,7 +153,7 @@ Vector Game::cameraPosition(float aRadius) const void Game::display(IGraphicsPtr aContext) const { - Vector trainPos = myTrain->front(); + Vector trainPos = train->front(); Vector position = cameraPosition(myViewRadius); @@ -162,18 +162,18 @@ void Game::display(IGraphicsPtr aContext) const sun->apply(); - myMap->render(aContext); - myTrain->render(); + map->render(aContext); + train->render(); } void Game::overlay() const { //myStatsPanel->render(); - layout->render(); + //layout->render(); - const int screenH = getGameWindow()->height(); - const int screenW = getGameWindow()->width(); + const int screenH = get_game_window()->height(); + const int screenW = get_game_window()->width(); const int len = myStatusFont->string_width("%s", myStatusMsg.c_str()); myStatusFont->print((screenW - len)/2, screenH - 50, "%s", myStatusMsg.c_str()); @@ -181,26 +181,26 @@ void Game::overlay() const void Game::update(IPickBufferPtr aPickBuffer, int aDelta) { - myTrain->update(aDelta); + train->update(aDelta); // Update the GUI elements const double msToMPH = 2.237; - mySpeedLabel->setText("Speed: %.1lfmph\n", myTrain->speed() * msToMPH); - myThrottleMeter->setValue(myTrain->controller()->throttle()); - myBrakeLabel->setVisible(myTrain->controller()->brakeOn()); + mySpeedLabel->setText("Speed: %.1lfmph\n", train->speed() * msToMPH); + myThrottleMeter->setValue(train->controller()->throttle()); + myBrakeLabel->setVisible(train->controller()->brakeOn()); - layout->get_cast("/status_wnd/speed_label").format( - "Speed: %.1lfmph", myTrain->speed() * msToMPH); + //layout->get_cast("/status_wnd/speed_label").format( + // "Speed: %.1lfmph", train->speed() * msToMPH); - const double pressure = myTrain->controller()->pressure(); + const double pressure = train->controller()->pressure(); myPressureLabel->setText("Pressure: %.lfpsi", pressure); - const double temp = myTrain->controller()->temp(); + const double temp = train->controller()->temp(); myTempLabel->setText("Temp: %.lfdeg", temp); myWaterMeter->setValue(8); - lookAhead(); + look_ahead(); // Move the camera vertically if it's currently underground @@ -210,7 +210,7 @@ void Game::update(IPickBufferPtr aPickBuffer, int aDelta) // A hack because we don't calculate the height properly const float MIN_HEIGHT = 0.25f; - float h = myMap->heightAt(clipPosition.x, clipPosition.z); + float h = map->heightAt(clipPosition.x, clipPosition.z); if (h + MIN_HEIGHT > clipPosition.y) { myCameraVTarget -= 0.001f * static_cast(aDelta); @@ -223,36 +223,36 @@ void Game::update(IPickBufferPtr aPickBuffer, int aDelta) } // Signal that we are approaching a station -void Game::nearStation(IStationPtr aStation) +void Game::near_station(IStationPtr aStation) { - leftStation(); // Clear any previous station + left_station(); // Clear any previous station - if (aStation != myActiveStation) { - myActiveStation = aStation; + if (aStation != active_station) { + active_station = aStation; aStation->setHighlightVisible(true); } } // Signal that we are no longer at or approaching a station -void Game::leftStation() +void Game::left_station() { - if (myActiveStation) { - myActiveStation->setHighlightVisible(false); - myActiveStation.reset(); + if (active_station) { + active_station->setHighlightVisible(false); + active_station.reset(); } } // Look along the track and notify the player of any stations, points, etc. // that they are approaching -void Game::lookAhead() +void Game::look_ahead() { - TrackIterator it = iterateTrack(myMap, myTrain->tile(), - myTrain->direction()); + TrackIterator it = iterateTrack(map, train->tile(), + train->direction()); // Are we sitting on a station? if (it.status == TRACK_STATION) { - setStatus("Stop here for station " + it.station->name()); - nearStation(it.station); + set_status("Stop here for station " + it.station->name()); + near_station(it.station); return; } @@ -265,31 +265,31 @@ void Game::lookAhead() switch (it.status) { case TRACK_STATION: - setStatus("Approaching station " + it.station->name()); - nearStation(it.station); + set_status("Approaching station " + it.station->name()); + near_station(it.station); clearStation = false; return; case TRACK_NO_MORE: - setStatus("Oh no! You're going to crash!"); + set_status("Oh no! You're going to crash!"); break; case TRACK_CHOICE: - setStatus("Oh no! You have to make a decision!"); + set_status("Oh no! You have to make a decision!"); break; default: break; } if (!clearStation) - leftStation(); + left_station(); return; } } // We're not approaching any station - leftStation(); + left_station(); // Nothing to report - setStatus(""); + set_status(""); } void Game::onKeyDown(SDLKey aKey) @@ -302,28 +302,28 @@ void Game::onKeyDown(SDLKey aKey) myViewRadius += 0.2f; break; case SDLK_b: - myTrain->controller()->actOn(BRAKE_TOGGLE); + train->controller()->actOn(BRAKE_TOGGLE); break; case SDLK_LCTRL: - myTrain->controller()->actOn(SHOVEL_COAL); + train->controller()->actOn(SHOVEL_COAL); break; case SDLK_a: - myTrain->controller()->actOn(THROTTLE_DOWN); + train->controller()->actOn(THROTTLE_DOWN); break; case SDLK_s: - myTrain->controller()->actOn(THROTTLE_UP); + train->controller()->actOn(THROTTLE_UP); break; case SDLK_PRINT: - getGameWindow()->takeScreenShot(); + get_game_window()->takeScreenShot(); break; case SDLK_LEFT: - myTrain->controller()->actOn(GO_LEFT); + train->controller()->actOn(GO_LEFT); break; case SDLK_RIGHT: - myTrain->controller()->actOn(GO_RIGHT); + train->controller()->actOn(GO_RIGHT); break; case SDLK_UP: - myTrain->controller()->actOn(GO_STRAIGHT_ON); + train->controller()->actOn(GO_STRAIGHT_ON); break; case SDLK_TAB: if (myCameraMode == CAMERA_FLOATING) diff --git a/src/Main.cpp b/src/Main.cpp index c76d2c1..01bfbae 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -29,12 +29,12 @@ using namespace boost::filesystem; namespace { - IWindowPtr theWindow; + IWindowPtr window; } -IWindowPtr getGameWindow() +IWindowPtr get_game_window() { - return theWindow; + return ::window; } int main(int argc, char** argv) @@ -68,7 +68,7 @@ int main(int argc, char** argv) IScreenPtr screen; if (cmd == "edit") { - theWindow = makeFLTKWindow("Train Game Editor", addEditorGUI); + ::window = makeFLTKWindow("Train Game Editor", addEditorGUI); if (resourceExists(mapFile, "maps")) screen = makeEditorScreen(loadMap(mapFile)); else { @@ -76,17 +76,17 @@ int main(int argc, char** argv) } } else if (cmd == "play") { - theWindow = makeSDLWindow(); + ::window = makeSDLWindow(); screen = makeGameScreen(loadMap(mapFile)); } else if (cmd == "uidemo") { - theWindow = makeSDLWindow(); + ::window = makeSDLWindow(); screen = make_ui_demo(); } else throw runtime_error("Unrecognised command: " + cmd); - theWindow->run(screen); + ::window->run(screen); cfg->flush(); } diff --git a/src/ModelViewer.cpp b/src/ModelViewer.cpp index fb9077c..5581097 100644 --- a/src/ModelViewer.cpp +++ b/src/ModelViewer.cpp @@ -46,7 +46,7 @@ void ModelViewer::rotate(float anAngle) void ModelViewer::draw() { - static ILightPtr sun = makeSunLight(); + static ILightPtr sun = make_sun_light(); glMatrixMode(GL_PROJECTION); glLoadIdentity(); diff --git a/src/SmokeTrail.cpp b/src/SmokeTrail.cpp index 98f4093..73e2c62 100644 --- a/src/SmokeTrail.cpp +++ b/src/SmokeTrail.cpp @@ -50,9 +50,9 @@ private: void newParticle(); bool moveParticle(Particle& aParticle, int aDelta); - mutable list myParticles; // Need to sort particles in render() + mutable list particles; // Need to sort particles in render() float myX, myY, myZ; - IBillboardPtr myBillboard; + IBillboardPtr billboard; // New particles are created every `mySpawnDelay` int mySpawnDelay, mySpawnCounter; @@ -67,7 +67,7 @@ SmokeTrail::SmokeTrail() myXSpeed(0.0f), myYSpeed(0.0f), myZSpeed(0.0f) { ITexturePtr particle(loadTexture("data/images/smoke_particle.png")); - myBillboard = makeSphericalBillboard(particle); + billboard = makeSphericalBillboard(particle); } // Returns true if the particle is dead @@ -110,10 +110,10 @@ bool SmokeTrail::moveParticle(Particle& aParticle, int aDelta) void SmokeTrail::update(int aDelta) { // Move the existing particles - list::iterator it = myParticles.begin(); - while (it != myParticles.end()) { + list::iterator it = particles.begin(); + while (it != particles.end()) { if (moveParticle(*it, aDelta)) - it = myParticles.erase(it); + it = particles.erase(it); else ++it; } @@ -156,7 +156,7 @@ void SmokeTrail::newParticle() true, // Appearing }; - myParticles.push_back(p); + particles.push_back(p); } struct CmpDistanceToCam { @@ -170,14 +170,14 @@ struct CmpDistanceToCam { void SmokeTrail::render() const { - myParticles.sort(CmpDistanceToCam()); + particles.sort(CmpDistanceToCam()); - for (list::const_iterator it = myParticles.begin(); - it != myParticles.end(); ++it) { - myBillboard->setPosition((*it).x, (*it).y, (*it).z); - myBillboard->setColour((*it).r, (*it).g, (*it).b, (*it).a); - myBillboard->setScale((*it).scale); - myBillboard->render(); + for (list::const_iterator it = particles.begin(); + it != particles.end(); ++it) { + billboard->setPosition((*it).x, (*it).y, (*it).z); + billboard->setColour((*it).r, (*it).g, (*it).b, (*it).a); + billboard->setScale((*it).scale); + billboard->render(); } } diff --git a/src/gui2/RenderContext.cpp b/src/gui2/RenderContext.cpp index 2207180..d1e69df 100644 --- a/src/gui2/RenderContext.cpp +++ b/src/gui2/RenderContext.cpp @@ -24,7 +24,7 @@ using namespace gui; -IWindowPtr getGameWindow(); +IWindowPtr get_game_window(); namespace { inline void set_colour(Colour c) @@ -113,7 +113,7 @@ void RenderContext::print(IFontPtr font, int x, int y, const string& s) void RenderContext::scissor(Widget* w) { - int wh = getGameWindow()->height(); + int wh = get_game_window()->height(); const Widget* parent = origin_stack.empty() ? NULL : origin_stack.top(); int max_w, max_h; -- 2.39.2