{CTZDS1}

paths {
    object = resources/objects/;
    gfx = resources/graphics/;
    misc = resources/misc/;
    sound = resources/sound/;
    definition = resources/scripts/definitions/;
    shaders = resources/shaders/;
}

system {
    start = 00:00:000;
    stop = 02:35:000;
    texture_compression = false;
}

screen {
    width = 640;
    height = 480;
    bpp = 32;
    fullscreen = 1;
    near = 1.0;
    far = 6000.0;
}

sound {
    play = 1;
    file = nespower.ogg;
}

objects {
    // ...
}

graphics {
    font = font.png;
    tunnelTex = tunneltex2+.png;
    tunnelTex2 = tunneltex3.png;
    contrazlogo = Contrazlogo.png;
    contrazlogo2 = Contrazlogo2.png;
    contrazlogo4 = Contrazlogo4.png;
    rasterpattern = raster6++.png;
    trashin1 = Trashin1.png;
    trashin2 = Trashin2.png;
    trashin3 = Trashin3.png;
    sign = CSign.png;
    endlogo = endlogo.png;
}

animation {
    // ...
}

binary {
    wavemap = wavemap3.bin;
}

shaders {
    // ...
}

framebuffers {
    fbo1 = 512,512,COLOR_BUFFER;
    fbo2 = 512,512,COLOR_BUFFER;
    scrollbuffer = 2048,32,COLOR_BUFFER;
}

