Add README, some work on SDL 1.2

This commit is contained in:
2022-08-06 13:57:49 +02:00
parent 8bb663a7be
commit 113c2ea17d
7 changed files with 63 additions and 18 deletions

View File

@ -0,0 +1,10 @@
#pragma once
#include <stdbool.h>
#ifdef MultiSpacc_Target_SDL12
#include "SDL12/SDL.h"
#endif
#ifdef MultiSpacc_Target_SDL20
#include "SDL20/SDL.h"
#endif

31
LibMultiSpacc/SDL12/SDL.c Normal file
View File

@ -0,0 +1,31 @@
#include <stddef.h>
#include "../MultiSpacc.h"
#include "SDL/SDL.h"
#include "SDL/SDL_image.h"
#include "SDL/SDL_mixer.h"
#include "SDL/SDL_ttf.h"
void MultiSpacc_SetAppTitle( const char *Title ) {
SDL_WM_SetCaption( Title, NULL );
}
void MultiSpacc_SetAppIcon( SDL_Surface *Icon ) {
SDL_WM_SetIcon( Icon, NULL );
}
int MultiSpacc_SetColorKey( SDL_Surface *Surface, bool Flag, Uint32 Key ) {
if ( Flag ) {
return SDL_SetColorKey( Surface, SDL_SRCCOLORKEY, Key );
}
else {
return SDL_SetColorKey( Surface, 0, Key );
}
}
SDL_Surface *MultiSpacc_GetWindow( int Width, int Height, int Bits, Uint32 Flags ) {
return SDL_SetVideoMode( Width, Height, Bits, Flags );
}
SDL_Surface *MultiSpacc_GetWindowSurface( SDL_Surface *Window ) {
return Window;
}

18
LibMultiSpacc/SDL12/SDL.h Normal file
View File

@ -0,0 +1,18 @@
#pragma once
#ifndef MultiSpacc_Target_SDL12
#define MultiSpacc_Target_SDL12
#endif
#include <stddef.h>
#include "../MultiSpacc.h"
#include "SDL/SDL.h"
#include "SDL/SDL_image.h"
#include "SDL/SDL_mixer.h"
#include "SDL/SDL_ttf.h"
void MultiSpacc_SetAppTitle( const char *Title );
void MultiSpacc_SetAppIcon( SDL_Surface *Icon );
int MultiSpacc_SetColorKey( SDL_Surface *Surface, bool Flag, Uint32 Key );
SDL_Surface *MultiSpacc_GetWindow( int Width, int Height, int Bits, Uint32 Flags );
SDL_Surface *MultiSpacc_GetWindowSurface( SDL_Surface *Window );

11
LibMultiSpacc/SDL20/SDL.h Normal file
View File

@ -0,0 +1,11 @@
#pragma once
#ifndef MultiSpacc_Target_SDL20
#define MultiSpacc_Target_SDL20
#endif
#include "../MultiSpacc.h"
#include "SDL2/SDL.h"
#include "SDL2/SDL_image.h"
#include "SDL2/SDL_mixer.h"
#include "SDL2/SDL_ttf.h"