, focus(Vector<float>(500, 500), 500)
, cam(c.Size(), focus.Pos())
, controlled(univ.AddShip(Ship()))
+, linGauge(
+ Vector<int>(15, 100),
+ Vector<int>(10, 10),
+ Color(0xFF, 0xFF, 0xFF),
+ Color(0x00, 0x00, 0x00),
+ Color(0x00, 0xFF, 0x00),
+ Color(0xFF, 0x00, 0x00))
+, rotGauge(
+ Vector<int>(15, 100),
+ Vector<int>(27, 10),
+ Color(0xFF, 0xFF, 0xFF),
+ Color(0x00, 0x00, 0x00),
+ Color(0x33, 0x33, 0xFF),
+ Color(0x00, 0x00, 0xFF))
, autopilot(*controlled, focus.Pos())
, apEnabled(false)
, last(SDL_GetTicks())
void Application::Loop(int delta) {
HandleEvents();
+ if (delta == 0) {
+ SDL_Delay(1);
+ return;
+ }
+
if (!paused) {
Update(delta);
}
}
autopilot.Render(canvas, cam);
+
+ linGauge.Render(canvas, controlled->linThrottle);
+ rotGauge.Render(canvas, controlled->rotThrottle);
}
}