From 1ff7522be9df2fd844d372e4a3f510a1bc9a5519 Mon Sep 17 00:00:00 2001 From: sparky4 Date: Thu, 5 May 2016 18:05:35 -0500 Subject: [PATCH] joncambell321 please help test.exe creates garbage if the 2nd rendering page is written writing beyon the 2nd page sw size breaks the program of all programs wwwwwwwww --- makefile | 4 ++-- src/scroll.c | 2 +- src/test.c | 28 +++++++++++++++++++--------- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/makefile b/makefile index 9e002883..86c191bc 100755 --- a/makefile +++ b/makefile @@ -117,8 +117,8 @@ tesuto.exe: tesuto.$(OBJ) $(DOSLIBLIBS) 16_head.$(OBJ) gfx.lib tesuto.$(OBJ): $(SRC)tesuto.c wcl $(FLAGS) $(WCLQ) -c $(SRC)tesuto.c -test.exe: test.$(OBJ) gfx.lib 16_in.$(OBJ) 16_head.$(OBJ) $(DOSLIBLIBS) - wcl $(FLAGS) test.$(OBJ) gfx.lib 16_in.$(OBJ) 16_head.$(OBJ) $(DOSLIBLIBS) -fm=test.mah +test.exe: test.$(OBJ) gfx.lib 16_in.$(OBJ) 16_head.$(OBJ) $(DOSLIBLIBS) $(16LIB) + wcl $(FLAGS) test.$(OBJ) gfx.lib 16_in.$(OBJ) 16_head.$(OBJ) $(DOSLIBLIBS) $(16LIB) -fm=test.mah test2.exe: test2.$(OBJ) $(DOSLIBLIBS) gfx.lib wcl $(FLAGS) test2.$(OBJ) $(DOSLIBLIBS) gfx.lib -fm=test2.mah diff --git a/src/scroll.c b/src/scroll.c index deed3df9..f371f87d 100755 --- a/src/scroll.c +++ b/src/scroll.c @@ -35,7 +35,7 @@ player_t player[MaxPlayers]; //page_t screen, gvar.video.page[1], gvar.video.page[2]; map_view_t mv[3]; bitmap_t p; -word pn=0; +//word pn=0; //i forgot ww static planar_buf_t huge *pp; float t; sword bakapee; diff --git a/src/test.c b/src/test.c index 02fdf1d5..89f1d0ff 100755 --- a/src/test.c +++ b/src/test.c @@ -23,15 +23,18 @@ #include #include "src/lib/modex16.h" #include "src/lib/16_in.h" +#include "src/lib/scroll16.h" global_game_variables_t gvar; player_t player[MaxPlayers]; +map_view_t mv[2]; +pan_t pan; void main(int argc, char *argv[]) { int i, j; word startclk, endclk; - word p, k; + word k; byte *pal, *pal2; sword bakapee; @@ -79,6 +82,12 @@ void main(int argc, char *argv[]) /* set up the page, but with 16 pixels on all borders in offscreen mem */ modexHiganbanaPageSetup(&gvar.video); + for(i=0;i=31){ i++; j=0; goto baka; }else j++; }else if(j>=32){ k++; j=0; }else j++; break; case 1: /* go left */ - gvar.video.page[p].dx--; + gvar.video.page[pan.pn].dx--; if(j>=32){ k++; j=0; }else j++; break; case 2: /* go up */ - gvar.video.page[p].dy++; + gvar.video.page[pan.pn].dy++; if(j>=32){ k++; j=0; }else j++; break; case 3: /* go down */ - gvar.video.page[p].dy--; + gvar.video.page[pan.pn].dy--; if(j>=32){ k=0; j=0; i++; }else j++; break; default: @@ -141,11 +150,12 @@ void main(int argc, char *argv[]) modexClearRegion(&gvar.video.page[1], 32, 32, gvar.video.page[1].sw-32, gvar.video.page[1].sh-32, 42); modexClearRegion(&gvar.video.page[1], 48, 48, gvar.video.page[1].sw-64, gvar.video.page[1].sh-64, 128); } + panpagemanual(mv, player, 0); } - if(IN_KeyDown(2)) p=0; - if(IN_KeyDown(3)) p=1; + if(IN_KeyDown(2)) pan.pn=0; + if(IN_KeyDown(3)) pan.pn=1; //if(IN_KeyDown(6)) modexClearRegion(&gvar.video.page[1], 0, 0, gvar.video.page[0].sw-64, gvar.video.page[0].sh-16, 45); - modexShowPage(&gvar.video.page[p]); + modexShowPage(&gvar.video.page[pan.pn]); } endclk = *clockw; -- 2.39.2