Initial revision
[0ad:0ad.git] / terrain / bak / 0 / Resource.h
1 //***********************************************************
2 //
3 // Name:                Resource.H
4 // Last Update: 7/2/02
5 // Author:              Poya Manouchehri
6 //
7 // Description: A game resource provides an interface for a 
8 //                              game resource type, ie ModelDefs, Bitmap and
9 //                              Textures, Sounds and Music. These can be
10 //                              accessed through a ResourceLibrary.
11 //                              IMPORTANT NOTE: This is an abstract class. It
12 //                              Must ONLY instantiated with a child class. 
13 //
14 //***********************************************************
15
16 #ifndef RESOURCE_H
17 #define RESOURCE_H
18
19 #include "Types.H"
20
21 #define MAX_RSNAME_LENGTH       (64)
22
23 enum RESOURCETYPE
24 {
25         RST_BITMAP,
26         RST_TEXTURE,
27         RST_CUBETEXTURE,
28         RST_MODELDEF,
29         RST_SOUND,
30         RST_VERTEXSHADER,
31         RST_PIXELSHADER,
32 };
33
34 class CResource
35 {
36         public:
37                 virtual ~CResource() {};
38
39                 char *GetName() { return m_Name; }
40                 int GetType() { return m_Type; }
41
42         protected:
43                 char m_Name[MAX_RSNAME_LENGTH];
44                 unsigned int m_Type;
45 };
46
47 #endif