diff options
author | Simon Howard | 2005-10-08 20:54:16 +0000 |
---|---|---|
committer | Simon Howard | 2005-10-08 20:54:16 +0000 |
commit | 5547ba06ca0e267fa82a6b9b7953a980e0876e61 (patch) | |
tree | c4a27e16fde56addc8e00e4d3f0badddaf3449f8 /src/deh_cheat.c | |
parent | 25f6da1861deedeb2d0650ecf0ebe42a83b682c8 (diff) | |
download | chocolate-doom-5547ba06ca0e267fa82a6b9b7953a980e0876e61.tar.gz chocolate-doom-5547ba06ca0e267fa82a6b9b7953a980e0876e61.tar.bz2 chocolate-doom-5547ba06ca0e267fa82a6b9b7953a980e0876e61.zip |
Proper dehacked error/warning framework. Catch a load more errors.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 175
Diffstat (limited to 'src/deh_cheat.c')
-rw-r--r-- | src/deh_cheat.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/deh_cheat.c b/src/deh_cheat.c index 0fd8cd2a..c4f05bc1 100644 --- a/src/deh_cheat.c +++ b/src/deh_cheat.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: deh_cheat.c 162 2005-10-04 21:41:42Z fraggle $ +// $Id: deh_cheat.c 175 2005-10-08 20:54:16Z fraggle $ // // Copyright(C) 2005 Simon Howard // @@ -21,6 +21,9 @@ // 02111-1307, USA. // // $Log$ +// Revision 1.2 2005/10/08 20:54:16 fraggle +// Proper dehacked error/warning framework. Catch a load more errors. +// // Revision 1.1 2005/10/04 21:41:42 fraggle // Rewrite cheats code. Add dehacked cheat replacement. // @@ -40,7 +43,9 @@ #include "doomdef.h" #include "doomtype.h" + #include "deh_defs.h" +#include "deh_io.h" #include "deh_main.h" #include "am_map.h" #include "st_stuff.h" @@ -97,10 +102,11 @@ static void DEH_CheatParseLine(deh_context_t *context, char *line, void *tag) unsigned char *value; int i; - if (!DEH_ParseAssignment(line, &variable_name, (char *) &value)) + if (!DEH_ParseAssignment(line, &variable_name, (char **) &value)) { // Failed to parse - + + DEH_Warning(context, "Failed to parse assignment"); return; } @@ -108,8 +114,7 @@ static void DEH_CheatParseLine(deh_context_t *context, char *line, void *tag) if (cheat == NULL) { - fprintf(stderr, "DEH_ParseCheatLine: Unknown cheat '%s'\n", - variable_name); + DEH_Warning(context, "Unknown cheat '%s'", variable_name); return; } |