Files
source/TileEngine/SaveLoadMap.h
T
Wanne 14750c6903 **********************************************************
** 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
2010-02-28 18:38:52 +00:00

116 lines
3.4 KiB
C

#ifndef _SAVELOADMAP__H_
#define _SAVELOADMAP__H_
#include "WorldDef.h"
#include "Exit Grids.h"
//Used for the ubType in the MODIFY_MAP struct
enum
{
SLM_NONE,
//Adding a map graphic
SLM_LAND,
SLM_OBJECT,
SLM_STRUCT,
SLM_SHADOW,
SLM_MERC, //Should never be used
SLM_ROOF,
SLM_ONROOF,
SLM_TOPMOST, //Should never be used
// For Removing
SLM_REMOVE_LAND,
SLM_REMOVE_OBJECT,
SLM_REMOVE_STRUCT,
SLM_REMOVE_SHADOW,
SLM_REMOVE_MERC, //Should never be used
SLM_REMOVE_ROOF,
SLM_REMOVE_ONROOF,
SLM_REMOVE_TOPMOST, //Should never be used
//Smell, or Blood is used
SLM_BLOOD_SMELL,
// Damage a particular struct
SLM_DAMAGED_STRUCT,
//Exit Grids
SLM_EXIT_GRIDS,
// State of Openable structs
SLM_OPENABLE_STRUCT,
// Modify window graphic & structure
SLM_WINDOW_HIT,
};
typedef struct
{
INT32 usGridNo; //The gridno the graphic will be applied to
UINT16 usImageType; //graphic index
UINT16 usSubImageIndex; //
// UINT16 usIndex;
UINT8 ubType; // the layer it will be applied to
UINT8 ubExtra; // Misc. variable used to strore arbritary values
} MODIFY_MAP;
// Call this function, to set whether the map changes will be added to the map temp file
void ApplyMapChangesToMapTempFile( BOOLEAN fAddToMap );
BOOLEAN SaveModifiedMapStructToMapTempFile( MODIFY_MAP *pMap, INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ );
//Applies a change TO THE MAP TEMP file
void AddStructToMapTempFile( INT32 iMapIndex, UINT16 usIndex );
//Applies a change TO THE MAP from the temp file
void AddStructFromMapTempFileToMap( INT32 iMapIndex, UINT16 usIndex );
void AddObjectToMapTempFile( INT32 uiMapIndex, UINT16 usIndex );
BOOLEAN LoadAllMapChangesFromMapTempFileAndApplyThem( );
void RemoveStructFromMapTempFile( INT32 uiMapIndex, UINT16 usIndex );
void AddRemoveObjectToMapTempFile( INT32 uiMapIndex, UINT16 usIndex );
void SaveBloodSmellAndRevealedStatesFromMapToTempFile();
BOOLEAN SaveRevealedStatusArrayToRevealedTempFile( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ );
BOOLEAN LoadRevealedStatusArrayFromRevealedTempFile();
void AddRemoveObjectToUnLoadedMapTempFile( INT32 uiMapIndex, UINT16 usIndex, INT16 sSectorX, INT16 sSectorY, UINT8 ubSectorZ );
void RemoveStructFromUnLoadedMapTempFile( INT32 uiMapIndex, UINT16 usIndex, INT16 sSectorX, INT16 sSectorY, UINT8 ubSectorZ );
void AddObjectToUnLoadedMapTempFile( INT32 uiMapIndex, UINT16 usIndex, INT16 sSectorX, INT16 sSectorY, UINT8 ubSectorZ );
void AddStructToUnLoadedMapTempFile( INT32 uiMapIndex, UINT16 usIndex, INT16 sSectorX, INT16 sSectorY, UINT8 ubSectorZ );
//Adds the exit grid to
void AddExitGridToMapTempFile( INT32 usGridNo, EXITGRID *pExitGrid, INT16 sSectorX, INT16 sSectorY, UINT8 ubSectorZ );
//This function removes a struct with the same MapIndex and graphic index from the given sectors temp file
BOOLEAN RemoveGraphicFromTempFile( INT32 uiMapIndex, UINT16 usIndex, INT16 sSectorX, INT16 sSectorY, UINT8 ubSectorZ );
void SetOpenableStructStatusFromMapTempFile( INT32 uiMapIndex, BOOLEAN fOpened );
void AddOpenableStructStatusToMapTempFile( INT32 uiMapIndex, BOOLEAN fOpened );
void AddWindowHitToMapTempFile( INT32 uiMapIndex );
BOOLEAN ChangeStatusOfOpenableStructInUnloadedSector( UINT16 usSectorX, UINT16 usSectorY, INT8 bSectorZ, INT32 usGridNo, BOOLEAN fChangeToOpen );
#endif