This commit is contained in:
parent
2b18408e9a
commit
948f32ea2e
8 changed files with 244 additions and 102 deletions
|
@ -74,6 +74,13 @@ Vector3 DefVtxTable[8]=
|
|||
};
|
||||
#define DefVtxTableSize sizeof(DefVtxTable)/sizeof(Vector3)
|
||||
|
||||
float SnapThresh=0.05f;
|
||||
float SnapXMin=-0.5f;
|
||||
float SnapXMax=+0.5f;
|
||||
float SnapYMin=-0.0f;
|
||||
float SnapYMax=+1.0f;
|
||||
float SnapZMin=-4.0f;
|
||||
float SnapZMax=+4.0f;
|
||||
|
||||
//***************************************************************************
|
||||
CMkLevel::CMkLevel()
|
||||
|
@ -393,14 +400,6 @@ u8 *ByteHdr=(u8*)FileHdr;
|
|||
|
||||
|
||||
//***************************************************************************
|
||||
float SnapThresh=0.05f;
|
||||
float SnapXMin=-0.5f;
|
||||
float SnapXMax=+0.5f;
|
||||
float SnapYMin=-0.0f;
|
||||
float SnapYMax=+1.0f;
|
||||
float SnapZMin=-4.0f;
|
||||
float SnapZMax=+4.0f;
|
||||
|
||||
void CMkLevel::SnapTiles()
|
||||
{
|
||||
int i,ListSize=InTileList.size();
|
||||
|
@ -565,21 +564,28 @@ CFaceStore &ThisList=ThisElem.FaceStore;
|
|||
if (!ThisElem.LocalGeom)
|
||||
{ // Global Geom
|
||||
ThisList.Process(OutTriList,OutQuadList,OutVtxList);
|
||||
CalcOtOfs(OutTriList,OutVtxList,ThisElem.Elem3d.TriStart,ThisList.GetTriFaceCount());
|
||||
CalcOtOfs(OutQuadList,OutVtxList,ThisElem.Elem3d.QuadStart,ThisList.GetQuadFaceCount());
|
||||
}
|
||||
else
|
||||
{ // Local Geom
|
||||
vector<sVtx> LocalVtxList;
|
||||
AddDefVtx(LocalVtxList);
|
||||
// AddDefVtx(LocalVtxList);
|
||||
ThisList.Process(OutTriList,OutQuadList,LocalVtxList);
|
||||
ThisElem.LocalVtxIdxStart=OutLocalVtxIdxList.size();
|
||||
printf("%i\n",LocalVtxList.size());
|
||||
ThisElem.Elem3d.VtxIdxStart=OutLocalVtxIdxList.size();
|
||||
// printf("%i\n",LocalVtxList.size());
|
||||
|
||||
int v,VtxListSize=LocalVtxList.size();
|
||||
for (v=0; v<VtxListSize; v++)
|
||||
int VtxListSize=LocalVtxList.size();
|
||||
for (int v=0; v<VtxListSize; v++)
|
||||
{
|
||||
u16 Idx=CFaceStore::AddVtx(OutVtxList,LocalVtxList[v]);
|
||||
OutLocalVtxIdxList.push_back(Idx);
|
||||
}
|
||||
ThisElem.Elem3d.VtxTriCount=VtxListSize/3;
|
||||
if (VtxListSize%3) ThisElem.Elem3d.VtxTriCount++;
|
||||
|
||||
CalcOtOfs(OutTriList,LocalVtxList,ThisElem.Elem3d.TriStart,ThisList.GetTriFaceCount());
|
||||
CalcOtOfs(OutQuadList,LocalVtxList,ThisElem.Elem3d.QuadStart,ThisList.GetQuadFaceCount());
|
||||
}
|
||||
|
||||
ThisElem.Elem3d.TriCount=ThisList.GetTriFaceCount();
|
||||
|
@ -592,6 +598,70 @@ CFaceStore &ThisList=ThisElem.FaceStore;
|
|||
}
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void CMkLevel::CalcOtOfs(vector<sTri> &PList,vector<sVtx> &VtxList,int Start,int Count)
|
||||
{
|
||||
int ZOfs=+4*Scale;
|
||||
|
||||
for (int i=0;i<Count;i++)
|
||||
{
|
||||
sTri &P=PList[Start+i];
|
||||
int OtOfs=0;
|
||||
int Z[3];
|
||||
// Get VtxZ
|
||||
|
||||
Z[0]=VtxList[P.P0].vz+ZOfs;
|
||||
Z[1]=VtxList[P.P1].vz+ZOfs;
|
||||
Z[2]=VtxList[P.P2].vz+ZOfs;
|
||||
|
||||
for (int p=0; p<3; p++)
|
||||
{
|
||||
OtOfs+=Z[p]*Z[p];
|
||||
}
|
||||
|
||||
OtOfs=((int)sqrt(OtOfs/3))/8;
|
||||
|
||||
OtOfs+=P.OTOfs;
|
||||
|
||||
if (OtOfs>15) OtOfs=15;
|
||||
if (OtOfs<0) OtOfs=0;
|
||||
|
||||
P.OTOfs=OtOfs;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void CMkLevel::CalcOtOfs(vector<sQuad> &PList,vector<sVtx> &VtxList,int Start,int Count)
|
||||
{
|
||||
int ZOfs=+4*Scale;
|
||||
|
||||
for (int i=0;i<Count;i++)
|
||||
{
|
||||
sQuad &P=PList[Start+i];
|
||||
int OtOfs=0;
|
||||
int Z[4];
|
||||
// Get VtxZ
|
||||
|
||||
Z[0]=VtxList[P.P0].vz+ZOfs;
|
||||
Z[1]=VtxList[P.P1].vz+ZOfs;
|
||||
Z[2]=VtxList[P.P2].vz+ZOfs;
|
||||
Z[3]=VtxList[P.P3].vz+ZOfs;
|
||||
|
||||
for (int p=0; p<4; p++) OtOfs+=Z[p]*Z[p];
|
||||
|
||||
OtOfs=((int)sqrt(OtOfs/4))/8;
|
||||
|
||||
OtOfs+=P.OTOfs;
|
||||
|
||||
if (OtOfs>15) OtOfs=15;
|
||||
if (OtOfs<0) OtOfs=0;
|
||||
|
||||
P.OTOfs=OtOfs;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void CMkLevel::SetUpTileUV(sElem2d &Out, sTexOutInfo &Info)
|
||||
{
|
||||
|
@ -895,8 +965,6 @@ GString OutFilename=OutName+".Lvl";
|
|||
}
|
||||
|
||||
//***************************************************************************
|
||||
int MinOT=123456,MaxOT=0;
|
||||
|
||||
void CMkLevel::WriteElemBanks()
|
||||
{
|
||||
int i,ListSize;
|
||||
|
@ -928,54 +996,30 @@ int i,ListSize;
|
|||
|
||||
// VtxList
|
||||
LevelHdr.VtxList=(sVtx*)WriteVtxList();
|
||||
// VtxIdxList
|
||||
LevelHdr.VtxIdxList=(u16*)ftell(File);
|
||||
ListSize=OutLocalVtxIdxList.size();
|
||||
for (i=0; i<ListSize; i++)
|
||||
{
|
||||
u16 &ThisIdx=OutLocalVtxIdxList[i];
|
||||
fwrite(&ThisIdx,1,sizeof(u16),File);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
int ZMin=9999,ZMax=0;
|
||||
int SnapCount[8]={0,0,0,0,0,0,0,0};
|
||||
int CMkLevel::WriteTriList()
|
||||
{
|
||||
int ThisPos=ftell(File);
|
||||
int i,ListSize=OutTriList.size();
|
||||
int ZOfs=+4*Scale;
|
||||
|
||||
for (i=0;i<ListSize;i++)
|
||||
{
|
||||
sTri &T=OutTriList[i];
|
||||
int OtOfs=0;
|
||||
int Z[3];
|
||||
|
||||
// Calc OtOfs
|
||||
Z[0]=OutVtxList[T.P0].vz+ZOfs;
|
||||
Z[1]=OutVtxList[T.P1].vz+ZOfs;
|
||||
Z[2]=OutVtxList[T.P2].vz+ZOfs;
|
||||
|
||||
if (T.P0<8) SnapCount[T.P0]++;
|
||||
if (T.P1<8) SnapCount[T.P1]++;
|
||||
if (T.P2<8) SnapCount[T.P2]++;
|
||||
for (int p=0; p<3; p++)
|
||||
{
|
||||
if (ZMin>Z[p]) ZMin=Z[p];
|
||||
if (ZMax<Z[p]) ZMax=Z[p];
|
||||
OtOfs+=Z[p]*Z[p];
|
||||
}
|
||||
OtOfs=(int)sqrt(OtOfs/3);
|
||||
|
||||
OtOfs/=8;
|
||||
if (MinOT>OtOfs) MinOT=OtOfs;
|
||||
if (MaxOT<OtOfs) MaxOT=OtOfs;
|
||||
|
||||
OtOfs+=T.OTOfs;
|
||||
if (OtOfs>15) OtOfs=15;
|
||||
if (OtOfs<0) OtOfs=0;
|
||||
|
||||
T.OTOfs=OtOfs;
|
||||
// Write It
|
||||
fwrite(&T,1,sizeof(sTri),File);
|
||||
}
|
||||
printf("%i Tris\t(%i Bytes)\n",ListSize,ListSize*sizeof(sTri));
|
||||
// printf("\n"); for (i=0; i<8;i++) printf("Snapped Vtx %i=%i \n",i,SnapCount[i]); printf("\n");
|
||||
return(ThisPos);
|
||||
}
|
||||
|
||||
|
@ -984,54 +1028,23 @@ int CMkLevel::WriteQuadList()
|
|||
{
|
||||
int ThisPos=ftell(File);
|
||||
int i,ListSize=OutQuadList.size();
|
||||
int ZOfs=+4*Scale;
|
||||
|
||||
for (i=0;i<ListSize;i++)
|
||||
{
|
||||
sQuad &Q=OutQuadList[i];
|
||||
int OtOfs=0;
|
||||
int Z[4];
|
||||
|
||||
// Calc OtOfs
|
||||
Z[0]=OutVtxList[Q.P0].vz+ZOfs;
|
||||
Z[1]=OutVtxList[Q.P1].vz+ZOfs;
|
||||
Z[2]=OutVtxList[Q.P2].vz+ZOfs;
|
||||
Z[3]=OutVtxList[Q.P3].vz+ZOfs;
|
||||
|
||||
if (Q.P0<8) SnapCount[Q.P0]++;
|
||||
if (Q.P1<8) SnapCount[Q.P1]++;
|
||||
if (Q.P2<8) SnapCount[Q.P2]++;
|
||||
if (Q.P3<8) SnapCount[Q.P3]++;
|
||||
for (int p=0; p<4; p++)
|
||||
{
|
||||
if (ZMin>Z[p]) ZMin=Z[p];
|
||||
if (ZMax<Z[p]) ZMax=Z[p];
|
||||
OtOfs+=Z[p]*Z[p];
|
||||
}
|
||||
OtOfs=(int)sqrt(OtOfs/4);
|
||||
|
||||
OtOfs/=8;
|
||||
if (MinOT>OtOfs) MinOT=OtOfs;
|
||||
if (MaxOT<OtOfs) MaxOT=OtOfs;
|
||||
if (OtOfs>15) OtOfs=15;
|
||||
if (OtOfs<0) OtOfs=0;
|
||||
|
||||
Q.OTOfs=OtOfs;
|
||||
// Write It
|
||||
fwrite(&Q,1,sizeof(sQuad),File);
|
||||
}
|
||||
printf("%i Quads\t(%i Bytes)\n",ListSize,ListSize*sizeof(sQuad));
|
||||
// printf("\n"); for (i=0; i<8;i++) printf("Snapped Vtx %i=%i \n",i,SnapCount[i]); printf("\n");
|
||||
return(ThisPos);
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
sVtx Min={+100,+100,+100};
|
||||
sVtx Max={-100,-100,-100};
|
||||
int CMkLevel::WriteVtxList()
|
||||
{
|
||||
int i,ListSize=OutVtxList.size();
|
||||
int Pos=ftell(File);
|
||||
sVtx Min={+100,+100,+100};
|
||||
sVtx Max={-100,-100,-100};
|
||||
|
||||
for (i=0; i<ListSize; i++)
|
||||
{
|
||||
|
@ -1048,7 +1061,6 @@ int Pos=ftell(File);
|
|||
Max.vy=__max(Max.vy,Out.vy);
|
||||
Max.vz=__max(Max.vz,Out.vz);
|
||||
fwrite(&Out,1,sizeof(sVtx),File);
|
||||
// if (abs(Out.vz)==400) printf("%i %i %i\n",Out.vx,Out.vy,Out.vz);
|
||||
}
|
||||
printf("%i Vtx\t(%i Bytes)\n",ListSize,ListSize*sizeof(sVtx));
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ struct sOutElem3d
|
|||
sElem3d Elem3d;
|
||||
CFaceStore FaceStore;
|
||||
// CList<u16> LocalVtxIdxList;
|
||||
int LocalVtxIdxStart;
|
||||
// int LocalVtxIdxStart;
|
||||
int LocalVtxIdxCount;
|
||||
int OTOfs;
|
||||
};
|
||||
|
@ -163,6 +163,9 @@ protected:
|
|||
|
||||
void ExpTri2Face(sExpTri &In,CFace &Out,bool ImportTex=true);
|
||||
|
||||
void CalcOtOfs(vector<sTri> &TList,vector<sVtx> &VtxList,int Start,int Count);
|
||||
void CalcOtOfs(vector<sQuad> &TList,vector<sVtx> &VtxList,int Start,int Count);
|
||||
|
||||
FILE *File;
|
||||
GString InFilename,InPath,LevelName,LevelFullName;
|
||||
GString OutName,OutIncName;
|
||||
|
|
|
@ -38,8 +38,7 @@ TEMP_FILE := $(TEMP_BUILD_DIR)/build.tmp
|
|||
#----------------------------------------------------------------------------
|
||||
#--- Levels -----------------------------------------------------------------
|
||||
#----------------------------------------------------------------------------
|
||||
LEVELS_MODEL_TO_ADD := -m:$(GRAF_DIR)/Platforms/Bubble/Bubble.gin
|
||||
LEVELS_OPTS := -t:8,4,1 -s:16
|
||||
LEVELS_OPTS := -t:8,4,1 -s:16 -l
|
||||
LEVELS_IN_DIR := $(GRAF_DIR)/levels
|
||||
LEVELS_OUT_DIR := $(DATA_OUT)/levels
|
||||
LEVELS_MAKEFILE_DIR := $(TEMP_BUILD_DIR)/levels
|
||||
|
|
|
@ -31,6 +31,15 @@ static const int SCREEN_TILE3D_HEIGHT =(INGAME_SCREENH/BLOCK_SIZE)+SCREEN_TILE_A
|
|||
static const int RENDER_X_OFS =INGAME_SCREENOFS_X-(SCREEN_TILE_ADJ_L*BLOCK_SIZE)+INGAME_RENDER_OFS_X;
|
||||
static const int RENDER_Y_OFS =INGAME_SCREENOFS_Y-(SCREEN_TILE_ADJ_U*BLOCK_SIZE)+INGAME_RENDER_OFS_Y;
|
||||
|
||||
/*****************************************************************************/
|
||||
sFlipTable FlipTable[4]=
|
||||
{
|
||||
{{+4096,0,+4096,0},0<<31}, //00 <0
|
||||
{{-4096,0,+4096,0},1<<31}, //01 >0
|
||||
{{+4096,0,-4096,0},1<<31}, //10 >0
|
||||
{{-4096,0,-4096,0},0<<31} //11 <0
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
|
@ -40,6 +49,7 @@ CLayerTile3d::CLayerTile3d(sLevelHdr *LevelHdr,sLayerHdr *Hdr) : CLayerTile(Leve
|
|||
TriList=LevelHdr->TriList;
|
||||
QuadList=LevelHdr->QuadList;
|
||||
VtxList=LevelHdr->VtxList;
|
||||
VtxIdxList=LevelHdr->VtxIdxList;
|
||||
|
||||
#if defined(_SHOW_POLYZ_)
|
||||
Font=new ("PrimFont") FontBank;
|
||||
|
@ -111,15 +121,124 @@ void CLayerTile3d::think(DVECTOR &MapPos)
|
|||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
sFlipTable FlipTable[4]=
|
||||
void CLayerTile3d::CacheElemVtx(sElem3d *Elem)
|
||||
{
|
||||
{{+4096,0,+4096,0},0<<31}, //00 <0
|
||||
{{-4096,0,+4096,0},1<<31}, //01 >0
|
||||
{{+4096,0,-4096,0},1<<31}, //10 >0
|
||||
{{-4096,0,-4096,0},0<<31} //11 <0
|
||||
};
|
||||
int Count=Elem->VtxTriCount;
|
||||
sVtx *V0,*V1,*V2;
|
||||
u16 *IdxTable=&VtxIdxList[Elem->VtxIdxStart];
|
||||
u32 *OutVtx=(u32*)SCRATCH_RAM;
|
||||
u32 *OutPtr;
|
||||
|
||||
V0=&VtxList[*IdxTable++];
|
||||
V1=&VtxList[*IdxTable++];
|
||||
V2=&VtxList[*IdxTable++];
|
||||
gte_ldv3(V0,V1,V2);
|
||||
|
||||
while (Count--)
|
||||
{
|
||||
gte_rtpt_b(); // 22 cycles
|
||||
// Preload next (when able) - Must check this
|
||||
V0=&VtxList[*IdxTable++];
|
||||
V1=&VtxList[*IdxTable++];
|
||||
V2=&VtxList[*IdxTable++];
|
||||
OutPtr=OutVtx;
|
||||
OutVtx+=3;
|
||||
gte_ldv3(V0,V1,V2);
|
||||
gte_stsxy3c(OutPtr); // read XY back
|
||||
}
|
||||
|
||||
}
|
||||
/*****************************************************************************/
|
||||
void CLayerTile3d::render()
|
||||
{
|
||||
sTileMapElem *MapPtr=GetMapPos();
|
||||
u8 *PrimPtr=GetPrimPtr();
|
||||
POLY_FT3 *TPrimPtr=(POLY_FT3*)PrimPtr;
|
||||
u32 *XYList=(u32*)SCRATCH_RAM;
|
||||
u32 T0,T1,T2;
|
||||
u32 P0,P1,P2;
|
||||
s32 ClipZ;
|
||||
sOT *ThisOT;
|
||||
VECTOR BlkPos;
|
||||
|
||||
// Setup Trans Matrix
|
||||
BlkPos.vx=RENDER_X_OFS-(ShiftX)+RenderOfs.vx;
|
||||
BlkPos.vy=RENDER_Y_OFS-(ShiftY)+RenderOfs.vy;
|
||||
|
||||
for (int Y=0; Y<RenderH; Y++)
|
||||
{
|
||||
sTileMapElem *MapRow=MapPtr;
|
||||
s32 BlkXOld=BlkPos.vx;
|
||||
|
||||
for (int X=0; X<RenderW; X++)
|
||||
{
|
||||
u16 Tile=MapRow->Tile;
|
||||
u16 TileIdx=Tile>>2;
|
||||
u16 Flip=Tile&3;
|
||||
sFlipTable *FTab=&FlipTable[Flip];
|
||||
sElem3d *Elem=&ElemBank3d[TileIdx];
|
||||
|
||||
int TriCount=Elem->TriCount;
|
||||
sTri *TList=&TriList[Elem->TriStart];
|
||||
|
||||
CMX_SetTransMtxXY(&BlkPos);
|
||||
CMX_SetRotMatrixXY(&FTab->Mtx);
|
||||
CacheElemVtx(Elem);
|
||||
while (TriCount--) // Blank tiles rejected here (as no tri-count)
|
||||
{
|
||||
|
||||
P0=XYList[TList->P0];
|
||||
P1=XYList[TList->P1];
|
||||
P2=XYList[TList->P2];
|
||||
gte_ldsxy0(P0);
|
||||
gte_ldsxy1(P1);
|
||||
gte_ldsxy2(P2);
|
||||
|
||||
setlen(TPrimPtr, GPU_PolyFT3Tag);
|
||||
TPrimPtr->code=TList->PolyCode;
|
||||
gte_nclip_b(); // 8 cycles
|
||||
|
||||
setShadeTex(TPrimPtr,1);
|
||||
|
||||
T0=*(u32*)&TList->uv0; // Get UV0 & TPage
|
||||
T1=*(u32*)&TList->uv1; // Get UV1 & Clut
|
||||
T2=*(u16*)&TList->uv2; // Get UV2
|
||||
*(u32*)&TPrimPtr->u0=T0; // Set UV0
|
||||
*(u32*)&TPrimPtr->u1=T1; // Set UV1
|
||||
*(u16*)&TPrimPtr->u2=T2; // Set UV2
|
||||
gte_stopz(&ClipZ);
|
||||
ThisOT=OtPtr+TList->OTOfs;
|
||||
ClipZ^=FTab->ClipCode;
|
||||
TList++;
|
||||
if (ClipZ<0)
|
||||
{
|
||||
*(u32*)&TPrimPtr->x0=P0; // Set XY0
|
||||
*(u32*)&TPrimPtr->x1=P1; // Set XY1
|
||||
*(u32*)&TPrimPtr->x2=P2; // Set XY2
|
||||
addPrim(ThisOT,TPrimPtr);
|
||||
TPrimPtr++;
|
||||
}
|
||||
}
|
||||
MapRow++;
|
||||
BlkPos.vx+=BLOCK_SIZE;
|
||||
}
|
||||
MapPtr+=MapWidth;
|
||||
BlkPos.vx=BlkXOld;
|
||||
BlkPos.vy+=BLOCK_SIZE;
|
||||
}
|
||||
|
||||
SetPrimPtr((u8*)TPrimPtr);
|
||||
|
||||
#if defined(_SHOW_POLYZ_)
|
||||
char Txt[256];
|
||||
int TCount=((u8*)TPrimPtr-PrimPtr)/sizeof(POLY_FT3);
|
||||
int QCount=0;
|
||||
sprintf(Txt,"TC %i\nQC %i",TCount,QCount);
|
||||
Font->print( 128, 32, Txt);
|
||||
#endif
|
||||
|
||||
}
|
||||
/*
|
||||
void CLayerTile3d::render()
|
||||
{
|
||||
sTileMapElem *MapPtr=GetMapPos();
|
||||
|
@ -149,8 +268,12 @@ VECTOR BlkPos;
|
|||
sElem3d *Elem=&ElemBank3d[TileIdx];
|
||||
int TriCount=Elem->TriCount;
|
||||
sTri *TList=&TriList[Elem->TriStart];
|
||||
u16 *IdxTable=&VtxIdxList[Elem->VtxIdxStart];
|
||||
|
||||
P0=&VtxList[TList->P0]; P1=&VtxList[TList->P1]; P2=&VtxList[TList->P2];
|
||||
// P0=&VtxList[TList->P0]; P1=&VtxList[TList->P1]; P2=&VtxList[TList->P2];
|
||||
P0=&VtxList[IdxTable[TList->P0]];
|
||||
P1=&VtxList[IdxTable[TList->P1]];
|
||||
P2=&VtxList[IdxTable[TList->P2]];
|
||||
CMX_SetTransMtxXY(&BlkPos);
|
||||
CMX_SetRotMatrixXY(&FTab->Mtx);
|
||||
while (TriCount--) // Blank tiles rejected here (as no tri-count)
|
||||
|
@ -202,3 +325,5 @@ int QCount=0;
|
|||
#endif
|
||||
|
||||
}
|
||||
|
||||
*/
|
|
@ -36,10 +36,13 @@ public:
|
|||
void render();
|
||||
|
||||
protected:
|
||||
void CacheElemVtx(sElem3d *Elem);
|
||||
|
||||
sElem3d *ElemBank3d;
|
||||
sTri *TriList;
|
||||
sQuad *QuadList;
|
||||
sVtx *VtxList;
|
||||
u16 *VtxIdxList;
|
||||
DVECTOR RenderOfs;
|
||||
};
|
||||
|
||||
|
|
|
@ -207,6 +207,7 @@ sLvlTab *lvlTab=&LvlTable[LevelNo];
|
|||
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->VtxIdxList=(u16*) MakePtr(LevelHdr,(int)LevelHdr->VtxIdxList);
|
||||
LevelHdr->ModelList=(sModel*) MakePtr(LevelHdr,(int)LevelHdr->ModelList);
|
||||
|
||||
CModelGfx::SetData(LevelHdr);//LevelHdr->ModelList,LevelHdr->TriList,LevelHdr->QuadList,LevelHdr->VtxList);
|
||||
|
|
Binary file not shown.
|
@ -155,9 +155,8 @@ struct sElem3d
|
|||
u16 TriCount;
|
||||
u16 QuadStart;
|
||||
u16 QuadCount;
|
||||
u16 VtxStart;
|
||||
u8 TVtxCount;
|
||||
u8 SVtxCount;
|
||||
u16 VtxIdxStart;
|
||||
u16 VtxTriCount;
|
||||
}; // 12
|
||||
|
||||
//***************************************************************************
|
||||
|
@ -231,7 +230,7 @@ struct sLevelHdr
|
|||
sTri *TriList;
|
||||
sQuad *QuadList;
|
||||
sVtx *VtxList;
|
||||
u16 *LocalVtxList;
|
||||
u16 *VtxIdxList;
|
||||
sModel *ModelList;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue