Back to index

freedink-data  1.08.20080920
item-bt.c
Go to the documentation of this file.
00001 //item boots
00002 
00003 void use( void )
00004 {
00005 //disallow diagonal punches
00006 
00007 if (sp_dir(1, -1) == 1)
00008     sp_dir(1, 2);
00009 if (sp_dir(1, -1) == 3)
00010     sp_dir(1, 2);
00011 if (sp_dir(1, -1) == 7)
00012     sp_dir(1, 8);
00013 if (sp_dir(1, -1) == 9)
00014     sp_dir(1, 8);
00015 
00016 &basehit = sp_dir(1, -1);
00017 &basehit += 100; //100 is the 'base' for the hit animations, we just add
00018 //the direction
00019 sp_seq(1, &basehit);
00020 sp_frame(1, 1); //reset seq to 1st frame
00021 sp_kill_wait(1); //make sure dink will punch right away
00022 sp_nocontrol(1, 1); //dink can't move until anim is done!
00023 playsound(8, 8000,0,0,0);
00024 }
00025 
00026 void disarm(void)
00027 {
00028 set_dink_speed(3);
00029 sp_frame_delay(1, 0);
00030 debug("Disarming boots");
00031 kill_this_task();
00032 }
00033 
00034 void arm(void)
00035 {
00036 sp_attack_hit_sound(1, 0);
00037 set_dink_speed(2);
00038 sp_frame_delay(1, 30);
00039 debug("arming boots");
00040 
00041 init("load_sequence_now graphics\dink\walk\ds-w1- 71 43 38 72 -14 -9 14 9");
00042 init("load_sequence_now graphics\dink\walk\ds-w2- 72 43 37 69 -13 -9 13 9");
00043 init("load_sequence_now graphics\dink\walk\ds-w3- 73 43 38 72 -14 -9 14 9");
00044 init("load_sequence_now graphics\dink\walk\ds-w4- 74 43 38 72 -12 -9 12 9");
00045 
00046 init("load_sequence_now graphics\dink\walk\ds-w6- 76 43 38 72 -13 -9 13 9");
00047 init("load_sequence_now graphics\dink\walk\ds-w7- 77 43 38 72 -12 -10 12 10");
00048 init("load_sequence_now graphics\dink\walk\ds-w8- 78 43 37 69 -13 -9 13 9");
00049 init("load_sequence_now graphics\dink\walk\ds-w9- 79 43 38 72 -14 -9 14 9");
00050 
00051 init("load_sequence_now graphics\dink\idle\ds-i2- 12 250 33 70 -12 -9 12 9");
00052 init("load_sequence_now graphics\dink\idle\ds-i4- 14 250 30 71 -11 -9 11 9");
00053 init("load_sequence_now graphics\dink\idle\ds-i6- 16 250 36 70 -11 -9 11 9");
00054 init("load_sequence_now graphics\dink\idle\ds-i8- 18 250 32 68 -12 -9 12 9");
00055 
00056 init("load_sequence_now graphics\dink\hit\normal\ds-h2- 102 75 60 72 -19 -9 19 9");
00057 init("load_sequence_now graphics\dink\hit\normal\ds-h4- 104 75 61 73 -19 -10 19 10");
00058 init("load_sequence_now graphics\dink\hit\normal\ds-h6- 106 75 58 71 -18 -10 18 10");
00059 init("load_sequence_now graphics\dink\hit\normal\ds-h8- 108 75 61 71 -19 -10 19 10");
00060 
00061 
00062 int &basehit;
00063 }
00064 
00065 void pickup(void)
00066 {
00067 Debug("Player now owns this item.");
00068 kill_this_task();
00069 }
00070 
00071 void drop(void)
00072 {
00073 Debug("Item dropped.");
00074 kill_this_task();
00075 }
00076 
00077