summaryrefslogtreecommitdiff
path: root/src/gfx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gfx.c')
-rw-r--r--src/gfx.c32
1 files changed, 29 insertions, 3 deletions
diff --git a/src/gfx.c b/src/gfx.c
index a77c496..739b876 100644
--- a/src/gfx.c
+++ b/src/gfx.c
@@ -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;