- Replace >>MAPBLOCKSHIFT with GetSafeBlockX/GetSafeBlockY from Mocha Doom.

SVN r3486 (trunk)
This commit is contained in:
Randy Heit 2012-03-28 03:49:38 +00:00
commit cfd5b84535
5 changed files with 66 additions and 34 deletions

View file

@ -164,6 +164,8 @@ int *blockmaplump; // offsets in blockmap are from here
fixed_t bmaporgx; // origin of block map
fixed_t bmaporgy;
int bmapnegx; // min negs of block map before wrapping
int bmapnegy;
FBlockNode** blocklinks; // for thing chains
@ -2960,10 +2962,15 @@ void P_LoadBlockMap (MapData * map)
}
bmaporgx = blockmaplump[0]<<FRACBITS;
bmaporgy = blockmaplump[1]<<FRACBITS;
bmaporgx = blockmaplump[0] << FRACBITS;
bmaporgy = blockmaplump[1] << FRACBITS;
bmapwidth = blockmaplump[2];
bmapheight = blockmaplump[3];
// MAES: set blockmapxneg and blockmapyneg
// E.g. for a full 512x512 map, they should be both
// -1. For a 257*257, they should be both -255 etc.
bmapnegx = bmapwidth > 255 ? bmapwidth - 512 : -257;
bmapnegy = bmapheight > 255 ? bmapheight - 512 : -257;
// clear out mobj chains
count = bmapwidth*bmapheight;