Back to index

freedink-data  1.08.20080920
DINFO.c
Go to the documentation of this file.
00001 void die( void )
00002 {
00003 freeze(1);
00004 &update_status = 0;
00005 int &mholdx = sp_x(1,-1);
00006 int &mholdy = sp_y(1,-1)
00007 
00008 //int &crap = create_sprite(&mholdx,&mholdy,5,436,1);
00009 
00010 sp_seq(1, 436);
00011 sp_base_idle(1, -1);
00012 wait(3000);
00013 sp_nohit(1, 1);
00014 sp_brain(1, 0);
00015 again:
00016         choice_start();
00017 "Load a previously saved game"
00018 "Restart game"
00019 "Quit to Windows"
00020         choice_end();
00021 
00022 if (&result == 1)
00023 {
00024 load();
00025 kill_this_task();
00026 }
00027    if (&result == 2)
00028    {
00029    sp_nohit(1, 0);
00030    restart_game();
00031    }
00032 
00033    if (&result == 3)
00034    {
00035    kill_game();
00036    }
00037 
00038 
00039 }
00040 
00041 void load( void )
00042 {
00043 Playsound(18,22050,0,0,0);
00044         choice_start();
00045         "&savegameinfo"
00046         "&savegameinfo"
00047         "&savegameinfo"
00048         "&savegameinfo" 
00049         "&savegameinfo" 
00050         "&savegameinfo" 
00051         "&savegameinfo" 
00052         "&savegameinfo" 
00053         "&savegameinfo" 
00054         "&savegameinfo" 
00055         choice_end();
00056 
00057 int &mycrap = game_exist(&result);
00058 if (&mycrap == 0)
00059     goto again;
00060     sp_brain(1, 1);
00061     sp_nohit(1, 0);
00062 
00063     stopmidi();
00064     script_attach(1000);
00065    //script now can't die when the load is preformed..
00066 init("load_sequence_now graphics\dink\walk\ds-w1- 71 43 38 72 -14 -9 14 9");
00067 init("load_sequence_now graphics\dink\walk\ds-w2- 72 43 37 69 -13 -9 13 9");
00068 init("load_sequence_now graphics\dink\walk\ds-w3- 73 43 38 72 -14 -9 14 9");
00069 init("load_sequence_now graphics\dink\walk\ds-w4- 74 43 38 72 -12 -9 12 9");
00070 
00071 init("load_sequence_now graphics\dink\walk\ds-w6- 76 43 38 72 -13 -9 13 9");
00072 init("load_sequence_now graphics\dink\walk\ds-w7- 77 43 38 72 -12 -10 12 10");
00073 init("load_sequence_now graphics\dink\walk\ds-w8- 78 43 37 69 -13 -9 13 9");
00074 init("load_sequence_now graphics\dink\walk\ds-w9- 79 43 38 72 -14 -9 14 9");
00075 
00076 init("load_sequence_now graphics\dink\idle\ds-i2- 12 250 33 70 -12 -9 12 9");
00077 init("load_sequence_now graphics\dink\idle\ds-i4- 14 250 30 71 -11 -9 11 9");
00078 init("load_sequence_now graphics\dink\idle\ds-i6- 16 250 36 70 -11 -9 11 9");
00079 init("load_sequence_now graphics\dink\idle\ds-i8- 18 250 32 68 -12 -9 12 9");
00080 
00081    load_game(&result);
00082 //loading a game kills ALL tasks
00083 }
00084