ScummVM API documentation
QDEngine::grDispatcher Class Reference

Public Types

enum  {
  mask_565_r = 0xFFFF & (0x001F << 11), mask_565_g = 0xFFFF & (0x003F << 5), mask_565_b = 0xFFFF & (0x001F << 0), mask_555_r = 0xFFFF & (0x001F << 10),
  mask_555_g = 0xFFFF & (0x001F << 5), mask_555_b = 0xFFFF & (0x001F << 0)
}
 
typedef bool(* char_input_hanler_t) (int input)
 Обработчик ввода символа
 
typedef Std::vector< grScreenRegionregions_container_t
 
typedef regions_container_t::const_iterator region_iterator
 
typedef void(* restore_handler_t) ()
 

Public Member Functions

bool init (int sx, int sy, grPixelFormat pixel_format)
 
void toggle_reinit ()
 
bool is_in_reinit_mode () const
 
void set_flag (int fl)
 
void drop_flag (int fl)
 
bool check_flag (int fl)
 
bool finit ()
 
void * Get_hWnd () const
 
int get_SizeX () const
 
int get_SizeY () const
 
void setClipMode (int m)
 
int getClipMode () const
 
void setClip ()
 
void getClip (int &l, int &t, int &r, int &b) const
 
void setClip (int l, int t, int r, int b)
 
void limitClip (int l, int t, int r, int b)
 
int clipCheck (int x, int y)
 
int clipCheck (int x, int y, int sx, int sy)
 
bool flush (int x, int y, int sx, int sy)
 
bool flush ()
 
bool flushChanges ()
 
void fill (int val)
 
void putSpr (int x, int y, int sx, int sy, const byte *p, int mode, int spriteFormat)
 
void putSpr (int x, int y, int sx, int sy, const byte *p, int mode, int spriteFormat, float scale)
 
void putSpr_rle (int x, int y, int sx, int sy, const RLEBuffer *p, int mode, bool alpha_flag)
 
void putSpr_rle (int x, int y, int sx, int sy, const RLEBuffer *p, int mode, float scale, bool alpha_flag)
 
void putSpr_a (int x, int y, int sx, int sy, const byte *p, int mode)
 
void putSpr_a (int x, int y, int sx, int sy, const byte *p, int mode, float scale)
 
void putSpr_rot (const Vect2i &pos, const Vect2i &size, const byte *data, bool has_alpha, int mode, float angle)
 
void putSpr_rot (const Vect2i &pos, const Vect2i &size, const byte *data, bool has_alpha, int mode, float angle, const Vect2f &scale)
 
void putSpr_rle_rot (const Vect2i &pos, const Vect2i &size, const RLEBuffer *data, bool has_alpha, int mode, float angle)
 
void putSpr_rle_rot (const Vect2i &pos, const Vect2i &size, const RLEBuffer *data, bool has_alpha, int mode, float angle, const Vect2f &scale)
 
void putSprMask_rot (const Vect2i &pos, const Vect2i &size, const byte *data, bool has_alpha, uint32 mask_color, int mask_alpha, int mode, float angle)
 
void putSprMask_rot (const Vect2i &pos, const Vect2i &size, const byte *data, bool has_alpha, uint32 mask_color, int mask_alpha, int mode, float angle, const Vect2f &scale)
 
void putSprMask_rle_rot (const Vect2i &pos, const Vect2i &size, const RLEBuffer *data, bool has_alpha, uint32 mask_color, int mask_alpha, int mode, float angle)
 
void putSprMask_rle_rot (const Vect2i &pos, const Vect2i &size, const RLEBuffer *data, bool has_alpha, uint32 mask_color, int mask_alpha, int mode, float angle, const Vect2f &scale)
 
void putSprMask (int x, int y, int sx, int sy, const byte *p, uint32 mask_color, int mask_alpha, int mode)
 
void putSprMask (int x, int y, int sx, int sy, const byte *p, uint32 mask_color, int mask_alpha, int mode, float scale)
 
void putSprMask_rle (int x, int y, int sx, int sy, const RLEBuffer *p, uint32 mask_color, int mask_alpha, int mode, bool alpha_flag)
 
void putSprMask_rle (int x, int y, int sx, int sy, const RLEBuffer *p, uint32 mask_color, int mask_alpha, int mode, float scale, bool alpha_flag)
 
void putSprMask_a (int x, int y, int sx, int sy, const byte *p, uint32 mask_color, int mask_alpha, int mode)
 
void putSprMask_a (int x, int y, int sx, int sy, const byte *p, uint32 mask_color, int mask_alpha, int mode, float scale)
 
void putTileSpr (int x, int y, const grTileSprite &sprite, bool has_alpha, int mode, Graphics::ManagedSurface *surface=nullptr, bool clip=true)
 
void putChar (int x, int y, uint32 color, int font_sx, int font_sy, const byte *font_alpha, const grScreenRegion &char_region)
 
void drawSprContour_a (int x, int y, int sx, int sy, const byte *p, int contour_color, int mode)
 
void drawSprContour_a (int x, int y, int sx, int sy, const byte *p, int contour_color, int mode, float scale)
 
void drawSprContour (int x, int y, int sx, int sy, const byte *p, int contour_color, int mode)
 
void drawSprContour (int x, int y, int sx, int sy, const byte *p, int contour_color, int mode, float scale)
 
