+ int col[3];
+
+ mountcol = PACK_RGB16(colmnt[0], colmnt[1], colmnt[2]);
+ mountcol_mir = PACK_RGB16(colmnt[0] / 2, colmnt[1] / 2, colmnt[2] / 2);
+
+ for(i=0; i<BGCOL_SIZE; i++) {
+ int32_t t = (i << 8) / BGCOL_SIZE;
+ col[0] = colhor[0] + ((colzen[0] - colhor[0]) * t >> 8);
+ col[1] = colhor[1] + ((colzen[1] - colhor[1]) * t >> 8);
+ col[2] = colhor[2] + ((colzen[2] - colhor[2]) * t >> 8);
+ bgcol[i] = PACK_RGB16(col[0], col[1], col[2]);
+ bgcol_mir[i] = PACK_RGB16(col[0] / 2, col[1] / 2, col[2] / 2);
+ }
+
+ for(i=0; i<BGOFFS_SIZE; i++) {
+ float x = 8.0f * (float)i / (float)BGOFFS_SIZE;
+
+ bgoffs[i] = pfbm1(x, 8.0f, 5) * 32 + 16;
+ }