From 5c5b917fb99c730cee03d6806532667085495ab6 Mon Sep 17 00:00:00 2001 From: sparky4 Date: Wed, 12 Apr 2017 13:59:12 -0500 Subject: [PATCH] p16 is being worked on a bunch by me wwww [16_ca needs huge amounts of work and I should remember what needs to be done soon][OpenVGMFile needs to be ported to 16_snd.c]going to port rest of code to borland c some time so we can use the core components of id engine here [going to add 16_us.c eventually but the debug system and CA_ PM_ and MM_ usage is priority now]older zcroll renamed to xcroll][zcroll is now the pre menu game loop system with PROPER data usage with CAMMPM] MM_ShowMemory is quite buggy on real machines. i need to debug it and fix added a struct printer[gvar.mm is FUCKING HUGE 14402 bytes FAT\!]16_rf now compiles BT UNKNOWN ON WHAT IT DOSE\! text box creates a ghost because page 1 do not have bg info thus it is stored and saved.... wwww --- src/lib/16_vl_2.c | 25 ++++++++++++++++--------- src/xcroll.c | 1 - 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/lib/16_vl_2.c b/src/lib/16_vl_2.c index 1dfa23dc..7fc2bf99 100755 --- a/src/lib/16_vl_2.c +++ b/src/lib/16_vl_2.c @@ -33,8 +33,9 @@ char global_temp_status_text2[512]; void VL_modexPrintTextBox(global_game_variables_t *gvar) { -#define PRINTTEXTBOXW gvar->video.page[0].width +#define PRINTTEXTBOXW gvar->video.page[0].sw #define PRINTTEXTBOXH 160 +//#define PRINTTEXTBOXSIZE 51200 #define PRINTTEXTBOXHLINE 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD//, 0xCD, 0xCD, 0xCD, 0xCD #define PRINTTEXTBOXHLINETOP 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCB, 0xCD, PRINTTEXTBOXHLINE #define PRINTTEXTBOXHLINEBOTTOM 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCA, 0xCD, PRINTTEXTBOXHLINE @@ -57,16 +58,18 @@ void VL_modexPrintTextBox(global_game_variables_t *gvar) nibble i; boolean done; ScanCode scan; +// word huge textboxbuff[PRINTTEXTBOXSIZE]; #ifndef PRINTTEXTBOXSTABLE word q; #endif //backuppart - modexCopyPageRegion(&gvar->video.page[0], &gvar->video.page[1], - 0, - 0, + modexCopyPageRegion(&gvar->video.page[1], &gvar->video.page[0], x, - PRINTTEXTBOXH, + gvar->video.page[0].height-PRINTTEXTBOXH, + x, + gvar->video.page[0].height-PRINTTEXTBOXH, PRINTTEXTBOXW, PRINTTEXTBOXH); +// memcpy(&textboxbuff, gvar->video.page[0].data, PRINTTEXTBOXSIZE); // mxOutText(xpos+1, ypos+gvar.video.page[0].height-40, "| |Chikyuu:$line1"); // mxOutText(xpos+1, ypos+gvar.video.page[0].height-32, "| |$line2"); // mxOutText(xpos+1, ypos+gvar.video.page[0].height-24, "| |$line3"); @@ -91,6 +94,7 @@ void VL_modexPrintTextBox(global_game_variables_t *gvar) #endif sprintf(global_temp_status_text, "%s", str3); modexprint(&(gvar->video.page[(gvar->video.p)]), x, y+gvar->video.page[0].height-v, type, 1, col, bgcol, 1, global_temp_status_text); + //PRINT TEXT for (i = 0,done = false;!done;) { while (!(scan = gvar->in.inst->LastScan)) @@ -104,15 +108,18 @@ void VL_modexPrintTextBox(global_game_variables_t *gvar) case sc_Escape: done = true; break; + case sc_Q: case sc_Enter: //PM_GetPage(i, gvar); break; } } - modexCopyPageRegion(&gvar->video.page[1], &gvar->video.page[0], + + modexCopyPageRegion(&gvar->video.page[0], &gvar->video.page[1], + x, + gvar->video.page[0].height-PRINTTEXTBOXH, x, - PRINTTEXTBOXH, - 0, - 0, + gvar->video.page[0].height-PRINTTEXTBOXH, PRINTTEXTBOXW, PRINTTEXTBOXH); +// memcpy(&gvar->video.page[0].data, &textboxbuff, PRINTTEXTBOXSIZE); } diff --git a/src/xcroll.c b/src/xcroll.c index 2fd95869..1b42f8f0 100755 --- a/src/xcroll.c +++ b/src/xcroll.c @@ -161,7 +161,6 @@ void main(int argc, char *argv[]) { gvar.video.page[0].tlx=gvar.mv[0].tx*TILEWH; gvar.video.page[0].tly=gvar.mv[0].ty*TILEWH; - modexWaitBorder(); shinku(&gvar); //top left corner & bottem right corner of map veiw be set as map edge trigger since maps are actually square //to stop scrolling and have the gvar.player position data move to the edge of the screen with respect to the direction -- 2.39.2