r2160 - in trunk/user

dslinux_gpf at dslinux.in-berlin.de dslinux_gpf at dslinux.in-berlin.de
Sat Mar 8 11:10:31 CET 2008


Author: gpf
Date: 2008-03-08 11:10:30 +0100 (Sat, 08 Mar 2008)
New Revision: 2160

Log:
xrick changes for dslinux

Copied: trunk/user/xrick (from rev 2159, tags/xrick/xrick-021212)

Modified: trunk/user/xrick/Makefile
===================================================================
--- tags/xrick/xrick-021212/Makefile	2008-03-08 04:56:32 UTC (rev 2159)
+++ trunk/user/xrick/Makefile	2008-03-08 10:10:30 UTC (rev 2160)
@@ -1,90 +1,16 @@
-#
-# xrick/Makefile
-#
-# Copyright (C) 1998-2002 BigOrno (bigorno at bigorno.net). All rights reserved.
-#
-# The use and distribution terms for this software are contained in the file
-# named README, which can be found in the root of this distribution. By
-# using this software in any fashion, you are agreeing to be bound by the
-# terms of this license.
-#
-# You must not remove this notice, or any other, from this software.
-#
-
-#
-# Vars
-#
-
-SDLVERSION=$(shell sdl-config --version 2>/dev/null)
-ROOTDIR=$(shell pwd)
-TARGET=$(shell uname -s | tr [a-z] [A-Z])
-
-#
-# Config
-#
+# Makefile for xrick
 
-ifeq ($(strip $(SDLVERSION)),) 
-$(error SDL is missing) 
-else 
-$(warning Detected SDL version $(SDLVERSION)) 
-endif
-
-ifeq ($(strip $(SDLVERSION)),)
-$(error SDL is missing)
-endif
-
-SDL_MAJ=$(word 1,$(subst ., ,$(SDLVERSION)))
-SDL_MIN=$(word 2,$(subst ., ,$(SDLVERSION)))
-SDL_MIC=$(word 3,$(subst ., ,$(SDLVERSION)))
-
-SDL_MAJ_REQ=1
-SDL_MIN_REQ=2
-SDL_MIC_REQ=1
-
-SDL_CHKVER=$(shell if [ $(SDL_MAJ) -lt $(SDL_MAJ_REQ) ]; then echo "BAD"; fi)
-ifeq ($(SDL_CHKVER),BAD)
-$(error SDL version $(SDL_MAJ_REQ).$(SDL_MIN_REQ).$(SDL_MIC_REQ) is required)
-endif
-
-SDL_CHKVER=$(shell if [ $(SDL_MAJ) -eq $(SDL_MAJ_REQ) -a $(SDL_MIN) -lt $(SDL_MIN_REQ) ]; then echo "BAD"; fi)
-ifeq ($(SDL_CHKVER),BAD)
-$(error SDL version $(SDL_MAJ_REQ).$(SDL_MIN_REQ).$(SDL_MIC_REQ) is required)
-endif
-
-SDL_CHKVER=$(shell if [ $(SDL_MAJ) -eq $(SDL_MAJ_REQ) -a $(SDL_MIN) -eq $(SDL_MIN_REQ) -a $(SDL_MIC) -lt $(SDL_MIC_REQ) ]; then echo "BAD"; fi)
-ifeq ($(SDL_CHKVER),BAD)
-$(error SDL version $(SDL_MAJ_REQ).$(SDL_MIN_REQ).$(SDL_MIC_REQ) is required)
-endif
-
-ifneq (,$(findstring CYGWIN,$(TARGET)))
-XOBJ=xrick.res
-endif
-
-ifneq (,$(findstring MINGW,$(TARGET)))
-XOBJ=xrick.res
-endif
+all: .compiled
 
-#
-
-# Rules
-#
+.compiled: 
+	$(MAKE) -C src
+	touch $@
 
-all:
-	@echo "ROOTDIR=$(ROOTDIR)" > Makefile.global
-	@echo "XOBJ=$(XOBJ)" >> Makefile.global
-	@echo "CFLAGS=-g -ansi -pedantic -Wall -W -O2 -I $(ROOTDIR)/include $(shell sdl-config --cflags)" >> Makefile.global
-	@echo "LDFLAGS=-lz $(shell sdl-config --libs)" >> Makefile.global
-	@echo "CC=gcc" >> Makefile.global
-	@echo "CPP=gcc -E" >> Makefile.global
-	$(MAKE) -C src all
-
-clean:
-	for i in src include; do \
-	  $(MAKE) -C $$i clean; \
-	done
-	rm -f *~ log.txt Makefile.global
-
-depend:
-	$(MAKE) -C src depend
+clean:
+	-[ -f src/Makefile ] && $(MAKE) -C src clean
+	rm -f .compiled
 
-# eof
+romfs:
+	$(ROMFSINST) src/xrick /bin/xrick
+	$(ROMFSINST) -d data.zip /usr/share/games/xrick/data.zip
+

Modified: trunk/user/xrick/include/img.h
===================================================================
--- tags/xrick/xrick-021212/include/img.h	2008-03-08 04:56:32 UTC (rev 2159)
+++ trunk/user/xrick/include/img.h	2008-03-08 10:10:30 UTC (rev 2160)
@@ -1,34 +1,34 @@
-/*
- * xrick/include/img.h
- *
- * Copyright (C) 1998-2002 BigOrno (bigorno at bigorno.net). All rights reserved.
- *
- * The use and distribution terms for this software are contained in the file
- * named README, which can be found in the root of this distribution. By
- * using this software in any fashion, you are agreeing to be bound by the
- * terms of this license.
- *
- * You must not remove this notice, or any other, from this software.
- */
-
-#ifndef _IMG_H
-#define _IMG_H
-
-#include "system.h"
-
-typedef struct {
-  U8 r, g, b, nothing;
-} img_color_t;
-
-typedef struct {
-  U16 w, h;
-  U16 ncolors;
-  img_color_t *colors;
-  U8 *pixels;
-} img_t;
-
-img_t *IMG_SPLASH;
-
-#endif
-
-/* eof */
+/*
+ * xrick/include/img.h
+ *
+ * Copyright (C) 1998-2002 BigOrno (bigorno at bigorno.net). All rights reserved.
+ *
+ * The use and distribution terms for this software are contained in the file
+ * named README, which can be found in the root of this distribution. By
+ * using this software in any fashion, you are agreeing to be bound by the
+ * terms of this license.
+ *
+ * You must not remove this notice, or any other, from this software.
+ */
+
+#ifndef _IMG_H
+#define _IMG_H
+
+#include "system.h"
+
+typedef struct {
+  U8 r, g, b, nothing;
+} img_color_t;
+
+typedef struct {
+  U16 w, h;
+  U16 ncolors;
+  img_color_t *colors;
+  U8 *pixels;
+} img_t;
+
+extern img_t *IMG_SPLASH;
+
+#endif
+
+/* eof */

