From 33313564b8d19d495b15f94cfb8ab76a5ce4347f Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 3 Oct 2005 00:42:45 +0000 Subject: Frame numbers are indexed from 0 Subversion-branch: /trunk/chocolate-doom Subversion-revision: 154 --- src/deh_frame.c | 9 ++++----- src/deh_ptr.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/deh_frame.c b/src/deh_frame.c index 592223e7..dc528bbd 100644 --- a/src/deh_frame.c +++ b/src/deh_frame.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: deh_frame.c 153 2005-10-02 23:49:01Z fraggle $ +// $Id: deh_frame.c 154 2005-10-03 00:42:45Z fraggle $ // // Copyright(C) 2005 Simon Howard // @@ -21,6 +21,9 @@ // 02111-1307, USA. // // $Log$ +// Revision 1.2 2005/10/03 00:42:45 fraggle +// Frame numbers are indexed from 0 +// // Revision 1.1 2005/10/02 23:49:01 fraggle // The beginnings of dehacked support // @@ -47,10 +50,6 @@ static void *DEH_FrameStart(deh_context_t *context, char *line) sscanf(line, "Frame %i", &frame_number); - // dehacked files are indexed from 1, not 0 - - --frame_number; - if (frame_number < 0 || frame_number >= NUMSTATES) return NULL; diff --git a/src/deh_ptr.c b/src/deh_ptr.c index d9217f26..fb6b0ce6 100644 --- a/src/deh_ptr.c +++ b/src/deh_ptr.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: deh_ptr.c 153 2005-10-02 23:49:01Z fraggle $ +// $Id: deh_ptr.c 154 2005-10-03 00:42:45Z fraggle $ // // Copyright(C) 2005 Simon Howard // @@ -21,6 +21,9 @@ // 02111-1307, USA. // // $Log$ +// Revision 1.2 2005/10/03 00:42:45 fraggle +// Frame numbers are indexed from 0 +// // Revision 1.1 2005/10/02 23:49:01 fraggle // The beginnings of dehacked support // @@ -62,10 +65,6 @@ static void *DEH_PointerStart(deh_context_t *context, char *line) sscanf(line, "%*s %*i (%*s %i)", &frame_number); - // states are indexed from 1 in dehacked files - - --frame_number; - if (frame_number < 0 || frame_number >= NUMSTATES) return NULL; -- cgit v1.2.3