
static int FirstPattern = 1;
static int FirstPos     = 1;

//This contains all the scenes in the demo
static struct {
    int pat, pos;
    bool (*func)(dword time);
} EventTable[] = {
    {  1,  1, SetWait},

    {  1,  1, InitWeave},
    {  2,  1, WeaveNoClear},
    {  2, 32, WeaveNoClear},
    {  3,  1, InitStrobo},
    {  3,  1, WeaveNoClear},
    {  3, 32, InitFlash},
    {  3, 32, StopWeave},
    {  3, 32, SetWait},
    {  4,  1, InitFlash},
    {  4,  1, EndWeave},
    {  5,  1, InitFlash},
    {  5,  1, InitRipple},
    {  5,  1, InitFlash},
    {  6,  1, InitFlash},
    {  6,  1, InitSplit},
//    {  8,  1, InitFlash},
    {  8,  1, InitSplit},
    { 10,  1, EndRipple},
    { 10,  1, InitSat},
    { 10,  1, InitStrobo},
    { 10, 32, BounceSat},
    { 10, 32, InitStrobo},
    { 11,  1, BounceSat},
    { 11,  1, InitStrobo},
    { 11, 32, BounceSat},
    { 11, 32, InitStrobo},
    { 12,  1, BounceSat},
    { 12,  1, InitStrobo},
    { 12, 32, InitRT},
    { 13, 32, SetUseSat},
    { 14,  1, EndSat},
    { 14,  1, SetUseRT},
    { 14,  1, InitStrobo},
    { 18,  1, FlipPal2},
    { 21,  1, IncRTBalls},
    { 21,  1, InitStrobo},
    { 22,  1, IncRTBalls},
    { 22,  1, InitStrobo},
    { 23,  1, IncRTBalls},
    { 23,  1, InitStrobo},
    { 24,  1, EndRT},
    { 24,  1, InitSq},
    { 24,  1, InitStrobo},
    { 25,  1, BreakSq},
    { 26,  1, BreakSq},
    { 26,  1, InitStrobo},
    { 27,  1, BreakSq},
    { 28, 44, InitFadeOut},
    { 29,  1, EndSq},

    { 29,  1, InitSplit},
    { 29,  1, InitPsys},

    { 30,  1, FlipPal1},
    { 30, 32, FlipPal1},
    { 31,  1, FlipPal1},
    { 31, 32, FlipPal1},
    { 31, 46, InitFadeOut},
    { 32,  1, EndPsys},

    { 32,  1, DrawDragon},
    { 32,  1, SetWait},

    { 33, 46, InitFadeOut},
    { 34,  1, InitFeedback},

    { 36,  1, EndFeedback},
    { 36,  1, InitCircler},
    { 37,  1, ChangeCircler},
    { 37,  1, FlipPal1},
    { 38,  1, ChangeCircler},
    { 38,  1, FlipPal1},
    { 39,  1, ChangeCircler},
    { 39,  1, FlipPal1},
    { 40,  1, InitFadeOut},
    { 40, 32, EndCircler},

    { 40, 32, DrawFinalPic},
    { 40, 32, SetWait},
    { 40, 52, LoadTmap32},
    { 41,  1, InitFadeOut},
    { 41, 32, InitTmap32},

    { 49,  1, SetWait},
    { 49, 32, ByeBye},
    { 49, 32, NULL},
};