Modified: trunk/user/xrick/include/system.h
===================================================================
--- tags/xrick/xrick-021212/include/system.h	2008-03-08 04:56:32 UTC (rev 2159)
+++ trunk/user/xrick/include/system.h	2008-03-08 10:10:30 UTC (rev 2160)
@@ -1,167 +1,167 @@
-/*
- * xrick/include/system.h
- *
- * Copyright (C) 1998-2002 BigOrno (bigorno at bigorno.net). All rights reserved.
- *
- * The use and distribution terms for this software are contained in the file
- * named README, which can be found in the root of this distribution. By
- * using this software in any fashion, you are agreeing to be bound by the
- * terms of this license.
- *
- * You must not remove this notice, or any other, from this software.
- */
-
-#ifndef _SYSTEM_H
-#define _SYSTEM_H
-
-#include "config.h"
-
-/*
- * If compiling w/gcc, then we can use attributes. UNUSED(x) flags a
- * parameter or a variable as potentially being unused, so that gcc doesn't
- * complain about it.
- *
- * Note: from OpenAL code: Darwin OS cc is based on gcc and has __GNUC__
- * defined, yet does not support attributes. So in theory we should exclude
- * Darwin target here.
- */
-#ifdef __GNUC__
-#define UNUSED(x) x __attribute((unused))
-#else
-#define UNUSED(x) x
-#endif
-
-/*
- * Detect Microsoft Visual C
- */
-#ifdef _MSC_VER
-#define __MSVC__
-/*
- * FIXME disable "integral size mismatch in argument; conversion supplied" warning
- * as long as the code has not been cleared -- there are so many of them...
- */
-
-#pragma warning( disable : 4761 )
-#endif
-
-/*
- * Detect Microsoft Windows
- */
-#ifdef WIN32
-#define __WIN32__
-#endif
-
-/* there are true at least on x86 platforms */
-typedef unsigned char U8;         /*  8 bits unsigned */
-typedef unsigned short int U16;   /* 16 bits unsigned */
-typedef unsigned int U32;         /* 32 bits unsigned */
-typedef signed char S8;           /*  8 bits signed   */
-typedef signed short int S16;     /* 16 bits signed   */
-typedef signed int S32;           /* 32 bits signed   */
-
-/* this must be after typedefs because it relies on types defined above */
-#include "rects.h"
-#include "img.h"
-
-/*
- * main section
- */
-extern void sys_init(int, char **);
-extern void sys_shutdown(void);
-extern void sys_panic(char *, ...);
-extern void sys_printf(char *, ...);
-extern U32 sys_gettime(void);
-extern void sys_sleep(int);
-
-/*
- * video section
- */
-#define SYSVID_ZOOM 2
-#define SYSVID_MAXZOOM 4
-#define SYSVID_WIDTH 320
-#define SYSVID_HEIGHT 200
-
-extern void sysvid_init(void);
-extern void sysvid_shutdown(void);
-extern void sysvid_update(rect_t *);
-extern void sysvid_clear(void);
-extern void sysvid_zoom(S8);
-extern void sysvid_toggleFullscreen(void);
-extern void sysvid_setGamePalette(void);
-extern void sysvid_setPalette(img_color_t *, U16);
-
-/*
- * events section
- */
-extern void sysevt_poll(void);
-extern void sysevt_wait(void);
-
-/*
- * keyboard section
- */
-extern U8 syskbd_up;
-extern U8 syskbd_down;
-extern U8 syskbd_left;
-extern U8 syskbd_right;
-extern U8 syskbd_pause;
-extern U8 syskbd_end;
-extern U8 syskbd_xtra;
-extern U8 syskbd_fire;
-
-/*
- * sound section
- */
-#ifdef ENABLE_SOUND
-typedef struct {
-#ifdef DEBUG
-  char *name;
-#endif
-  U8 *buf;
-  U32 len;
-  U8 dispose;
-} sound_t;
-
-extern void syssnd_init(void);
-extern void syssnd_shutdown(void);
-extern void syssnd_vol(S8);
-extern void syssnd_toggleMute(void);
-extern S8 syssnd_play(sound_t *, S8);
-extern void syssnd_pause(U8, U8);
-extern void syssnd_stopchan(S8);
-extern void syssnd_stopsound(sound_t *);
-extern void syssnd_stopall();
-extern int syssnd_isplaying(sound_t *);
-extern sound_t *syssnd_load(char *name);
-extern void syssnd_free(sound_t *);
-#endif
-
-/*
- * args section
- */
-extern int sysarg_args_period;
-extern int sysarg_args_map;
-extern int sysarg_args_submap;
-extern int sysarg_args_fullscreen;
-extern int sysarg_args_zoom;
-#ifdef ENABLE_SOUND
-extern int sysarg_args_nosound;
-extern int sysarg_args_vol;
-#endif
-extern char *sysarg_args_data;
-
-extern void sysarg_init(int, char **);
-
-/*
- * joystick section
- */
-#ifdef ENABLE_JOYSTICK
-extern void sysjoy_init(void);
-extern void sysjoy_shutdown(void);
-#endif
-
-
-#endif
-
-/* eof */
-
-
+/*
+ * xrick/include/system.h
+ *
+ * Copyright (C) 1998-2002 BigOrno (bigorno at bigorno.net). All rights reserved.
+ *
+ * The use and distribution terms for this software are contained in the file
+ * named README, which can be found in the root of this distribution. By
+ * using this software in any fashion, you are agreeing to be bound by the
+ * terms of this license.
+ *
+ * You must not remove this notice, or any other, from this software.
+ */
+
+#ifndef _SYSTEM_H
+#define _SYSTEM_H
+
+#include "config.h"
+
+/*
+ * If compiling w/gcc, then we can use attributes. UNUSED(x) flags a
+ * parameter or a variable as potentially being unused, so that gcc doesn't
+ * complain about it.
+ *
+ * Note: from OpenAL code: Darwin OS cc is based on gcc and has __GNUC__
+ * defined, yet does not support attributes. So in theory we should exclude
+ * Darwin target here.
+ */
+#ifdef __GNUC__
+#define UNUSED(x) x __attribute((unused))
+#else
+#define UNUSED(x) x
+#endif
+
+/*
+ * Detect Microsoft Visual C
+ */
+#ifdef _MSC_VER
+#define __MSVC__
+/*
+ * FIXME disable "integral size mismatch in argument; conversion supplied" warning
+ * as long as the code has not been cleared -- there are so many of them...
+ */
+
+#pragma warning( disable : 4761 )
+#endif
+
+/*
+ * Detect Microsoft Windows
+ */
+#ifdef WIN32
+#define __WIN32__
+#endif
+
+/* there are true at least on x86 platforms */
+typedef unsigned char U8;         /*  8 bits unsigned */
+typedef unsigned short int U16;   /* 16 bits unsigned */
+typedef unsigned int U32;         /* 32 bits unsigned */
+typedef signed char S8;           /*  8 bits signed   */
+typedef signed short int S16;     /* 16 bits signed   */
+typedef signed int S32;           /* 32 bits signed   */
+
+/* this must be after typedefs because it relies on types defined above */
+#include "rects.h"
+#include "img.h"
+
+/*
+ * main section
+ */
+extern void sys_init(int, char **);
+extern void sys_shutdown(void);
+extern void sys_panic(char *, ...);
+extern void sys_printf(char *, ...);
+extern U32 sys_gettime(void);
+extern void sys_sleep(int);
+
+/*
+ * video section
+ */
+#define SYSVID_ZOOM 1
+#define SYSVID_MAXZOOM 4
+#define SYSVID_WIDTH 320
+#define SYSVID_HEIGHT 200
+
+extern void sysvid_init(void);
+extern void sysvid_shutdown(void);
+extern void sysvid_update(rect_t *);
+extern void sysvid_clear(void);
+extern void sysvid_zoom(S8);
+extern void sysvid_toggleFullscreen(void);
+extern void sysvid_setGamePalette(void);
+extern void sysvid_setPalette(img_color_t *, U16);
+
+/*
+ * events section
+ */
+extern void sysevt_poll(void);
+extern void sysevt_wait(void);
+
+/*
+ * keyboard section
+ */
+extern U8 syskbd_up;
+extern U8 syskbd_down;
+extern U8 syskbd_left;
+extern U8 syskbd_right;
+extern U8 syskbd_pause;
+extern U8 syskbd_end;
+extern U8 syskbd_xtra;
+extern U8 syskbd_fire;
+
+/*
+ * sound section
+ */
+#ifdef ENABLE_SOUND
+typedef struct {
+#ifdef DEBUG
+  char *name;
+#endif
+  U8 *buf;
+  U32 len;
+  U8 dispose;
+} sound_t;
+
+extern void syssnd_init(void);
+extern void syssnd_shutdown(void);
+extern void syssnd_vol(S8);
+extern void syssnd_toggleMute(void);
+extern S8 syssnd_play(sound_t *, S8);
+extern void syssnd_pause(U8, U8);
+extern void syssnd_stopchan(S8);
+extern void syssnd_stopsound(sound_t *);
+extern void syssnd_stopall();
+extern int syssnd_isplaying(sound_t *);
+extern sound_t *syssnd_load(char *name);
+extern void syssnd_free(sound_t *);
+#endif
+
+/*
+ * args section
+ */
+extern int sysarg_args_period;
+extern int sysarg_args_map;
+extern int sysarg_args_submap;
+extern int sysarg_args_fullscreen;
+extern int sysarg_args_zoom;
+#ifdef ENABLE_SOUND
+extern int sysarg_args_nosound;
+extern int sysarg_args_vol;
+#endif
+extern char *sysarg_args_data;
+
+extern void sysarg_init(int, char **);
+
+/*
+ * joystick section
+ */
+#ifdef ENABLE_JOYSTICK
+extern void sysjoy_init(void);
+extern void sysjoy_shutdown(void);
+#endif
+
+
+#endif
+
+/* eof */
+
+

