CMT.h 931 B

123456789101112131415161718192021222324252627
  1. /*
  2. * CMT.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. struct SDL_Texture;
  12. struct SDL_Renderer;
  13. struct SDL_Surface;
  14. extern SDL_Texture * screenTexture;
  15. extern SDL_Renderer * mainRenderer;
  16. extern SDL_Surface *screen; // main screen surface
  17. extern SDL_Surface *screen2; // and hlp surface (used to store not-active interfaces layer)
  18. extern SDL_Surface *screenBuf; // points to screen (if only advmapint is present) or screen2 (else) - should be used when updating controls which are not regularly redrawed
  19. void handleQuit(bool ask = true);
  20. /// Notify user about encountered fatal error and terminate the game
  21. /// TODO: decide on better location for this method
  22. [[noreturn]] void handleFatalError(const std::string & message, bool terminate);