#include <C4GraphicsSystem.h>
Public Member Functions | |
C4GraphicsSystem () | |
~C4GraphicsSystem () | |
void | Default () |
void | Clear () |
bool | StartDrawing () |
void | FinishDrawing () |
void | Execute () |
void | FlashMessage (const char *message) |
void | FlashMessageOnOff (const char *description, bool switch_on) |
void | DeactivateDebugOutput () |
bool | Init () |
bool | InitLoaderScreen (const char *image_name) |
void | EnableLoaderDrawing () |
bool | SaveScreenshotKey (bool save_all) |
bool | SaveScreenshot (bool save_all, float zoom_factor_all) |
bool | DoSaveScreenshot (bool save_all, const char *filename, float zoom_factor_all) |
void | InvalidateBg () |
void | OverwriteBg () |
bool | ToggleShow8BitSurface () |
bool | ToggleShowNetStatus () |
bool | ToggleShowVertices () |
bool | ToggleShowAction () |
bool | ToggleShowHelp () |
Public Attributes | |
std::unique_ptr< C4MessageBoard > | MessageBoard |
C4UpperBoard | UpperBoard |
int32_t | iRedrawBackground |
bool | ShowHelp |
bool | ShowVertices |
bool | ShowAction |
bool | ShowCommand |
bool | ShowEntrance |
bool | ShowPathfinder |
bool | ShowNetstatus |
int | Show8BitSurface |
bool | ShowLights |
bool | ShowMenuInfo |
C4LoaderScreen * | pLoaderScreen |
Friends | |
class | C4FullScreen |
Definition at line 26 of file C4GraphicsSystem.h.
C4GraphicsSystem::C4GraphicsSystem | ( | ) |
Definition at line 40 of file C4GraphicsSystem.cpp.
References Default().
C4GraphicsSystem::~C4GraphicsSystem | ( | ) |
Definition at line 45 of file C4GraphicsSystem.cpp.
References Clear().
void C4GraphicsSystem::Clear | ( | ) |
Definition at line 56 of file C4GraphicsSystem.cpp.
References C4ViewportList::Clear(), DeactivateDebugOutput(), MessageBoard, pLoaderScreen, and Viewports.
Referenced by C4Game::Clear(), and ~C4GraphicsSystem().
void C4GraphicsSystem::DeactivateDebugOutput | ( | ) |
Definition at line 410 of file C4GraphicsSystem.cpp.
References Show8BitSurface, ShowAction, ShowCommand, ShowEntrance, ShowLights, ShowMenuInfo, ShowNetstatus, ShowPathfinder, and ShowVertices.
Referenced by Clear(), and C4Game::ToggleDebugMode().
void C4GraphicsSystem::Default | ( | ) |
Definition at line 190 of file C4GraphicsSystem.cpp.
References InvalidateBg(), MessageBoard, pLoaderScreen, Show8BitSurface, ShowAction, ShowCommand, ShowEntrance, ShowHelp, ShowLights, ShowMenuInfo, ShowNetstatus, ShowPathfinder, and ShowVertices.
Referenced by C4GraphicsSystem(), and C4Game::Default().
bool C4GraphicsSystem::DoSaveScreenshot | ( | bool | save_all, |
const char * | filename, | ||
float | zoom_factor_all | ||
) |
Definition at line 273 of file C4GraphicsSystem.cpp.
References Application, C4Viewport::BorderBottom, C4Viewport::BorderLeft, C4Viewport::BorderRight, C4Viewport::BorderTop, FLOAT_RECT::bottom, C4Viewport::Draw(), C4MusicSystem::Execute(), FullScreen, C4ViewportList::GetFirstViewport(), C4Landscape::GetHeight(), C4Surface::GetPixDw(), C4GUI::GetScreenHgt(), C4GUI::GetScreenWdt(), C4Landscape::GetSky(), C4Landscape::GetWidth(), C4Surface::Hgt, InvalidateBg(), C4Application::isEditor, Landscape, FLOAT_RECT::left, LoadResStr(), C4Surface::Lock(), Log(), C4Application::MusicSystem, NO_OWNER, C4Surface::PageFlip(), C4Sky::ParX, C4Sky::ParY, C4Viewport::Player, C4Window::pSurface, C4ViewportList::RecalculateViewports(), FLOAT_RECT::right, C4Surface::SavePNG(), CPNGFile::ScheduleSaving(), C4TargetFacet::Set(), C4Viewport::SetOutputSize(), FLOAT_RECT::top, C4Surface::Unlock(), and Viewports.
Referenced by SaveScreenshot().
void C4GraphicsSystem::EnableLoaderDrawing | ( | ) |
Definition at line 236 of file C4GraphicsSystem.cpp.
References pLoaderScreen, and C4LoaderScreen::SetBlackScreen().
Referenced by C4Startup::DoStartup().
void C4GraphicsSystem::Execute | ( | ) |
Definition at line 103 of file C4GraphicsSystem.cpp.
References Application, C4UpperBoard::Execute(), C4ViewportList::Execute(), FinishDrawing(), Game, C4GUI::Screen::HasFullscreenDialog(), iRedrawBackground, C4GUI::IsActive(), C4Application::isEditor, C4Network2::isLobbyActive(), C4Game::IsRunning, MessageBoard, Network, Objects, pGUI, C4GUI::Screen::Render(), C4GameObjects::ResetAudibility(), C4GUI::Screen::SetMouseInGUI(), StartDrawing(), UpperBoard, and Viewports.
Referenced by C4MessageBoard::EnsureLastMessage(), C4Console::Execute(), and C4FullScreen::PerformUpdate().
void C4GraphicsSystem::FinishDrawing | ( | ) |
Definition at line 94 of file C4GraphicsSystem.cpp.
References Application, FullScreen, C4Application::isEditor, C4TimeMilliseconds::Now(), C4Surface::PageFlip(), and C4Window::pSurface.
Referenced by Execute().
void C4GraphicsSystem::FlashMessage | ( | const char * | message | ) |
Definition at line 435 of file C4GraphicsSystem.cpp.
References C4MaxTitle, C4UpperBoardHeight, Config, C4ViewportList::GetViewportCount(), C4Config::Graphics, InvalidateBg(), SCopy(), SLen(), C4ConfigGraphics::UpperBoard, and Viewports.
Referenced by C4Network2::AllowJoin(), C4GameControlNetwork::CalcPerformance(), C4Viewport::Init(), C4Game::QuickSave(), C4Game::SlowDown(), C4Game::SpeedUp(), C4Game::ToggleDebugMode(), ToggleShow8BitSurface(), ToggleShowAction(), ToggleShowVertices(), and C4FullScreen::ViewportCheck().
void C4GraphicsSystem::FlashMessageOnOff | ( | const char * | description, |
bool | switch_on | ||
) |
Definition at line 458 of file C4GraphicsSystem.cpp.
Referenced by C4Game::ToggleDebugMode(), C4MusicSystem::ToggleOnOff(), ToggleShowAction(), and ToggleShowVertices().
bool C4GraphicsSystem::Init | ( | ) |
Definition at line 50 of file C4GraphicsSystem.cpp.
Referenced by C4Game::PreInit().
bool C4GraphicsSystem::InitLoaderScreen | ( | const char * | image_name | ) |
Definition at line 217 of file C4GraphicsSystem.cpp.
References C4LoaderScreen::Init(), pLoaderScreen, and C4LoaderScreen::SetBlackScreen().
Referenced by C4Game::Init(), and C4Application::PreInit().
|
inline |
Definition at line 59 of file C4GraphicsSystem.h.
References iRedrawBackground.
Referenced by C4GUI::Screen::CloseDialog(), Default(), DoSaveScreenshot(), C4GUI::Screen::DrawToolTip(), C4GUI::Screen::ElementPosChanged(), FlashMessage(), C4Game::Init(), OverwriteBg(), C4ViewportList::RecalculateViewports(), and ToggleShowHelp().
|
inline |
Definition at line 60 of file C4GraphicsSystem.h.
References InvalidateBg().
Referenced by C4MessageBoard::Draw().
bool C4GraphicsSystem::SaveScreenshot | ( | bool | save_all, |
float | zoom_factor_all | ||
) |
Definition at line 245 of file C4GraphicsSystem.cpp.
References _MAX_PATH_LEN, C4Config::AtScreenshotPath(), C4Config::AtUserDataRelativePath(), Config, DoSaveScreenshot(), FileExists(), LoadResStr(), LogF(), and sprintf.
Referenced by C4MessageInput::ProcessCommand(), and SaveScreenshotKey().
|
inline |
Definition at line 56 of file C4GraphicsSystem.h.
References SaveScreenshot().
Referenced by C4Game::InitKeyboard().
bool C4GraphicsSystem::StartDrawing | ( | ) |
Definition at line 72 of file C4GraphicsSystem.cpp.
References C4Draw::Active, C4AbstractApp::Active, Application, C4TimeMilliseconds::Now(), and pDraw.
Referenced by Execute().
bool C4GraphicsSystem::ToggleShow8BitSurface | ( | ) |
Definition at line 592 of file C4GraphicsSystem.cpp.
References C4Window::Active, Console, C4Game::DebugMode, FlashMessage(), Game, LoadResStr(), and Show8BitSurface.
Referenced by C4Game::InitKeyboard().
bool C4GraphicsSystem::ToggleShowAction | ( | ) |
Definition at line 548 of file C4GraphicsSystem.cpp.
References C4Window::Active, Console, C4Game::DebugMode, FlashMessage(), FlashMessageOnOff(), Game, LoadResStr(), ShowAction, ShowCommand, ShowLights, ShowMenuInfo, and ShowPathfinder.
Referenced by C4Game::InitKeyboard().
bool C4GraphicsSystem::ToggleShowHelp | ( | ) |
Definition at line 615 of file C4GraphicsSystem.cpp.
References InvalidateBg(), and ShowHelp.
Referenced by C4Game::InitKeyboard().
bool C4GraphicsSystem::ToggleShowNetStatus | ( | ) |
Definition at line 529 of file C4GraphicsSystem.cpp.
References ShowNetstatus.
Referenced by C4Game::InitKeyboard().
bool C4GraphicsSystem::ToggleShowVertices | ( | ) |
Definition at line 535 of file C4GraphicsSystem.cpp.
References C4Window::Active, Console, C4Game::DebugMode, FlashMessage(), FlashMessageOnOff(), Game, LoadResStr(), ShowEntrance, and ShowVertices.
Referenced by C4Game::InitKeyboard().
|
friend |
Definition at line 80 of file C4GraphicsSystem.h.
int32_t C4GraphicsSystem::iRedrawBackground |
Definition at line 33 of file C4GraphicsSystem.h.
Referenced by Execute(), and InvalidateBg().
std::unique_ptr<C4MessageBoard> C4GraphicsSystem::MessageBoard |
Definition at line 31 of file C4GraphicsSystem.h.
Referenced by Clear(), Default(), Execute(), C4MessageBoard::Init(), C4Game::InitFullscreenComponents(), Log(), C4Application::PreInit(), C4MessageInput::ProcessCommand(), C4Game::QuickSave(), C4Player::Save(), and C4Game::SetInitProgress().
C4LoaderScreen* C4GraphicsSystem::pLoaderScreen |
Definition at line 44 of file C4GraphicsSystem.h.
Referenced by Clear(), Default(), C4MessageBoard::Draw(), C4GUI::Screen::Draw(), EnableLoaderDrawing(), C4Game::Init(), and InitLoaderScreen().
int C4GraphicsSystem::Show8BitSurface |
Definition at line 41 of file C4GraphicsSystem.h.
Referenced by DeactivateDebugOutput(), Default(), C4Landscape::Draw(), C4Object::Draw(), C4Object::DrawTopFace(), and ToggleShow8BitSurface().
bool C4GraphicsSystem::ShowAction |
Definition at line 36 of file C4GraphicsSystem.h.
Referenced by DeactivateDebugOutput(), Default(), and ToggleShowAction().
bool C4GraphicsSystem::ShowCommand |
Definition at line 37 of file C4GraphicsSystem.h.
Referenced by DeactivateDebugOutput(), Default(), C4Object::Draw(), and ToggleShowAction().
bool C4GraphicsSystem::ShowEntrance |
Definition at line 38 of file C4GraphicsSystem.h.
Referenced by DeactivateDebugOutput(), Default(), and ToggleShowVertices().
bool C4GraphicsSystem::ShowHelp |
Definition at line 34 of file C4GraphicsSystem.h.
Referenced by Default(), and ToggleShowHelp().
bool C4GraphicsSystem::ShowLights |
Definition at line 42 of file C4GraphicsSystem.h.
Referenced by DeactivateDebugOutput(), Default(), C4Viewport::Draw(), and ToggleShowAction().
bool C4GraphicsSystem::ShowMenuInfo |
Definition at line 43 of file C4GraphicsSystem.h.
Referenced by DeactivateDebugOutput(), Default(), C4ScriptGuiWindow::Draw(), and ToggleShowAction().
bool C4GraphicsSystem::ShowNetstatus |
Definition at line 40 of file C4GraphicsSystem.h.
Referenced by DeactivateDebugOutput(), Default(), C4Viewport::Draw(), and ToggleShowNetStatus().
bool C4GraphicsSystem::ShowPathfinder |
Definition at line 39 of file C4GraphicsSystem.h.
Referenced by DeactivateDebugOutput(), Default(), C4Viewport::Draw(), and ToggleShowAction().
bool C4GraphicsSystem::ShowVertices |
Definition at line 35 of file C4GraphicsSystem.h.
Referenced by DeactivateDebugOutput(), Default(), C4Object::Draw(), and ToggleShowVertices().
C4UpperBoard C4GraphicsSystem::UpperBoard |
Definition at line 32 of file C4GraphicsSystem.h.
Referenced by Execute(), and C4Game::InitFullscreenComponents().