// --------------------
//  Effects (timeline)
// --------------------
timeline {

    Checkpoint 00:00:000;

    // Intro Logo
    intrologoeffect.start(00:00:000, 51);
    intrologoeffect.showLogo(00:06:500);
    intrologoeffect.in(00:16:00);

    fade.start(00:18:00, 90);
    fade.fade(00:18:00, 00:20:00, 0.42, 0.71, 0.72, 0.0, 0.42, 0.71, 0.72, 1.0);
    //fade.fade(00:18:00, 00:20:00, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0);
    fade.stop(00:20:00);

    intrologoeffect.stop(00:20:00);

    Checkpoint 00:20:000;

    // 2 : Textwriter
    text.start(00:20:00, 90);
    text.showBackground(00:20:00, false);
    text.setBoxSize(00:20:00, 1.5, 1.0);
    text.setGridSize(00:20:00, 17,8);
    text.setPosition(00:20:00, -0.75, 0.45);

    text.setBorderSize(00:20:00, 0.0);

    text.ghostWriter(00:20:00, true);
    text.setWriteSpeed(00:20:00, 100);
    text.setBlinkSpeed(00:20:00, 100);

    text.setText(00:20:00,  presents another\\dran enex phlaton   production\\     called );

    text.stop(00:33:200);

    Checkpoint 00:33:000;

    title.start(00:33:200);
    fade.start(00:33:200, 90);
    fade.fade(00:33:200, 00:33:700, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0);
    fade.stop(00:33:700);

    wipescreen.start(00:37:500, 40);
    wipescreen.down(00:37:500);
    wipescreen.stop(00:39:500);

    title.stop(00:39:500);

    bouncescreen.start(00:39:500, 40);
    bouncescreen.up(00:39:500);
    bouncescreen.stop(00:42:000);

    Checkpoint 00:39:500;

    contrazlogo1.start(00:39:500, 49);
    contrazlogo1.setScaleValue(00:39:500, 1.0, 0.25);
    contrazlogo1.setPosition(00:39:500, 0.0, 0.47, -1.25);
    raster.start(00:39:500);
    scrollraster.start(00:42:000, 52);

    Checkpoint 00:50:000;

    scrollraster.stop(00:52:999);

    contrazlogo1.stop(00:53:399);
    raster.stop(00:53:399);

    // Rastergreia faller inn i tunell
    sign.start(00:53:400, 99);
    sign.setTransparency(00:53:400, 0.75);
    sign.setScaleValue(00:53:400, 0.153, 0.15);
    sign.setPosition(00:53:400, 1.13, 0.8, -2.0);
    sign.setRotation(00:53:400, 0.0, 0.0, -1.0);

    contrazlogo1.start(00:53:400, 49, fbo1);
    raster.start(00:53:400, 50, fbo1);

    tunnel.start(00:53:400, 48);
    fliptransitioneffect.start(00:53:400, 51);
    fliptransitioneffect.setBuffer(00:53:400, fbo1);

    Checkpoint 01:00:000;

    tunnel.stop(01:06:799);
    contrazlogo1.stop(01:06:800);
    raster.stop(01:06:800);
    fliptransitioneffect.stop(01:06:800);

    // Tunellen med bokser
    sign.stop(01:06:799);
    sign.start(01:06:800, 89);
    fade.start(01:06:800, 90);
    fade.fade(01:06:800, 01:07:400, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0);
    fade.stop(01:07:400);

    tunnel.start(01:06:800, 10, fbo1);
    chaos.start(01:06:800);
    chaos.setBuffer(01:06:800, fbo1);
    chaos.setIntensity(01:06:800, 0.5);
    chaos.setPosition(01:06:800, -3.3, -2.45, -4.5);
    chaos.setCubeCount(01:06:800, 50, 67);

    Checkpoint 01:07:000;

    text.start(01:07:00, 90);
    text.showBackground(01:07:00, true);
    text.setBoxSize(01:07:00, 1.7, 0.15);
    text.setGridSize(01:07:00, 30,1);
    text.setPosition(01:07:00, -0.85, -0.7);
    text.setBorderSize(01:07:00, 0.05);
    text.ghostWriter(01:07:00, true);
    text.setText(01:07:00,  mmmmmmm---  cubes!);
    text.stop(01:20:00);

    // Tunellen tegnet med bokser igjen med strre kaosfaktor
    fade.start(01:20:00, 91);
    fade.fade(01:20:00, 01:21:00, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0);
    fade.stop(01:21:00);

    chaos.setIntensity(01:20:00, 3.0);

    text.start(01:20:000, 90);
    text.showBackground(01:20:000, true);
    text.setBoxSize(01:20:000, 1.7, 0.15);
    text.setGridSize(01:20:000, 30,1);
    text.setPosition(01:20:000, -0.85, 0.85);
    text.setBorderSize(01:20:000, 0.05);
    text.ghostWriter(01:20:00, true);
    text.setWriteSpeed(01:20:000, 100);
    text.setBlinkSpeed(01:20:000, 100);
    text.setText(01:20:000,  we really like cubes!);
    text.stop(01:26:700);

    chaos.stop(01:26:700);
    tunnel.stop(01:26:700);

    Checkpoint 01:26:700;

    fade.start(01:26:700, 91);
    fade.fade(01:26:700, 01:27:700, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0);
    fade.stop(01:27:700);

    contrazlogo2.start(01:26:700, 51);
    contrazlogo2.setScaleValue(01:26:700, 1.0, 0.25);
    contrazlogo2.setPosition(01:26:700, 0.0, -0.47, -1.50);
    rasterfx.start(01:26:700);

    Checkpoint 01:33:500;

    text.start(01:33:500, 90);
    text.showBackground(01:33:500, true);
    text.setBoxSize(01:33:500, 1.7, 1.15);
    text.setGridSize(01:33:500, 32,20);
    text.setPosition(01:33:500, -0.85, 0.85);
    text.setBorderSize(01:33:500, 0.05);
    text.ghostWriter(01:33:500, true);
    text.setWriteSpeed(01:33:500, 100);
    text.setBlinkSpeed(01:33:500, 100);
    text.setText(01:33:500, \that's it\\hope you enjoyed our little demo\\this demo was released at\solskogen 2006 in norway\\\\credits\\\code by dran- enex and phlaton\\gfx by dran\\music by gloom and flipside);

    Checkpoint 01:55:000;
    text.setText(01:55:00, \greets goes out to\\\asd+ apathy+ ephidrena+ excess+\\gods+ index+ kvasigen+ loonies+\\nature+ nocturnal+ outracks+\\playpsyco+ portal process+\\scarab+ spaceballs+ squirrelz+\\yaphan and everyone at solskogen\\goodbye!);
    text.stop(02:27:000);

    rasterfx.stop(02:27:000);
    contrazlogo2.stop(02:27:000);
    sign.stop(02:27:000);


    bouncescreen2.start(02:27:000, 40);
    bouncescreen2.down(02:27:000);

    endlogo.start(02:27:000, 91);
    endlogo.setPosition(02:27:000, 0.0, 0.0, -1.5);
    endlogo.stop(02:35:000);
    bouncescreen2.stop(02:35:000);












    //text.stop(00:22:00);





    //tunnel.stop(01:20:000);
    //chaos.stop(01:20:000);

//    bouncescreen.stop(00:15:000);
//    contrazlogo1.stop(00:20:000);
//    raster.stop(00:20:000);

//    bouncescreen.start(00:10:000, 40);
//    bouncescreen.up(00:10:000);


//    Checkpoint 00:20:000;

//    tunnel.start(00:20:000, 10, fbo2);

//    chaos.start(00:20:000);
//    chaos.setIntensity(00:20:00, 0.5);
//    chaos.setBuffer(00:20:00, fbo2);
//    chaos.setPosition(00:20:000, -3.3, -2.45, -5.1);
//    chaos.setCubeCount(00:20:000, 50, 67);
    //chaos.setCubeCount(00:20:000, 1, 1);
//    chaos.stop(00:40:000);

//    tunnel.stop(00:40:00);

//    Checkpoint 00:30:00;

    //text.start(00:30:00, 90);
//    text.setBoxSize(00:30:00, 1.5, 1.5);
    //text.setGridSize(00:30:00, 40,1);
//    text.setGridSize(00:30:00, 20,15);
//    text.setPosition(00:30:00, -0.9, 0.55);
//    text.setBorderSize(00:30:00, 0.025);
//    text.ghostWriter(00:30:00, true);
//    text.setWriteSpeed(00:30:00, 100);
//    text.setBlinkSpeed(00:30:00, 100);
//    text.setText(00:30:00,  welcome to\   trashin\\the kewlest\demo ever made!\\plz send fanmail to\\yourawk@contraz.no);
    //text.setText(00:30:00,  welcome to trashin!);
    //text.stop(00:40:00);

//    Checkpoint 00:40:000;

//    tunnel.start(00:40:000);
//    tunnel.stop(00:50:000);

//    Checkpoint 00:50:000;

//    tunnel.start(00:50:001, 50, fbo1);
//    fliptransitioneffect.start(00:50:001, 51);
//    fliptransitioneffect.setBuffer(00:50:001, fbo1);

//    tunnel.stop(01:00:000);
//    fliptransitioneffect.stop(01:00:000);

//    Checkpoint 01:00:000;

//    contrazlogo2.start(01:00:000, 51);
//    contrazlogo2.setScaleValue(01:00:000, 1.0, 0.25);
//    contrazlogo2.setPosition(01:00:000, 0.0, -0.47, -1.50);
//    rasterfx.start(01:00:000);
//    rasterfx.stop(01:20:000);
//    contrazlogo2.stop(01:20:000);

//    Checkpoint 01:20:000;

//    intrologoeffect.start(01:20:000, 51);

//    Checkpoint 01:25:000;
//    intrologoeffect.stop(01:40:000);

//    Checkpoint 01:40:000;
//    bouncingcubeeffect.start(01:40:000);
//    bouncingcubeeffect.stop(02:00:000);

//    Checkpoint 01:40:000;
//    title.start(01:40:000);
//    title.stop(01:50:000);

}

// ---------------------
//  Effect definitions
// ---------------------

starting * StartEffect {
    dummy = dummy;
}

raster * RasterEffect {
    w = 3.0;
    h = 0.05;
    r = 0.0;
    g = 0.0;
    b = 0.0;
    r2 = 1.0;
    g2 = 0.65;
    b2 = 0.25;
    pr = 0.25;
    star_w = 1.5;
    star_h = 1.5;
    star_a = 1000;
}

scrollraster *  ScrollEffect {
    font = font;
    fontbuffer = scrollbuffer;
    text = 0               welcome to trashin'. enjoy the show!;
}

chaos * CubeChaos {
    xpos = 0.0;
    ypos = 0.0;
    zpos = -10.0;
}

tunnel * TunnelEffect {
    tunnelTex = graphics[tunnelTex];
    tunnelTex2 = graphics[tunnelTex2];
}

text * TextwriterEffect {
    texture = font;
    cols = 17;
    rows = 4;
}

contrazlogo1 * DisplayTexture {
    texture = graphics[contrazlogo];
    xpos = 0.0;
    ypos = 0.0;
    zpos = -4.0;
    //alphablend = true;
}

contrazlogo2 * DisplayTexture {
    texture = graphics[contrazlogo2];
    alphablend = true;
}

sign * DisplayTexture {
    texture = graphics[sign];
    alphablend = true;
    zpos = -2.0;
}

endlogo * DisplayTexture {
    texture = graphics[endlogo];
}

rasterfx * RasterFXEffect {
    wavemap = binary[wavemap];
    texture = graphics[rasterpattern];
}

intrologoeffect * IntroLogoEffect {
    texture = graphics[contrazlogo4];
}

fliptransitioneffect * FlipTransitionEffect {
    xpos = 0.0;
}

wipescreen * ScrollWipe {
    dummy = dummy;
}

bouncingcubeeffect * BouncingCubeEffect {
    xpos = 0.0;
}

bouncescreen * BounceWipe {
    dummy = dummy;
}

bouncescreen2 * BounceWipe {
    dummy = dummy;
}

title * TitleEffect {
    trashin1 = graphics[trashin1];
    trashin2 = graphics[trashin2];
    trashin3 = graphics[trashin3];
}

fade * FadeEffect {
    dummy = dummy;
}
