X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Fexmmtest.c;h=83aa4e2b63d41df54ed21f62197a15bf1d09ff5b;hb=5af1604f7af6c1d1ab94299bfe6a4195b203a323;hp=62fdd32e4a8e75082a599f6d1cb78755641fd4b8;hpb=adae92394ccbbee3d14fc63dcf1a90f38b85c8da;p=16.git diff --git a/src/exmmtest.c b/src/exmmtest.c index 62fdd32e..83aa4e2b 100755 --- a/src/exmmtest.c +++ b/src/exmmtest.c @@ -52,11 +52,12 @@ void TL_VidInit(global_game_variables_t *gvar) gvar->video.old_mode = 3; } +void VL_print(const byte *str, nibble pagenum, global_game_variables_t *gvar){ printf("%s\n", str); } + #ifdef __WATCOMC__ void VL_ShowPage(page_t *page, boolean vsync, boolean sr){} void modexClearRegion(page_t *page, int x, int y, int w, int h, byte color){} void modexprint(page_t *page, sword x, sword y, word t, boolean tlsw, word color, word bgcolor, boolean vidsw, const byte *str){ printf("%s\n", str); } -void VL_print(const byte *str, nibble pagenum, global_game_variables_t *gvar){ printf("%s\n", str); } void modexpdump(nibble pagenum, global_game_variables_t *gvar){} #endif #endif @@ -87,7 +88,7 @@ void segatesuto() #define FILENAME_1 "data/spri/chikyuu.vrs" #define FILENAME_2 "data/test.map" #else -#define FILENAME_1 "data/koishi~.pcx" +#define FILENAME_1 "data/spri/chikyuu.sht" #define FILENAME_2 "data/test.map" #endif @@ -105,7 +106,6 @@ main(int argc, char *argv[]) #ifdef INITBBUF INITBBUF #endif - //0000mmblocktype far *scan; char bakapee1[64] = FILENAME_1; char bakapee2[64] = FILENAME_2; @@ -178,18 +178,29 @@ PRINTBB; KEYP printf("====================================load end===================================\n"); } #ifdef BUFFDUMP - printf("contents of the buffer\n[\n%.*s\n]\n", strlen(BBUFSTRING), BBUFSTRING); + { + size_t file_s; + FILE *fh; + + if(!w) fh = fopen(bakapee1, "r"); + else fh = fopen(bakapee2, "r"); + file_s = filesize(fh); + fclose(fh); + printf("contents of the buffer\n[\n%.*s\n]\n", file_s, BBUFSTRING); #if 0 //0000 - scan = gvar.mm.mmhead; - while (scan->useptr != &BBUFNAME && scan) - { - scan = scan->next; - } - printf("\n %Fp %Fp\n", scan->useptr, &BBUFNAME); - printf("\nstrlen of buffer = %zu\n", strlen(BBUFSTRING)); - printf("length of buffer = %lu\n", scan->scan->length); +// mmblocktype far *scan; +// scan = gvar.mm.mmhead; +// while (scan->useptr != &BBUFNAME && scan) +// { +// scan = scan->next; +// } +// printf("\n %Fp %Fp\n", scan->useptr, &BBUFNAME); + printf("\nstrlen of buffer = %zu\n", strlen(BBUFSTRING)); + printf("length of buffer = %zu\n", file_s); +// printf("length of buffer = %lu\n", scan->length); #endif + } #endif #ifdef PRINTBBDUMP PRINTBB;