e2c.convert_num: 0
openfiles: /dos/z/16/doc/project.txt:138:0:0:
openfiles: /dos/z/16/src/palettec.c:179:0:0:
-openfiles: /dos/z/16/src/pcxtest.c:1431:1432:0:
-openfiles: /dos/z/16/src/scroll.c:20126:19524:1:
+openfiles: /dos/z/16/src/pcxtest.c:141:0:0:
+openfiles: /dos/z/16/src/scroll.c:20776:19775:0:
openfiles: /dos/z/16/src/fmemtest.c:116:0:0:
openfiles: /dos/z/16/src/emmtest.c:732:0:0:
openfiles: /dos/z/16/src/emsdump.c:456:0:0:
openfiles: /dos/z/16/src/maptest0.c:366:0:0:
openfiles: /dos/z/16/src/test.c:0:0:0:
openfiles: /dos/z/16/src/test2.c:0:0:0:
-openfiles: /dos/z/16/src/lib/planar.h:602:0:0:
+openfiles: /dos/z/16/src/lib/modex16.c:2794:2497:1:
+openfiles: /dos/z/16/src/lib/modex16.h:1062:586:0:
+openfiles: /dos/z/16/src/lib/planar.h:131:0:0:
openfiles: /dos/z/16/src/lib/PLANAR.C:0:0:0:
openfiles: /dos/z/16/src/lib/bitmap.c:1152:604:0:
openfiles: /dos/z/16/src/lib/bitmap.h:257:0:0:
-openfiles: /dos/z/16/src/lib/modex16.c:24171:23610:0:
-openfiles: /dos/z/16/src/lib/modex16.h:3028:2369:0:
-openfiles: /dos/z/16/src/lib/dos_kb.c:3264:2598:0:
+openfiles: /dos/z/16/src/lib/dos_kb.c:3264:2448:0:
openfiles: /dos/z/16/src/lib/dos_kb.h:0:0:0:
openfiles: /dos/z/16/src/lib/mapread.c:2265:1988:0:
openfiles: /dos/z/16/src/lib/mapread.h:584:0:0:
-openfiles: /dos/z/16/src/lib/fmapread.c:5968:5101:0:
+openfiles: /dos/z/16/src/lib/fmapread.c:5968:4626:0:
openfiles: /dos/z/16/src/lib/fmapread.h:436:0:0:
openfiles: /dos/z/16/src/lib/exmm/memory.c:308:99:0:
openfiles: /dos/z/16/src/lib/exmm/memory.h:0:0:0:
opendir: file:///dos/z/16/src/lib
wrap_text_default: 0
bookmarks_filename_mode: 1
-ssearch_text: panswitch
+ssearch_text: modexShowPage()
snr_casesens: 0
view_blocks: 1
name: Project 16
recent_files: file:///dos/z/16/src/lib/exmm/x.bat
recent_files: file:///dos/z/16/src/lib/jsmn/jsmn.c
recent_files: file:///dos/z/16/src/lib/jsmn/jsmn.h
-recent_files: file:///dos/z/16/src/lib/modex16.c
+recent_files: file:///dos/z/16/src/scroll.c
recent_files: file:///dos/z/16/doc/project.txt
recent_files: file:///dos/z/16/src/palettec.c
+recent_files: file:///dos/z/16/src/emmtest.c
recent_files: file:///dos/z/16/src/pcxtest.c
recent_files: file:///dos/z/16/src/fmemtest.c
-recent_files: file:///dos/z/16/src/emmtest.c
recent_files: file:///dos/z/16/src/emsdump.c
recent_files: file:///dos/z/16/src/maptest.c
-recent_files: file:///dos/z/16/src/scroll.c
recent_files: file:///dos/z/16/src/maptest0.c
recent_files: file:///dos/z/16/src/test.c
recent_files: file:///dos/z/16/src/test2.c
recent_files: file:///dos/z/16/src/lib/planar.h
recent_files: file:///dos/z/16/src/lib/PLANAR.C
-recent_files: file:///dos/z/16/src/lib/bitmap.c
-recent_files: file:///dos/z/16/src/lib/bitmap.h
-recent_files: file:///dos/z/16/src/lib/modex16.h
recent_files: file:///dos/z/16/src/lib/dos_kb.c
recent_files: file:///dos/z/16/src/lib/dos_kb.h
-recent_files: file:///dos/z/16/src/lib/mapread.c
recent_files: file:///dos/z/16/src/lib/mapread.h
-recent_files: file:///dos/z/16/src/lib/fmapread.c
recent_files: file:///dos/z/16/src/lib/fmapread.h
-recent_files: file:///dos/z/16/src/lib/exmm/memory.h
+recent_files: file:///dos/z/16/src/lib/fmapread.c
+recent_files: file:///dos/z/16/src/lib/bitmap.c
+recent_files: file:///dos/z/16/src/lib/bitmap.h
+recent_files: file:///dos/z/16/src/lib/mapread.c
recent_files: file:///dos/z/16/src/lib/exmm/emmsize.h
recent_files: file:///dos/z/16/src/lib/exmm/emmret.h
+recent_files: file:///dos/z/16/src/lib/exmm/memory.c
recent_files: file:///dos/z/16/src/lib/jsmn/farjsmn.c
+recent_files: file:///dos/z/16/src/lib/lib_head.h
recent_files: file:///dos/z/16/src/lib/jsmn/farjsmn.h
+recent_files: file:///dos/z/16/src/lib/exmm/memory.h
+recent_files: file:///dos/z/16/makefile
recent_files: file:///dos/z/16/src/lib/lib_head.c
-recent_files: file:///dos/z/16/src/lib/lib_head.h
-recent_files: file:///dos/z/16/src/lib/exmm/memory.c
recent_files: file:///dos/z/16/src/lib/types.h
-recent_files: file:///dos/z/16/makefile
+recent_files: file:///dos/z/16/src/lib/modex16.c
+recent_files: file:///dos/z/16/src/lib/modex16.h
snr_replacetype: 0
savedir: file:///dos/z/16/src/lib
spell_check_default: 1
htmlbar_view: 0
spell_lang: en
ssearch_dotmatchall: 0
-searchlist: (*bmp)=bitmapLoadPcx("data/font.pcx");(*bmp)=bitmapLoadPcx("data/font.pcx");
-searchlist: modexDraws
-searchlist: reg
-searchlist: animate
-searchlist: SelectPlane
-searchlist: modexClearRegion(page_t *page, int x, int y, int w, int h, byte color) {
-searchlist: cla
-searchlist: clear
-searchlist: trigg
-searchlist: memset
-searchlist: font
-searchlist: word text_mask[16] = {\n\t0x0002, 0x0102, 0x0202, 0x0302,\r\n\t0x0402, 0x0502, 0x0602, 0x0702,\r\n\t0x0802, 0x0902, 0x0A02, 0x0B02,\r\n\t0x0C02, 0x0D02, 0x0E02, 0x0F02\n};
searchlist: 0x3C4
searchlist: SC_INDEX
searchlist: panswitch
+searchlist: ++++
+searchlist: !!
+searchlist: drawbmp
+searchlist: move
+searchlist: next
+searchlist: bg
+searchlist: newde
+searchlist: default
+searchlist: (1)
+searchlist: map
+searchlist: screen,
+searchlist: modexShowPage()
autocomplete: 1
outputb_show_all_output: 0
bookmarks_show_mode: 0
return result;
}
+//next page with defined dimentions~
+page_t
+modexNextPage0(page_t *p, word x, word y)
+{
+ page_t result;
+
+ result.data = p->data + (p->width/4)*p->height; /* compute the offset */
+ result.dx = 0;
+ result.dy = 0;
+ result.width = x;
+ result.height = y;
+
+ return result;
+}
+
void
modexShowPage(page_t *page) {
}
+void\r
+oldDrawBmp(byte far* page, int x, int y, bitmap_t *bmp, byte sprite)
+{\r
+ byte plane;\r
+ word px, py;\r
+ word offset;\r
+\r
+ /* TODO Make this fast. It's SLOOOOOOW */\r
+ for(plane=0; plane < 4; plane++) {\r
+ modexSelectPlane(PLANE(plane+x));\r
+ for(px = plane; px < bmp->width; px+=4) {\r
+ offset=px;\r
+ for(py=0; py<bmp->height; py++) {\r
+ if(!sprite || bmp->data[offset])\r
+ page[PAGE_OFFSET(x+px, y+py)] = bmp->data[offset];\r
+ offset+=bmp->width;\r
+ }\r
+ }\r
+ }\r
+}
+
+
void
modexDrawBmp(page_t *page, int x, int y, bitmap_t *bmp) {
/* draw the region (the entire freakin bitmap) */
void modexLeave();
page_t modexDefaultPage();
page_t modexNextPage(page_t *p);
+page_t modexNextPage0(page_t *p, word x, word y);
void modexShowPage(page_t *page);
void modexPanPage(page_t *page, int dx, int dy);
void modexSelectPlane(byte plane);
void modexClearRegion(page_t *page, int x, int y, int w, int h, byte color);
+void oldDrawBmp(byte far* page, int x, int y, bitmap_t *bmp, byte sprite);
void modexDrawBmp(page_t *page, int x, int y, bitmap_t *bmp);
void modexDrawBmpRegion(page_t *page, int x, int y, int rx, int ry, int rw, int rh, bitmap_t *bmp);
void modexDrawPlanarBuf(page_t *page, int x, int y, planar_buf_t *bmp);
\r
word far* clockw= (word far*) 0x046C; /* 18.2hz clock */\r
\r
-void\r
-oldDrawBmp(byte far* page, int x, int y, bitmap_t *bmp, byte sprite) {\r
- byte plane;\r
- word px, py;\r
- word offset;\r
-\r
- /* TODO Make this fast. It's SLOOOOOOW */\r
- for(plane=0; plane < 4; plane++) {\r
- modexSelectPlane(PLANE(plane+x));\r
- for(px = plane; px < bmp->width; px+=4) {\r
- offset=px;\r
- for(py=0; py<bmp->height; py++) {\r
- if(!sprite || bmp->data[offset])\r
- page[PAGE_OFFSET(x+px, y+py)] = bmp->data[offset];\r
- offset+=bmp->width;\r
- }\r
- }\r
- }\r
-}
-\r
/*
void\r
DrawPBuf(page_t *page, int x, int y, planar_buf_t *p, byte sprite)
// bmp = bitmapLoadPcx("data/chikyuu.pcx");
bmp = bitmapLoadPcx("data/koishi^^.pcx");
// bmp = bitmapLoadPcx("16/PCX_LIB/chikyuu.pcx");
-//0000 p = planar_buf_from_bitmap(&bmp);\r
+ p = planar_buf_from_bitmap(&bmp);\r
modexEnter();\r
\r
/* fix up the palette and everything */\r
modexClearRegion(&page, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 1);\r
\r
/* non sprite comparison */
- /*0000start = *clockw;\r
+ start = *clockw;\r
for(i=0; i<100 ;i++) {\r
oldDrawBmp(VGA, 20, 20, &bmp, 0);\r
}\r
for(i=0; i<100 ;i++) {\r
//0000 modexDrawSprite(&page, 20, 20, &bmp);
modexDrawSprite(&page, 0, 0, &bmp);\r
- }*/
+ }
//_fmemset(MK_FP(0xA000, 0), (int)p->plane, SCREEN_WIDTH*(SCREEN_HEIGHT*2));
modexDrawBmp(&page, 0, 0, &bmp);
while(!kbhit())
printf("\n%d\n", sizeof(p->plane));
printf("%d\n", sizeof(bmp));
- /*for(i=0; i<(320*240); i++)
+ for(i=0; i<(320*240); i++)
{
fprintf(stdout, "%d", bmp.data[i]);
if(i%320==0) fprintf(stdout, "\n");
- }*/\r
-//0000 printf("CPU to VGA: %f\n", t1);\r
-//0000 printf("VGA to VGA: %f\n", t2);\r
+ }\r
+ printf("CPU to VGA: %f\n", t1);\r
+ printf("VGA to VGA: %f\n", t2);\r
return;\r
}\r
screen.height += (TILEWH*2)+QUADWH;\r
mv.page = &screen;\r
screen2 = modexNextPage(mv.page);\r
- mv2.page = &screen2;\r
- screen3 = screen2;\r
+ mv2.page = &screen2;
+ screen3 = modexNextPage0(mv2.page, 352, 176); //(352*176)+1024 is the remaining amount of memory left wwww
+ //screen3 = modexNextPage0(mv2.page, 320, 192); //(352*176)+1024 is the remaining amount of memory left wwww
mv3.page = &screen3;\r
\r
/* set up paging */\r
{
bg->page->dx++;
spri->page->dx++;
+ mask->page->dx++;
modexShowPage(bg->page);
modexShowPage(spri->page);
+ modexShowPage(mask->page);
panq++;\r
} else { panq = 1; pand = 0; }\r
}\r
{\r
bg->page->dx--;
spri->page->dx--;
+ mask->page->dx--;
modexShowPage(bg->page);
modexShowPage(spri->page);
+ modexShowPage(mask->page);
panq++;\r
} else { panq = 1; pand = 0; }\r
}\r
{\r
bg->page->dy--;
spri->page->dy--;
+ mask->page->dy--;
modexShowPage(bg->page);
modexShowPage(spri->page);
+ modexShowPage(mask->page);
panq++;\r
} else { panq = 1; pand = 0; }\r
}\r
{\r
bg->page->dy++;
spri->page->dy++;
+ mask->page->dy++;
modexShowPage(bg->page);
- modexShowPage(spri->page);\r
+ modexShowPage(spri->page);
+ modexShowPage(mask->page);\r
panq++;\r
} else { panq = 1; pand = 0; }\r
}
-}\r
+}
+
+ //the scripting stuf....
+\r
//if(((player.triggerx == TRIGGX && player.triggery == TRIGGY) && keyp(0x1C))||(player.tx == 5 && player.ty == 5))
if(((bg->map->data[(player.triggerx-1)+(map.width*(player.triggery-1))] == 0) && keyp(0x1C))||(player.tx == 5 && player.ty == 5))\r
{\r
}\r
nosound();\r
}\r
- if(player.q == (TILEWH/SPEED)+1 && player.d > 0 && (player.triggerx == 5 && player.triggery == 5)){ player.hp--; }\r
+ if(player.q == (TILEWH/SPEED)+1 && player.d > 0 && (player.triggerx == 5 && player.triggery == 5)){ player.hp--; }
+ //debugging binds!\r
//if(keyp(0x0E)) while(1){ if(xmsmalloc(24)) break; }
+ if(keyp(2)) modexShowPage(bg->page);
+ if(keyp(3)) modexShowPage(spri->page);
+ if(keyp(4)) modexShowPage(mask->page);
if(keyp(0x44)){ bputs(spri->page, player.x+(TILEWH*2), player.y+(TILEWH*2), "wwww"); } //f10
- if(keyp(25)){ pdump(bg); pdump(spri); }\r
+ if(keyp(25)){ pdump(bg); pdump(spri); } //p\r
if(keyp(24)){ modexPalUpdate0(gpal); paloffset=0; pdump(bg); pdump(spri); }\r
if(keyp(22)){\r
paloffset=0; modexPalBlack(); modexPalUpdate(&ptmp, &paloffset, 0, 0);\r
printf("2paloffset = %d\n", paloffset/3);\r
pdump(bg); pdump(spri); }
//pan switch\r
- if(keyp(88)){if(!panswitch) panswitch++; else panswitch--; }
+ if(keyp(88)){if(!panswitch) panswitch++; else panswitch--; } //f12
//TSR\r
- if(keyp(87))\r
+ if(keyp(87)) //f11\r
{\r
modexLeave();\r
setkb(0);\r
//xmsreport();\r
//emmclose(emmhandle);
printf("%Fp\n", bios_8x8_font());
- printf("%c\n", *bios_8x8_font());\r
+ //printf("%c\n", *bios_8x8_font());\r
switch(detectcpu())\r
{\r
case 0: cpus = "8086/8088 or 186/88"; break;\r