In win32_handmade.cpp we have following code:
| win32_fader Fader;
InitFader(&Fader, Instance);
|
InitFader function only tries to set Fader->Window member, but always leaves Fader->State and Fader->Alpha uninitialized. It actually can also skip assignment to Fader->Window if RegisterClassA fails (unlikely).
Not initializing Fader->State member, will make assertion later in UpdateFade to fail:
| switch(Fader->State)
{
...
default:
{
Assert(!"Unrecognized fader state!");
} break;
}
|
Because Fader->State will contain garbage value (whatever is on the stack in Fader structure) and no case will match it.