X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsdl.h;h=31de93da084907c5cb7871d98d74433822ee35bf;hb=a9e8a4cac51cb2856f339d84bab5e07e8be75037;hp=acdafd5b8eb2f8327bef9b82658524ff361fcedf;hpb=aff7fb95675072451fcf25e8c0199923b0687027;p=rocksndiamonds.git diff --git a/src/libgame/sdl.h b/src/libgame/sdl.h index acdafd5b..31de93da 100644 --- a/src/libgame/sdl.h +++ b/src/libgame/sdl.h @@ -4,7 +4,7 @@ // (c) 1995-2014 by Artsoft Entertainment // Holger Schemel // info@artsoft.org -// http://www.artsoft.org/ +// https://www.artsoft.org/ // ---------------------------------------------------------------------------- // sdl.h // ============================================================================ @@ -17,7 +17,7 @@ #include #include #include -#if defined(PLATFORM_WIN32) +#if defined(PLATFORM_WINDOWS) #include #endif @@ -75,6 +75,10 @@ struct SDLSurfaceInfo char *source_filename; int width, height; + + int alpha[2][2]; // [surface|texture][opaque|masked] + int alpha_next_blit; + SDL_Surface *surface; SDL_Surface *surface_masked; SDL_Texture *texture; @@ -350,6 +354,12 @@ typedef struct UserEventInfo UserEvent; #define KSYM_FKEY_LAST KSYM_F12 #define KSYM_NUM_FKEYS (KSYM_FKEY_LAST - KSYM_FKEY_FIRST + 1) +#define KSYM_RAW(k) (((k) >= KSYM_a && \ + (k) <= KSYM_z) || \ + ((k) >= KSYM_0 && \ + (k) <= KSYM_9) || \ + (k) == KSYM_space) + #define KSYM_PRINTABLE(k) (((k) >= KSYM_space && \ (k) <= KSYM_z) || \ (k) == KSYM_Adiaeresis || \ @@ -380,8 +390,13 @@ typedef struct UserEventInfo UserEvent; KMOD_Meta | \ KMOD_Alt) +#define KMOD_TextInput (KMOD_Shift | KMOD_Alt_R) + + // SDL function definitions +void SDLSetAlpha(SDL_Surface *, boolean, int); +const char *SDLGetRendererName(void); boolean SDLSetNativeSurface(SDL_Surface **); SDL_Surface *SDLGetNativeSurface(SDL_Surface *); void SDLCreateBitmapTextures(Bitmap *); @@ -417,7 +432,6 @@ void SDLDrawLine(Bitmap *, int, int, int, int, Uint32); Pixel SDLGetPixel(Bitmap *, int, int); void SDLPutPixel(Bitmap *, int, int, Pixel); -void SDLInvertArea(Bitmap *, int, int, int, int, Uint32); void SDLCopyInverseMasked(Bitmap *, Bitmap *, int, int, int, int, int, int); Bitmap *SDLZoomBitmap(Bitmap *, int, int);