aboutsummaryrefslogtreecommitdiff
path: root/saga/objectmap.h
diff options
context:
space:
mode:
authorJonathan Gray2004-08-02 15:44:18 +0000
committerJonathan Gray2004-08-02 15:44:18 +0000
commitdcf5805440ab116df9918d63de4ef8a6300b7268 (patch)
tree4f5bbea871209c2df7dc76d8881e6ee508158061 /saga/objectmap.h
parent632612680b894f21653379e0754f8123a83bc3e2 (diff)
downloadscummvm-rg350-dcf5805440ab116df9918d63de4ef8a6300b7268.tar.gz
scummvm-rg350-dcf5805440ab116df9918d63de4ef8a6300b7268.tar.bz2
scummvm-rg350-dcf5805440ab116df9918d63de4ef8a6300b7268.zip
create objectMap class
svn-id: r14440
Diffstat (limited to 'saga/objectmap.h')
-rw-r--r--saga/objectmap.h40
1 files changed, 30 insertions, 10 deletions
diff --git a/saga/objectmap.h b/saga/objectmap.h
index b24af2c06a..3205809c28 100644
--- a/saga/objectmap.h
+++ b/saga/objectmap.h
@@ -28,6 +28,10 @@
namespace Saga {
+enum R_OBJECT_FLAGS {
+ R_OBJECT_NORMAL = 0x02
+};
+
struct R_CLICKAREA {
int n_points;
R_POINT *points;
@@ -44,19 +48,35 @@ struct R_OBJECTMAP_ENTRY {
R_CLICKAREA *clickareas;
};
-struct R_OBJECTMAP_INFO {
- int initialized;
+class Gfx;
- int objects_loaded;
- int n_objects;
- R_OBJECTMAP_ENTRY *object_maps;
+class ObjectMap{
+public:
+ int reg(void);
+ ObjectMap(Gfx *gfx);
+ ~ObjectMap(void);
+ int load(const byte *om_res, size_t om_res_len);
+ int freeMem(void);
+ int loadNames(const byte *onl_res, size_t onl_res_len);
+ int freeNames();
+ int getName(int object, const char **name);
+ int getFlags(int object, uint16 *flags);
+ int getEPNum(int object, int *ep_num);
+ int draw(R_SURFACE *draw_surface, R_POINT *imouse_pt, int color, int color2);
+ int hitTest(R_POINT *imouse_pt, int *object_num);
+ void objectInfo(int argc, char *argv[]);
+private:
+ int _initialized;
- int names_loaded;
- int n_names;
- const char **names;
-};
+ int _objects_loaded;
+ int _n_objects;
+ R_OBJECTMAP_ENTRY *_object_maps;
-static void CF_object_info(int argc, char *argv[], void *refCon);
+ int _names_loaded;
+ int _n_names;
+ const char **_names;
+ Gfx *_gfx;
+};
} // End of namespace Saga