PEGASUS: Begin cleaning up pegasus-defined types

This commit is contained in:
Matthew Hoops 2011-12-15 22:01:03 -05:00
parent b5565a4337
commit fdced472ab
6 changed files with 38 additions and 80 deletions

View File

@ -99,15 +99,8 @@ const tNotificationFlags kNoNotificationFlags = 0;
const tDisplayElementID kCurrentDragSpriteID = 1000;
// TODO
//const Fixed kFixed1 = 1 << 16;
//const Fixed kFixedMinus1 = -1 << 16;
const TimeScale kDefaultTimeScale = 600;
// TODO
//const RGBColor kWhiteRGB = {0xFFFF, 0xFFFF, 0xFFFF};
// Ticks per second.
const TimeScale kOneTickPerSecond = 1;
@ -355,10 +348,6 @@ const tCoordType kBiochipPushTop = 192;
const tCoordType kBiochipLidLeft = 362;
const tCoordType kBiochipLidTop = 316;
// TODO: Remove global variable needs
//const Common::Rect kInventoryHiliteBounds(334, 76, 430, 172);
//const Common::Rect kBiochipHiliteBounds (334, 364, 430, 460);
const tCoordType kInventoryDropLeft = 0;
const tCoordType kInventoryDropTop = 320;
const tCoordType kInventoryDropRight = 232;
@ -521,10 +510,10 @@ const tHotSpotFlags kJMPClickingSpotFlags = kClickSpotFlag |
kOpticalBiochipSpotFlag |
kAirMaskSpotFlag;
const tMM32BitID kMainMenuID = 1;
const tMM32BitID kPauseMenuID = 2;
const tMM32BitID kCreditsMenuID = 3;
const tMM32BitID kDeathMenuID = 4;
const int32 kMainMenuID = 1;
const int32 kPauseMenuID = 2;
const int32 kCreditsMenuID = 3;
const int32 kDeathMenuID = 4;
/////////////////////////////////////////////
//

View File

@ -37,7 +37,7 @@ namespace Common {
namespace Pegasus {
typedef tMM8BitFlags tDoorFlags;
typedef byte tDoorFlags;
enum {
kDoorPresentBit, // Bit set if there is a door here.

View File

@ -37,7 +37,7 @@ namespace Common {
namespace Pegasus {
typedef tMM8BitFlags tSpotFlags;
typedef byte tSpotFlags;
enum {
kSpotLoopsBit, // Loop or once only?

View File

@ -30,53 +30,23 @@
namespace Pegasus {
// TODO: All of the "tMM"-prefixed defines should be replaced eventually
// TODO: Probably all of these don't really need to be typedef'd...
typedef int8 tMM8BitS;
typedef uint8 tMM8BitU;
typedef int16 tMM16BitS;
typedef uint16 tMM16BitU;
typedef int32 tDisplayElementID;
typedef int32 tDisplayOrder;
typedef int32 tMM32BitS;
typedef uint32 tMM32BitU;
typedef int16 tHotSpotID;
typedef uint32 tHotSpotFlags;
typedef tMM8BitS tMM8BitID;
typedef tMM16BitS tMM16BitID;
typedef tMM32BitS tMM32BitID;
typedef byte tButtonState;
typedef uint32 tInputBits;
typedef tMM8BitU tMM8BitFlags;
typedef tMM16BitU tMM16BitFlags;
typedef tMM32BitU tMM32BitFlags;
typedef int32 tNotificationID;
typedef uint32 tNotificationFlags;
typedef tMM32BitID tDisplayElementID;
typedef tMM32BitS tDisplayOrder;
typedef tMM16BitID tHotSpotID;
typedef tMM32BitFlags tHotSpotFlags;
typedef tMM8BitFlags tButtonState;
typedef tMM32BitFlags tInputBits;
typedef tMM8BitU tKeyMapType[16];
typedef tMM8BitU tKeyType;
typedef tMM8BitU tKeyMapIndexType;
typedef tMM8BitU tKeyMapBitType;
typedef tMM32BitID tNotificationID;
typedef tMM32BitFlags tNotificationFlags;
// Mac types.
typedef tMM16BitS tResIDType;
typedef tMM16BitS tCoordType;
typedef tMM16BitS tQDCopyMode;
typedef tMM16BitS tResItemCountType;
enum tCopyMode {
kNoMask,
kUseClipArea,
kUseTransparency
};
// Mac types.
typedef int16 tResIDType;
typedef int16 tCoordType;
enum tSlideDirection {
kSlideLeftMask = 1,
@ -96,40 +66,39 @@ enum tSlideDirection {
// ScummVM QuickTime/QuickDraw replacement types
typedef uint TimeValue;
typedef uint TimeScale;
// TODO: Fixed and RGBColor
typedef tMM16BitID tGameID;
typedef int16 tGameID;
typedef tGameID tItemID;
typedef tGameID tActorID;
typedef tGameID tRoomID;
typedef tGameID tNeighborhoodID;
typedef tMM8BitU tAlternateID;
typedef tMM8BitS tHotSpotActivationID;
typedef byte tAlternateID;
typedef int8 tHotSpotActivationID;
typedef tMM16BitS tWeightType;
typedef int16 tWeightType;
typedef tMM8BitU tDirectionConstant;
typedef tMM8BitU tTurnDirection;
typedef byte tDirectionConstant;
typedef byte tTurnDirection;
// Meant to be room in low 16 bits and direction in high 16 bits.
typedef tMM32BitU tRoomViewID;
typedef uint32 tRoomViewID;
#define MakeRoomView(room, direction) (((tRoomViewID) (room)) | (((tRoomViewID) (direction)) << 16))
typedef tMM32BitU tExtraID;
typedef uint32 tExtraID;
typedef tMM16BitS tGameMode;
typedef int16 tGameMode;
typedef tMM16BitS tWeightType;
typedef int16 tWeightType;
typedef tMM16BitS tItemState;
typedef int16 tItemState;
typedef tMM8BitS tDeathReason;
typedef int8 tDeathReason;
typedef tMM32BitS tGameMenuCommand;
typedef int32 tGameMenuCommand;
typedef tMM32BitS tGameScoreType;
typedef int32 tGameScoreType;
typedef long tCanMoveForwardReason;
@ -143,9 +112,9 @@ enum tInventoryResult {
kItemNotInInventory
};
typedef tMM32BitID tInteractionID;
typedef int32 tInteractionID;
typedef tMM32BitID tAIConditionID;
typedef int32 tAIConditionID;
enum tEnergyStage {
kStageNoStage,

View File

@ -31,14 +31,14 @@
namespace Pegasus {
IDObject::IDObject(const tMM32BitID id) {
IDObject::IDObject(const int32 id) {
_objectID = id;
}
IDObject::~IDObject() {
}
tMM32BitID IDObject::getObjectID() const {
int32 IDObject::getObjectID() const {
return _objectID;
}

View File

@ -38,13 +38,13 @@ namespace Pegasus {
class IDObject {
public:
IDObject(const tMM32BitID id);
IDObject(const int32 id);
~IDObject();
tMM32BitID getObjectID() const;
int32 getObjectID() const;
private:
tMM32BitID _objectID;
int32 _objectID;
};
class FunctionPtr;