From 9b064e364f77fe114712c145fb094bc6fb0ea569 Mon Sep 17 00:00:00 2001 From: Joseph-Eugene Winzer Date: Tue, 29 Aug 2017 01:13:47 +0200 Subject: SUPERNOVA: Adds room id to objects This commit helps especially during serialization of the inventory to determine which room the object belongs to. --- engines/supernova/msn_def.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'engines/supernova/msn_def.h') diff --git a/engines/supernova/msn_def.h b/engines/supernova/msn_def.h index 88b59fa4c8..a84c28cbc9 100644 --- a/engines/supernova/msn_def.h +++ b/engines/supernova/msn_def.h @@ -433,6 +433,7 @@ struct Object { : _name("") , _description(Object::defaultDescription) , _id(INVALIDOBJECT) + , _roomId(NULLROOM) , _type(NULLTYPE) , _click(0) , _click2(0) @@ -440,11 +441,12 @@ struct Object { , _exitRoom(NULLROOM) , _direction(0) {} - Object(const char *name, const char *description, ObjectID id, ObjectType type, + Object(byte roomId, 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) + , _roomId(roomId) , _type(type) , _click(click) , _click2(click2) @@ -483,6 +485,7 @@ struct Object { return false; } + byte _roomId; Common::String _name; Common::String _description; ObjectID _id; -- cgit v1.2.3