#include <C4Viewport.h>
Public Member Functions | |
C4ViewportList () | |
~C4ViewportList () | |
void | Clear () |
void | ClearPointers (C4Object *obj) |
void | Execute (bool DrawBackground) |
void | SortViewportsByPlayerControl () |
void | RecalculateViewports () |
void | DisableFoW () |
void | EnableFoW () |
bool | CreateViewport (int32_t player_nr, bool silent=false) |
bool | CloseViewport (int32_t player_nr, bool silent) |
int32_t | GetViewportCount () |
C4Viewport * | GetViewport (int32_t player_nr, C4Viewport *prev=nullptr) |
C4Viewport * | GetFirstViewport () |
bool | CloseViewport (C4Viewport *viewport) |
int32_t | GetAudibility (int32_t x, int32_t y, int32_t *pan, int32_t audibility_radius=0, int32_t *out_player=nullptr) |
bool | ViewportNextPlayer () |
bool | FreeScroll (C4Vec2D scroll_by) |
bool | ViewportZoomOut () |
bool | ViewportZoomIn () |
Protected Member Functions | |
void | MouseMoveToViewport (int32_t button, int32_t x, int32_t y, DWORD key_param) |
void | DrawFullscreenBackground () |
Protected Attributes | |
C4Viewport * | FirstViewport {nullptr} |
C4Facet | ViewportArea |
C4RectList | BackgroundAreas |
Friends | |
class | C4GUI::Screen |
class | C4GraphicsSystem |
Definition at line 144 of file C4Viewport.h.
C4ViewportList::C4ViewportList | ( | ) |
Definition at line 1027 of file C4Viewport.cpp.
References C4Facet::Default(), and ViewportArea.
|
default |
void C4ViewportList::Clear | ( | ) |
Definition at line 1032 of file C4Viewport.cpp.
References FirstViewport, and C4Viewport::Next.
Referenced by C4GraphicsSystem::Clear().
void C4ViewportList::ClearPointers | ( | C4Object * | obj | ) |
Definition at line 1178 of file C4Viewport.cpp.
References FirstViewport, and C4Viewport::Next.
Referenced by C4Game::ClearPointers().
bool C4ViewportList::CloseViewport | ( | C4Viewport * | viewport | ) |
Definition at line 1073 of file C4Viewport.cpp.
References C4Draw::EnsureMainContextSelected(), FirstViewport, C4Viewport::Next, pDraw, RecalculateViewports(), and StartSoundEffect().
bool C4ViewportList::CloseViewport | ( | int32_t | player_nr, |
bool | silent | ||
) |
Definition at line 1186 of file C4Viewport.cpp.
References FirstViewport, GetViewportCount(), C4Viewport::Next, NO_OWNER, RecalculateViewports(), and StartSoundEffect().
Referenced by C4ViewportWindow::Close(), C4PlayerList::Remove(), and C4FullScreen::ViewportCheck().
bool C4ViewportList::CreateViewport | ( | int32_t | player_nr, |
bool | silent = false |
||
) |
Definition at line 1119 of file C4Viewport.cpp.
References C4Viewport::CenterPosition(), FirstViewport, C4PlayerList::Get(), GetViewportCount(), C4Viewport::Init(), C4Viewport::Next, C4ScriptGuiWindowPropertyName::player, Players, RecalculateViewports(), and StartSoundEffect().
Referenced by ConsoleDlgProc(), C4Console::InitGame(), C4Game::InitGameFinal(), C4Game::JoinPlayer(), C4FullScreen::ViewportCheck(), and C4Console::ViewportNew().
void C4ViewportList::DisableFoW | ( | ) |
Definition at line 1162 of file C4Viewport.cpp.
References FirstViewport, and C4Viewport::Next.
Referenced by C4Game::LoadScenarioSection().
|
protected |
Definition at line 1064 of file C4Viewport.cpp.
References BackgroundAreas, C4Draw::BlitSurfaceTile(), C4GraphicsResource::fctBackground, FullScreen, C4RectList::Get(), C4RectList::GetCount(), GraphicsResource, C4Rect::Hgt, pDraw, C4Window::pSurface, C4Facet::Surface, C4Rect::Wdt, C4Rect::x, and C4Rect::y.
Referenced by Execute().
void C4ViewportList::EnableFoW | ( | ) |
Definition at line 1170 of file C4Viewport.cpp.
References FirstViewport, and C4Viewport::Next.
Referenced by C4Game::LoadScenarioSection().
void C4ViewportList::Execute | ( | bool | DrawBackground | ) |
Definition at line 1044 of file C4Viewport.cpp.
References DrawFullscreenBackground(), FirstViewport, and C4Viewport::Next.
Referenced by C4GraphicsSystem::Execute().
bool C4ViewportList::FreeScroll | ( | C4Vec2D | scroll_by | ) |
Definition at line 1421 of file C4Viewport.cpp.
References C4Game::C4S, C4SHead::Film, C4Game::FrameCounter, Game, GetFirstViewport(), GetViewport(), C4Scenario::Head, NO_OWNER, C4SHead::Replay, C4Viewport::ScrollView(), C4Vec2D::x, and C4Vec2D::y.
Referenced by C4Game::InitKeyboard().
int32_t C4ViewportList::GetAudibility | ( | int32_t | x, |
int32_t | y, | ||
int32_t * | pan, | ||
int32_t | audibility_radius = 0 , |
||
int32_t * | out_player = nullptr |
||
) |
Definition at line 1340 of file C4Viewport.cpp.
References C4AudibilityRadius, Distance(), FirstViewport, and C4Viewport::Next.
Referenced by C4Object::Init(), and C4SoundInstance::SetVolumeByPos().
|
inline |
Definition at line 159 of file C4Viewport.h.
References FirstViewport.
Referenced by C4GraphicsSystem::DoSaveScreenshot(), FreeScroll(), C4Menu::GetViewport(), and ViewportNextPlayer().
C4Viewport * C4ViewportList::GetViewport | ( | int32_t | player_nr, |
C4Viewport * | prev = nullptr |
||
) |
Definition at line 1328 of file C4Viewport.cpp.
References FirstViewport, C4Viewport::Next, NO_OWNER, and C4ScriptGuiWindowPropertyName::player.
Referenced by C4MainMenu::ActivateObserver(), C4Game::DoKeyboardInput(), C4MainMenu::DoRefillInternal(), FreeScroll(), C4MainMenu::MenuCommand(), C4MouseControl::Move(), C4ScriptGuiWindow::OnMouseIn(), C4Player::SetViewMode(), C4MouseControl::UpdateClip(), C4FullScreen::ViewportCheck(), ViewportNextPlayer(), ViewportWinProc(), C4Player::ZoomLimitsToViewports(), and C4Player::ZoomToViewports().
int32_t C4ViewportList::GetViewportCount | ( | ) |
Definition at line 1318 of file C4Viewport.cpp.
References FirstViewport, and C4Viewport::Next.
Referenced by CloseViewport(), CreateViewport(), C4GraphicsSystem::FlashMessage(), and C4FullScreen::ViewportCheck().
|
protected |
Definition at line 1463 of file C4Viewport.cpp.
References FirstViewport, C4MouseControl::IsViewport(), MouseControl, C4MouseControl::Move(), and C4Viewport::Next.
Referenced by C4GUI::Screen::MouseMove(), and C4GUI::Screen::SetMouseInGUI().
void C4ViewportList::RecalculateViewports | ( | ) |
Definition at line 1226 of file C4Viewport.cpp.
References C4RectList::AddRect(), Application, BackgroundAreas, C4UpperBoardHeight, C4RectList::Clear(), C4RectList::ClipByRect(), Config, FirstViewport, FullScreen, Game, C4GUI::GetScreenHgt(), C4GUI::GetScreenWdt(), C4Config::Graphics, GraphicsSystem, C4Facet::Hgt, C4Rect::Hgt, C4GraphicsSystem::InvalidateBg(), C4Application::isEditor, C4Viewport::Next, pGUI, C4Window::pSurface, C4Game::ScriptGuiRoot, C4Facet::Set(), C4Viewport::SetOutputSize(), C4GUI::Screen::SetPreferredDlgRect(), SortViewportsByPlayerControl(), C4ConfigGraphics::SplitscreenDividers, C4ConfigGraphics::UpperBoard, ViewportArea, C4Facet::Wdt, C4Rect::Wdt, C4Facet::X, C4Rect::x, C4Facet::Y, and C4Rect::y.
Referenced by CloseViewport(), CreateViewport(), C4GraphicsSystem::DoSaveScreenshot(), C4Game::InitFullscreenComponents(), C4Game::LoadScenarioSection(), C4MainMenu::MenuCommand(), and C4Game::OnResolutionChanged().
void C4ViewportList::SortViewportsByPlayerControl | ( | ) |
Definition at line 1368 of file C4Viewport.cpp.
References C4Player::ControlSet, FirstViewport, C4PlayerList::Get(), C4PlayerControlAssignmentSet::GetLayoutOrder(), C4Viewport::Next, and Players.
Referenced by RecalculateViewports().
bool C4ViewportList::ViewportNextPlayer | ( | ) |
Definition at line 1404 of file C4Viewport.cpp.
References C4Game::C4S, C4SHead::Film, Game, GetFirstViewport(), GetViewport(), C4Scenario::Head, C4Viewport::NextPlayer(), NO_OWNER, and C4SHead::Replay.
Referenced by C4Game::InitKeyboard().
bool C4ViewportList::ViewportZoomIn | ( | ) |
Definition at line 1457 of file C4Viewport.cpp.
References C4GFX_ZoomStep, FirstViewport, and C4Viewport::Next.
Referenced by C4Game::InitKeyboard().
bool C4ViewportList::ViewportZoomOut | ( | ) |
Definition at line 1451 of file C4Viewport.cpp.
References C4GFX_ZoomStep, FirstViewport, and C4Viewport::Next.
Referenced by C4Game::InitKeyboard().
|
friend |
Definition at line 177 of file C4Viewport.h.
|
friend |
Definition at line 176 of file C4Viewport.h.
|
protected |
Definition at line 175 of file C4Viewport.h.
Referenced by DrawFullscreenBackground(), and RecalculateViewports().
|
protected |
Definition at line 173 of file C4Viewport.h.
Referenced by Clear(), ClearPointers(), CloseViewport(), CreateViewport(), DisableFoW(), EnableFoW(), Execute(), GetAudibility(), GetFirstViewport(), GetViewport(), GetViewportCount(), MouseMoveToViewport(), RecalculateViewports(), SortViewportsByPlayerControl(), ViewportZoomIn(), and ViewportZoomOut().
|
protected |
Definition at line 174 of file C4Viewport.h.
Referenced by C4ViewportList(), and RecalculateViewports().