This commit is contained in:
parent
c582c425f8
commit
3149023193
25 changed files with 2648 additions and 0 deletions
63
Utils/MkLevel/Layers/MkLevelLayerTrigger.cpp
Normal file
63
Utils/MkLevel/Layers/MkLevelLayerTrigger.cpp
Normal file
|
@ -0,0 +1,63 @@
|
|||
/*********************/
|
||||
/*** Layer Trigger ***/
|
||||
/*********************/
|
||||
|
||||
#include <Davelib.h>
|
||||
#include <List2d.h>
|
||||
|
||||
//#include "MkLevel.h"
|
||||
#include "MkLevelLayerTrigger.h"
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/*** Pre-Process *************************************************************/
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
void CMkLevelLayerTrigger::PreProcess(CMkLevel *Core)
|
||||
{
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/*** Process *****************************************************************/
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
void CMkLevelLayerTrigger::Process(CMkLevel *Core)
|
||||
{
|
||||
ProcessList();
|
||||
printf("%i Trigger\n",ThingList.size());
|
||||
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/** Write ********************************************************************/
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
int CMkLevelLayerTrigger::Write(FILE *File,const char *LayerName,const char *MapName)
|
||||
{
|
||||
int ThisPos=ftell(File);
|
||||
sThingHdr Hdr;
|
||||
int i,ListSize=ThingList.size();
|
||||
|
||||
Hdr.Count=ListSize;
|
||||
fwrite(&Hdr,sizeof(sThingHdr),1,File);
|
||||
|
||||
for (i=0; i<ListSize; i++)
|
||||
{
|
||||
sMkLevelLayerThing &ThisThing=ThingList[i];
|
||||
sThingTrigger OutThing;
|
||||
|
||||
OutThing.Type=ThisThing.Type;
|
||||
OutThing.Pos.X=ThisThing.XY[0].x;
|
||||
OutThing.Pos.Y=ThisThing.XY[0].y;
|
||||
OutThing.Width=ThisThing.Data.Width;
|
||||
OutThing.Height=ThisThing.Data.Height;
|
||||
fwrite(&OutThing,sizeof(sThingTrigger),1,File);
|
||||
}
|
||||
|
||||
return(ThisPos);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
Loading…
Add table
Add a link
Reference in a new issue