Back to index

freedink-data  1.08.20080920
MAIN.c
Go to the documentation of this file.
00001 //main.c run when dink is started
00002 
00003 void main()
00004 {
00005 //let's init all our globals
00006 // These globals are REQUIRED by dink.exe (it directly uses them, removing
00007 // any of these could result in a game crash.
00008 
00009   make_global_int("&exp",0);
00010   make_global_int("&strength", 3);
00011   make_global_int("&defense", 0);
00012   make_global_int("&cur_weapon", 0);
00013   make_global_int("&cur_magic", 0);
00014   make_global_int("&gold", 0);
00015   make_global_int("&magic", 0);
00016   make_global_int("&magic_level", 0);
00017   make_global_int("&vision", 0);
00018   make_global_int("&result", 0);
00019   make_global_int("&speed", 1);
00020   make_global_int("&timing", 0);
00021   make_global_int("&lifemax", 10); 
00022   make_global_int("&life", 10);
00023   make_global_int("&level", 1);
00024   make_global_int("&player_map", 1);
00025   make_global_int("&last_text", 0);
00026   make_global_int("&update_status", 0);
00027   make_global_int("&missile_target", 0);
00028   make_global_int("&enemy_sprite", 0);
00029   make_global_int("&magic_cost", 0);
00030   make_global_int("&missle_source", 0);
00031 
00032   // These globals are stuff we added, which will all be saved with the player
00033   // file
00034 
00035   make_global_int("&story", 0);
00036   make_global_int("&old_womans_duck", 0);
00037   make_global_int("&nuttree", 0);
00038   make_global_int("&letter", 0);
00039   make_global_int("&little_girl", 0);
00040   make_global_int("&farmer_quest", 0);
00041   make_global_int("&save_x", 0);
00042   make_global_int("&save_y", 0);
00043   make_global_int("&safe", 0);
00044   make_global_int("&pig_story", 0);
00045   make_global_int("&wizard_see", 0);
00046   make_global_int("&mlibby", 0);
00047   make_global_int("&wizard_again", 0);
00048   make_global_int("&snowc", 0);
00049   make_global_int("&duckgame", 0);
00050 
00051   make_global_int("&gossip", 0);
00052   make_global_int("&robbed", 0);
00053   make_global_int("&dinklogo", 0);
00054   make_global_int("&rock_placement", 0);
00055   make_global_int("&temphold", 0);
00056   make_global_int("&temp1hold", 0);
00057   make_global_int("&temp2hold", 0);
00058   make_global_int("&temp3hold", 0);
00059   make_global_int("&temp4hold", 0);
00060   make_global_int("&temp5hold", 0);
00061   make_global_int("&temp6hold", 0);
00062   make_global_int("&town1", 0);
00063   make_global_int("&s2-milder", 0);
00064   make_global_int("&thief", 0);
00065   make_global_int("&caveguy", 0);
00066   make_global_int("&s2-aunt", 0);
00067   make_global_int("&tombob", 0);
00068   make_global_int("&mayor", 0);
00069   make_global_int("&hero", 0);
00070   make_global_int("&s2-nad", 0);
00071   make_global_int("&gobpass", 0);
00072   make_global_int("&bowlore", 0);
00073   make_global_int("&s4-duck", 0);
00074   make_global_int("&s5-jop", 0);
00075   make_global_int("&s7-boat", 0);
00076   make_global_int("&s2-map", 0);
00077 
00078   //crap needed for misc
00079   set_dink_speed(3);
00080   sp_frame_delay(1,0);
00081 
00082 //Let's preload that sprite that's been bugging the hell out of Pap
00083   preload_seq(373);
00084 
00085 //if run with -debug option this will be written to debug.txt.
00086 
00087  debug("Dink started. Time to fight for your right to party.");
00088 //playmidi("story.mid");
00089  kill_this_task();
00090 }