sdl_v.cpp File Reference

Implementation of the SDL video driver. More...

#include "../stdafx.h"
#include "../openttd.h"
#include "../gfx_func.h"
#include "../sdl.h"
#include "../rev.h"
#include "../blitter/factory.hpp"
#include "../network/network.h"
#include "../thread/thread.h"
#include "../genworld.h"
#include "../core/random_func.hpp"
#include "../core/math_func.hpp"
#include "sdl_v.h"
#include <SDL.h>

Go to the source code of this file.

Data Structures

struct  VkMapping

Defines

#define MAX_DIRTY_RECTS   100
#define ICON_DIR   "media"
#define AS(x, z)   {x, 0, z}
#define AM(x, y, z, w)   {x, y - x, z}

Functions

static void UpdatePalette (uint start, uint count)
static void InitPalette ()
static void CheckPaletteAnim ()
static void DrawSurfaceToScreen ()
static void DrawSurfaceToScreenThread (void *)
static void GetVideoModes ()
static void GetAvailableVideoMode (uint *w, uint *h)
static bool CreateMainSurface (uint w, uint h)
static uint32 ConvertSdlKeyIntoMy (SDL_keysym *sym)
static int PollEvent ()

Variables

static FVideoDriver_SDL iFVideoDriver_SDL
static SDL_Surface * _sdl_screen
static bool _all_modes
static bool _draw_threaded
 Whether the drawing is/may be done in a separate thread.
static ThreadObject_draw_thread = NULL
 Thread used to 'draw' to the screen, i.e.
static ThreadMutex_draw_mutex = NULL
 Mutex to keep the access to the shared memory controlled.
static volatile bool _draw_continue
 Should we keep continue drawing?
static SDL_Rect _dirty_rects [MAX_DIRTY_RECTS]
static int _num_dirty_rects
static const Dimension _default_resolutions []
static const VkMapping _vk_mapping []

Detailed Description

Implementation of the SDL video driver.

Definition in file sdl_v.cpp.


Variable Documentation

const Dimension _default_resolutions[] [static]
Initial value:
 {
  { 640,  480},
  { 800,  600},
  {1024,  768},
  {1152,  864},
  {1280,  800},
  {1280,  960},
  {1280, 1024},
  {1400, 1050},
  {1600, 1200},
  {1680, 1050},
  {1920, 1200}
}

Definition at line 132 of file sdl_v.cpp.

ThreadMutex* _draw_mutex = NULL [static]

Mutex to keep the access to the shared memory controlled.

Definition at line 38 of file sdl_v.cpp.

ThreadObject* _draw_thread = NULL [static]

Thread used to 'draw' to the screen, i.e.

push data to the screen.

Definition at line 36 of file sdl_v.cpp.

bool _draw_threaded [static]

Whether the drawing is/may be done in a separate thread.

Definition at line 34 of file sdl_v.cpp.

Referenced by VideoDriver_SDL::ChangeResolution(), VideoDriver_SDL::MainLoop(), and VideoDriver_SDL::Start().


Generated on Fri May 27 04:20:21 2011 for OpenTTD by  doxygen 1.6.1