diff --git a/config/resetbinds.cfg b/config/resetbinds.cfg index b389c976..42d14a38 100644 --- a/config/resetbinds.cfg +++ b/config/resetbinds.cfg @@ -152,6 +152,7 @@ editbind F6 showmip bind F7 [] editbind F7 [ if $fullbright [ fullbright 0 ] [ fullbright 1 ] ] bind F8 [] +editbind F8 showfocuscubedetails bind F9 [] bind F10 [ if (! (watchingdemo)) getdemo ] bind F11 [ conskip -1000; toggleconsole ] diff --git a/source/src/editing.cpp b/source/src/editing.cpp index be3f1f9e..29f91b5c 100644 --- a/source/src/editing.cpp +++ b/source/src/editing.cpp @@ -96,7 +96,7 @@ char *editinfo() if(selset()) concatformatstring(info, "selection = (%d, %d)", (sels.last()).xs, (sels.last()).ys); else concatformatstring(info, "no selection"); sqr *s; - if(!OUTBORD(cx, cy) && (s = S(cx,cy)) && !SOLID(s) && s->tag) concatformatstring(info, ", tag 0x%02X", s->tag); + if(!OUTBORD(cx, cy) && (s = S(cx,cy)) && !editfocusdetails(s) && !SOLID(s) && s->tag) concatformatstring(info, ", tag 0x%02X", s->tag); return info; } diff --git a/source/src/protos.h b/source/src/protos.h index 1327abd1..faed5beb 100644 --- a/source/src/protos.h +++ b/source/src/protos.h @@ -345,6 +345,7 @@ struct zone { int x1, x2, y1, y2, color; }; // zones (drawn on the minimap) // rendercubes extern void mipstats(const int a[]); +extern bool editfocusdetails(sqr *s); extern void render_flat(int tex, int x, int y, int size, int h, sqr *l1, sqr *l2, sqr *l3, sqr *l4, bool isceil); extern void render_flatdelta(int wtex, int x, int y, int size, float h1, float h2, float h3, float h4, sqr *l1, sqr *l2, sqr *l3, sqr *l4, bool isceil); extern void render_square(int wtex, float floor1, float floor2, float ceil1, float ceil2, int x1, int y1, int x2, int y2, int size, sqr *l1, sqr *l2, bool topleft, int dir); @@ -594,6 +595,7 @@ enum HUDMSG_INFO = 0, HUDMSG_TIMER, HUDMSG_MIPSTATS, + HUDMSG_EDITFOCUS, HUDMSG_TYPE = 0xFF, HUDMSG_OVERWRITE = 1<<8 diff --git a/source/src/rendercubes.cpp b/source/src/rendercubes.cpp index ad5fcbce..1940da8c 100644 --- a/source/src/rendercubes.cpp +++ b/source/src/rendercubes.cpp @@ -133,12 +133,26 @@ int ol1r, ol1g, ol1b, ol2r, ol2g, ol2b; float ofloor, oceil; bool ohf; int firstindex; -bool showm = false; +bool showm = false, showef = false; -void showmip() { showm = !showm; } -void mipstats(const int a[]) { if(showm) hudeditf(HUDMSG_MIPSTATS, "1x1/2x2/4x4/8x8: %d / %d / %d / %d", a[0], a[1], a[2], a[3]); } +COMMANDF(showmip, "",() { showm = !showm; }); +COMMANDF(showfocuscubedetails, "",() { showef = !showef; }); -COMMAND(showmip, ""); +const char *cubetypes[] = {"SOLID", "CORNER", "FHF", "CHF", "SPACE"}; +const char *cubetypename(int t) { return t >= 0 && t < SEMISOLID ? cubetypes[t] : "unknown"; } + +void mipstats(const int a[]) { if(showm && !showef) hudeditf(HUDMSG_MIPSTATS, "1x1/2x2/4x4/8x8: %d / %d / %d / %d", a[0], a[1], a[2], a[3]); } + +bool editfocusdetails(sqr *s) +{ + if(showef) + { + const char *g = SOLID(s) ? "\f4" : ""; + hudeditf(HUDMSG_EDITFOCUS, "%s: \fs%s%d..%d\fr W:%d \fs%sU:%d F:%d C:%d v:%d t:0x%X\fr", cubetypename(s->type), g, s->floor, s->ceil, s->wtex, g, s->utex, s->ftex, s->ctex, s->vdelta, s->tag); + return true; + } + return false; +} VAR(mergestrips, 0, 1, 1);