LCOV - code coverage report
Current view: top level - source/tools/atlas/GameInterface - GameLoop.h (source / functions) Hit Total Coverage
Test: 0 A.D. test coverage report Lines: 2 2 100.0 %
Date: 2023-01-19 00:18:29 Functions: 2 2 100.0 %

          Line data    Source code
       1             : /* Copyright (C) 2012 Wildfire Games.
       2             :  * This file is part of 0 A.D.
       3             :  *
       4             :  * 0 A.D. is free software: you can redistribute it and/or modify
       5             :  * it under the terms of the GNU General Public License as published by
       6             :  * the Free Software Foundation, either version 2 of the License, or
       7             :  * (at your option) any later version.
       8             :  *
       9             :  * 0 A.D. is distributed in the hope that it will be useful,
      10             :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      11             :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      12             :  * GNU General Public License for more details.
      13             :  *
      14             :  * You should have received a copy of the GNU General Public License
      15             :  * along with 0 A.D.  If not, see <http://www.gnu.org/licenses/>.
      16             :  */
      17             : 
      18             : #ifndef INCLUDED_GAMELOOP
      19             : #define INCLUDED_GAMELOOP
      20             : 
      21             : #include "ps/GameSetup/CmdLineArgs.h"
      22             : 
      23             : extern void (*Atlas_GLSetCurrent)(void* context);
      24             : 
      25             : class AtlasView;
      26             : 
      27             : void RendererIncrementalLoad();
      28             : 
      29           1 : struct GameLoopState
      30             : {
      31           1 :     GameLoopState() : running(false) {};
      32             : 
      33             :     CmdLineArgs args;
      34             : 
      35             :     bool running; // whether the Atlas game loop is still running
      36             :     AtlasView* view; // current 'view' (controls updates, rendering, etc)
      37             : 
      38             :     const void* glCanvas; // the wxGlCanvas to draw on
      39             :     float realFrameLength; ///< Real-time duration of the last frame, in seconds. Smoothed to avoid large jumps (TODO).
      40             : 
      41             :     struct Input
      42             :     {
      43             :         float scrollSpeed[6]; // [fwd, bwd, left, right, cw-rotation, ccw-rotation]. 0.0f for disabled.
      44             :         float zoomDelta;
      45             :     } input;
      46             : };
      47             : 
      48             : extern GameLoopState* g_AtlasGameLoop;
      49             : 
      50             : #endif // INCLUDED_GAMELOOP

Generated by: LCOV version 1.13