mirror of
https://gitlab.com/octospacc/MultiSpaccSDK
synced 2025-06-05 22:09:21 +02:00
Edit README, some work on SDL 2.0
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef MultiSpacc_Target_SDL12
|
||||
#include "SDL12/SDL.h"
|
||||
|
@ -1,15 +1,20 @@
|
||||
#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 );
|
||||
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;
|
||||
}
|
||||
|
||||
void MultiSpacc_SetAppIcon( SDL_Surface *Icon ) {
|
||||
void MultiSpacc_SetAppTitle( SDL_Surface *Window, const char *Title ) {
|
||||
SDL_WM_SetCaption( Title, NULL );
|
||||
}
|
||||
void MultiSpacc_SetAppIcon( SDL_Surface *Window, SDL_Surface *Icon ) {
|
||||
SDL_WM_SetIcon( Icon, NULL );
|
||||
}
|
||||
|
||||
@ -21,11 +26,3 @@ int MultiSpacc_SetColorKey( SDL_Surface *Surface, bool Flag, Uint32 Key ) {
|
||||
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;
|
||||
}
|
||||
|
@ -4,15 +4,16 @@
|
||||
#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 );
|
||||
|
||||
void MultiSpacc_SetAppTitle( SDL_Surface *Window, const char *Title );
|
||||
void MultiSpacc_SetAppIcon( SDL_Surface *Window, SDL_Surface *Icon );
|
||||
|
||||
int MultiSpacc_SetColorKey( SDL_Surface *Surface, bool Flag, Uint32 Key );
|
||||
|
28
LibMultiSpacc/SDL20/SDL.c
Normal file
28
LibMultiSpacc/SDL20/SDL.c
Normal file
@ -0,0 +1,28 @@
|
||||
#include "../MultiSpacc.h"
|
||||
#include "SDL2/SDL.h"
|
||||
#include "SDL2/SDL_image.h"
|
||||
#include "SDL2/SDL_mixer.h"
|
||||
#include "SDL2/SDL_ttf.h"
|
||||
|
||||
SDL_Window *MultiSpacc_GetWindow( int Width, int Height, int Bits, Uint32 Flags ) {
|
||||
return SDL_CreateWindow(NULL, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, Width, Height, Flags);
|
||||
}
|
||||
SDL_Surface *MultiSpacc_GetWindowSurface( SDL_Surface *Window ) {
|
||||
return SDL_GetWindowSurface( Window );
|
||||
}
|
||||
|
||||
void MultiSpacc_SetAppTitle( SDL_Surface *Window, const char *Title ) {
|
||||
SDL_SetWindowTitle( Window, Title );
|
||||
}
|
||||
void MultiSpacc_SetAppIcon( SDL_Surface *Window, SDL_Surface *Icon ) {
|
||||
SDL_SetWindowIcon( Window, Icon );
|
||||
}
|
||||
|
||||
int MultiSpacc_SetColorKey( SDL_Surface *Surface, bool Flag, Uint32 Key ) {
|
||||
if ( Flag ) {
|
||||
return SDL_SetColorKey( Surface, SDL_TRUE, Key );
|
||||
}
|
||||
else {
|
||||
return SDL_SetColorKey( Surface, SDL_FALSE, Key );
|
||||
}
|
||||
}
|
@ -9,3 +9,11 @@
|
||||
#include "SDL2/SDL_image.h"
|
||||
#include "SDL2/SDL_mixer.h"
|
||||
#include "SDL2/SDL_ttf.h"
|
||||
|
||||
SDL_Window *MultiSpacc_GetWindow( int Width, int Height, int Bits, Uint32 Flags );
|
||||
SDL_Surface *MultiSpacc_GetWindowSurface( SDL_Surface *Window );
|
||||
|
||||
void MultiSpacc_SetAppTitle( SDL_Surface *Window, const char *Title );
|
||||
void MultiSpacc_SetAppIcon( SDL_Surface *Window, SDL_Surface *Icon );
|
||||
|
||||
int MultiSpacc_SetColorKey( SDL_Surface *Surface, bool Flag, Uint32 Key );
|
||||
|
Reference in New Issue
Block a user