Skip to content
Permalink
Browse files

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
  • Loading branch information...
ac-stef committed Feb 4, 2014
1 parent 2c2395d commit a37d437a2f3b57fea085c88cb890b28709ed36c1
Showing with 4 additions and 3 deletions.
  1. +2 −1 source/src/protos.h
  2. +1 −1 source/src/rendercubes.cpp
  3. +1 −1 source/src/worldrender.cpp
@@ -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
@@ -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, "");

@@ -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);
}

0 comments on commit a37d437

Please sign in to comment.
You can’t perform that action at this time.