Modified: trunk/user/xrick/src/Makefile
===================================================================
--- tags/xrick/xrick-021212/src/Makefile	2008-03-08 04:56:32 UTC (rev 2159)
+++ trunk/user/xrick/src/Makefile	2008-03-08 10:10:30 UTC (rev 2160)
@@ -1,63 +1,15 @@
-#
-# xrick/src/Makefile
-#
-# Copyright (C) 1998-2002 BigOrno (bigorno at bigorno.net). All rights reserved.
-#
-# The use and distribution terms for this software are contained in the file
-# named README, which can be found in the root of this distribution. By
-# using this software in any fashion, you are agreeing to be bound by the
-# terms of this license.
-#
-# You must not remove this notice, or any other, from this software.
-#
-
-#
-# Includes
-#
-#
-ifeq (.depend, $(wildcard .depend))
-include .depend
-endif
-
-ifeq (../Makefile.global, $(wildcard ../Makefile.global))
-include ../Makefile.global
-else
-$(error Oops)
-endif
-
-#
-# Defs
-#
-#
-TARGET = ../xrick
-OBJECTS = unzip.o data.o scr_xrick.o scr_pause.o scr_imain.o scr_imap.o scr_gameover.o scr_getname.o dat_picsPC.o dat_picsST.o dat_screens.o dat_tilesPC.o dat_tilesST.o dat_maps.o dat_ents.o dat_spritesST.o dat_spritesPC.o ents.o e_bullet.o e_bomb.o e_rick.o e_sbonus.o e_them.o e_bonus.o e_box.o rects.o util.o game.o xrick.o draw.o maps.o sysvid.o syskbd.o control.o system.o scroller.o sysevt.o sysarg.o syssnd.o sysjoy.o dat_snd.o
-
-#
-# Rules
-#
-#
-
-all: $(TARGET)
-
-$(TARGET): $(OBJECTS) $(XOBJ)
-	$(CC) $(OBJECTS) $(XOBJ) $(LDFLAGS) -o $(TARGET)
-
-%.o: %.c
-	$(CC) $(CFLAGS) -c $< -o $@
-
-xrick.res: xrick.rc
-	windres $< -O coff -o $@
-
-clean:
-	rm -f *~ *.o core .depend $(TARGET)
-	rm -f *.exe *.core *.res
-	rm -f $(LINKS)
-
-depend:
-	for i in *.c; do $(CPP) $(CFLAGS) -I$(ROOTDIR)/include -MM $$i; done > .depend
-
-# eof
-
-
-
-
+
+EXEC = xrick
+OBJS = unzip.o data.o scr_xrick.o scr_pause.o scr_imain.o scr_imap.o scr_gameover.o scr_getname.o dat_picsPC.o dat_picsST.o dat_screens.o dat_tilesPC.o dat_tilesST.o dat_maps.o dat_ents.o dat_spritesST.o dat_spritesPC.o ents.o e_bullet.o e_bomb.o e_rick.o e_sbonus.o e_them.o e_bonus.o e_box.o rects.o util.o game.o xrick.o draw.o maps.o sysvid.o syskbd.o control.o system.o scroller.o sysevt.o sysarg.o syssnd.o sysjoy.o dat_snd.o
+
+CFLAGS += -I../include
+all: $(EXEC)
+
+$(EXEC): $(OBJS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS)  $(LDLIBS) $(LIBGCC) -lSDL -lpthread -lz $(LIBM)
+
+romfs:
+	$(ROMFSINST) /bin/$(EXEC)
+
+clean:
+	-rm -rf $(EXEC) *.elf *.gdb *.o

Modified: trunk/user/xrick/src/dat_snd.c
===================================================================
--- tags/xrick/xrick-021212/src/dat_snd.c	2008-03-08 04:56:32 UTC (rev 2159)
+++ trunk/user/xrick/src/dat_snd.c	2008-03-08 10:10:30 UTC (rev 2160)
@@ -1,34 +1,34 @@
-/*
- * xrick/data/dat_snd.c
- *
- * Copyright (C) 1998-2002 BigOrno (bigorno at bigorno.net). All rights reserved.
- *
- * The use and distribution terms for this software are contained in the file
- * named README, which can be found in the root of this distribution. By
- * using this software in any fashion, you are agreeing to be bound by the
- * terms of this license.
- *
- * You must not remove this notice, or any other, from this software.
- */
-
-#include "config.h"
-
-#ifdef ENABLE_SOUND
-
-#include "system.h"
-
-sound_t *WAV_WAA;
-sound_t *WAV_BOMB;
-sound_t *WAV_BULLET;
-sound_t *WAV_WALK;
-sound_t *WAV_JUMP;
-sound_t *WAV_TING;
-sound_t *WAV_BOMBSHHT;
-sound_t *WAV_BONUS;
-sound_t *WAV_SHHT;
-sound_t *WAV_BOX;
-sound_t *WAV_DDDING;
-
-#endif /* ENABLE_SOUND */
-
-/* eof */
+/*
+ * xrick/data/dat_snd.c
+ *
+ * Copyright (C) 1998-2002 BigOrno (bigorno at bigorno.net). All rights reserved.
+ *
+ * The use and distribution terms for this software are contained in the file
+ * named README, which can be found in the root of this distribution. By
+ * using this software in any fashion, you are agreeing to be bound by the
+ * terms of this license.
+ *
+ * You must not remove this notice, or any other, from this software.
+ */
+
+#include "config.h"
+
+#ifdef ENABLE_SOUND
+
+#include "system.h"
+
+extern sound_t *WAV_WAA;
+extern sound_t *WAV_BOMB;
+extern sound_t *WAV_BULLET;
+extern sound_t *WAV_WALK;
+extern sound_t *WAV_JUMP;
+extern sound_t *WAV_TING;
+extern sound_t *WAV_BOMBSHHT;
+extern sound_t *WAV_BONUS;
+extern sound_t *WAV_SHHT;
+extern sound_t *WAV_BOX;
+extern sound_t *WAV_DDDING;
+
+#endif /* ENABLE_SOUND */
+
+/* eof */

