]> 4ch.mooo.com Git - 16.git/commitdiff
p16 is being worked on a bunch by me wwww [16_ca needs huge amounts of work and I...
authorsparky4 <sparky4@cock.li>
Wed, 5 Apr 2017 15:21:38 +0000 (10:21 -0500)
committersparky4 <sparky4@cock.li>
Wed, 5 Apr 2017 15:21:38 +0000 (10:21 -0500)
16/src/miditest.c [moved from src/miditest.c with 100% similarity]
makefile
src/0.c
src/exmmtest.c
src/lib/16_t.h
src/lib/16_vl.c
src/lib/16_vl.h
src/palettec.c
src/palettel.c
src/xcroll.c

similarity index 100%
rename from src/miditest.c
rename to 16/src/miditest.c
index 13cc2191e43de5bfacb0ca4423ddb75ac83dd81d..cb9839b122160c6744c5681fb9ba35fbb702720b 100755 (executable)
--- a/makefile
+++ b/makefile
@@ -223,7 +223,8 @@ SPRIUTILEXEC = &
 EXEC = &
        16.exe &
        bakapi.exe &
-       $(TESTEXEC)
+       $(TESTEXEC) &
+       $(UTILEXEC)
 
 #!ifdef __LINUX__
 #EXEC += $(SPRIUTILEXEC)
diff --git a/src/0.c b/src/0.c
index 051bb332fe8be6ff3e01a5e3d1f84e7a54658b20..fff125c455c9ac92d25f6a57cd0a58be1cc57097 100755 (executable)
--- a/src/0.c
+++ b/src/0.c
@@ -46,21 +46,26 @@ int main(int argc,char **argv)
        unsigned int bufsz;\r
        int fd;\r
        //nibble i;\r
-       char *bakapee1,*bakapee2;\r
+       //char *bakapee1,*bakapee2;\r
+       char bakapee1[64] = FILENAME_1;\r
+       char bakapee2[64] = FILENAME_2;\r
 \r
        boolean anim=1,noanim=0,zerostoppause=1;\r
 \r
-       bakapee1=malloc(64);\r
-       bakapee2=malloc(64);\r
+//     bakapee1=mALLoc(64);\r
+//     bakapee2=mALLoc(64);\r
 \r
-       if (argc < 2) {\r
+       if (argc >= 2) {\r
+/*     if (argc < 2) {\r
                //fprintf(stderr,"drawvrl <VRL file> <palette file>\n palette file optional\n");\r
                bakapee1 = FILENAME_1;//"data/aconita.vrl";\r
                bakapee2 = FILENAME_2;//"data/aconita.pal";\r
 \r
        }else{\r
                if(argv[1]) bakapee1 = argv[1];\r
-               if(argv[2]) bakapee2 = argv[2];\r
+               if(argv[2]) bakapee2 = argv[2];*/\r
+               if(argv[1]){ strcpy(bakapee1, argv[1]);//bakapee1[] = *argv[1];\r
+               if(argv[2]) strcpy(bakapee2, argv[2]); }//bakapee2[] = argv[2]; }\r
        }\r
 \r
        fd = open(bakapee1,O_RDONLY|O_BINARY);\r
@@ -92,7 +97,7 @@ int main(int argc,char **argv)
                return 1;\r
        }\r
        VGAmodeX(1, 1, &gvar);\r
-       modexPalUpdate0(gvar.video.palette);\r
+       VL_modexPalScramble(gvar.video.palette);\r
 \r
        /* load color palette */\r
        VL_LoadPalFile(bakapee2, &gvar.video.palette);\r
@@ -307,8 +312,7 @@ if(!noanim) {
        buffer = NULL;\r
        free(buffer);\r
        bufsz = 0;\r
-       free(bakapee1);\r
-       free(bakapee2);\r
+//     free(bakapee1); free(bakapee2);\r
        printf("\nProject 16 0.exe. This is just a test file!\n");\r
        printf("version %s\n", VERSION);\r
        //SCROLLEXITMESG;\r
index 3e995431d9f3b1a2ec547d16ad1fd467be8f44df..fe5f0ad24a980c508e985104d324ad79a9a0efa7 100755 (executable)
@@ -29,7 +29,6 @@
 #include "src/lib/16_ca.h"\r
 #include "src/lib/16_mm.h"\r
 #include "src/lib/16_hc.h"\r
-//#include "src/lib/16_vl.h"\r
 #include "src/lib/16_dbg.h"\r
 \r
 #pragma hdrstop\r
 \r
 #define KEYP IN_Shutdown(&gvar); printf("\n\npress any key to continue!\n"); getch(); IN_Startup(&gvar);\r
 \r
-#define BBUFNAME bigbuffer//gvar.ca.tinf[0]\r
-#define INITBBUF static memptr BBUFNAME;\r
+#define BBUFNAME gvar.mm.bufferseg//bigbuffer\r
+//#define INITBBUF static memptr BBUFNAME;\r
 #define BBUFPTR        MEMPTR BBUFNAME\r
 \r
 #ifdef __BORLANDC__\r
-#define BBUF           (memptr *)BBUFPTR//\r
+#define BBUF           (memptr *)BBUFPTR\r
 #define BBUFSTRING     (memptr *)BBUFNAME\r
 #endif\r
 #ifdef __WATCOMC__\r
@@ -110,92 +109,97 @@ void segatesuto()
 }\r
 #endif\r
 \r
+#ifdef __16_PM__\r
+#ifdef __DEBUG_PM__\r
+       dbg_debugpm=1;  //debug pm\r
+#endif\r
+#endif\r
+#ifdef __DEBUG_CA__\r
+       dbg_debugca=1;\r
+#endif\r
+#ifdef __DEBUG_MM__\r
+       dbg_debugmm=1;\r
+#endif\r
+\r
+//===========================================================================//\r
+\r
+//=======================================//\r
 \r
+//     main\r
 \r
+//=======================================//\r
 void\r
 main(int argc, char *argv[])\r
 {\r
        byte w;\r
-#ifndef NOVID\r
+                                                               #ifndef NOVID\r
        boolean                 done;\r
        ScanCode                scan;\r
-#endif\r
+                                                               #endif\r
        static global_game_variables_t gvar;\r
-#ifdef INITBBUF\r
+                                                               #ifdef INITBBUF\r
        INITBBUF\r
-#endif\r
+                                                               #endif\r
+#if 0\r
 //#ifdef __WATCOMC__\r
-//     __segment sega;\r
-//#endif\r
-       char *bakapee1,*bakapee2;\r
+       __segment sega;\r
+#endif\r
+       char bakapee1[64] = "data/koishi~.pcx";\r
+       char bakapee2[64] = "data/test.map";\r
        word baka;\r
 \r
-#ifdef __BORLANDC__\r
-       argc=argc;\r
-#endif\r
-       //file name //\r
-       bakapee1 = malloc(24);\r
-       bakapee2 = malloc(24);\r
-       //file name //\r
+               #ifdef __BORLANDC__\r
+                       argc=argc;\r
+               #endif\r
 \r
-#ifdef __16_PM__\r
-#ifdef __DEBUG_PM__\r
-       dbg_debugpm=1;  //debug pm\r
-#endif\r
-#endif\r
+                                                               #ifdef PRINTBBDUMP\r
+                                                               //0000PRINTBB; KEYP\r
+                                                               #endif\r
 \r
-#ifdef __DEBUG_CA__\r
-       dbg_debugca=1;\r
-#endif\r
-#ifdef PRINTBBDUMP\r
-//0000PRINTBB; KEYP\r
-#endif\r
-       if(argv[1]){ bakapee1 = argv[1];\r
-       if(argv[2]) bakapee2 = argv[2]; }\r
+       if(argv[1]){ strcpy(bakapee1, argv[1]);//bakapee1[] = *argv[1];\r
+       if(argv[2]) strcpy(bakapee2, argv[2]); }//bakapee2[] = argv[2]; }\r
+#if 0\r
        else{\r
        //{ printf("filename!: "); scanf("%[^\n]", &bakapee); }\r
-               bakapee1 = "data/koishi~.pcx";\r
-               bakapee2 = "data/test.map";\r
+               strcpy(bakapee1, "data/koishi~.pcx"); //bakapee1 = "data/koishi~.pcx";\r
+               strcpy(bakapee2, "data/test.map"); //bakapee2 = "data/test.map";\r
        }\r
-#ifndef NOVID\r
-       Startup16(&gvar);\r
+#endif\r
+       printf("bakapee1[%s]\n", bakapee1);\r
+       printf("bakapee2[%s]\n", bakapee2);\r
+       KEYP\r
 \r
+                                                               #ifndef NOVID\r
+       Startup16(&gvar);\r
        // save the palette\r
-#ifdef __WATCOMC__\r
+                                                               #ifdef __WATCOMC__\r
        modexPalSave(&gvar.video.dpal); modexFadeOff(4, &gvar.video.dpal); //modexPalBlack();\r
-#endif\r
-#else  //NOVID\r
+                                                               #endif\r
+                                                               #else //NOVID\r
        //printf("main()=%Fp    start MM\n", *argv[0]);\r
-       MM_Startup(&gvar); //printf("ok\n");\r
-#ifdef __16_PM__\r
-#ifdef __DEBUG_PM__\r
-       if(dbg_debugpm>0)\r
-       {\r
-#endif\r
-               PM_Startup(&gvar); PM_CheckMainMem(&gvar); PM_UnlockMainMem(&gvar);\r
-//0000         printf("PM Started\n"); KEYP\r
-#ifdef __DEBUG_PM__\r
-       }\r
-#endif\r
-#endif\r
+       MM_Startup(&gvar);\r
+                                                               #ifdef __16_PM__\r
+                                                               #ifdef __DEBUG_PM__\r
+                                                                       if(dbg_debugpm>0)\r
+                                                                       {\r
+                                                               #endif //__DEBUG_PM__\r
+       PM_Startup(&gvar); PM_CheckMainMem(&gvar); PM_UnlockMainMem(&gvar);\r
+                                                               //0000printf("PM Started\n"); KEYP\r
+                                                               #ifdef __DEBUG_PM__\r
+                                                                       }\r
+                                                               #endif //__DEBUG_PM__\r
+                                                               #endif //__16_PM__\r
+                                                               #endif //elsed NOVID\r
 \r
-#endif //NOVID\r
-#ifdef __DEBUG_MM__\r
-       dbg_debugmm=0;\r
-#endif\r
        CA_Startup(&gvar);\r
-//     printf("                done!\n");\r
-#ifdef PRINTBBDUMP\r
-//0000\r
+                                                               #ifdef PRINTBBDUMP\r
+                                                               //0000\r
 PRINTBB; KEYP\r
-#endif\r
-#ifdef __DEBUG_MM__\r
-       dbg_debugmm=1;\r
-#endif\r
+                                                               #endif\r
 \r
        w=0;\r
-#ifdef FILEREADLOAD\r
-#ifdef FILEREAD\r
+                                                               #ifdef FILEREADLOAD\r
+                                                               #ifdef FILEREAD\r
        for(;w<2;w++)\r
        {\r
        //      printf("size of big buffer~=%u\n", _bmsize(segu, BBUF));\r
@@ -205,24 +209,24 @@ PRINTBB; KEYP
                        if(CA_ReadFile(bakapee2, BBUFPTR, &gvar)) baka=1; else baka=0;\r
                        printf("====================================read end===================================\n");\r
                }\r
-#endif\r
+                                                               #endif //FILEREAD\r
                if(w==0)\r
                {\r
                        printf("======================================load=====================================\n");\r
                        if(CA_LoadFile(bakapee1, BBUFPTR, &gvar)) baka=1; else baka=0;\r
                        printf("====================================load end===================================\n");\r
                }\r
-//#ifdef __WATCOMC__\r
-//     printf("\nsize of big buffer~=%u\n", _bmsize(sega, BBUF));\r
-//#endif\r
-#ifdef BUFFDUMP\r
+                                                               //#ifdef __WATCOMC__\r
+                                                               //      printf("\nsize of big buffer~=%u\n", _bmsize(sega, BBUF));\r
+                                                               //#endif\r
+                                                               #ifdef BUFFDUMP\r
                printf("contents of the buffer\n[\n%s\n]\n", BBUFSTRING);\r
-#endif// #else\r
-#ifdef PRINTBBDUMP\r
+                                                               #endif// #else\r
+                                                               #ifdef PRINTBBDUMP\r
                PRINTBB;\r
-#endif\r
+                                                               #endif\r
 \r
-//endif // BUFFDUMP\r
+                                                               //endif // BUFFDUMP\r
 \r
                //printf("dark purple = purgable\n");\r
                //printf("medium blue = non purgable\n");\r
@@ -231,16 +235,13 @@ PRINTBB; KEYP
        //      DebugMemory_(&gvar, 1);\r
                if(baka) printf("\nyay!\n");\r
                else printf("\npoo!\n");\r
-#ifdef BUFFDUMPPAUSE\r
+                                                               #ifdef BUFFDUMPPAUSE\r
                KEYP\r
-#endif\r
-#ifdef FILEREAD\r
+                                                               #endif\r
+                                                               #ifdef FILEREAD\r
        }\r
-#endif\r
-#ifndef BUFFDUMPPAUSE\r
-       KEYP\r
-#endif\r
-#endif //filereadload\r
+                                                               #endif\r
+                                                               #endif  //filereadload\r
 \r
 #ifdef __WATCOMC__\r
 #ifndef NOVID\r
@@ -287,41 +288,40 @@ PRINTBB; KEYP
        //printf("bakapee1=%s\n", bakapee1);\r
        //printf("bakapee2=%s\n", bakapee2);\r
        MM_FreePtr(BBUFPTR, &gvar);\r
-#ifndef NOVID\r
+                                                               #ifndef NOVID\r
        Shutdown16(&gvar);\r
-#else\r
-#ifdef __16_PM__\r
-#ifdef __DEBUG_PM__\r
-       if(dbg_debugpm>0)\r
-#endif\r
-               PM_Shutdown(&gvar);\r
-#endif\r
+                                                               #else //novid\r
+                                                               #ifdef __16_PM__\r
+                                                               #ifdef __DEBUG_PM__\r
+                                                                       if(dbg_debugpm>0)\r
+                                                               #endif //__DEBUG_PM__\r
+       PM_Shutdown(&gvar);\r
+                                                               #endif //__16_PM__\r
        CA_Shutdown(&gvar);\r
        MM_Shutdown(&gvar);\r
-#endif //NOVID\r
+                                                               #endif //NOVID\r
        IN_Shutdown(&gvar);\r
-       free(bakapee1); free(bakapee2);\r
        printf("========================================\n");\r
-       printf("near=   %Fp ", gvar.mm.nearheap);\r
-       printf("far=    %Fp", gvar.mm.farheap);\r
+       printf("near=   %Fp ",  gvar.mm.nearheap);\r
+       printf("far=    %Fp",                   gvar.mm.farheap);\r
        printf("\n");\r
-       printf("&near=  %Fp ", &(gvar.mm.nearheap));\r
-       printf("&far=   %Fp", &(gvar.mm.farheap));\r
+       printf("&near=  %Fp ",  &(gvar.mm.nearheap));\r
+       printf("&far=   %Fp",           &(gvar.mm.farheap));\r
        printf("\n");\r
-#ifdef EXMMVERBOSE\r
-       printf("bigb=   %Fp ", BBUF);\r
-       //printf("bigbr=        %04x", BBUF);\r
+                                                               #ifdef EXMMVERBOSE\r
+       printf("bigb=   %Fp ",  BBUF);\r
+       //printf("bigbr=        %04x",  BBUF);\r
        //printf("\n");\r
-       printf("&bigb=%Fp ", BBUFPTR);\r
-       //printf("&bigb=%04x", BBUFPTR);\r
+       printf("&bigb=%Fp ",            BBUFPTR);\r
+       //printf("&bigb=%04x",          BBUFPTR);\r
        printf("\n");\r
-#endif\r
+                                                               #endif\r
        printf("========================================\n");\r
 \r
-#ifdef EXMMVERBOSE__\r
+                                                               #ifdef EXMMVERBOSE__\r
        printf("coreleft():                     %u\n", _memavl());\r
        printf("farcoreleft():                  %lu\n", (dword)HC_farcoreleft());\r
-#endif\r
+                                                               #endif\r
 #ifdef __WATCOMC__\r
 //this is far  printf("Total free:                     %lu\n", (dword)(HC_GetFreeSize()));\r
 //super buggy  printf("HC_coreleft():                  %u\n", HC_coreleft());\r
@@ -345,6 +345,10 @@ PRINTBB; KEYP
 #endif\r
        printf(".exe. This is just a test file!\n");\r
        printf("version %s\n", VERSION);\r
+\r
+//end of program\r
+\r
+\r
 #if defined(__DEBUG__) && ( defined(__DEBUG_PM__) || defined(__DEBUG_MM__) )\r
 #ifdef __DEBUG_MM__\r
        printf("debugmm: %u\t", dbg_debugmm);\r
index e91328d4bec2378c9f42451a095b78abd446cecb..ce881ae877ed7e658d7d5ec6496f328c190f3d53 100755 (executable)
@@ -77,12 +77,12 @@ typedef void _seg * memptr;
 #define pokeb(segm,ofs,value) (peekb((segm),(ofs)) = (byte)(value))\r
 #define poke(segm,ofs,value) (peek((segm),(ofs)) = (word)(value))\r
 \r
-#define inportb(port)         inp(port)\r
-#define inport(port)         inpw(port)\r
-#define outportb(port, val)   outp(port, val)\r
-#define outport(port, val)   outpw(port, val)\r
+#define inportb(port)          inp(port)\r
+#define inport(port)           inpw(port)\r
+#define outportb(port, val)    outp(port, val)\r
+#define outport(port, val)     outpw(port, val)\r
 \r
-//#define asm __asm\r
+#define asm __asm\r
 #define getvect _dos_getvect\r
 #define setvect _dos_setvect\r
 \r
index 2078def23a770eaa6b92ec95fb614e946df96462..22149c06b2bc1af5df249fca992d14eaa5d8e36c 100755 (executable)
@@ -771,7 +771,8 @@ modexPalUpdate(byte *p)
 }\r
 \r
 void\r
