From ad7184b379ea1856ce926ded175c99d2e6112779 Mon Sep 17 00:00:00 2001 From: Joseph-Eugene Winzer Date: Thu, 15 Jun 2017 15:50:11 +0200 Subject: SUPERNOVA: Moves Object Class from rooms.h to msn_def.h --- engines/supernova/msn_def.h | 46 ++++++++++++++++++++++++++++++++++++++++++++ engines/supernova/rooms.h | 47 --------------------------------------------- 2 files changed, 46 insertions(+), 47 deletions(-) diff --git a/engines/supernova/msn_def.h b/engines/supernova/msn_def.h index 3bdbb180c9..b9253b1faa 100644 --- a/engines/supernova/msn_def.h +++ b/engines/supernova/msn_def.h @@ -352,6 +352,52 @@ const byte font[][5] = { 0x2c, 0x34, 0x40, 0x2c, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + + + +static ObjectType operator|(ObjectType a, ObjectType b) { + return ObjectType(+a | +b); +} + +struct Object { + static const char *const defaultDescription; + + Object() + : _name("") + , _description(Object::defaultDescription) + , _id(NULLOBJECT) + , _type(NULLTYPE) + , _click(0) + , _click2(0) + , _section(0) + , _exitRoom(NULLROOM) + , _direction(0) + {} + Object(const char *name, const char *description, ObjectID id, ObjectType type, + byte click, byte click2, byte section = 0, RoomID exitRoom = NULLROOM, byte direction = 0) + : _name(name) + , _description(description) + , _id(id) + , _type(type) + , _click(click) + , _click2(click2) + , _section(section) + , _exitRoom(exitRoom) + , _direction(direction) + {} + + const char *_name; + const char *_description; + ObjectID _id; + ObjectType _type; + byte _click; + byte _click2; + byte _section; + RoomID _exitRoom; + byte _direction; +}; + + } #endif // MSN_DEF_H diff --git a/engines/supernova/rooms.h b/engines/supernova/rooms.h index f52412ace4..8ef8cd3f2b 100644 --- a/engines/supernova/rooms.h +++ b/engines/supernova/rooms.h @@ -7,53 +7,6 @@ namespace Supernova { -ObjectType operator|(ObjectType a, ObjectType b) { - return ObjectType(+a | +b); -} - -struct Object { - static const char *const defaultDescription; - - Object(); - Object(const char *name, const char *description, ObjectID id, ObjectType type, byte click, - byte click2, byte section = 0, RoomID exitRoom = NULLROOM, byte direction = 0); - - const char *_name; - const char *_description; - ObjectID _id; - ObjectType _type; - byte _click; - byte _click2; - byte _section; - RoomID _exitRoom; - byte _direction; -}; - -Object::Object() - : _name("") - , _description(Object::defaultDescription) - , _id(NULLOBJECT) - , _type(NULLTYPE) - , _click(0) - , _click2(0) - , _section(0) - , _exitRoom(NULLROOM) - , _direction(0) -{} - -Object::Object(const char *name, const char *description, ObjectID id, ObjectType type, - byte click, byte click2, byte section, RoomID exitRoom, byte direction) - : _name(name) - , _description(description) - , _id(id) - , _type(type) - , _click(click) - , _click2(click2) - , _section(section) - , _exitRoom(exitRoom) - , _direction(direction) -{} - class Room { public: Room() { -- cgit v1.2.3