____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
A futuristic real-time strategy game.
This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project.
Distributed under the "GNU General Public License"
#include "SDL.h"
#include "SDL_opengl.h"
#include "guichan/image.h"
Go to the source code of this file.
Classes | |
| class | CGraphic |
| class | CPlayerColorGraphic |
| class | CColor |
| class | CUnitColors |
| struct | _event_callback_ |
| class | CVideo |
Defines | |
| #define | RSHIFT 0 |
| #define | GSHIFT 8 |
| #define | BSHIFT 16 |
| #define | ASHIFT 24 |
| #define | RMASK 0x000000ff |
| #define | GMASK 0x0000ff00 |
| #define | BMASK 0x00ff0000 |
| #define | AMASK 0xff000000 |
Typedefs | |
| typedef struct _event_callback_ | EventCallback |
Functions | |
| void | SetPlayersPalette (void) |
| The SDL screen. | |
| void | InitVideo (void) |
| Check if a resolution is valid. | |
| int | VideoValidResolution (int w, int h) |
| Load graphic from PNG file. | |
| int | LoadGraphicPNG (CGraphic *g) |
| Make an OpenGL texture. | |
| void | MakeTexture (CGraphic *graphic) |
| Make an OpenGL texture of the player color pixels only. | |
| void | MakePlayerColorTexture (CPlayerColorGraphic *graphic, int player) |
| Free OpenGL graphics. | |
| void | FreeOpenGLGraphics () |
| Reload OpenGL graphics. | |
| void | ReloadGraphics () |
| Reload OpenGL. | |
| void | ReloadOpenGL () |
| Initializes video synchronization. | |
| void | SetVideoSync (void) |
| Init line draw. | |
| void | InitLineDraw (void) |
| Simply invalidates whole window or screen. | |
| void | Invalidate (void) |
| void | InvalidateArea (int x, int y, int w, int h) |
| void | SetClipping (int left, int top, int right, int bottom) |
| Realize video memory. | |
| void | RealizeVideoMemory (void) |
| Save a screenshot to a PNG file. | |
| void | SaveScreenshotPNG (const std::string &name) |
| Set the current callbacks. | |
| void | SetCallbacks (const EventCallback *callbacks) |
| Get the current callbacks. | |
| const EventCallback * | GetCallbacks () |
| Process all system events. Returns if the time for a frame is over. | |
| void | WaitEventsOneFrame () |
| Toggle full screen mode. | |
| void | ToggleFullScreen (void) |
| Push current clipping. | |
| void | PushClipping (void) |
| Pop current clipping. | |
| void | PopClipping (void) |
| Returns the ticks in ms since start. | |
| unsigned long | GetTicks (void) |
| Convert a SDLKey to a string. | |
| const char * | SdlKey2Str (int key) |
| Check if the mouse is grabbed. | |
| bool | SdlGetGrabMouse (void) |
| Toggle mouse grab mode. | |
| void | ToggleGrabMouse (int mode) |
| void | DrawTexture (const CGraphic *g, GLuint *textures, int sx, int sy, int ex, int ey, int x, int y, int flip) |
Variables | |
| bool | UseOpenGL |
| Use OpenGL. | |
| CVideo | Video |
| int | VideoSyncSpeed |
| 0 disable interrupts | |
| int | SkipFrames |
| Fullscreen or windowed set from commandline. | |
| char | VideoForceFullScreen |
| Next frame ticks. | |
| unsigned long | NextFrameTicks |
| Counts frames. | |
| unsigned long | FrameCounter |
| Counts quantity of slow frames. | |
| int | SlowFrameCounter |
| Profile, frames out of sync. | |
| SDL_Surface * | TheScreen |
| Max texture size supported on the video card. | |
| GLint | GLMaxTextureSize |
| Is OpenGL texture compression supported. | |
| bool | GLTextureCompressionSupported |
| Use OpenGL texture compression. | |
| bool | UseGLTextureCompression |
| initialize the video part | |
| EventCallback | GameCallbacks |
| Game callbacks. | |
| EventCallback | EditorCallbacks |
| Editor callbacks. | |
| Uint32 | ColorBlack |
| Uint32 | ColorDarkGreen |
| Uint32 | ColorBlue |
| Uint32 | ColorOrange |
| Uint32 | ColorWhite |
| Uint32 | ColorGray |
| Uint32 | ColorRed |
| Uint32 | ColorGreen |
| Uint32 | ColorYellow |
| PFNGLCOMPRESSEDTEXIMAGE3DARBPROC | glCompressedTexImage3DARB |
| PFNGLCOMPRESSEDTEXIMAGE2DARBPROC | glCompressedTexImage2DARB |
| PFNGLCOMPRESSEDTEXIMAGE1DARBPROC | glCompressedTexImage1DARB |
| PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC | glCompressedTexSubImage3DARB |
| PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC | glCompressedTexSubImage2DARB |
| PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC | glCompressedTexSubImage1DARB |
| PFNGLGETCOMPRESSEDTEXIMAGEARBPROC | glGetCompressedTexImageARB |
Definition in file video.h.
| #define ASHIFT 24 |
| #define BSHIFT 16 |
Definition at line 193 of file video.h.
Referenced by CVideo::GetRGB(), CVideo::GetRGBA(), and CVideo::MapRGBA().
| #define GSHIFT 8 |
Definition at line 192 of file video.h.
Referenced by CVideo::GetRGB(), CVideo::GetRGBA(), and CVideo::MapRGBA().
| #define RSHIFT 0 |
Definition at line 191 of file video.h.
Referenced by CVideo::GetRGB(), CVideo::GetRGBA(), and CVideo::MapRGBA().
| typedef struct _event_callback_ EventCallback |
Event call back.
This is placed in the video part, because it depends on the video hardware driver.
| void DrawTexture | ( | const CGraphic * | g, | |
| GLuint * | textures, | |||
| int | sx, | |||
| int | sy, | |||
| int | ex, | |||
| int | ey, | |||
| int | x, | |||
| int | y, | |||
| int | flip | |||
| ) |
Definition at line 47 of file glgraphicdraw.cpp.
References GLMaxTextureSize, CGraphic::GraphicHeight, CGraphic::GraphicWidth, CGraphic::TextureHeight, and CGraphic::TextureWidth.
Referenced by CGraphic::DoDrawFrameClip(), CGraphic::DoDrawFrameClipX(), CGraphic::DrawFrame(), CGraphic::DrawFrameX(), and CGraphic::DrawSub().
| void FreeOpenGLGraphics | ( | ) |
Reload OpenGL graphics.
Free OpenGL graphics
Definition at line 732 of file graphic.cpp.
References Graphics, CGraphic::NumTextures, CPlayerColorGraphic::PlayerColorTextures, and PlayerMax.
Referenced by CVideo::ResizeScreen().
| const EventCallback* GetCallbacks | ( | ) |
Process all system events. Returns if the time for a frame is over.
Get the current callbacks
Definition at line 610 of file sdl.cpp.
Referenced by EditorMainLoop(), GameMainLoop(), PatchEditorMainLoop(), PlayMovie(), MenuScreen::run(), SdlDoEvent(), ShowTitleImage(), and WaitEventsOneFrame().
| unsigned long GetTicks | ( | void | ) |
Convert a SDLKey to a string.
Return ticks in ms since start.
Definition at line 261 of file video.cpp.
Referenced by MessagesDisplay::AddMessage(), DoScroll(), NetworkInitClientConnect(), NetworkSendRateLimitedClientMessage(), CParticleManager::update(), and MessagesDisplay::UpdateMessages().
| void InitLineDraw | ( | void | ) |
Simply invalidates whole window or screen.
Initialize line draw
Definition at line 955 of file linedraw.cpp.
References CVideo::Depth, linedraw_sdl::InitLineDraw(), linedraw_gl::InitLineDraw(), UseOpenGL, Video, linedraw_sdl::VideoDoDrawPixel, linedraw_sdl::VideoDoDrawPixel16(), linedraw_sdl::VideoDoDrawPixel32(), linedraw_sdl::VideoDoDrawTransPixel, linedraw_sdl::VideoDoDrawTransPixel16(), linedraw_sdl::VideoDoDrawTransPixel32(), linedraw_sdl::VideoDrawPixel, linedraw_sdl::VideoDrawPixel16(), linedraw_sdl::VideoDrawPixel32(), linedraw_sdl::VideoDrawTransPixel, linedraw_sdl::VideoDrawTransPixel16(), and linedraw_sdl::VideoDrawTransPixel32().
Referenced by InitLineDraw(), and InitVideo().
| void InitVideo | ( | void | ) |
Check if a resolution is valid.
Video initialize.
Definition at line 269 of file video.cpp.
Referenced by tolua_stratagus_InitVideo00().
| void Invalidate | ( | void | ) |
Invalidates selected area on window or screen. Use for accurate redrawing. in so
Invalidate whole window
Definition at line 500 of file sdl.cpp.
References CVideo::Height, NumRects, Rects, UseOpenGL, Video, and CVideo::Width.
Referenced by EditorMainLoop(), EditorUpdateDisplay(), MenuLoop(), PatchEditorUpdateDisplay(), PlayMovie(), ShowTitleImage(), ShowTitleScreens(), StartEditor(), StartMap(), ToggleFullScreen(), and UpdateDisplay().
| void InvalidateArea | ( | int | x, | |
| int | y, | |||
| int | w, | |||
| int | h | |||
| ) |
Set clipping for nearly all vector primitives. Functions which support clipping will be marked Clip. Set the system-wide clipping rectangle.
Invalidate some area
| x | screen pixel X position. | |
| y | screen pixel Y position. | |
| w | width of rectangle in pixels. | |
| h | height of rectangle in pixels. |
Definition at line 484 of file sdl.cpp.
References Assert, CVideo::Height, NumRects, Rects, UseOpenGL, Video, and CVideo::Width.
Referenced by ShowLoadProgress().
| int LoadGraphicPNG | ( | CGraphic * | g | ) |
Make an OpenGL texture.
Load a png graphic file. Modified function from SDL_Image
| g | graphic to load. |
Definition at line 81 of file png.cpp.
References CL_OPEN_READ, CL_png_read_data(), CFile::close(), CGraphic::File, CGraphic::GraphicHeight, CGraphic::GraphicWidth, int(), LibraryFileName(), CFile::open(), and CGraphic::Surface.
Referenced by CGraphic::Load().
| void MakePlayerColorTexture | ( | CPlayerColorGraphic * | g, | |
| int | player | |||
| ) |
Free OpenGL graphics.
Make an OpenGL texture with the player colors.
| g | The graphic to texture with player colors. | |
| player | Player number to make textures for. |
Definition at line 1069 of file graphic.cpp.
References MakeTextures(), CPlayerColorGraphic::PlayerColorTextures, and Players.
Referenced by CPlayerColorGraphic::DrawPlayerColorFrameClip(), CPlayerColorGraphic::DrawPlayerColorFrameClipX(), and ReloadGraphics().
| void MakeTexture | ( | CGraphic * | g | ) |
Make an OpenGL texture of the player color pixels only.
Make an OpenGL texture or textures out of a graphic object.
| g | The graphic object. |
Definition at line 1054 of file graphic.cpp.
References MakeTextures(), and CGraphic::Textures.
Referenced by CGraphic::Load(), MakeFontColorTextures(), CGraphic::MakeShadow(), ReloadGraphics(), and CGraphic::Resize().
| void PopClipping | ( | void | ) |
Returns the ticks in ms since start.
Pop current clipping.
Definition at line 194 of file video.cpp.
References Clips, ClipX1, ClipX2, ClipY1, ClipY2, Clip::X1, Clip::X2, Clip::Y1, and Clip::Y2.
Referenced by CViewport::Draw(), CStatusLine::Draw(), DrawBuildingCursor(), MyOpenGLGraphics::drawImage(), DrawMapCursor(), MessagesDisplay::DrawMessages(), DrawPieMenu(), DrawStartLocations(), and CFont::drawString().
| void PushClipping | ( | void | ) |
Pop current clipping.
Push current clipping.
Definition at line 185 of file video.cpp.
References Clips, ClipX1, ClipX2, ClipY1, and ClipY2.
Referenced by CViewport::Draw(), CStatusLine::Draw(), DrawBuildingCursor(), MyOpenGLGraphics::drawImage(), DrawMapCursor(), MessagesDisplay::DrawMessages(), DrawPieMenu(), DrawStartLocations(), and CFont::drawString().
| void RealizeVideoMemory | ( | void | ) |
Save a screenshot to a PNG file.
Realize video memory.
Definition at line 736 of file sdl.cpp.
References HideCursor(), NumRects, Rects, TheScreen, and UseOpenGL.
Referenced by EditorUpdateDisplay(), GameMainLoop(), PatchEditorUpdateDisplay(), PlayMovie(), MenuScreen::run(), ShowLoadProgress(), and ShowTitleImage().
| void ReloadGraphics | ( | ) |
Reload OpenGL.
Reload OpenGL graphics
Definition at line 753 of file graphic.cpp.
References Graphics, MakePlayerColorTexture(), MakeTexture(), CPlayerColorGraphic::PlayerColorTextures, and PlayerMax.
Referenced by ReloadOpenGL().
| void ReloadOpenGL | ( | ) |
Initializes video synchronization.
Definition at line 255 of file sdl.cpp.
References InitOpenGL(), CUserInterface::Minimap, CMinimap::Reload(), ReloadFonts(), ReloadGraphics(), and UI.
Referenced by CVideo::ResizeScreen(), and ToggleFullScreen().
| void SaveScreenshotPNG | ( | const std::string & | name | ) |
Set the current callbacks.
Save a screenshot to a PNG file.
| name | PNG filename to save. |
Definition at line 314 of file png.cpp.
References CVideo::Depth, CVideo::Height, CVideo::LockScreen(), TheScreen, CVideo::UnlockScreen(), UseOpenGL, Video, and CVideo::Width.
Referenced by Screenshot().
| bool SdlGetGrabMouse | ( | void | ) |
Toggle mouse grab mode.
Check if the mouse is grabbed
Definition at line 807 of file sdl.cpp.
Referenced by GetGrabMouse(), and ToggleGrabMouse().
| const char* SdlKey2Str | ( | int | key | ) |
Check if the mouse is grabbed.
Convert a SDLKey to a string
Definition at line 777 of file sdl.cpp.
References Key2Str.
Referenced by HandleCommandKey().
| void SetCallbacks | ( | const EventCallback * | callbacks | ) |
Get the current callbacks.
Set the current callbacks
Definition at line 602 of file sdl.cpp.
Referenced by EditorMainLoop(), GameMainLoop(), PatchEditorMainLoop(), PlayMovie(), MenuScreen::run(), ShowTitleImage(), and MenuScreen::stop().
| void SetClipping | ( | int | left, | |
| int | top, | |||
| int | right, | |||
| int | bottom | |||
| ) |
Realize video memory.
Set clipping for graphic routines.
| left | Left X screen coordinate. | |
| top | Top Y screen coordinate. | |
| right | Right X screen coordinate. | |
| bottom | Bottom Y screen coordinate. |
Definition at line 170 of file video.cpp.
References Assert, ClipX1, ClipX2, ClipY1, ClipY2, CVideo::Height, and CVideo::Width.
Referenced by CViewport::Draw(), CStatusLine::Draw(), DrawBuildingCursor(), MyOpenGLGraphics::drawImage(), DrawMapCursor(), MessagesDisplay::DrawMessages(), DrawPieMenu(), DrawStartLocations(), CFont::drawString(), main1(), and CVideo::ResizeScreen().
| void SetPlayersPalette | ( | void | ) |
The SDL screen.
Setup the player colors for the current palette.
Definition at line 852 of file player.cpp.
References CUnitColors::Colors, PlayerColorIndexCount, PlayerColorsRGB, PlayerMax, and CPlayer::UnitColors.
Referenced by CclNewPlayerColors(), CreateGame(), and LoadModules().
| void SetVideoSync | ( | void | ) |
Init line draw.
Initialise video sync. Calculate the length of video frame and any simulation skips.
Definition at line 118 of file sdl.cpp.
References _C_, CYCLES_PER_SECOND, DebugPrint, FrameRemainder, FrameTicks, SkipFrames, and VideoSyncSpeed.
Referenced by EditorMainLoop(), GameMainLoop(), SetGameSpeed(), ShowTitleScreens(), UiDecreaseGameSpeed(), and UiIncreaseGameSpeed().
| void ToggleFullScreen | ( | void | ) |
Push current clipping.
Toggle full screen mode.
Definition at line 831 of file sdl.cpp.
References Exit(), CVideo::FullScreen, Invalidate(), ReloadOpenGL(), TheScreen, UseOpenGL, and Video.
Referenced by CommandKey(), EditorCallbackKeyDown(), PatchEditorCallbackKeyDown(), and tolua_stratagus_ToggleFullScreen00().
| void ToggleGrabMouse | ( | int | mode | ) |
Toggle grab mouse.
| mode | Wanted mode, 1 grab, -1 not grab, 0 toggle. |
Definition at line 817 of file sdl.cpp.
References SdlGetGrabMouse().
Referenced by SetGrabMouse(), and UiToggleGrabMouse().
| int VideoValidResolution | ( | int | w, | |
| int | h | |||
| ) |
Load graphic from PNG file.
Check if a resolution is valid
| w | Width | |
| h | Height |
Definition at line 471 of file sdl.cpp.
References TheScreen.
Referenced by CVideo::ResizeScreen().
| void WaitEventsOneFrame | ( | ) |
Toggle full screen mode.
Wait for interactive input event for one frame.
Handles system events, joystick, keyboard, mouse. Handles the network messages. Handles the sound queue.
All events available are fetched. Sound and network only if available. Returns if the time for one frame is over.
Definition at line 625 of file sdl.cpp.
References CVideo::ClearScreen(), CursorAnimate(), Editor, FrameCounter, FrameFraction, FrameRemainder, FrameTicks, GameRunning, GetCallbacks(), handleInput(), InputKeyTimeout(), InputMouseTimeout(), IsNetworkGame, _event_callback_::NetworkEvent, NetworkFildes, NextFrameTicks, PatchEditorRunning, CEditor::Running, SdlDoEvent(), SkipFrames, SkipGameCycle, SlowFrameCounter, UseOpenGL, and Video.
Referenced by EditorMainLoop(), GameMainLoop(), PatchEditorMainLoop(), PlayMovie(), MenuScreen::run(), and ShowTitleImage().
| Uint32 ColorBlack |
Definition at line 147 of file video.cpp.
Referenced by CVideo::ClearScreen(), CChunkParticle::draw(), CViewport::DrawBorder(), DrawGrids(), DrawIcons(), CViewport::DrawMapFogOfWar(), DrawPopup(), CEditor::Init(), InitVideoSdl(), ShowLoadProgress(), UiDrawLifeBar(), UiDrawManaBar(), CMinimap::Update(), and CMinimap::UpdateTerrain().
| Uint32 ColorBlue |
Definition at line 149 of file video.cpp.
Referenced by DrawIcons(), DrawInformations(), InitVideoSdl(), ShowSingleOrder(), and UiDrawManaBar().
| Uint32 ColorDarkGreen |
| Uint32 ColorGray |
Definition at line 152 of file video.cpp.
Referenced by DrawPatchIcons(), DrawPlayers(), DrawUnitIcons(), DrawUnitSelection(), InitVideoSdl(), PatchEditorUpdateDisplay(), and ShowSingleOrder().
| Uint32 ColorGreen |
Definition at line 154 of file video.cpp.
Referenced by DrawBuildingCursor(), DrawIcons(), DrawInformations(), DrawPatchIcons(), DrawPlayers(), DrawUnitIcons(), DrawUnitOn(), DrawUnitSelection(), DrawVisibleRectangleCursor(), InitVideoSdl(), and ShowSingleOrder().
| Uint32 ColorOrange |
Definition at line 150 of file video.cpp.
Referenced by CViewport::DrawBorder(), InitVideoSdl(), and UiDrawLifeBar().
| Uint32 ColorRed |
Definition at line 153 of file video.cpp.
Referenced by DrawBuildingCursor(), DrawInformations(), DrawUnitOn(), DrawUnitSelection(), InitVideoSdl(), ShowSingleOrder(), and UiDrawLifeBar().
| Uint32 ColorWhite |
Definition at line 151 of file video.cpp.
Referenced by DrawEvents(), DrawInfoPanelNoneSelected(), DrawMapCursor(), DrawPatchIcons(), DrawPlayers(), DrawUnitIcons(), DrawUnitOn(), DrawUnitSelection(), InitUserInterface(), and InitVideoSdl().
| Uint32 ColorYellow |
Definition at line 155 of file video.cpp.
Referenced by DrawUnitSelection(), InitVideoSdl(), ShowSingleOrder(), and UiDrawLifeBar().
Editor callbacks.
Definition at line 85 of file mainloop.cpp.
Referenced by EditorMainLoop(), CEditor::Init(), and MenuScreen::stop().
| unsigned long FrameCounter |
Counts quantity of slow frames.
Definition at line 134 of file video.cpp.
Referenced by EditorMainLoop(), Exit(), NetworkEvent(), NetworkParseMenuPacket(), NetworkProcessServerRequest(), NetworkRecover(), NetworkSyncCommands(), ServerParseGoodBye(), ServerParseHello(), ServerParseIAmHere(), ServerParseMap(), ServerParseResync(), ServerParseState(), ServerParseWaiting(), SimpleChooseSample(), CMinimap::Update(), and WaitEventsOneFrame().
| PFNGLCOMPRESSEDTEXIMAGE1DARBPROC glCompressedTexImage1DARB |
| PFNGLCOMPRESSEDTEXIMAGE2DARBPROC glCompressedTexImage2DARB |
| PFNGLCOMPRESSEDTEXIMAGE3DARBPROC glCompressedTexImage3DARB |
| PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC glCompressedTexSubImage1DARB |
| PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC glCompressedTexSubImage2DARB |
| PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC glCompressedTexSubImage3DARB |
| PFNGLGETCOMPRESSEDTEXIMAGEARBPROC glGetCompressedTexImageARB |
| GLint GLMaxTextureSize |
Is OpenGL texture compression supported.
Definition at line 82 of file sdl.cpp.
Referenced by DrawTexture(), InitOpenGL(), MakeTextures(), and MakeTextures2().
Use OpenGL texture compression.
Definition at line 83 of file sdl.cpp.
Referenced by InitOpenGLExtensions(), and MakeTextures2().
| unsigned long NextFrameTicks |
| int SkipFrames |
Fullscreen or windowed set from commandline.
Definition at line 145 of file video.cpp.
Referenced by DoScrollArea(), SetVideoSync(), and WaitEventsOneFrame().
| int SlowFrameCounter |
Profile, frames out of sync.
Initialize Pixels[] for all players. (bring Players[] in sync with Pixels[])
Definition at line 135 of file video.cpp.
Referenced by Exit(), and WaitEventsOneFrame().
| SDL_Surface* TheScreen |
Max texture size supported on the video card.
Definition at line 78 of file sdl.cpp.
Referenced by CclPlayer(), CMinimap::Create(), CMinimap::Draw(), DrawCursor(), CGraphic::DrawFrameClipTransX(), CGraphic::DrawFrameClipX(), CGraphic::DrawFrameTransX(), CGraphic::DrawFrameX(), DrawMenuButton(), MessagesDisplay::DrawMessages(), DrawPopup(), CGraphic::DrawSub(), DrawUnitOn(), gcn::SDLGraphics::fillRectangle(), linedraw_sdl::FillRectangle(), linedraw_sdl::FillRectangleClip(), HideCursor(), initGuichan(), InitPlayers(), InitUserInterface(), InitVideoSdl(), OutputTheora(), PlayMovie(), RealizeVideoMemory(), CVideo::ResizeScreen(), SavePlayers(), SaveScreenshotPNG(), SdlLockScreen(), SdlUnlockScreen(), ToggleFullScreen(), linedraw_sdl::VideoDoDrawPixel16(), linedraw_sdl::VideoDoDrawPixel32(), linedraw_sdl::VideoDoDrawTransPixel16(), linedraw_sdl::VideoDoDrawTransPixel32(), VideoDrawChar(), VideoDrawOnlyFog(), and VideoValidResolution().
initialize the video part
Definition at line 84 of file sdl.cpp.
Referenced by MakeTextures2(), tolua_get_UseGLTextureCompression(), and tolua_set_UseGLTextureCompression().
| bool UseOpenGL |
Use OpenGL.
Definition at line 129 of file video.cpp.
Referenced by CMap::CleanFogOfWar(), CleanFonts(), ClearMinimap(), CopyMinimapTerrain(), CMinimap::Create(), CMinimap::Destroy(), DoDrawText(), CMinimap::Draw(), CVideo::DrawCircle(), CVideo::DrawCircleClip(), DrawCursor(), DrawFogOfWarTile(), CGraphic::DrawFrame(), CGraphic::DrawFrameClip(), CGraphic::DrawFrameClipTrans(), CGraphic::DrawFrameClipTransX(), CGraphic::DrawFrameClipX(), CGraphic::DrawFrameTrans(), CGraphic::DrawFrameTransX(), CGraphic::DrawFrameX(), DrawGuichanWidgets(), CVideo::DrawHLine(), CVideo::DrawHLineClip(), CVideo::DrawLine(), CVideo::DrawLineClip(), CVideo::DrawPixelClip(), CPlayerColorGraphic::DrawPlayerColorFrameClip(), CPlayerColorGraphic::DrawPlayerColorFrameClipX(), CVideo::DrawRectangle(), CVideo::DrawRectangleClip(), CGraphic::DrawSub(), CGraphic::DrawSubTrans(), CVideo::DrawTransCircle(), CVideo::DrawTransCircleClip(), CVideo::DrawTransHLine(), CVideo::DrawTransHLineClip(), CVideo::DrawTransLine(), CVideo::DrawTransLineClip(), CVideo::DrawTransPixelClip(), CVideo::DrawTransRectangle(), CVideo::DrawTransRectangleClip(), CVideo::DrawTransVLine(), CVideo::DrawTransVLineClip(), CVideo::DrawVLine(), CVideo::DrawVLineClip(), CVideo::FillCircle(), CVideo::FillCircleClip(), CVideo::FillRectangle(), CVideo::FillRectangleClip(), CVideo::FillTransCircle(), CVideo::FillTransCircleClip(), CVideo::FillTransRectangle(), CVideo::FillTransRectangleClip(), CGraphic::Flip(), CGraphic::Free(), CVideo::GetRGB(), CVideo::GetRGBA(), HideCursor(), initGuichan(), InitLineDraw(), InitVideoSdl(), Invalidate(), InvalidateArea(), CGraphic::Load(), LoadFonts(), CGraphic::MakeShadow(), CVideo::MapRGB(), CVideo::MapRGBA(), RealizeVideoMemory(), CGraphic::Resize(), CVideo::ResizeScreen(), SaveScreenshotPNG(), SdlDoEvent(), SdlLockScreen(), SdlUnlockScreen(), SetMinimapPixel(), SetMinimapTerrainPixel(), ToggleFullScreen(), tolua_get_UseOpenGL(), tolua_set_UseOpenGL(), CMinimap::Update(), CMinimap::UpdateTerrain(), CGraphic::UseDisplayFormat(), VideoDrawChar(), VideoDrawOnlyFog(), and WaitEventsOneFrame().
Definition at line 127 of file video.cpp.
Referenced by MyOpenGLGraphics::_beginDraw(), CclGetVideoFullScreen(), CclGetVideoResolution(), CclPlayer(), CclSetVideoFullScreen(), CclSetVideoResolution(), CreateGame(), DoScroll(), CStatusLine::Draw(), CChunkParticle::draw(), CViewport::DrawBorder(), DrawBuildingCursor(), linedraw_sdl::DrawCircle(), linedraw_sdl::DrawCircleClip(), DrawCoordinates(), DrawCosts(), CMinimap::DrawCursor(), DrawEvents(), DrawGrids(), linedraw_gl::DrawHLine(), linedraw_sdl::DrawHLine(), DrawIcons(), MyOpenGLGraphics::drawImage(), DrawInfoPanelNoneSelected(), DrawInformations(), MyOpenGLGraphics::drawLine(), linedraw_gl::DrawLine(), linedraw_sdl::DrawLine(), linedraw_sdl::DrawLineClip(), CViewport::DrawMapBackgroundInViewport(), DrawMapCursor(), CViewport::DrawMapFogOfWar(), DrawMenuButton(), MessagesDisplay::DrawMessages(), DrawPatchIcons(), linedraw_gl::DrawPixel(), linedraw_sdl::DrawPixelClip(), DrawPlayers(), MyOpenGLGraphics::drawPoint(), DrawPopup(), MyOpenGLGraphics::drawRectangle(), linedraw_gl::DrawRectangle(), DrawSelection(), CFont::drawString(), linedraw_gl::DrawTransCircle(), linedraw_sdl::DrawTransCircle(), linedraw_gl::DrawTransCircleClip(), linedraw_sdl::DrawTransCircleClip(), linedraw_gl::DrawTransHLine(), linedraw_sdl::DrawTransHLine(), linedraw_gl::DrawTransHLineClip(), linedraw_sdl::DrawTransHLineClip(), linedraw_gl::DrawTransPixel(), linedraw_gl::DrawTransPixelClip(), linedraw_sdl::DrawTransPixelClip(), linedraw_gl::DrawTransRectangle(), linedraw_gl::DrawTransRectangleClip(), linedraw_gl::DrawTransVLine(), linedraw_sdl::DrawTransVLine(), linedraw_gl::DrawTransVLineClip(), linedraw_sdl::DrawTransVLineClip(), DrawUnitIcons(), DrawUnitOn(), DrawVisibleRectangleCursor(), linedraw_gl::DrawVLine(), linedraw_sdl::DrawVLine(), EditorMainLoop(), MyOpenGLGraphics::fillRectangle(), gcn::SDLGraphics::fillRectangle(), linedraw_gl::FillRectangle(), linedraw_gl::FillTransCircle(), linedraw_gl::FillTransCircleClip(), linedraw_gl::FillTransRectangle(), linedraw_sdl::FillTransRectangle(), linedraw_gl::FillTransRectangleClip(), HandleCursorMove(), HandleMouseExit(), CEditor::Init(), linedraw_sdl::InitLineDraw(), InitOpenGL(), InitPlayers(), InitUserInterface(), InitVideoSdl(), Invalidate(), InvalidateArea(), main(), main1(), MenuLoop(), MenuScreen::MenuScreen(), PatchEditorCallbackMouse(), PatchEditorMainLoop(), PatchEditorUpdateDisplay(), PatchLoadIcons(), PlayMovie(), SaveScreenshotPNG(), SdlDoEvent(), SetMinimapTerrainPixel(), ShowLoadProgress(), ShowSingleOrder(), ShowTitleImage(), ShowTitleScreens(), StartEditor(), StartMap(), ToggleFullScreen(), tolua_get_Video(), tolua_set_Video(), UiDrawLifeBar(), UiDrawManaBar(), UiToggleBigMap(), linedraw_sdl::VideoDoDrawPixel16(), linedraw_sdl::VideoDoDrawPixel32(), linedraw_sdl::VideoDoDrawTransPixel16(), linedraw_sdl::VideoDoDrawTransPixel32(), VideoDrawOnlyFog(), linedraw_sdl::VideoDrawPixel16(), linedraw_sdl::VideoDrawPixel32(), linedraw_sdl::VideoDrawTransPixel16(), linedraw_sdl::VideoDrawTransPixel32(), and WaitEventsOneFrame().
| char VideoForceFullScreen |
Next frame ticks.
Definition at line 131 of file video.cpp.
Referenced by CclSetVideoFullScreen(), and main().
| int VideoSyncSpeed |
0 disable interrupts
Video synchronization speed. Synchronization time in percent. If =0, video framerate is not synchronized. 100 is exact CYCLES_PER_SECOND (30). Game will try to redraw screen within intervals of VideoSyncSpeed, not more, not less.
Definition at line 144 of file video.cpp.
Referenced by DoScrollArea(), DrawInfoPanelNoneSelected(), GetGameSpeed(), main(), NetworkRecover(), SetGameSpeed(), SetVideoSync(), UiDecreaseGameSpeed(), and UiIncreaseGameSpeed().
1.5.6