]> git.jsancho.org Git - lugaru.git/blobdiff - Source/ConsoleCmds.h
Reading debug mode from config again, but command line option overrides it
[lugaru.git] / Source / ConsoleCmds.h
index c9341430a6db206d3f1ec5200f3a039fd38b3e18..9670aa05048d008ee82d253ce5e83a37c3efe8ca 100644 (file)
@@ -1,93 +1,37 @@
 /*
 Copyright (C) 2003, 2010 - Wolfire Games
+Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file)
 
 This file is part of Lugaru.
 
-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.
+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.
 
-This program is distributed in the hope that it will be useful,
+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.
+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.
+along with Lugaru.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-DECLARE_COMMAND(quit)
-DECLARE_COMMAND(map)
-DECLARE_COMMAND(save)
-
-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)
+typedef void (*console_handler)(const char *args);
 
-DECLARE_COMMAND(sizemin)
-DECLARE_COMMAND(viewdistance)
-DECLARE_COMMAND(fadestart)
-DECLARE_COMMAND(slomo)
-DECLARE_COMMAND(slofreq)
+#define DECLARE_COMMAND(cmd) void ch_##cmd(const char *args);
+#include "ConsoleCmds.def"
+#undef  DECLARE_COMMAND
 
-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)
+/* 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
+};
 
-DECLARE_COMMAND(mapkilleveryone)
-DECLARE_COMMAND(mapkillmost)
-DECLARE_COMMAND(mapkillsomeone)
-DECLARE_COMMAND(mapgosomewhere)
+extern const char *cmd_names[cmd_count];
 
-DECLARE_COMMAND(skytint)
-DECLARE_COMMAND(skylight)
-DECLARE_COMMAND(skybox)
+extern console_handler cmd_handlers[cmd_count];