This commit is contained in:
Daveo 2001-05-09 21:56:48 +00:00
parent cd80039a6c
commit efafaba4ba
28 changed files with 246 additions and 188 deletions

View file

@ -76,7 +76,10 @@ int i,ListSize=ThingList.size();
OutThing.AttackStrength=ThisThing.Data.Actor.ActorAttackStrength;
OutThing.Speed=ThisThing.Data.Actor.ActorSpeed;
OutThing.TurnRate=ThisThing.Data.Actor.ActorTurnRate;
OutThing.Flags=ThisThing.Data.Actor.ActorCollisionFlag;
OutThing.Flags=0;
if (ThisThing.Data.Actor.ActorCollisionFlag) OutThing.Flags|=THING_FLAG_COLLISION;
if (ThisThing.Data.Flip & PC_TILE_FLAG_MIRROR_X) OutThing.Flags|=THING_FLAG_MIRRORX;
if (ThisThing.Data.Flip & PC_TILE_FLAG_MIRROR_Y) OutThing.Flags|=THING_FLAG_MIRRORY;
OutThing.PointCount=PointCount;
fwrite(&OutThing,sizeof(sThingActor),1,File);

View file

@ -8,6 +8,16 @@
#include "MkLevelLayer.h"
#include "MkLevelLayerCollision.h"
/*
0 - Blank
1 - Solid block (no flips)
2 - slope0
3 - slope0 flip x
4 - slope1
5 - slope1 flip x
6 - slope2
7 - slope2 flip x
*/
/*****************************************************************************/
/*****************************************************************************/
/*****************************************************************************/
@ -76,14 +86,26 @@ int Height=Map.GetHeight();
sExpColTile &ThisElem=Map.Get(X,Y);
u8 OutElem;
OutElem=ThisElem.Flags<<COLLISION_TYPE_FLAG_SHIFT;
OutElem|=ThisElem.Tile;
OutElem=ThisElem.Tile;
OutElem|=ThisElem.Flags<<COLLISION_TYPE_FLAG_SHIFT;
/*
OutElem=0;
if (ThisElem.Tile || ThisElem.Flags)
{
int FF=ThisElem.Tile & 1;
int T=(ThisElem.Tile>>1)+1;
OutElem=((T-1)*4)+1;
OutElem+=FF;
OutElem|=ThisElem.Flags<<COLLISION_TYPE_FLAG_SHIFT;
if (ThisElem.Tile>(u16)COLLISION_MASK)
}
*/
/* if (ThisElem.Tile>(u16)COLLISION_MASK)
{
printf("COLLISION OVERFLOW %s: %i,%i=(%i,%i)!!\n",MapName,X,Y,ThisElem.Tile,ThisElem.Flags);
}
*/
fwrite(&OutElem,sizeof(u8),1,File);
}
}

View file

@ -63,7 +63,11 @@ int i,ListSize=ThingList.size();
OutThing.Type=ThisThing.Type;
OutThing.Speed=ThisThing.Data.Hazard.HazardSpeed;
OutThing.TurnRate=ThisThing.Data.Hazard.HazardTurnRate;
OutThing.Flags=ThisThing.Data.Hazard.HazardCollisionFlag;
OutThing.Flags=0;
if (ThisThing.Data.Hazard.HazardCollisionFlag) OutThing.Flags|=THING_FLAG_COLLISION;
if (ThisThing.Data.Flip & PC_TILE_FLAG_MIRROR_X) OutThing.Flags|=THING_FLAG_MIRRORX;
if (ThisThing.Data.Flip & PC_TILE_FLAG_MIRROR_Y) OutThing.Flags|=THING_FLAG_MIRRORY;
OutThing.PointCount=PointCount;
OutThing.Respawn=ThisThing.Data.Hazard.HazardRespawn;
OutThing.Gfx=RemapTable[i];

View file

@ -62,7 +62,11 @@ int i,ListSize=ThingList.size();
OutThing.Type=ThisThing.Type;
OutThing.Speed=ThisThing.Data.Platform.PlatformSpeed;
OutThing.TurnRate=ThisThing.Data.Platform.PlatformTurnRate;
OutThing.Flags=ThisThing.Data.Platform.PlatformCollisionFlag;
OutThing.Flags=0;
if (ThisThing.Data.Platform.PlatformCollisionFlag) OutThing.Flags|=THING_FLAG_COLLISION;
if (ThisThing.Data.Flip & PC_TILE_FLAG_MIRROR_X) OutThing.Flags|=THING_FLAG_MIRRORX;
if (ThisThing.Data.Flip & PC_TILE_FLAG_MIRROR_Y) OutThing.Flags|=THING_FLAG_MIRRORY;
OutThing.PointCount=PointCount;
OutThing.Gfx=RemapTable[i];
OutThing.Param0=ThisThing.Data.Platform.PlatformParam0;