Modified: trunk/user/xrick/src/sysvid.c
===================================================================
--- tags/xrick/xrick-021212/src/sysvid.c	2008-03-08 04:56:32 UTC (rev 2159)
+++ trunk/user/xrick/src/sysvid.c	2008-03-08 10:10:30 UTC (rev 2160)
@@ -1,381 +1,381 @@
-/*
- * xrick/src/sysvid.c
- *
- * Copyright (C) 1998-2002 BigOrno (bigorno at bigorno.net). All rights reserved.
- *
- * The use and distribution terms for this software are contained in the file
- * named README, which can be found in the root of this distribution. By
- * using this software in any fashion, you are agreeing to be bound by the
- * terms of this license.
- *
- * You must not remove this notice, or any other, from this software.
- */
-
-#include <stdlib.h> /* malloc */
-
-#include <SDL.h>
-
-#include "system.h"
-#include "game.h"
-#include "img.h"
-#include "debug.h"
-
-#ifdef __MSVC__
-#include <memory.h> /* memset */
-#endif
-
-U8 *sysvid_fb; /* frame buffer */
-rect_t SCREENRECT = {0, 0, SYSVID_WIDTH, SYSVID_HEIGHT, NULL}; /* whole fb */
-
-static SDL_Color palette[256];
-static SDL_Surface *screen;
-static U32 videoFlags;
-
-static U8 zoom = SYSVID_ZOOM; /* actual zoom level */
-static U8 szoom = 0;  /* saved zoom level */
-static U8 fszoom = 0;  /* fullscreen zoom level */
-
-#include "img_icon.e"
-
-/*
- * color tables
- */
-
-#ifdef GFXPC
-static U8 RED[] = { 0x00, 0x50, 0xf0, 0xf0, 0x00, 0x50, 0xf0, 0xf0 };
-static U8 GREEN[] = { 0x00, 0xf8, 0x50, 0xf8, 0x00, 0xf8, 0x50, 0xf8 };
-static U8 BLUE[] = { 0x00, 0x50, 0x50, 0x50, 0x00, 0xf8, 0xf8, 0xf8 };
-#endif
-#ifdef GFXST
-static U8 RED[] = { 0x00, 0xd8, 0xb0, 0xf8,
-                    0x20, 0x00, 0x00, 0x20,
-                    0x48, 0x48, 0x90, 0xd8,
-                    0x48, 0x68, 0x90, 0xb0,
-                    /* cheat colors */
-                    0x50, 0xe0, 0xc8, 0xf8,
-                    0x68, 0x50, 0x50, 0x68,
-                    0x80, 0x80, 0xb0, 0xe0,
-                    0x80, 0x98, 0xb0, 0xc8
-};
-static U8 GREEN[] = { 0x00, 0x00, 0x6c, 0x90,
-                      0x24, 0x48, 0x6c, 0x48,
-                      0x6c, 0x24, 0x48, 0x6c,
-                      0x48, 0x6c, 0x90, 0xb4,
-		      /* cheat colors */
-                      0x54, 0x54, 0x9c, 0xb4,
-                      0x6c, 0x84, 0x9c, 0x84,
-                      0x9c, 0x6c, 0x84, 0x9c,
-                      0x84, 0x9c, 0xb4, 0xcc
-};
-static U8 BLUE[] = { 0x00, 0x00, 0x68, 0x68,
-                     0x20, 0xb0, 0xd8, 0x00,
-                     0x20, 0x00, 0x00, 0x00,
-                     0x48, 0x68, 0x90, 0xb0,
-		     /* cheat colors */
-                     0x50, 0x50, 0x98, 0x98,
-                     0x68, 0xc8, 0xe0, 0x50,
-                     0x68, 0x50, 0x50, 0x50,
-                     0x80, 0x98, 0xb0, 0xc8};
-#endif
-
-/*
- * Initialize screen
- */
-static
-SDL_Surface *initScreen(U16 w, U16 h, U8 bpp, U32 flags)
-{
-  return SDL_SetVideoMode(w, h, bpp, flags);
-}
-
-void
-sysvid_setPalette(img_color_t *pal, U16 n)
-{
-  U16 i;
-
-  for (i = 0; i < n; i++) {
-    palette[i].r = pal[i].r;
-    palette[i].g = pal[i].g;
-    palette[i].b = pal[i].b;
-  }
-  SDL_SetColors(screen, (SDL_Color *)&palette, 0, n);
-}
-
-void
-sysvid_restorePalette()
-{
-  SDL_SetColors(screen, (SDL_Color *)&palette, 0, 256);
-}
-
-void
-sysvid_setGamePalette()
-{
-  U8 i;
-  img_color_t pal[256];
-
-  for (i = 0; i < 32; ++i) {
-    pal[i].r = RED[i];
-    pal[i].g = GREEN[i];
-    pal[i].b = BLUE[i];
-  }
-  sysvid_setPalette(pal, 32);
-}
-
-/*
- * Initialize video modes
- */
-void
-sysvid_chkvm(void)
-{
-  SDL_Rect **modes;
-  U8 i, mode = 0;
-
-  IFDEBUG_VIDEO(sys_printf("xrick/video: checking video modes\n"););
-
-  modes = SDL_ListModes(NULL, videoFlags|SDL_FULLSCREEN);
-
-  if (modes == (SDL_Rect **)0)
-    sys_panic("xrick/video: SDL can not find an appropriate video mode\n");
-
-  if (modes == (SDL_Rect **)-1) {
-    /* can do what you want, everything is possible */
-    IFDEBUG_VIDEO(sys_printf("xrick/video: SDL says any video mode is OK\n"););
-    fszoom = 1;
-  }
-  else {
-    IFDEBUG_VIDEO(sys_printf("xrick/video: SDL says, use these modes:\n"););
-    for (i = 0; modes[i]; i++) {
-      IFDEBUG_VIDEO(sys_printf("  %dx%d\n", modes[i]->w, modes[i]->h););
-      if (modes[i]->w <= modes[mode]->w && modes[i]->w >= SYSVID_WIDTH &&
-	  modes[i]->h * SYSVID_WIDTH >= modes[i]->w * SYSVID_HEIGHT) {
-	mode = i;
-	fszoom = modes[mode]->w / SYSVID_WIDTH;
-      }
-    }
-    if (fszoom != 0) {
-      IFDEBUG_VIDEO(
-        sys_printf("xrick/video: fullscreen at %dx%d w/zoom=%d\n",
-		   modes[mode]->w, modes[mode]->h, fszoom);
-	);
-    }
-    else {
-      IFDEBUG_VIDEO(
-        sys_printf("xrick/video: can not compute fullscreen zoom, use 1\n");
-	);
-      fszoom = 1;
-    }
-  }
-}
-
-/*
- * Initialise video
- */
-void
-sysvid_init(void)
-{
-  SDL_Surface *s;
-  U8 *mask, tpix;
-  U32 len, i;
-
-  IFDEBUG_VIDEO(printf("xrick/video: start\n"););
-
-  /* SDL */
-  if (SDL_Init(SDL_INIT_VIDEO|SDL_INIT_TIMER) < 0)
-    sys_panic("xrick/video: could not init SDL\n");
-
-  /* various WM stuff */
-  SDL_WM_SetCaption("xrick", "xrick");
-  SDL_ShowCursor(SDL_DISABLE);
-  s = SDL_CreateRGBSurfaceFrom(IMG_ICON->pixels, IMG_ICON->w, IMG_ICON->h, 8, IMG_ICON->w, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff);
-  SDL_SetColors(s, (SDL_Color *)IMG_ICON->colors, 0, IMG_ICON->ncolors);
-
-  tpix = *(IMG_ICON->pixels);
-  IFDEBUG_VIDEO(
-    sys_printf("xrick/video: icon is %dx%d\n",
-	       IMG_ICON->w, IMG_ICON->h);
-    sys_printf("xrick/video: icon transp. color is #%d (%d,%d,%d)\n", tpix,
-	       IMG_ICON->colors[tpix].r,
-	       IMG_ICON->colors[tpix].g,
-	       IMG_ICON->colors[tpix].b);
-    );
-	/*
-
-	* old dirty stuff to implement transparency. SetColorKey does it
-	* on Windows w/out problems. Linux? FIXME!
-
-  len = IMG_ICON->w * IMG_ICON->h;
-  mask = (U8 *)malloc(len/8);
-  memset(mask, 0, len/8);
-  for (i = 0; i < len; i++)
-    if (IMG_ICON->pixels[i] != tpix) mask[i/8] |= (0x80 >> (i%8));
-	*/
-  /*
-   * FIXME
-   * Setting a mask produces strange results depending on the
-   * Window Manager. On fvwm2 it is shifted to the right ...
-   */
-  /*SDL_WM_SetIcon(s, mask);*/
-	SDL_SetColorKey(s,
-                    SDL_SRCCOLORKEY,
-                    SDL_MapRGB(s->format,IMG_ICON->colors[tpix].r,IMG_ICON->colors[tpix].g,IMG_ICON->colors[tpix].b));
-
-  SDL_WM_SetIcon(s, NULL);
-
-  /* video modes and screen */
-  videoFlags = SDL_HWSURFACE|SDL_HWPALETTE;
-  sysvid_chkvm();  /* check video modes */
-  if (sysarg_args_zoom)
-    zoom = sysarg_args_zoom;
-  if (sysarg_args_fullscreen) {
-    videoFlags |= SDL_FULLSCREEN;
-    szoom = zoom;
-    zoom = fszoom;
-  }
-  screen = initScreen(SYSVID_WIDTH * zoom,
-		      SYSVID_HEIGHT * zoom,
-		      8, videoFlags);
-
-  /*
-   * create v_ frame buffer
-   */
-  sysvid_fb = malloc(SYSVID_WIDTH * SYSVID_HEIGHT);
-  if (!sysvid_fb)
-    sys_panic("xrick/video: sysvid_fb malloc failed\n");
-
-  IFDEBUG_VIDEO(printf("xrick/video: ready\n"););
-}
-
-/*
- * Shutdown video
- */
-void
-sysvid_shutdown(void)
-{
-  free(sysvid_fb);
-  sysvid_fb = NULL;
-
-  SDL_Quit();
-}
-
-/*
- * Update screen
- * NOTE errors processing ?
- */
-void
-sysvid_update(rect_t *rects)
-{
-  static SDL_Rect area;
-  U16 x, y, xz, yz;
-  U8 *p, *q, *p0, *q0;
-
-  if (rects == NULL)
-    return;
-
-  if (SDL_LockSurface(screen) == -1)
-    sys_panic("xrick/panic: SDL_LockSurface failed\n");
-
-  while (rects) {
-    p0 = sysvid_fb;
-    p0 += rects->x + rects->y * SYSVID_WIDTH;
-    q0 = (U8 *)screen->pixels;
-    q0 += (rects->x + rects->y * SYSVID_WIDTH * zoom) * zoom;
-
-    for (y = rects->y; y < rects->y + rects->height; y++) {
-      for (yz = 0; yz < zoom; yz++) {
-	p = p0;
-	q = q0;
-	for (x = rects->x; x < rects->x + rects->width; x++) {
-	  for (xz = 0; xz < zoom; xz++) {
-	    *q = *p;
-	    q++;
-	  }
-	  p++;
-	}
-	q0 += SYSVID_WIDTH * zoom;
-      }
-      p0 += SYSVID_WIDTH;
-    }
-
-    IFDEBUG_VIDEO2(
-    for (y = rects->y; y < rects->y + rects->height; y++)
-      for (yz = 0; yz < zoom; yz++) {
-	p = (U8 *)screen->pixels + rects->x * zoom + (y * zoom + yz) * SYSVID_WIDTH * zoom;
-	*p = 0x01;
-	*(p + rects->width * zoom - 1) = 0x01;
-      }
-
-    for (x = rects->x; x < rects->x + rects->width; x++)
-      for (xz = 0; xz < zoom; xz++) {
-	p = (U8 *)screen->pixels + x * zoom + xz + rects->y * zoom * SYSVID_WIDTH * zoom;
-	*p = 0x01;
-	*(p + ((rects->height * zoom - 1) * zoom) * SYSVID_WIDTH) = 0x01;
-      }
-    );
-
-    area.x = rects->x * zoom;
-    area.y = rects->y * zoom;
-    area.h = rects->height * zoom;
-    area.w = rects->width * zoom;
-    SDL_UpdateRects(screen, 1, &area);
-
-    rects = rects->next;
-  }
-
-  SDL_UnlockSurface(screen);
-}
-
-
-/*
- * Clear screen
- * (077C)
- */
-void
-sysvid_clear(void)
-{
-  memset(sysvid_fb, 0, SYSVID_WIDTH * SYSVID_HEIGHT);
-}
-
-
-/*
- * Zoom
- */
-void
-sysvid_zoom(S8 z)
-{
-  if (!(videoFlags & SDL_FULLSCREEN) &&
-      ((z < 0 && zoom > 1) ||
-       (z > 0 && zoom < SYSVID_MAXZOOM))) {
-    zoom += z;
-    screen = initScreen(SYSVID_WIDTH * zoom,
-			SYSVID_HEIGHT * zoom,
-			screen->format->BitsPerPixel, videoFlags);
-    sysvid_restorePalette();
-    sysvid_update(&SCREENRECT);
-  }
-}
-
-/*
- * Toggle fullscreen
- */
-void
-sysvid_toggleFullscreen(void)
-{
-  videoFlags ^= SDL_FULLSCREEN;
-
-  if (videoFlags & SDL_FULLSCREEN) {  /* go fullscreen */
-    szoom = zoom;
-    zoom = fszoom;
-  }
-  else {  /* go window */
-    zoom = szoom;
-  }
-  screen = initScreen(SYSVID_WIDTH * zoom,
-		      SYSVID_HEIGHT * zoom,
-		      screen->format->BitsPerPixel, videoFlags);
-  sysvid_restorePalette();
-  sysvid_update(&SCREENRECT);
-}
-
-/* eof */
-
-
-
+/*
+ * xrick/src/sysvid.c
+ *
+ * Copyright (C) 1998-2002 BigOrno (bigorno at bigorno.net). All rights reserved.
+ *
+ * The use and distribution terms for this software are contained in the file
+ * named README, which can be found in the root of this distribution. By
+ * using this software in any fashion, you are agreeing to be bound by the
+ * terms of this license.
+ *
+ * You must not remove this notice, or any other, from this software.
+ */
+
+#include <stdlib.h> /* malloc */
+
+#include <SDL.h>
+
+#include "system.h"
+#include "game.h"
+#include "img.h"
+#include "debug.h"
+
+#ifdef __MSVC__
+#include <memory.h> /* memset */
+#endif
+
+U8 *sysvid_fb; /* frame buffer */
+rect_t SCREENRECT = {0, 0, SYSVID_WIDTH, SYSVID_HEIGHT, NULL}; /* whole fb */
+
+static SDL_Color palette[256];
+static SDL_Surface *screen;
+static U32 videoFlags;
+
+static U8 zoom = SYSVID_ZOOM; /* actual zoom level */
+static U8 szoom = 0;  /* saved zoom level */
+static U8 fszoom = 0;  /* fullscreen zoom level */
+
+#include "img_icon.e"
+
+/*
+ * color tables
+ */
+
+#ifdef GFXPC
+static U8 RED[] = { 0x00, 0x50, 0xf0, 0xf0, 0x00, 0x50, 0xf0, 0xf0 };
+static U8 GREEN[] = { 0x00, 0xf8, 0x50, 0xf8, 0x00, 0xf8, 0x50, 0xf8 };
+static U8 BLUE[] = { 0x00, 0x50, 0x50, 0x50, 0x00, 0xf8, 0xf8, 0xf8 };
+#endif
+#ifdef GFXST
+static U8 RED[] = { 0x00, 0xd8, 0xb0, 0xf8,
+                    0x20, 0x00, 0x00, 0x20,
+                    0x48, 0x48, 0x90, 0xd8,
+                    0x48, 0x68, 0x90, 0xb0,
+                    /* cheat colors */
+                    0x50, 0xe0, 0xc8, 0xf8,
+                    0x68, 0x50, 0x50, 0x68,
+                    0x80, 0x80, 0xb0, 0xe0,
+                    0x80, 0x98, 0xb0, 0xc8
+};
+static U8 GREEN[] = { 0x00, 0x00, 0x6c, 0x90,
+                      0x24, 0x48, 0x6c, 0x48,
+                      0x6c, 0x24, 0x48, 0x6c,
+                      0x48, 0x6c, 0x90, 0xb4,
+		      /* cheat colors */
+                      0x54, 0x54, 0x9c, 0xb4,
+                      0x6c, 0x84, 0x9c, 0x84,
+                      0x9c, 0x6c, 0x84, 0x9c,
+                      0x84, 0x9c, 0xb4, 0xcc
+};
+static U8 BLUE[] = { 0x00, 0x00, 0x68, 0x68,
+                     0x20, 0xb0, 0xd8, 0x00,
+                     0x20, 0x00, 0x00, 0x00,
+                     0x48, 0x68, 0x90, 0xb0,
+		     /* cheat colors */
+                     0x50, 0x50, 0x98, 0x98,
+                     0x68, 0xc8, 0xe0, 0x50,
+                     0x68, 0x50, 0x50, 0x50,
+                     0x80, 0x98, 0xb0, 0xc8};
+#endif
+
+/*
+ * Initialize screen
+ */
+static
+SDL_Surface *initScreen(U16 w, U16 h, U8 bpp, U32 flags)
+{
+  return SDL_SetVideoMode(w, h, bpp, flags);
+}
+
+void
+sysvid_setPalette(img_color_t *pal, U16 n)
+{
+  U16 i;
+
+  for (i = 0; i < n; i++) {
+    palette[i].r = pal[i].r;
+    palette[i].g = pal[i].g;
+    palette[i].b = pal[i].b;
+  }
+  SDL_SetColors(screen, (SDL_Color *)&palette, 0, n);
+}
+
+void
+sysvid_restorePalette()
+{
+  SDL_SetColors(screen, (SDL_Color *)&palette, 0, 256);
+}
+
+void
+sysvid_setGamePalette()
+{
+  U8 i;
+  img_color_t pal[256];
+
+  for (i = 0; i < 32; ++i) {
+    pal[i].r = RED[i];
+    pal[i].g = GREEN[i];
+    pal[i].b = BLUE[i];
+  }
+  sysvid_setPalette(pal, 32);
+}
+
+/*
+ * Initialize video modes
+ */
+void
+sysvid_chkvm(void)
+{
+  SDL_Rect **modes;
+  U8 i, mode = 0;
+
+  IFDEBUG_VIDEO(sys_printf("xrick/video: checking video modes\n"););
+
+  modes = SDL_ListModes(NULL, videoFlags|SDL_FULLSCREEN);
+
+  if (modes == (SDL_Rect **)0)
+    sys_panic("xrick/video: SDL can not find an appropriate video mode\n");
+
+  if (modes == (SDL_Rect **)-1) {
+    /* can do what you want, everything is possible */
+    IFDEBUG_VIDEO(sys_printf("xrick/video: SDL says any video mode is OK\n"););
+    fszoom = 1;
+  }
+  else {
+    IFDEBUG_VIDEO(sys_printf("xrick/video: SDL says, use these modes:\n"););
+    for (i = 0; modes[i]; i++) {
+      IFDEBUG_VIDEO(sys_printf("  %dx%d\n", modes[i]->w, modes[i]->h););
+      if (modes[i]->w <= modes[mode]->w && modes[i]->w >= SYSVID_WIDTH &&
+	  modes[i]->h * SYSVID_WIDTH >= modes[i]->w * SYSVID_HEIGHT) {
+	mode = i;
+	fszoom = modes[mode]->w / SYSVID_WIDTH;
+      }
+    }
+    if (fszoom != 0) {
+      IFDEBUG_VIDEO(
+        sys_printf("xrick/video: fullscreen at %dx%d w/zoom=%d\n",
+		   modes[mode]->w, modes[mode]->h, fszoom);
+	);
+    }
+    else {
+      IFDEBUG_VIDEO(
+        sys_printf("xrick/video: can not compute fullscreen zoom, use 1\n");
+	);
+      fszoom = 1;
+    }
+  }
+}
+
+/*
+ * Initialise video
+ */
+void
+sysvid_init(void)
+{
+  SDL_Surface *s;
+  U8 *mask, tpix;
+  U32 len, i;
+
+  IFDEBUG_VIDEO(printf("xrick/video: start\n"););
+
+  /* SDL */
+  if (SDL_Init(SDL_INIT_VIDEO|SDL_INIT_TIMER) < 0)
+    sys_panic("xrick/video: could not init SDL\n");
+
+  /* various WM stuff */
+  SDL_WM_SetCaption("xrick", "xrick");
+  SDL_ShowCursor(SDL_DISABLE);
+  s = SDL_CreateRGBSurfaceFrom(IMG_ICON->pixels, IMG_ICON->w, IMG_ICON->h, 8, IMG_ICON->w, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff);
+  SDL_SetColors(s, (SDL_Color *)IMG_ICON->colors, 0, IMG_ICON->ncolors);
+
+  tpix = *(IMG_ICON->pixels);
+  IFDEBUG_VIDEO(
+    sys_printf("xrick/video: icon is %dx%d\n",
+	       IMG_ICON->w, IMG_ICON->h);
+    sys_printf("xrick/video: icon transp. color is #%d (%d,%d,%d)\n", tpix,
+	       IMG_ICON->colors[tpix].r,
+	       IMG_ICON->colors[tpix].g,
+	       IMG_ICON->colors[tpix].b);
+    );
+	/*
+
+	* old dirty stuff to implement transparency. SetColorKey does it
+	* on Windows w/out problems. Linux? FIXME!
+
+  len = IMG_ICON->w * IMG_ICON->h;
+  mask = (U8 *)malloc(len/8);
+  memset(mask, 0, len/8);
+  for (i = 0; i < len; i++)
+    if (IMG_ICON->pixels[i] != tpix) mask[i/8] |= (0x80 >> (i%8));
+	*/
+  /*
+   * FIXME
+   * Setting a mask produces strange results depending on the
+   * Window Manager. On fvwm2 it is shifted to the right ...
+   */
+  /*SDL_WM_SetIcon(s, mask);*/
+	SDL_SetColorKey(s,
+                    SDL_SRCCOLORKEY,
+                    SDL_MapRGB(s->format,IMG_ICON->colors[tpix].r,IMG_ICON->colors[tpix].g,IMG_ICON->colors[tpix].b));
+
+  SDL_WM_SetIcon(s, NULL);
+
+  /* video modes and screen */
+  videoFlags = SDL_SWSURFACE|SDL_HWPALETTE;
+  sysvid_chkvm();  /* check video modes */
+  if (sysarg_args_zoom)
+    zoom = sysarg_args_zoom;
+  if (sysarg_args_fullscreen) {
+    videoFlags |= SDL_FULLSCREEN;
+    szoom = zoom;
+    zoom = fszoom;
+  }
+  screen = initScreen(SYSVID_WIDTH * zoom,
+		      SYSVID_HEIGHT * zoom,
+		      8, videoFlags);
+
+  /*
+   * create v_ frame buffer
+   */
+  sysvid_fb = malloc(SYSVID_WIDTH * SYSVID_HEIGHT);
+  if (!sysvid_fb)
+    sys_panic("xrick/video: sysvid_fb malloc failed\n");
+
+  IFDEBUG_VIDEO(printf("xrick/video: ready\n"););
+}
+
+/*
+ * Shutdown video
+ */
+void
+sysvid_shutdown(void)
+{
+  free(sysvid_fb);
+  sysvid_fb = NULL;
+
+  SDL_Quit();
+}
+
+/*
+ * Update screen
+ * NOTE errors processing ?
+ */
+void
+sysvid_update(rect_t *rects)
+{
+  static SDL_Rect area;
+  U16 x, y, xz, yz;
+  U8 *p, *q, *p0, *q0;
+
+  if (rects == NULL)
+    return;
+
+  if (SDL_LockSurface(screen) == -1)
+    sys_panic("xrick/panic: SDL_LockSurface failed\n");
+
+  while (rects) {
+    p0 = sysvid_fb;
+    p0 += rects->x + rects->y * SYSVID_WIDTH;
+    q0 = (U8 *)screen->pixels;
+    q0 += (rects->x + rects->y * SYSVID_WIDTH * zoom) * zoom;
+
+    for (y = rects->y; y < rects->y + rects->height; y++) {
+      for (yz = 0; yz < zoom; yz++) {
+	p = p0;
+	q = q0;
+	for (x = rects->x; x < rects->x + rects->width; x++) {
+	  for (xz = 0; xz < zoom; xz++) {
+	    *q = *p;
+	    q++;
+	  }
+	  p++;
+	}
+	q0 += SYSVID_WIDTH * zoom;
+      }
+      p0 += SYSVID_WIDTH;
+    }
+
+    IFDEBUG_VIDEO2(
+    for (y = rects->y; y < rects->y + rects->height; y++)
+      for (yz = 0; yz < zoom; yz++) {
+	p = (U8 *)screen->pixels + rects->x * zoom + (y * zoom + yz) * SYSVID_WIDTH * zoom;
+	*p = 0x01;
+	*(p + rects->width * zoom - 1) = 0x01;
+      }
+
+    for (x = rects->x; x < rects->x + rects->width; x++)
+      for (xz = 0; xz < zoom; xz++) {
+	p = (U8 *)screen->pixels + x * zoom + xz + rects->y * zoom * SYSVID_WIDTH * zoom;
+	*p = 0x01;
+	*(p + ((rects->height * zoom - 1) * zoom) * SYSVID_WIDTH) = 0x01;
+      }
+    );
+
+    area.x = rects->x * zoom;
+    area.y = rects->y * zoom;
+    area.h = rects->height * zoom;
+    area.w = rects->width * zoom;
+    SDL_UpdateRects(screen, 1, &area);
+
+    rects = rects->next;
+  }
+
+  SDL_UnlockSurface(screen);
+}
+
+
+/*
+ * Clear screen
+ * (077C)
+ */
+void
+sysvid_clear(void)
+{
+  memset(sysvid_fb, 0, SYSVID_WIDTH * SYSVID_HEIGHT);
+}
+
+
+/*
+ * Zoom
+ */
+void
+sysvid_zoom(S8 z)
+{
+  if (!(videoFlags & SDL_FULLSCREEN) &&
+      ((z < 0 && zoom > 1) ||
+       (z > 0 && zoom < SYSVID_MAXZOOM))) {
+    zoom += z;
+    screen = initScreen(SYSVID_WIDTH * zoom,
+			SYSVID_HEIGHT * zoom,
+			screen->format->BitsPerPixel, videoFlags);
+    sysvid_restorePalette();
+    sysvid_update(&SCREENRECT);
+  }
+}
+
+/*
+ * Toggle fullscreen
+ */
+void
+sysvid_toggleFullscreen(void)
+{
+  videoFlags ^= SDL_FULLSCREEN;
+
+  if (videoFlags & SDL_FULLSCREEN) {  /* go fullscreen */
+    szoom = zoom;
+    zoom = fszoom;
+  }
+  else {  /* go window */
+    zoom = szoom;
+  }
+  screen = initScreen(SYSVID_WIDTH * zoom,
+		      SYSVID_HEIGHT * zoom,
+		      screen->format->BitsPerPixel, videoFlags);
+  sysvid_restorePalette();
+  sysvid_update(&SCREENRECT);
+}
+
+/* eof */
+
+
+

