void GameWindow::onRender() { // List the items to render Resources::Location *location = StarkGlobal->getCurrent()->getLocation(); _renderEntries = location->listRenderEntries(); Gfx::LightEntryArray lightEntries = location->listLightEntries(); // Render all the scene items Gfx::RenderEntryArray::iterator element = _renderEntries.begin(); while (element != _renderEntries.end()) { // Draw the current element (*element)->render(lightEntries); // Go for the next one element++; } if (_displayExit) { Common::Array<Common::Point> exitPositions = StarkGameInterface->listExitPositions(); for (uint i = 0; i < exitPositions.size(); ++i) { Common::Point pos = exitPositions[i]; VisualImageXMG *exitImage = nullptr; if (pos.x < _exitLeftBoundary) { pos.x = _exitLeftBoundary; exitImage = _exitArrowLeft; } else if (pos.x > _exitRightBoundary) { pos.x = _exitRightBoundary; exitImage = _exitArrowRight; } else { exitImage = _exitArrow; } exitImage->render(pos, false); } } float fadeLevel = StarkScene->getFadeLevel(); if ((1.0f - fadeLevel) > 0.00001f) { _fadeRenderer->render(fadeLevel); } }
void GameWindow::onRender() { // List the items to render Resources::Location *location = StarkGlobal->getCurrent()->getLocation(); _renderEntries = location->listRenderEntries(); Gfx::LightEntryArray lightEntries = location->listLightEntries(); // Render all the scene items Gfx::RenderEntryArray::iterator element = _renderEntries.begin(); while (element != _renderEntries.end()) { // Draw the current element (*element)->render(lightEntries); // Go for the next one element++; } float fadeLevel = StarkScene->getFadeLevel(); if ((1.0f - fadeLevel) > 0.00001f) { _fadeRenderer->render(fadeLevel); } }