**********************************************************

** Big Maps Projects code (incl. Multiplayer v1.5 **
**********************************************************
- Merged Big Maps Project code from BMP+MP trunk (Revision: 3340)
o Complete SVN Revision history: https://81.169.133.124/source/ja2/branches/Wanne/JA2%201.13%20MP
- Before THIS merge, I made a branch of the existing 1.13 source
o SVN Branch: https://81.169.133.124/source/ja2/branches/JA2_rev.3336/src
- Removed old VS 6.0 and VS 2003 project and solutions files, because compilation is broken long time ago
- I will add VS 2010 projects and solution file in the next few days

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@3341 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2010-02-28 18:38:52 +00:00
parent a98c44ac78
commit 14750c6903
461 changed files with 23615 additions and 120157 deletions
+41 -20
View File
@@ -61,6 +61,8 @@ typedef struct
#define DOOR_PERCEIVED_TRAPPED 1
#define DOOR_PERCEIVED_UNTRAPPED 2
//dnl ch42 250909
// WANNE - BMP: DONE!
typedef struct
{
INT16 sGridNo;
@@ -74,7 +76,27 @@ typedef struct
INT8 bPerceivedTrapped; // See above, but with respect to traps rather than locked status
INT8 bLockDamage; // Damage to the lock
INT8 bPadding[4]; // extra bytes
} DOOR;
} _OLD_DOOR;
class DOOR
{
public:
INT32 sGridNo;
BOOLEAN fLocked; // is the door locked
UINT8 ubTrapLevel; // difficulty of finding the trap, 0-10
UINT8 ubTrapID; // the trap type (0 is no trap)
UINT8 ubLockID; // the lock (0 is no lock)
INT8 bPerceivedLocked; // The perceived lock value can be different than the fLocked.
// Values for this include the fact that we don't know the status of the door, etc
INT8 bPerceivedTrapped; // See above, but with respect to traps rather than locked status
INT8 bLockDamage; // Damage to the lock
public:
// DOOR();
// ~DOOR();
DOOR& operator=(const _OLD_DOOR& src);
BOOLEAN Load(INT8** hBuffer, FLOAT dMajorMapVersion);
BOOLEAN Save(HWFILE hFile, FLOAT dMajorMapVersion, UINT8 ubMinorMapVersion);
};
typedef enum
{
@@ -109,9 +131,11 @@ typedef struct
#define DONTSETDOORSTATUS 2
// WANNE - BMP: Maybe we also need here an "_OLD_DOOR_STATUS" struct
// but this does not exist in BMP code!
typedef struct
{
INT16 sGridNo;
INT32 sGridNo;
UINT8 ubFlags;
} DOOR_STATUS;
@@ -157,14 +181,11 @@ extern UINT8 gubNumDoors;
//then copy everything over again. gubMaxDoors holds the arrays actual number of slots, even though
//the current number (gubNumDoors) will be <= to it.
extern UINT8 gubMaxDoors;
//File I/O for loading the door information from the map. This automatically allocates
//the exact number of slots when loading.
extern void LoadDoorTableFromMap( INT8 **hBuffer );
//Saves the existing door information to the map. Before it actually saves, it'll verify that the
//door still exists. Otherwise, it'll ignore it. It is possible in the editor to delete doors in
//many different ways, so I opted to put it in the saving routine.
extern void SaveDoorTableToMap( HWFILE fp );
//dnl ch42 250909
// File I/O for loading the door information from the map. This automatically allocates the exact number of slots when loading.
void LoadDoorTableFromMap(INT8** hBuffer, FLOAT dMajorMapVersion);
// Saves the existing door information to the map. Before it actually saves, it'll verify that the door still exists. Otherwise, it'll ignore it. It is possible in the editor to delete doors in many different ways, so I opted to put it in the saving routine.
void SaveDoorTableToMap(HWFILE hFile, FLOAT dMajorMapVersion, UINT8 ubMinorMapVersion);
//The editor adds locks to the world. If the gridno already exists, then the currently existing door
//information is overwritten.
extern void AddDoorInfoToTable( DOOR *pDoor );
@@ -204,16 +225,16 @@ BOOLEAN LoadDoorTableFromDoorTableTempFile( );
// if the door already exists, nothing happens
// fOpen is True if the door is to be initially open, false if it is closed
// fInitiallyPercieveOpen is true if the door is to be initially open, else false
BOOLEAN ModifyDoorStatus( INT16 sGridNo, BOOLEAN fOpen, BOOLEAN fInitiallyPercieveOpen );
BOOLEAN ModifyDoorStatus( INT32 sGridNo, BOOLEAN fOpen, BOOLEAN fInitiallyPercieveOpen );
//Deletes the door status array
void TrashDoorStatusArray( );
// Returns true if the door is open, otherwise false
BOOLEAN IsDoorOpen( INT16 sGridNo );
BOOLEAN IsDoorOpen( INT32 sGridNo );
//Returns true if the door is perceioved as open
BOOLEAN IsDoorPerceivedOpen( INT16 sGridNo );
BOOLEAN IsDoorPerceivedOpen( INT32 sGridNo );
// Saves the Door Status array to the MapTempfile
BOOLEAN SaveDoorStatusArrayToDoorStatusTempFile( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ );
@@ -222,10 +243,10 @@ BOOLEAN SaveDoorStatusArrayToDoorStatusTempFile( INT16 sSectorX, INT16 sSectorY,
BOOLEAN LoadDoorStatusArrayFromDoorStatusTempFile();
//Modify the Doors open status
BOOLEAN SetDoorOpenStatus( INT16 sGridNo, BOOLEAN fOpen );
BOOLEAN SetDoorOpenStatus( INT32 sGridNo, BOOLEAN fOpen );
//Modify the doors perceived open status
BOOLEAN SetDoorPerceivedOpenStatus( INT16 sGridNo, BOOLEAN fPerceivedOpen );
BOOLEAN SetDoorPerceivedOpenStatus( INT32 sGridNo, BOOLEAN fPerceivedOpen );
//Save the key table to the saved game file
@@ -235,11 +256,11 @@ BOOLEAN SaveKeyTableToSaveGameFile( HWFILE hFile );
BOOLEAN LoadKeyTableFromSaveedGameFile( HWFILE hFile );
// Returns a doors status value, NULL if not found
DOOR_STATUS *GetDoorStatus( INT16 sGridNo );
DOOR_STATUS *GetDoorStatus( INT32 sGridNo );
BOOLEAN UpdateDoorStatusPerceivedValue( INT16 sGridNo );
BOOLEAN UpdateDoorStatusPerceivedValue( INT32 sGridNo );
BOOLEAN AllMercsLookForDoor( INT16 sGridNo, BOOLEAN fUpdateValue );
BOOLEAN AllMercsLookForDoor( INT32 sGridNo, BOOLEAN fUpdateValue );
BOOLEAN MercLooksForDoors( SOLDIERTYPE *pSoldier, BOOLEAN fUpdateValue );
@@ -253,8 +274,8 @@ void ExamineDoorsOnEnteringSector( );
void HandleDoorsChangeWhenEnteringSectorCurrentlyLoaded( );
void AttachStringToDoor( INT16 sGridNo );
void AttachStringToDoor( INT32 sGridNo );
void DropKeysInKeyRing( SOLDIERTYPE *pSoldier, INT16 sGridNo, INT8 bLevel, INT8 bVisible, BOOLEAN fAddToDropList, INT32 iDropListSlot, BOOLEAN fUseUnLoaded );
void DropKeysInKeyRing( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bLevel, INT8 bVisible, BOOLEAN fAddToDropList, INT32 iDropListSlot, BOOLEAN fUseUnLoaded );
#endif