From cb7b382acfd29957c9522b08b6460526fc73983c Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 2 Sep 2011 01:06:17 -0400 Subject: PEGASUS: Restructure remaining (already converted) Game Shell classes --- engines/pegasus/items/itemlist.h | 60 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100755 engines/pegasus/items/itemlist.h (limited to 'engines/pegasus/items/itemlist.h') diff --git a/engines/pegasus/items/itemlist.h b/engines/pegasus/items/itemlist.h new file mode 100755 index 0000000000..dd9a4ba023 --- /dev/null +++ b/engines/pegasus/items/itemlist.h @@ -0,0 +1,60 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * Additional copyright for this file: + * Copyright (C) 1995-1997 Presto Studios, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef PEGASUS_ITEMS_ITEMLIST_H +#define PEGASUS_ITEMS_ITEMLIST_H + +#include "common/list.h" + +#include "pegasus/types.h" + +namespace Common { + class ReadStream; + class WriteStream; +} + +namespace Pegasus { + +class Item; + +class ItemList : public Common::List { +public: + ItemList(); + virtual ~ItemList(); + + virtual Common::Error writeToStream(Common::WriteStream *stream); + virtual Common::Error readFromStream(Common::ReadStream *stream); + + Item *findItemByID(const tItemID id); +}; + +typedef ItemList::iterator ItemIterator; + +// TODO: Don't use global construction! +extern ItemList g_allItems; + +} // End of namespace Pegasus + +#endif -- cgit v1.2.3 From 59f7e1deeaa15c87adbe073105ea512d1972cde0 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sat, 24 Sep 2011 14:10:54 -0400 Subject: PEGASUS: Import AI code and relevant items --- engines/pegasus/items/itemlist.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/pegasus/items/itemlist.h') diff --git a/engines/pegasus/items/itemlist.h b/engines/pegasus/items/itemlist.h index dd9a4ba023..df31b5c262 100755 --- a/engines/pegasus/items/itemlist.h +++ b/engines/pegasus/items/itemlist.h @@ -44,8 +44,8 @@ public: ItemList(); virtual ~ItemList(); - virtual Common::Error writeToStream(Common::WriteStream *stream); - virtual Common::Error readFromStream(Common::ReadStream *stream); + virtual void writeToStream(Common::WriteStream *stream); + virtual void readFromStream(Common::ReadStream *stream); Item *findItemByID(const tItemID id); }; -- cgit v1.2.3 From 12efb47b536d2f663c9cde2739a1fd40599da669 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 16 Dec 2011 14:17:50 -0500 Subject: PEGASUS: Remove t prefix from typedefs Some other minor cleanup too --- engines/pegasus/items/itemlist.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/pegasus/items/itemlist.h') diff --git a/engines/pegasus/items/itemlist.h b/engines/pegasus/items/itemlist.h index df31b5c262..b5a1d489be 100755 --- a/engines/pegasus/items/itemlist.h +++ b/engines/pegasus/items/itemlist.h @@ -47,7 +47,7 @@ public: virtual void writeToStream(Common::WriteStream *stream); virtual void readFromStream(Common::ReadStream *stream); - Item *findItemByID(const tItemID id); + Item *findItemByID(const ItemID id); }; typedef ItemList::iterator ItemIterator; -- cgit v1.2.3 From 983bd16bb78b1a6aa8872f2086dbcbca6954f2fb Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Tue, 3 Apr 2012 15:23:08 -0400 Subject: PEGASUS: Fix file permissions --- engines/pegasus/items/itemlist.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 engines/pegasus/items/itemlist.h (limited to 'engines/pegasus/items/itemlist.h') diff --git a/engines/pegasus/items/itemlist.h b/engines/pegasus/items/itemlist.h old mode 100755 new mode 100644 -- cgit v1.2.3 From f61146f32791831211c7b9399ec681aed109f03b Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Tue, 28 Aug 2012 16:50:15 -0400 Subject: PEGASUS: Remove g_allItems global construction --- engines/pegasus/items/itemlist.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'engines/pegasus/items/itemlist.h') diff --git a/engines/pegasus/items/itemlist.h b/engines/pegasus/items/itemlist.h index b5a1d489be..173a54104d 100644 --- a/engines/pegasus/items/itemlist.h +++ b/engines/pegasus/items/itemlist.h @@ -52,8 +52,7 @@ public: typedef ItemList::iterator ItemIterator; -// TODO: Don't use global construction! -extern ItemList g_allItems; +#define g_allItems (((PegasusEngine *)g_engine)->getAllItems()) } // End of namespace Pegasus -- cgit v1.2.3