Files
source/TileEngine/SaveLoadMap.h
T
silversurfer d7fa19068f - New camo handling:
Camo Kits can now only be used to paint naked skin which usually means face and hands. Clothing will take care of the rest Together they can reach 100% camo.
CAMO_KIT_USABLE_AREA = 5 in Ja2_Options.ini sets the area that can be painted.

CAMO_LBE_OVER_VEST_MODIFIER = 0.2
CAMO_LBE_OVER_PANTS_MODIFIER = 0.6
These two set the amount of camo that armor vest/pants can provide if LBE is worn over them.
http://www.ja-galaxy-forum.com/board/ubbthreads.php/topics/327902/Re_Code_Snippets.html#Post327902

- New Mine avoidance for civilians (by Sevenfm)
Civilians can now avoid player placed mines.
CIVILIANS_AVOID_PLAYER_MINES = TRUE in Ja2_Options.INI takes care of that. I set the default to TRUE which will allow players to use mine fields in city sectors.
http://www.ja-galaxy-forum.com/board/ubbthreads.php/topics/327817/Re_Code_Snippets.html#Post327817

- Smoke effects and explosive attachments (by Sevenfm)
Normal explosions can now cause a smoke effect. Explosives can be attached to other exlosives to create a more potent bundle. Ja2_Options.INI has some new options for that:
ADD_SMOKE_AFTER_EXPLOSION = FALSE
ALLOW_EXPLOSIVE_ATTACHMENTS = FALSE
ALLOW_SPECIAL_EXPLOSIVE_ATTACHMENTS = FALSE
http://www.ja-galaxy-forum.com/board/ubbthreads.php/topics/327918/Re_Code_Snippets.html#Post327918


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6582 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-11-11 12:51:33 +00:00

127 lines
3.7 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,
#ifdef JA2UB
SLM_REMOVE_EXIT_GRID,
#endif
// sevenfm
SLM_MINE_PRESENT,
};
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();
// sevenfm
void SaveMineFlagFromMapToTempFile();
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 );
#ifdef JA2UB
//ja25 ub
void AddRemoveExitGridToUnloadedMapTempFile( UINT32 usGridNo, INT16 sSectorX, INT16 sSectorY, UINT8 ubSectorZ );
#endif
#endif