From 8263f5a7b576718a3f4e04980fe5a08fb02d4788 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Tue, 30 Aug 2011 00:41:24 -0400 Subject: PEGASUS: Implement basic neighborhood resource parsing --- engines/pegasus/neighborhood/view.h | 68 +++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100755 engines/pegasus/neighborhood/view.h (limited to 'engines/pegasus/neighborhood/view.h') diff --git a/engines/pegasus/neighborhood/view.h b/engines/pegasus/neighborhood/view.h new file mode 100755 index 0000000000..f1efb2b391 --- /dev/null +++ b/engines/pegasus/neighborhood/view.h @@ -0,0 +1,68 @@ +/* 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_NEIGHBORHOOD_VIEW_H +#define PEGASUS_NEIGHBORHOOD_VIEW_H + +#include "common/array.h" +#include "common/endian.h" + +#include "pegasus/Game_Shell/Headers/Game_Shell_Constants.h" + +namespace Common { + class SeekableReadStream; +} + +namespace Pegasus { + +class ViewTable { +public: + ViewTable() {} + ~ViewTable() {} + + static const uint32 getResTag() { return MKTAG('V', 'i', 'e', 'w'); } + + void loadFromStream(Common::SeekableReadStream *stream); + void clear(); + + struct Entry { + Entry() { time = 0xffffffff; } + bool isEmpty() { return time == 0xffffffff; } + + tRoomID room; + tDirectionConstant direction; + tAlternateID altCode; + TimeValue time; + }; + + Entry findEntry(tRoomID room, tDirectionConstant direction, tAlternateID altCode); + +private: + Common::Array _entries; +}; + +} // End of namespace Pegasus + +#endif -- cgit v1.2.3 From e642906cdda1d943bcbc875c752bb7ba69c2b81e Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 2 Sep 2011 00:27:13 -0400 Subject: PEGASUS: Begin restructuring the game state classes The entire game state should now be functional --- engines/pegasus/neighborhood/view.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/pegasus/neighborhood/view.h') diff --git a/engines/pegasus/neighborhood/view.h b/engines/pegasus/neighborhood/view.h index f1efb2b391..6a732d507e 100755 --- a/engines/pegasus/neighborhood/view.h +++ b/engines/pegasus/neighborhood/view.h @@ -29,7 +29,7 @@ #include "common/array.h" #include "common/endian.h" -#include "pegasus/Game_Shell/Headers/Game_Shell_Constants.h" +#include "pegasus/constants.h" namespace Common { class SeekableReadStream; -- 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/neighborhood/view.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/pegasus/neighborhood/view.h') diff --git a/engines/pegasus/neighborhood/view.h b/engines/pegasus/neighborhood/view.h index 6a732d507e..1c57351671 100755 --- a/engines/pegasus/neighborhood/view.h +++ b/engines/pegasus/neighborhood/view.h @@ -51,13 +51,13 @@ public: Entry() { time = 0xffffffff; } bool isEmpty() { return time == 0xffffffff; } - tRoomID room; - tDirectionConstant direction; - tAlternateID altCode; + RoomID room; + DirectionConstant direction; + AlternateID altCode; TimeValue time; }; - Entry findEntry(tRoomID room, tDirectionConstant direction, tAlternateID altCode); + Entry findEntry(RoomID room, DirectionConstant direction, AlternateID altCode); private: Common::Array _entries; -- cgit v1.2.3 From 73f2244a562fe0498720546e57452377752741fb Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 2 Apr 2012 19:58:50 -0400 Subject: PEGASUS: Remove some useless const modifiers Thanks to digitall for spotting --- engines/pegasus/neighborhood/view.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/pegasus/neighborhood/view.h') diff --git a/engines/pegasus/neighborhood/view.h b/engines/pegasus/neighborhood/view.h index 1c57351671..3397508b61 100755 --- a/engines/pegasus/neighborhood/view.h +++ b/engines/pegasus/neighborhood/view.h @@ -42,7 +42,7 @@ public: ViewTable() {} ~ViewTable() {} - static const uint32 getResTag() { return MKTAG('V', 'i', 'e', 'w'); } + static uint32 getResTag() { return MKTAG('V', 'i', 'e', 'w'); } void loadFromStream(Common::SeekableReadStream *stream); void clear(); -- 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/neighborhood/view.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 engines/pegasus/neighborhood/view.h (limited to 'engines/pegasus/neighborhood/view.h') diff --git a/engines/pegasus/neighborhood/view.h b/engines/pegasus/neighborhood/view.h old mode 100755 new mode 100644 -- cgit v1.2.3