//===================================================================
// Crayon Physics  Start-up file
//-------------------------------------------------------------------
// 
//
// Created xx.xx.xxxx by Pete
//
// 
// Window( width, height, bpp, fullscreen, resizable, name, icon_path, frames )
//
//    width:            Screen width in pixels
//    height:           Screen height in pixels
//    bpp:              Screen bits per pixel ( 8, 16, 32 )
//    fullscreen:       Is fullscreen in use or not ( 0 = not, 1 = yes )
//    resizable:        Is the window resizable or not ( not in fullscreen ) ( 0 = not, 1 = yes )
//    name:             The name of the window
//    icon_path:        Path of the icon
//    frames:           Does the window have frames or not ( 0 = not, 1 = yes ) default = yes
//


TaskLoad( "d3d" );
TaskLoad( "sdl_mixer" );

StartTask( "window", Window, 10, 1024, 768, 0, 0, 0, "Crayon Physics Deluxe - release 55", "data/gfx/ikoni.bmp", 1 );
StartTask( "event", Event );
StartTask( "mouse", Mouse );

Mouse::CursorChangeTo( "cursor_busy" );

StartTask( "audio", Audio );
StartTask( "gfx", Gfx, 1000 );
StartTask( "ui", Ui, 100 );

StartTask( "crayon", Game, "Menu", 1 );

// sets the resolution and such
Game::ApplyGameOptions();

// StartTask( "unittest", UnitTest );
//............................................................................................

StartTask( "keyboard", Keyboard );

Load( "data/dev/game_keybinds.txt" );
Load( "data/dev/editor_keybinds.txt" );
Load( "data/dev/map_editing_keybinds.txt" );

//............................................................................................

Audio::AddToPlaylist( "data/sfx/_ghost_-_lullaby.ogg" );
Audio::AddToPlaylist( "data/sfx/crayon07.ogg" );
Audio::PreloadMusic( "data/sfx/crayon07.ogg" );
Audio::PreloadMusic( "data/sfx/_ghost_-_lullaby.ogg" );
Audio::PreloadMusic( "data/sfx/crayon_dreams.ogg" );

Audio::PreloadEffect( "data/sfx/menu_click.wav" )
Audio::PreloadEffect( "data/sfx/star_pick.wav" )
Audio::PreloadEffect( "data/sfx/hit_001.wav" )
Audio::PreloadEffect( "data/sfx/hit_002.wav" )
Audio::PreloadEffect( "data/sfx/hit_003.wav" )
Audio::PreloadEffect( "data/sfx/hit_004.wav" )
Audio::PreloadEffect( "data/sfx/hit_005.wav" )
Audio::PreloadEffect( "data/sfx/hit_006.wav" )
Audio::PreloadEffect( "data/sfx/hit_007.wav" )
Audio::PreloadEffect( "data/sfx/hit_008.wav" )
Audio::PreloadEffect( "data/sfx/hit_009.wav" )
Audio::PreloadEffect( "data/sfx/hit_010.wav" )

// Audio::PlayMusicFadeIn( "data/sfx/_ghost_-_lullaby.ogg", 500 );
// Audio::PlayMusicFadeIn( "data/sfx/crayon_dreams.ogg", 500 );

//............................................................................................

Mouse::CursorChangeTo( "cursor_arrow" );

//............................................................................................

d3d_use_sprite_device = 0;
