shithub: choc

Download patch

ref: 33313564b8d19d495b15f94cfb8ab76a5ce4347f
parent: d0ab12d7099bb3db032c225b71c1a170c040d9ac
author: Simon Howard <fraggle@gmail.com>
date: Sun Oct 2 20:42:45 EDT 2005

Frame numbers are indexed from 0

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 154

--- 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 @@
     
     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;
 
--- 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 @@
 
     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;