void CEventSelect::Loop(float timestep) { ScopedRenderMode rm(GUI); Winsys.clear(); if (param.ui_snow) { update_ui_snow(timestep); draw_ui_snow(); } DrawGUIBackground(Winsys.scale); cupLocked->SetVisible(Events.IsUnlocked(event->GetValue(), cup->GetValue()) == false); selectedEvent->Focussed(event->focussed()); selectedEvent->SetString(Events.EventList[event->GetValue()].name); selectedCup->SetActive(Events.IsUnlocked(event->GetValue(), cup->GetValue())); selectedCup->Focussed(cup->focussed()); selectedCup->SetString(Events.GetCupTrivialName(event->GetValue(), cup->GetValue())); textbuttons[0]->SetActive(Events.IsUnlocked(event->GetValue(), cup->GetValue())); DrawGUI(); Winsys.SwapBuffers(); }
void CNewPlayer::Loop(float timestep) { sf::Color col; ScopedRenderMode rm(GUI); Winsys.clear(); if (param.ui_snow) { update_ui_snow(timestep); draw_ui_snow(); } textfield->UpdateCursor(timestep); DrawGUIBackground(Winsys.scale); FT.SetColor(colWhite); FT.AutoSizeN(4); FT.DrawString(CENTER, AutoYPosN(30), Trans.Text(66)); if (avatar->focussed()) col = colDYell; else col = colWhite; Players.GetAvatarTexture(avatar->GetValue())->DrawFrame( prevleft, prevtop, prevwidth, prevwidth, 2, col); DrawGUI(); Winsys.SwapBuffers(); }
void CScore::Loop () { int ww = Winsys.resolution.width; int hh = Winsys.resolution.height; Music.Update (); check_gl_error(); ClearRenderContext (); ScopedRenderMode rm(GUI); SetupGuiDisplay (); if (param.ui_snow) { update_ui_snow (); draw_ui_snow(); } Tex.Draw (BOTTOM_LEFT, 0, hh - 256, 1); Tex.Draw (BOTTOM_RIGHT, ww-256, hh-256, 1); Tex.Draw (TOP_LEFT, 0, 0, 1); Tex.Draw (TOP_RIGHT, ww-256, 0, 1); //Tex.Draw (T_TITLE_SMALL, CENTER, AutoYPosN (5), Winsys.scale); // DrawFrameX (area.left, area.top, area.right-area.left, area.bottom - area.top, // 0, colMBackgr, colBlack, 0.2); FT.AutoSizeN (7); FT.SetColor (colWhite); FT.DrawString (CENTER, AutoYPosN (Winsys.resolution.width > Winsys.resolution.height ? 6 : 22), Trans.Text(62)); DrawFrameX (area.left, frametop, framewidth - 93, frameheight, 3, colMBackgr, colWhite, 1.0); FT.AutoSizeN (4); FT.SetColor (colDYell); FT.DrawString (area.left+20, frametop, CourseList[course->GetValue()].name); const TScoreList *list = Score.GetScorelist (course->GetValue()); FT.SetColor (colWhite); if (list != NULL) { FT.AutoSizeN (3); if (list->numScores < 1) { FT.DrawString (CENTER, area.top + 140, Trans.Text(63)); } else { for (int i=0; i<min(MAX_SCORES, list->numScores); i++) { int y = listtop + i*linedist; FT.DrawString (area.left, y, ordinals[i]); FT.DrawString (area.left + dd1, y, Int_StrN (list->scores[i].points)); FT.DrawString (area.left + dd2, y, list->scores[i].player); FT.DrawString (area.left + dd3, y, Int_StrN (list->scores[i].herrings) + " herrings"); FT.DrawString (area.left + dd4, y, Float_StrN (list->scores[i].time, 1) + " sec"); } } } else Message ("score list out of range"); DrawGUI(); Winsys.SwapBuffers(); }
void CEventSelect::Loop (double timestep) { int ww = Winsys.resolution.width; int hh = Winsys.resolution.height; TColor col; check_gl_error(); ScopedRenderMode rm(GUI); Music.Update (); ClearRenderContext (); SetupGuiDisplay (); if (param.ui_snow) { update_ui_snow (timestep); draw_ui_snow (); } Tex.Draw (T_TITLE_SMALL, CENTER, AutoYPosN (5), Winsys.scale); Tex.Draw (BOTTOM_LEFT, 0, hh-256, 1); Tex.Draw (BOTTOM_RIGHT, ww-256, hh-256, 1); Tex.Draw (TOP_LEFT, 0, 0, 1); Tex.Draw (TOP_RIGHT, ww-256, 0, 1); // DrawFrameX (area.left, area.top, area.right-area.left, area.bottom - area.top, // 0, colMBackgr, colBlack, 0.2); FT.AutoSizeN (3); FT.SetColor (colWhite); FT.DrawString (area.left, AutoYPosN (30), Trans.Text (6)); FT.DrawString (area.left,AutoYPosN (45), Trans.Text (7)); if (Events.IsUnlocked (event->GetValue(), cup->GetValue()) == false) { FT.SetColor (colLGrey); FT.DrawString (CENTER, AutoYPosN (58), Trans.Text (10)); } FT.AutoSizeN (4); if (event->focussed()) col = colDYell; else col = colWhite; DrawFrameX (area.left, frametop1, framewidth, frameheight, 3, colMBackgr, col, 1.0); FT.SetColor (colDYell); FT.DrawString (area.left + 20, frametop1, EventList[event->GetValue()].name); if (cup->focussed()) col = colDYell; else col = colWhite; DrawFrameX (area.left, frametop2, framewidth, frameheight, 3, colMBackgr, col, 1.0); if (Events.IsUnlocked (event->GetValue(), cup->GetValue())) FT.SetColor (colDYell); else FT.SetColor (colLGrey); FT.DrawString (area.left + 20, frametop2, Events.GetCupTrivialName (event->GetValue(), cup->GetValue())); textbuttons[0]->SetActive(Events.IsUnlocked (event->GetValue(), cup->GetValue())); DrawGUI(); Winsys.SwapBuffers(); }
void CRegist::Loop (double timestep) { int ww = Winsys.resolution.width; int hh = Winsys.resolution.height; Music.Update (); check_gl_error(); ClearRenderContext (); ScopedRenderMode rm(GUI); SetupGuiDisplay (); TColor col; if (param.ui_snow) { update_ui_snow (timestep); draw_ui_snow(); } Tex.Draw (BOTTOM_LEFT, 0, hh - 256, 1); Tex.Draw (BOTTOM_RIGHT, ww-256, hh-256, 1); Tex.Draw (TOP_LEFT, 0, 0, 1); Tex.Draw (TOP_RIGHT, ww-256, 0, 1); Tex.Draw (T_TITLE_SMALL, CENTER, AutoYPosN (5), scale); // DrawFrameX (area.left, area.top, area.right-area.left, area.bottom - area.top, // 0, colMBackgr, col, 0.2); FT.AutoSizeN (3); FT.SetColor (colWhite); int top = AutoYPosN (24); FT.DrawString (area.left, top, Trans.Text(58)); FT.DrawString (area.left + framewidth + arrowwidth, top, Trans.Text(59)); FT.AutoSizeN (4); if (player->focussed()) col = colDYell; else col = colWhite; DrawFrameX (area.left, area.top, framewidth, frameheight, 3, colMBackgr, col, 1.0); FT.SetColor (col); FT.DrawString (area.left + 20, area.top, Players.GetName (player->GetValue())); Players.GetAvatarTexture(player->GetValue())->DrawFrame( area.left + 60, AutoYPosN (40), texsize, texsize, 3, colWhite); if (character->focussed()) col = colDYell; else col = colWhite; DrawFrameX (area.left + framewidth + arrowwidth, area.top, framewidth, frameheight, 3, colMBackgr, col, 1.0); FT.SetColor (col); FT.DrawString (area.left + framewidth + arrowwidth + 20, area.top, Char.CharList[character->GetValue()].name); if(Char.CharList[character->GetValue()].preview != NULL) Char.CharList[character->GetValue()].preview->DrawFrame( area.right - texsize - 60 - arrowwidth, AutoYPosN (40), texsize, texsize, 3, colWhite); FT.SetColor (colWhite); DrawGUI(); Winsys.SwapBuffers(); }
void CGameConfig::Loop () { int ww = Winsys.resolution.width; int hh = Winsys.resolution.height; Music.Update (); check_gl_error(); Music.Update (); ScopedRenderMode rm(GUI); ClearRenderContext (); SetupGuiDisplay (); if (param.ui_snow) { update_ui_snow (); draw_ui_snow(); } //Tex.Draw (T_TITLE_SMALL, CENTER, AutoYPosN (5), 1.0); Tex.Draw (BOTTOM_LEFT, 0, hh-256, 1); Tex.Draw (BOTTOM_RIGHT, ww-256, hh-256, 1); Tex.Draw (TOP_LEFT, 0, 0, 1); Tex.Draw (TOP_RIGHT, ww-256, 0, 1); // DrawFrameX (area.left, area.top, area.right-area.left, area.bottom - area.top, // 0, colMBackgr, colBlack, 0.2); FT.AutoSizeN (4); FT.SetColor (colWhite); FT.DrawString (area.left, area.top, Trans.Text(86)); FT.DrawString (area.left, area.top + dd, Trans.Text(94)); FT.DrawString (area.left, area.top + dd * 2, Trans.Text(33)); FT.DrawString (area.left, area.top + dd * 3, Trans.Text(34)); FT.DrawString (area.left, area.top + dd * 4, Trans.Text(36)); FT.DrawString (area.left, area.top + dd * 5, Trans.Text(35)); FT.DrawString (area.left+240, area.top, Trans.Text(87 + vid_orient->GetValue())); FT.DrawString (area.left+240, area.top + dd, Float_StrN(sensit->GetValue() / 10.0f, 1)); FT.DrawString (area.left+240, area.top + dd * 2, Int_StrN (mus_vol->GetValue())); FT.DrawString (area.left+240, area.top + dd * 3, Int_StrN (sound_vol->GetValue())); FT.DrawString (area.left+240, area.top + dd * 4, Int_StrN (detail_level->GetValue())); FT.DrawString (area.left+240, area.top + dd * 5, Trans.languages[language->GetValue()].language); DrawGUI(); Reshape (ww, hh); Winsys.SwapBuffers (); }
void FrogApp::Render() { Texture* layer1 = asset->GetTex(assets::SF_FONDO_LAYER1); Texture* layer2 = asset->GetTex(assets::SF_FONDO_LAYER2); Texture* layer3 = asset->GetTex(assets::SF_FONDO_LAYER3); Texture* layer4 = asset->GetTex(assets::SF_FONDO_LAYER4); float offset = 50.f; //SDL_Rect r; //r.x=layer1wanim.GetPosition().x-offset; r.y = 0; int x = layer1wanim.GetPosition().x-offset; int y = 0; scrollbg->Render( sdlrenderer ); texqueue.Step( sdlrenderer ); /* layer1->Render(x,y,sdlrenderer); x=layer2wanim.GetPosition().x-offset; layer2->Render(x,y,sdlrenderer); x=layer3wanim.GetPosition().x-offset; layer3->Render(x,y,sdlrenderer); x=layer4wanim.GetPosition().x-offset; layer4->Render(x,y,sdlrenderer); */ scene->Step(deltatime); // render background and tiles //DrawBackground(); tqueue.Draw(sdlrenderer); DrawGUI(); /* EntityBase* p; p=inicial; for(;p;) { if(p->IsDestroyed()) { EntityBase* tmp = p->Next(); p->FreeFromWorld(); p=tmp; } else { p=p->Next(); } } */ }
void CNewPlayer::Loop() { int ww = Winsys.resolution.width; int hh = Winsys.resolution.height; TColor col; Music.Update (); check_gl_error(); ClearRenderContext (); ScopedRenderMode rm(GUI); SetupGuiDisplay (); if (param.ui_snow) { update_ui_snow (); draw_ui_snow(); } textfield->UpdateCursor(); // DrawFrameX (area.left, area.top, area.right-area.left, area.bottom - area.top, // 0, colMBackgr, col, 0.2); Tex.Draw (BOTTOM_LEFT, 0, hh - 256, 1); Tex.Draw (BOTTOM_RIGHT, ww-256, hh-256, 1); Tex.Draw (TOP_LEFT, 0, 0, 1); Tex.Draw (TOP_RIGHT, ww-256, 0, 1); Tex.Draw (T_TITLE_SMALL, CENTER, AutoYPosN (5), Winsys.scale); FT.SetColor (colWhite); FT.AutoSizeN (4); FT.DrawString (CENTER, AutoYPosN (30), Trans.Text(66)); if (avatar->focussed()) col = colDYell; else col = colWhite; Players.GetAvatarTexture(avatar->GetValue())->DrawFrame( prevleft, prevtop, prevwidth, prevwidth, 2, col); DrawGUI(); Winsys.SwapBuffers(); }
void Draw() { glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear Screen And Depth Buffer glLoadIdentity (); s.c.selectedBuilding = GetSelectedBuilding(); glFlush (); glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear Screen And Depth Buffer glLoadIdentity (); glPushMatrix(); Draw3d(); glPopMatrix(); glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); //gluOrtho2D(0, 1, 1, 0); double lx = u.g.screen.x / u.g.screen.y; glOrtho(0, lx, 1, 0, -1, 1); glMatrixMode(GL_MODELVIEW); DrawGUI(); glMatrixMode(GL_PROJECTION); glPopMatrix(); glMatrixMode(GL_MODELVIEW); glFlush (); // Flush The GL Rendering Pipeline }
void CEvent::Loop (double timestep) { int ww = Winsys.resolution.width; int hh = Winsys.resolution.height; check_gl_error(); ScopedRenderMode rm(GUI); Music.Update (); ClearRenderContext (); SetupGuiDisplay (); if (param.ui_snow) { update_ui_snow (timestep); draw_ui_snow (); } Tex.Draw (T_TITLE_SMALL, CENTER, AutoYPosN (5), Winsys.scale); Tex.Draw (BOTTOM_LEFT, 0, hh-256, 1); Tex.Draw (BOTTOM_RIGHT, ww-256, hh-256, 1); Tex.Draw (TOP_LEFT, 0, 0, 1); Tex.Draw (TOP_RIGHT, ww-256, 0, 1); // DrawFrameX (area.left, area.top, area.right-area.left, area.bottom - area.top, // 0, colMBackgr, colBlack, 0.2); if (ready == 0) { // cup not finished FT.AutoSizeN (6); FT.SetColor (colWhite); FT.DrawString (CENTER, AutoYPosN (25), ecup->name); DrawBonusExt (bonustop, (int)ecup->races.size(), curr_bonus); DrawFrameX (area.left, frametop, framewidth, (int)ecup->races.size() * dist + 20, 3, colBackgr, colWhite, 1); for (size_t i=0; i<ecup->races.size(); i++) { FT.AutoSizeN (3); int y = frametop + 10 + (int)i * dist; if (i == curr_race) FT.SetColor (colDYell); else FT.SetColor (colWhite); FT.DrawString (area.left + 29, y, Course.CourseList[ecup->races[i]->course].name); Tex.Draw (CHECKBOX, area.right -54, y, texsize, texsize); if (curr_race > i) Tex.Draw (CHECKMARK, area.right-50, y + 4, 0.8); } FT.AutoSizeN (3); int ddd = FT.AutoDistanceN (1); FT.SetColor (colDBlue); string info = Trans.Text(11); info += " " + Int_StrN (ecup->races[curr_race]->herrings.i); info += " " + Int_StrN (ecup->races[curr_race]->herrings.j); info += " " + Int_StrN (ecup->races[curr_race]->herrings.k); FT.DrawString (CENTER, framebottom+15, info); info = Trans.Text(12); info += " " + Float_StrN (ecup->races[curr_race]->time.x, 0); info += " " + Float_StrN (ecup->races[curr_race]->time.y, 0); info += " " + Float_StrN (ecup->races[curr_race]->time.z, 0); info += " " + Trans.Text(14); FT.DrawString (CENTER, framebottom+15+ddd, info); } else if (ready == 1) { // cup successfully finished FT.AutoSizeN (5); FT.SetColor (colWhite); FT.DrawString (CENTER, messtop, Trans.Text(16)); DrawBonusExt (bonustop, (int)ecup->races.size(), curr_bonus); int res = resultlevel(curr_bonus, ecup->races.size()); FT.DrawString (CENTER, messtop2, Trans.Text(17) + " "+Int_StrN (res)); } else if (ready == 2) { // cup finished but failed FT.AutoSizeN (5); FT.SetColor (colLRed); FT.DrawString (CENTER, messtop, Trans.Text(18)); DrawBonusExt (bonustop, ecup->races.size(), curr_bonus); FT.DrawString (CENTER, messtop2, Trans.Text(19)); } textbuttons[0]->SetVisible(ready < 1); textbuttons[1]->SetVisible(ready < 1); textbuttons[2]->SetVisible(!(ready < 1)); DrawGUI (); Winsys.SwapBuffers(); }
void CRaceSelect::Loop() { int ww = Winsys.resolution.width; int hh = Winsys.resolution.height; TColor col; check_gl_error(); ScopedRenderMode rm(GUI); ClearRenderContext (); SetupGuiDisplay (); Music.Update (); if (param.ui_snow) { update_ui_snow (); draw_ui_snow (); } //Tex.Draw (T_TITLE_SMALL, CENTER, AutoYPosN (5), 1.0); Tex.Draw (BOTTOM_LEFT, 0, hh-256, 1); Tex.Draw (BOTTOM_RIGHT, ww-256, hh-256, 1); Tex.Draw (TOP_LEFT, 0, 0, 1); Tex.Draw (TOP_RIGHT, ww-256, 0, 1); // DrawFrameX (area.left, area.top, area.right-area.left, area.bottom - area.top, // 0, colMBackgr, colBlack, 0.2); // course selection col = colWhite; DrawFrameX (area.left, frametop, framewidth - 100, frameheight, 3, colMBackgr, col, 1.0); FT.AutoSizeN (4); FT.SetColor (colDYell); FT.DrawString (area.left+20, frametop, CourseList[course->GetValue()].name); if (CourseList[course->GetValue()].preview) CourseList[course->GetValue()].preview->DrawFrame(area.left + 3, prevtop, prevwidth, prevheight, 3, colWhite); DrawFrameX (area.right-boxwidth, prevtop-3, boxwidth, prevheight+6, 3, colBackgr, colWhite, 1.0); FT.AutoSizeN (2); FT.SetColor (colWhite); int dist = FT.AutoDistanceN (0); for (size_t i=0; i<CourseList[course->GetValue()].num_lines; i++) { FT.DrawString (boxleft+8, prevtop+i*dist, CourseList[course->GetValue()].desc[i]); } FT.DrawString (CENTER, prevtop + prevheight + 10, "Author: " + CourseList[course->GetValue()].author); //FT.DrawString (CENTER, AutoYPosN (45), info); if (g_game.force_treemap) { FT.AutoSizeN (4); static const string forcetrees = "Load trees.png"; string sizevar = "Size: "; sizevar += Int_StrN (g_game.treesize); sizevar += " Variation: "; sizevar += Int_StrN (g_game.treevar); FT.SetColor (colYellow); FT.DrawString (CENTER, AutoYPosN (85), forcetrees); FT.DrawString (CENTER, AutoYPosN (90), sizevar); } DrawGUI(); Winsys.SwapBuffers(); }
void GUI::Draw() { DrawGUI(playerOneScoreObjects); DrawGUI(playerTwoScoreObjects); }
void CGameConfig::Loop () { int ww = Winsys.resolution.width; int hh = Winsys.resolution.height; Music.Update (); check_gl_error(); Music.Update (); ScopedRenderMode rm(GUI); ClearRenderContext (); SetupGuiDisplay (); if (param.ui_snow) { update_ui_snow (); draw_ui_snow(); } Tex.Draw (T_TITLE_SMALL, CENTER, AutoYPosN (5), 1.0); Tex.Draw (BOTTOM_LEFT, 0, hh-256, 1); Tex.Draw (BOTTOM_RIGHT, ww-256, hh-256, 1); Tex.Draw (TOP_LEFT, 0, 0, 1); Tex.Draw (TOP_RIGHT, ww-256, 0, 1); // DrawFrameX (area.left, area.top, area.right-area.left, area.bottom - area.top, // 0, colMBackgr, colBlack, 0.2); FT.AutoSizeN (4); #ifndef PANDORA if (resolution->focussed()) FT.SetColor (colDYell); else FT.SetColor (colWhite); FT.DrawString (area.left, area.top + dd, Trans.Text(32)); #endif if (mus_vol->focussed()) FT.SetColor (colDYell); else FT.SetColor (colWhite); FT.DrawString (area.left, area.top + dd*2, Trans.Text(33)); if (sound_vol->focussed()) FT.SetColor (colDYell); else FT.SetColor (colWhite); FT.DrawString (area.left, area.top + dd*3, Trans.Text(34)); if (detail_level->focussed()) FT.SetColor (colDYell); else FT.SetColor (colWhite); FT.DrawString (area.left, area.top + dd*4, Trans.Text(36)); if (language->focussed()) FT.SetColor (colDYell); else FT.SetColor (colWhite); FT.DrawString (area.left, area.top + dd*5, Trans.Text(35)); FT.SetColor (colWhite); #ifndef PANDORA FT.DrawString (area.left+240, area.top + dd, res_names[resolution->GetValue()]); #endif FT.DrawString (area.left+240, area.top + dd*2, Int_StrN (mus_vol->GetValue())); FT.DrawString (area.left+240, area.top + dd*3, Int_StrN (sound_vol->GetValue())); FT.DrawString (area.left+240, area.top + dd*4, Int_StrN (detail_level->GetValue())); FT.DrawString (area.left+240, area.top + dd*5, Trans.languages[language->GetValue()].language); #if defined (_WIN32) if (fullscreen->checked != param.fullscreen) { FT.SetColor (colDYell); FT.AutoSizeN (4); FT.DrawString (CENTER, AutoYPosN (68), Trans.Text(84)); FT.DrawString (CENTER, AutoYPosN (72), Trans.Text(85)); } else { FT.SetColor (colLGrey); FT.AutoSizeN (3); FT.DrawString (CENTER, AutoYPosN (68), Trans.Text(41)); FT.DrawString (CENTER, AutoYPosN (72), Trans.Text(42)); } #else #ifndef PANDORA FT.SetColor (colWhite); FT.AutoSizeN (3); FT.DrawString (CENTER, AutoYPosN (68), Trans.Text(41)); FT.DrawString (CENTER, AutoYPosN (72), Trans.Text(42)); #endif #endif DrawGUI(); Reshape (ww, hh); Winsys.SwapBuffers (); }
void GameWorldView::Draw(const RoadBuildState& rb, const bool draw_selected, const MapPoint selected, unsigned* water) { SetNextZoomFactor(); int shortestDistToMouse = 100000; Point<int> mousePos(VIDEODRIVER.GetMouseX(), VIDEODRIVER.GetMouseY()); mousePos -= Point<int>(pos); glScissor(pos.x, VIDEODRIVER.GetScreenHeight() - pos.y - height, width, height); if(zoomFactor_ != 1.f) { glMatrixMode(GL_PROJECTION); glPushMatrix(); glScalef(zoomFactor_, zoomFactor_, 1); // Offset to center view Point<float> diff(width - width / zoomFactor_, height - height / zoomFactor_); diff = diff / 2.f; glTranslatef(-diff.x, -diff.y, 0.f); // Also adjust mouse mousePos = Point<int>(Point<float>(mousePos) / zoomFactor_ + diff); glMatrixMode(GL_MODELVIEW); } glTranslatef(static_cast<GLfloat>(pos.x) / zoomFactor_, static_cast<GLfloat>(pos.y) / zoomFactor_, 0.0f); glTranslatef(static_cast<GLfloat>(-offset.x), static_cast<GLfloat>(-offset.y), 0.0f); const TerrainRenderer& terrainRenderer = gwv.GetTerrainRenderer(); terrainRenderer.Draw(GetFirstPt(), GetLastPt(), gwv, water); glTranslatef(static_cast<GLfloat>(offset.x), static_cast<GLfloat>(offset.y), 0.0f); for(int y = firstPt.y; y <= lastPt.y; ++y) { // Figuren speichern, die in dieser Zeile gemalt werden müssen // und sich zwischen zwei Zeilen befinden, da sie dazwischen laufen std::vector<ObjectBetweenLines> between_lines; for(int x = firstPt.x; x <= lastPt.x; ++x) { Point<int> curOffset; const MapPoint curPt = terrainRenderer.ConvertCoords(Point<int>(x, y), &curOffset); DrawPoint curPos = GetWorld().GetNodePos(curPt) - offset + curOffset; const Point<int> mouseDist = mousePos - curPos; if(std::abs(mouseDist.x) + std::abs(mouseDist.y) < shortestDistToMouse) { selPt = curPt; selPtOffset = curOffset; shortestDistToMouse = std::abs(mouseDist.x) + std::abs(mouseDist.y); } Visibility visibility = gwv.GetVisibility(curPt); DrawBoundaryStone(curPt, curPos, visibility); if(visibility == VIS_VISIBLE) { DrawObject(curPt, curPos); DrawFigures(curPt, curPos, between_lines); //Construction aid mode if(show_bq) DrawConstructionAid(curPt, curPos); } else if(visibility == VIS_FOW) { const FOWObject* fowobj = gwv.GetYoungestFOWObject(MapPoint(curPt)); if(fowobj) fowobj->Draw(curPos); } if(debugNodePrinter) debugNodePrinter->print(curPt, curPos); if (d_active) DrawAIDebug(curPt, curPos); } // Figuren zwischen den Zeilen zeichnen for(unsigned i = 0; i < between_lines.size(); ++i) between_lines[i].obj->Draw(between_lines[i].pos); } if(show_names || show_productivity) DrawNameProductivityOverlay(terrainRenderer); DrawGUI(rb, terrainRenderer, draw_selected, selected); // Umherfliegende Katapultsteine zeichnen for(std::list<CatapultStone*>::const_iterator it = GetWorld().catapult_stones.begin(); it != GetWorld().catapult_stones.end(); ++it) { if(gwv.GetVisibility((*it)->dest_building) == VIS_VISIBLE || gwv.GetVisibility((*it)->dest_map) == VIS_VISIBLE) (*it)->Draw(offset); } if(zoomFactor_ != 1.f) { glMatrixMode(GL_PROJECTION); glPopMatrix(); glMatrixMode(GL_MODELVIEW); } glTranslatef(-static_cast<GLfloat>(pos.x) / zoomFactor_, -static_cast<GLfloat>(pos.y) / zoomFactor_, 0.0f); glScissor(0, 0, VIDEODRIVER.GetScreenWidth(), VIDEODRIVER.GetScreenWidth()); }