OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4GraphicsSystem.cpp
Go to the documentation of this file.
1 /*
2  * OpenClonk, http://www.openclonk.org
3  *
4  * Copyright (c) 1998-2000, Matthes Bender
5  * Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de/
6  * Copyright (c) 2009-2016, The OpenClonk Team and contributors
7  *
8  * Distributed under the terms of the ISC license; see accompanying file
9  * "COPYING" for details.
10  *
11  * "Clonk" is a registered trademark of Matthes Bender, used with permission.
12  * See accompanying file "TRADEMARK" for details.
13  *
14  * To redistribute this file separately, substitute the full license texts
15  * for the above references.
16  */
17 
18 /* Operates viewports, message board and draws the game */
19 
20 #include "C4Include.h"
22 #include "game/C4GraphicsSystem.h"
23 
24 #include "game/C4Viewport.h"
25 #include "game/C4Application.h"
26 #include "editor/C4Console.h"
27 #include "game/C4FullScreen.h"
28 #include "gui/C4Gui.h"
29 #include "gui/C4LoaderScreen.h"
31 #include "landscape/C4Landscape.h"
32 #include "landscape/C4Sky.h"
33 #include "network/C4Network2.h"
34 #include "game/C4Game.h"
35 #include "object/C4GameObjects.h"
36 #include "graphics/StdPNG.h"
37 #include "graphics/C4Draw.h"
38 
39 static const int MAX_BACKGROUND_FPS = 5;
40 
42 {
43  Default();
44 }
45 
47 {
48  Clear();
49 }
50 
52 {
53  // Success
54  return true;
55 }
56 
58 {
59  // Clear message board
60  MessageBoard.reset();
61  // clear loader
62  if (pLoaderScreen) { delete pLoaderScreen; pLoaderScreen=nullptr; }
63  // Close viewports
65  // No debug stuff
67 }
68 
70 {
71  // only if ddraw is ready
72  if (!pDraw) return false;
73  if (!pDraw->Active) return false;
74 
75  // if the window is not focused, draw no more than MAX_BACKGROUND_FPS frames per second
76  if (!Application.Active && (C4TimeMilliseconds::Now() - lastFrame) < 1000 / MAX_BACKGROUND_FPS)
77  return false;
78 
79  // drawing OK
80  return true;
81 }
82 
84 {
86  lastFrame = C4TimeMilliseconds::Now();
87 }
88 
90 {
91  // activity check
92  if (!StartDrawing()) return;
93 
94  bool fBGDrawn = false;
95 
96  // If lobby running, message board only (page flip done by startup message board)
97  if (!::pGUI->HasFullscreenDialog(true)) // allow for message board behind GUI
98  if (::Network.isLobbyActive() || !Game.IsRunning)
99  if (!Application.isEditor)
100  {
101  // Message board
102  if (iRedrawBackground) ClearFullscreenBackground();
103  MessageBoard->Execute();
104  if (!C4GUI::IsActive())
105  { FinishDrawing(); return; }
106  fBGDrawn = true;
107  }
108 
109  // fullscreen GUI?
111  {
112  if (!fBGDrawn && iRedrawBackground) ClearFullscreenBackground();
113  ::pGUI->Render(!fBGDrawn);
114  FinishDrawing();
115  return;
116  }
117 
118 
119  // Reset object audibility
121 
122  // some hack to ensure the mouse is drawn after a dialog close and before any
123  // movement messages
124  if (!C4GUI::IsActive())
125  ::pGUI->SetMouseInGUI(false, false);
126 
127  // Viewports
130 
131  if (!Application.isEditor)
132  {
133  // Upper board
135 
136  // Message board
137  MessageBoard->Execute();
138 
139  // Help & Messages
140  DrawHelp();
141  DrawHoldMessages();
142  DrawFlashMessage();
143  }
144 
145  // InGame-GUI
146  if (C4GUI::IsActive())
147  {
148  ::pGUI->Render(false);
149  }
150 
151  // done
152  FinishDrawing();
153 }
154 
156 {
157  MessageBoard.reset(new C4MessageBoard);
158  InvalidateBg();
159  ShowVertices=false;
160  ShowAction=false;
161  ShowCommand=false;
162  ShowEntrance=false;
163  ShowPathfinder=false;
164  ShowNetstatus=false;
165  Show8BitSurface=0;
166  ShowLights=false;
167  ShowMenuInfo=false;
168  ShowHelp=false;
169  FlashMessageText[0]=0;
170  FlashMessageTime=0; FlashMessageX=FlashMessageY=0;
171  pLoaderScreen=nullptr;
172 }
173 
174 void C4GraphicsSystem::ClearFullscreenBackground()
175 {
176  pDraw->FillBG(0);
178 }
179 
180 bool C4GraphicsSystem::InitLoaderScreen(const char *szLoaderSpec)
181 {
182  // create new loader; overwrite current only if successful
183  C4LoaderScreen *pNewLoader = new C4LoaderScreen();
184  pNewLoader->SetBlackScreen(false);
185  if (!pNewLoader->Init(szLoaderSpec)) { delete pNewLoader; return false; }
186  if (pLoaderScreen) delete pLoaderScreen;
187  pLoaderScreen = pNewLoader;
188  // done, success
189  return true;
190 }
191 
193 {
194  // reset black screen loader flag
196 }
197 
198 bool C4GraphicsSystem::SaveScreenshot(bool fSaveAll, float fSaveAllZoom)
199 {
200  // Find a unique screenshot filename by iterating over all possible names
201  // Keep static counter so multiple screenshots in succession do not use same filename even if the background thread hasn't started writing the file yet
202  char szFilename[_MAX_PATH+1];
203  static int32_t iScreenshotIndex=1;
204  const char *strFilePath = nullptr;
205  do
206  sprintf(szFilename,"Screenshot%03i.png",iScreenshotIndex++);
207  while (FileExists(strFilePath = Config.AtScreenshotPath(szFilename)));
208  bool fSuccess=DoSaveScreenshot(fSaveAll, strFilePath, fSaveAllZoom);
209  // log if successful/where it has been stored
210  if (!fSuccess)
211  LogF(LoadResStr("IDS_PRC_SCREENSHOTERROR"), Config.AtUserDataRelativePath(Config.AtScreenshotPath(szFilename)));
212  else
213  LogF(LoadResStr("IDS_PRC_SCREENSHOT"), Config.AtUserDataRelativePath(Config.AtScreenshotPath(szFilename)));
214  // return success
215  return !!fSuccess;
216 }
217 
218 bool C4GraphicsSystem::DoSaveScreenshot(bool fSaveAll, const char *szFilename, float fSaveAllZoom)
219 {
220  // Fullscreen only
221  if (Application.isEditor) return false;
222  // back surface must be present
223  if (!FullScreen.pSurface) return false;
224 
225  // save landscape
226  if (fSaveAll)
227  {
228  // Create full map screenshots at zoom 2x. Fractional zooms (like 1.7x) should work but might cause some trouble at screen borders.
229  float zoom = fSaveAllZoom;
230  // get viewport to draw in
231  C4Viewport *pVP=::Viewports.GetFirstViewport(); if (!pVP) return false;
232  // create image large enough to hold the landscape
233  std::unique_ptr<CPNGFile> png(new CPNGFile());
234  int32_t lWdt = ::Landscape.GetWidth() * zoom, lHgt = ::Landscape.GetHeight() * zoom;
235  if (!png->Create(lWdt, lHgt, false)) return false;
236  // get backbuffer size
237  int32_t bkWdt=C4GUI::GetScreenWdt(), bkHgt=C4GUI::GetScreenHgt();
238  if (!bkWdt || !bkHgt) return false;
239  // facet for blitting
240  C4TargetFacet bkFct;
241  // mark background to be redrawn
242  InvalidateBg();
243  // draw on one big viewport
244  pVP->SetOutputSize(0,0,0,0, bkWdt, bkHgt);
245  // backup and clear sky parallaxity
246  int32_t iParX=::Landscape.GetSky().ParX; ::Landscape.GetSky().ParX=10;
247  int32_t iParY=::Landscape.GetSky().ParY; ::Landscape.GetSky().ParY=10;
248  // backup and clear viewport borders
249  FLOAT_RECT vp_borders = { pVP->BorderLeft, pVP->BorderRight, pVP->BorderTop, pVP->BorderBottom };
250  pVP->BorderLeft = pVP->BorderRight = pVP->BorderTop = pVP->BorderBottom = 0.0f;
251  // temporarily change viewport player
252  int32_t iVpPlr=pVP->Player; pVP->Player=NO_OWNER;
253  // blit all tiles needed
254  for (int32_t iY=0; iY<lHgt; iY+=bkHgt) for (int32_t iX=0; iX<lWdt; iX+=bkWdt)
255  {
256  // get max width/height
257  int32_t bkWdt2=bkWdt,bkHgt2=bkHgt;
258  if (iX+bkWdt2>lWdt) bkWdt2-=iX+bkWdt2-lWdt;
259  if (iY+bkHgt2>lHgt) bkHgt2-=iY+bkHgt2-lHgt;
260  // update facet
261  bkFct.Set(FullScreen.pSurface, 0, 0, ceil(float(bkWdt2)/zoom), ceil(float(bkHgt2)/zoom), iX/zoom, iY/zoom, zoom, 0, 0);
262  // draw there
263  pVP->Draw(bkFct, true, false);
264  // render
266  // get output (locking primary!)
267  if (FullScreen.pSurface->Lock())
268  {
269  // transfer each pixel - slooow...
270  for (int32_t iY2 = 0; iY2 < bkHgt2; ++iY2)
271 #ifndef USE_CONSOLE
272  glReadPixels(0, FullScreen.pSurface->Hgt - iY2 - 1, bkWdt2, 1, GL_BGR, GL_UNSIGNED_BYTE, reinterpret_cast<BYTE *>(png->GetRow(iY + iY2)) + iX * 3);
273 #else
274  for (int32_t iX2=0; iX2<bkWdt2; ++iX2)
275  png->SetPix(iX+iX2, iY+iY2, FullScreen.pSurface->GetPixDw(iX2, iY2, false));
276 #endif
277  // done; unlock
279  // This can take a long time and we would like to pump messages
280  // However, we're currently hogging the primary surface and horrible things might happen if we do that, including initiation of another screenshot
281  // The only thing that can be safely run is music (sound could play but that would just make them out of sync of the game)
283  }
284  }
285  // restore viewport player
286  pVP->Player=iVpPlr;
287  // restore viewport borders
288  pVP->BorderLeft = vp_borders.left;
289  pVP->BorderTop = vp_borders.top;
290  pVP->BorderRight = vp_borders.right;
291  pVP->BorderBottom = vp_borders.bottom;
292  // restore parallaxity
293  ::Landscape.GetSky().ParX=iParX;
294  ::Landscape.GetSky().ParY=iParY;
295  // restore viewport size
297  // save!
298  CPNGFile::ScheduleSaving(png.release(), szFilename);
299  return true;
300  }
301  // Save primary surface in background thread
302  return FullScreen.pSurface->SavePNG(szFilename, false, false, true);
303 }
304 
306 {
307  ShowVertices=false;
308  ShowAction=false;
309  ShowCommand=false;
310  ShowEntrance=false;
311  ShowPathfinder=false; // allow pathfinder! - why this??
312  ShowLights=false;
313  Show8BitSurface=0;
314  ShowNetstatus=false;
315  ShowMenuInfo=false;
316 }
317 
318 void C4GraphicsSystem::DrawHoldMessages()
319 {
321  {
322  pDraw->TextOut("Pause", ::GraphicsResource.FontRegular,1.0,
327  }
328 }
329 
330 void C4GraphicsSystem::FlashMessage(const char *szMessage)
331 {
332  // Store message
333  SCopy(szMessage, FlashMessageText, C4MaxTitle);
334  // Calculate message time
335  FlashMessageTime = SLen(FlashMessageText) * 2;
336  // Initial position
337  FlashMessageX = -1;
338  FlashMessageY = 10;
339  // Upper board active: stay below upper board
341  FlashMessageY += C4UpperBoardHeight;
342  // More than one viewport: try to stay below portraits etc.
343  if (::Viewports.GetViewportCount() > 1)
344  FlashMessageY += 64;
345  // New flash message: redraw background (might be drawing one message on top of another)
346  InvalidateBg();
347 }
348 
349 void C4GraphicsSystem::FlashMessageOnOff(const char *strWhat, bool fOn)
350 {
351  StdStrBuf strMessage;
352  strMessage.Format("%s: %s", strWhat, LoadResStr(fOn ? "IDS_CTL_ON" : "IDS_CTL_OFF"));
353  FlashMessage(strMessage.getData());
354 }
355 
356 void C4GraphicsSystem::DrawFlashMessage()
357 {
358  if (!FlashMessageTime) return;
359  if (Application.isEditor) return;
360  pDraw->TextOut(FlashMessageText, ::GraphicsResource.FontRegular, 1.0, FullScreen.pSurface,
361  (FlashMessageX==-1) ? C4GUI::GetScreenWdt()/2 : FlashMessageX,
362  (FlashMessageY==-1) ? C4GUI::GetScreenHgt()/2 : FlashMessageY,
364  (FlashMessageX==-1) ? ACenter : ALeft);
365  FlashMessageTime--;
366  // Flash message timed out: redraw background
367  if (!FlashMessageTime) InvalidateBg();
368 }
369 
370 void C4GraphicsSystem::DrawHelp()
371 {
372  if (!ShowHelp) return;
373  if (Application.isEditor) return;
374  int32_t iX = ::Viewports.ViewportArea.X, iY = ::Viewports.ViewportArea.Y;
375  int32_t iWdt = ::Viewports.ViewportArea.Wdt;
376  StdStrBuf strText;
377  // left coloumn
378  strText.AppendFormat("[%s]\n\n", LoadResStr("IDS_CTL_GAMEFUNCTIONS"));
379  // main functions
380  strText.AppendFormat("<c ffff00>%s</c> - %s\n", GetKeyboardInputName("ToggleShowHelp").getData(), LoadResStr("IDS_CON_HELP"));
381  strText.AppendFormat("<c ffff00>%s</c> - %s\n", GetKeyboardInputName("MusicToggle").getData(), LoadResStr("IDS_CTL_MUSIC"));
382  strText.AppendFormat("<c ffff00>%s</c> - %s\n", GetKeyboardInputName("NetClientListDlgToggle").getData(), LoadResStr("IDS_DLG_NETWORK"));
383  // messages
384  StdCopyStrBuf strAltChatKey(GetKeyboardInputName("ChatOpen", false, 0));
385  strText.AppendFormat("\n<c ffff00>%s/%s</c> - %s\n", GetKeyboardInputName("ChatOpen", false, 1).getData(), strAltChatKey.getData(), LoadResStr("IDS_CTL_SENDMESSAGE"));
386  strText.AppendFormat("<c ffff00>%s</c> - %s\n", GetKeyboardInputName("MsgBoardScrollUp").getData(), LoadResStr("IDS_CTL_MESSAGEBOARDBACK"));
387  strText.AppendFormat("<c ffff00>%s</c> - %s\n", GetKeyboardInputName("MsgBoardScrollDown").getData(), LoadResStr("IDS_CTL_MESSAGEBOARDFORWARD"));
388  // irc chat
389  strText.AppendFormat("\n<c ffff00>%s</c> - %s\n", GetKeyboardInputName("ToggleChat").getData(), LoadResStr("IDS_CTL_IRCCHAT"));
390  // scoreboard
391  strText.AppendFormat("\n<c ffff00>%s</c> - %s\n", GetKeyboardInputName("ScoreboardToggle").getData(), LoadResStr("IDS_CTL_SCOREBOARD"));
392  // screenshots
393  strText.AppendFormat("\n<c ffff00>%s</c> - %s\n", GetKeyboardInputName("Screenshot").getData(), LoadResStr("IDS_CTL_SCREENSHOT"));
394  strText.AppendFormat("<c ffff00>%s</c> - %s\n", GetKeyboardInputName("ScreenshotEx").getData(), LoadResStr("IDS_CTL_SCREENSHOTEX"));
395 
397  iX + 128, iY + 64, C4Draw::DEFAULT_MESSAGE_COLOR, ALeft);
398 
399  // right coloumn
400  strText.Clear();
401  // game speed
402  strText.AppendFormat("\n\n<c ffff00>%s</c> - %s\n", GetKeyboardInputName("GameSpeedUp").getData(), LoadResStr("IDS_CTL_GAMESPEEDUP"));
403  strText.AppendFormat("<c ffff00>%s</c> - %s\n", GetKeyboardInputName("GameSlowDown").getData(), LoadResStr("IDS_CTL_GAMESPEEDDOWN"));
404  // debug
405  strText.AppendFormat("\n\n[%s]\n\n", "Debug");
406  strText.AppendFormat("<c ffff00>%s</c> - %s\n", GetKeyboardInputName("DbgModeToggle").getData(), LoadResStr("IDS_CTL_DEBUGMODE"));
407  strText.AppendFormat("<c ffff00>%s</c> - %s\n", GetKeyboardInputName("DbgShowVtxToggle").getData(), "Entrance+Vertices");
408  strText.AppendFormat("<c ffff00>%s</c> - %s\n", GetKeyboardInputName("DbgShowActionToggle").getData(), "Actions/Commands/Pathfinder/Lights/Menus");
409  strText.AppendFormat("<c ffff00>%s</c> - %s\n", GetKeyboardInputName("DbgShow8BitSurface").getData(), "8-bit surfaces");
411  iX + iWdt/2 + 64, iY + 64, C4Draw::DEFAULT_MESSAGE_COLOR, ALeft);
412 }
413 
415 {
417  return true;
418 }
419 
421 {
422  if (!Game.DebugMode && !Console.Active) { FlashMessage(LoadResStr("IDS_MSG_NODEBUGMODE")); return false; }
424  ShowEntrance = !ShowEntrance; // vertices and entrance now toggled together
425  FlashMessageOnOff("Entrance+Vertices", ShowVertices || ShowEntrance);
426  return true;
427 }
428 
430 {
431  if (!Game.DebugMode && !Console.Active) { FlashMessage(LoadResStr("IDS_MSG_NODEBUGMODE")); return false; }
433  { ShowAction = true; FlashMessage("Actions"); }
434  else if (ShowAction)
435  { ShowAction = false; ShowCommand = true; FlashMessage("Commands"); }
436  else if (ShowCommand)
437  { ShowCommand = false; ShowPathfinder = true; FlashMessage("Pathfinder"); }
438  else if (ShowPathfinder)
439  { ShowPathfinder = false; ShowLights = true; FlashMessage("Lights"); }
440  else if (ShowLights)
441  { ShowLights = false; ShowMenuInfo = true; FlashMessage("Menu Info"); }
442  else if (ShowMenuInfo)
443  { ShowMenuInfo = false; FlashMessageOnOff("Actions/Commands/Pathfinder/Lights/Menus", false); }
444  return true;
445 }
446 
448 {
449  if (!Game.DebugMode && !Console.Active) { FlashMessage(LoadResStr("IDS_MSG_NODEBUGMODE")); return false; }
450  Show8BitSurface = (Show8BitSurface + 1) % 3;
451  if (Show8BitSurface == 0)
452  FlashMessage("Default view");
453  else if (Show8BitSurface == 1)
454  FlashMessage("Foreground 8-bit landscape");
455  else if (Show8BitSurface == 2)
456  FlashMessage("Background 8-bit landscape");
457  return true;
458 }
459 
461 {
462  ShowHelp = !ShowHelp;
463  // Turned off? Invalidate background.
464  if (!ShowHelp) InvalidateBg();
465  return true;
466 }
467 
const char * getData() const
Definition: StdBuf.h:450
void Execute(bool force_buffer_checks=false)
bool IsRunning
Definition: C4Game.h:141
void Draw(C4TargetFacet &cgo, bool fDrawGame, bool fDrawOverlay)
Definition: C4Viewport.cpp:200
C4Viewport * GetFirstViewport()
Definition: C4Viewport.h:156
C4Config Config
Definition: C4Config.cpp:831
int GetLineHeight() const
Definition: C4FontLoader.h:132
float Y
Definition: C4Facet.h:120
void SCopy(const char *szSource, char *sTarget, size_t iMaxL)
Definition: Standard.cpp:122
const size_t C4MaxTitle
Definition: C4Constants.h:25
bool Active
Definition: C4Draw.h:96
C4Console Console
Definition: C4Globals.cpp:45
C4Game Game
Definition: C4Globals.cpp:52
float bottom
Definition: C4Rect.h:27
void Clear()
Definition: StdBuf.h:474
#define sprintf
Definition: Standard.h:171
float right
Definition: C4Rect.h:27
bool isLobbyActive() const
Definition: C4Network2.h:204
void RecalculateViewports()
Definition: C4Viewport.cpp:992
C4Facet ViewportArea
Definition: C4Viewport.h:171
void ResetAudibility()
bool Lock()
Definition: C4Surface.cpp:463
float left
Definition: C4Rect.h:27
bool SavePNG(C4Group &hGroup, const char *szFilename, bool fSaveAlpha=true, bool fSaveOverlayOnly=false)
C4Surface * pSurface
Definition: C4Window.h:279
const char * AtUserDataRelativePath(const char *szFilename)
Definition: C4Config.cpp:642
bool TextOut(const char *szText, CStdFont &rFont, float fZoom, C4Surface *sfcDest, float iTx, float iTy, DWORD dwFCol=0xffffffff, BYTE byForm=ALeft, bool fDoMarkup=true)
Definition: C4Draw.cpp:570
C4FullScreen FullScreen
Definition: C4Globals.cpp:46
bool Unlock()
Definition: C4Surface.cpp:474
int32_t GetScreenWdt()
Definition: C4Gui.h:2821
bool DoSaveScreenshot(bool fSaveAll, const char *szFilename, float fSaveAllZoom)
void Format(const char *szFmt,...) GNUC_FORMAT_ATTRIBUTE_O
Definition: StdBuf.cpp:181
void FlashMessageOnOff(const char *strWhat, bool fOn)
#define _MAX_PATH
const int C4UpperBoardHeight
Definition: C4Constants.h:59
size_t SLen(const char *sptr)
Definition: Standard.h:78
static void ScheduleSaving(CPNGFile *png, const char *filename)
Definition: StdPNG.cpp:352
int Hgt
Definition: C4Surface.h:67
C4GraphicsResource GraphicsResource
C4UpperBoard UpperBoard
const char * LoadResStr(const char *id)
Definition: C4Language.h:83
void AppendFormat(const char *szFmt,...) GNUC_FORMAT_ATTRIBUTE_O
Definition: StdBuf.cpp:197
int32_t UpperBoard
Definition: C4Config.h:102
bool IsActive()
Definition: C4Gui.h:2817
C4ConfigGraphics Graphics
Definition: C4Config.h:254
C4GUIScreen * pGUI
Definition: C4Gui.cpp:1194
bool SaveScreenshot(bool fSaveAll, float fSaveAllZoom)
C4Network2 Network
Definition: C4Globals.cpp:53
bool Active
Definition: C4App.h:63
bool InitLoaderScreen(const char *szLoaderSpec)
const int ACenter
Definition: C4Surface.h:43
bool PageFlip(C4Rect *pSrcRt=nullptr, C4Rect *pDstRt=nullptr)
Definition: C4Surface.cpp:320
C4Landscape Landscape
C4GraphicsSystem GraphicsSystem
Definition: C4Globals.cpp:51
void Set(const C4Facet &cpy)
Definition: C4Facet.h:184
class C4Sky & GetSky()
const int NO_OWNER
Definition: C4Constants.h:138
C4Draw * pDraw
Definition: C4Draw.cpp:45
bool HasFullscreenDialog(bool fIncludeFading)
Definition: C4Gui.cpp:1035
C4LoaderScreen * pLoaderScreen
DWORD GetPixDw(int iX, int iY, bool fApplyModulation)
Definition: C4Surface.cpp:501
int32_t GetScreenHgt()
Definition: C4Gui.h:2822
virtual void FillBG(DWORD dwClr=0)=0
int32_t ParX
Definition: C4Sky.h:58
int32_t GetHeight() const
C4ViewportList Viewports
Definition: C4Viewport.cpp:841
float BorderBottom
Definition: C4Viewport.h:38
const char * AtScreenshotPath(const char *szFilename)
Definition: C4Config.cpp:553
void Render(bool fDoBG)
Definition: C4Gui.cpp:733
void FlashMessage(const char *szMessage)
int32_t ParY
Definition: C4Sky.h:58
std::unique_ptr< C4MessageBoard > MessageBoard
const int ALeft
Definition: C4Surface.h:43
bool FileExists(const char *szFilename)
Definition: StdFile.cpp:439
bool Active
Definition: C4Window.h:278
bool Init(const char *szLoaderSpec)
int32_t GetViewportCount()
int32_t HaltCount
Definition: C4Game.h:114
void SetBlackScreen(bool fIsBlack)
void Execute(bool DrawBackground)
Definition: C4Viewport.cpp:863
float BorderTop
Definition: C4Viewport.h:38
int32_t Player
Definition: C4Viewport.h:105
void SetMouseInGUI(bool fInGUI, bool fByMouse)
Definition: C4Gui.cpp:827
bool LogF(const char *strMessage,...)
Definition: C4Log.cpp:253
float Wdt
Definition: C4Facet.h:120
float X
Definition: C4Facet.h:120
StdStrBuf GetKeyboardInputName(const char *szKeyName, bool fShort=false, int32_t iIndex=0)
Definition: C4Game.h:299
void SetOutputSize(int32_t iDrawX, int32_t iDrawY, int32_t iOutX, int32_t iOutY, int32_t iOutWdt, int32_t iOutHgt)
Definition: C4Viewport.cpp:778
C4Application Application
Definition: C4Globals.cpp:44
float top
Definition: C4Rect.h:27
static C4TimeMilliseconds Now()
int32_t GetWidth() const
bool DebugMode
Definition: C4Game.h:146
float BorderRight
Definition: C4Viewport.h:38
C4GameObjects Objects
Definition: C4Globals.cpp:48
float BorderLeft
Definition: C4Viewport.h:38
C4MusicSystem MusicSystem
Definition: C4Application.h:41