mirror of
https://gitlab.com/octospacc/MultiSpaccSDK
synced 2025-04-16 19:57:19 +02:00
Add README, some work on SDL 1.2
This commit is contained in:
parent
8bb663a7be
commit
113c2ea17d
31
LibMultiSpacc/SDL12/SDL.c
Normal file
31
LibMultiSpacc/SDL12/SDL.c
Normal 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
18
LibMultiSpacc/SDL12/SDL.h
Normal 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 );
|
14
README.md
Normal file
14
README.md
Normal file
@ -0,0 +1,14 @@
|
||||
# LibMultiSpacc
|
||||
|
||||
LibMultiSpacc is a library aiming to provide cross-platform abstractions for a number of less-cross-platform libraries.
|
||||
|
||||
The list of backend libraries supported follows:
|
||||
|
||||
- SDL 1.2 (WIP)
|
||||
- SDL 2.0 (planned)
|
||||
|
||||
Example programs (and makefiles) will come soon.
|
||||
|
||||
### Licensing
|
||||
|
||||
I have yet to choose a license for this. I would like for the library to be usable by as many people as possible (and, for that, the Unlicense o zlib license would be the best), but I have yet to understand legal compatibility with all the different libraries mine is made to work on top of.
|
@ -1,5 +0,0 @@
|
||||
#include <stddef.h>
|
||||
|
||||
void MultiSpacc_SetAppTitle( const char *Title ) {
|
||||
SDL_WM_SetCaption( Title, NULL );
|
||||
}
|
13
SDL12/SDL.h
13
SDL12/SDL.h
@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef MultiSpacc_Target_SDL12
|
||||
#define MultiSpacc_Target_SDL12
|
||||
#endif
|
||||
|
||||
#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 );
|
Loading…
x
Reference in New Issue
Block a user