SBSPSS/Utils/MapEdit/ExportHdr.h

238 lines
4.6 KiB
C
Raw Normal View History

2001-02-01 15:46:51 +01:00
/**********************/
/*** Export Structs ***/
/**********************/
#ifndef __EXPORT_STRUCTS_HEADER__
#define __EXPORT_STRUCTS_HEADER__
#include <Vector>
#include <List.h>
2001-04-30 23:49:54 +02:00
/*****************************************************************************/
struct sRGBCol
{
u8 R,G,B,P;
2001-07-28 18:33:48 +02:00
bool operator ==(sRGBCol const &v1) {return(R==v1.R && G==v1.G && B==v1.B);}
2001-04-30 23:49:54 +02:00
};
struct sXY
{
int x,y;
};
2001-02-01 15:46:51 +01:00
/*****************************************************************************/
2001-04-09 16:04:42 +02:00
#define EXPORT_LAYER_COUNT 16
2001-02-01 15:46:51 +01:00
struct sExpFileHdr
{
int TileCount;
int TileOfs;
2001-02-06 23:25:39 +01:00
int TileW,TileH;
2001-02-01 15:46:51 +01:00
int TriCount;
int TriOfs;
2001-02-06 23:25:39 +01:00
int SetNameCount;
int SetNameOfs;
int TexNameCount;
int TexNameOfs;
2001-02-01 15:46:51 +01:00
int LayerCount;
2001-02-07 22:31:31 +01:00
int LayerOfs[EXPORT_LAYER_COUNT];
2001-02-01 15:46:51 +01:00
};
/*****************************************************************************/
2001-02-06 23:25:39 +01:00
struct sExpTile
2001-02-01 15:46:51 +01:00
{
2001-02-06 23:25:39 +01:00
int Set;
int Tile;
int TriStart;
int TriCount;
u16 XOfs,YOfs;
u8 *RGB;
// int TexId; // n -1
// int Flags; // Flip Flags
bool operator==(sExpTile const &v1)
{
return(Set==v1.Set && Tile==v1.Tile);
}
};
2001-02-20 16:57:03 +01:00
/*****************************************************************************/
struct sExpColTile
{
u8 Tile;
u8 Flags;
bool operator==(sExpColTile const &v1)
{
return(Tile==v1.Tile && Flags==v1.Flags);
}
};
2001-02-06 23:25:39 +01:00
/*****************************************************************************/
struct sExpTri
{
int TexID;
Vector3 vtx[3];
float uv[3][2];
2001-05-02 20:40:41 +02:00
int Flags;
2001-02-01 15:46:51 +01:00
};
/*****************************************************************************/
/*****************************************************************************/
/*****************************************************************************/
struct sExpLayerHdr
{
int Type;
int SubType;
int Width;
int Height;
};
/*****************************************************************************/
struct sExpLayerTile
{
2001-02-06 23:25:39 +01:00
u16 Tile;
u16 Flags;
// bool operator==(sExpLayerTile const &v1) {return (Tile==v1.Tile);}
2001-04-19 17:36:49 +02:00
//bool operator==(sExpLayerTile const &v1) {return (Tile==v1.Tile);}
bool operator ==(sExpLayerTile const &v1) {return(Tile==v1.Tile && Flags==v1.Flags);}
2001-02-01 15:46:51 +01:00
};
2001-04-30 23:49:54 +02:00
/*****************************************************************************/
/*****************************************************************************/
/*****************************************************************************/
struct sLayerShadeGfx
{
sRGBCol RGB[4];
int Gfx;
sXY Pos;
sXY Ofs[4];
int TransMode;
};
2001-02-01 15:46:51 +01:00
/*****************************************************************************/
2001-04-30 23:49:54 +02:00
/*** Things ******************************************************************/
/*****************************************************************************/
struct sLayerThingDef
2001-02-01 15:46:51 +01:00
{
2001-04-30 23:49:54 +02:00
int Store[32];
};
2001-02-01 15:46:51 +01:00
2001-04-30 23:49:54 +02:00
struct sLayerThingActor
{
int ActorSpeed;
int ActorTurnRate;
int ActorHealth;
int ActorAttackStrength;
bool ActorCollisionFlag;
2001-02-01 15:46:51 +01:00
};
2001-04-30 23:49:54 +02:00
struct sLayerThingItem
2001-02-01 15:46:51 +01:00
{
2001-04-30 23:49:54 +02:00
};
2001-02-01 15:46:51 +01:00
2001-04-30 23:49:54 +02:00
struct sLayerThingPlatform
{
int PlatformSpeed;
int PlatformTurnRate;
int PlatformCollisionFlag;
int PlatformType;
int PlatformMoveType;
int PlatformTriStart;
int PlatformTriCount;
2001-05-05 23:18:12 +02:00
int PlatformParam0;
2001-02-01 15:46:51 +01:00
};
2001-04-30 23:49:54 +02:00
struct sLayerThingTrigger
{
int TriggerWidth;
int TriggerHeight;
int TriggerTargetX;
int TriggerTargetY;
2001-05-05 23:18:12 +02:00
int TriggerTargetW;
int TriggerTargetH;
2001-07-26 18:51:29 +02:00
int TriggerVal0;
int TriggerVal1;
2001-04-30 23:49:54 +02:00
};
struct sLayerThingFX
{
int FXSpeed;
int FXWidth;
int FXHeight;
};
struct sLayerThingHazard
{
int HazardSpeed;
int HazardTurnRate;
int HazardHealth;
int HazardAttackStrength;
int HazardRespawn;
bool HazardCollisionFlag;
int HazardTriStart;
int HazardTriCount;
};
2001-04-07 23:05:33 +02:00
struct sLayerThingData
2001-05-09 23:56:48 +02:00
{
int WaypointCount;
int Angle;
int Flip;
union
{
sLayerThingDef RESERVE;
sLayerThingActor Actor;
sLayerThingItem Item;
sLayerThingPlatform Platform;
sLayerThingTrigger Trigger;
sLayerThingFX FX;
sLayerThingHazard Hazard;
};
};
struct sLayerThingDataV9
2001-03-29 19:59:01 +02:00
{
2001-04-07 23:05:33 +02:00
int WaypointCount;
2001-04-30 23:49:54 +02:00
union
{
sLayerThingDef RESERVE;
sLayerThingActor Actor;
sLayerThingItem Item;
sLayerThingPlatform Platform;
sLayerThingTrigger Trigger;
sLayerThingFX FX;
sLayerThingHazard Hazard;
};
};
struct sLayerThingDataOLD
{
int WaypointCount;
2001-04-01 22:22:49 +02:00
int Speed;
int TurnRate;
2001-04-07 23:05:33 +02:00
int Health;
int AttackStrength;
2001-03-29 19:59:01 +02:00
bool CollisionFlag;
bool PlayerFlag;
2001-04-07 23:05:33 +02:00
// Platform
int MoveType;
int PlatformType;
// Boxes
int Width,Height;
2001-04-23 16:51:44 +02:00
int TriStart,TriCount;
2001-04-30 23:49:54 +02:00
int TargetX,TargetY;
// NO SPARE!!
2001-03-29 19:59:01 +02:00
};
2001-04-07 23:05:33 +02:00
2001-04-30 23:49:54 +02:00
2001-02-01 15:46:51 +01:00
#endif