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

0 Members and 1 Guest are viewing this topic.

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

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 0x240for (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);`

Page created in 0.095 seconds with 24 queries.