1 /***************************************************************************
2 * Copyright (C) 2005 by Dimitris Saougos & Filippos Papadopoulos *
3 * <psybases@gmail.com> *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU Library General Public License as *
7 * published by the Free Software Foundation; either version 2 of the *
8 * License, or (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU Library General Public *
16 * License along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
25 // #include "Texture.h"
28 // using namespace Amaltheia;
33 typedef unsigned char BYTE;
55 BYTE lightNormalIndex;
68 int magic; // This is used to identify the file
69 int version; // The version number of the file (Must be 8)
70 int skinWidth; // The skin width in pixels
71 int skinHeight; // The skin height in pixels
72 int frameSize; // The size in bytes the frames are
73 int numSkins; // The number of skins associated with the model
74 int numVertices; // The number of vertices (constant for each frame)
75 int numTexCoords; // The number of texture coordinates
76 int numTriangles; // The number of faces (polygons)
77 int numGlCommands; // The number of gl commands
78 int numFrames; // The number of animation frames
79 int offsetSkins; // The offset in the file for the skin data
80 int offsetTexCoords; // The offset in the file for the texture data
81 int offsetTriangles; // The offset in the file for the face data
82 int offsetFrames; // The offset in the file for the frames data
83 int offsetGlCommands; // The offset in the file for the gl commands data
84 int offsetEnd; // The end of the file offset
92 typedef struct fnode flist;
100 // void delframelist(void);
102 char *bitmap_filename;
103 Texture *modelTexture;
108 // bool minMax; //ginetai true otan kaleitai h setframeseq. To elegxei h getMin...
112 float xmin, xmax, ymin, ymax, zmin, zmax;
113 struct MD2header md2h;
115 struct texturecoord *tc;
122 model( char *, char *, Graphics *g );
125 void render( float t );
126 int getframecounter( void );
137 flist *fhead, *ftail;
139 void delFrameSequence( void );
142 float gettime( void );
146 float xmin, xmax, ymin, ymax, zmin, zmax;
148 char *current_frame_sequence;
152 void setFrameSequence( char *name );