accc: only need to check for different surf or mat when generating triangle strips

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9446 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 53e6dc6c91b26a11237a5779cb5a91d3026075a9
Former-commit-id: 2a9ba08b1ee3862c940d952981b39c5663d71803
This commit is contained in:
iobyte 2024-06-15 20:13:32 +00:00
parent 18df64e1e6
commit 2e544286b9

View file

@ -209,9 +209,9 @@ void mapNormalToSphere(std::list<ob_t> &objects);
void mapNormalToSphere2(std::list<ob_t> &objects);
void normalMap(std::list<ob_t> &objects);
void mapTextureEnv(std::list<ob_t> &objects);
point_t tmpPoint[100000];
tcoord_t tmpva[100000];
uv_t tmptexa[100000];
point_t tmpPoint[500000];
tcoord_t tmpva[500000];
uv_t tmptexa[500000];
int refs = 0;
const char * const shadowtexture = "shadow2.png";
@ -1292,7 +1292,7 @@ int doSurf(char *Line, std::list<ob_t> &objects, std::vector<mat_t> &materials)
}
// Check for an object with multiple surfaces with different SURF types.
// Can't convert multiple triangles with different SURF types into a triangle strip with a single SURF type.
if ((typeConvertion == _AC3DTOAC3DS || typeConvertion == _AC3DTOAC3DGROUP) && numrefs && surf != attrSurf)
if ((typeConvertion == _AC3DTOAC3DS || typeConvertion == _AC3DTOAC3DGROUP) && extendedStrips && numrefs && surf != attrSurf)
{
fprintf(stderr, "multiple SURF in object 0x%x and 0x%x (OBJECT needs splitting by SURF type?)\n", surf, attrSurf);
return (-1);
@ -1320,7 +1320,7 @@ int doMat(char *Line, std::list<ob_t> &objects, std::vector<mat_t> &materials)
}
// Check for an object with multiple surfaces with different material types.
// Can't convert multiple triangles with different material types into a triangle strip with a single material type.
if ((typeConvertion == _AC3DTOAC3DS || typeConvertion == _AC3DTOAC3DGROUP) && numrefs && mat != attrMat)
if ((typeConvertion == _AC3DTOAC3DS || typeConvertion == _AC3DTOAC3DGROUP) && extendedStrips && numrefs && mat != attrMat)
{
fprintf(stderr, "multiple mat in object %d and %d (OBJECT needs splitting by material type?)\n", mat, attrMat);
return (-1);