nicer mipstat display

* display mistats in the hud instead of having them flood the console
* added display of 8x8 mips, just to show that they are possible

press F6 in editmode to see the difference
This commit is contained in:
ac-stef
2014-05-15 13:48:30 +02:00
parent 2c2395d97a
commit a37d437a2f
3 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -344,7 +344,7 @@ extern void setuptmu(int n, const char *rgbfunc = NULL, const char *alphafunc =
struct zone { int x1, x2, y1, y2, color; }; // zones (drawn on the minimap)
// rendercubes
extern void mipstats(int a, int b, int c);
extern void mipstats(const int a[]);
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);
@@ -593,6 +593,7 @@ enum
{
HUDMSG_INFO = 0,
HUDMSG_TIMER,
HUDMSG_MIPSTATS,
HUDMSG_TYPE = 0xFF,
HUDMSG_OVERWRITE = 1<<8
+1 -1
View File
@@ -136,7 +136,7 @@ int firstindex;
bool showm = false;
void showmip() { showm = !showm; }
void mipstats(int a, int b, int c) { if(showm) conoutf("1x1/2x2/4x4: %d / %d / %d", a, b, c); }
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]); }
COMMAND(showmip, "");
+1 -1
View File
@@ -325,6 +325,6 @@ void render_world(float vx, float vy, float vh, float changelod, int yaw, int pi
render_ceil = -pitch<0.5f*fovy;
render_seg_new(vx, vy, vh, MAX_MIP, 0, 0, ssize>>MAX_MIP, ssize>>MAX_MIP);
mipstats(stats[0], stats[1], stats[2]);
mipstats(stats);
}