mirror of
https://gitlab.com/octospacc/MultiSpaccSDK
synced 2025-04-11 09:31:03 +02:00
New function, cleaner code
This commit is contained in:
parent
270ae8baa0
commit
3d7e9c1744
@ -9,3 +9,11 @@
|
||||
#ifdef MultiSpacc_Target_SDL20
|
||||
#include "SDL20/SDL.h"
|
||||
#endif
|
||||
|
||||
MultiSpacc_Window *MultiSpacc_SetWindow( int Width, int Height, int Bits, Uint32 Flags );
|
||||
MultiSpacc_Surface *MultiSpacc_GetWindowSurface( MultiSpacc_Window *Window );
|
||||
|
||||
void MultiSpacc_SetAppTitle( MultiSpacc_Window *Window, const char *Title );
|
||||
void MultiSpacc_SetAppIcon( MultiSpacc_Window *Window, MultiSpacc_Surface *Icon );
|
||||
|
||||
int MultiSpacc_SetColorKey( MultiSpacc_Surface *Surface, bool Flag, Uint32 Key );
|
||||
|
@ -4,21 +4,21 @@
|
||||
#include "SDL/SDL_mixer.h"
|
||||
#include "SDL/SDL_ttf.h"
|
||||
|
||||
SDL_Surface *MultiSpacc_GetWindow( int Width, int Height, int Bits, Uint32 Flags ) {
|
||||
MultiSpacc_Window *MultiSpacc_SetWindow( int Width, int Height, int Bits, Uint32 Flags ) {
|
||||
return SDL_SetVideoMode( Width, Height, Bits, Flags );
|
||||
}
|
||||
SDL_Surface *MultiSpacc_GetWindowSurface( SDL_Surface *Window ) {
|
||||
MultiSpacc_Surface *MultiSpacc_GetWindowSurface( MultiSpacc_Window *Window ) {
|
||||
return Window;
|
||||
}
|
||||
|
||||
void MultiSpacc_SetAppTitle( SDL_Surface *Window, const char *Title ) {
|
||||
void MultiSpacc_SetAppTitle( MultiSpacc_Window *Window, const char *Title ) {
|
||||
SDL_WM_SetCaption( Title, NULL );
|
||||
}
|
||||
void MultiSpacc_SetAppIcon( SDL_Surface *Window, SDL_Surface *Icon ) {
|
||||
void MultiSpacc_SetAppIcon( MultiSpacc_Window *Window, MultiSpacc_Surface *Icon ) {
|
||||
SDL_WM_SetIcon( Icon, NULL );
|
||||
}
|
||||
|
||||
int MultiSpacc_SetColorKey( SDL_Surface *Surface, bool Flag, Uint32 Key ) {
|
||||
int MultiSpacc_SetColorKey( MultiSpacc_Surface *Surface, bool Flag, Uint32 Key ) {
|
||||
if ( Flag ) {
|
||||
return SDL_SetColorKey( Surface, SDL_SRCCOLORKEY, Key );
|
||||
}
|
||||
|
@ -10,10 +10,7 @@
|
||||
#include "SDL/SDL_mixer.h"
|
||||
#include "SDL/SDL_ttf.h"
|
||||
|
||||
SDL_Surface *MultiSpacc_GetWindow( int Width, int Height, int Bits, Uint32 Flags );
|
||||
SDL_Surface *MultiSpacc_GetWindowSurface( SDL_Surface *Window );
|
||||
#define MultiSpacc_Window SDL_Surface
|
||||
#define MultiSpacc_Surface SDL_Surface
|
||||
|
||||
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 );
|
||||
#define MultiSpacc_UpdateWindowSurface SDL_Flip
|
||||
|
@ -4,21 +4,21 @@
|
||||
#include "SDL2/SDL_mixer.h"
|
||||
#include "SDL2/SDL_ttf.h"
|
||||
|
||||
SDL_Window *MultiSpacc_GetWindow( int Width, int Height, int Bits, Uint32 Flags ) {
|
||||
MultiSpacc_Window *MultiSpacc_SetWindow( 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 ) {
|
||||
MultiSpacc_Surface *MultiSpacc_GetWindowSurface( MultiSpacc_Window *Window ) {
|
||||
return SDL_GetWindowSurface( Window );
|
||||
}
|
||||
|
||||
void MultiSpacc_SetAppTitle( SDL_Surface *Window, const char *Title ) {
|
||||
void MultiSpacc_SetAppTitle( MultiSpacc_Window *Window, const char *Title ) {
|
||||
SDL_SetWindowTitle( Window, Title );
|
||||
}
|
||||
void MultiSpacc_SetAppIcon( SDL_Surface *Window, SDL_Surface *Icon ) {
|
||||
void MultiSpacc_SetAppIcon( MultiSpacc_Window *Window, MultiSpacc_Surface *Icon ) {
|
||||
SDL_SetWindowIcon( Window, Icon );
|
||||
}
|
||||
|
||||
int MultiSpacc_SetColorKey( SDL_Surface *Surface, bool Flag, Uint32 Key ) {
|
||||
int MultiSpacc_SetColorKey( MultiSpacc_Surface *Surface, bool Flag, Uint32 Key ) {
|
||||
if ( Flag ) {
|
||||
return SDL_SetColorKey( Surface, SDL_TRUE, Key );
|
||||
}
|
||||
|
@ -10,10 +10,7 @@
|
||||
#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 );
|
||||
#define MultiSpacc_Window SDL_Window
|
||||
#define MultiSpacc_Surface SDL_Surface
|
||||
|
||||
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 );
|
||||
#define MultiSpacc_UpdateWindowSurface SDL_UpdateWindowSurface
|
||||
|
Loading…
x
Reference in New Issue
Block a user