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