Added Quake 2 sprite support (.sp2 files). Added the corresponding QC extension ...
[xonotic/darkplaces.git] / spritegn.h
index 4b47cb0..9647311 100644 (file)
@@ -45,10 +45,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 // <endrepeat>
 //-------------------------------------------------------
 
-#define SPRITE_VERSION 1
+#define SPRITE_VERSION         1
 #define SPRITEHL_VERSION       2
 #define SPRITE32_VERSION       32
 
+#define SPRITE2_VERSION                2
+
 typedef struct
 {
        int                     ident;
@@ -76,6 +78,21 @@ typedef struct
        synctype_t      synctype;
 } dspritehl_t;
 
+typedef struct
+{
+       int             width, height;
+       int             origin_x, origin_y;             // raster coordinates inside pic
+       char    name[64];                               // name of pcx file
+} dsprite2frame_t;
+
+typedef struct
+{
+       int                             ident;
+       int                             version;
+       int                             numframes;
+       dsprite2frame_t frames[1];              // variable sized
+} dsprite2_t;
+
 #define SPR_VP_PARALLEL_UPRIGHT                0
 #define SPR_FACING_UPRIGHT                     1
 #define SPR_VP_PARALLEL                                2