/*
 * bnxsdl12.h: the part of the SDL 1.2 API that Biniax-2 uses, on top of SDL2, for the fredygames.com
 * browser build (Emscripten). The build includes it in every file (-include), after <SDL.h>.
 * Copyright (C) 2026 FredyGames. Distributed under the same zlib license as Biniax-2.
 */
#ifndef BNX_SDL12_H
#define BNX_SDL12_H

#include <SDL.h>

#ifdef __cplusplus
extern "C" {
#endif

#define SDL_SWSURFACE 0x00000000
#define SDL_ANYFORMAT 0x10000000
#define SDL_FULLSCREEN 0x80000000
#define SDL_SRCALPHA 0x00010000

#define SDLK_KP2 SDLK_KP_2
#define SDLK_KP4 SDLK_KP_4
#define SDLK_KP6 SDLK_KP_6
#define SDLK_KP8 SDLK_KP_8

/* SDL 1.2 took "NAME=value"; the game only asks to center the window, which a canvas does not need */
#define SDL_putenv(s) ((void) (s))

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);
int SDL_SetAlpha (SDL_Surface * surface, Uint32 flags, Uint8 alpha);
SDL_Surface *SDL_DisplayFormat (SDL_Surface * surface);

#ifdef __cplusplus
}
#endif

#endif
