diff options
author | Ian C <ianc@noddybox.co.uk> | 2003-12-24 18:19:00 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2003-12-24 18:19:00 +0000 |
commit | 6a86fc4668ce7e213330bb78aff45c578e159f54 (patch) | |
tree | 360d7295ff108f6408ab740ff297fb99468faa08 /src/gfx.c | |
parent | 33dfea1c74749124379ef8052f0689577ebe68ff (diff) |
devel snapshot
Diffstat (limited to 'src/gfx.c')
-rw-r--r-- | src/gfx.c | 32 |
1 files changed, 29 insertions, 3 deletions
@@ -51,7 +51,7 @@ static const char ident_fh[]=ESPEC_FONT_H; #endif #define SCR_W 320 -#define SCR_H 200 +#define SCR_H 300 #define LOCK do \ { \ @@ -168,8 +168,16 @@ void GFXInit(void) frame=1000/IConfig(CONF_FRAMES_PER_SEC); - if (SDL_Init(SDL_INIT_TIMER|SDL_INIT_VIDEO)) - Exit("Failed to init SDL: %s\n",SDL_GetError()); + if (IConfig(CONF_SOUND)) + { + if (SDL_Init(SDL_INIT_TIMER|SDL_INIT_VIDEO|SDL_INIT_AUDIO)) + Exit("Failed to init SDL: %s\n",SDL_GetError()); + } + else + { + if (SDL_Init(SDL_INIT_TIMER|SDL_INIT_VIDEO)) + Exit("Failed to init SDL: %s\n",SDL_GetError()); + } if (!(surface=SDL_SetVideoMode(SCR_W*scale, SCR_H*scale, @@ -262,6 +270,18 @@ SDL_Event *GFXWaitKey(void) } +void GFXLock(void) +{ + LOCK; +} + + +void GFXUnlock(void) +{ + UNLOCK; +} + + void GFXPlot(int x, int y, Uint32 col) { LOCK; @@ -272,6 +292,12 @@ void GFXPlot(int x, int y, Uint32 col) } +void GFXFastPlot(int x, int y, Uint32 col) +{ + putpixel(x,y,col); +} + + void GFXRect(int x, int y, int w, int h, Uint32 col, int solid) { LOCK; |