Skip to content

Commit

Permalink
PEGASUS: Add the basic Caldoria neighborhood
Browse files Browse the repository at this point in the history
Does not include the end-of-game timers and sequence yet. It's currently hooked up to the full game, but does not go beyond the first frame of the wake-up sequence right now.
  • Loading branch information
Matthew Hoops committed Oct 3, 2011
1 parent b24081c commit 8c7ebc8
Show file tree
Hide file tree
Showing 16 changed files with 3,292 additions and 43 deletions.
2 changes: 1 addition & 1 deletion engines/pegasus/constants.h
Expand Up @@ -739,7 +739,7 @@ static const tGameMode kModeInfoScreen = kModeBiochipPick + 1;
// TODO: Remove me
static const tRoomID kTSA37 = 42;
static const tRoomID kTinyTSA37 = 0;
static const tRoomID kCaldoria00 = 1;
static const tRoomID kTSA00 = 0;

} // End of namespace Pegasus

Expand Down
2 changes: 1 addition & 1 deletion engines/pegasus/energymonitor.h
Expand Up @@ -53,7 +53,7 @@ class Blinker : private IdlerTimeBase {

// These are in seconds.
// Max is two hours
static const uint32 kMaxJMPEnergy = 7200;
static const uint32 kMaxJMPEnergy = 60 * 1;

static const uint32 kCasualEnergy = kMaxJMPEnergy * 100 / 100; // 100%
static const uint32 kWorriedEnergy = kMaxJMPEnergy * 50 / 100; // 50%
Expand Down
13 changes: 10 additions & 3 deletions engines/pegasus/graphics.cpp
Expand Up @@ -194,11 +194,18 @@ DisplayElement *GraphicsManager::findDisplayElement(const tDisplayElementID id)
return 0;
}

void GraphicsManager::doFadeOutSync() {
// TODO
void GraphicsManager::doFadeOutSync(const TimeValue, const TimeValue, uint32 color) {
if (color == 0)
color = g_system->getScreenFormat().RGBToColor(0, 0, 0);

// HACK: Until fading out is done, white-out the screen here
Graphics::Surface *screen = g_system->lockScreen();
screen->fillRect(Common::Rect(0, 0, 640, 480), color);
g_system->unlockScreen();
g_system->updateScreen();
}

void GraphicsManager::doFadeInSync() {
void GraphicsManager::doFadeInSync(const TimeValue, const TimeValue, uint32) {
// TODO
}

Expand Down
7 changes: 5 additions & 2 deletions engines/pegasus/graphics.h
Expand Up @@ -32,6 +32,7 @@
#include "graphics/pict.h"
#include "graphics/surface.h"

#include "pegasus/constants.h"
#include "pegasus/pegasus.h"
#include "pegasus/util.h"

Expand All @@ -56,8 +57,10 @@ friend class Cursor;
Graphics::Surface *getWorkArea() { return &_workArea; }
void clearScreen();
DisplayElement *findDisplayElement(const tDisplayElementID id);
void doFadeOutSync();
void doFadeInSync();

// These default to black
void doFadeOutSync(const TimeValue = kOneSecondPerThirtyTicks, const TimeScale = kThirtyTicksPerSecond, uint32 color = 0);
void doFadeInSync(const TimeValue = kOneSecondPerThirtyTicks, const TimeScale = kThirtyTicksPerSecond, uint32 color = 0);

protected:
void markCursorAsDirty();
Expand Down
4 changes: 4 additions & 0 deletions engines/pegasus/module.mk
Expand Up @@ -51,6 +51,10 @@ MODULE_OBJS = \
neighborhood/turn.o \
neighborhood/view.o \
neighborhood/zoom.o \
neighborhood/caldoria/caldoria.o \
neighborhood/caldoria/caldoria4dsystem.o \
neighborhood/caldoria/caldoriamessages.o \
neighborhood/caldoria/caldoriamirror.o \
neighborhood/prehistoric/prehistoric.o


Expand Down

0 comments on commit 8c7ebc8

Please sign in to comment.