/*
 * nikwi-sdl12.h: the part of the SDL 1.2 API that Nikwi Deluxe uses, on top of SDL2, for the
 * fredygames.com browser build (Emscripten). The build puts it where the game looks for <SDL/SDL.h>.
 * (The SDL 1.2 port that ships with Emscripten has no software blitter: it cannot draw 16-bit surfaces
 * or honour color keys, which the game depends on.)
 * Copyright (C) 2026 FredyGames. Distributed under the same zlib license as Nikwi Deluxe's src/.
 */
#ifndef NIKWI_SDL12_H
#define NIKWI_SDL12_H

#include <SDL.h>

#ifdef __cplusplus
extern "C" {
#endif

#define SDL_SWSURFACE 0x00000000
#define SDL_HWSURFACE 0x00000001
#define SDL_DOUBLEBUF 0x40000000
#define SDL_FULLSCREEN 0x80000000
#define SDL_SRCCOLORKEY 0x00001000

SDL_Surface *SDL_SetVideoMode (int width, int height, int bpp, Uint32 flags);
int SDL_Flip (SDL_Surface * screen);
void SDL_WM_SetCaption (const char *title, const char *icon);
/* SDL 1.2 had no key repeat unless asked for; SDL2 always has it. Repeats are dropped here. */
int nikwi_PollEvent (SDL_Event * event);
#define SDL_PollEvent nikwi_PollEvent

#ifdef __cplusplus
}
#endif

#endif
