{CTZDS1}

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

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

screen {
    width = 1280;
    height = 800;
    bpp = 32;
    fullscreen = 0;
    near = 1.0;
    far = 898.0;
    fsaa = 0;
    vsync = true;
}

sound {
    play = 1;
    file = 80s_contraz.mp3;
}

objects {
    ghettoobj = BlasterFinal.vbo;
    tvobj = tvfbx++.vbo;
    disco = LightraysAndBottom.fbx.vbo;
    discoballA = discoball.vbo;
    cube = unit_cube.vbo;
}

graphics {
    // Outrun
    treetex = palmtree2.png; // outrun
    outrunbg = outrunbg.png; // outrun
    car_straight = OutrunStraight.png;
    car_straight_up = OutrunUp.png;
    car_straight_down = OutrunDown.png;
    car_left = OutrunLeft.png;
    car_right = OutrunRight.png;
    tape1 = tape1.png;
    tape2 = tape2.png;
    tape3 = tape3.png;
    tape4 = tape4.png;
    glow = light2.png;
    tvframe = tvframe.png;
    scanlines = stripes3+.png;

    groundlight = light.png;
    contrazlogo = contrazlogo2.png;
    introtext = Introtext+.png;

    // Intro
    ctzlogo = ctzlogo.png;
    ctzlogobg = ctzlogobg.png;
    presents = presents.png;
    presentsbg = presentsbg.png;
    trashin87 = trashin87.png;
    trashin87bg = trashin87bg.png;

    // Creds
    credsbg1 = creditsbg1.png;
    credsbg2 = creditsbg2.png;
    credsbg3 = creditsbg3.png;
    gangster1 = gangster6.png;
    gangster2 = gangster7.png;
    gangster3 = gangster8.png;
    gangster4 = gangster9.png;
    gangster5 = gangster11-2.png;
    phlaton = phlaton.png;
    enex = enex.png;
    dran = dran.png;
    gloom = gloom.png;
    micro = micro.png;

    // PixelCarpet
    neonbabe = neonbabe.png;
	particletex = star+.png;
	particlelight = light4.png;


    // Ghetto
    checkerfloor = light.png;
    envmap = chessenv.png;

    // OceanEffect
    particletex2 = particle.png;
    beach = beachoverlay2.png;
    reflection = oceanreflection4.png, GL_TEXTURE_2D, GEN_MIPMAP;
    leaf1 = palmleaf1.png;
    leaf2 = palmleaf2.png;

    // Discoball
    discolight = gradient.png;
}

animation {
    ghetto1anim = ghetto_new.anim;
    equalizeranim = equalizer.anim;
    equalizer2anim = equalizer2.anim;
    pixelcarpetanim = start_pixelcarpet.anim;
    pixelcarpet2anim = zoom_pixelcarpet.anim;
    ghettogreet1anim = ghettogreet1.anim;
}

binary {
    roadmap = roadmap3.raw;
    greets_map = greets+.raw;
}

video {
    // nada
}

shaders {
    oceanshader = Oceanwaves;
    blend = screen;
    particlespriteshader = particlesprite;
    vmeters = vmeters;
    texturephong = texturephong;
    light = light2;
	texture = texture;
	envmap = envmap;

    simplex = simplexnoise4d;
    ocean_surface = OceanSurface;

	// GlowEffect
	blurx = blur_x;
	blury = blur_y;
	screen = screen;

    motionblur = MotionBlur;

    depth_of_field = DepthOfField;

    average = Average;

	// remove
	bloom = bloom;
	colormaterial = colormaterial;
}

framebuffers {
    blendsource = width,height,COLOR_BUFFER;
    blenddestination = width,height,COLOR_BUFFER;
    tmp1 = 1024,1024,COLOR_BUFFER,DEPTH_BUFFER;
    tmp2 = 1024,1024,COLOR_BUFFER;
    tmp3 = 512,512,COLOR_BUFFER,DEPTH_BUFFER;

	offscreen = width,height,COLOR_BUFFER,DEPTH_BUFFER;
	aux1 = width,height,COLOR_BUFFER,DEPTH_BUFFER;
	aux2 = width,height,COLOR_BUFFER;

//	blurx = width,height,COLOR_BUFFER;
//	blury = width,height,COLOR_BUFFER;

	blurx = 256,256,COLOR_BUFFER;
	blury = 256,256,COLOR_BUFFER;

	noise = 256,256,COLOR_BUFFER;

}


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

disco * DiscoBallEffect {
    discoballA = objects[discoballA];
    discoballB = objects[disco];
//    discoballC = objects[discoballC];
    lighttex =  graphics[discolight];
	discoball_shader = shaders[light];
	cube = objects[cube];
	cube_texture = graphics[ctzlogo];
}

blend * BlendEffect {
    shader = shaders[blend];
    buffer1 = framebuffers[blendsource];
    buffer2 = framebuffers[blenddestination];
}

outrun * OutrunEffect {
    roadmap = binary[roadmap];
    treetex = graphics[treetex];
    outrunbg = graphics[outrunbg];
    car_straight = graphics[car_straight];
    car_straight_down = graphics[car_straight_down];
    car_straight_up = graphics[car_straight_up];
    car_left = graphics[car_left];
    car_right = graphics[car_right];
}

ghetto * GhettoblasterEffect {
    ghettoobj = objects[ghettoobj];
    tvobj = objects[tvobj];
    ground_texture1 = graphics[checkerfloor];
    tape1 = graphics[tape1];
    tape2 = graphics[tape2];
    tape3 = graphics[tape3];
    tape4 = graphics[tape4];
    glow = graphics[glow];
    greets_map = binary[greets_map];
    trans_buffer = framebuffers[tmp1];
    mirror_image = framebuffers[tmp3];
    offscreen = framebuffers[offscreen];
    envmap = graphics[envmap];
}

