diff --git a/polymer/eduke32/build/include/build.h b/polymer/eduke32/build/include/build.h index 3be237584..9696750d7 100644 --- a/polymer/eduke32/build/include/build.h +++ b/polymer/eduke32/build/include/build.h @@ -559,6 +559,8 @@ typedef struct s_point2d { int32_t wallvisible(int16_t wallnum); #define STATUS2DSIZ 144 +#define STATUS2DSIZ2 26 + void qsetmode640350(void); void qsetmode640480(void); void qsetmodeany(int32_t,int32_t); diff --git a/polymer/eduke32/build/include/editor.h b/polymer/eduke32/build/include/editor.h index c6f905bb0..3171cb127 100644 --- a/polymer/eduke32/build/include/editor.h +++ b/polymer/eduke32/build/include/editor.h @@ -92,6 +92,8 @@ void _printmessage16(const char *fmt, ...); #define printmessage16(fmt, ...) lastpm16time = totalclock, _printmessage16(fmt, ## __VA_ARGS__) +extern char lastpm16buf[60]; + void getpoint(int32_t searchxe, int32_t searchye, int32_t *x, int32_t *y); int32_t getpointhighlight(int32_t xplc, int32_t yplc, int32_t point); diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index 9a574b04d..8ce8704f4 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -115,7 +115,7 @@ int32_t osearchx, osearchy; //old search input extern int16_t pointhighlight, linehighlight, highlightcnt; int16_t grid = 3, gridlock = 1, showtags = 1; int32_t zoom = 768, gettilezoom = 1; -int32_t lastpm16time; +int32_t lastpm16time = 0; int32_t numsprites; extern int32_t mapversion; @@ -175,6 +175,8 @@ int32_t pk_turnaccel=16; int32_t pk_turndecel=12; int32_t pk_uedaccel=3; +char lastpm16buf[60]; + char changechar(char dachar, int32_t dadir, char smooshyalign, char boundcheck); int32_t adjustmark(int32_t *xplc, int32_t *yplc, int16_t danumwalls); int32_t checkautoinsert(int32_t dax, int32_t day, int16_t danumwalls); @@ -260,11 +262,11 @@ static int32_t osdcmd_vidmode(const osdfuncparm_t *parm) ydim2d = ydim; begindrawing(); //{{{ - clearbuf((char *)(frameplace + (ydim16*bytesperline)), (bytesperline*STATUS2DSIZ) >> 2, 0x00000000l); + clearbuf((char *)(frameplace + (ydim16*bytesperline)), (bytesperline*STATUS2DSIZ2) >> 2, 0x00000000l); clearbuf((char *)frameplace, (ydim16*bytesperline) >> 2, 0L); ydim16 = ydim; - drawline16(0,ydim-STATUS2DSIZ,xdim-1,ydim-STATUS2DSIZ,editorcolors[1]); +// drawline16(0,ydim-STATUS2DSIZ,xdim-1,ydim-STATUS2DSIZ,editorcolors[1]); /* drawline16(0,ydim-1,xdim-1,ydim-1,1); drawline16(0,ydim-STATUS2DSIZ,0,ydim-1,1); drawline16(xdim-1,ydim-STATUS2DSIZ,xdim-1,ydim-1,1); @@ -272,7 +274,7 @@ static int32_t osdcmd_vidmode(const osdfuncparm_t *parm) drawline16(192-24,ydim-STATUS2DSIZ,192-24,ydim-STATUS2DSIZ+24,1); drawline16(0,ydim-1-20,xdim-1,ydim-1-20,1); drawline16(256,ydim-1-20,256,ydim-1,1); */ - ydim16 = ydim-STATUS2DSIZ; + ydim16 = ydim-STATUS2DSIZ2; enddrawing(); //}}} return OSDCMD_OK; } @@ -764,7 +766,7 @@ void editinput(void) if (keystatus[0x44]) { memset(spriteext, 0, sizeof(spriteext_t) * MAXSPRITES); - memset(spritesmooth, 0, sizeof(spritesmooth_t) * (MAXSPRITES+MAXUNIQHUDID)); + memset(spritesmooth, 0, sizeof(spritesmooth_t) *(MAXSPRITES+MAXUNIQHUDID)); #ifdef POLYMER staticlightcount = 0; #endif @@ -1158,15 +1160,15 @@ void overheadeditor(void) osearchy = searchy; searchx = scale(searchx,xdim2d,xdimgame); - searchy = scale(searchy,ydim2d-STATUS2DSIZ,ydimgame); + searchy = scale(searchy,ydim2d-STATUS2DSIZ2,ydimgame); oposz = pos.z; begindrawing(); //{{{ - clearbuf((char *)(frameplace + (ydim16*bytesperline)), (bytesperline*STATUS2DSIZ) >> 2, 0x00000000l); + clearbuf((char *)(frameplace + (ydim16*bytesperline)), (bytesperline*STATUS2DSIZ2) >> 2, 0x00000000l); clearbuf((char *)frameplace, (ydim16*bytesperline) >> 2, 0L); ydim16 = ydim; - drawline16(0,ydim-STATUS2DSIZ,xdim-1,ydim-STATUS2DSIZ,editorcolors[1]); +// drawline16(0,ydim-STATUS2DSIZ2,xdim-1,ydim-STATUS2DSIZ2,editorcolors[1]); /* drawline16(0,ydim-1,xdim-1,ydim-1,1); drawline16(0,ydim-STATUS2DSIZ,0,ydim-1,1); drawline16(xdim-1,ydim-STATUS2DSIZ,xdim-1,ydim-1,1); @@ -1181,7 +1183,7 @@ void overheadeditor(void) // printmessage16("Version: "VERSION); // drawline16(0,ydim-1-20,xdim-1,ydim-1-20,1); // drawline16(256,ydim-1-20,256,ydim-1,1); - ydim16 = ydim-STATUS2DSIZ; + ydim16 = ydim-STATUS2DSIZ2; enddrawing(); //}}} pag = 0; @@ -1308,7 +1310,7 @@ void overheadeditor(void) wall[newnumwalls].y = day; } - ydim16 = ydim - STATUS2DSIZ; + ydim16 = ydim - STATUS2DSIZ2; tempint = numwalls; numwalls = newnumwalls; @@ -1328,7 +1330,7 @@ void overheadeditor(void) if (graphicsmode == 2) totalclocklock = totalclock; - drawmapview(pos.x, pos.y + scale((1048576/zoom), ydim, 768), zoom, 1536); + drawmapview(pos.x, pos.y + scale((57344/zoom), ydim, 200), zoom, 1536); yxaspect = i; xyaspect = ii; } @@ -1498,7 +1500,7 @@ void overheadeditor(void) for (i=0; i= 0) { @@ -2120,7 +2122,7 @@ void overheadeditor(void) ydim16 = STATUS2DSIZ; ExtShowWallData((int16_t)i); - ydim16 = ydim-STATUS2DSIZ; + ydim16 = ydim-STATUS2DSIZ2; } } if (keystatus[0x41]) //F7 @@ -2132,7 +2134,7 @@ void overheadeditor(void) { ydim16 = STATUS2DSIZ; ExtEditSectorData((int16_t)i); - ydim16 = ydim-STATUS2DSIZ; + ydim16 = ydim-STATUS2DSIZ2; break; } } @@ -2146,7 +2148,7 @@ void overheadeditor(void) ydim16 = STATUS2DSIZ; ExtEditSpriteData((int16_t)i); - ydim16 = ydim-STATUS2DSIZ; + ydim16 = ydim-STATUS2DSIZ2; } else if (linehighlight >= 0) { @@ -2154,7 +2156,7 @@ void overheadeditor(void) ydim16 = STATUS2DSIZ; ExtEditWallData((int16_t)i); - ydim16 = ydim-STATUS2DSIZ; + ydim16 = ydim-STATUS2DSIZ2; } } @@ -2213,7 +2215,7 @@ void overheadeditor(void) break; } } - printmessage16(""); + // printmessage16(""); } if (keystatus[0x19]) // P (palookup #) { @@ -2232,7 +2234,7 @@ void overheadeditor(void) clearmidstatbar16(); showsectordata((int16_t)i); - printmessage16(""); + // printmessage16(""); break; } } @@ -2247,35 +2249,11 @@ void overheadeditor(void) showspritedata((int16_t)i); } - printmessage16(""); + // printmessage16(""); keystatus[0x12] = 0; } - if (keystatus[0x0f]) //TAB - { - clearmidstatbar16(); - - if ((keystatus[0x38]|keystatus[0xb8]|keystatus[0x1d]|keystatus[0x9d]) > 0) //ALT or CTRL - { - if (pointhighlight >= 16384) - showspritedata((int16_t)pointhighlight-16384); - else if (linehighlight >= 0) - showwalldata((int16_t)linehighlight); - } - else - { - for (i=0; i 0) { - searchx = halfxdim16; - searchy = midydim16; - pos.x = mousxplc; - pos.y = mousyplc; + if (keystatus[0x1d]|keystatus[0x9d]) + { + int16_t cursectornum; + + for (cursectornum=0; cursectornum= 16384) + { + i = pointhighlight-16384; + ExtEditSpriteData((int16_t)i); + } + else if ((linehighlight >= 0) && (bstatus&1 || sectorofwall(linehighlight) == cursectornum)) + { + ExtEditWallData((int16_t)linehighlight); + } + else if (cursectornum >= 0) + { + ExtEditSectorData((int16_t)cursectornum); + } + } + + bstatus &= ~6; + } + else + { + searchx = halfxdim16; + searchy = midydim16; + pos.x = mousxplc; + pos.y = mousyplc; + } } if (circlewall != -1 && (keystatus[0x4a] || (bstatus&32 && !(keystatus[0x1d]|keystatus[0x9d])))) // - @@ -2766,7 +2774,7 @@ SKIP: pos.y = mousyplc; } if (zoom > 16384) zoom = 16384; - printmessage16("Zoom: %d",zoom); + _printmessage16("Zoom: %d",zoom); } if ((keystatus[buildkeys[BK_MOVEDOWN]] || (bstatus&32)) && (zoom > 8)) { @@ -2779,7 +2787,7 @@ SKIP: pos.y = mousyplc; } if (zoom < 8) zoom = 8; - printmessage16("Zoom: %d",zoom); + _printmessage16("Zoom: %d",zoom); } if (keystatus[0x22]) // G (grid on/off) @@ -2808,7 +2816,7 @@ SKIP: if (inside(mousxplc,mousyplc,i) == 1) { startwall = sector[i].wallptr; - endwall = startwall + sector[i].wallnum - 1; + endwall = startwall + sector[i].wallnum; for (j=startwall; j<=endwall; j++) { if (wall[j].nextsector == joinsector[0]) @@ -2817,7 +2825,7 @@ SKIP: if (j >= endwall && i != joinsector[0]) { - printmessage16("Join non-adjacent sectors? (Y/N)"); + _printmessage16("Join non-adjacent sectors? (Y/N)"); showframe(1); bflushchars(); ch = 0; while (keystatus[1] == 0) @@ -4131,7 +4139,7 @@ CANCEL: if (keystatus[1]) { keystatus[1] = 0; - printmessage16("(N)ew, (L)oad, (S)ave, save (A)s, (Q)uit"); + _printmessage16("(N)ew, (L)oad, (S)ave, save (A)s, (Q)uit"); // printext16(200L+248, ydim-STATUS2DSIZ+20L, 9, 0, "(U)ndo, (R)edo", 0); showframe(1); bflushchars(); @@ -4153,12 +4161,12 @@ CANCEL: { keystatus[1] = 0; bad = 0; - printmessage16(""); + // printmessage16(""); } else if (ch == 'n' || ch == 'N') //N { bad = 0; - printmessage16("Are you sure you want to start a new board? (Y/N)"); + _printmessage16("Are you sure you want to start a new board? (Y/N)"); showframe(1); bflushchars(); ch = 0; while (keystatus[1] == 0) @@ -4211,7 +4219,7 @@ CANCEL: break; } } - printmessage16(""); + // printmessage16(""); showframe(1); } else if (ch == 'l' || ch == 'L') //L @@ -4396,7 +4404,7 @@ CANCEL: Bsprintf(buffer,"Save as: ^011%s", boardfilename); if (totalclock & 32) Bstrcat(buffer,"_"); - printmessage16(buffer); + _printmessage16(buffer); showframe(1); if (handleevents()) @@ -4454,7 +4462,7 @@ CANCEL: if (!f) f = selectedboardfilename; else f++; } Bsprintf(buffer,"Saving to %s...",f); - printmessage16(buffer); + _printmessage16(buffer); showframe(1); fixspritesectors(); //Do this before saving! @@ -4472,7 +4480,7 @@ CANCEL: char *f; int32_t res; bad = 0; - printmessage16("Saving board..."); + _printmessage16("Saving board..."); showframe(1); fixspritesectors(); //Do this before saving! updatesector(startposx,startposy,&startsectnum); @@ -4493,7 +4501,7 @@ CANCEL: else if (ch == 'q' || ch == 'Q') //Q { bad = 0; - printmessage16("Are you sure you want to quit?"); + _printmessage16("Are you sure you want to quit?"); showframe(1); bflushchars(); while ((keystatus[1]|keystatus[0x2e]) == 0) @@ -4510,7 +4518,7 @@ CANCEL: { //QUIT! - printmessage16("Save changes?"); + _printmessage16("Save changes?"); showframe(1); while ((keystatus[1]|keystatus[0x2e]) == 0) { @@ -4566,7 +4574,7 @@ CANCEL: break; } } - printmessage16(""); + // printmessage16(""); showframe(1); } } @@ -5032,9 +5040,11 @@ void clearmidstatbar16(void) clearbuf((char *)(frameplace + (bytesperline*(ydim-STATUS2DSIZ+25L))),(bytesperline*(STATUS2DSIZ+2-(25<<1))) >> 2, 0x00000000l); else clearbuf((char *)(frameplace + (bytesperline*(ydim-overridepm16y+25L))),(bytesperline*(overridepm16y+2-(25<<1))) >> 2, 0x00000000l); - drawline16(0,ydim-STATUS2DSIZ,0,ydim-1,editorcolors[7]); - drawline16(xdim-1,ydim-STATUS2DSIZ,xdim-1,ydim-1,editorcolors[7]); - ydim16 = ydim-STATUS2DSIZ; + /* + drawline16(0,ydim-STATUS2DSIZ,0,ydim-1,editorcolors[7]); + drawline16(xdim-1,ydim-STATUS2DSIZ,xdim-1,ydim-1,editorcolors[7]); + */ + ydim16 = ydim-STATUS2DSIZ2; enddrawing(); } @@ -5097,12 +5107,15 @@ int32_t _getnumber16(char *namestart, int32_t num, int32_t maxnumber, char sign, ch = bgetchar(); Bsprintf(buffer,"%s^011%d",namestart,danum); + n = Bstrlen(buffer); if (totalclock & 32) Bstrcat(buffer,"_ "); - printmessage16(buffer); + _printmessage16(buffer); + if (func != NULL) { Bsprintf(buffer,"^011%s",(char *)func((int32_t)danum)); - printext16(200L-24, ydim-STATUS2DSIZ+20L, editorcolors[9], editorcolors[0], buffer, 0); + // printext16(200L-24, ydim-STATUS2DSIZ+20L, editorcolors[9], editorcolors[0], buffer, 0); + printext16(n<<3, ydim-STATUS2DSIZ+128, editorcolors[9], editorcolors[0], buffer,0); } showframe(1); @@ -5128,6 +5141,7 @@ int32_t _getnumber16(char *namestart, int32_t num, int32_t maxnumber, char sign, { oldnum = danum; asksave = 1; + printmessage16(buffer); break; } else if (ch == '-' && sign) // negate @@ -5315,9 +5329,11 @@ int32_t menuselect(void) if (!findfileshigh) findfileshigh=findfiles; begindrawing(); - printmessage16("Select map file with arrow keys and enter."); + _printmessage16("Select map file with arrow keys and enter."); enddrawing(); + ydim16 = ydim-STATUS2DSIZ2; + do { begindrawing(); @@ -5336,7 +5352,7 @@ int32_t menuselect(void) Bsnprintf(buffer,sizeof(buffer)-1,"(%d dirs, %d files) %s",numdirs,numfiles,selectedboardfilename); buffer[sizeof(buffer)-1] = 0; - printext16(1,ydim16-8-1,editorcolors[8],editorcolors[0],buffer,0); + printext16(8,ydim16-8-1,editorcolors[8],editorcolors[0],buffer,0); if (finddirshigh) { @@ -5427,7 +5443,7 @@ int32_t menuselect(void) else if (keystatus[0xc9]|keystatus[0xd1]) // page up/down { seeker = currentlist?findfileshigh:finddirshigh; - i = (ydim2d-STATUS2DSIZ-48)>>5/*3*/; //PK + i = (ydim2d-STATUS2DSIZ2-48)>>5/*3*/; //PK while (i>0) { @@ -5961,103 +5977,130 @@ void copysector(int16_t soursector, int16_t destsector, int16_t deststartwall, c void showsectordata(int16_t sectnum) { char snotbuf[80]; + int32_t col = 1, row = 0; + int32_t mode = (sectnum & 16384); + + if (mode) row = 2; + sectnum &= ~16384; Bsprintf(snotbuf,"^10Sector %d ^O(F7 to edit)",sectnum); - printext16(8,ydim-STATUS2DSIZ+32,editorcolors[11],-1,snotbuf,0); + printext16(8,ydim-(row*96)-STATUS2DSIZ+32,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Firstwall: %d",sector[sectnum].wallptr); - printext16(8,ydim-STATUS2DSIZ+48,editorcolors[11],-1,snotbuf,0); + printext16(8,ydim-(row*96)-STATUS2DSIZ+48,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Numberofwalls: %d",sector[sectnum].wallnum); - printext16(8,ydim-STATUS2DSIZ+56,editorcolors[11],-1,snotbuf,0); + printext16(8,ydim-(row*96)-STATUS2DSIZ+56,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Firstsprite: %d",headspritesect[sectnum]); - printext16(8,ydim-STATUS2DSIZ+64,editorcolors[11],-1,snotbuf,0); + printext16(8,ydim-(row*96)-STATUS2DSIZ+64,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Tags: %d, %d",sector[sectnum].hitag,sector[sectnum].lotag); - printext16(8,ydim-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,0); + printext16(8,ydim-(row*96)-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf," (0x%x), (0x%x)",sector[sectnum].hitag,sector[sectnum].lotag); - printext16(8,ydim-STATUS2DSIZ+80,editorcolors[11],-1,snotbuf,0); + printext16(8,ydim-(row*96)-STATUS2DSIZ+80,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Extra: %d",sector[sectnum].extra); - printext16(8,ydim-STATUS2DSIZ+88,editorcolors[11],-1,snotbuf,0); + printext16(8,ydim-(row*96)-STATUS2DSIZ+88,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Visibility: %d",sector[sectnum].visibility); - printext16(8,ydim-STATUS2DSIZ+96,editorcolors[11],-1,snotbuf,0); + printext16(8,ydim-(row*96)-STATUS2DSIZ+96,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Pixel height: %d",(sector[sectnum].floorz-sector[sectnum].ceilingz)>>8); - printext16(8,ydim-STATUS2DSIZ+104,editorcolors[11],-1,snotbuf,0); + printext16(8,ydim-(row*96)-STATUS2DSIZ+104,editorcolors[11],-1,snotbuf,2); - printext16(200,ydim-STATUS2DSIZ+32,editorcolors[11],-1,"^10CEILINGS:^O",0); + if (mode) + row--; + else col++; + + printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+32,editorcolors[11],-1,"^10CEILINGS:^O",2); Bsprintf(snotbuf,"Flags (hex): %x",sector[sectnum].ceilingstat); - printext16(200,ydim-STATUS2DSIZ+48,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+48,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"(X,Y)pan: %d, %d",sector[sectnum].ceilingxpanning,sector[sectnum].ceilingypanning); - printext16(200,ydim-STATUS2DSIZ+56,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+56,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Shade byte: %d",sector[sectnum].ceilingshade); - printext16(200,ydim-STATUS2DSIZ+64,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+64,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Z-coordinate: %d",sector[sectnum].ceilingz); - printext16(200,ydim-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Tile number: %d",sector[sectnum].ceilingpicnum); - printext16(200,ydim-STATUS2DSIZ+80,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+80,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Ceiling heinum: %d",sector[sectnum].ceilingheinum); - printext16(200,ydim-STATUS2DSIZ+88,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+88,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Palookup number: %d",sector[sectnum].ceilingpal); - printext16(200,ydim-STATUS2DSIZ+96,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+96,editorcolors[11],-1,snotbuf,2); - printext16(400,ydim-STATUS2DSIZ+32,editorcolors[11],-1,"^10FLOORS:^O",0); + if (mode) + row--; + else col++; + + printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+32,editorcolors[11],-1,"^10FLOORS:^O",2); Bsprintf(snotbuf,"Flags (hex): %x",sector[sectnum].floorstat); - printext16(400,ydim-STATUS2DSIZ+48,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+48,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"(X,Y)pan: %d, %d",sector[sectnum].floorxpanning,sector[sectnum].floorypanning); - printext16(400,ydim-STATUS2DSIZ+56,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+56,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Shade byte: %d",sector[sectnum].floorshade); - printext16(400,ydim-STATUS2DSIZ+64,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+64,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Z-coordinate: %d",sector[sectnum].floorz); - printext16(400,ydim-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Tile number: %d",sector[sectnum].floorpicnum); - printext16(400,ydim-STATUS2DSIZ+80,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+80,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Floor heinum: %d",sector[sectnum].floorheinum); - printext16(400,ydim-STATUS2DSIZ+88,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+88,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Palookup number: %d",sector[sectnum].floorpal); - printext16(400,ydim-STATUS2DSIZ+96,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*96)-STATUS2DSIZ+96,editorcolors[11],-1,snotbuf,2); } void showwalldata(int16_t wallnum) { int32_t dax, day, dist; char snotbuf[80]; + int32_t col = 1, row = 0; + int32_t mode = (wallnum & 16384); + + if (mode) row = 2; + wallnum &= ~16384; Bsprintf(snotbuf,"^10Wall %d ^O(F8 to edit)",wallnum); - printext16(8,ydim-STATUS2DSIZ+32,editorcolors[11],-1,snotbuf,0); + printext16(8,ydim-(row*80)-STATUS2DSIZ+32,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"X-coordinate: %d",wall[wallnum].x); - printext16(8,ydim-STATUS2DSIZ+48,editorcolors[11],-1,snotbuf,0); + printext16(8,ydim-(row*80)-STATUS2DSIZ+48,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Y-coordinate: %d",wall[wallnum].y); - printext16(8,ydim-STATUS2DSIZ+56,editorcolors[11],-1,snotbuf,0); + printext16(8,ydim-(row*80)-STATUS2DSIZ+56,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Point2: %d",wall[wallnum].point2); - printext16(8,ydim-STATUS2DSIZ+64,editorcolors[11],-1,snotbuf,0); - Bsprintf(snotbuf,"Sector: %d",sectorofwall(wallnum)); - printext16(8,ydim-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,0); + printext16(8,ydim-(row*80)-STATUS2DSIZ+64,editorcolors[11],-1,snotbuf,2); + Bsprintf(snotbuf,"Sector: ^010%d",sectorofwall(wallnum)); + printext16(8,ydim-(row*80)-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Tags: %d, %d",wall[wallnum].hitag,wall[wallnum].lotag); - printext16(8,ydim-STATUS2DSIZ+88,editorcolors[11],-1,snotbuf,0); + printext16(8,ydim-(row*80)-STATUS2DSIZ+88,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf," (0x%x), (0x%x)",wall[wallnum].hitag,wall[wallnum].lotag); - printext16(8,ydim-STATUS2DSIZ+96,editorcolors[11],-1,snotbuf,0); + printext16(8,ydim-(row*80)-STATUS2DSIZ+96,editorcolors[11],-1,snotbuf,2); - printext16(200,ydim-STATUS2DSIZ+32,editorcolors[11],-1,names[wall[wallnum].picnum],0); + if (mode) + row--; + else col++; + + Bsprintf(snotbuf,"^10%s^O",names[wall[wallnum].picnum]); + printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+32,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Flags (hex): %x",wall[wallnum].cstat); - printext16(200,ydim-STATUS2DSIZ+48,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+48,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Shade: %d",wall[wallnum].shade); - printext16(200,ydim-STATUS2DSIZ+56,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+56,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Pal: %d",wall[wallnum].pal); - printext16(200,ydim-STATUS2DSIZ+64,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+64,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"(X,Y)repeat: %d, %d",wall[wallnum].xrepeat,wall[wallnum].yrepeat); - printext16(200,ydim-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"(X,Y)pan: %d, %d",wall[wallnum].xpanning,wall[wallnum].ypanning); - printext16(200,ydim-STATUS2DSIZ+80,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+80,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Tile number: %d",wall[wallnum].picnum); - printext16(200,ydim-STATUS2DSIZ+88,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+88,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"OverTile number: %d",wall[wallnum].overpicnum); - printext16(200,ydim-STATUS2DSIZ+96,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+96,editorcolors[11],-1,snotbuf,2); + + if (mode) + row--; + else col++; Bsprintf(snotbuf,"nextsector: %d",wall[wallnum].nextsector); - printext16(400,ydim-STATUS2DSIZ+48,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+48,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"nextwall: %d",wall[wallnum].nextwall); - printext16(400,ydim-STATUS2DSIZ+56,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+56,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Extra: %d",wall[wallnum].extra); - printext16(400,ydim-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,2); dax = wall[wallnum].x-wall[wall[wallnum].point2].x; day = wall[wallnum].y-wall[wall[wallnum].point2].y; @@ -6066,65 +6109,78 @@ void showwalldata(int16_t wallnum) // TX 20050102 I'm not sure what unit dist<<4 is supposed to be, but dist itself is correct in terms of game coordinates as one would expect Bsprintf(snotbuf,"Wall length: %d",dist); - printext16(400,ydim-STATUS2DSIZ+96,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+96,editorcolors[11],-1,snotbuf,2); dax = (int32_t)sectorofwall(wallnum); Bsprintf(snotbuf,"Pixel height: %d",(sector[dax].floorz-sector[dax].ceilingz)>>8); - printext16(400,ydim-STATUS2DSIZ+104,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+104,editorcolors[11],-1,snotbuf,2); } void showspritedata(int16_t spritenum) { char snotbuf[80]; + int32_t col = 1, row = 0; + int32_t mode = (spritenum & 16384); + + if (mode) row = 2; + spritenum &= ~16384; Bsprintf(snotbuf,"^10Sprite %d ^O(F8 to edit)",spritenum); - printext16(8,ydim-STATUS2DSIZ+32,editorcolors[11],-1,snotbuf,0); + printext16(8,ydim-(row*80)-STATUS2DSIZ+32,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"X-coordinate: %d",sprite[spritenum].x); - printext16(8,ydim-STATUS2DSIZ+48,editorcolors[11],-1,snotbuf,0); + printext16(8,ydim-(row*80)-STATUS2DSIZ+48,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Y-coordinate: %d",sprite[spritenum].y); - printext16(8,ydim-STATUS2DSIZ+56,editorcolors[11],-1,snotbuf,0); + printext16(8,ydim-(row*80)-STATUS2DSIZ+56,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Z-coordinate: %d",sprite[spritenum].z); - printext16(8,ydim-STATUS2DSIZ+64,editorcolors[11],-1,snotbuf,0); + printext16(8,ydim-(row*80)-STATUS2DSIZ+64,editorcolors[11],-1,snotbuf,2); - Bsprintf(snotbuf,"Sectnum: %d",sprite[spritenum].sectnum); - printext16(8,ydim-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,0); + Bsprintf(snotbuf,"Sectnum: ^010%d",sprite[spritenum].sectnum); + printext16(8,ydim-(row*80)-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Statnum: %d",sprite[spritenum].statnum); - printext16(8,ydim-STATUS2DSIZ+80,editorcolors[11],-1,snotbuf,0); + printext16(8,ydim-(row*80)-STATUS2DSIZ+80,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Tags: %d, %d",sprite[spritenum].hitag,sprite[spritenum].lotag); - printext16(8,ydim-STATUS2DSIZ+96,editorcolors[11],-1,snotbuf,0); + printext16(8,ydim-(row*80)-STATUS2DSIZ+96,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf," (0x%x), (0x%x)",sprite[spritenum].hitag,sprite[spritenum].lotag); - printext16(8,ydim-STATUS2DSIZ+104,editorcolors[11],-1,snotbuf,0); + printext16(8,ydim-(row*80)-STATUS2DSIZ+104,editorcolors[11],-1,snotbuf,2); + + if (mode) + row--; + else col++; Bsprintf(snotbuf,"^10%s^O",names[sprite[spritenum].picnum]); - printext16(200,ydim-STATUS2DSIZ+32,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+32,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Flags (hex): %x",sprite[spritenum].cstat); - printext16(200,ydim-STATUS2DSIZ+48,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+48,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Shade: %d",sprite[spritenum].shade); - printext16(200,ydim-STATUS2DSIZ+56,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+56,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Pal: %d",sprite[spritenum].pal); - printext16(200,ydim-STATUS2DSIZ+64,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+64,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"(X,Y)repeat: %d, %d",sprite[spritenum].xrepeat,sprite[spritenum].yrepeat); - printext16(200,ydim-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"(X,Y)offset: %d, %d",sprite[spritenum].xoffset,sprite[spritenum].yoffset); - printext16(200,ydim-STATUS2DSIZ+80,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+80,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Tile number: %d",sprite[spritenum].picnum); - printext16(200,ydim-STATUS2DSIZ+88,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*72)-STATUS2DSIZ+88,editorcolors[11],-1,snotbuf,2); + + if (mode) + row--; + else col++; Bsprintf(snotbuf,"Angle (2048 degrees): %d",sprite[spritenum].ang); - printext16(400,ydim-STATUS2DSIZ+48,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+48,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"X-Velocity: %d",sprite[spritenum].xvel); - printext16(400,ydim-STATUS2DSIZ+56,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+56,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Y-Velocity: %d",sprite[spritenum].yvel); - printext16(400,ydim-STATUS2DSIZ+64,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+64,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Z-Velocity: %d",sprite[spritenum].zvel); - printext16(400,ydim-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Owner: %d",sprite[spritenum].owner); - printext16(400,ydim-STATUS2DSIZ+80,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+80,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Clipdist: %d",sprite[spritenum].clipdist); - printext16(400,ydim-STATUS2DSIZ+88,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+88,editorcolors[11],-1,snotbuf,2); Bsprintf(snotbuf,"Extra: %d",sprite[spritenum].extra); - printext16(400,ydim-STATUS2DSIZ+96,editorcolors[11],-1,snotbuf,0); + printext16(8+((col-1)*200),ydim-(row*80)-STATUS2DSIZ+96,editorcolors[11],-1,snotbuf,2); } void keytimerstuff(void) @@ -6162,37 +6218,41 @@ void keytimerstuff(void) void _printmessage16(const char *fmt, ...) { int32_t i, ybase; - char snotbuf[60]; - char tmpstr[64]; + char snotbuf[100]; + char tmpstr[104]; va_list va; va_start(va, fmt); - Bvsnprintf(tmpstr, 64, fmt, va); + Bvsnprintf(tmpstr, 104, fmt, va); va_end(va); i = 0; - while ((tmpstr[i] != 0) && (i < 54)) + while ((tmpstr[i] != 0) && (i < 94)) { snotbuf[i] = tmpstr[i]; i++; } - while (i < 54) + while (i < 94) { snotbuf[i] = 32; i++; } - snotbuf[54] = 0; + snotbuf[94] = 0; + if (lastpm16time == totalclock) + Bstrcpy(lastpm16buf, snotbuf); begindrawing(); - ybase = (overridepm16y >= 0) ? ydim-overridepm16y : ydim-STATUS2DSIZ; - printext16(200L-24, ybase+8L, editorcolors[9], editorcolors[0], snotbuf, 0); - i = 0; - while (i < 54) - { - snotbuf[i] = 32; - i++; - } - snotbuf[54] = 0; - printext16(200L-24, ybase+20L, editorcolors[9], editorcolors[0], snotbuf, 0); + ybase = (overridepm16y >= 0) ? ydim-overridepm16y : ydim-STATUS2DSIZ+128-8; + printext16((overridepm16y >= 0) ? 200L-24 : 8, ybase+8L, editorcolors[9], editorcolors[0], snotbuf, 0); + /* + i = 0; + while (i < 54) + { + snotbuf[i] = 32; + i++; + } + snotbuf[54] = 0; + printext16(200L-24, ybase+20L, editorcolors[9], editorcolors[0], snotbuf, 0); + */ enddrawing(); } diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index f7cfdc340..2592417bf 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -10941,12 +10941,12 @@ void qsetmodeany(int32_t daxdim, int32_t daydim) // setvgapalette(); - ydim16 = yres - STATUS2DSIZ; + ydim16 = yres - STATUS2DSIZ2; halfxdim16 = xres >> 1; - midydim16 = scale(200,yres,480); + midydim16 = ydim16 >> 1; // scale(200,yres,480); begindrawing(); //{{{ - clearbuf((char *)(frameplace + (ydim16*bytesperline)), (bytesperline*STATUS2DSIZ) >> 2, 0x08080808l); + clearbuf((char *)(frameplace + (ydim16*bytesperline)), (bytesperline*STATUS2DSIZ2) >> 2, 0x08080808l); clearbuf((char *)frameplace, (ydim16*bytesperline) >> 2, 0L); enddrawing(); //}}} } @@ -10966,7 +10966,7 @@ void clear2dscreen(void) if (qsetmode == 350) clearsz = 350; else { - if (ydim16 <= yres-STATUS2DSIZ) clearsz = yres - STATUS2DSIZ; + if (ydim16 <= yres-STATUS2DSIZ2) clearsz = yres - STATUS2DSIZ2; else clearsz = yres; } clearbuf((char *)frameplace, (bytesperline*clearsz) >> 2, 0); @@ -11463,7 +11463,8 @@ int32_t printext16(int32_t xpos, int32_t ypos, int16_t col, int16_t backcol, cha char smallbuf[4]; stx = xpos; - if (fontsize) { fontptr = smalltextfont; charxsiz = 4; } + if (fontsize & 2) printext16(xpos+1, ypos+1, 0, -1, name, (fontsize & ~2) | 4); + if (fontsize & 1) { fontptr = smalltextfont; charxsiz = 4; } else { fontptr = textfont; charxsiz = 8; } begindrawing(); //{{{ @@ -11474,8 +11475,10 @@ int32_t printext16(int32_t xpos, int32_t ypos, int16_t col, int16_t backcol, cha i++; if (name[i] == 'O') // ^O resets formatting { - col = editorcolors[ocol]; - backcol = editorcolors[obackcol]; + if (fontsize & 4) continue; + + col = ocol; + backcol = obackcol; continue; } if (isdigit(name[i])) @@ -11500,7 +11503,8 @@ int32_t printext16(int32_t xpos, int32_t ypos, int16_t col, int16_t backcol, cha smallbuf[0] = name[i]; smallbuf[1] = '\0'; } - col = editorcolors[atol(smallbuf)]; + if (!(fontsize & 4)) + col = editorcolors[atol(smallbuf)]; if (name[i+1] == ',' && isdigit(name[i+2])) { @@ -11525,19 +11529,21 @@ int32_t printext16(int32_t xpos, int32_t ypos, int16_t col, int16_t backcol, cha smallbuf[0] = name[i]; smallbuf[1] = '\0'; } - backcol = editorcolors[atol(smallbuf)]; + + if (!(fontsize & 4)) + backcol = editorcolors[atol(smallbuf)]; } continue; } } letptr = &fontptr[name[i]<<3]; - ptr = (char *)(bytesperline*(ypos+7)+(stx-fontsize)+frameplace); + ptr = (char *)(bytesperline*(ypos+7)+(stx-(fontsize&1))+frameplace); for (y=7; y>=0; y--) { for (x=charxsiz-1; x>=0; x--) { - if (letptr[y]&pow2char[7-fontsize-x]) + if (letptr[y]&pow2char[7-(fontsize&1)-x]) ptr[x] = (uint8_t)col; else if (backcol >= 0) ptr[x] = (uint8_t)backcol; diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 13997d6a8..1a764f26a 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -49,8 +49,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #endif -#define BUILDDATE " 20090426" -#define VERSION " 1.2.0devel" +#define BUILDDATE " 20090430" +#define VERSION " 1.3.0devel" static int32_t floor_over_floor; @@ -1599,7 +1599,7 @@ ENDFOR1: ydim16=ydim; drawline16(0,ydim-STATUS2DSIZ,xdim-1,ydim-STATUS2DSIZ,editorcolors[1]); ydim16=i; - printmessage16(""); + // printmessage16(""); showframe(1); keystatus[KEYSC_ESC] = keystatus[KEYSC_Q] = keystatus[KEYSC_F1] = 0; @@ -1943,7 +1943,7 @@ static void SoundDisplay() ydim16=ydim; drawline16(0,ydim-STATUS2DSIZ,xdim-1,ydim-STATUS2DSIZ,editorcolors[1]); ydim16=i; - printmessage16(""); + // printmessage16(""); showframe(1); FX_StopAllSounds(); @@ -7185,7 +7185,7 @@ static void Keys2d(void) int32_t i=0, j,k; int32_t smooshyalign,changedir; static int32_t repeatcountx=0,repeatcounty=0; - static int32_t opointhighlight=-1, olinehighlight=-1, ocursectornum=-1; + /* for(i=0;i<0x50;i++) {if(keystatus[i]==1) {Bsprintf(tempbuf,"key %d",i); printmessage16(tempbuf); @@ -7193,74 +7193,91 @@ static void Keys2d(void) */ Bsprintf(tempbuf, "Mapster32" VERSION); - printext16(9L,ydim2d-STATUS2DSIZ+9L,editorcolors[4],-1,tempbuf,0); - printext16(8L,ydim2d-STATUS2DSIZ+8L,editorcolors[12],-1,tempbuf,0); + printext16(xdim2d-(Bstrlen(tempbuf)<<3)-3,ydim2d-STATUS2DSIZ2+10L,editorcolors[4],-1,tempbuf,0); + printext16(xdim2d-(Bstrlen(tempbuf)<<3)-2,ydim2d-STATUS2DSIZ2+9L,editorcolors[12],-1,tempbuf,0); + + cursectornum = -1; + + for (i=0; i getmessagetimeoff) && (totalclock > (lastpm16time + 120*3))) - { - if (pointhighlight >= 16384) - { - char tmpbuf[2048]; - i = pointhighlight-16384; - if (strlen(names[sprite[i].picnum]) > 0) - { - if (sprite[i].picnum==SECTOREFFECTOR) - Bsprintf(tmpbuf,"Sprite %d %s, hi:%d ex:%d",i,SectorEffectorText(i),sprite[i].hitag,sprite[i].extra); - else Bsprintf(tmpbuf,"Sprite %d %s: lo:%d hi:%d ex:%d",i,names[sprite[i].picnum],sprite[i].lotag,sprite[i].hitag,sprite[i].extra); - } - else Bsprintf(tmpbuf,"Sprite %d picnum %d: lo:%d hi:%d ex:%d",i,sprite[i].picnum,sprite[i].lotag,sprite[i].hitag,sprite[i].extra); - _printmessage16(tmpbuf); - } - else if ((linehighlight >= 0) && (sectorofwall(linehighlight) == cursectornum)) - { - int32_t dax, day, dist; - dax = wall[linehighlight].x-wall[wall[linehighlight].point2].x; - day = wall[linehighlight].y-wall[wall[linehighlight].point2].y; - dist = ksqrt(dax*dax+day*day); - Bsprintf(tempbuf,"Wall %d: length:%d lo:%d hi:%d ex:%d",linehighlight,dist,wall[linehighlight].lotag,wall[linehighlight].hitag,wall[linehighlight].extra); - _printmessage16(tempbuf); - } - else if (cursectornum >= 0) - { - Bsprintf(tempbuf,"Sector %d: lo:%d hi:%d ex:%d",cursectornum,sector[cursectornum].lotag,sector[cursectornum].hitag,sector[cursectornum].extra); - _printmessage16(tempbuf); - } - else _printmessage16(""); - } - if (bstatus&1 || opointhighlight != pointhighlight || olinehighlight != linehighlight || ocursectornum != cursectornum) +// if (bstatus&1 || opointhighlight != pointhighlight || olinehighlight != linehighlight || ocursectornum != cursectornum) + if (keystatus[KEYSC_TAB]) //TAB + { + if (cursectornum >= 0) + showsectordata((int16_t)i+16384); +// keystatus[KEYSC_TAB] = 0; + } + else { if (pointhighlight >= 16384) { i = pointhighlight-16384; - clearmidstatbar16(); - showspritedata((int16_t)i); +// clearmidstatbar16(); + showspritedata((int16_t)i+16384); } else if ((linehighlight >= 0) && (bstatus&1 || sectorofwall(linehighlight) == cursectornum)) { - clearmidstatbar16(); - showwalldata((int16_t)linehighlight); +// clearmidstatbar16(); + showwalldata((int16_t)linehighlight+16384); } else if (cursectornum >= 0) { - clearmidstatbar16(); - showsectordata((int16_t)cursectornum); +// clearmidstatbar16(); + showsectordata((int16_t)cursectornum+16384); } - else clearmidstatbar16(); - opointhighlight = pointhighlight; - olinehighlight = linehighlight; - ocursectornum = cursectornum; +// else clearmidstatbar16(); + if (totalclock < (lastpm16time + 120*3)) + _printmessage16(lastpm16buf); } + /* + if ((totalclock > getmessagetimeoff) && (totalclock > (lastpm16time + 120*3))) + { + if (pointhighlight >= 16384) + { + char tmpbuf[2048]; + i = pointhighlight-16384; + if (strlen(names[sprite[i].picnum]) > 0) + { + if (sprite[i].picnum==SECTOREFFECTOR) + Bsprintf(tmpbuf,"Sprite %d %s, hi:%d ex:%d",i,SectorEffectorText(i),sprite[i].hitag,sprite[i].extra); + else Bsprintf(tmpbuf,"Sprite %d %s: lo:%d hi:%d ex:%d",i,names[sprite[i].picnum],sprite[i].lotag,sprite[i].hitag,sprite[i].extra); + } + else Bsprintf(tmpbuf,"Sprite %d picnum %d: lo:%d hi:%d ex:%d",i,sprite[i].picnum,sprite[i].lotag,sprite[i].hitag,sprite[i].extra); + _printmessage16(tmpbuf); + } + else if ((linehighlight >= 0) && (sectorofwall(linehighlight) == cursectornum)) + { + int32_t dax, day, dist; + dax = wall[linehighlight].x-wall[wall[linehighlight].point2].x; + day = wall[linehighlight].y-wall[wall[linehighlight].point2].y; + dist = ksqrt(dax*dax+day*day); + Bsprintf(tempbuf,"Wall %d: length:%d lo:%d hi:%d ex:%d",linehighlight,dist,wall[linehighlight].lotag,wall[linehighlight].hitag,wall[linehighlight].extra); + _printmessage16(tempbuf); + } + else if (cursectornum >= 0) + { + Bsprintf(tempbuf,"Sector %d: lo:%d hi:%d ex:%d",cursectornum,sector[cursectornum].lotag,sector[cursectornum].hitag,sector[cursectornum].extra); + _printmessage16(tempbuf); + } + else _printmessage16(""); + } + */ + if (keystatus[KEYSC_QUOTE] && keystatus[KEYSC_Z]) // ' z { keystatus[KEYSC_Z] = 0; editorzrange[0]=getnumber16("Upper Z range: ",editorzrange[0],INT32_MAX,1); editorzrange[1]=getnumber16("Lower Z range: ",editorzrange[1],INT32_MAX,1); - printmessage16(""); + // printmessage16(""); } if (keystatus[0x14]) // T (tag) @@ -7298,7 +7315,7 @@ static void Keys2d(void) clearmidstatbar16(); showwalldata((int16_t)i); } - printmessage16(""); + // printmessage16(""); } else { @@ -7314,7 +7331,7 @@ static void Keys2d(void) showsectordata((int16_t)i); break; } - printmessage16(""); + // printmessage16(""); } } @@ -7397,7 +7414,7 @@ static void Keys2d(void) clearmidstatbar16(); showwalldata((int16_t)i); } - printmessage16(""); + // printmessage16(""); } else { @@ -7410,7 +7427,7 @@ static void Keys2d(void) showsectordata((int16_t)i); break; } - printmessage16(""); + // printmessage16(""); } } @@ -10343,7 +10360,6 @@ void ExtCheckKeys(void) } } readmousebstatus(&bstatus); - Keys2d3d(); if (qsetmode == 200) //In 3D mode { Keys3d(); @@ -10355,6 +10371,7 @@ void ExtCheckKeys(void) return; } Keys2d(); + Keys2d3d(); } void faketimerhandler(void) @@ -10510,7 +10527,7 @@ static void EditSectorData(int16_t sectnum) char disptext[80]; char edittext[80]; int32_t col=1, row=0, rowmax = 6, dispwidth = 24, editval = 0, i = -1; - int32_t xpos = 200, ypos = ydim-STATUS2DSIZ+48; + int32_t xpos = 208, ypos = ydim-STATUS2DSIZ+48; disptext[dispwidth] = 0; clearmidstatbar16(); @@ -10524,7 +10541,7 @@ static void EditSectorData(int16_t sectnum) if (quitevent) quitevent = 0; } idle(); - printmessage16("Edit mode, press to exit"); + _printmessage16("Edit mode, press to exit"); if (keystatus[KEYSC_DOWN]) { if (row < rowmax) @@ -10549,7 +10566,7 @@ static void EditSectorData(int16_t sectnum) { printext16(xpos,ypos+row*8,editorcolors[11],editorcolors[0],disptext,0); col = 1; - xpos = 200; + xpos = 208; rowmax = 6; dispwidth = 24; disptext[dispwidth] = 0; @@ -10563,7 +10580,7 @@ static void EditSectorData(int16_t sectnum) { printext16(xpos,ypos+row*8,editorcolors[11],editorcolors[0],disptext,0); col = 2; - xpos = 400; + xpos = 408; rowmax = 6; dispwidth = 24; disptext[dispwidth] = 0; @@ -10737,7 +10754,7 @@ static void EditSectorData(int16_t sectnum) showframe(1); } printext16(xpos,ypos+row*8,editorcolors[11],editorcolors[0],disptext,0); - printmessage16(""); + // printmessage16(""); enddrawing(); showframe(1); keystatus[KEYSC_ESC] = 0; @@ -10748,7 +10765,7 @@ static void EditWallData(int16_t wallnum) char disptext[80]; char edittext[80]; int32_t row=0, dispwidth = 24, editval = 0, i = -1; - int32_t xpos = 200, ypos = ydim-STATUS2DSIZ+48; + int32_t xpos = 208, ypos = ydim-STATUS2DSIZ+48; disptext[dispwidth] = 0; clearmidstatbar16(); @@ -10761,7 +10778,7 @@ static void EditWallData(int16_t wallnum) if (quitevent) quitevent = 0; } idle(); - printmessage16("Edit mode, press to exit"); + _printmessage16("Edit mode, press to exit"); if (keystatus[KEYSC_DOWN]) { if (row < 6) @@ -10863,14 +10880,14 @@ static void EditWallData(int16_t wallnum) { editval = 0; //showwalldata(wallnum); - //printmessage16(""); + //// printmessage16(""); } //enddrawing(); showframe(1); } //begindrawing(); printext16(xpos,ypos+row*8,editorcolors[11],editorcolors[0],disptext,0); - printmessage16(""); + // printmessage16(""); enddrawing(); showframe(1); keystatus[KEYSC_ESC] = 0; @@ -10895,7 +10912,7 @@ static void EditSpriteData(int16_t spritenum) if (quitevent) quitevent = 0; } idle(); - printmessage16("Edit mode, press to exit"); + _printmessage16("Edit mode, press to exit"); if (keystatus[KEYSC_DOWN]) { if (row < rowmax) @@ -10933,7 +10950,7 @@ static void EditSpriteData(int16_t spritenum) { printext16(xpos,ypos+row*8,editorcolors[11],editorcolors[0],disptext,0); col = 1; - xpos = 200; + xpos = 208; rowmax = 5; dispwidth = 24; disptext[dispwidth] = 0; @@ -10951,7 +10968,7 @@ static void EditSpriteData(int16_t spritenum) { printext16(xpos,ypos+row*8,editorcolors[11],editorcolors[0],disptext,0); col = 1; - xpos = 200; + xpos = 208; rowmax = 5; dispwidth = 24; disptext[dispwidth] = 0; @@ -10962,7 +10979,7 @@ static void EditSpriteData(int16_t spritenum) { printext16(xpos,ypos+row*8,editorcolors[11],editorcolors[0],disptext,0); col = 2; - xpos = 400; + xpos = 408; rowmax = 6; dispwidth = 26; disptext[dispwidth] = 0; @@ -11220,7 +11237,7 @@ static void EditSpriteData(int16_t spritenum) } begindrawing(); printext16(xpos,ypos+row*8,editorcolors[11],editorcolors[0],disptext,0); - printmessage16(""); + // printmessage16(""); enddrawing(); showframe(1); keystatus[KEYSC_ESC] = 0;