/* -*-c-*-
*
- * $Id$
- *
* Elite planet data
*
* (c) 2003 Mark Wooding
*/
-/*----- Licensing notice --------------------------------------------------*
+/*----- Licensing notice --------------------------------------------------*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
o->bytes = p;
o->length = 12;
for (i = 0; i < 6; i++, p += 2)
- sprintf(p, "%02x", w->x[i]);
+ sprintf(p, "%02x", w->x[i]);
}
static void world_dir(Tcl_Obj *o, Tcl_Obj *oo)
p++;
j = mangle(w);
goatsoup(d, pn, w, desc[i][(j >= 0x33) + (j >= 0x66) +
- (j >= 0x99) + (j >= 0xcc)]);
+ (j >= 0x99) + (j >= 0xcc)]);
break;
case '%':
p++;
world ww;
/* --- Check arguments --- */
-
+
if (objc != 3)
return (err(ti, "usage: elite-worldinfo ARR SEED"));
if ((w = world_get(ti, objv[2])) == 0)
TCL_LEAVE_ERR_MSG) ||
!Tcl_SetVar2Ex(ti, arr, "y", Tcl_NewIntObj(wi.y * 2),
TCL_LEAVE_ERR_MSG) ||
- !Tcl_SetVar2Ex(ti, arr, "government", Tcl_NewIntObj(wi.gov),
+ !Tcl_SetVar2Ex(ti, arr, "government", Tcl_NewIntObj(wi.gov),
TCL_LEAVE_ERR_MSG) ||
!Tcl_SetVar2Ex(ti, arr, "economy", Tcl_NewIntObj(wi.eco),
TCL_LEAVE_ERR_MSG) ||
- !Tcl_SetVar2Ex(ti, arr, "techlevel", Tcl_NewIntObj(wi.tech),
+ !Tcl_SetVar2Ex(ti, arr, "techlevel", Tcl_NewIntObj(wi.tech),
TCL_LEAVE_ERR_MSG) ||
- !Tcl_SetVar2Ex(ti, arr, "population", Tcl_NewIntObj(wi.pop),
+ !Tcl_SetVar2Ex(ti, arr, "population", Tcl_NewIntObj(wi.pop),
TCL_LEAVE_ERR_MSG) ||
- !Tcl_SetVar2Ex(ti, arr, "productivity", Tcl_NewIntObj(wi.prod),
+ !Tcl_SetVar2Ex(ti, arr, "productivity", Tcl_NewIntObj(wi.prod),
TCL_LEAVE_ERR_MSG) ||
!Tcl_SetVar2Ex(ti, arr, "radius", Tcl_NewIntObj(wi.rad),
TCL_LEAVE_ERR_MSG) ||
return (-1);
*p++ = ii;
}
- return (0);
+ return (0);
}
static struct cmddata cmdtab[] = {
goto done;
}
for (i = 0; i < oc; i += 3) {
- s = Tcl_GetString(ov[i]);
+ s = Tcl_GetString(ov[i]);
Tcl_CreateHashEntry(&done, s, &dummy);
if (Tcl_GetLongFromObj(ti, ov[i + 1], &x) != TCL_OK ||
Tcl_GetLongFromObj(ti, ov[i + 2], &y) != TCL_OK)
} cmds[] = {
{ "elite-nextworld", cmd_nextworld },
{ "elite-nextgalaxy", cmd_nextgalaxy },
- { "elite-worldinfo", cmd_worldinfo },
+ { "elite-worldinfo", cmd_worldinfo },
{ "elite-market", cmd_market },
{ "elite-unpackcmdr", cmd_unpackcmdr },
{ "elite-packcmdr", cmd_packcmdr },