equalizertrans * EqualizerTransitionEffect {
    glowtrans = graphics[glow];
}

pixelcarpet * PixelCarpetEffect {
	cube = objects[cube];
	ctzlogo = graphics[ctzlogo];
	vmeters = shaders[vmeters];
	particletex = graphics[particletex];
    particlelight = graphics[particlelight];
}

cubetrans * CubeTransitionEffect {
    buffer1 = framebuffers[tmp1];
    buffer2 = framebuffers[tmp2];
}

frequency * FrequencyEffect {
    dummy = dummy;
}

fade * FadeEffect {
    dummy = dummy;
}

fade2 * FadeEffect {
    dummy = dummy;
}

simplex_noise * SimplexNoiseEffect {
    dummy = dummy;
}

ocean * OceanEffect {
    beach = graphics[beach];
    leaf1 = graphics[leaf1];
    leaf2 = graphics[leaf2];
    reflection = graphics[reflection];
    oceanshader = shaders[oceanshader];
//    ocean_surface = shaders[ocean_surface];
//    simplex = shaders[simplex];
    depth_of_field = shaders[depth_of_field];
    aux1 = framebuffers[aux1];
	blurx_shader = shaders[blurx];
	blury_shader = shaders[blury];
	blurx_fbo = framebuffers[blurx];
	blury_fbo = framebuffers[blury];

    bloom_shader = shaders[bloom];
    bloom_buffer = framebuffers[tmp1];
}

glow * GlowEffect {
	blurx_shader = shaders[blurx];
	blury_shader = shaders[blury];
	source_fbo = framebuffers[offscreen];
	blurx_fbo = framebuffers[blurx];
	blury_fbo = framebuffers[blury];
	screen_shader = shaders[screen];
}

motionblur * MotionBlurEffect {
    texture_shader = shaders[texture];
    motionblur_shader = shaders[motionblur];
	aux1 = framebuffers[aux1];
	aux2 = framebuffers[aux2];
	offscreen = framebuffers[offscreen];
}

// ----- Textures ------

overlay * DisplayTexture {
    alphablend = true;
    texture = graphics[tvframe];
    ypos = -0.13 ; zpos = -1.0;
    xscale = 1.2;
    yscale = 0.7;
}

ctzlogo * DisplayTexture {
    texture = graphics[ctzlogo];
    zpos = -1.0;
    alphablend = true;
}

ctzlogobg * DisplayTexture {
    texture = graphics[ctzlogobg];
    zpos = -1.0;
}

presents * DisplayTexture {
    texture = graphics[presents];
    zpos = -1.0;
    zrot = 0.9;
}

presentsbg * DisplayTexture {
    texture = graphics[presentsbg];
    zpos = -1.0;
}

trashin87 * DisplayTexture {
    texture = graphics[trashin87];
    zpos = -1.0;
    zrot = -0.8;
}

trashin87bg * DisplayTexture {
    texture = graphics[trashin87bg];
    zpos = -1.0;
}

credsbg1 * DisplayTexture {
    texture = graphics[credsbg1];
    zpos = -1.0;
    alphablend = true;
}

credsbg2 * DisplayTexture {
    texture = graphics[credsbg2];
    zpos = -1.0;
    alphablend = true;
}

credsbg3 * DisplayTexture {
    texture = graphics[credsbg3];
    zpos = -1.0;
    alphablend = true;
}

gangster1 * DisplayTexture {
    texture = graphics[gangster1];
    zpos = -1.0;
    alphablend = true;
}

gangster2 * DisplayTexture {
    texture = graphics[gangster2];
    zpos = -1.0;
    alphablend = true;
}

gangster3 * DisplayTexture {
    texture = graphics[gangster3];
    zpos = -1.0;
    alphablend = true;
}

gangster4 * DisplayTexture {
    texture = graphics[gangster4];
    zpos = -1.0;
    alphablend = true;
}

gangster5 * DisplayTexture {
    texture = graphics[gangster5];
    zpos = -1.0;
    alphablend = true;
}

phlaton * DisplayTexture {
    texture = graphics[phlaton];
    zpos = -1.0;
    alphablend = true;
}

dran * DisplayTexture {
    texture = graphics[dran];
    zpos = -1.0;
    alphablend = true;
}

enex * DisplayTexture {
    texture = graphics[enex];
    zpos = -1.0;
    alphablend = true;
}

micro * DisplayTexture {
    texture = graphics[micro];
    zpos = -1.0;
    alphablend = true;
}

gloom * DisplayTexture {
    texture = graphics[gloom];
    zpos = -1.0;
    alphablend = true;
}

contrazlogo * DisplayTexture {
    texture = graphics[contrazlogo];
    zpos = -1.0;
    alphablend = true;
}

introtext * DisplayTexture {
    texture = graphics[introtext];
    zpos = -1.0;
    yscale = 0.85;
    xscale = 0.85;
    alphablend = true;
}

scanlines * DisplayTexture {
    texture = graphics[scanlines];
    zpos = -1.0;
    alphablend = true;
}

tvframe * DisplayTexture {
    texture = graphics[tvframe];
    zpos = -1.0;
    yscale = 0.5625;
    alphablend = true;
}

neonbabe * DisplayTexture {
    texture = graphics[neonbabe];
    zpos = -1.0;
    alphablend = true;
}

