diff --git a/polymer/eduke32/build/include/build.h b/polymer/eduke32/build/include/build.h index 4be171c8d..9cdc6a835 100644 --- a/polymer/eduke32/build/include/build.h +++ b/polymer/eduke32/build/include/build.h @@ -1285,7 +1285,7 @@ void hicsetpalettetint(int32_t palnum, char r, char g, char b, char effect); // flags bitset: 1 = don't compress int32_t hicsetsubsttex(int32_t picnum, int32_t palnum, const char *filen, float alphacut, float xscale, float yscale, float specpower, float specfactor, char flags); -int32_t hicsetskybox(int32_t picnum, int32_t palnum, char *faces[6]); +int32_t hicsetskybox(int32_t picnum, int32_t palnum, char *faces[6], int32_t flags); int32_t hicclearsubst(int32_t picnum, int32_t palnum); int32_t Ptile2tile(int32_t tile, int32_t pallet) ATTRIBUTE((pure)); diff --git a/polymer/eduke32/build/src/defs.c b/polymer/eduke32/build/src/defs.c index 077ce98bb..c5d212815 100644 --- a/polymer/eduke32/build/src/defs.c +++ b/polymer/eduke32/build/src/defs.c @@ -366,7 +366,7 @@ static int32_t defsparser(scriptfile *script) } if (i < 6 || !happy) break; #ifdef USE_OPENGL - hicsetskybox(tile,pal,fn); + hicsetskybox(tile,pal,fn, 0); #endif } break; @@ -1186,6 +1186,7 @@ static int32_t defsparser(scriptfile *script) { "detailscale", T_PARAM }, { "specpower", T_SPECPOWER }, { "specularpower", T_SPECPOWER }, { "parallaxscale", T_SPECPOWER }, { "specfactor", T_SPECFACTOR }, { "specularfactor", T_SPECFACTOR }, { "parallaxbias", T_SPECFACTOR }, + }; if (scriptfile_getbraces(script,&skinend)) break; @@ -1490,7 +1491,7 @@ static int32_t defsparser(scriptfile *script) char *skyboxtokptr = script->ltextptr; char *fn[6] = {0,0,0,0,0,0}; char *modelend; - int32_t i, tile = -1, pal = 0, happy = 1; + int32_t i, tile = -1, pal = 0, happy = 1, flags = 0; static const tokenlist skyboxtokens[] = { @@ -1501,7 +1502,9 @@ static int32_t defsparser(scriptfile *script) { "bk" ,T_BACK },{ "back" ,T_BACK }, { "lf" ,T_LEFT },{ "left" ,T_LEFT },{ "lt" ,T_LEFT }, { "up" ,T_TOP },{ "top" ,T_TOP },{ "ceiling",T_TOP },{ "ceil" ,T_TOP }, - { "dn" ,T_BOTTOM },{ "bottom" ,T_BOTTOM },{ "floor" ,T_BOTTOM },{ "down" ,T_BOTTOM } + { "dn" ,T_BOTTOM },{ "bottom" ,T_BOTTOM },{ "floor" ,T_BOTTOM },{ "down" ,T_BOTTOM }, + { "nocompress", T_NOCOMPRESS }, + { "nodownsize", T_NODOWNSIZE }, }; if (scriptfile_getbraces(script,&modelend)) break; @@ -1526,6 +1529,12 @@ static int32_t defsparser(scriptfile *script) scriptfile_getstring(script,&fn[4]); break; case T_BOTTOM: scriptfile_getstring(script,&fn[5]); break; +#ifdef USE_OPENGL + case T_NOCOMPRESS: + flags |= 1; break; + case T_NODOWNSIZE: + flags |= 16; break; +#endif } } @@ -1540,7 +1549,7 @@ static int32_t defsparser(scriptfile *script) if (!happy) break; #ifdef USE_OPENGL - hicsetskybox(tile,pal,fn); + hicsetskybox(tile,pal,fn, flags); #endif } break; diff --git a/polymer/eduke32/build/src/hightile.c b/polymer/eduke32/build/src/hightile.c index 209d8e76d..e60fb4d21 100644 --- a/polymer/eduke32/build/src/hightile.c +++ b/polymer/eduke32/build/src/hightile.c @@ -197,7 +197,7 @@ int32_t hicsetsubsttex(int32_t picnum, int32_t palnum, const char *filen, float // hicsetskybox(picnum,pal,faces[6]) // Specifies a graphic files making up a skybox. // -int32_t hicsetskybox(int32_t picnum, int32_t palnum, char *faces[6]) +int32_t hicsetskybox( int32_t picnum, int32_t palnum, char *faces[6], int32_t flags ) { hicreplctyp *hr, *hrn; int32_t j; @@ -222,23 +222,18 @@ int32_t hicsetskybox(int32_t picnum, int32_t palnum, char *faces[6]) else hrn = hr; if (!hrn->skybox) - { hrn->skybox = (struct hicskybox_t *)Xcalloc(1,sizeof(struct hicskybox_t)); - } else { - for (j=5; j>=0; j--) - { - if (hrn->skybox->face[j]) - Bfree(hrn->skybox->face[j]); - } + for (j=0; j<6; j++) + DO_FREE_AND_NULL(hrn->skybox->face[j]); } // store each face's filename for (j=0; j<6; j++) - { hrn->skybox->face[j] = Xstrdup(faces[j]); - } + + hrn->flags = flags; if (hr == NULL) { @@ -307,11 +302,12 @@ int32_t hicsetsubsttex(int32_t picnum, int32_t palnum, const char *filen, float UNREFERENCED_PARAMETER(alphacut); return 0; } -int32_t hicsetskybox(int32_t picnum, int32_t palnum, char *faces[6]) +int32_t hicsetskybox(int32_t picnum, int32_t palnum, char *faces[6], int32_t flags) { UNREFERENCED_PARAMETER(picnum); UNREFERENCED_PARAMETER(palnum); UNREFERENCED_PARAMETER(faces); + UNREFERENCED_PARAMETER(flags); return 0; } int32_t hicclearsubst(int32_t picnum, int32_t palnum)