This commit is contained in:
parent
33f14e9b85
commit
294a09d2ff
1 changed files with 39 additions and 1 deletions
|
@ -29,5 +29,43 @@ CLayerCollision::~CLayerCollision()
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CLayerCollision::shutdown()
|
void CLayerCollision::shutdown()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
#ifdef __SHOW_COLLISION__
|
||||||
|
#include "gfx\prim.h"
|
||||||
|
int showCollision=true;
|
||||||
|
void CLayerCollision::render(DVECTOR &MapPos)
|
||||||
|
{
|
||||||
|
if(showCollision)
|
||||||
|
{
|
||||||
|
int x,y;
|
||||||
|
int mapx,mapy;
|
||||||
|
int xoff,yoff;
|
||||||
|
u8 *coll;
|
||||||
|
POLY_F4 *f4;
|
||||||
|
|
||||||
|
xoff=MapPos.vx&15;
|
||||||
|
yoff=MapPos.vy&15;
|
||||||
|
mapx=MapPos.vx/16;
|
||||||
|
mapy=MapPos.vy/16;
|
||||||
|
for(y=-yoff;y<(20*16)-yoff;y+=16)
|
||||||
|
{
|
||||||
|
coll=&Map[mapx+(mapy*MapWidth)];
|
||||||
|
for(x=-xoff;x<(33*16)-xoff;x+=16)
|
||||||
|
{
|
||||||
|
if(*coll)
|
||||||
|
{
|
||||||
|
f4=GetPrimF4();
|
||||||
|
setXYWH(f4,x,y,16,16);
|
||||||
|
setRGB0(f4,0,0,90);
|
||||||
|
setSemiTrans(f4,true);
|
||||||
|
AddPrimToList(f4,0);
|
||||||
|
}
|
||||||
|
coll++;
|
||||||
|
}
|
||||||
|
mapy++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue