Back to index

freedink-data  1.08.20080920
START.c
Go to the documentation of this file.
00001 //this is run when dink is loaded, directly after the dink.ini file
00002 //is processed.
00003 
00004 void main( void )
00005 {
00006 //playavi("anim\rtlogo.avi");
00007 
00008  debug("Loading sounds..");
00009  load_sound("QUACK.WAV", 1);
00010  load_sound("PIG1.WAV", 2);
00011  load_sound("PIG2.WAV", 3);
00012  load_sound("PIG3.WAV", 4);
00013  load_sound("PIG4.WAV", 5);
00014  load_sound("BURN.WAV", 6);
00015  load_sound("OPEN.WAV", 7);
00016  load_sound("SWING.WAV", 8);
00017  load_sound("PUNCH.WAV", 9);
00018  load_sound("SWORD2.WAV", 10);
00019  load_sound("SELECT.WAV", 11);
00020  load_sound("WSCREAM.WAV", 12);
00021  load_sound("PICKER.WAV", 13);
00022  load_sound("GOLD.WAV", 14);
00023  load_sound("GRUNT1.WAV", 15);
00024  load_sound("GRUNT2.WAV", 16);
00025  load_sound("SEL1.WAV", 17);
00026  load_sound("ESCAPE.WAV", 18);
00027  load_sound("NONO.WAV", 19);
00028  load_sound("SEL2.WAV", 20);
00029  load_sound("SEL3.WAV", 21);
00030  load_sound("HIGH2.WAV", 22);
00031  load_sound("FIRE.WAV", 23);
00032  load_sound("SPELL1.WAV", 24);
00033  load_sound("CAVEENT.WAV", 25);
00034  load_sound("SNARL1.WAV", 26);
00035  load_sound("SNARL2.WAV", 27);
00036  load_sound("SNARL3.WAV", 28);
00037  load_sound("HURT1.WAV", 29);
00038  load_sound("HURT2.WAV", 30);
00039  load_sound("ATTACK1.WAV", 31);
00040  load_sound("CAVEENT.WAV", 32);
00041  load_sound("LEVEL.WAV", 33);
00042  load_sound("SAVE.WAV", 34);
00043  load_sound("SPLASH.WAV", 35);
00044  load_sound("SWORD1.WAV", 36);
00045  load_sound("BHIT.WAV", 37);
00046  load_sound("SQUISH.WAV", 38);
00047  load_sound("STAIRS.WAV", 39);
00048  load_sound("STEPS.WAV", 40);
00049  load_sound("ARROW.WAV", 41);
00050  load_sound("FLYBY.WAV", 42);
00051  load_sound("SECRET.WAV", 43);
00052  load_sound("BOW1.WAV", 44);
00053  load_sound("KNOCK.WAV", 45);
00054  load_sound("DRAG1.WAV", 46);
00055  load_sound("DRAG2.WAV", 47);
00056  load_sound("AXE.WAV", 48);
00057  load_sound("BIRD1.WAV", 49);
00058 
00059 
00060 int &crap;
00061 fill_screen(0);
00062 sp_seq(1, 0);
00063 sp_brain(1, 13);
00064 sp_pseq(1,10);
00065 sp_pframe(1,8);
00066 sp_que(1,20000);
00067 sp_noclip(1, 1);
00068 
00069 
00070 
00071 
00072 &dinklogo = create_sprite(320,240, 0, 196, 1);
00073 
00074 
00075 int &version = get_version();
00076 if (&version < 103)
00077   {
00078    //can't play with old .exe, not all command are supported
00079 Say_xy("`4Error - Scripts require version V1.03+ of dink.exe.  Upgrade!",0, 390);
00080 wait(1);
00081 wait(5000);
00082 kill_game();
00083 return;
00084   }
00085 
00086 
00087 &crap = create_sprite(76, 40, 14, 194, 1);
00088 sp_script(&crap, "start-1");
00089 sp_noclip(&crap, 1);
00090 sp_touch_damage(&crap, -1);
00091 &crap = create_sprite(524, 40, 14, 195, 1);
00092 sp_script(&crap, "start-2");
00093 sp_noclip(&crap, 1);
00094 sp_touch_damage(&crap, -1);
00095 
00096 //&crap = create_sprite(104, 440, 14, 192, 1);
00097 //sp_noclip(&crap, 1);
00098 //sp_script(&crap, "start-3");
00099 //sp_touch_damage(&crap, -1);
00100 
00101 &crap = create_sprite(560, 440, 14, 193, 1);
00102 sp_noclip(&crap, 1);
00103 sp_script(&crap, "start-4");
00104 sp_touch_damage(&crap, -1); 
00105 
00106 playmidi("1003.mid");
00107 kill_this_task();
00108 }