Skip to content

Commit

Permalink
PEGASUS: Cleanup and hookup the notification code
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Hoops committed Sep 5, 2011
1 parent fe99e95 commit dbb538d
Show file tree
Hide file tree
Showing 10 changed files with 212 additions and 342 deletions.
99 changes: 0 additions & 99 deletions engines/pegasus/MMShell/Notification/MMNotification.cpp

This file was deleted.

61 changes: 0 additions & 61 deletions engines/pegasus/MMShell/Notification/MMNotificationManager.cpp

This file was deleted.

58 changes: 0 additions & 58 deletions engines/pegasus/MMShell/Notification/MMNotificationManager.h

This file was deleted.

46 changes: 0 additions & 46 deletions engines/pegasus/MMShell/Notification/MMNotificationReceiver.cpp

This file was deleted.

53 changes: 0 additions & 53 deletions engines/pegasus/MMShell/Notification/MMNotificationReceiver.h

This file was deleted.

4 changes: 1 addition & 3 deletions engines/pegasus/module.mk
Expand Up @@ -8,6 +8,7 @@ MODULE_OBJS = \
graphics.o \
hotspot.o \
menu.o \
notification.o \
overview.o \
pegasus.o \
sound.o \
Expand All @@ -18,9 +19,6 @@ MODULE_OBJS = \
items/biochips/biochipitem.o \
items/inventory/inventoryitem.o \
MMShell/Base_Classes/MMFunctionPtr.o \
MMShell/Notification/MMNotification.o \
MMShell/Notification/MMNotificationManager.o \
MMShell/Notification/MMNotificationReceiver.o \
MMShell/Utilities/MMResourceFile.o \
MMShell/Utilities/MMTimeValue.o \
MMShell/Utilities/MMUtilities.o \
Expand Down
7 changes: 7 additions & 0 deletions engines/pegasus/neighborhood/neighborhood.cpp
Expand Up @@ -108,6 +108,13 @@ void Neighborhood::start() {
arriveAt(GameState.getNextRoom(), GameState.getNextDirection());
}

void Neighborhood::receiveNotification(Notification *, const tNotificationFlags flags) {
if (flags & kMoveForwardCompletedFlag)
arriveAt(GameState.getNextRoom(), GameState.getNextDirection());

// TODO: Other types
}

void Neighborhood::arriveAt(tRoomID room, tDirectionConstant direction) {
// TODO
}
Expand Down
8 changes: 5 additions & 3 deletions engines/pegasus/neighborhood/neighborhood.h
Expand Up @@ -30,6 +30,7 @@
#include "common/str.h"

#include "pegasus/hotspot.h"
#include "pegasus/notification.h"
#include "pegasus/sound.h"
#include "pegasus/MMShell/Utilities/MMIDObject.h"
#include "pegasus/neighborhood/door.h"
Expand All @@ -43,7 +44,6 @@

namespace Pegasus {

class MMNotification;
class PegasusEngine;

// Pegasus Prime neighborhood id's
Expand Down Expand Up @@ -76,15 +76,15 @@ struct tQueueRequest {
tInputBits interruptionFilter;
bool playing;
tNotificationFlags flags;
MMNotification *notification;
Notification *notification;
};

bool operator==(const tQueueRequest &arg1, const tQueueRequest &arg2);
bool operator!=(const tQueueRequest &arg1, const tQueueRequest &arg2);

typedef Common::Queue<tQueueRequest> NeighborhoodActionQueue;

class Neighborhood : public MMIDObject {
class Neighborhood : public MMIDObject, public NotificationReceiver {
public:
Neighborhood(PegasusEngine *vm, const Common::String &resName, tNeighborhoodID id);
virtual ~Neighborhood();
Expand Down Expand Up @@ -114,6 +114,8 @@ class Neighborhood : public MMIDObject {
virtual bool actionQueueEmpty() { return _actionQueue.empty(); }

protected:
virtual void receiveNotification(Notification *, const tNotificationFlags);

virtual void createNeighborhoodSpots();
virtual void loadSoundSpots();

Expand Down

0 comments on commit dbb538d

Please sign in to comment.