Modified: trunk/user/xrick/src/xrick.c
===================================================================
--- tags/xrick/xrick-021212/src/xrick.c	2008-03-08 04:56:32 UTC (rev 2159)
+++ trunk/user/xrick/src/xrick.c	2008-03-08 10:10:30 UTC (rev 2160)
@@ -1,36 +1,36 @@
-/*
- * xrick/src/xrick.c
- *
- * Copyright (C) 1998-2002 BigOrno (bigorno at bigorno.net). All rights reserved.
- *
- * The use and distribution terms for this software are contained in the file
- * named README, which can be found in the root of this distribution. By
- * using this software in any fashion, you are agreeing to be bound by the
- * terms of this license.
- *
- * You must not remove this notice, or any other, from this software.
- */
-
-#include "system.h"
-#include "game.h"
-
-#include <SDL.h>
-
-/*
- * main
- */
-int
-main(int argc, char *argv[])
-{
-	sys_init(argc, argv);
-	if (sysarg_args_data)
-		data_setpath(sysarg_args_data);
-	else
-		data_setpath("data.zip");
-	game_run();
-	data_closepath();
-	sys_shutdown();
-	return 0;
-}
-
-/* eof */
+/*
+ * xrick/src/xrick.c
+ *
+ * Copyright (C) 1998-2002 BigOrno (bigorno at bigorno.net). All rights reserved.
+ *
+ * The use and distribution terms for this software are contained in the file
+ * named README, which can be found in the root of this distribution. By
+ * using this software in any fashion, you are agreeing to be bound by the
+ * terms of this license.
+ *
+ * You must not remove this notice, or any other, from this software.
+ */
+
+#include "system.h"
+#include "game.h"
+
+#include <SDL.h>
+
+/*
+ * main
+ */
+int
+main(int argc, char *argv[])
+{
+	sys_init(argc, argv);
+	if (sysarg_args_data)
+		data_setpath(sysarg_args_data);
+	else
+		data_setpath("/usr/share/games/xrick/data.zip");
+	game_run();
+	data_closepath();
+	sys_shutdown();
+	return 0;
+}
+
+/* eof */



More information about the dslinux-commit mailing list