void drawSprContour (int x, int y, int sx, int sy, const RLEBuffer *p, int contour_color, int mode, bool alpha_flag)
 
void drawSprContour (int x, int y, int sx, int sy, const RLEBuffer *p, int contour_color, int mode, float scale, bool alpha_flag)
 
bool drawText (int x, int y, uint32 color, const char *str, int hspace=0, int vspace=0, const grFont *font=NULL)
 
bool drawAlignedText (int x, int y, int sx, int sy, uint32 color, const char *str, grTextAlign align=GR_ALIGN_LEFT, int hspace=0, int vspace=0, const grFont *font=NULL)
 
bool drawParsedText (int x, int y, int sx, int sy, uint32 color, const UI_TextParser *parser, grTextAlign align=GR_ALIGN_LEFT, const grFont *font=NULL)
 
int textWidth (const char *str, int hspace=0, const grFont *font=NULL, bool first_string_only=false) const
 
int textHeight (const char *str, int vspace=0, const grFont *font=NULL) const
 
void erase (int x, int y, int sx, int sy, int col)
 
void erase (int x, int y, int sx, int sy, int r, int g, int b)
 
void setPixel (int x, int y, int col)
 
void setPixelFast (int x, int y, int col)
 
void setPixelFast (int x, int y, int r, int g, int b)
 
void setPixel (int x, int y, int r, int g, int b)
 
void surfaceOverride (Graphics::ManagedSurface *target)
 
void resetSurfaceOverride ()
 
void getPixel (int x, int y, uint16 &col)
 
void getPixel (int x, int y, byte &r, byte &g, byte &b)
 
void line (int x1, int y1, int x2, int y2, int col, int line_style=0, bool inverse_col=false)
 
void lineTo (int x, int y, int len, int dir, int col, int line_style=0)
 
void rectangle (int x, int y, int sx, int sy, int outcol, int incol, int mode, int line_style=0)
 
void rectangleAlpha (int x, int y, int sx, int sy, uint32 color, int alpha)
 
int PalettedMode () const
 
grPixelFormat pixel_format () const
 
void set_pixel_format (grPixelFormat mode)
 
int bytes_per_pixel () const
 
uint32 make_rgb (uint32 color) const
 
uint32 make_rgb (uint32 r, uint32 g, uint32 b) const
 
const void * mouse_cursor () const
 
void set_default_mouse_cursor ()
 
void set_null_mouse_cursor ()
 
bool is_mouse_hidden () const
 
void hideMouse ()
 
void showMouse ()
 
bool clip_line (int &x0, int &y0, int &x1, int &y1) const
 
bool clip_line (int &x0, int &y0, int &z0, int &x1, int &y1, int &z1) const
 
bool clip_rectangle (int &x, int &y, int &pic_x, int &pic_y, int &pic_sx, int &pic_sy) const
 
bool is_rectangle_visible (int x, int y, int sx, int sy) const
 
bool clip_rectangle (int &x, int &y, int &sx, int &sy) const
 
void clear_changes_mask ()
 
const regions_container_tchanged_regions () const
 
void build_changed_regions ()
 
bool invalidate_region (const grScreenRegion &reg)
 
char * temp_buffer (int size)
 

Static Public Member Functions

static bool sys_init ()
 
static char_input_hanler_t set_input_handler (char_input_hanler_t h)
 
static bool handle_char_input (int input)
 
static uint32 make_rgb888 (uint32 r, uint32 g, uint32 b)
 
static uint16 make_rgb565u (uint32 r, uint32 g, uint32 b)
 
static uint16 make_rgb555u (uint32 r, uint32 g, uint32 b)
 
static void split_rgb565u (uint32 col, byte &r, byte &g, byte &b)
 
static void split_rgb555u (uint32 col, byte &r, byte &g, byte &b)
 
static void split_rgb888 (uint32 col, uint32 &r, uint32 &g, uint32 &b)
 
static uint16 make_rgb565 (uint32 r, uint32 g, uint32 b)
 
static uint16 make_rgb555 (uint32 r, uint32 g, uint32 b)
 
static uint16 alpha_blend_565 (uint16 pic_col, uint16 scr_col, uint32 a)
 
static uint16 alpha_blend_555 (uint16 pic_col, uint16 scr_col, uint32 a)
 
static grDispatcherinstance (void *hwnd)
 
static grDispatcherinstance ()
 
static grDispatcherset_instance (grDispatcher *p)
 
static const char * wnd_class_name ()
 
static restore_handler_t set_restore_handler (restore_handler_t h)
 
static bool is_active ()
 
static void activate (bool state)
 
static bool convert_sprite (grPixelFormat src_fmt, grPixelFormat &dest_fmt, int sx, int sy, byte *data, bool &has_alpha)
 
static grFontload_font (const char *file_name)
 
static void set_default_font (grFont *p)
 
static grFontget_default_font ()
 

Protected Attributes

int _flags
 
int _wndPosX
 
int _wndPosY
 
int _wndSizeX
 
int _wndSizeY
 
int _sizeX
 
int _sizeY
 
grPixelFormat _pixel_format
 
void * _hWnd
 
Graphics::ManagedSurface_screenBuf = nullptr
 
Graphics::ManagedSurface_realScreenBuf = nullptr
 
char * _temp_buffer
 
int _temp_buffer_size
 

The documentation for this class was generated from the following file: