diff --git a/polymer/eduke32/build/src/defs.c b/polymer/eduke32/build/src/defs.c index 7c26c3380..7ff2f6bba 100644 --- a/polymer/eduke32/build/src/defs.c +++ b/polymer/eduke32/build/src/defs.c @@ -3504,11 +3504,12 @@ static int32_t defsparser(scriptfile *script) switch (value) { - case 0: /*case 1:*/ case 2: case 4: case 8: case 16: case 32: case 64: case 128: + case 1: case 3: case 7: case 15: case 31: case 63: case 127: + case 2: case 4: case 8: case 16: case 32: case 64: case 128: #ifdef USE_OPENGL - for (int32_t a = 1, value2 = value*2; a <= value; ++a) + for (int32_t a = 1, value2 = value*2 + (value&1); a <= value; ++a) { - float finv2value = 0.5f/(float)value; + float finv2value = 1.f/(float)value2; glblend_t * const glb = glblend + a; *glb = defaultglblend; @@ -3516,6 +3517,7 @@ static int32_t defsparser(scriptfile *script) glb->def[1].alpha = (float)a * finv2value; } #endif + case 0: numalphatabs = value; break; default: diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 06d2a69f7..454592fe5 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -4725,7 +4725,7 @@ static size_t falpha_to_blend(float alpha, int32_t *cstatptr, uint8_t *blendptr, { int32_t cstat = *cstatptr | transbit1; - int32_t const twonumalphatabs = 2*numalphatabs; + int32_t const twonumalphatabs = 2*numalphatabs + (numalphatabs&1); int32_t blendidx = Blrintf(alpha * twonumalphatabs); if (blendidx > numalphatabs) {