GrafX2 2.9.3227
The ultimate 256-color painting program
sdlscreen.h File Reference

Screen update (refresh) system, and some SDL-specific graphic functions. More...

#include <SDL.h>
#include "struct.h"
#include "global.h"
+ Include dependency graph for sdlscreen.h:
+ This graph shows which files directly or indirectly include this file:

Functions

byteSurface_to_bytefield (SDL_Surface *source, byte *dest)
 Converts a SDL_Surface (indexed colors or RGB) into an array of bytes (indexed colors). More...
 
SDL_Color Color_to_SDL_color (byte)
 Gets the RGB 24-bit color currently associated with a palette index. More...
 
byte Get_SDL_pixel_8 (const SDL_Surface *bmp, int x, int y)
 Reads a pixel in a 8-bit SDL surface. More...
 
dword Get_SDL_pixel_hicolor (const SDL_Surface *bmp, int x, int y)
 Reads a pixel in a multi-byte SDL surface. More...
 
void Set_SDL_pixel_8 (SDL_Surface *bmp, int x, int y, byte color)
 Writes a pixel in a 8-bit SDL surface. More...
 
void Get_SDL_Palette (const SDL_Palette *sdl_palette, T_Palette palette)
 Convert a SDL Palette to a grafx2 palette. More...
 

Variables

GFX2_GLOBAL SDL_Rect ** List_SDL_video_modes
 

Detailed Description

Screen update (refresh) system, and some SDL-specific graphic functions.

Function Documentation

◆ Surface_to_bytefield()

byte * Surface_to_bytefield ( SDL_Surface *  source,
byte dest 
)

Converts a SDL_Surface (indexed colors or RGB) into an array of bytes (indexed colors).

If dest is NULL, it's allocated by malloc(). Otherwise, be sure to pass a buffer of the right dimensions.

References NULL.

Referenced by Render_text_TTF().

◆ Color_to_SDL_color()

SDL_Color Color_to_SDL_color ( byte  index)

Gets the RGB 24-bit color currently associated with a palette index.

References Main, and T_Document::palette.

◆ Get_SDL_pixel_8()

byte Get_SDL_pixel_8 ( const SDL_Surface *  bmp,
int  x,
int  y 
)

Reads a pixel in a 8-bit SDL surface.

◆ Get_SDL_pixel_hicolor()

dword Get_SDL_pixel_hicolor ( const SDL_Surface *  bmp,
int  x,
int  y 
)

Reads a pixel in a multi-byte SDL surface.

Referenced by Define_icon().

◆ Set_SDL_pixel_8()

void Set_SDL_pixel_8 ( SDL_Surface *  bmp,
int  x,
int  y,
byte  color 
)

Writes a pixel in a 8-bit SDL surface.

◆ Get_SDL_Palette()

void Get_SDL_Palette ( const SDL_Palette *  sdl_palette,
T_Palette  palette 
)

Convert a SDL Palette to a grafx2 palette.

Referenced by Render_text_TTF().

Variable Documentation

◆ List_SDL_video_modes

GFX2_GLOBAL SDL_Rect** List_SDL_video_modes