Hi. I'm trying to get this code written by WSJ on the DHW forums to work. It's meant to animate static objects but when tested in-game on said objects, there are no visible effects. I've read and re-read the code and even tried some changes but no dice. I am trying to do this with the Wolf4SDL code. Any ideas?
Open WL_DRAW.C and look for these lines:
Beneath that, add this:
Open WL_DRAW.C and look for these lines:
- Code:
//
// place static objects
//
for (statptr = &statobjlist[0] ; statptr !=laststatobj ; statptr++)
{
if ((visptr->shapenum = statptr->shapenum) == -1)
continue; // object has been deleted
if (!*statptr->visspot)
continue; // not visable
Beneath that, add this:
- Code:
switch (statptr->shapenum)
{
case SPR_STAT_0:
visptr->shapenum+=(frameon>>4)%2; // slow animation with 2 frames
break;
case SPR_STAT_29:
visptr->shapenum+=(frameon>>2)%4; // fast animation with 4 frames
break;
}
Last edited by Werewolf-3D on Sat Sep 17, 2016 4:05 pm; edited 1 time in total