Widescreen-friendly Mapster32 2D mode

git-svn-id: https://svn.eduke32.com/eduke32@1359 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2009-05-01 06:35:27 +00:00
parent f3fbf8d9a3
commit 0ee75ced2a
5 changed files with 328 additions and 241 deletions

View file

@ -559,6 +559,8 @@ typedef struct s_point2d {
int32_t wallvisible(int16_t wallnum); int32_t wallvisible(int16_t wallnum);
#define STATUS2DSIZ 144 #define STATUS2DSIZ 144
#define STATUS2DSIZ2 26
void qsetmode640350(void); void qsetmode640350(void);
void qsetmode640480(void); void qsetmode640480(void);
void qsetmodeany(int32_t,int32_t); void qsetmodeany(int32_t,int32_t);

View file

@ -92,6 +92,8 @@ void _printmessage16(const char *fmt, ...);
#define printmessage16(fmt, ...) lastpm16time = totalclock, _printmessage16(fmt, ## __VA_ARGS__) #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); 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); int32_t getpointhighlight(int32_t xplc, int32_t yplc, int32_t point);

View file

@ -115,7 +115,7 @@ int32_t osearchx, osearchy; //old search input
extern int16_t pointhighlight, linehighlight, highlightcnt; extern int16_t pointhighlight, linehighlight, highlightcnt;
int16_t grid = 3, gridlock = 1, showtags = 1; int16_t grid = 3, gridlock = 1, showtags = 1;
int32_t zoom = 768, gettilezoom = 1; int32_t zoom = 768, gettilezoom = 1;
int32_t lastpm16time; int32_t lastpm16time = 0;
int32_t numsprites; int32_t numsprites;
extern int32_t mapversion; extern int32_t mapversion;
@ -175,6 +175,8 @@ int32_t pk_turnaccel=16;
int32_t pk_turndecel=12; int32_t pk_turndecel=12;
int32_t pk_uedaccel=3; int32_t pk_uedaccel=3;
char lastpm16buf[60];
char changechar(char dachar, int32_t dadir, char smooshyalign, char boundcheck); 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 adjustmark(int32_t *xplc, int32_t *yplc, int16_t danumwalls);
int32_t checkautoinsert(int32_t dax, int32_t day, 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; ydim2d = ydim;
begindrawing(); //{{{ 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); clearbuf((char *)frameplace, (ydim16*bytesperline) >> 2, 0L);
ydim16 = ydim; 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-1,xdim-1,ydim-1,1);
drawline16(0,ydim-STATUS2DSIZ,0,ydim-1,1); drawline16(0,ydim-STATUS2DSIZ,0,ydim-1,1);
drawline16(xdim-1,ydim-STATUS2DSIZ,xdim-1,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(192-24,ydim-STATUS2DSIZ,192-24,ydim-STATUS2DSIZ+24,1);
drawline16(0,ydim-1-20,xdim-1,ydim-1-20,1); drawline16(0,ydim-1-20,xdim-1,ydim-1-20,1);
drawline16(256,ydim-1-20,256,ydim-1,1); */ drawline16(256,ydim-1-20,256,ydim-1,1); */
ydim16 = ydim-STATUS2DSIZ; ydim16 = ydim-STATUS2DSIZ2;
enddrawing(); //}}} enddrawing(); //}}}
return OSDCMD_OK; return OSDCMD_OK;
} }
@ -764,7 +766,7 @@ void editinput(void)
if (keystatus[0x44]) if (keystatus[0x44])
{ {
memset(spriteext, 0, sizeof(spriteext_t) * MAXSPRITES); 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 #ifdef POLYMER
staticlightcount = 0; staticlightcount = 0;
#endif #endif
@ -1158,15 +1160,15 @@ void overheadeditor(void)
osearchy = searchy; osearchy = searchy;
searchx = scale(searchx,xdim2d,xdimgame); searchx = scale(searchx,xdim2d,xdimgame);
searchy = scale(searchy,ydim2d-STATUS2DSIZ,ydimgame); searchy = scale(searchy,ydim2d-STATUS2DSIZ2,ydimgame);
oposz = pos.z; oposz = pos.z;
begindrawing(); //{{{ 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); clearbuf((char *)frameplace, (ydim16*bytesperline) >> 2, 0L);
ydim16 = ydim; 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-1,xdim-1,ydim-1,1);
drawline16(0,ydim-STATUS2DSIZ,0,ydim-1,1); drawline16(0,ydim-STATUS2DSIZ,0,ydim-1,1);
drawline16(xdim-1,ydim-STATUS2DSIZ,xdim-1,ydim-1,1); drawline16(xdim-1,ydim-STATUS2DSIZ,xdim-1,ydim-1,1);
@ -1181,7 +1183,7 @@ void overheadeditor(void)
// printmessage16("Version: "VERSION); // printmessage16("Version: "VERSION);
// drawline16(0,ydim-1-20,xdim-1,ydim-1-20,1); // drawline16(0,ydim-1-20,xdim-1,ydim-1-20,1);
// drawline16(256,ydim-1-20,256,ydim-1,1); // drawline16(256,ydim-1-20,256,ydim-1,1);
ydim16 = ydim-STATUS2DSIZ; ydim16 = ydim-STATUS2DSIZ2;
enddrawing(); //}}} enddrawing(); //}}}
pag = 0; pag = 0;
@ -1308,7 +1310,7 @@ void overheadeditor(void)
wall[newnumwalls].y = day; wall[newnumwalls].y = day;
} }
ydim16 = ydim - STATUS2DSIZ; ydim16 = ydim - STATUS2DSIZ2;
tempint = numwalls; tempint = numwalls;
numwalls = newnumwalls; numwalls = newnumwalls;
@ -1328,7 +1330,7 @@ void overheadeditor(void)
if (graphicsmode == 2) if (graphicsmode == 2)
totalclocklock = totalclock; 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; yxaspect = i;
xyaspect = ii; xyaspect = ii;
} }
@ -1498,7 +1500,7 @@ void overheadeditor(void)
for (i=0; i<highlightsectorcnt; i++) for (i=0; i<highlightsectorcnt; i++)
fillsector(highlightsector[i],2); fillsector(highlightsector[i],2);
if (keystatus[0x2a]) if (keystatus[0x2a]) // FIXME
{ {
drawlinepat = 0x00ff00ff; drawlinepat = 0x00ff00ff;
drawline16(searchx,0,searchx,ydim2d-1,editorcolors[15]); drawline16(searchx,0,searchx,ydim2d-1,editorcolors[15]);
@ -1510,9 +1512,9 @@ void overheadeditor(void)
if ((searchx+i) < (xdim2d-1)) if ((searchx+i) < (xdim2d-1))
i = 0; i = 0;
else i = (searchx+i)-(xdim2d-1); else i = (searchx+i)-(xdim2d-1);
if ((searchy+16) < (ydim2d-STATUS2DSIZ-1)) if ((searchy+16) < (ydim2d-STATUS2DSIZ2-1))
j = 0; j = 0;
else j = (searchy+16)-(ydim2d-STATUS2DSIZ-1); else j = (searchy+16)-(ydim2d-STATUS2DSIZ2-1);
printext16(searchx+6-i,searchy+6-j,editorcolors[11],-1,tempbuf,0); printext16(searchx+6-i,searchy+6-j,editorcolors[11],-1,tempbuf,0);
} }
drawline16(searchx,0,searchx,8,editorcolors[15]); drawline16(searchx,0,searchx,8,editorcolors[15]);
@ -2098,7 +2100,7 @@ void overheadeditor(void)
{ {
ydim16 = STATUS2DSIZ; ydim16 = STATUS2DSIZ;
ExtShowSectorData((int16_t)i); ExtShowSectorData((int16_t)i);
ydim16 = ydim-STATUS2DSIZ; ydim16 = ydim-STATUS2DSIZ2;
break; break;
} }
} }
@ -2112,7 +2114,7 @@ void overheadeditor(void)
ydim16 = STATUS2DSIZ; ydim16 = STATUS2DSIZ;
ExtShowSpriteData((int16_t)i); ExtShowSpriteData((int16_t)i);
ydim16 = ydim-STATUS2DSIZ; ydim16 = ydim-STATUS2DSIZ2;
} }
else if (linehighlight >= 0) else if (linehighlight >= 0)
{ {
@ -2120,7 +2122,7 @@ void overheadeditor(void)
ydim16 = STATUS2DSIZ; ydim16 = STATUS2DSIZ;
ExtShowWallData((int16_t)i); ExtShowWallData((int16_t)i);
ydim16 = ydim-STATUS2DSIZ; ydim16 = ydim-STATUS2DSIZ2;
} }
} }
if (keystatus[0x41]) //F7 if (keystatus[0x41]) //F7
@ -2132,7 +2134,7 @@ void overheadeditor(void)
{ {
ydim16 = STATUS2DSIZ; ydim16 = STATUS2DSIZ;
ExtEditSectorData((int16_t)i); ExtEditSectorData((int16_t)i);
ydim16 = ydim-STATUS2DSIZ; ydim16 = ydim-STATUS2DSIZ2;
break; break;
} }
} }
@ -2146,7 +2148,7 @@ void overheadeditor(void)
ydim16 = STATUS2DSIZ; ydim16 = STATUS2DSIZ;
ExtEditSpriteData((int16_t)i); ExtEditSpriteData((int16_t)i);
ydim16 = ydim-STATUS2DSIZ; ydim16 = ydim-STATUS2DSIZ2;
} }
else if (linehighlight >= 0) else if (linehighlight >= 0)
{ {
@ -2154,7 +2156,7 @@ void overheadeditor(void)
ydim16 = STATUS2DSIZ; ydim16 = STATUS2DSIZ;
ExtEditWallData((int16_t)i); ExtEditWallData((int16_t)i);
ydim16 = ydim-STATUS2DSIZ; ydim16 = ydim-STATUS2DSIZ2;
} }
} }
@ -2213,7 +2215,7 @@ void overheadeditor(void)
break; break;
} }
} }
printmessage16(""); // printmessage16("");
} }
if (keystatus[0x19]) // P (palookup #) if (keystatus[0x19]) // P (palookup #)
{ {
@ -2232,7 +2234,7 @@ void overheadeditor(void)
clearmidstatbar16(); clearmidstatbar16();
showsectordata((int16_t)i); showsectordata((int16_t)i);
printmessage16(""); // printmessage16("");
break; break;
} }
} }
@ -2247,35 +2249,11 @@ void overheadeditor(void)
showspritedata((int16_t)i); showspritedata((int16_t)i);
} }
printmessage16(""); // printmessage16("");
keystatus[0x12] = 0; 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<numsectors; i++)
if (inside(mousxplc,mousyplc,i) == 1)
{
showsectordata((int16_t)i);
break;
}
}
keystatus[0x0f] = 0;
}
if (highlightsectorcnt < 0) if (highlightsectorcnt < 0)
{ {
if (keystatus[0x36]) //Right shift (point highlighting) if (keystatus[0x36]) //Right shift (point highlighting)
@ -2283,7 +2261,7 @@ void overheadeditor(void)
if (highlightcnt == 0) if (highlightcnt == 0)
{ {
highlightx2 = searchx, highlighty2 = searchy; highlightx2 = searchx, highlighty2 = searchy;
ydim16 = ydim-STATUS2DSIZ; ydim16 = ydim-STATUS2DSIZ2;
drawline16(highlightx2,highlighty1,highlightx1,highlighty1,editorcolors[5]); drawline16(highlightx2,highlighty1,highlightx1,highlighty1,editorcolors[5]);
drawline16(highlightx2,highlighty2,highlightx1,highlighty2,editorcolors[5]); drawline16(highlightx2,highlighty2,highlightx1,highlighty2,editorcolors[5]);
drawline16(highlightx1,highlighty2,highlightx1,highlighty1,editorcolors[5]); drawline16(highlightx1,highlighty2,highlightx1,highlighty1,editorcolors[5]);
@ -2373,7 +2351,7 @@ void overheadeditor(void)
if (highlightsectorcnt == 0) if (highlightsectorcnt == 0)
{ {
highlightx2 = searchx, highlighty2 = searchy; highlightx2 = searchx, highlighty2 = searchy;
ydim16 = ydim-STATUS2DSIZ; ydim16 = ydim-STATUS2DSIZ2;
begindrawing(); //{{{ begindrawing(); //{{{
drawline16(highlightx2,highlighty1,highlightx1,highlighty1,editorcolors[10]); drawline16(highlightx2,highlighty1,highlightx1,highlighty1,editorcolors[10]);
drawline16(highlightx2,highlighty2,highlightx1,highlighty2,editorcolors[10]); drawline16(highlightx2,highlighty2,highlightx1,highlighty2,editorcolors[10]);
@ -2731,10 +2709,40 @@ SKIP:
if ((bstatus&6) > 0) if ((bstatus&6) > 0)
{ {
searchx = halfxdim16; if (keystatus[0x1d]|keystatus[0x9d])
searchy = midydim16; {
pos.x = mousxplc; int16_t cursectornum;
pos.y = mousyplc;
for (cursectornum=0; cursectornum<numsectors; cursectornum++)
if (inside(mousxplc,mousyplc,cursectornum) == 1)
break;
if (cursectornum < numsectors)
{
if (pointhighlight >= 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])))) // - if (circlewall != -1 && (keystatus[0x4a] || (bstatus&32 && !(keystatus[0x1d]|keystatus[0x9d])))) // -
@ -2766,7 +2774,7 @@ SKIP:
pos.y = mousyplc; pos.y = mousyplc;
} }
if (zoom > 16384) zoom = 16384; if (zoom > 16384) zoom = 16384;
printmessage16("Zoom: %d",zoom); _printmessage16("Zoom: %d",zoom);
} }
if ((keystatus[buildkeys[BK_MOVEDOWN]] || (bstatus&32)) && (zoom > 8)) if ((keystatus[buildkeys[BK_MOVEDOWN]] || (bstatus&32)) && (zoom > 8))
{ {
@ -2779,7 +2787,7 @@ SKIP:
pos.y = mousyplc; pos.y = mousyplc;
} }
if (zoom < 8) zoom = 8; if (zoom < 8) zoom = 8;
printmessage16("Zoom: %d",zoom); _printmessage16("Zoom: %d",zoom);
} }
if (keystatus[0x22]) // G (grid on/off) if (keystatus[0x22]) // G (grid on/off)
@ -2808,7 +2816,7 @@ SKIP:
if (inside(mousxplc,mousyplc,i) == 1) if (inside(mousxplc,mousyplc,i) == 1)
{ {
startwall = sector[i].wallptr; startwall = sector[i].wallptr;
endwall = startwall + sector[i].wallnum - 1; endwall = startwall + sector[i].wallnum;
for (j=startwall; j<=endwall; j++) for (j=startwall; j<=endwall; j++)
{ {
if (wall[j].nextsector == joinsector[0]) if (wall[j].nextsector == joinsector[0])
@ -2817,7 +2825,7 @@ SKIP:
if (j >= endwall && i != joinsector[0]) if (j >= endwall && i != joinsector[0])
{ {
printmessage16("Join non-adjacent sectors? (Y/N)"); _printmessage16("Join non-adjacent sectors? (Y/N)");
showframe(1); showframe(1);
bflushchars(); ch = 0; bflushchars(); ch = 0;
while (keystatus[1] == 0) while (keystatus[1] == 0)
@ -4131,7 +4139,7 @@ CANCEL:
if (keystatus[1]) if (keystatus[1])
{ {
keystatus[1] = 0; 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); // printext16(200L+248, ydim-STATUS2DSIZ+20L, 9, 0, "(U)ndo, (R)edo", 0);
showframe(1); showframe(1);
bflushchars(); bflushchars();
@ -4153,12 +4161,12 @@ CANCEL:
{ {
keystatus[1] = 0; keystatus[1] = 0;
bad = 0; bad = 0;
printmessage16(""); // printmessage16("");
} }
else if (ch == 'n' || ch == 'N') //N else if (ch == 'n' || ch == 'N') //N
{ {
bad = 0; 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); showframe(1);
bflushchars(); ch = 0; bflushchars(); ch = 0;
while (keystatus[1] == 0) while (keystatus[1] == 0)
@ -4211,7 +4219,7 @@ CANCEL:
break; break;
} }
} }
printmessage16(""); // printmessage16("");
showframe(1); showframe(1);
} }
else if (ch == 'l' || ch == 'L') //L else if (ch == 'l' || ch == 'L') //L
@ -4396,7 +4404,7 @@ CANCEL:
Bsprintf(buffer,"Save as: ^011%s", boardfilename); Bsprintf(buffer,"Save as: ^011%s", boardfilename);
if (totalclock & 32) if (totalclock & 32)
Bstrcat(buffer,"_"); Bstrcat(buffer,"_");
printmessage16(buffer); _printmessage16(buffer);
showframe(1); showframe(1);
if (handleevents()) if (handleevents())
@ -4454,7 +4462,7 @@ CANCEL:
if (!f) f = selectedboardfilename; else f++; if (!f) f = selectedboardfilename; else f++;
} }
Bsprintf(buffer,"Saving to %s...",f); Bsprintf(buffer,"Saving to %s...",f);
printmessage16(buffer); _printmessage16(buffer);
showframe(1); showframe(1);
fixspritesectors(); //Do this before saving! fixspritesectors(); //Do this before saving!
@ -4472,7 +4480,7 @@ CANCEL:
char *f; char *f;
int32_t res; int32_t res;
bad = 0; bad = 0;
printmessage16("Saving board..."); _printmessage16("Saving board...");
showframe(1); showframe(1);
fixspritesectors(); //Do this before saving! fixspritesectors(); //Do this before saving!
updatesector(startposx,startposy,&startsectnum); updatesector(startposx,startposy,&startsectnum);
@ -4493,7 +4501,7 @@ CANCEL:
else if (ch == 'q' || ch == 'Q') //Q else if (ch == 'q' || ch == 'Q') //Q
{ {
bad = 0; bad = 0;
printmessage16("Are you sure you want to quit?"); _printmessage16("Are you sure you want to quit?");
showframe(1); showframe(1);
bflushchars(); bflushchars();
while ((keystatus[1]|keystatus[0x2e]) == 0) while ((keystatus[1]|keystatus[0x2e]) == 0)
@ -4510,7 +4518,7 @@ CANCEL:
{ {
//QUIT! //QUIT!
printmessage16("Save changes?"); _printmessage16("Save changes?");
showframe(1); showframe(1);
while ((keystatus[1]|keystatus[0x2e]) == 0) while ((keystatus[1]|keystatus[0x2e]) == 0)
{ {
@ -4566,7 +4574,7 @@ CANCEL:
break; break;
} }
} }
printmessage16(""); // printmessage16("");
showframe(1); showframe(1);
} }
} }
@ -5032,9 +5040,11 @@ void clearmidstatbar16(void)
clearbuf((char *)(frameplace + (bytesperline*(ydim-STATUS2DSIZ+25L))),(bytesperline*(STATUS2DSIZ+2-(25<<1))) >> 2, 0x00000000l); clearbuf((char *)(frameplace + (bytesperline*(ydim-STATUS2DSIZ+25L))),(bytesperline*(STATUS2DSIZ+2-(25<<1))) >> 2, 0x00000000l);
else else
clearbuf((char *)(frameplace + (bytesperline*(ydim-overridepm16y+25L))),(bytesperline*(overridepm16y+2-(25<<1))) >> 2, 0x00000000l); 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]); drawline16(0,ydim-STATUS2DSIZ,0,ydim-1,editorcolors[7]);
ydim16 = ydim-STATUS2DSIZ; drawline16(xdim-1,ydim-STATUS2DSIZ,xdim-1,ydim-1,editorcolors[7]);
*/
ydim16 = ydim-STATUS2DSIZ2;
enddrawing(); enddrawing();
} }
@ -5097,12 +5107,15 @@ int32_t _getnumber16(char *namestart, int32_t num, int32_t maxnumber, char sign,
ch = bgetchar(); ch = bgetchar();
Bsprintf(buffer,"%s^011%d",namestart,danum); Bsprintf(buffer,"%s^011%d",namestart,danum);
n = Bstrlen(buffer);
if (totalclock & 32) Bstrcat(buffer,"_ "); if (totalclock & 32) Bstrcat(buffer,"_ ");
printmessage16(buffer); _printmessage16(buffer);
if (func != NULL) if (func != NULL)
{ {
Bsprintf(buffer,"^011%s",(char *)func((int32_t)danum)); 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); showframe(1);
@ -5128,6 +5141,7 @@ int32_t _getnumber16(char *namestart, int32_t num, int32_t maxnumber, char sign,
{ {
oldnum = danum; oldnum = danum;
asksave = 1; asksave = 1;
printmessage16(buffer);
break; break;
} }
else if (ch == '-' && sign) // negate else if (ch == '-' && sign) // negate
@ -5315,9 +5329,11 @@ int32_t menuselect(void)
if (!findfileshigh) findfileshigh=findfiles; if (!findfileshigh) findfileshigh=findfiles;
begindrawing(); begindrawing();
printmessage16("Select map file with arrow keys and enter."); _printmessage16("Select map file with arrow keys and enter.");
enddrawing(); enddrawing();
ydim16 = ydim-STATUS2DSIZ2;
do do
{ {
begindrawing(); begindrawing();
@ -5336,7 +5352,7 @@ int32_t menuselect(void)
Bsnprintf(buffer,sizeof(buffer)-1,"(%d dirs, %d files) %s",numdirs,numfiles,selectedboardfilename); Bsnprintf(buffer,sizeof(buffer)-1,"(%d dirs, %d files) %s",numdirs,numfiles,selectedboardfilename);
buffer[sizeof(buffer)-1] = 0; 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) if (finddirshigh)
{ {
@ -5427,7 +5443,7 @@ int32_t menuselect(void)
else if (keystatus[0xc9]|keystatus[0xd1]) // page up/down else if (keystatus[0xc9]|keystatus[0xd1]) // page up/down
{ {
seeker = currentlist?findfileshigh:finddirshigh; seeker = currentlist?findfileshigh:finddirshigh;
i = (ydim2d-STATUS2DSIZ-48)>>5/*3*/; //PK i = (ydim2d-STATUS2DSIZ2-48)>>5/*3*/; //PK
while (i>0) while (i>0)
{ {
@ -5961,103 +5977,130 @@ void copysector(int16_t soursector, int16_t destsector, int16_t deststartwall, c
void showsectordata(int16_t sectnum) void showsectordata(int16_t sectnum)
{ {
char snotbuf[80]; 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); 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); 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); 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]); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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) void showwalldata(int16_t wallnum)
{ {
int32_t dax, day, dist; int32_t dax, day, dist;
char snotbuf[80]; 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); 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); 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); 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); Bsprintf(snotbuf,"Point2: %d",wall[wallnum].point2);
printext16(8,ydim-STATUS2DSIZ+64,editorcolors[11],-1,snotbuf,0); printext16(8,ydim-(row*80)-STATUS2DSIZ+64,editorcolors[11],-1,snotbuf,2);
Bsprintf(snotbuf,"Sector: %d",sectorofwall(wallnum)); Bsprintf(snotbuf,"Sector: ^010%d",sectorofwall(wallnum));
printext16(8,ydim-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,0); printext16(8,ydim-(row*80)-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,2);
Bsprintf(snotbuf,"Tags: %d, %d",wall[wallnum].hitag,wall[wallnum].lotag); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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; dax = wall[wallnum].x-wall[wall[wallnum].point2].x;
day = wall[wallnum].y-wall[wall[wallnum].point2].y; 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 // 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); 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); dax = (int32_t)sectorofwall(wallnum);
Bsprintf(snotbuf,"Pixel height: %d",(sector[dax].floorz-sector[dax].ceilingz)>>8); 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) void showspritedata(int16_t spritenum)
{ {
char snotbuf[80]; 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); 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); 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); 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); 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); Bsprintf(snotbuf,"Sectnum: ^010%d",sprite[spritenum].sectnum);
printext16(8,ydim-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,0); printext16(8,ydim-(row*80)-STATUS2DSIZ+72,editorcolors[11],-1,snotbuf,2);
Bsprintf(snotbuf,"Statnum: %d",sprite[spritenum].statnum); 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); 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); 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]); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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) void keytimerstuff(void)
@ -6162,37 +6218,41 @@ void keytimerstuff(void)
void _printmessage16(const char *fmt, ...) void _printmessage16(const char *fmt, ...)
{ {
int32_t i, ybase; int32_t i, ybase;
char snotbuf[60]; char snotbuf[100];
char tmpstr[64]; char tmpstr[104];
va_list va; va_list va;
va_start(va, fmt); va_start(va, fmt);
Bvsnprintf(tmpstr, 64, fmt, va); Bvsnprintf(tmpstr, 104, fmt, va);
va_end(va); va_end(va);
i = 0; i = 0;
while ((tmpstr[i] != 0) && (i < 54)) while ((tmpstr[i] != 0) && (i < 94))
{ {
snotbuf[i] = tmpstr[i]; snotbuf[i] = tmpstr[i];
i++; i++;
} }
while (i < 54) while (i < 94)
{ {
snotbuf[i] = 32; snotbuf[i] = 32;
i++; i++;
} }
snotbuf[54] = 0; snotbuf[94] = 0;
if (lastpm16time == totalclock)
Bstrcpy(lastpm16buf, snotbuf);
begindrawing(); begindrawing();
ybase = (overridepm16y >= 0) ? ydim-overridepm16y : ydim-STATUS2DSIZ; ybase = (overridepm16y >= 0) ? ydim-overridepm16y : ydim-STATUS2DSIZ+128-8;
printext16(200L-24, ybase+8L, editorcolors[9], editorcolors[0], snotbuf, 0); printext16((overridepm16y >= 0) ? 200L-24 : 8, ybase+8L, editorcolors[9], editorcolors[0], snotbuf, 0);
i = 0; /*
while (i < 54) i = 0;
{ while (i < 54)
snotbuf[i] = 32; {
i++; snotbuf[i] = 32;
} i++;
snotbuf[54] = 0; }
printext16(200L-24, ybase+20L, editorcolors[9], editorcolors[0], snotbuf, 0); snotbuf[54] = 0;
printext16(200L-24, ybase+20L, editorcolors[9], editorcolors[0], snotbuf, 0);
*/
enddrawing(); enddrawing();
} }

View file

@ -10941,12 +10941,12 @@ void qsetmodeany(int32_t daxdim, int32_t daydim)
// setvgapalette(); // setvgapalette();
ydim16 = yres - STATUS2DSIZ; ydim16 = yres - STATUS2DSIZ2;
halfxdim16 = xres >> 1; halfxdim16 = xres >> 1;
midydim16 = scale(200,yres,480); midydim16 = ydim16 >> 1; // scale(200,yres,480);
begindrawing(); //{{{ 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); clearbuf((char *)frameplace, (ydim16*bytesperline) >> 2, 0L);
enddrawing(); //}}} enddrawing(); //}}}
} }
@ -10966,7 +10966,7 @@ void clear2dscreen(void)
if (qsetmode == 350) clearsz = 350; if (qsetmode == 350) clearsz = 350;
else else
{ {
if (ydim16 <= yres-STATUS2DSIZ) clearsz = yres - STATUS2DSIZ; if (ydim16 <= yres-STATUS2DSIZ2) clearsz = yres - STATUS2DSIZ2;
else clearsz = yres; else clearsz = yres;
} }
clearbuf((char *)frameplace, (bytesperline*clearsz) >> 2, 0); 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]; char smallbuf[4];
stx = xpos; 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; } else { fontptr = textfont; charxsiz = 8; }
begindrawing(); //{{{ begindrawing(); //{{{
@ -11474,8 +11475,10 @@ int32_t printext16(int32_t xpos, int32_t ypos, int16_t col, int16_t backcol, cha
i++; i++;
if (name[i] == 'O') // ^O resets formatting if (name[i] == 'O') // ^O resets formatting
{ {
col = editorcolors[ocol]; if (fontsize & 4) continue;
backcol = editorcolors[obackcol];
col = ocol;
backcol = obackcol;
continue; continue;
} }
if (isdigit(name[i])) 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[0] = name[i];
smallbuf[1] = '\0'; smallbuf[1] = '\0';
} }
col = editorcolors[atol(smallbuf)]; if (!(fontsize & 4))
col = editorcolors[atol(smallbuf)];
if (name[i+1] == ',' && isdigit(name[i+2])) 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[0] = name[i];
smallbuf[1] = '\0'; smallbuf[1] = '\0';
} }
backcol = editorcolors[atol(smallbuf)];
if (!(fontsize & 4))
backcol = editorcolors[atol(smallbuf)];
} }
continue; continue;
} }
} }
letptr = &fontptr[name[i]<<3]; 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 (y=7; y>=0; y--)
{ {
for (x=charxsiz-1; x>=0; x--) 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; ptr[x] = (uint8_t)col;
else if (backcol >= 0) else if (backcol >= 0)
ptr[x] = (uint8_t)backcol; ptr[x] = (uint8_t)backcol;

View file

@ -49,8 +49,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <shellapi.h> #include <shellapi.h>
#endif #endif
#define BUILDDATE " 20090426" #define BUILDDATE " 20090430"
#define VERSION " 1.2.0devel" #define VERSION " 1.3.0devel"
static int32_t floor_over_floor; static int32_t floor_over_floor;
@ -1599,7 +1599,7 @@ ENDFOR1:
ydim16=ydim; ydim16=ydim;
drawline16(0,ydim-STATUS2DSIZ,xdim-1,ydim-STATUS2DSIZ,editorcolors[1]); drawline16(0,ydim-STATUS2DSIZ,xdim-1,ydim-STATUS2DSIZ,editorcolors[1]);
ydim16=i; ydim16=i;
printmessage16(""); // printmessage16("");
showframe(1); showframe(1);
keystatus[KEYSC_ESC] = keystatus[KEYSC_Q] = keystatus[KEYSC_F1] = 0; keystatus[KEYSC_ESC] = keystatus[KEYSC_Q] = keystatus[KEYSC_F1] = 0;
@ -1943,7 +1943,7 @@ static void SoundDisplay()
ydim16=ydim; ydim16=ydim;
drawline16(0,ydim-STATUS2DSIZ,xdim-1,ydim-STATUS2DSIZ,editorcolors[1]); drawline16(0,ydim-STATUS2DSIZ,xdim-1,ydim-STATUS2DSIZ,editorcolors[1]);
ydim16=i; ydim16=i;
printmessage16(""); // printmessage16("");
showframe(1); showframe(1);
FX_StopAllSounds(); FX_StopAllSounds();
@ -7185,7 +7185,7 @@ static void Keys2d(void)
int32_t i=0, j,k; int32_t i=0, j,k;
int32_t smooshyalign,changedir; int32_t smooshyalign,changedir;
static int32_t repeatcountx=0,repeatcounty=0; static int32_t repeatcountx=0,repeatcounty=0;
static int32_t opointhighlight=-1, olinehighlight=-1, ocursectornum=-1;
/* /*
for(i=0;i<0x50;i++) for(i=0;i<0x50;i++)
{if(keystatus[i]==1) {Bsprintf(tempbuf,"key %d",i); printmessage16(tempbuf); {if(keystatus[i]==1) {Bsprintf(tempbuf,"key %d",i); printmessage16(tempbuf);
@ -7193,74 +7193,91 @@ static void Keys2d(void)
*/ */
Bsprintf(tempbuf, "Mapster32" VERSION); Bsprintf(tempbuf, "Mapster32" VERSION);
printext16(9L,ydim2d-STATUS2DSIZ+9L,editorcolors[4],-1,tempbuf,0); printext16(xdim2d-(Bstrlen(tempbuf)<<3)-3,ydim2d-STATUS2DSIZ2+10L,editorcolors[4],-1,tempbuf,0);
printext16(8L,ydim2d-STATUS2DSIZ+8L,editorcolors[12],-1,tempbuf,0); printext16(xdim2d-(Bstrlen(tempbuf)<<3)-2,ydim2d-STATUS2DSIZ2+9L,editorcolors[12],-1,tempbuf,0);
cursectornum = -1;
for (i=0; i<numsectors; i++)
if (inside(mousxplc,mousyplc,i) == 1)
{
cursectornum = i;
break;
}
updatesector(mousxplc,mousyplc,&cursectornum);
searchsector=cursectornum; searchsector=cursectornum;
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 (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) if (pointhighlight >= 16384)
{ {
i = pointhighlight-16384; i = pointhighlight-16384;
clearmidstatbar16(); // clearmidstatbar16();
showspritedata((int16_t)i); showspritedata((int16_t)i+16384);
} }
else if ((linehighlight >= 0) && (bstatus&1 || sectorofwall(linehighlight) == cursectornum)) else if ((linehighlight >= 0) && (bstatus&1 || sectorofwall(linehighlight) == cursectornum))
{ {
clearmidstatbar16(); // clearmidstatbar16();
showwalldata((int16_t)linehighlight); showwalldata((int16_t)linehighlight+16384);
} }
else if (cursectornum >= 0) else if (cursectornum >= 0)
{ {
clearmidstatbar16(); // clearmidstatbar16();
showsectordata((int16_t)cursectornum); showsectordata((int16_t)cursectornum+16384);
} }
else clearmidstatbar16(); // else clearmidstatbar16();
opointhighlight = pointhighlight; if (totalclock < (lastpm16time + 120*3))
olinehighlight = linehighlight; _printmessage16(lastpm16buf);
ocursectornum = cursectornum;
} }
/*
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 if (keystatus[KEYSC_QUOTE] && keystatus[KEYSC_Z]) // ' z
{ {
keystatus[KEYSC_Z] = 0; keystatus[KEYSC_Z] = 0;
editorzrange[0]=getnumber16("Upper Z range: ",editorzrange[0],INT32_MAX,1); editorzrange[0]=getnumber16("Upper Z range: ",editorzrange[0],INT32_MAX,1);
editorzrange[1]=getnumber16("Lower Z range: ",editorzrange[1],INT32_MAX,1); editorzrange[1]=getnumber16("Lower Z range: ",editorzrange[1],INT32_MAX,1);
printmessage16(""); // printmessage16("");
} }
if (keystatus[0x14]) // T (tag) if (keystatus[0x14]) // T (tag)
@ -7298,7 +7315,7 @@ static void Keys2d(void)
clearmidstatbar16(); clearmidstatbar16();
showwalldata((int16_t)i); showwalldata((int16_t)i);
} }
printmessage16(""); // printmessage16("");
} }
else else
{ {
@ -7314,7 +7331,7 @@ static void Keys2d(void)
showsectordata((int16_t)i); showsectordata((int16_t)i);
break; break;
} }
printmessage16(""); // printmessage16("");
} }
} }
@ -7397,7 +7414,7 @@ static void Keys2d(void)
clearmidstatbar16(); clearmidstatbar16();
showwalldata((int16_t)i); showwalldata((int16_t)i);
} }
printmessage16(""); // printmessage16("");
} }
else else
{ {
@ -7410,7 +7427,7 @@ static void Keys2d(void)
showsectordata((int16_t)i); showsectordata((int16_t)i);
break; break;
} }
printmessage16(""); // printmessage16("");
} }
} }
@ -10343,7 +10360,6 @@ void ExtCheckKeys(void)
} }
} }
readmousebstatus(&bstatus); readmousebstatus(&bstatus);
Keys2d3d();
if (qsetmode == 200) //In 3D mode if (qsetmode == 200) //In 3D mode
{ {
Keys3d(); Keys3d();
@ -10355,6 +10371,7 @@ void ExtCheckKeys(void)
return; return;
} }
Keys2d(); Keys2d();
Keys2d3d();
} }
void faketimerhandler(void) void faketimerhandler(void)
@ -10510,7 +10527,7 @@ static void EditSectorData(int16_t sectnum)
char disptext[80]; char disptext[80];
char edittext[80]; char edittext[80];
int32_t col=1, row=0, rowmax = 6, dispwidth = 24, editval = 0, i = -1; 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; disptext[dispwidth] = 0;
clearmidstatbar16(); clearmidstatbar16();
@ -10524,7 +10541,7 @@ static void EditSectorData(int16_t sectnum)
if (quitevent) quitevent = 0; if (quitevent) quitevent = 0;
} }
idle(); idle();
printmessage16("Edit mode, press <Esc> to exit"); _printmessage16("Edit mode, press <Esc> to exit");
if (keystatus[KEYSC_DOWN]) if (keystatus[KEYSC_DOWN])
{ {
if (row < rowmax) if (row < rowmax)
@ -10549,7 +10566,7 @@ static void EditSectorData(int16_t sectnum)
{ {
printext16(xpos,ypos+row*8,editorcolors[11],editorcolors[0],disptext,0); printext16(xpos,ypos+row*8,editorcolors[11],editorcolors[0],disptext,0);
col = 1; col = 1;
xpos = 200; xpos = 208;
rowmax = 6; rowmax = 6;
dispwidth = 24; dispwidth = 24;
disptext[dispwidth] = 0; disptext[dispwidth] = 0;
@ -10563,7 +10580,7 @@ static void EditSectorData(int16_t sectnum)
{ {
printext16(xpos,ypos+row*8,editorcolors[11],editorcolors[0],disptext,0); printext16(xpos,ypos+row*8,editorcolors[11],editorcolors[0],disptext,0);
col = 2; col = 2;
xpos = 400; xpos = 408;
rowmax = 6; rowmax = 6;
dispwidth = 24; dispwidth = 24;
disptext[dispwidth] = 0; disptext[dispwidth] = 0;
@ -10737,7 +10754,7 @@ static void EditSectorData(int16_t sectnum)
showframe(1); showframe(1);
} }
printext16(xpos,ypos+row*8,editorcolors[11],editorcolors[0],disptext,0); printext16(xpos,ypos+row*8,editorcolors[11],editorcolors[0],disptext,0);
printmessage16(""); // printmessage16("");
enddrawing(); enddrawing();
showframe(1); showframe(1);
keystatus[KEYSC_ESC] = 0; keystatus[KEYSC_ESC] = 0;
@ -10748,7 +10765,7 @@ static void EditWallData(int16_t wallnum)
char disptext[80]; char disptext[80];
char edittext[80]; char edittext[80];
int32_t row=0, dispwidth = 24, editval = 0, i = -1; 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; disptext[dispwidth] = 0;
clearmidstatbar16(); clearmidstatbar16();
@ -10761,7 +10778,7 @@ static void EditWallData(int16_t wallnum)
if (quitevent) quitevent = 0; if (quitevent) quitevent = 0;
} }
idle(); idle();
printmessage16("Edit mode, press <Esc> to exit"); _printmessage16("Edit mode, press <Esc> to exit");
if (keystatus[KEYSC_DOWN]) if (keystatus[KEYSC_DOWN])
{ {
if (row < 6) if (row < 6)
@ -10863,14 +10880,14 @@ static void EditWallData(int16_t wallnum)
{ {
editval = 0; editval = 0;
//showwalldata(wallnum); //showwalldata(wallnum);
//printmessage16(""); //// printmessage16("");
} }
//enddrawing(); //enddrawing();
showframe(1); showframe(1);
} }
//begindrawing(); //begindrawing();
printext16(xpos,ypos+row*8,editorcolors[11],editorcolors[0],disptext,0); printext16(xpos,ypos+row*8,editorcolors[11],editorcolors[0],disptext,0);
printmessage16(""); // printmessage16("");
enddrawing(); enddrawing();
showframe(1); showframe(1);
keystatus[KEYSC_ESC] = 0; keystatus[KEYSC_ESC] = 0;
@ -10895,7 +10912,7 @@ static void EditSpriteData(int16_t spritenum)
if (quitevent) quitevent = 0; if (quitevent) quitevent = 0;
} }
idle(); idle();
printmessage16("Edit mode, press <Esc> to exit"); _printmessage16("Edit mode, press <Esc> to exit");
if (keystatus[KEYSC_DOWN]) if (keystatus[KEYSC_DOWN])
{ {
if (row < rowmax) if (row < rowmax)
@ -10933,7 +10950,7 @@ static void EditSpriteData(int16_t spritenum)
{ {
printext16(xpos,ypos+row*8,editorcolors[11],editorcolors[0],disptext,0); printext16(xpos,ypos+row*8,editorcolors[11],editorcolors[0],disptext,0);
col = 1; col = 1;
xpos = 200; xpos = 208;
rowmax = 5; rowmax = 5;
dispwidth = 24; dispwidth = 24;
disptext[dispwidth] = 0; disptext[dispwidth] = 0;
@ -10951,7 +10968,7 @@ static void EditSpriteData(int16_t spritenum)
{ {
printext16(xpos,ypos+row*8,editorcolors[11],editorcolors[0],disptext,0); printext16(xpos,ypos+row*8,editorcolors[11],editorcolors[0],disptext,0);
col = 1; col = 1;
xpos = 200; xpos = 208;
rowmax = 5; rowmax = 5;
dispwidth = 24; dispwidth = 24;
disptext[dispwidth] = 0; disptext[dispwidth] = 0;
@ -10962,7 +10979,7 @@ static void EditSpriteData(int16_t spritenum)
{ {
printext16(xpos,ypos+row*8,editorcolors[11],editorcolors[0],disptext,0); printext16(xpos,ypos+row*8,editorcolors[11],editorcolors[0],disptext,0);
col = 2; col = 2;
xpos = 400; xpos = 408;
rowmax = 6; rowmax = 6;
dispwidth = 26; dispwidth = 26;
disptext[dispwidth] = 0; disptext[dispwidth] = 0;
@ -11220,7 +11237,7 @@ static void EditSpriteData(int16_t spritenum)
} }
begindrawing(); begindrawing();
printext16(xpos,ypos+row*8,editorcolors[11],editorcolors[0],disptext,0); printext16(xpos,ypos+row*8,editorcolors[11],editorcolors[0],disptext,0);
printmessage16(""); // printmessage16("");
enddrawing(); enddrawing();
showframe(1); showframe(1);
keystatus[KEYSC_ESC] = 0; keystatus[KEYSC_ESC] = 0;