From: sparky4 Date: Fri, 9 Dec 2016 16:51:03 +0000 (-0600) Subject: no idea why bcexmm.exe is broke w tweaked zcroll.exe a bit also Quit is refined now... X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=78c44f1c4c8db65db7d3636181c775db5d94ada8;p=16.git no idea why bcexmm.exe is broke w tweaked zcroll.exe a bit also Quit is refined now~ ^o^ --- diff --git a/src/16.c b/src/16.c index 6ad5334f..5dcd6d31 100755 --- a/src/16.c +++ b/src/16.c @@ -22,7 +22,6 @@ #include "src/16.h" -global_game_variables_t gvar; engi_stat_t engi_stat; const char *cpus; byte *dpal, *gpal; @@ -31,6 +30,7 @@ player_t player[MaxPlayers]; void main(int argc, char *argv[]) { + static global_game_variables_t gvar; // DOSLIB: check our environment probe_dos(); diff --git a/src/bakapi.c b/src/bakapi.c index 00fc689f..381badd1 100755 --- a/src/bakapi.c +++ b/src/bakapi.c @@ -25,7 +25,6 @@ /* * BAKAPEE! */ -global_game_variables_t gvar; static bakapee_t bakapee; word key,d,xpos,ypos,xdir,ydir; sword vgamodex_mode = 1; // 320x240 default @@ -34,6 +33,7 @@ int ch=0x0; void main(int argc, char *argvar[]) { + static global_game_variables_t gvar; char *a; int i; word panq=1, pand=0; diff --git a/src/fontgfx.c b/src/fontgfx.c index e25a130a..90d0efc4 100755 --- a/src/fontgfx.c +++ b/src/fontgfx.c @@ -29,10 +29,9 @@ #include #include -global_game_variables_t gvar; - void main(int argc, char near *argv[]) { + static global_game_variables_t gvar; //JMOJI static byte e; //word ri; diff --git a/src/inputest.c b/src/inputest.c index e45c813d..c9c27dd9 100755 --- a/src/inputest.c +++ b/src/inputest.c @@ -28,7 +28,7 @@ void main(int argc, char *argv[]) { - global_game_variables_t gvar; + static global_game_variables_t gvar; player_t player[MaxPlayers]; //extern struct inconfig inpu; dbg_testkeyin=0; diff --git a/src/palettec.c b/src/palettec.c index 624b098f..df89b454 100755 --- a/src/palettec.c +++ b/src/palettec.c @@ -22,11 +22,10 @@ #include "src/lib/16_vl.h" -global_game_variables_t gvar; - void main(int argc, char *argv[]) { + static global_game_variables_t gvar; byte *pal; byte *bakapee; diff --git a/src/palettel.c b/src/palettel.c index 53e86c2d..6ec55683 100755 --- a/src/palettel.c +++ b/src/palettel.c @@ -23,7 +23,6 @@ #include "src/lib/16_vl.h" #include "src/lib/bakapee.h" -global_game_variables_t gvar; byte *pal; char *bakapee; word i; @@ -31,6 +30,7 @@ word i; void main(int argc, char *argv[]) { + static global_game_variables_t gvar; //page.width += 32; //page.height += 32; pal = modexNewPal(); diff --git a/src/pcxtest.c b/src/pcxtest.c index 84a83236..5325303c 100755 --- a/src/pcxtest.c +++ b/src/pcxtest.c @@ -27,10 +27,10 @@ #include "src/lib/bitmap.h" //----#include "src/lib/planar.h" -global_game_variables_t gvar; static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */ void main() { + static global_game_variables_t gvar; bitmap_t bmp; //---- planar_buf_t *p; int i; diff --git a/src/pcxtest2.c b/src/pcxtest2.c index f92c300b..c65f4e94 100755 --- a/src/pcxtest2.c +++ b/src/pcxtest2.c @@ -27,7 +27,6 @@ #include "src/lib/bitmap.h" //----#include "src/lib/planar.h" -global_game_variables_t gvar; static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */ /* @@ -56,6 +55,7 @@ DrawPBuf(page_t *page, int x, int y, planar_buf_t *p, byte sprite) */ void main() { + static global_game_variables_t gvar; bitmap_t bmp; //---- planar_buf_t *p; int i; diff --git a/src/scroll.c b/src/scroll.c index 5beb4743..4b65b553 100755 --- a/src/scroll.c +++ b/src/scroll.c @@ -31,7 +31,6 @@ //word far *clock= (word far*) 0x046C; /* 18.2hz clock */ //bitmap_t *p; -global_game_variables_t gvar; static map_t map; player_t player[MaxPlayers]; map_view_t mv[4]; @@ -58,6 +57,7 @@ boolean panswitch=0;//1 void main(int argc, char *argv[]) { + static global_game_variables_t gvar; if(argv[1]) bakapee = atoi(argv[1]); else bakapee = 1; diff --git a/src/test.c b/src/test.c index a2268d37..fe7b401f 100755 --- a/src/test.c +++ b/src/test.c @@ -27,13 +27,13 @@ #include "src/lib/bakapee.h" static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */ -global_game_variables_t gvar; player_t player[MaxPlayers]; map_view_t mv[4]; pan_t pan; void main(int argc, char *argv[]) { + static global_game_variables_t gvar; int i, j; word startclk, endclk; word k; diff --git a/src/vgacamm.c b/src/vgacamm.c index 2c8eaa89..3c856f30 100755 --- a/src/vgacamm.c +++ b/src/vgacamm.c @@ -28,7 +28,7 @@ static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */ void main() { - global_game_variables_t gvar; + static global_game_variables_t gvar; __segment sega; memptr bigbuffer; int i; diff --git a/src/zcroll.c b/src/zcroll.c index a28522d7..65300e91 100755 --- a/src/zcroll.c +++ b/src/zcroll.c @@ -29,7 +29,6 @@ #define MODEXZ //TODO: known issues the array dependent mv stuff and player arrays -global_game_variables_t gvar; static map_t map; player_t player[MaxPlayers]; map_view_t mv[4]; @@ -55,6 +54,7 @@ memptr pal; void main(int argc, char *argv[]) { + static global_game_variables_t gvar; if(argv[1]) bakapee = atoi(argv[1]); else bakapee = 1; @@ -88,9 +88,6 @@ void main(int argc, char *argv[]) #endif textInit(); VGAmodeX(bakapee, 1, &gvar); - //strcpy(global_temp_status_text, "press enter for video setup\nescape to quit"); - //modexprint(&gvar.video.page[0], 64, 64, 1, 7, 0, global_temp_status_text); - //while(!IN_KeyDown(sc_Enter)){ if(IN_KeyDown(sc_Escape)) goto quit; } IN_UserInput(1,1); //wwww #ifdef MODEXZ #ifdef FADE modexPalBlack(); //reset the palette~ @@ -103,9 +100,6 @@ void main(int argc, char *argv[]) #endif // setup camera and screen~ - strcpy(global_temp_status_text, "press enter for page setup\nescape to quit"); - modexprint(&gvar.video.page[0], 64, 64, 1, 7, 0, global_temp_status_text); - while(!IN_KeyDown(sc_Enter)){ if(IN_KeyDown(sc_Escape)) goto quit; } IN_UserInput(1,1); //wwww modexHiganbanaPageSetup(&gvar.video); for(i=0;ispri->x = player[0].ent->spri->y = 20; - strcpy(global_temp_status_text, "press enter for mapGoTo setup\nescape to quit"); - modexprint(mv[0].page/*&gvar.video.page[0]*/, 64, 64, 1, 7, 0, global_temp_status_text); - while(!IN_KeyDown(sc_Enter)){ if(IN_KeyDown(sc_Escape)) goto quit; } IN_UserInput(1,1); //wwww // set up paging //TODO: LOAD map data and position the map in the middle of the screen if smaller then screen mapGoTo(mv, 0, 0); - strcpy(global_temp_status_text, "press enter for final initiation setup\nescape to quit"); - modexprint(&gvar.video.page[0], 64, 64, 1, 7, 0, global_temp_status_text); - while(!IN_KeyDown(sc_Enter)){ if(IN_KeyDown(sc_Escape)) goto quit; } IN_UserInput(1,1); //wwww #endif //TODO: put player in starting position of spot @@ -140,21 +128,22 @@ void main(int argc, char *argv[]) #ifdef FADE modexFadeOff(4, gpal); #endif - VGAmodeX(0, 1, &gvar); - Shutdown16(&gvar); - printf("Wrong"); + Quit(&gvar, "Wrong"); #ifdef FADE modexFadeOn(4, dpal); #endif exit(-4); } - //animate_spri(&(player[0].ent->spri)); + //++++animate_spri(&(player[0].ent->spri)); modexShowPage(mv[0].page);//!(gvar.video.p) shinku_fps_indicator_page = 0; // we're on page 1 now, shinku(). follow along please or it will not be visible. #ifdef FADE modexFadeOn(4, gpal); #endif + strcpy(global_temp_status_text, "press enter for the loop of zcroll\nescape to quit"); + modexprint(&gvar.video.page[0], 144, 72, 1, 7, 0, global_temp_status_text); + while(!IN_KeyDown(sc_Enter)){ if(IN_KeyDown(sc_Escape)) goto quit; } IN_UserInput(1,1); //wwww while(!IN_KeyDown(sc_Escape))// && player[0].hp>0) { shinku(&gvar);