-modexPalUpdate0(byte *p)\r
+//modexPalUpdate0(byte *p)\r
+VL_modexPalScramble(byte *p)\r
 {\r
        int i;\r
        //modexWaitBorder();\r
index af357b08c09d85874f74868749b27d5ab70350e9..ba1d377ce1cf56fc79940cde12e5f9bf2a61de62 100755 (executable)
@@ -204,7 +204,7 @@ void modexPalWhite();
 \r
 /* utility functions */\r
 void modexPalUpdate(byte *p);\r
-void modexPalUpdate0(byte *p);\r
+void VL_modexPalScramble(byte *p);\r
 word modexPalOverscan(word col);\r
 void VL_Plot (int x, int y, int color, ofs_t *ofs);\r
 void VL_Hlin (unsigned x, unsigned y, unsigned width, unsigned color, ofs_t *ofs);\r
index 8f1ed3e7758121a4bc9ae5a81945320ec817608c..2935ad2654ce64b7371bb7071dccd06f0205a465 100755 (executable)
 \r
 #include "src/lib/16_vl.h"\r
 \r
-void\r
-main(int argc, char *argv[])\r
+void main(int argc, char *argv[])\r
 {\r
        static global_game_variables_t gvar;\r
-       char *bakapee;\r
+       char bakapee[64] = "data\default.pal";\r
+\r
+       if(argv[1]) strcpy(bakapee, argv[1]);\r
 \r
-       bakapee = malloc(64);\r
-       if(argv[1]) bakapee = argv[1];\r
-       else bakapee = "data/default.pal";\r
 \r
        VGAmodeX(1, 1, &gvar);\r
 \r
@@ -39,6 +37,4 @@ main(int argc, char *argv[])
        modexSavePalFile(bakapee, &(gvar.video.palette));\r
 \r
        VGAmodeX(0, 1, &gvar);\r
-       free(bakapee);\r
-\r
 }\r
index 1a487bab82f39219d962e86b4be6d0bfe91fb88e..9249e540d96f7efbe501ea33bb267f31720a8b2b 100755 (executable)
 #include "src/lib/16_vl.h"\r
 #include "src/lib/bakapee.h"\r
 \r
-char *bakapee;\r
 word i;\r
 \r
-void\r
-main(int argc, char *argv[])\r
+void main(int argc, char *argv[])\r
 {\r
        static global_game_variables_t gvar;\r
-       bakapee = malloc(64);\r
-       if(argv[1]) bakapee = argv[1];\r
-       else bakapee = "data/default.pal";\r
+       char bakapee[64] = "data\default.pal";\r
+\r
+       if(argv[1]) strcpy(bakapee, argv[1]);\r
+\r
+\r
        modexPalSave(&(gvar.video.palette));\r
+       VL_modexPalScramble(&(gvar.video.palette));\r
        VGAmodeX(1, 1, &gvar);\r
        gvar.video.page[0] = modexDefaultPage(&gvar.video.page[0]);\r
        modexPalBlack();\r
@@ -42,12 +43,11 @@ main(int argc, char *argv[])
        modexPalUpdate(&(gvar.video.palette));\r
        modexFadeOn(1, &(gvar.video.palette));\r
        modexpdump(&gvar.video.page[0]);\r
-       getch();\r
+//     getch();\r
        VGAmodeX(0, 0, &gvar);\r
        modexPalUpdate(&(gvar.video.palette));\r
        /*for(i=0;i<768;i++)\r
        {\r
                printf("%02X ", pal[i]);\r
        }*/\r
-       free(bakapee);\r
 }\r
index fcc7778de5ba2f036c20998e128ed4210be54186..0f4bf060c2ce668cad69fb63ebe0f331dce2cbc0 100755 (executable)
@@ -51,26 +51,31 @@ memptr pal;
 void main(int argc, char *argv[])\r
 {\r
        static global_game_variables_t gvar;\r
-       char *bakapee1,*bakapee1p;\r
        struct glob_game_vars   *ggvv;\r
 //     sword bakapee;\r
 //     if(argv[1]) bakapee = atoi(argv[1]);\r
 //     else bakapee = 1;\r
+       //char *bakapee1,*bakapee1p;\r
+       char bakapee1[64] = FILENAME_1;\r
+       char bakapee1p[64] = FILENAME_1P;\r
 \r
        Startup16(&gvar);\r
 \r
-       bakapee1=malloc(64);\r
-       bakapee1p=malloc(64);\r
+//     bakapee1=mALLoc(64);\r
+//     bakapee1p=mALLoc(64);\r
        ggvv=&gvar;\r
 \r
-       if (argc < 2) {\r
+       if (argc >= 2) {\r
+/*     if (argc < 2) {\r
                //fprintf(stderr,"drawvrl <VRL file> <palette file>\n palette file optional\n");\r
                bakapee1 =              FILENAME_1;\r
                bakapee1p =     FILENAME_1P;\r
 \r
        }else{\r
                if(argv[1]) bakapee1 = argv[1];\r
-               if(argv[2]) bakapee1p = argv[2];\r
+               if(argv[2]) bakapee1p = argv[2];*/\r
+               if(argv[1]){ strcpy(bakapee1, argv[1]);\r
+               if(argv[2]) strcpy(bakapee1p, argv[2]); }\r
        }\r
 \r
        // OK, this one takes hellova time and needs to be done in farmalloc or MM_...\r
@@ -133,7 +138,7 @@ void main(int argc, char *argv[])
 #ifdef FADE\r
                modexFadeOff(4, &gvar.video.palette);\r
 #endif\r
-               Quit(&gvar, "Wrong ID for sprite");\r
+               Quit (&gvar, "Wrong ID for sprite");\r
 #ifdef FADE\r
                modexFadeOn(4, &gvar.video.dpal);\r
 #endif\r
@@ -180,8 +185,8 @@ void main(int argc, char *argv[])
                if(gvar.player[0].enti.q == (TILEWH/(gvar.player[0].enti.speed))+1 && gvar.player[0].info.dir != 2 && (gvar.player[0].enti.triggerx == 5 && gvar.player[0].enti.triggery == 5)){ gvar.player[0].enti.hp--; }\r
                //debugging binds!\r
 \r
-               if(gvar.in.inst->Keyboard[24]){ modexPalUpdate0(&gvar.video.palette); /*paloffset=0;*/ modexpdump(gvar.mv[0].page); IN_UserInput(1, &gvar); } //o\r
-               if(gvar.in.inst->Keyboard[22]){ modexPalUpdate0(&gvar.video.palette); } //u\r
+               if(gvar.in.inst->Keyboard[24]){ VL_modexPalScramble(&gvar.video.palette); /*paloffset=0;*/ modexpdump(gvar.mv[0].page); IN_UserInput(1, &gvar); } //o\r
+               if(gvar.in.inst->Keyboard[22]){ VL_modexPalScramble(&gvar.video.palette); } //u\r
 \r
                TAIL_FUNCTIONKEYFUNCTIONS\r
                TAIL_FUNCTIONKEYDRAWJUNK\r
@@ -190,14 +195,18 @@ void main(int argc, char *argv[])
                {\r
                        if(gvar.in.inst->Keyboard[sc_J])\r
                        {\r
-                               bakapee1=FILENAME_1;\r
-                               bakapee1p=FILENAME_1P;\r
+//                             bakapee1=FILENAME_1;\r
+//                             bakapee1p=FILENAME_1P;\r
+                               strcpy(bakapee1, FILENAME_1);\r
+                               strcpy(bakapee1p, FILENAME_1P);\r
                                gvar.player[0].enti.overdraww=0;\r
                        }\r
                        if(gvar.in.inst->Keyboard[sc_K])\r
                        {\r
-                               bakapee1=FILENAME_2;\r
-                               bakapee1p=FILENAME_2P;\r
+//                             bakapee1=FILENAME_2;\r
+//                             bakapee1p=FILENAME_2P;\r
+                               strcpy(bakapee1, FILENAME_2);\r
+                               strcpy(bakapee1p, FILENAME_2P);\r
                                gvar.player[0].enti.overdraww=2;\r
                        }\r
                        //read_vrs(&gvar, bakapee1, gvar.player[0].enti.spri->spritesheet);\r
@@ -209,7 +218,7 @@ void main(int argc, char *argv[])
 #endif\r
                if(gvar.in.inst->Keyboard[sc_R]){ modexPalOverscan(rand()%56); } //r\r
 \r
-               if((gvar.player[0].enti.q==1) && !(gvar.player[0].enti.x%TILEWH==0 && gvar.player[0].enti.y%TILEWH==0)) Quit(&gvar, "PLAYER OFF THE RAILS!");//break;   //incase things go out of sync!\r
+               if((gvar.player[0].enti.q==1) && !(gvar.player[0].enti.x%TILEWH==0 && gvar.player[0].enti.y%TILEWH==0)) Quit (&gvar, "PLAYER OFF THE RAILS!");//break;  //incase things go out of sync!\r
        }\r
 \r
        /* fade back to text mode */\r