This commit is contained in:
parent
a6710337c0
commit
cb772db46a
30 changed files with 197 additions and 108 deletions
|
@ -99,7 +99,7 @@ GFName Path=Filename;
|
|||
Create2dTexture(TexCache,Path.File(),Node);
|
||||
Build2dDrawList(TexCache,DrawList[ElemType2d]);
|
||||
BlankFlag=false;
|
||||
if (!ValidFlag) SetInvalid();
|
||||
// if (!ValidFlag) SetInvalid();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -245,6 +245,7 @@ std::vector<int> const &NodeTriMat=ThisNode.GetTriMaterial();
|
|||
|
||||
std::vector<GString> const &SceneTexList=ThisScene.GetTexList();
|
||||
std::vector<int> const &SceneUsedMatList=ThisScene.GetUsedMaterialIdx();
|
||||
std::vector<Material> const &SceneMatList=ThisScene.GetMaterials();
|
||||
int TexCount=SceneTexList.size();
|
||||
|
||||
int TriCount=NodeTriList.size();
|
||||
|
@ -257,7 +258,7 @@ int ListSize=TriList.size();
|
|||
sUVTri const &ThisUV=NodeUVList[T];
|
||||
sTriFace &Tri=TriList[ListSize+T];
|
||||
int ThisMat=NodeTriMat[T];
|
||||
int TexID;
|
||||
int TexID,TexFlags;
|
||||
|
||||
|
||||
// Sort Textures - Only add the ones that are used :o)
|
||||
|
@ -269,10 +270,12 @@ int ListSize=TriList.size();
|
|||
AfxMessageBox(mexstr,MB_OK | MB_ICONEXCLAMATION);
|
||||
TexID=0;
|
||||
}
|
||||
else
|
||||
// else
|
||||
{
|
||||
TexFlags=SceneMatList[TexID].Flags;
|
||||
GString ThisName;
|
||||
GString TexName=SceneTexList[TexID];
|
||||
|
||||
ThisName=SetPath+TexName;
|
||||
TRACE2("%i !%s!\n",TexID,ThisName);
|
||||
TexID=TexCache.ProcessTexture(ThisName);
|
||||
|
@ -293,6 +296,7 @@ Matrix4x4 TransMtx;
|
|||
Tri.uvs[p].u=ThisUV.p[p].u;
|
||||
Tri.uvs[p].v=ThisUV.p[p].v;
|
||||
Tri.Mat=TexID;
|
||||
Tri.Flags=TexFlags;
|
||||
}
|
||||
}
|
||||
for (int Child=0; Child<ChildCount; Child++) Build3dElem(TexCache,ThisScene,ThisNode.PruneChildList[Child]);
|
||||
|
@ -470,7 +474,7 @@ void CElem::Purge()
|
|||
for (int i=0; i<ElemTypeMax; i++)
|
||||
glDeleteLists(DrawList[i],1);
|
||||
CleanUp();
|
||||
TriList.clear();
|
||||
// TriList.clear();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -17,14 +17,20 @@
|
|||
#include "MapEdit.h"
|
||||
#include "GUIElemList.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
struct sTriFace
|
||||
{
|
||||
int Mat;
|
||||
int Flags;
|
||||
Vector3 vtx[3];
|
||||
int pts[3];
|
||||
sUV uvs[3];
|
||||
};
|
||||
|
||||
enum TRI_FLAGS
|
||||
{
|
||||
TRI_FLAGS_TRANS_ADD=1<<0,
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -74,6 +74,7 @@ struct sExpTri
|
|||
int TexID;
|
||||
Vector3 vtx[3];
|
||||
float uv[3][2];
|
||||
int Flags;
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -37,26 +37,26 @@ Class25=CMapEditDoc
|
|||
Class26=CMapEditView
|
||||
|
||||
ResourceCount=21
|
||||
Resource1=IDR_MAINFRAME (English (U.S.))
|
||||
Resource1=IDD_LAYER_COLLISION
|
||||
Resource2=IDR_MAPEDITYPE (English (U.S.))
|
||||
Resource3=IDD_ABOUTBOX (English (U.S.))
|
||||
Resource4=IDD_ELEMLIST
|
||||
Resource5=IDD_LAYER_LIST
|
||||
Resource6=IDD_TOOLBAR
|
||||
Resource7=IDD_NEWMAP
|
||||
Resource8=IDD_ADDLAYER
|
||||
Resource9=IDD_LAYER_TRIGGER
|
||||
Resource10=IDD_LAYER_THING_POS
|
||||
Resource11=IDD_LAYER_SHADE
|
||||
Resource12=IDD_LAYER_COLLISION
|
||||
Resource13=IDD_MULTIBAR (English (U.S.))
|
||||
Resource14=IDD_LAYER_ACTOR
|
||||
Resource15=IDD_LAYER_THING
|
||||
Resource16=IDD_RESIZE
|
||||
Resource17=IDD_LAYER_PLATFORM
|
||||
Resource18=IDD_TILEBANK
|
||||
Resource19=IDD_LAYER_FX
|
||||
Resource20=IDR_TOOLBAR (English (U.S.))
|
||||
Resource3=IDD_ELEMLIST
|
||||
Resource4=IDD_MULTIBAR (English (U.S.))
|
||||
Resource5=IDD_LAYER_THING
|
||||
Resource6=IDR_TOOLBAR (English (U.S.))
|
||||
Resource7=IDD_LAYER_PLATFORM
|
||||
Resource8=IDD_LAYER_TRIGGER
|
||||
Resource9=IDD_TILEBANK
|
||||
Resource10=IDD_NEWMAP
|
||||
Resource11=IDR_MAINFRAME (English (U.S.))
|
||||
Resource12=IDD_ABOUTBOX (English (U.S.))
|
||||
Resource13=IDD_LAYER_ACTOR
|
||||
Resource14=IDD_LAYER_LIST
|
||||
Resource15=IDD_RESIZE
|
||||
Resource16=IDD_LAYER_THING_POS
|
||||
Resource17=IDD_ADDLAYER
|
||||
Resource18=IDD_LAYER_FX
|
||||
Resource19=IDD_TOOLBAR
|
||||
Resource20=IDD_LAYER_SHADE
|
||||
Resource21=IDD_LAYER_HAZARD
|
||||
|
||||
[CLS:CChildFrame]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue