SIMCMD_CALL(StopBulldozer)
SIMCMD_CALL(MakeFire)
SIMCMD_CALL(MakeFlood)
+SIMCMD_CALL(MakeAirCrash)
SIMCMD_CALL(MakeTornado)
SIMCMD_CALL(MakeEarthquake)
SIMCMD_CALL(MakeMonster)
int SimCmdWorldX(ARGS)
{
- int val;
-
if (argc != 2) {
return (TCL_ERROR);
}
int SimCmdWorldY(ARGS)
{
- int val;
-
if (argc != 2) {
return (TCL_ERROR);
}
Kick();
}
- sprintf(interp->result, "%d", TotalFunds);
+ sprintf(interp->result, "%ld", TotalFunds);
return (TCL_OK);
}
int SimCmdFlush(ARGS)
{
- int style;
-
if (argc != 2) {
return (TCL_ERROR);
}
DonDither = dd;
}
- sprintf(interp->result, "%d", DonDither);
+ sprintf(interp->result, "%ld", DonDither);
return (TCL_OK);
}
int SimCmdDynamicData(ARGS)
{
- int index, val;
+ int index;
if ((argc != 3) && (argc != 4)) {
return (TCL_ERROR);
int SimCmdLandValue(ARGS)
{
- int val;
-
if (argc != 2) {
return (TCL_ERROR);
}
int SimCmdTraffic(ARGS)
{
- int val;
-
if (argc != 2) {
return (TCL_ERROR);
}
int SimCmdCrime(ARGS)
{
- int val;
-
if (argc != 2) {
return (TCL_ERROR);
}
int SimCmdUnemployment(ARGS)
{
- int val;
-
if (argc != 2) {
return (TCL_ERROR);
}
int SimCmdFires(ARGS)
{
- int val;
-
if (argc != 2) {
return (TCL_ERROR);
}
int SimCmdPollution(ARGS)
{
- int val;
-
if (argc != 2) {
return (TCL_ERROR);
}
int SimCmdPolMaxX(ARGS)
{
- int val;
-
if (argc != 2) {
return (TCL_ERROR);
}
int SimCmdPolMaxY(ARGS)
{
- int val;
-
if (argc != 2) {
return (TCL_ERROR);
}
int SimCmdTrafMaxX(ARGS)
{
- int val;
-
if (argc != 2) {
return (TCL_ERROR);
}
int SimCmdTrafMaxY(ARGS)
{
- int val;
-
if (argc != 2) {
return (TCL_ERROR);
}
int SimCmdMeltX(ARGS)
{
- int val;
-
if (argc != 2) {
return (TCL_ERROR);
}
int SimCmdMeltY(ARGS)
{
- int val;
-
if (argc != 2) {
return (TCL_ERROR);
}
int SimCmdCrimeMaxX(ARGS)
{
- int val;
-
if (argc != 2) {
return (TCL_ERROR);
}
int SimCmdCrimeMaxY(ARGS)
{
- int val;
-
if (argc != 2) {
return (TCL_ERROR);
}
int SimCmdCenterX(ARGS)
{
- int val;
-
if (argc != 2) {
return (TCL_ERROR);
}
int SimCmdCenterY(ARGS)
{
- int val;
-
if (argc != 2) {
return (TCL_ERROR);
}
int SimCmdFloodX(ARGS)
{
- int val;
-
if (argc != 2) {
return (TCL_ERROR);
}
int SimCmdFloodY(ARGS)
{
- int val;
-
if (argc != 2) {
return (TCL_ERROR);
}
int SimCmdCrashX(ARGS)
{
- int val;
-
if (argc != 2) {
return (TCL_ERROR);
}
int SimCmdCrashY(ARGS)
{
- int val;
-
if (argc != 2) {
return (TCL_ERROR);
}
int SimCmdDollars(ARGS)
{
- int val;
-
if (argc != 2) {
return (TCL_ERROR);
}
int SimCmdVersion(ARGS)
{
- sprintf(interp->result, MicropolisVersion);
+ strcpy(interp->result, MicropolisVersion);
return (TCL_OK);
}
int SimCmdQuoteURL(ARGS)
{
- int result = 1;
char buf[2048];
char *from, *to;
int ch;
return (TCL_OK);
}
+int SimCmdHasAirCrash(ARGS)
+{
+ int aircrash = 0;
+
+ if (argc != 2) {
+ return (TCL_ERROR);
+ }
+
+#ifndef NO_AIRCRASH
+ aircrash = 1;
+#endif
+
+ sprintf(interp->result, "%d", aircrash);
+ return (TCL_OK);
+}
+
/************************************************************************/
return TCL_ERROR;
}
- if (ent = Tcl_FindHashEntry(&SimCmds, argv[1])) {
+ if ((ent = Tcl_FindHashEntry(&SimCmds, argv[1]))) {
cmd = (int (*)())ent->clientData;
result = cmd(interp, argc, argv);
} else {
}
-sim_command_init()
+void
+sim_command_init(void)
{
- int new;
-
Tcl_CreateCommand(tk_mainInterp, "sim", SimCmd,
(ClientData)MainWindow, (void (*)()) NULL);
SIM_CMD(StopBulldozer);
SIM_CMD(MakeFire);
SIM_CMD(MakeFlood);
+ SIM_CMD(MakeAirCrash);
SIM_CMD(MakeTornado);
SIM_CMD(MakeEarthquake);
SIM_CMD(MakeMonster);
SIM_CMD(NeedRest);
SIM_CMD(MultiPlayerMode);
SIM_CMD(SugarMode);
+ SIM_CMD(HasAirCrash);
}