diff options
Diffstat (limited to 'engines/agi/agi.h')
-rw-r--r-- | engines/agi/agi.h | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/engines/agi/agi.h b/engines/agi/agi.h index e4461904ed..3d4cfc78ee 100644 --- a/engines/agi/agi.h +++ b/engines/agi/agi.h @@ -42,9 +42,9 @@ namespace Agi { typedef signed int Err; -/* - * Version and other definitions - */ +// +// Version and other definitions +// #define TITLE "AGI engine" @@ -59,9 +59,9 @@ typedef signed int Err; #define MAX_DIRS 256 #define MAX_VARS 256 #define MAX_FLAGS (256 >> 3) -#define MAX_VIEWTABLE 255 /* KQ3 uses o255! */ +#define MAX_VIEWTABLE 255 // KQ3 uses o255! #define MAX_WORDS 20 -#define MAX_STRINGS 24 /* MAX_STRINGS + 1 used for get.num */ +#define MAX_STRINGS 24 // MAX_STRINGS + 1 used for get.num #define MAX_STRINGLEN 40 #ifndef MAX_PATH #define MAX_PATH 260 @@ -77,12 +77,12 @@ typedef signed int Err; #define INLINE #endif -#define MSG_BOX_COLOUR 0x0f /* White */ -#define MSG_BOX_TEXT 0x00 /* Black */ -#define MSG_BOX_LINE 0x04 /* Red */ -#define BUTTON_BORDER 0x00 /* Black */ -#define STATUS_FG 0x00 /* Black */ -#define STATUS_BG 0x0f /* White */ +#define MSG_BOX_COLOUR 0x0f // White +#define MSG_BOX_TEXT 0x00 // Black +#define MSG_BOX_LINE 0x04 // Red +#define BUTTON_BORDER 0x00 // Black +#define STATUS_FG 0x00 // Black +#define STATUS_BG 0x0f // White #define ADD_PIC 1 #define ADD_VIEW 2 @@ -113,7 +113,7 @@ enum AgiGameID { } // End of namespace Agi -/* AGI resources */ +// AGI resources #include "agi/console.h" #include "agi/view.h" #include "agi/picture.h" @@ -128,13 +128,13 @@ enum AgiGameType { GType_V3 = 2 }; -/* - * GF_OLDAMIGAV20 means that the interpreter is an old Amiga AGI interpreter that - * uses value 20 for the computer type (v20 i.e. vComputer) rather than the usual value 5. - * - * GF_CLIPCOORDS means that views' coordinates must be clipped at least in commands - * position and position.v. - */ +// +// GF_OLDAMIGAV20 means that the interpreter is an old Amiga AGI interpreter that +// uses value 20 for the computer type (v20 i.e. vComputer) rather than the usual value 5. +// +// GF_CLIPCOORDS means that views' coordinates must be clipped at least in commands +// position and position.v. +// enum AgiGameFeatures { GF_AGIMOUSE = (1 << 0), GF_AGDS = (1 << 1), @@ -241,32 +241,32 @@ enum GameId { * AGI variables. */ enum { - vCurRoom = 0, /* 0 */ + vCurRoom = 0, // 0 vPrevRoom, vBorderTouchEgo, vScore, vBorderCode, - vBorderTouchObj, /* 5 */ + vBorderTouchObj, // 5 vEgoDir, vMaxScore, vFreePages, vWordNotFound, - vTimeDelay, /* 10 */ + vTimeDelay, // 10 vSeconds, vMinutes, vHours, vDays, - vJoystickSensitivity, /* 15 */ + vJoystickSensitivity, // 15 vEgoViewResource, vAgiErrCode, vAgiErrCodeInfo, vKey, - vComputer, /* 20 */ + vComputer, // 20 vWindowReset, vSoundgen, vVolume, vMaxInputChars, - vSelItem, /* 25 */ + vSelItem, // 25 vMonitor }; @@ -315,22 +315,22 @@ enum AgiComputerType { * AGI flags */ enum { - fEgoWater = 0, /* 0 */ + fEgoWater = 0, // 0 fEgoInvisible, fEnteredCli, fEgoTouchedP2, fSaidAcceptedInput, - fNewRoomExec, /* 5 */ + fNewRoomExec, // 5 fRestartGame, fScriptBlocked, fJoySensitivity, fSoundOn, - fDebuggerOn, /* 10 */ + fDebuggerOn, // 10 fLogicZeroFirsttime, fRestoreJustRan, fStatusSelectsItems, fMenusWork, - fOutputMode, /* 15 */ + fOutputMode, // 15 fAutoRestart, fNoSaveLoadAllowed }; @@ -355,20 +355,20 @@ struct AgiDir { uint32 offset; uint32 len; uint32 clen; + + // 0 = not in mem, can be freed + // 1 = in mem, can be released + // 2 = not in mem, cant be released + // 3 = in mem, cant be released + // 0x40 = was compressed uint8 flags; - /* 0 = not in mem, can be freed - * 1 = in mem, can be released - * 2 = not in mem, cant be released - * 3 = in mem, cant be released - * 0x40 = was compressed - */ }; struct AgiBlock { int active; int x1, y1; int x2, y2; - uint8 *buffer; /* used for window background */ + uint8 *buffer; // used for window background }; /** AGI text color (Background and foreground color). */ @@ -508,11 +508,11 @@ struct AgiGame { char id[8]; /**< game id */ uint32 crc; /**< game CRC */ - /* game flags and variables */ + // game flags and variables uint8 flags[MAX_FLAGS]; /**< 256 1-bit flags */ uint8 vars[MAX_VARS]; /**< 256 variables */ - /* internal variables */ + // internal variables int horizon; /**< horizon y coordinate */ int lineStatus; /**< line number to put status on */ int lineUserInput; /**< line to put user input on */ @@ -529,7 +529,7 @@ struct AgiGame { int inputEnabled; /**< keyboard input enabled */ int lognum; /**< current logic number */ - /* internal flags */ + // internal flags int playerControl; /**< player is in control */ int statusLine; /**< status line on/off */ int clockEnabled; /**< clock is on/off */ @@ -542,13 +542,13 @@ struct AgiGame { uint8 priTable[_HEIGHT];/**< priority table */ - /* windows */ + // windows uint32 msgBoxTicks; /**< timed message box tick counter */ AgiBlock block; AgiBlock window; int hasWindow; - /* graphics & text */ + // graphics & text int gfxMode; char cursorChar; unsigned int colorFg; @@ -562,7 +562,7 @@ struct AgiGame { uint8 *sbuf256c; /**< 160x168 256 color AGI screen buffer (For AGI256 and AGI256-2 support). Points at sbufOrig + SBUF256_OFFSET. */ uint8 *sbuf; /**< Currently chosen AGI screen buffer (sbuf256c if AGI256 or AGI256-2 is used, otherwise sbuf16c). */ - /* player command line */ + // player command line AgiWord egoWords[MAX_WORDS]; int numEgoWords; @@ -571,19 +571,19 @@ struct AgiGame { AgiEvent evKeyp[MAX_DIRS]; /**< keyboard keypress events */ char strings[MAX_STRINGS + 1][MAX_STRINGLEN]; /**< strings */ - /* directory entries for resources */ + // directory entries for resources AgiDir dirLogic[MAX_DIRS]; AgiDir dirPic[MAX_DIRS]; AgiDir dirView[MAX_DIRS]; AgiDir dirSound[MAX_DIRS]; - /* resources */ + // resources AgiPicture pictures[MAX_DIRS]; /**< AGI picture resources */ AgiLogic logics[MAX_DIRS]; /**< AGI logic resources */ AgiView views[MAX_DIRS]; /**< AGI view resources */ AgiSound *sounds[MAX_DIRS]; /**< Pointers to AGI sound resources */ - /* view table */ + // view table VtEntry viewTable[MAX_VIEWTABLE]; int32 ver; /**< detected game version */ @@ -670,7 +670,7 @@ class SearchTree; extern struct Mouse g_mouse; -/* Image stack support */ +// Image stack support struct ImageStackElement { uint8 type; uint8 pad; @@ -792,7 +792,7 @@ private: int _firstSlot; public: - AgiObject *_objects; /* objects in the game */ + AgiObject *_objects; // objects in the game StringData _stringdata; @@ -817,7 +817,7 @@ public: SpritesMgr *_sprites; SoundMgr *_sound; PictureMgr *_picture; - AgiLoader *_loader; /* loader */ + AgiLoader *_loader; // loader Common::Stack<ImageStackElement> _imageStack; |