| author | unlord
<unlord> 2004-07-08 13:11:42 UTC |
| committer | unlord
<unlord> 2004-07-08 13:11:42 UTC |
| parent | fc1c2cfc50ad1e812c5b8eba3988839d445d63d6 |
| stuff/ideas/FPImage.h | +3 | -0 |
| stuff/ideas/FPResource.c | +4 | -0 |
| stuff/ideas/FPResource.h | +10 | -0 |
diff --git a/stuff/ideas/FPImage.h b/stuff/ideas/FPImage.h index 867bd6e..b6ff1b7 100644 --- a/stuff/ideas/FPImage.h +++ b/stuff/ideas/FPImage.h @@ -1,11 +1,14 @@ #ifndef _FP_IMAGE_H #define _FP_IMAGE_H +#include "FPResource.h" + typedef struct FPImage FPImage; /* FPImage is a FPResource for static images */ struct FPImage { + FPResourceType type; int id; int height; int width; diff --git a/stuff/ideas/FPResource.c b/stuff/ideas/FPResource.c index 364eb7d..75bbadb 100644 --- a/stuff/ideas/FPResource.c +++ b/stuff/ideas/FPResource.c @@ -1,5 +1,9 @@ #include "FPResource.h" +FPResourceType resGetType(FPResource *_this) { + return(_this->type); +} + int resGetId(FPResource *_this) { return(_this->id); } diff --git a/stuff/ideas/FPResource.h b/stuff/ideas/FPResource.h index e64c770..7a46c25 100644 --- a/stuff/ideas/FPResource.h +++ b/stuff/ideas/FPResource.h @@ -1,12 +1,22 @@ #ifndef _FP_RESOURCE_H #define _FP_RESOURCE_H +typedef enum FPResourceType FPResourceType; + +enum FPResourceType { + FP_RES_PALETTE=1, + FP_RES_IMAGE=2 +}; + typedef struct FPResource FPResource; struct FPResource { + FPResourceType type; int id; }; + +FPResourceType resGetType(FPResource *_this); int resGetId(FPResource *_this); #endif