This commit is contained in:
Daveo 2001-04-19 15:12:21 +00:00
parent d33f59257f
commit aaaed92c9e
28 changed files with 322 additions and 188 deletions

View file

@ -41,9 +41,9 @@ int Height=InMap.GetHeight();
/*** Process *****************************************************************/
/*****************************************************************************/
/*****************************************************************************/
/*
void CMkLevelLayer3d::Process(CMkLevel *Core)
{
/*
int Width=InMap.GetWidth();
int Height=InMap.GetHeight();
int i,ListSize;
@ -149,18 +149,19 @@ int i,ListSize;
}
}
}
*/
}
*/
/*****************************************************************************/
/*****************************************************************************/
/** Write ********************************************************************/
/*****************************************************************************/
/*****************************************************************************/
/*
int CMkLevelLayer3d::Write(FILE *File,const char *LayerName,const char *MapName)
{
int ThisPos=ftell(File);
/*
CMkLevelLayerTile::Write(File,LayerName,MapName);
int Width=OutMap.GetWidth();
int Height=OutMap.GetHeight();
sLayerHdr LayerHdr;
@ -203,11 +204,12 @@ int RetPos=ftell(File);
fseek(File,Pos3d,SEEK_SET);
fwrite(&Hdr3d,sizeof(sLayer3d),1,File);
fseek(File,RetPos,SEEK_SET);
*/
return(ThisPos);
}
*/
/*****************************************************************************/
#if 0
void CMkLevelLayer3d::ProcessVtxList(vector<sVtx> const &InList,vector<sVtx> &OutList)
{
int i,ListSize=InList.size();
@ -263,5 +265,5 @@ sVtx Ofs;
printf("MinXY %i,%i %i,%i\n",XMin,YMin,XMax,YMax);
*/
}
#endif
/*****************************************************************************/

View file

@ -15,13 +15,10 @@ public:
CMkLevelLayer3d(sExpLayerHdr *LayerHdr) : CMkLevelLayerTile(LayerHdr){};
void PreProcess(CMkLevel *Core);
void Process(CMkLevel *Core);
int Write(FILE *File,const char *LayerName,const char *MapName);
// void Process(CMkLevel *Core);
// int Write(FILE *File,const char *LayerName,const char *MapName);
protected:
void ProcessVtxList(vector<sVtx> const &In,vector<sVtx> &Out);
// CFaceStore TriList;
// void ProcessVtxList(vector<sVtx> const &In,vector<sVtx> &Out);
};
/*****************************************************************************/

View file

@ -44,10 +44,10 @@ GString Player=Core->GetConfigStr("MISC","PlayerActor");
}
if (NotFound)
{
GObject::Error(ERR_FATAL,"No Start Point defined");
GObject::Error(ERR_WARNING,"No Start Point defined\n");
}
ProcessList();
ProcessList(Core);
printf("%i actors\n",ThingList.size());
}

View file

@ -26,7 +26,7 @@ void CMkLevelLayerFX::PreProcess(CMkLevel *Core)
/*****************************************************************************/
void CMkLevelLayerFX::Process(CMkLevel *Core)
{
ProcessList();
ProcessList(Core);
printf("%i FX\n",ThingList.size());
}

View file

@ -25,7 +25,7 @@ void CMkLevelLayerItem::PreProcess(CMkLevel *Core)
/*****************************************************************************/
void CMkLevelLayerItem::Process(CMkLevel *Core)
{
ProcessList();
ProcessList(Core);
}
/*****************************************************************************/

View file

@ -25,7 +25,7 @@ void CMkLevelLayerPlatform::PreProcess(CMkLevel *Core)
/*****************************************************************************/
void CMkLevelLayerPlatform::Process(CMkLevel *Core)
{
ProcessList();
ProcessList(Core);
printf("%i Platforms\n",ThingList.size());
}

View file

@ -71,17 +71,17 @@ int i,ListSize=ThingList.size();
}
/*****************************************************************************/
void CMkLevelLayerThing::ProcessList()
void CMkLevelLayerThing::ProcessList(CMkLevel *Core)
{
/*
int i,ListSize=ThingList.size();
CIni &Config=Core->GetConfig();
for (i=0; i<ListSize; i++)
{
sMkLevelLayerThing &ThisThing=ThingList[i];
bool Found=CMkLevel::Config.GetInt(GetTypeName(),ThisThing.Name,ThisThing.Type);
bool Found=Config.GetInt(GetTypeName(),ThisThing.Name,ThisThing.Type);
if (!Found)
GObject::Error(ERR_FATAL,"%s not found in list\n",ThisThing.Name);
}
*/
}

View file

@ -36,7 +36,7 @@ virtual int Write(FILE *File,const char *LayerName,const char *MapName)=0;
protected:
u8 *LoadThing(sMkLevelLayerThing &ThisThing,u8 *Ptr);
void LoadThingNames(char *Ptr);
void ProcessList();
void ProcessList(CMkLevel *Core);
CList<sMkLevelLayerThing> ThingList;

View file

@ -93,15 +93,18 @@ int Height=OutMap.GetHeight();
Hdr.Height=Height;
fwrite(&Hdr,sizeof(sLayerHdr),1,File);
printf("%s (%i,%i)= %i\n",LayerName,Width,Height,Width*Height*sizeof(sTileMapElem));
for (int Y=0; Y<Height; Y++)
{
for (int X=0; X<Width; X++)
{
sMkLevelElem &ThisElem=OutMap.Get(X,Y);
ASSERT(Hdr.SubType!=LAYER_SUBTYPE_ACTION);
fwrite(&ThisElem.Elem,sizeof(u16),1,File);
sTileMapElem OutElem;
OutElem.Tile=ThisElem.Elem;
// OutElem.LightIdx=0;
fwrite(&OutElem,sizeof(sTileMapElem),1,File);
}
}
PadFile(File);

View file

@ -25,7 +25,7 @@ void CMkLevelLayerTrigger::PreProcess(CMkLevel *Core)
/*****************************************************************************/
void CMkLevelLayerTrigger::Process(CMkLevel *Core)
{
ProcessList();
ProcessList(Core);
printf("%i Trigger\n",ThingList.size());
}