This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Functions | |
void | debug_list (dbref player, void *data, char *buffer) |
void | debug_savedb (dbref player, void *data, char *buffer) |
void | debug_loaddb (dbref player, void *data, char *buffer) |
void | debug_memory (dbref player, void *data, char *buffer) |
void | ShutDownMap (dbref player, dbref mapnumber) |
void | debug_shutdown (dbref player, void *data, char *buffer) |
void | debug_setvrt (dbref player, void *data, char *buffer) |
void debug_list | ( | dbref | player, | |
void * | data, | |||
char * | buffer | |||
) |
Definition at line 24 of file debug.c.
References args, DumpMaps(), DumpMechs(), and mech_parseattributes().
00025 { 00026 char *args[3]; 00027 int argc; 00028 00029 argc = mech_parseattributes(buffer, args, 3); 00030 if(argc == 0) 00031 return; 00032 else if(args[0][0] == 'M' || args[0][0] == 'm') 00033 if(args[0][1] == 'E' || args[0][1] == 'e') 00034 DumpMechs(player); 00035 if(args[0][1] == 'A' || args[0][1] == 'a') 00036 DumpMaps(player); 00037 }
void debug_loaddb | ( | dbref | player, | |
void * | data, | |||
char * | buffer | |||
) |
Definition at line 46 of file debug.c.
References LoadSpecialObjects(), and notify.
00047 { 00048 notify(player, "--- Loading ---"); 00049 LoadSpecialObjects(); 00050 notify(player, "--- Done ---"); 00051 }
void debug_memory | ( | dbref | player, | |
void * | data, | |||
char * | buffer | |||
) |
Definition at line 92 of file debug.c.
References Create, debug_check_stuff(), GoThruTree(), notify_printf(), skipws, and xcode_tree.
00093 { 00094 int i, gtotal = 0; 00095 00096 Create(number, int, global_specials); 00097 Create(smallest, int, global_specials); 00098 Create(largest, int, global_specials); 00099 Create(total, int, global_specials); 00100 00101 for(i = 0; i < global_specials; i++) { 00102 number[i] = 0; 00103 smallest[i] = -1; 00104 largest[i] = -1; 00105 total[i] = 0; 00106 } 00107 cheat_player = player; 00108 skipws(buffer); 00109 if(strcmp(buffer, "")) 00110 cheat_player = player; 00111 else 00112 cheat_player = -1; 00113 GoThruTree(xcode_tree, debug_check_stuff); 00114 for(i = 0; i < global_specials; i++) { 00115 if(number[i]) { 00116 if(smallest[i] == largest[i]) 00117 notify_printf(player, 00118 "%4d %-20s: %d bytes total, %d each", 00119 number[i], SpecialObjects[i].type, total[i], 00120 total[i] / number[i]); 00121 else 00122 notify_printf(player, 00123 "%4d %-20s: %d bytes total, %d avg, %d/%d small/large", 00124 number[i], SpecialObjects[i].type, total[i], 00125 total[i] / number[i], smallest[i], largest[i]); 00126 } 00127 gtotal += total[i]; 00128 } 00129 notify_printf(player, "Grand total: %d bytes.", gtotal); 00130 free((void *) number); 00131 free((void *) total); 00132 free((void *) smallest); 00133 free((void *) largest); 00134 }
void debug_savedb | ( | dbref | player, | |
void * | data, | |||
char * | buffer | |||
) |
Definition at line 39 of file debug.c.
References DUMP_NORMAL, notify, and SaveSpecialObjects().
00040 { 00041 notify(player, "--- Saving ---"); 00042 SaveSpecialObjects(DUMP_NORMAL); 00043 notify(player, "--- Done ---"); 00044 }
void debug_setvrt | ( | dbref | player, | |
void * | data, | |||
char * | buffer | |||
) |
Definition at line 177 of file debug.c.
References args, DOCHECK, mech_parseattributes(), and Readnum.
00178 { 00179 char *args[3]; 00180 int vrt; 00181 int id, brand; 00182 00183 DOCHECK(mech_parseattributes(buffer, args, 3) != 2, "Invalid arguments!"); 00184 DOCHECK(Readnum(vrt, args[1]), "Invalid value!"); 00185 DOCHECK(vrt <= 0, "VRT needs to be >0"); 00186 DOCHECK(vrt > 127, "VRT can be at max 127"); 00187 DOCHECK(!find_matching_vlong_part(args[0], NULL, &id, &brand), 00188 "That is no weapon!"); 00189 DOCHECK(!IsWeapon(id), "That is no weapon!"); 00190 MechWeapons[Weapon2I(id)].vrt = vrt; 00191 notify_printf(player, "VRT for %s set to %d.", 00192 MechWeapons[Weapon2I(id)].name, vrt); 00193 log_error(LOG_WIZARD, "WIZ", "CHANGE", "VRT for %s set to %d by #%d", 00194 MechWeapons[Weapon2I(id)].name, vrt, player); 00195 }
void debug_shutdown | ( | dbref | player, | |
void * | data, | |||
char * | buffer | |||
) |
Definition at line 167 of file debug.c.
References args, mech_parseattributes(), and ShutDownMap().
00168 { 00169 char *args[3]; 00170 int argc; 00171 00172 argc = mech_parseattributes(buffer, args, 3); 00173 if(argc > 0) 00174 ShutDownMap(player, atoi(args[0])); 00175 }
Definition at line 136 of file debug.c.
References FindNode(), MAP::first_free, getMech(), GOD, mech_shutdown(), MechLastX, MechLastY, MAP::mechsOnMap, MechX, MechY, NodeData, notify_printf(), remove_mech_from_map(), and xcode_tree.
Referenced by debug_shutdown(), and map_clearmechs().
00137 { 00138 MAP *map; 00139 MECH *mech; 00140 int j; 00141 Node *tmp; 00142 00143 tmp = FindNode(xcode_tree, mapnumber); 00144 if(tmp) { 00145 map = (MAP *) NodeData(tmp); 00146 for(j = 0; j < map->first_free; j++) 00147 if(map->mechsOnMap[j] != -1) { 00148 mech = getMech(map->mechsOnMap[j]); 00149 if(mech) { 00150 notify_printf(player, 00151 "Shutting down Mech #%d and restting map index to -1....", 00152 map->mechsOnMap[j]); 00153 mech_shutdown(GOD, (void *) mech, ""); 00154 MechLastX(mech) = 0; 00155 MechLastY(mech) = 0; 00156 MechX(mech) = 0; 00157 MechY(mech) = 0; 00158 remove_mech_from_map(map, mech); 00159 } 00160 } 00161 map->first_free = 0; 00162 notify(player, "Map Cleared"); 00163 return; 00164 } 00165 }