File tgemu.dif of Package tgemu

--- dos/config.c
+++ dos/config.c
@@ -5,11 +5,8 @@
 t_option option;
 
 
-void do_config(char *file)
+void do_config(char *file, int crt0_argc, char** crt0_argv)
 {
-    extern int __crt0_argc;
-    extern char **__crt0_argv;
-
     /* Our token list */
     int i, argc;
     char *argv[TOKEN_LIST_SIZE];
@@ -27,7 +24,7 @@
     for(i = 0; i < argc; i += 1) if(argv[argc]) free (argv[argc]);
 
     /* Check command line */
-    parse_args(__crt0_argc, __crt0_argv);
+    parse_args(crt0_argc, crt0_argv);
 }
 
 
@@ -79,7 +76,9 @@
     option.autores_w       = 400;
     option.autores_h       = 300;
 
+#ifdef __i386__
     option.blur         = 0;
+#endif
     option.scanlines    = 0;
     option.scale        = 0;
 
@@ -110,7 +109,9 @@
     printf(" -res <w> <h>        \t Specify display resolution (320x240)\n");
     printf(" -depth <n>          \t Specify display depth (8)\n");
     printf(" -auto <w> <h>       \t Enable automatic display switching resolution\n");
+#ifdef __i386__
     printf(" -blur <on|off>      \t Enable blur effect (16-bit color only)\n");
+#endif
     printf(" -scanlines <on|off> \t Enable scanlines effect\n");
     printf(" -scale <on|off>     \t Scale display to width of screen\n");
     printf(" -vsync <on|off>     \t Enable vsync polling\n");
@@ -168,10 +169,12 @@
             }
         }
 
+#ifdef __i386__
         if(stricmp("-blur", argv[i]) == 0)
         {
             option.blur = check_bool(argv[i+1]);
         }
+#endif
 
         if(stricmp("-scanlines", argv[i]) == 0)
         {
@@ -259,8 +262,10 @@
         }
     }
 
+#ifdef __i386__
     /* Disable blurring if using 8-bit color */
     if(option.video_depth == 8 && option.blur) option.blur = 0;
+#endif
 }
 
 
--- dos/config.h
+++ dos/config.h
@@ -53,7 +53,7 @@
 extern t_strint joy_driver_table[];
 
 /* Function prototypes */
-void do_config(char *file);
+void do_config(char *file, int crt0_argc, char** crt0_argv);
 int parse_file(char *filename, int *argc, char **argv);
 void parse_args(int argc, char **argv);
 void print_options(void);
--- dos/dos.c
+++ dos/dos.c
@@ -43,15 +43,14 @@
         return (0);
     }
 
-    do_config("pce.cfg");
+    do_config("pce.cfg",argc,argv);
     frame_skip = option.skip;
-
 #ifdef DEBUG
     error_init();
 #endif
-    if(!load_rom(argv[1], option.split, option.flip))
+    if(!load_rom(argv[argc-1], option.split, option.flip))
     {
-        printf("File `%s' not found.\n", argv[1]);
+        printf("File `%s' not found.\n", argv[argc-1]);
         exit(1);
     }
 
@@ -132,7 +131,7 @@
     clear(bmp);
 
     text_mode(-1);
-    font = &zyrinx_font;
+    //font = &zyrinx_font;
 
     make_332_palette();
     set_palette(pce_pal);
@@ -372,8 +371,10 @@
             clear(screen);
         }
 
+#ifdef __i386__
         if(option.blur)
             blur(&bitmap.data[(bitmap.viewport.x * bitmap.granularity)], bitmap.viewport.w, bitmap.viewport.h, bitmap.pitch - (bitmap.viewport.w << 1));
+#endif
 
         if(option.vsync)
             vsync();
--- dos/uifont.h
+++ dos/uifont.h
@@ -115,6 +115,7 @@
    &f_0x78, &f_0x79, &f_0x7A, &f_0x7B, &f_0x7C, &f_0x7D, &f_0x7E, &f_0x7F
 };
 
+#if 0
 static FONT zyrinx_font =
 { 
    TRUE,                /* mono */
@@ -126,6 +127,7 @@
    NULL,                /* width hook */
    NULL                 /* height hook */
 };
+#endif
 
 #endif /* _UIFONT_H_ */
 
--- makefile.linux
+++ makefile.linux
@@ -11,8 +11,8 @@
 LDFLAGS	=
 FLAGS	=	-I. -Icpu -Idos -Isound -Iaudio/include \
 		-Wall \
-		-mpentium -g \
-		-DLSB_FIRST -DDOS -DFAST_MEM
+		$(RPM_OPT_FLAGS) -g \
+		-DDOS -DFAST_MEM
 LIBS	=	$(shell allegro-config --libs) -Laudio/lib/linux -laudio -lz
 OBJ	=       obj/h6280.oa	\
 		obj/pce.o	\
@@ -24,12 +24,16 @@
 		obj/unzip.o     \
 		obj/fileio.o
 OBJ	+=	obj/dos.o	\
-		obj/blur.o	\
 		obj/sealintf.o	\
 		obj/config.o	\
 		obj/wave.o	\
 		obj/error.o
 
+ifeq ($(ASM),1)
+OBJ	+=	obj/blur.o
+endif
+
+
 EXE	=	pce
 
 all	:	$(EXE)
openSUSE Build Service is sponsored by