src/hcode/btech/mech.tic.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void cleartic_sub (dbref player, MECH *mech, char *buffer)
void addtic_sub (dbref player, MECH *mech, char *buffer)
void deltic_sub (dbref player, MECH *mech, char *buffer)
void firetic_sub (dbref player, MECH *mech, char *buffer)
void listtic_sub (dbref player, MECH *mech, char *buffer)
void mech_cleartic (dbref player, void *data, char *buffer)
void mech_addtic (dbref player, void *data, char *buffer)
void mech_deltic (dbref player, void *data, char *buffer)
void mech_firetic (dbref player, void *data, char *buffer)
void mech_listtic (dbref player, void *data, char *buffer)
void heat_cutoff (dbref player, void *data, char *buffer)


Function Documentation

void addtic_sub ( dbref  player,
MECH mech,
char *  buffer 
)

Definition at line 72 of file mech.tic.c.

00073 {
00074         int ticnum, argc;
00075         char *args[3];
00076 
00077         DOCHECK((argc =
00078                          mech_parseattributes(buffer, args, 3)) != 2,
00079                         "Invalid number of arguments to function!");
00080         ticnum = atoi(args[0]);
00081         DOCHECK(!(ticnum >= 0 && ticnum < NUM_TICS), "Invalid tic number!");
00082         present_tic = ticnum;
00083         multi_weap_sel(mech, player, args[1], 0, addtic_sub_func);
00084 }

void cleartic_sub ( dbref  player,
MECH mech,
char *  buffer 
)

Definition at line 42 of file mech.tic.c.

00043 {
00044         int argc;
00045         char *args[3];
00046 
00047         DOCHECK((argc =
00048                          mech_parseattributes(buffer, args, 3)) != 1,
00049                         "Invalid number of arguments to function");
00050         multi_weap_sel(mech, player, args[0], 2, cleartic_sub_func);
00051 }

void deltic_sub ( dbref  player,
MECH mech,
char *  buffer 
)

Definition at line 103 of file mech.tic.c.

00104 {
00105         int ticnum, argc;
00106         char *args[3];
00107 
00108         argc = mech_parseattributes(buffer, args, 3);
00109         DOCHECK(argc < 1 ||
00110                         argc > 2, "Invalid number of arguments to the function!");
00111         if(argc == 1) {
00112                 cleartic_sub(player, mech, buffer);
00113                 return;
00114         }
00115         ticnum = atoi(args[0]);
00116         DOCHECK(!(ticnum >= 0 && ticnum < NUM_TICS), "Invalid tic number!");
00117         present_tic = ticnum;
00118         multi_weap_sel(mech, player, args[1], 0, deltic_sub_func);
00119 }

void firetic_sub ( dbref  player,
MECH mech,
char *  buffer 
)

Definition at line 155 of file mech.tic.c.

00156 {
00157         MAP *mech_map;
00158         int ticnum, argc;
00159         char *args[5];
00160         unsigned long weaps;
00161 
00162         DOCHECK((argc =
00163                          mech_parseattributes(buffer, args, 5)) < 1,
00164                         "Not enough arguments to function");
00165         mech_map = getMap(mech->mapindex);
00166         ticnum = atoi(args[0]);
00167         DOCHECK(!(ticnum >= 0 && ticnum < NUM_TICS), "TIC out of range!");
00168 
00169 /*   notify (player, tprintf ("Firing all weapons in TIC #%d at default target!", ticnum)); */
00170         weaps = 1;
00171         ftflag = 1;
00172         temp_args = args;
00173         temp_argc = argc;       
00174         multi_weap_sel(mech, player, args[0], 2, firetic_sub_func);
00175         ftflag = 0;
00176 }

void heat_cutoff ( dbref  player,
void *  data,
char *  buffer 
)

Definition at line 303 of file mech.tic.c.

00304 {
00305         MECH *mech = (MECH *) data;
00306 
00307         cch(MECH_USUALSMO);
00308         if(HeatcutoffChanging(mech)) {
00309                 notify(player,
00310                            "You are already toggling heat cutoff status. Please be patient.");
00311                 return;
00312         }
00313         if(Heatcutoff(mech)) {
00314                 notify(player, "Disengaging heat dissipation cutoff...");
00315                 MECHEVENT(mech, EVENT_HEATCUTOFFCHANGING, heat_cutoff_event, 4, 0);
00316         } else {
00317                 notify(player, "Engaging heat dissipation cutoff...");
00318                 MECHEVENT(mech, EVENT_HEATCUTOFFCHANGING, heat_cutoff_event, 4, 1);
00319         }
00320 }

void listtic_sub ( dbref  player,
MECH mech,
char *  buffer 
)

Definition at line 221 of file mech.tic.c.

00222 {
00223         int ticnum, argc;
00224         char *args[2];
00225         int i, j, k, count = 0;
00226         coolmenu *c;
00227 
00228         DOCHECK((argc =
00229                          mech_parseattributes(buffer, args, 2)) != 1,
00230                         "Invalid number of arguments!");
00231         ticnum = atoi(args[0]);
00232         DOCHECK(!(ticnum >= 0 && ticnum < NUM_TICS), "TIC out of range!");
00233         present_mech = mech;
00234         present_tic = ticnum;
00235         for(i = 0; i < MAX_WEAPONS_PER_MECH; i++) {
00236                 j = i / SINGLE_TICLONG_SIZE;
00237                 k = i % SINGLE_TICLONG_SIZE;
00238                 if(mech->tic[ticnum][j] & (1 << k))
00239                         count++;
00240         }
00241         present_count = count;
00242         c = SelCol_FunStringMenuK(2, tprintf("TIC #%d listing for %s", ticnum,
00243                                                                                  GetMechID(mech)), listtic_fun, MAX(1,
00244                                                                                                                                                         count));
00245         ShowCoolMenu(player, c);
00246         KillCoolMenu(c);
00247 }

void mech_addtic ( dbref  player,
void *  data,
char *  buffer 
)

Definition at line 257 of file mech.tic.c.

00258 {
00259         MECH *mech = (MECH *) data;
00260 
00261         cch(MECH_USUALSM);
00262         addtic_sub(player, mech, buffer);
00263 }

void mech_cleartic ( dbref  player,
void *  data,
char *  buffer 
)

Definition at line 249 of file mech.tic.c.

00250 {
00251         MECH *mech = (MECH *) data;
00252 
00253         cch(MECH_USUALSM);
00254         cleartic_sub(player, mech, buffer);
00255 }

void mech_deltic ( dbref  player,
void *  data,
char *  buffer 
)

Definition at line 265 of file mech.tic.c.

00266 {
00267         MECH *mech = (MECH *) data;
00268 
00269         cch(MECH_USUALSM);
00270         deltic_sub(player, mech, buffer);
00271 }

void mech_firetic ( dbref  player,
void *  data,
char *  buffer 
)

Definition at line 273 of file mech.tic.c.

00274 {
00275         MECH *mech = (MECH *) data;
00276 
00277         cch(MECH_USUALO);
00278         firetic_sub(player, mech, buffer);
00279 }

void mech_listtic ( dbref  player,
void *  data,
char *  buffer 
)

Definition at line 281 of file mech.tic.c.

00282 {
00283         MECH *mech = (MECH *) data;
00284 
00285         cch(MECH_USUALSM);
00286         listtic_sub(player, mech, buffer);
00287 }


Generated on Mon May 28 04:25:38 2007 for BattletechMUX by  doxygen 1.4.7