This commit is contained in:
parent
d33f59257f
commit
aaaed92c9e
28 changed files with 322 additions and 188 deletions
|
@ -215,3 +215,25 @@ sTgaHdr FileHdr;
|
|||
}
|
||||
|
||||
//***************************************************
|
||||
Vector3 CalcNormal(Vector3 const &v0, Vector3 const &v1, Vector3 const &v2 )
|
||||
{
|
||||
Vector3 dv1, dv2;
|
||||
Vector3 out;
|
||||
|
||||
dv1.x = v1.x - v0.x;
|
||||
dv1.y = v1.y - v0.y;
|
||||
dv1.z = v1.z - v0.z;
|
||||
|
||||
dv2.x = v2.x - v0.x;
|
||||
dv2.y = v2.y - v0.y;
|
||||
dv2.z = v2.z - v0.z;
|
||||
|
||||
out.x = (dv1.z * dv2.y) - (dv1.y * dv2.z);
|
||||
out.y = (dv1.x * dv2.z) - (dv1.z * dv2.x);
|
||||
out.z = (dv1.y * dv2.x) - (dv1.x * dv2.y);
|
||||
|
||||
out.Normalise();
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
|
|
|
@ -72,6 +72,6 @@ void PadFile(FILE *File);
|
|||
|
||||
char *FindFile(const char *Name);
|
||||
void SaveTGA(char *Filename,int W,int H,u8 *Data,bool IsBGR=false);
|
||||
|
||||
Vector3 CalcNormal(Vector3 const &v0, Vector3 const &v1, Vector3 const &v2 );
|
||||
//***************************************************************************
|
||||
#endif
|
|
@ -65,7 +65,7 @@ FILE *File;
|
|||
int Size;
|
||||
char *Script;
|
||||
File=fopen(Filename,"rt");
|
||||
if (!File) return;
|
||||
if (!File) {printf("%s Not Found\n",Filename); return;}
|
||||
fseek(File,0,SEEK_END);
|
||||
Size=ftell(File);
|
||||
fseek(File,0,SEEK_SET);
|
||||
|
|
|
@ -138,6 +138,9 @@ public:
|
|||
|
||||
CFace& operator []( int nIndex ) {return(FaceList[nIndex]);}
|
||||
|
||||
vector<sTri> GetOutTriList() {return(OutTriList);}
|
||||
vector<sQuad> GetOutQuadList() {return(OutQuadList);}
|
||||
|
||||
private:
|
||||
void Quad();
|
||||
void SetupUV(CFace const &In, sTri &Out);
|
||||
|
|
|
@ -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
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ void CMkLevelLayerFX::PreProcess(CMkLevel *Core)
|
|||
/*****************************************************************************/
|
||||
void CMkLevelLayerFX::Process(CMkLevel *Core)
|
||||
{
|
||||
ProcessList();
|
||||
ProcessList(Core);
|
||||
printf("%i FX\n",ThingList.size());
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ void CMkLevelLayerItem::PreProcess(CMkLevel *Core)
|
|||
/*****************************************************************************/
|
||||
void CMkLevelLayerItem::Process(CMkLevel *Core)
|
||||
{
|
||||
ProcessList();
|
||||
ProcessList(Core);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -25,7 +25,7 @@ void CMkLevelLayerPlatform::PreProcess(CMkLevel *Core)
|
|||
/*****************************************************************************/
|
||||
void CMkLevelLayerPlatform::Process(CMkLevel *Core)
|
||||
{
|
||||
ProcessList();
|
||||
ProcessList(Core);
|
||||
printf("%i Platforms\n",ThingList.size());
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -25,7 +25,7 @@ void CMkLevelLayerTrigger::PreProcess(CMkLevel *Core)
|
|||
/*****************************************************************************/
|
||||
void CMkLevelLayerTrigger::Process(CMkLevel *Core)
|
||||
{
|
||||
ProcessList();
|
||||
ProcessList(Core);
|
||||
printf("%i Trigger\n",ThingList.size());
|
||||
|
||||
}
|
||||
|
|
|
@ -96,6 +96,7 @@ std::vector<GString> const &Files = MyFiles.GetFileInfoVector();
|
|||
if (Files.size()==0) Usage("No Levels specified\n");
|
||||
if (Files.size()>1) Usage("Too many Levels specified\n");
|
||||
|
||||
Level.SetAppDir(argv[0]);
|
||||
Level.Init(Files[0],OutStr,TPBase,TPW,TPH);
|
||||
Level.Load();
|
||||
Level.Process();
|
||||
|
|
|
@ -25,14 +25,19 @@
|
|||
#include "Layers\MkLevelLayerTrigger.h"
|
||||
|
||||
//***************************************************************************
|
||||
GString ConfigFilename="MkLevel";
|
||||
sExpLayerTile BlankTile={-1,-1};
|
||||
const GString ConfigFilename="MkLevel.ini";
|
||||
sExpLayerTile BlankTile2d={-1,-1};
|
||||
sExpLayerTile BlankTile3d={0,0};
|
||||
|
||||
//***************************************************************************
|
||||
CMkLevel::CMkLevel()
|
||||
{
|
||||
memset(&LvlHdr,0,sizeof(sLvlHdr));
|
||||
Tile2dList.Add(BlankTile);
|
||||
memset(&LevelHdr,0,sizeof(sLevelHdr));
|
||||
Tile2dList.Add(BlankTile2d);
|
||||
Tile3dList.Add(BlankTile3d);
|
||||
OutTile3dList.resize(1);
|
||||
OutTile3dList[0].TriCount=0;
|
||||
OutTile3dList[0].QuadCount=0;
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
|
@ -41,24 +46,37 @@ CMkLevel::~CMkLevel()
|
|||
}
|
||||
|
||||
//***************************************************************************
|
||||
void CMkLevel::Init(const char *Filename,const char *OutDir,int TPBase,int TPW,int TPH)
|
||||
void CMkLevel::SetAppDir(const char *AppPath)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
AppDir="\\spongebob\\tools\\data\\bin\\";
|
||||
#else
|
||||
GFName Path=AppPath;
|
||||
|
||||
Path.File("");
|
||||
Path.Ext("");
|
||||
AppDir=Path.FullName();
|
||||
#endif
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void CMkLevel::Init(const char *Filename,const char *OutFilename,int TPBase,int TPW,int TPH)
|
||||
{
|
||||
// Setup filenames and paths
|
||||
GFName Path=Filename;
|
||||
GFName Path;
|
||||
|
||||
InFilename=Filename;
|
||||
Path=Filename;
|
||||
LevelName=Path.File();
|
||||
Path.File("");
|
||||
Path.Ext("");
|
||||
InPath=Path.FullName();
|
||||
OutPath=OutDir; OutPath.Append('\\');
|
||||
OutName=OutPath+LevelName;
|
||||
Path=OutFilename;
|
||||
Path.Ext("");
|
||||
OutName=Path.FullName();
|
||||
|
||||
// Load ini file
|
||||
#ifdef _DEBUG
|
||||
ConfigFilename="\\spongebob\\tools\\data\\bin\\mklevel.ini";
|
||||
#endif
|
||||
Config.LoadAndImport(ConfigFilename);
|
||||
Config.LoadAndImport(GString(AppDir+ConfigFilename));
|
||||
|
||||
// Setup Texgrab
|
||||
if (TPBase==-1 || TPW==-1 || TPH==-1)
|
||||
|
@ -77,23 +95,22 @@ GFName Path=Filename;
|
|||
TexGrab.ShrinkToFit(false);
|
||||
|
||||
// Setup TriList
|
||||
OutTriList.SetTexGrab(TexGrab);
|
||||
|
||||
OutFaceList.SetTexGrab(TexGrab);
|
||||
// Set up other stuph
|
||||
|
||||
FlatFace[0].vtx[0].x=+0.5f; FlatFace[0].vtx[0].y=+1.0f; FlatFace[0].vtx[0].z=-4.0f;
|
||||
FlatFace[0].vtx[1].x=-0.5f; FlatFace[0].vtx[1].y= 0.0f; FlatFace[0].vtx[1].z=-4.0f;
|
||||
FlatFace[0].vtx[2].x=+0.5f; FlatFace[0].vtx[2].y= 0.0f; FlatFace[0].vtx[2].z=-4.0f;
|
||||
FlatFace[0].uvs[0].u=1; FlatFace[0].uvs[0].v=1;
|
||||
FlatFace[0].uvs[1].u=0; FlatFace[0].uvs[1].v=0;
|
||||
FlatFace[0].uvs[2].u=1; FlatFace[0].uvs[2].v=0;
|
||||
FlatFace[0].uv[0][0]=1; FlatFace[0].uv[0][1]=1;
|
||||
FlatFace[0].uv[1][0]=0; FlatFace[0].uv[1][1]=0;
|
||||
FlatFace[0].uv[2][0]=1; FlatFace[0].uv[2][1]=0;
|
||||
|
||||
FlatFace[1].vtx[0].x=-0.5f; FlatFace[1].vtx[0].y= 0.0f; FlatFace[1].vtx[0].z=-4.0f;
|
||||
FlatFace[1].vtx[1].x=+0.5f; FlatFace[1].vtx[1].y=+1.0f; FlatFace[1].vtx[1].z=-4.0f;
|
||||
FlatFace[1].vtx[2].x=-0.5f; FlatFace[1].vtx[2].y=+1.0f; FlatFace[1].vtx[2].z=-4.0f;
|
||||
FlatFace[1].uvs[0].u=0; FlatFace[1].uvs[0].v=0;
|
||||
FlatFace[1].uvs[1].u=1; FlatFace[1].uvs[1].v=1;
|
||||
FlatFace[1].uvs[2].u=0; FlatFace[1].uvs[2].v=1;
|
||||
FlatFace[1].uv[0][0]=0; FlatFace[1].uv[0][1]=0;
|
||||
FlatFace[1].uv[1][0]=1; FlatFace[1].uv[1][1]=1;
|
||||
FlatFace[1].uv[2][0]=0; FlatFace[1].uv[2][1]=1;
|
||||
|
||||
}
|
||||
|
||||
|
@ -134,8 +151,9 @@ GString FilePath;
|
|||
|
||||
for (int i=0; i<Count; i++)
|
||||
{
|
||||
if (!strcmp(TexPtr,"BLANK")) GObject::Error(ERR_FATAL,"Old Format. Please Re-export\n");
|
||||
GFName::makeabsolute(InPath,TexPtr,FullName);
|
||||
GString InName=InPath;
|
||||
InName+=TexPtr;
|
||||
GFName::makeabsolute(InPath,InName,FullName);
|
||||
List.push_back(GString(FullName));
|
||||
TexPtr+=strlen(TexPtr)+1;
|
||||
}
|
||||
|
@ -188,7 +206,7 @@ sExpTri *TriPtr=(sExpTri*) &ByteHdr[FileHdr->TriOfs];
|
|||
GString Ext=GFName(InSetNameList[i]).Ext();
|
||||
if (Ext=="BMP")
|
||||
{
|
||||
BmpList[i].LoadBMP(InSetNameList[i]);
|
||||
BmpList[i].LoadBMP(InSetNameList[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -257,7 +275,7 @@ void CMkLevel::Process()
|
|||
ProcessTileBanks();
|
||||
printf("Process Layers\n");
|
||||
ProcessLayers();
|
||||
OutTriList.Process();
|
||||
OutFaceList.Process();
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
|
@ -328,9 +346,9 @@ vector<sTexOutInfo> &TexInfo=TexGrab.GetTexInfo();
|
|||
void CMkLevel::PreProcessTileBank3d()
|
||||
{
|
||||
int i,ListSize=Tile3dList.size();
|
||||
|
||||
for (i=0; i<ListSize; i++)
|
||||
{
|
||||
|
||||
for (i=1; i<ListSize; i++)
|
||||
{ // Skip Blank
|
||||
sExpLayerTile &ThisTile=Tile3dList[i];
|
||||
ThisTile.Tile=Create3dTile(ThisTile);
|
||||
}
|
||||
|
@ -391,18 +409,24 @@ int CMkLevel::Create3dTile(sExpLayerTile &InTile)
|
|||
{
|
||||
sExpTile &SrcTile=InTileList[InTile.Tile];
|
||||
CFace F;
|
||||
int i,ListSize;
|
||||
int i,ListSize,p;
|
||||
CList<sExpTri> SortList;
|
||||
CList<float> ZPosList;
|
||||
sTile3d ThisTile;
|
||||
int TileID=OutTile3dList.size();
|
||||
|
||||
ThisTile.TriStart=OutFaceList.GetFaceCount();
|
||||
ThisTile.QuadCount=0;
|
||||
ThisTile.QuadStart=0;
|
||||
|
||||
if (SrcTile.TriCount)
|
||||
{
|
||||
ThisTile.TriCount=SrcTile.TriCount;
|
||||
for (i=0; i<SrcTile.TriCount; i++)
|
||||
{
|
||||
int ListPos;
|
||||
sExpTri ThisTri=InTriList[SrcTile.TriStart+i];
|
||||
float ThisZPos;
|
||||
|
||||
|
||||
ThisZPos=ThisTri.vtx[0].z;
|
||||
if (ThisZPos>ThisTri.vtx[1].z) ThisZPos=ThisTri.vtx[1].z;
|
||||
|
@ -413,69 +437,86 @@ CList<float> ZPosList;
|
|||
{
|
||||
if (ZPosList[ListPos]<ThisZPos) break;
|
||||
}
|
||||
// Flip 3d tiles
|
||||
bool SwapPnt=false;
|
||||
|
||||
if (InTile.Flags & PC_TILE_FLAG_MIRROR_X)
|
||||
{
|
||||
ThisTri.vtx[0].x=-ThisTri.vtx[0].x;
|
||||
ThisTri.vtx[1].x=-ThisTri.vtx[1].x;
|
||||
ThisTri.vtx[2].x=-ThisTri.vtx[2].x;
|
||||
SwapPnt^=1;
|
||||
}
|
||||
|
||||
if (InTile.Flags & PC_TILE_FLAG_MIRROR_Y)
|
||||
{
|
||||
ThisTri.vtx[0].y =1.0-ThisTri.vtx[0].y;
|
||||
ThisTri.vtx[1].y =1.0-ThisTri.vtx[1].y;
|
||||
ThisTri.vtx[2].y =1.0-ThisTri.vtx[2].y;
|
||||
SwapPnt^=1;
|
||||
}
|
||||
if (SwapPnt)
|
||||
{
|
||||
Vector3 TmpV=ThisTri.vtx[0];
|
||||
ThisTri.vtx[0]=ThisTri.vtx[1];
|
||||
ThisTri.vtx[1]=TmpV;
|
||||
float TmpUVu=ThisTri.uv[0][0];
|
||||
float TmpUVv=ThisTri.uv[0][1];
|
||||
ThisTri.uv[0][0]=ThisTri.uv[1][0];
|
||||
ThisTri.uv[0][1]=ThisTri.uv[1][1];
|
||||
ThisTri.uv[1][0]=TmpUVu;
|
||||
ThisTri.uv[1][1]=TmpUVv;
|
||||
}
|
||||
SortList.insert(ListPos,ThisTri);
|
||||
ZPosList.insert(ListPos,ThisZPos);
|
||||
}
|
||||
|
||||
// Add sorted list to main list
|
||||
|
||||
for (i=0; i<SrcTile.TriCount; i++)
|
||||
{
|
||||
sExpTri &ThisTri=SortList[i];
|
||||
CFace F;
|
||||
F.TexName=InTexNameList[ThisTri.TexID];
|
||||
F.Mat=-1;
|
||||
|
||||
for (int p=0; p<3; p++)
|
||||
{
|
||||
F.vtx[p]=ThisTri.vtx[p];
|
||||
F.uvs[p].u=ThisTri.uv[p][0];
|
||||
F.uvs[p].v=ThisTri.uv[p][1];
|
||||
}
|
||||
OutTriList.AddFace(F,true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{ // create flat tile
|
||||
int TexID=Create2dTex(InTile);
|
||||
|
||||
ThisTile.TriCount=2;
|
||||
for (int i=0; i<2; i++)
|
||||
{
|
||||
FlatFace[i].Mat=TexID;
|
||||
OutTriList.AddFace(FlatFace[i],true);
|
||||
}
|
||||
{
|
||||
FlatFace[i].TexID=TexID;
|
||||
SortList.push_back(FlatFace[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return(0);
|
||||
// Add sorted list to main list
|
||||
ListSize=SortList.size();
|
||||
for (i=0; i<ListSize; i++)
|
||||
{
|
||||
sExpTri &ThisTri=SortList[i];
|
||||
CFace F;
|
||||
bool SwapPnt=false;
|
||||
|
||||
if (SrcTile.TriCount)
|
||||
{
|
||||
F.TexName=InTexNameList[ThisTri.TexID];
|
||||
F.Mat=-1;
|
||||
}
|
||||
else
|
||||
{
|
||||
F.Mat=ThisTri.TexID;
|
||||
}
|
||||
|
||||
for (p=0; p<3; p++)
|
||||
{
|
||||
F.vtx[p]=ThisTri.vtx[p];
|
||||
F.uvs[p].u=ThisTri.uv[p][0];
|
||||
F.uvs[p].v=ThisTri.uv[p][1];
|
||||
}
|
||||
// Flip 3d tiles
|
||||
|
||||
if (InTile.Flags & PC_TILE_FLAG_MIRROR_X)
|
||||
{
|
||||
F.vtx[0].x=-F.vtx[0].x;
|
||||
F.vtx[1].x=-F.vtx[1].x;
|
||||
F.vtx[2].x=-F.vtx[2].x;
|
||||
SwapPnt^=1;
|
||||
}
|
||||
|
||||
if (InTile.Flags & PC_TILE_FLAG_MIRROR_Y)
|
||||
{
|
||||
F.vtx[0].y =1.0-F.vtx[0].y;
|
||||
F.vtx[1].y =1.0-F.vtx[1].y;
|
||||
F.vtx[2].y =1.0-F.vtx[2].y;
|
||||
SwapPnt^=1;
|
||||
}
|
||||
if (SwapPnt)
|
||||
{
|
||||
Vector3 TmpV=F.vtx[0];
|
||||
F.vtx[0]=F.vtx[1];
|
||||
F.vtx[1]=TmpV;
|
||||
sUV TmpUV=F.uvs[0];
|
||||
F.uvs[0]=F.uvs[1];
|
||||
F.uvs[1]=TmpUV;
|
||||
}
|
||||
// Adjust Depth
|
||||
for (p=0;p<3;p++)
|
||||
{
|
||||
// F.vtx[p].z-=4.0f;
|
||||
// printf("%f\n",F.vtx[p].z);
|
||||
}
|
||||
|
||||
OutFaceList.AddFace(F,true);
|
||||
}
|
||||
|
||||
OutTile3dList.push_back(ThisTile);
|
||||
|
||||
return(TileID);
|
||||
}
|
||||
|
||||
|
||||
|
@ -645,60 +686,68 @@ u8 *RGB1=Tex1.RGB;
|
|||
//***************************************************************************
|
||||
void CMkLevel::Write()
|
||||
{
|
||||
GString OutFilename=OutName+".Lvl";
|
||||
|
||||
File=fopen(OutFilename,"wb");
|
||||
|
||||
fwrite(&LevelHdr,1,sizeof(sLevelHdr),File);
|
||||
|
||||
WriteLevel();
|
||||
WriteTileBank();
|
||||
|
||||
// rewrite header
|
||||
fseek(File,0,SEEK_SET);
|
||||
fwrite(&LevelHdr,1,sizeof(sLevelHdr),File);
|
||||
|
||||
fclose(File);
|
||||
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
int MinOT=123456,MaxOT=0;
|
||||
|
||||
void CMkLevel::WriteTileBank()
|
||||
{
|
||||
GString OutFilename=OutName+".Tbk";
|
||||
int i,ListSize;
|
||||
File=fopen(OutFilename,"wb");
|
||||
|
||||
fwrite(&TileBankHdr,1,sizeof(sTileBankHdr),File);
|
||||
|
||||
// 2d Tilebank
|
||||
TileBankHdr.TileBank2d=(sTile2d*)ftell(File);
|
||||
LevelHdr.TileBank2d=(sTile2d*)ftell(File);
|
||||
ListSize=OutTile2dList.size();
|
||||
printf("%i 2d tiles\n",ListSize);
|
||||
for (i=0; i<ListSize; i++)
|
||||
{
|
||||
sTile2d &OutTile=OutTile2dList[i];
|
||||
fwrite(&OutTile,1,sizeof(sTile2d),File);
|
||||
}
|
||||
// 3d Tilebank
|
||||
TileBankHdr.TileBank3d=(sTile3d*)ftell(File);
|
||||
LevelHdr.TileBank3d=(sTile3d*)ftell(File);
|
||||
ListSize=OutTile3dList.size();
|
||||
printf("%i 3d tiles\n",ListSize);
|
||||
for (i=0; i<ListSize; i++)
|
||||
{
|
||||
sTile3d &OutTile=OutTile3dList[i];
|
||||
fwrite(&OutTile,1,sizeof(sTile3d),File);
|
||||
}
|
||||
// TriList
|
||||
TileBankHdr.TriList=(sTri*)WriteTriList();
|
||||
LevelHdr.TriList=(sTri*)WriteTriList();
|
||||
|
||||
// QuadList
|
||||
LevelHdr.QuadList=(sQuad*)WriteQuadList();
|
||||
printf("OT %i -> %i\n",MinOT,MaxOT);
|
||||
|
||||
// VtxList
|
||||
TileBankHdr.VtxList=(sVtx*)ftell(File);
|
||||
OutTriList.WriteVtxList(File);
|
||||
|
||||
// rewrite header
|
||||
fseek(File,0,SEEK_SET);
|
||||
fwrite(&TileBankHdr,1,sizeof(sTileBankHdr),File);
|
||||
|
||||
fclose(File);
|
||||
LevelHdr.VtxList=(sVtx*)WriteVtxList();
|
||||
}
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
int CMkLevel::WriteTriList()
|
||||
{
|
||||
vector<sTri> &TriList=OutTriList.GetOutTriList();
|
||||
vector<sVtx> const &VtxList=OutTriList.GetVtxList();
|
||||
vector<sTri> &TriList=OutFaceList.GetOutTriList();
|
||||
vector<sVtx> const &VtxList=OutFaceList.GetVtxList();
|
||||
int ThisPos=ftell(File);
|
||||
int i,ListSize=TriList.size();
|
||||
int MaxOT=0;
|
||||
|
||||
for (i=0;i<ListSize;i++)
|
||||
{
|
||||
sTri &T=TriList[i];
|
||||
|
@ -713,57 +762,109 @@ int MaxOT=0;
|
|||
{
|
||||
if (OtOfs<Z[p]) OtOfs=Z[p];
|
||||
}
|
||||
OtOfs/=4;
|
||||
if (MinOT>OtOfs) MinOT=OtOfs;
|
||||
if (MaxOT<OtOfs) MaxOT=OtOfs;
|
||||
if (OtOfs>63) OtOfs=63;
|
||||
if (OtOfs>15) OtOfs=15;
|
||||
|
||||
// Write It
|
||||
fwrite(&T,1,sizeof(sTri),File);
|
||||
}
|
||||
printf("MAXOT = %i\n",MaxOT);
|
||||
printf("Tri %i\n",ListSize);
|
||||
|
||||
return(ThisPos);
|
||||
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
int CMkLevel::WriteQuadList()
|
||||
{
|
||||
vector<sQuad> &QuadList=OutFaceList.GetOutQuadList();
|
||||
vector<sVtx> const &VtxList=OutFaceList.GetVtxList();
|
||||
int ThisPos=ftell(File);
|
||||
int i,ListSize=QuadList.size();
|
||||
|
||||
for (i=0;i<ListSize;i++)
|
||||
{
|
||||
sQuad &Q=QuadList[i];
|
||||
int Z[4];
|
||||
int OtOfs=0;
|
||||
// Calc OtOfs
|
||||
Z[0]=abs(VtxList[Q.P0].vz);
|
||||
Z[1]=abs(VtxList[Q.P1].vz);
|
||||
Z[2]=abs(VtxList[Q.P2].vz);
|
||||
Z[3]=abs(VtxList[Q.P3].vz);
|
||||
|
||||
for (int p=0; p<4; p++)
|
||||
{
|
||||
if (OtOfs<Z[p]) OtOfs=Z[p];
|
||||
}
|
||||
if (MinOT>OtOfs) MinOT=OtOfs;
|
||||
if (MaxOT<OtOfs) MaxOT=OtOfs;
|
||||
if (OtOfs>63) OtOfs=63;
|
||||
// Write It
|
||||
fwrite(&Q,1,sizeof(sQuad),File);
|
||||
}
|
||||
printf("Quad %i\n",ListSize,MaxOT);
|
||||
return(ThisPos);
|
||||
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
int CMkLevel::WriteVtxList()
|
||||
{
|
||||
vector<sVtx> const &VtxList=OutFaceList.GetVtxList();
|
||||
int i,ListSize=VtxList.size();
|
||||
int Pos=ftell(File);
|
||||
sVtx Ofs;
|
||||
|
||||
Ofs.vx=-0;
|
||||
Ofs.vy=-0;
|
||||
Ofs.vz=-4*Scale;
|
||||
|
||||
for (i=0; i<ListSize; i++)
|
||||
{
|
||||
sVtx const &In=VtxList[i];
|
||||
sVtx Out;
|
||||
|
||||
Out.vx=+(In.vx+Ofs.vx);
|
||||
Out.vy=-(In.vy+Ofs.vy);
|
||||
Out.vz=+(In.vz+Ofs.vz);
|
||||
|
||||
fwrite(&Out,1,sizeof(sVtx),File);
|
||||
}
|
||||
return(Pos);
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
//*** Write *****************************************************************
|
||||
//***************************************************************************
|
||||
void CMkLevel::WriteLevel()
|
||||
{
|
||||
GString OutFilename=OutName+".Lvl";
|
||||
|
||||
File=fopen(OutFilename,"wb");
|
||||
|
||||
fwrite(&LvlHdr,1,sizeof(sLvlHdr),File);
|
||||
|
||||
WriteLayers();
|
||||
|
||||
// rewrite header
|
||||
fseek(File,0,SEEK_SET);
|
||||
fwrite(&LvlHdr,1,sizeof(sLvlHdr),File);
|
||||
|
||||
fclose(File);
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void CMkLevel::WriteLayers()
|
||||
{
|
||||
// Back (Shade)
|
||||
LvlHdr.BackLayer=WriteLayer(LAYER_TYPE_SHADE,LAYER_SUBTYPE_BACK,0);//"Shade");
|
||||
LevelHdr.BackLayer=WriteLayer(LAYER_TYPE_SHADE,LAYER_SUBTYPE_BACK,0);//"Shade");
|
||||
// Mid
|
||||
LvlHdr.MidLayer=WriteLayer(LAYER_TYPE_TILE,LAYER_SUBTYPE_MID,"Mid");
|
||||
LevelHdr.MidLayer=WriteLayer(LAYER_TYPE_TILE,LAYER_SUBTYPE_MID,"Mid");
|
||||
// Action
|
||||
LvlHdr.ActionLayer=WriteLayer(LAYER_TYPE_TILE,LAYER_SUBTYPE_ACTION,"Action");
|
||||
LevelHdr.ActionLayer=WriteLayer(LAYER_TYPE_TILE,LAYER_SUBTYPE_ACTION,"Action");
|
||||
// Fore
|
||||
// LvlHdr.ForeLayer=WriteLayer(LAYER_TYPE_TILE,LAYER_SUBTYPE_FORE,"Fore");
|
||||
// LevelHdr.ForeLayer=WriteLayer(LAYER_TYPE_TILE,LAYER_SUBTYPE_FORE,"Fore");
|
||||
// Collision
|
||||
LvlHdr.CollisionLayer=WriteLayer(LAYER_TYPE_COLLISION,LAYER_SUBTYPE_NONE,"Collision");
|
||||
LevelHdr.CollisionLayer=WriteLayer(LAYER_TYPE_COLLISION,LAYER_SUBTYPE_NONE,"Collision");
|
||||
|
||||
// Things
|
||||
LvlHdr.ActorList=WriteThings(LAYER_TYPE_ACTOR,"Actor List");
|
||||
LvlHdr.ItemList=WriteThings(LAYER_TYPE_ITEM,"Item List");
|
||||
LvlHdr.PlatformList=WriteThings(LAYER_TYPE_PLATFORM,"Platform List");
|
||||
LvlHdr.TriggerList=WriteThings(LAYER_TYPE_TRIGGER,"FX List");
|
||||
LvlHdr.FXList=WriteThings(LAYER_TYPE_FX,"FX List");
|
||||
LevelHdr.ActorList=WriteThings(LAYER_TYPE_ACTOR,"Actor List");
|
||||
LevelHdr.ItemList=WriteThings(LAYER_TYPE_ITEM,"Item List");
|
||||
LevelHdr.PlatformList=WriteThings(LAYER_TYPE_PLATFORM,"Platform List");
|
||||
LevelHdr.TriggerList=WriteThings(LAYER_TYPE_TRIGGER,"Trigger List");
|
||||
LevelHdr.FXList=WriteThings(LAYER_TYPE_FX,"FX List");
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
|
@ -796,6 +897,7 @@ int Ofs;
|
|||
return(0);
|
||||
}
|
||||
Ofs=ThisLayer->Write(File,LayerName,LevelName);
|
||||
// printf("%s %i\n",LayerName,Ofs);
|
||||
PadFile(File);
|
||||
return(Ofs);
|
||||
}
|
||||
|
|
|
@ -44,7 +44,8 @@ public:
|
|||
CMkLevel();
|
||||
~CMkLevel();
|
||||
|
||||
void Init(const char *InFilename,const char *OutPath,int TPBase,int TPW,int TPH);
|
||||
void SetAppDir(const char *Path);
|
||||
void Init(const char *InFilename,const char *OutFilename,int TPBase,int TPW,int TPH);
|
||||
|
||||
void Load();
|
||||
|
||||
|
@ -62,9 +63,10 @@ public:
|
|||
int BuildTileTex(sMkLevelTex &InTex);
|
||||
|
||||
char *GetConfigStr(const char *Grp,const char *Key) {return(Config.GetStr(Grp,Key));}
|
||||
CIni &GetConfig() {return(Config);}
|
||||
CTexGrab &GetTexGrab() {return(TexGrab);}
|
||||
|
||||
void SetStart(int X,int Y) {LvlHdr.PlayerStartX=X; LvlHdr.PlayerStartY=Y;}
|
||||
void SetStart(int X,int Y) {LevelHdr.PlayerStartX=X; LevelHdr.PlayerStartY=Y;}
|
||||
protected:
|
||||
CMkLevelLayer *FindLayer(int Type,int SubType);
|
||||
void LoadStrList(CList<GString> &List,char *TexPtr,int Count);
|
||||
|
@ -88,13 +90,15 @@ protected:
|
|||
int WriteThings(int Type,const char *LayerName);
|
||||
int WriteTriList();
|
||||
int WriteQuadList();
|
||||
int WriteVtxList();
|
||||
void WriteTileBank();
|
||||
|
||||
void BuildTiles();
|
||||
|
||||
FILE *File;
|
||||
GString InFilename,InPath,LevelName;
|
||||
GString OutPath,OutName;
|
||||
GString OutName;
|
||||
GString AppDir;
|
||||
|
||||
int TileW,TileH;
|
||||
CIni Config;
|
||||
|
@ -106,7 +110,7 @@ protected:
|
|||
CList<GString> UsedSetNameList;
|
||||
CList<GString> UsedTexNameList;
|
||||
|
||||
CFaceStore OutTriList;
|
||||
CFaceStore OutFaceList;
|
||||
CList<sTile2d> OutTile2dList;
|
||||
CList<sTile3d> OutTile3dList;
|
||||
|
||||
|
@ -118,9 +122,9 @@ protected:
|
|||
|
||||
vector<CMkLevelLayer*> LayerList;
|
||||
|
||||
sLvlHdr LvlHdr;
|
||||
sTileBankHdr TileBankHdr;
|
||||
CFace FlatFace[2];
|
||||
sLevelHdr LevelHdr;
|
||||
// sTileBankHdr TileBankHdr;
|
||||
sExpTri FlatFace[2];
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -231,14 +231,15 @@ int Clut=getClut(R.x,R.y);
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CActorPool::AddActor(FileEquate Filename)
|
||||
int CActorPool::AddActor(FileEquate Filename)
|
||||
{
|
||||
sActorPool *Actor;
|
||||
int Idx=FindActorInPool(Filename);
|
||||
|
||||
if (Idx!=-1) return;
|
||||
// Load it
|
||||
LoadActor(Filename);
|
||||
if (Idx!=-1) return(Idx);
|
||||
// Doesnt Exist, soooooo, Load it
|
||||
Idx=LoadActor(Filename);
|
||||
return(Idx);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -249,7 +250,10 @@ int Idx;
|
|||
|
||||
// Find Actor in Pool
|
||||
Idx=FindActorInPool(Filename);
|
||||
if (Idx==-1) ASSERT(!"Actor Not Loaded");
|
||||
if (Idx==-1)
|
||||
{
|
||||
AddActor(Filename);
|
||||
}
|
||||
|
||||
sActorPool &ThisActor=ActorPool[Idx];
|
||||
Actor=new ("CActorGfx") CActorGfx;
|
||||
|
|
|
@ -75,7 +75,7 @@ public:
|
|||
|
||||
static void Init();
|
||||
|
||||
static void AddActor(FileEquate Filename);
|
||||
static int AddActor(FileEquate Filename);
|
||||
static CActorGfx *GetActor(FileEquate Filename);
|
||||
static void DumpActors();
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ sBackRGBTable CLayerBack::BackRGBTable[]=
|
|||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
CLayerBack::CLayerBack(sLvlHdr *LvlHdr,sLayerHdr *Hdr) : CLayerTile(LvlHdr,Hdr)
|
||||
CLayerBack::CLayerBack(sLevelHdr *LevelHdr,sLayerHdr *Hdr) : CLayerTile(LevelHdr,Hdr)
|
||||
{
|
||||
Data=(sLayerShadeHdr*)MakePtr(Hdr,sizeof(sLayerHdr));
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ public:
|
|||
COLOR=1<<3,
|
||||
};
|
||||
|
||||
CLayerBack(sLvlHdr *LvlHdr,sLayerHdr *Hdr);
|
||||
CLayerBack(sLevelHdr *LevelHdr,sLayerHdr *Hdr);
|
||||
~CLayerBack();
|
||||
|
||||
void init(DVECTOR &MapPos,int Shift);
|
||||
|
|
|
@ -19,14 +19,14 @@ const u32 YInc=16<<16;
|
|||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
CLayerTile::CLayerTile(sLvlHdr *LvlHdr,sLayerHdr *Hdr)
|
||||
CLayerTile::CLayerTile(sLevelHdr *LevelHdr,sLayerHdr *Hdr)
|
||||
{
|
||||
LayerHdr=Hdr;
|
||||
MapWidth=LayerHdr->Width;
|
||||
MapHeight=LayerHdr->Height;
|
||||
|
||||
printf("%i %i\n",MapWidth,MapHeight);
|
||||
TileBank2d=LvlHdr->TileBank2d;
|
||||
TileBank2d=LevelHdr->TileBank2d;
|
||||
Map=(sTileMapElem*)MakePtr(Hdr,sizeof(sLayerHdr));
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
SCREEN_TILE_SIZE=SCREEN_TILE_WIDTH*SCREEN_TILE_HEIGHT
|
||||
};
|
||||
|
||||
CLayerTile(sLvlHdr *LvlHdr,sLayerHdr *Hdr);
|
||||
CLayerTile(sLevelHdr *LevelHdr,sLayerHdr *Hdr);
|
||||
virtual ~CLayerTile();
|
||||
|
||||
virtual void init(DVECTOR &MapPos,int Shift);
|
||||
|
|
|
@ -23,12 +23,12 @@ static FontBank *Font;
|
|||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
CLayerTile3d::CLayerTile3d(sLvlHdr *LvlHdr,sLayerHdr *Hdr) : CLayerTile(LvlHdr,Hdr)
|
||||
CLayerTile3d::CLayerTile3d(sLevelHdr *LevelHdr,sLayerHdr *Hdr) : CLayerTile(LevelHdr,Hdr)
|
||||
{
|
||||
TileBank3d=LvlHdr->TileBank3d;
|
||||
TriList=LvlHdr->TriList;
|
||||
QuadList=LvlHdr->QuadList;
|
||||
VtxList=LvlHdr->VtxList;
|
||||
TileBank3d=LevelHdr->TileBank3d;
|
||||
TriList=LevelHdr->TriList;
|
||||
QuadList=LevelHdr->QuadList;
|
||||
VtxList=LevelHdr->VtxList;
|
||||
|
||||
#if defined(_SHOW_POLYZ_)
|
||||
Font=new ("PrimFont") FontBank;
|
||||
|
|
|
@ -11,7 +11,7 @@ class FontBank;
|
|||
class CLayerTile3d : public CLayerTile
|
||||
{
|
||||
public:
|
||||
CLayerTile3d(sLvlHdr *LvlHdr,sLayerHdr *Hdr);
|
||||
CLayerTile3d(sLevelHdr *LevelHdr,sLayerHdr *Hdr);
|
||||
~CLayerTile3d();
|
||||
|
||||
enum
|
||||
|
|
|
@ -135,18 +135,18 @@ sLvlTab *lvlTab=&LvlTable[LevelNo];
|
|||
|
||||
DisplayLoadingScreen(lvlTab);
|
||||
|
||||
LevelHdr=(sLvlHdr*)CFileIO::loadFile(lvlTab->LevelFilename,"Level");
|
||||
LevelHdr=(sLevelHdr*)CFileIO::loadFile(lvlTab->LevelFilename,"Level");
|
||||
LevelHdr->TileBank2d=(sTile2d*) MakePtr(LevelHdr,(int)LevelHdr->TileBank2d);
|
||||
LevelHdr->TileBank3d=(sTile3d*) MakePtr(LevelHdr,(int)LevelHdr->TileBank3d);
|
||||
LevelHdr->TriList=(sTri*) MakePtr(LevelHdr,(int)LevelHdr->TriList);
|
||||
LevelHdr->QuadList=(sQuad*) MakePtr(LevelHdr,(int)LevelHdr->QuadList);
|
||||
LevelHdr->VtxList=(sVtx*) MakePtr(LevelHdr,(int)LevelHdr->VtxList);
|
||||
|
||||
LevelHdr->ActorList=0;
|
||||
LevelHdr->FXList=0;
|
||||
LevelHdr->ItemList=0;
|
||||
LevelHdr->PlatformList=0;
|
||||
LevelHdr->TriggerList=0;
|
||||
printf("ActorList %i\n",(int)LevelHdr->ActorList);
|
||||
printf("ItemList %i\n",(int)LevelHdr->ItemList);
|
||||
printf("Platfrom List %i\n",(int)LevelHdr->PlatformList);
|
||||
printf("TriggerList %i\n",(int)LevelHdr->TriggerList);
|
||||
printf("FXList %i\n",(int)LevelHdr->FXList);
|
||||
|
||||
m_levelTPage=TPLoadTex(lvlTab->TexFilename);
|
||||
|
||||
|
@ -244,7 +244,6 @@ void CLevel::initLayers()
|
|||
// Actors
|
||||
if (LevelHdr->ActorList)
|
||||
{
|
||||
|
||||
sThingHdr *Hdr=(sThingHdr*)MakePtr(LevelHdr,LevelHdr->ActorList);
|
||||
ActorCount=Hdr->Count;
|
||||
ActorList=(sThingActor**)MemAlloc(ActorCount*sizeof(sThingActor**),"Actor List");
|
||||
|
@ -255,7 +254,6 @@ void CLevel::initLayers()
|
|||
ThingPtr+=sizeof(sThingActor);
|
||||
ThingPtr+=ActorList[i]->PointCount*sizeof(u16)*2;
|
||||
}
|
||||
if (Hdr->Count>8) Hdr->Count=0;
|
||||
}
|
||||
// Items
|
||||
if (LevelHdr->ItemList)
|
||||
|
@ -263,7 +261,6 @@ void CLevel::initLayers()
|
|||
sThingHdr *Hdr=(sThingHdr*)MakePtr(LevelHdr,LevelHdr->ItemList);
|
||||
ItemCount=Hdr->Count;
|
||||
ItemList=(sThingItem*)MakePtr(Hdr,sizeof(sThingHdr));
|
||||
|
||||
DVECTOR pos;
|
||||
for(int i=0;i<ItemCount;i++)
|
||||
{
|
||||
|
@ -287,7 +284,6 @@ void CLevel::initLayers()
|
|||
ThingPtr+=sizeof(sThingPlatform);
|
||||
ThingPtr+=PlatformList[i]->PointCount*sizeof(u16)*2;
|
||||
}
|
||||
if (Hdr->Count>8) Hdr->Count=0;
|
||||
}
|
||||
|
||||
// Triggers
|
||||
|
|
|
@ -46,7 +46,7 @@ private:
|
|||
void initLayers();
|
||||
void DisplayLoadingScreen(sLvlTab *lvlTab);
|
||||
|
||||
sLvlHdr *LevelHdr;
|
||||
sLevelHdr *LevelHdr;
|
||||
|
||||
static DVECTOR MapPos;
|
||||
static DVECTOR s_playerSpawnPos;
|
||||
|
|
|
@ -183,7 +183,7 @@ struct sLayerShadeHdr
|
|||
|
||||
//---------------------------------------------------------------------------
|
||||
// Header
|
||||
struct sLvlHdr
|
||||
struct sLevelHdr
|
||||
{
|
||||
u32 BackLayer;
|
||||
u32 MidLayer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue