Author Topic: Wolfenstein 3D fizzlefade (SCI-related)  (Read 2189 times)

0 Members and 1 Guest are viewing this topic.

Offline lskovlun

Wolfenstein 3D fizzlefade (SCI-related)
« on: May 05, 2021, 01:38:33 PM »
So today I learned why Sierra's DISSOLVE algorithm (aka dpOPEN_CHECKBOARD) works. Shame on me for not realizing earlier, but I'm not a graphics guy. It is described here in terms of Wolfenstein 3D, but it is easy to see that it is the same thing.

https://fabiensanglard.net/fizzlefade/index.php



Offline Kawa

Re: Wolfenstein 3D fizzlefade (SCI-related)
« Reply #1 on: May 05, 2021, 02:07:58 PM »
Similar  in technique, at least. You be the judge exactly how similar.

Code: [Select]
word  i, j, x, y, rand = 1234;
rand &= RANDMASK; //#define RANDMASK 0x240
for (j = 0; j < 64; j++)
{
for (i = 0; i < 16; i++)
{
if (rand & 1)
rand = (rand / 2) ^ RANDMASK;
else
rand /= 2;
x = rand % 40;
y = rand / 40;
//reveal or black out rect (x * 8, y * 8, (x * 8) + 8, (y * 8) + 8)
}
}
Code: [Select]
long rndval = 1;
short x, y;
do
{
y =  rndval & 0x000FF; //Y = low 8 bits
x = (rndval & 0x1FF00) >> 8; //X = High 9 bits
unsigned lsb = rndval & 1;
rndval >>= 1;
if (lsb) rndval ^= 0x00012000;
//black out pixel (x, y)
} while (rndval != 1);


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.034 seconds with 22 queries.