X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FConsoleCmds.h;h=441a946053c60c274ff8f2dc16ff67255380ac8a;hb=b37c82db3e3baee0425f35e2183c8ccff6e9ebe7;hp=c78f9e1778873d0f43e34644613e70ea595801b0;hpb=1a0ad4362ed618c1a25508530dfeeb4a0f6ef345;p=lugaru.git diff --git a/Source/ConsoleCmds.h b/Source/ConsoleCmds.h index c78f9e1..441a946 100644 --- a/Source/ConsoleCmds.h +++ b/Source/ConsoleCmds.h @@ -1,72 +1,36 @@ -DECLARE_COMMAND(quit) -DECLARE_COMMAND(map) -DECLARE_COMMAND(save) +/* +Copyright (C) 2003, 2010 - Wolfire Games -DECLARE_COMMAND(cellar) -DECLARE_COMMAND(tint) -DECLARE_COMMAND(tintr) -DECLARE_COMMAND(tintg) -DECLARE_COMMAND(tintb) -DECLARE_COMMAND(speed) -DECLARE_COMMAND(strength) -DECLARE_COMMAND(power) -DECLARE_COMMAND(size) -DECLARE_COMMAND(sizenear) -DECLARE_COMMAND(proportion) -DECLARE_COMMAND(proportionnear) -DECLARE_COMMAND(protection) -DECLARE_COMMAND(protectionnear) -DECLARE_COMMAND(protectionreset) -DECLARE_COMMAND(armor) -DECLARE_COMMAND(armornear) -DECLARE_COMMAND(metal) -DECLARE_COMMAND(clothes) -DECLARE_COMMAND(clothesnear) -DECLARE_COMMAND(noclothes) -DECLARE_COMMAND(noclothesnear) -DECLARE_COMMAND(belt) -DECLARE_COMMAND(cellophane) -DECLARE_COMMAND(funnybunny) -DECLARE_COMMAND(wolfie) -DECLARE_COMMAND(wolfieisgod) -DECLARE_COMMAND(wolf) -DECLARE_COMMAND(snowwolf) -DECLARE_COMMAND(darkwolf) -DECLARE_COMMAND(lizardwolf) -DECLARE_COMMAND(white) -DECLARE_COMMAND(brown) -DECLARE_COMMAND(black) +This file is part of Lugaru. -DECLARE_COMMAND(sizemin) -DECLARE_COMMAND(viewdistance) -DECLARE_COMMAND(fadestart) -DECLARE_COMMAND(slomo) -DECLARE_COMMAND(slofreq) +Lugaru 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. -DECLARE_COMMAND(tutorial) -DECLARE_COMMAND(hostile) -DECLARE_COMMAND(indemo) -DECLARE_COMMAND(notindemo) -DECLARE_COMMAND(type) -DECLARE_COMMAND(path) -DECLARE_COMMAND(hs) -DECLARE_COMMAND(dhs) -DECLARE_COMMAND(dialogue) -DECLARE_COMMAND(fixdialogue) -DECLARE_COMMAND(ddialogue) -DECLARE_COMMAND(fixtype) -DECLARE_COMMAND(fixrotation) -DECLARE_COMMAND(immobile) -DECLARE_COMMAND(allimmobile) -DECLARE_COMMAND(mobile) -DECLARE_COMMAND(default) -DECLARE_COMMAND(play) +Lugaru 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. -DECLARE_COMMAND(mapkilleveryone) -DECLARE_COMMAND(mapkillmost) -DECLARE_COMMAND(mapkillsomeone) -DECLARE_COMMAND(mapgosomewhere) +You should have received a copy of the GNU General Public License +along with Lugaru. If not, see . +*/ -DECLARE_COMMAND(skytint) -DECLARE_COMMAND(skylight) -DECLARE_COMMAND(skybox) +typedef void (*console_handler)(const char *args); + +#define DECLARE_COMMAND(cmd) void ch_##cmd(const char *args); +#include "ConsoleCmds.def" +#undef DECLARE_COMMAND + +/* FIXME - This is only to get cmd_count, not very clean */ +enum console_command { +#define DECLARE_COMMAND(cmd) cmd_##cmd, +#include "ConsoleCmds.def" +#undef DECLARE_COMMAND + cmd_count +}; + +extern const char *cmd_names[cmd_count]; + +extern console_handler cmd_handlers[cmd_count];