From 32b1106ed593cd243a355c3c8f51dcfc95e7afdc Mon Sep 17 00:00:00 2001 From: flowtron Date: Sat, 10 Jul 2010 16:58:18 +0000 Subject: [PATCH] improved showmap zooming (incl. VAR for tweaking) git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5330 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/renderhud.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source/src/renderhud.cpp b/source/src/renderhud.cpp index eb886f19..138c7ce2 100644 --- a/source/src/renderhud.cpp +++ b/source/src/renderhud.cpp @@ -283,9 +283,9 @@ void drawequipicons(playerent *p) // weapons int c = p->weaponsel->type, r = 0; - if(c==GUN_AKIMBO || c==GUN_CPISTOL) c = GUN_PISTOL; // same icon for akimb & pistol - if(c==GUN_GRENADE) c--; // FIXME - if(c>3) { c -= 4; r = 1; } + if(c==GUN_AKIMBO || c==GUN_CPISTOL) c = GUN_PISTOL; // same icon for akimb & pistol + if(c==GUN_GRENADE) c--; // FIXME + if(c>3) { c -= 4; r = 1; } if(p->weaponsel && p->weaponsel->type>=GUN_KNIFE && p->weaponsel->typeweaponsel->mag && p->weaponsel->type != GUN_KNIFE && p->weaponsel->type != GUN_GRENADE)); glEnable(GL_BLEND); @@ -396,9 +396,12 @@ vec getradarpos() return vec(VIRTW-10-VIRTH/28-overlaysize, 10+VIRTH/52, 0); } +VAR(mapdimsfactor, 0, 2, 4); + void drawradar(playerent *p, int w, int h) { int gdim = max(mapdims[4], mapdims[5]); + if(mapdimsfactor) { gdim = ((int) (mapdimsfactor*2+1)*gdim/(mapdimsfactor*2)); } vec center = showmap ? vec(mapdims[0] + mapdims[4]/2, mapdims[1] + mapdims[5]/2, 0) : p->o; int res = showmap ? gdim : radarres; @@ -560,6 +563,7 @@ void drawscores() if(time > 0.9) {drawmedals(left, top, 0, 2, tex); draw_textf("TEST WRITING!!", left+txtdx, top+txtdy); top+=medalsdy;} glPopAttrib(); } + VARP(dbgpos,0,0,1); void gl_drawhud(int w, int h, int curfps, int nquads, int curvert, bool underwater) {