use radarpos.x instead of VIRTW when showing partial console

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3591 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-11-17 21:18:23 +00:00
parent cf35264664
commit fc4183ef8b
3 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ struct console : consolebuffer<cline>
void render()
{
int conwidth = VIRTW*2 - 2*CONSPAD - (fullconsole ? 2 : 40)*FONTH/3;
int conwidth = (fullconsole ? VIRTW : int(floor(getradarpos().x)))*2 - 2*CONSPAD - 2*FONTH/3;
int h = VIRTH*2 - 2*CONSPAD - 2*FONTH/3;
int conheight = min(fullconsole ? (h*(fullconsole==1 ? altconsize : fullconsize))/100 : FONTH*consize, h);
+1
View File
@@ -507,6 +507,7 @@ extern void hudonlyf(const char *s, ...);
extern void hudeditf(int type, const char *s, ...);
extern void show_out_of_renderloop_progress(float bar1, const char *text1, float bar2 = 0, const char *text2 = NULL);
extern void updatedmgindicator(vec &attack);
extern vec getradarpos();
// renderparticles
enum
+7
View File
@@ -355,6 +355,13 @@ bool insideradar(const vec &centerpos, float radius, const vec &o)
bool isattacking(playerent *p) { return lastmillis-p->lastaction < 500; }
vec getradarpos()
{
float radarviewsize = VIRTH/6;
float overlaysize = radarviewsize*4.0f/3.25f;
return vec(VIRTW-10-VIRTH/28-overlaysize, 10+VIRTH/52, 0);
}
void drawradar(playerent *p, int w, int h)
{
vec center = showmap ? vec(ssize/2, ssize/2, 0) : p->o;