From: sparky4 Date: Tue, 10 Jan 2017 17:32:59 +0000 (-0600) Subject: made a new function modexMVSetup() X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=b79af85b8e5b6ff94341b85ea2de8a5dfb9080f5;p=16.git made a new function modexMVSetup() --- diff --git a/DEBUG.16B b/DEBUG.16B deleted file mode 100755 index f30673d9..00000000 --- a/DEBUG.16B +++ /dev/null @@ -1,210 +0,0 @@ -Seg:0 Size:4897 Owner:0x0 -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++0 -Seg:1321 Size:256 Owner:0x993 -++++ -Seg:1421 Size:256 Owner:0x798 -++++ -Seg:1521 Size:256 Owner:0x79a -++++ -Seg:1621 Size:256 Owner:0x79c -+++++ -Seg:1721 Size:256 Owner:0x79e -++++ -Seg:1821 Size:256 Owner:0x7a0 -++++ -Seg:1921 Size:256 Owner:0x7a2 -++++ -Seg:1a21 Size:256 Owner:0x7a4 -++++ -Seg:1b21 Size:256 Owner:0x7a6 -+++++ -Seg:1c21 Size:256 Owner:0x7a8 -++++ -Seg:1d21 Size:256 Owner:0x7aa -++++ -Seg:1e21 Size:256 Owner:0x7ac -++++ -Seg:1f21 Size:256 Owner:0x7ae -++++ -Seg:2021 Size:256 Owner:0x7b0 -+++++ -Seg:2121 Size:256 Owner:0x7b2 -++++ -Seg:2221 Size:256 Owner:0x7b4 -++++ -Seg:2321 Size:256 Owner:0x7b6 -++++ -Seg:2421 Size:256 Owner:0x7b8 -++++ -Seg:2521 Size:256 Owner:0x7ba -+++++ -Seg:2621 Size:256 Owner:0x7bc -++++ -Seg:2721 Size:256 Owner:0x7be -++++ -Seg:2821 Size:256 Owner:0x7c0 -++++ -Seg:2921 Size:256 Owner:0x7c2 -++++ -Seg:2a21 Size:256 Owner:0x7c4 -+++++ -Seg:2b21 Size:256 Owner:0x7c6 -++++ -Seg:2c21 Size:256 Owner:0x7c8 -++++ -Seg:2d21 Size:256 Owner:0x7ca -++++ -Seg:2e21 Size:256 Owner:0x7cc -++++ -Seg:2f21 Size:256 Owner:0x7ce -+++++ -Seg:3021 Size:256 Owner:0x7d0 -++++ -Seg:3121 Size:256 Owner:0x7d2 -++++ -Seg:3221 Size:256 Owner:0x7d4 -++++ -Seg:3321 Size:256 Owner:0x7d6 -++++ -Seg:3421 Size:256 Owner:0x7d8 -+++++ -Seg:3521 Size:256 Owner:0x7da -++++ -Seg:3621 Size:256 Owner:0x7dc -++++ -Seg:3721 Size:256 Owner:0x7de -++++ -Seg:3821 Size:256 Owner:0x7e0 -++++ -Seg:3921 Size:256 Owner:0x7e2 -+++++ -Seg:3a21 Size:256 Owner:0x7e4 -++++ -Seg:3b21 Size:256 Owner:0x7e6 -++++ -Seg:3c21 Size:256 Owner:0x7e8 -++++ -Seg:3d21 Size:256 Owner:0x7ea -++++ -Seg:3e21 Size:256 Owner:0x7ec -+++++ -Seg:3f21 Size:256 Owner:0x7ee -++++ -Seg:4021 Size:256 Owner:0x7f0 -++++ -Seg:4121 Size:256 Owner:0x7f2 -++++ -Seg:4221 Size:256 Owner:0x7f4 -++++ -Seg:4321 Size:256 Owner:0x7f6 -+++++ -Seg:4421 Size:256 Owner:0x7f8 -++++ -Seg:4521 Size:256 Owner:0x7fa -++++ -Seg:4621 Size:256 Owner:0x7fc -++++ -Seg:4721 Size:256 Owner:0x7fe -++++ -Seg:4821 Size:256 Owner:0x800 -+++++ -Seg:4921 Size:256 Owner:0x802 -++++ -Seg:4a21 Size:256 Owner:0x804 -++++ -Seg:4b21 Size:256 Owner:0x806 -++++ -Seg:4c21 Size:256 Owner:0x808 -++++ -Seg:4d21 Size:256 Owner:0x80a -+++++ -Seg:4e21 Size:256 Owner:0x80c -++++ -Seg:4f21 Size:256 Owner:0x80e -++++ -Seg:5021 Size:256 Owner:0x810 -++++ -Seg:5121 Size:256 Owner:0x812 -++++ -Seg:5221 Size:256 Owner:0x814 -+++++ -Seg:5321 Size:256 Owner:0x816 -++++ -Seg:5421 Size:256 Owner:0x818 -++++ -Seg:5521 Size:256 Owner:0x81a -++++ -Seg:5621 Size:256 Owner:0x81c -++++ -Seg:5721 Size:256 Owner:0x81e -+++++ -Seg:5821 Size:256 Owner:0x820 -++++ -Seg:5921 Size:256 Owner:0x822 -++++ -Seg:5a21 Size:256 Owner:0x824 -++++ -Seg:5b21 Size:256 Owner:0x826 -++++ -Seg:5c21 Size:256 Owner:0x828 -+++++ -Seg:5d21 Size:256 Owner:0x82a -++++ -Seg:5e21 Size:256 Owner:0x82c -++++ -Seg:5f21 Size:256 Owner:0x82e -++++ -Seg:6021 Size:256 Owner:0x830 -++++ -Seg:6121 Size:256 Owner:0x832 -+++++ -Seg:6221 Size:256 Owner:0x834 -++++ -Seg:6321 Size:256 Owner:0x836 -++++ -Seg:6421 Size:256 Owner:0x838 -++++ -Seg:6521 Size:256 Owner:0x83a -++++ -Seg:6621 Size:256 Owner:0x83c -+++++ -Seg:6721 Size:256 Owner:0x83e -++++ -Seg:6821 Size:256 Owner:0x840 -++++ -Seg:6921 Size:256 Owner:0x842 -++++ -Seg:6a21 Size:256 Owner:0x844 -++++ -Seg:6b21 Size:256 Owner:0x846 -+++++ -Seg:6c21 Size:256 Owner:0x848 -++++ -Seg:6d21 Size:256 Owner:0x84a -++++ -Seg:6e21 Size:256 Owner:0x84c -++++ -Seg:6f21 Size:256 Owner:0x84e -++++ -Seg:7021 Size:256 Owner:0x850 -+++++ -Seg:7121 Size:256 Owner:0x852 -++++ -Seg:7221 Size:256 Owner:0x854 -++++ -Seg:7321 Size:256 Owner:0x856 -++++ -Seg:7421 Size:256 Owner:0x858 -++++ -Seg:7521 Size:256 Owner:0x85a -+++++ -Seg:7621 Size:256 Owner:0x85c -++++ -Seg:7721 Size:256 Owner:0x85e -++++ -Seg:7821 Size:273 Owner:0xfde -++++ -Seg:9fde Size:32802 Owner:0x0 - -Seg:9ffe Size:24577 Owner:0x0 -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file diff --git a/MEMINFO.16B b/MEMINFO.16B new file mode 100755 index 00000000..e69de29b diff --git a/MEMINFO.16W b/MEMINFO.16W new file mode 100755 index 00000000..e69de29b diff --git a/MMDUMP.16B b/MMDUMP.16B index 451d087e..841a51a9 100755 Binary files a/MMDUMP.16B and b/MMDUMP.16B differ diff --git a/b4get.bat b/b4get.bat new file mode 100755 index 00000000..c770c63e --- /dev/null +++ b/b4get.bat @@ -0,0 +1,60 @@ +@echo off +iff exist %* then + del %* +endiff +setlocal +set url="beta.latech.edu/~wwc001/16" +rem for %@eval[%#+1] in (%*) do ( +rem for %# in (1,1,%*) do ( +:loop + set /a o=0 +:oooo + set /a q=%@EVAL[%@LEN[%1] - 4] + set w=%@INSTR[0,%q,%1] + iff NOT "%w" == "" then + set /a o=%o+1 + set y=%w.z%o +rem echo y=%y + if %o lt 100 ( + if %o lt 10 ( + set z=00%o + ) else ( + set z=0%o + ) endif + ) else if %o gt 99 ( + set z=%o + ) endif + + htget http://%url/%1.zip.%z > %y +rem pause + iff NOT "%@FILESIZE[%y,b]" == "0" then + type %y >> %w.zip + iff "%@FILESIZE[%y,b]" == "65536" then +rem echo o=%o + goto oooo + endiff + iff NOT "%#" == "0" then + shift /1 + iff exist %w.zip then + unzip %w.zip + del %w.z* + endiff + goto loop + else + del %# + endiff + else + del %y + echo Error null zip file wwww + endiff + else + rem del %y.z* + rem need to add a cleaner wwww + echo done~ wwww + endiff +rem echo y="%y" +rem echo q=%q +rem echo o=%o +rem echo w=%w +rem echo %%1=%1 +endlocal diff --git a/bcexmm.dsk b/bcexmm.dsk index c8d927e3..47bc095d 100755 Binary files a/bcexmm.dsk and b/bcexmm.dsk differ diff --git a/bcexmm.exe b/bcexmm.exe index 585ca07a..fcac8555 100755 Binary files a/bcexmm.exe and b/bcexmm.exe differ diff --git a/bcexmm.prj b/bcexmm.prj index 72ec764f..82dc00b9 100755 Binary files a/bcexmm.prj and b/bcexmm.prj differ diff --git a/makefile b/makefile index f97d87fa..cad8a554 100755 --- a/makefile +++ b/makefile @@ -82,11 +82,17 @@ DOSLIB_JOYSTICK=$(DOSLIBDIR)/hw/joystick DOSLIB_MEMMODE=dos86$(MEMORYMODE) # remote host (for sparky4) -HOSTUSER=sparky4#wwc001 -HOSTADDR=4ch.mooo.com#beta.latech.edu -HOSTDIR=/var/www/#~/public_html/ +HOSTUSER=sparky4 +HOSTADDR=4ch.mooo.com +HOSTDIR=/var/www/ #ssh port HOSTPORT=26 +# 2nd remote host (for sparky4) +HOST2USER=wwc001 +HOST2ADDR=beta.latech.edu +HOST2DIR=~/public_html/ +#ssh port +HOST2PORT=22 # # quiet flags @@ -396,9 +402,14 @@ www: .symbolic wwwext: .symbolic ####----@ssh -p $(HOSTPORT) $(HOSTUSER)@$(HOSTADDR) 'rm -f $(HOSTDIR)/16/*exe*' + #4ch.mooo.com @scp -r -P $(HOSTPORT) *.exe $(HOSTUSER)@$(HOSTADDR):$(HOSTDIR)/16/ @scp -r -P $(HOSTPORT) *get.bat $(HOSTUSER)@$(HOSTADDR):$(HOSTDIR)/16/ @scp -r -P $(HOSTPORT) /var/www/*.exe.zip.* $(HOSTUSER)@$(HOSTADDR):$(HOSTDIR)/16/ + #beta.latech.edu + @scp -r -P $(HOST2PORT) *.exe $(HOST2USER)@$(HOST2ADDR):$(HOST2DIR)/16/ + @scp -r -P $(HOST2PORT) *get.bat $(HOST2USER)@$(HOST2ADDR):$(HOST2DIR)/16/ + @scp -r -P $(HOST2PORT) /var/www/*.exe.zip.* $(HOST2USER)@$(HOST2ADDR):$(HOST2DIR)/16/ getwww: .symbolic *x4get.bat $(EXEC) diff --git a/q.sh b/q.sh index db78af58..db8984de 100755 --- a/q.sh +++ b/q.sh @@ -1 +1,2 @@ -grep -iR "$1" src/* +grep -i "$1" src/* +grep -i "$1" src/lib/* diff --git a/src/0.c b/src/0.c index d6a48249..d7fc2fda 100755 --- a/src/0.c +++ b/src/0.c @@ -18,6 +18,8 @@ player_t player[MaxPlayers]; map_view_t mv[4]; pan_t pan; +map_t map;//junk var + int main(int argc,char **argv) { static global_game_variables_t gvar; @@ -25,7 +27,7 @@ int main(int argc,char **argv) vrl1_vgax_offset_t *vrl_lineoffs; unsigned char *buffer; unsigned int bufsz; - int fd, i; + int fd; char *bakapee1,*bakapee2; boolean anim=1,noanim=0; @@ -99,15 +101,8 @@ int main(int argc,char **argv) /* setup camera and screen~ */ modexHiganbanaPageSetup(&gvar.video); + modexMVSetup(&mv, &map, &pan, &gvar); modexShowPage(&(gvar.video.page[pan.pn])); - for(i=0;itiles->tileWidth = 16; map->tiles->rows = 1; map->tiles->cols = 1; - map->tiles->debug_text=false; +#ifdef __DEBUG_MAP__ + dbg_maptext=false; +#endif strcpy(js_sv, "data");//strdup(js+t->start);//, t->end - t->start); } else @@ -295,7 +297,9 @@ void extract_map(const char *js, jsmntok_t *t, size_t count, map_t *map) { map->layertile[k]->tileWidth = 16; map->layertile[k]->rows = 1; map->layertile[k]->cols = 1; - map->layertile[k]->debug_text=false; +#ifdef __DEBUG_MAP__ + dbg_maptext=false; +#endif //Fix to load tileset specified. //And move to vrs, probably //bp = bitmapLoadPcx("data/ed.pcx"); diff --git a/src/lib/16_map.h b/src/lib/16_map.h index 103ff763..5cf56c2c 100755 --- a/src/lib/16_map.h +++ b/src/lib/16_map.h @@ -24,42 +24,21 @@ #define _16_MAP__H_ #include "src/lib/16_head.h" +#include "src/lib/16_tdef.h" #include "src/lib/jsmn/jsmn.h" //#include "stdio.h" included in 16_head.h //#include "stdlib.h" included in 16_head.h #include "src/lib/16_vl.h" #include "src/lib/16_ca.h" #include "src/lib/16_mm.h" +#include "src/lib/16_pm.h" //#define DEBUG_MAPDATA //#define DEBUG_MAPVAR //#define DEBUG_DUMPVARS //#define DEBUG_JS -//TODO: 16_mm and 16_ca must handle this -typedef struct { - bitmap_t far *btdata; //old - planar_buf_t far *data; //old - word tileHeight, tileWidth; - unsigned int rows, cols; - #ifdef __DEBUG__ - boolean debug_text; //show the value of the tile! wwww - byte *debug_data; - #endif -} tiles_t; - -//TODO: 16_mm and 16_ca must handle this -//TODO: add variables from 16_ca -typedef struct { - //long planestart[3]; - //unsigned planelength[3]; - byte *data; //TODO: 16_mm and 16_ca must handle this - byte * far *layerdata; //TODO: 16_mm and 16_ca must handle this - tiles_t *tiles; //TODO: 16_mm and 16_ca must handle this - tiles_t * far *layertile; //TODO: 16_mm and 16_ca must handle this - int width, height; //this has to be signed! - char name[16]; -} map_t; +//typedefs moved to 16_tdef.h int jsoneq(const char *json, jsmntok_t *tok, const char *s); word dump(const char *js, jsmntok_t *t, size_t count, word indent, char *js_sv, map_t *map, dword q); diff --git a/src/lib/16_tdef.h b/src/lib/16_tdef.h index 152f509d..09e86c74 100755 --- a/src/lib/16_tdef.h +++ b/src/lib/16_tdef.h @@ -57,13 +57,38 @@ typedef struct { } tileset_t; typedef struct { - byte far *plane[4]; /* 4 planes of image data */ - word width; /* width of the image (spread across 4 planes) */ - word height; /* height of the image (spread across 4 planes) */ - word pwidth; /* the number of bytes in each plane */ + byte far *plane[4]; // 4 planes of image data + word width; // width of the image (spread across 4 planes) + word height; // height of the image (spread across 4 planes) + word pwidth; // the number of bytes in each plane byte *palette; } planar_buf_t; +//TODO: 16_mm and 16_ca must handle this +typedef struct { + bitmap_t far *btdata; //old + planar_buf_t far *data; //old + word tileHeight, tileWidth; + unsigned int rows, cols; +// #ifdef __DEBUG__ +// boolean debug_text; //show the value of the tile! wwww +// byte *debug_data; +// #endif +} tiles_t; + +//TODO: 16_mm and 16_ca must handle this +//TODO: add variables from 16_ca +typedef struct { + //long planestart[3]; + //unsigned planelength[3]; + byte *data; //TODO: 16_mm and 16_ca must handle this + byte * far *layerdata; //TODO: 16_mm and 16_ca must handle this + tiles_t *tiles; //TODO: 16_mm and 16_ca must handle this + tiles_t * far *layertile; //TODO: 16_mm and 16_ca must handle this + int width, height; //this has to be signed! + char name[16]; +} map_t; + typedef struct { /*nibble*/word id; /* the Identification number of the page~ For layering~ */ byte far* data; /* the data for the page */ diff --git a/src/lib/doslib b/src/lib/doslib index 0c6774ea..bff76110 160000 --- a/src/lib/doslib +++ b/src/lib/doslib @@ -1 +1 @@ -Subproject commit 0c6774ead605d21c220a3a076faa79b31434a450 +Subproject commit bff76110ad29bd30f6f78efb7ec187c7207822c9 diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index f2a16e3d..0901f382 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -333,6 +333,27 @@ void panVmemManual(map_view_t *pip, player_t *player, word pn) //if (player[pn].d!=2) printf("player[%u].d=%u player[%u].q=%u\n", pn, player[pn].d, pn, player[pn].q); } +/* + * modex mv setup +*/ +void modexMVSetup(map_view_t *mv, map_t *map, pan_t *pan, global_game_variables_t *gv) +{ + word i; + // 1st page + mv[0].page = &gv->video.page[0]; + mv[0].map = map; + mv[0].video = &gv->video; + mv[0].pan = pan; + + for(i=1;ivideo.num_of_pages;i++) + { + mv[i].page = &gv->video.page[i]; + mv[i].map = mv[0].map; + mv[i].video = mv[0].video; + mv[i].pan = mv[0].pan; + } +} + /*map_t allocMap(int w, int h) { map_t result; @@ -640,14 +661,20 @@ sword chkmap(map_t *map, word q) //fix this to be far~ // bp = bitmapLoadPcx("data/ed.pcx"); // map->tiles->data = &bp; - map->tiles->debug_data = map->data; +#ifdef __DEBUG_MAP__ + dbg_mapdata = map->data; +#endif map->tiles->tileHeight = 16; map->tiles->tileWidth = 16; map->tiles->rows = 1; map->tiles->cols = 1; - map->tiles->debug_text = true; +#ifdef __DEBUG_MAP__ + dbg_maptext = true; +#endif } - else map->tiles->debug_text = false; +#ifdef __DEBUG_MAP__ + else dbg_maptext = false; +#endif return 0; } @@ -711,11 +738,13 @@ mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y) rx = (((i-1) % ((t->data->width)/t->tileWidth)) * t->tileWidth); ry = (((i-1) / ((t->data->height)/t->tileHeight)) * t->tileHeight); ////0000printf("i=%d\n", i); - switch(t->debug_text) +#ifdef __DEBUG_MAP__ + switch(dbg_maptext) { case 0: +#endif #ifndef TILERENDER - modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, ((t->debug_data[i])+1)); + modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, ((dbg_mapdata[i])+1)); //modexprint(page, x, y, 1, 15, 0, (char const *)(t->debug_data[i])); #else PBUFBFUN (page, x, y, rx, ry, t->tileWidth, t->tileHeight, (t->data)); @@ -723,9 +752,10 @@ mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y) //draw_vrl1_vgax_modex(x-rx,y-ry,vrl_header,vrl_lineoffs,buffer+sizeof(*vrl_header),bufsz-sizeof(*vrl_header)); //modexDrawBmpRegion (page, x, y, rx, ry, t->tileWidth, t->tileHeight, (t->data)); #endif +#ifdef __DEBUG_MAP__ break; case 1: - modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, (t->debug_data[i])+1); + modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, (dbg_mapdata[i])+1); //modexprintbig(page, x, y, 1, 15, 0, (t->debug_data)); /*for(texty=0; texty<2; texty++) { @@ -736,6 +766,7 @@ mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y) }*/ break; } +#endif } } diff --git a/src/lib/scroll16.h b/src/lib/scroll16.h index a29f1f50..8d79d213 100755 --- a/src/lib/scroll16.h +++ b/src/lib/scroll16.h @@ -75,11 +75,6 @@ typedef struct { * should have a sprite too. Map is drawn left-to-right, top-to-bottom. */ -typedef struct -{ - map_view_t *mv; -} map_view_db_t; - //for null map! #define MAPW 40 #define MAPH 30 @@ -128,6 +123,7 @@ extern char global_temp_status_text[512]; void walk(map_view_t *pip, player_t *player, word pn); void panPageManual(map_view_t *pip, player_t *player, word pn); void panVmemManual(map_view_t *pip, player_t *player, word pn); +void modexMVSetup(map_view_t *mv, map_t *map, pan_t *pan, global_game_variables_t *gv); void near mapScrollRight(map_view_t *mv, player_t *player, word id, word plid); void near mapScrollLeft(map_view_t *mv, player_t *player, word id, word plid); void near mapScrollUp(map_view_t *mv, player_t *player, word id, word plid); diff --git a/src/scroll.c b/src/scroll.c index 855ffb09..d3ff0ef2 100755 --- a/src/scroll.c +++ b/src/scroll.c @@ -125,13 +125,7 @@ void main(int argc, char *argv[]) /* setup camera and screen~ */ modexHiganbanaPageSetup(&gvar.video); - for(i=0;ispri->x = player[0].ent->spri->y = TILEWH; // set up paging