This commit is contained in:
Daveo 2001-04-01 20:22:49 +00:00
parent 1966aa6f60
commit 2b171295b5
44 changed files with 588 additions and 603 deletions

View file

@ -110,12 +110,12 @@ BOOL operator==(sExpMapElem const &v1)
/*****************************************************************************/
/*** Things ******************************************************************/
/*****************************************************************************/
struct sExpLayerActor
struct sExpLayerThing
{
int Speed;
int TurnRate;
int Health;
int AttackStrength;
int Speed;
int TurnRate;
bool CollisionFlag;
bool PlayerFlag;
int Spare[8];

View file

@ -131,26 +131,3 @@ void CLayerActor::GUIChanged(CCore *Core)
}
}
/*****************************************************************************/
/*** Functions ***************************************************************/
/*****************************************************************************/
void CLayerActor::ExportThing(CExport &Exp,sLayerThing &ThisThing)
{
int i,ListSize=ThisThing.XY.size();
sExpLayerActor OutThing;
// Point List
Exp.Write(&ListSize,sizeof(int));
for (i=0 ;i<ListSize; i++)
{
Exp.Write(&ThisThing.XY[i],sizeof(CPoint));
}
// Thing
OutThing.Health=ThisThing.Data.Health;
OutThing.AttackStrength=ThisThing.Data.AttackStrength;
OutThing.Speed=ThisThing.Data.Speed;
OutThing.TurnRate=ThisThing.Data.TurnRate;
OutThing.CollisionFlag=ThisThing.Data.CollisionFlag;
OutThing.PlayerFlag=ThisThing.Data.PlayerFlag;
Exp.Write(&OutThing,sizeof(sExpLayerActor));
}

View file

@ -31,9 +31,6 @@ public:
void GUIThingUpdate(bool OnlySel=false);
void GUIThingPointUpdate(bool OnlySel=false);
void ExportThing(CExport &Exp,sLayerThing &ThisThing);
protected:
CGUILayerActor GUI;

View file

@ -114,27 +114,3 @@ void CLayerItem::GUIChanged(CCore *Core)
{
}
/*****************************************************************************/
/*** Functions ***************************************************************/
/*****************************************************************************/
void CLayerItem::ExportThing(CExport &Exp,sLayerThing &ThisThing)
{
/*
int i,ListSize=ThisThing.XY.size();
sExpLayerItem OutThing;
// Point List
Exp.Write(&ListSize,sizeof(int));
for (i=0 ;i<ListSize; i++)
{
Exp.Write(&ThisThing.XY[i],sizeof(CPoint));
}
// Thing
OutThing.Health=ThisThing.Data.Health;
OutThing.AttackStrength=ThisThing.Data.AttackStrength;
OutThing.Speed=ThisThing.Data.Speed;
OutThing.TurnRate=ThisThing.Data.TurnRate;
OutThing.CollisionFlag=ThisThing.Data.CollisionFlag;
OutThing.PlayerFlag=ThisThing.Data.PlayerFlag;
Exp.Write(&OutThing,sizeof(sExpLayerItem));
*/
}

View file

@ -30,9 +30,6 @@ public:
void GUIThingDefClear();
void GUIThingUpdate(bool OnlySel=false);
void ExportThing(CExport &Exp,sLayerThing &ThisThing);
protected:
CGUILayerItem GUI;

View file

@ -136,27 +136,3 @@ void CLayerPlatform::GUIChanged(CCore *Core)
*/
}
/*****************************************************************************/
/*** Functions ***************************************************************/
/*****************************************************************************/
void CLayerPlatform::ExportThing(CExport &Exp,sLayerThing &ThisThing)
{
/*
int i,ListSize=ThisThing.XY.size();
sExpLayerPlatform OutThing;
// Point List
Exp.Write(&ListSize,sizeof(int));
for (i=0 ;i<ListSize; i++)
{
Exp.Write(&ThisThing.XY[i],sizeof(CPoint));
}
// Thing
OutThing.Health=ThisThing.Data.Health;
OutThing.AttackStrength=ThisThing.Data.AttackStrength;
OutThing.Speed=ThisThing.Data.Speed;
OutThing.TurnRate=ThisThing.Data.TurnRate;
OutThing.CollisionFlag=ThisThing.Data.CollisionFlag;
OutThing.PlayerFlag=ThisThing.Data.PlayerFlag;
Exp.Write(&OutThing,sizeof(sExpLayerPlatform));
*/
}

View file

@ -31,9 +31,6 @@ public:
void GUIThingUpdate(bool OnlySel=false);
void GUIThingPointUpdate(bool OnlySel=false);
void ExportThing(CExport &Exp,sLayerThing &ThisThing);
protected:
// CGUILayerPlatform GUI;

View file

@ -701,6 +701,26 @@ int i,ListSize=ThingList.size();
ExportThingNames(Exp);
}
/*****************************************************************************/
void CLayerThing::ExportThing(CExport &Exp,sLayerThing &ThisThing)
{
int i,ListSize=ThisThing.XY.size();
sExpLayerThing OutThing;
// Point List
Exp.Write(&ListSize,sizeof(int));
for (i=0 ;i<ListSize; i++)
{
Exp.Write(&ThisThing.XY[i],sizeof(CPoint));
}
// Thing
OutThing.Health=ThisThing.Data.Health;
OutThing.AttackStrength=ThisThing.Data.AttackStrength;
OutThing.Speed=ThisThing.Data.Speed;
OutThing.TurnRate=ThisThing.Data.TurnRate;
OutThing.CollisionFlag=ThisThing.Data.CollisionFlag;
OutThing.PlayerFlag=ThisThing.Data.PlayerFlag;
Exp.Write(&OutThing,sizeof(sExpLayerThing));
}
/*****************************************************************************/
void CLayerThing::ExportThingNames(CExport &Exp)

View file

@ -78,7 +78,7 @@ virtual void SaveThingNames(CFile *File);
virtual void LoadThingScript(const char *Filename);
virtual void Export(CCore *Core,CExport &Exp);
virtual void ExportThing(CExport &Exp,sLayerThing &ThisThing)=0;
virtual void ExportThing(CExport &Exp,sLayerThing &ThisThing);
virtual void ExportThingNames(CExport &Exp);
// Functions