Fix: tileset index 0 always present in construct/deconstruct arrays

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8289 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2016-08-14 18:55:09 +00:00
parent a332b1943c
commit cbf284ce4d
3 changed files with 62 additions and 78 deletions
+8 -2
View File
@@ -80,7 +80,10 @@ typedef struct
} ITEM_POOL_LOCATOR;
// Flugente: we can construct and deconstruct map structures via items.
typedef struct {
typedef struct STRUCTURE_DECONSTRUCT {
STRUCTURE_DECONSTRUCT()
: usDeconstructItem( 0 ), usItemToCreate( 0 ), usCreatedItemStatus( 0 ), szTileSetDisplayName( ), szTileSetName( ), dCreationCost( 0 ) {}
UINT16 usDeconstructItem; // the item that has to be used to deconstruct the structure
UINT16 usItemToCreate; // the item that will be created when we deconstruct a structure
UINT8 usCreatedItemStatus; // status of the item to create
@@ -94,7 +97,10 @@ typedef struct {
extern STRUCTURE_DECONSTRUCT gStructureDeconstruct[STRUCTURE_DECONSTRUCT_MAX];
typedef struct {
typedef struct STRUCTURE_CONSTRUCT {
STRUCTURE_CONSTRUCT()
: usCreationItem( 0 ), usItemStatusLoss( 0 ), szTileSetDisplayName(), szTileSetName(), dCreationCost( 1.0 ), fFortifyAdjacentAdjustment( TRUE ) {}
UINT16 usCreationItem; // the item that will be consumed when creating the structure
UINT8 usItemStatusLoss; // item will lose this number of status points
char szTileSetDisplayName[20]; // name of this structure to the player (tileset names are obscure)