Armor icon hud, and blocking too much open maps

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4937 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Rafael Barreto
2010-05-19 20:31:15 +00:00
parent b6d4722032
commit be1d72d7cc
8 changed files with 97 additions and 456 deletions
+9 -12
View File
@@ -25,9 +25,9 @@ const char *numtime()
}
extern char *maplayout;
extern int maplayout_factor, Mvolume, Marea, Mopen;
extern int maplayout_factor, Mvolume, Marea;
extern float Mheight;
extern int checkarea(char *maplayout);
extern int checkarea();
mapstats *loadmapstats(const char *filename, bool getlayout)
{
@@ -83,8 +83,8 @@ mapstats *loadmapstats(const char *filename, bool getlayout)
memset(maplayout, 0, layoutsize * sizeof(char));
char *t = NULL;
char floor = 0, ceil;
int diff;
Mvolume = Marea = Mopen = 0;
int diff = 0;
Mvolume = Marea = 0;
loopk(layoutsize)
{
char *c = maplayout + k;
@@ -110,10 +110,6 @@ mapstats *loadmapstats(const char *filename, bool getlayout)
ceil = f->getchar();
if(floor >= ceil && ceil > -128) floor = ceil - 1; // for pre 12_13
diff = ceil - floor;
if ( diff > 6 ) {
Marea++;
Mvolume+=diff;
}
if(type == FHF) floor = -128;
f->getchar(); f->getchar();
if(s.hdr.version>=2) f->getchar();
@@ -125,14 +121,15 @@ mapstats *loadmapstats(const char *filename, bool getlayout)
if(s.hdr.version<=2) { f->getchar(); f->getchar(); }
break;
}
if ( type != SOLID && diff > 6 ) {
Marea++;
Mvolume+=diff;
}
if(fail) break;
t = c;
}
if(fail) { DELETEA(maplayout); }
else {
Mheight = Marea ? (float)Mvolume/Marea : 0;
Mopen = checkarea(maplayout);
}
else Mheight = Marea ? (float)Mvolume/Marea : 0;
}
}
delete f;