Back to index

freedink-data  1.08.20080920
ESCAPE.c
Go to the documentation of this file.
00001 //this is run when the escape key is pressed
00002 
00003 void main(void)
00004 {
00005 int &old_result;
00006 Playsound(18, 22050, 0,0,0);
00007 freeze(1);
00008 help:
00009 
00010         choice_start();
00011         "Load a previously saved game"
00012         "Restart"
00013         "Quit to system"
00014         "Help"
00015         "Continue"
00016         "View/change gamepad buttons"
00017         choice_end();
00018 
00019 
00020 if (&result == 1)
00021   {
00022         choice_start();
00023         "&savegameinfo"
00024         "&savegameinfo"
00025         "&savegameinfo"
00026         "&savegameinfo" 
00027         "&savegameinfo" 
00028         "&savegameinfo" 
00029         "&savegameinfo" 
00030         "&savegameinfo" 
00031         "&savegameinfo" 
00032         "&savegameinfo" 
00033         "Nevermind"
00034         choice_end();
00035 if (&result == 11) goto help;
00036 
00037 if (game_exist(&result) == 0)
00038   {
00039 
00040   unfreeze(1);
00041   wait(2000);  
00042   Say("Wow, this loaded game looks so familiar.", 1);
00043   kill_this_task();
00044     return;
00045    }
00046 
00047 init("load_sequence_now graphics\dink\walk\ds-w1- 71 43 38 72 -14 -9 14 9");
00048 init("load_sequence_now graphics\dink\walk\ds-w2- 72 43 37 69 -13 -9 13 9");
00049 init("load_sequence_now graphics\dink\walk\ds-w3- 73 43 38 72 -14 -9 14 9");
00050 init("load_sequence_now graphics\dink\walk\ds-w4- 74 43 38 72 -12 -9 12 9");
00051 
00052 init("load_sequence_now graphics\dink\walk\ds-w6- 76 43 38 72 -13 -9 13 9");
00053 init("load_sequence_now graphics\dink\walk\ds-w7- 77 43 38 72 -12 -10 12 10");
00054 init("load_sequence_now graphics\dink\walk\ds-w8- 78 43 37 69 -13 -9 13 9");
00055 init("load_sequence_now graphics\dink\walk\ds-w9- 79 43 38 72 -14 -9 14 9");
00056 
00057 init("load_sequence_now graphics\dink\idle\ds-i2- 12 250 33 70 -12 -9 12 9");
00058 init("load_sequence_now graphics\dink\idle\ds-i4- 14 250 30 71 -11 -9 11 9");
00059 init("load_sequence_now graphics\dink\idle\ds-i6- 16 250 36 70 -11 -9 11 9");
00060 init("load_sequence_now graphics\dink\idle\ds-i8- 18 250 32 68 -12 -9 12 9");
00061 
00062 init("load_sequence_now graphics\dink\hit\normal\ds-h2- 102 75 60 72 -19 -9 19 9");
00063 init("load_sequence_now graphics\dink\hit\normal\ds-h4- 104 75 61 73 -19 -10 19 10");
00064 init("load_sequence_now graphics\dink\hit\normal\ds-h6- 106 75 58 71 -18 -10 18 10");
00065 init("load_sequence_now graphics\dink\hit\normal\ds-h8- 108 75 61 71 -19 -10 19 10");
00066 
00067 
00068   unfreeze(1);
00069   load_game(&result);
00070  &update_status = 1;
00071  draw_status();
00072 
00073   kill_this_task();
00074   }
00075 
00076 
00077 
00078 
00079 if (&result == 3)
00080   {
00081         choice_start();
00082         "Yes, I really want to quit the game"
00083         "I was just kidding, back to the action, please"
00084         choice_end();
00085    if (&result == 2)
00086    {
00087     wait(300);
00088     say("Phew, that was a close one!",1);
00089    }
00090    if (&result == 1)
00091    {
00092    kill_game();
00093    }
00094   unfreeze(1);
00095   kill_this_task();
00096   }
00097 
00098   if (&result == 4)
00099   {
00100 helpstart:
00101         choice_start();
00102         set_y 240
00103         title_start();
00104 
00105 
00106 
00107 
00108 What would you like help on?
00109         title_end();
00110         "Keyboard commands"
00111         "How to save the game"
00112         "Done"
00113         choice_end();
00114 Debug("Ok, result is &result");
00115 
00116       if (&result == 1)
00117      {
00118         choice_start();
00119         set_y 240
00120         title_start();
00121 Ctrl = Attack/choose
00122 Space = Talk/examine/skip text
00123 Shift = Magic
00124 Enter = Item/magic equip screen
00125 
00126 Use the arrow keys to move.  Joystick and control pad are also supported.
00127         title_end();
00128         "Ok"
00129         choice_end();
00130        goto helpstart;
00131      }
00132 
00133       if (&result == 2)
00134      {
00135         choice_start();
00136         set_y 240
00137         title_start();
00138 In this quest, saving your game can
00139 only be done at the special 'Save
00140 Machine'. (it hums strangely)
00141 
00142         title_end();
00143         "Ok"
00144         choice_end();
00145        goto helpstart;
00146      }
00147 
00148 
00149       if (&result == 3)
00150       {
00151        goto help;
00152       }
00153 
00154 
00155   }
00156 
00157 
00158 if (&result == 2)
00159   {
00160         choice_start();
00161         "Yes, I really want to restart from scratch"
00162         "No, go back!"
00163         choice_end();
00164    if (&result == 2)
00165    {
00166    goto help;
00167    }
00168    if (&result == 1)
00169    {
00170    unfreeze(1);
00171    restart_game();
00172    kill_this_task();
00173    }
00174   unfreeze(1);
00175   kill_this_task();
00176   }
00177 
00178    if (&result == 6)
00179    {
00180    buttonstart:
00181         choice_start();
00182         "Button 1 - &buttoninfo"
00183         "Button 2 - &buttoninfo"
00184         "Button 3 - &buttoninfo"
00185         "Button 4 - &buttoninfo"
00186         "Button 5 - &buttoninfo"
00187         "Button 6 - &buttoninfo"
00188         "Button 7 - &buttoninfo"
00189         "Button 8 - &buttoninfo"
00190         "Button 9 - &buttoninfo"
00191         "Button 10 - &buttoninfo"
00192         "Nevermind"
00193         choice_end();
00194 
00195 if (&result != 11)
00196   {
00197   &old_result = &result;
00198         choice_start();
00199         set_y 140
00200         title_start();
00201 What should button &old_result do?
00202         title_end();
00203         "Attack"
00204         "Talk/look"
00205         "Magic"
00206         "Item screen"
00207         "Main menu"
00208         "View map (if you have one)"
00209         "Nevermind"
00210         choice_end();
00211   if (&result < 7)
00212    set_button(&old_result, &result);
00213 
00214    goto buttonstart;
00215   }
00216     
00217        goto help;
00218 
00219    }
00220 
00221    if (&result == 7)
00222    {
00223         choice_start();
00224         "&savegameinfo"
00225         "&savegameinfo"
00226         "&savegameinfo"
00227         "&savegameinfo" 
00228         "&savegameinfo" 
00229         "&savegameinfo" 
00230         "&savegameinfo" 
00231         "&savegameinfo" 
00232         "&savegameinfo" 
00233         "&savegameinfo" 
00234         "Nevermind"
00235         choice_end();
00236 
00237    save_game(&result);
00238 
00239    }
00240 
00241   unfreeze(1);
00242   kill_this_task();
00243 }
00244