mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
Update (by anv):
- fix: data read from Data/AdditionalProperties, - new tag: <bTrapBonus> + updated data for tiles, trap level influenced by terrain, - new feature/option: COVER_SYSTEM_STATIC_SHADOWS_DECREASE_BRIGHTNESS. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7016 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -125,9 +125,9 @@ TILE_IMAGERY *LoadTileSurface( STR8 cFilename )
|
||||
}
|
||||
else
|
||||
{
|
||||
// and if not found, then in /Tilesets/
|
||||
// and if not found, then in /AdditionalProperties/
|
||||
cEndOfName = strrchr( cAdditionalPropertiesFilename, '\\' );
|
||||
sprintf( cCommonAdditionalPropertiesFilename, "TILESETS\\ADDITIONALPROPERTIES%s", cEndOfName );
|
||||
sprintf( cCommonAdditionalPropertiesFilename, "ADDITIONALPROPERTIES%s", cEndOfName );
|
||||
if (FileExists( cCommonAdditionalPropertiesFilename ))
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
@@ -155,6 +155,8 @@ TILE_IMAGERY *LoadTileSurface( STR8 cFilename )
|
||||
pTileSurf->bCamoStanceModifer = zAdditionalTileProperties.bCamoStanceModifer;
|
||||
pTileSurf->bStealthDifficultyModifer = zAdditionalTileProperties.bStealthDifficultyModifer;
|
||||
|
||||
pTileSurf->bTrapBonus = zAdditionalTileProperties.bTrapBonus;
|
||||
|
||||
pTileSurf->uiAdditionalFlags = zAdditionalTileProperties.uiAdditionalFlags;
|
||||
|
||||
if (pStructureFileRef && pStructureFileRef->pAuxData != NULL)
|
||||
|
||||
@@ -960,6 +960,7 @@ void SetSpecificDatabaseValues( UINT16 usType, UINT16 uiDatabaseElem, TILE_ELEME
|
||||
TileElement->bSoundModifier = 0;
|
||||
TileElement->bCamoStanceModifer= 0;
|
||||
TileElement->bStealthDifficultyModifer = 0;
|
||||
TileElement->bTrapBonus = 0;
|
||||
TileElement->uiAdditionalFlags = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -754,6 +754,23 @@ UINT8 LightTrueLevel( INT32 sGridNo, INT16 bLevel )
|
||||
{
|
||||
iSum=pNode->ubNaturalShadeLevel - (pNode->ubSumLights - pNode->ubFakeShadeLevel );
|
||||
|
||||
if(gGameExternalOptions.fStaticShadowsDecreaseBrightness && ( gRenderFlags & RENDER_FLAG_SHADOWS ))
|
||||
{
|
||||
INT32 sNewGridNo = NewGridNo( sGridNo, (UINT16)DirectionInc( NORTH ) );
|
||||
STRUCTURE* pStructure = gpWorldLevelData[ sNewGridNo ].pStructureHead;
|
||||
if(pStructure != NULL)
|
||||
{
|
||||
LEVELNODE* pShadowNode = NULL;
|
||||
if(!(pStructure->fFlags & STRUCTURE_BASE_TILE))
|
||||
pShadowNode = gpWorldLevelData[ FindBaseStructure(pStructure)->sGridNo ].pShadowHead;
|
||||
else
|
||||
pShadowNode = gpWorldLevelData[ sNewGridNo ].pShadowHead;
|
||||
if(pShadowNode != NULL)
|
||||
{
|
||||
iSum += max( 0, (StructureHeight(pStructure) - 1 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
iSum=__min(SHADE_MIN, iSum);
|
||||
iSum=__max(SHADE_MAX, iSum);
|
||||
return( (UINT8) iSum );
|
||||
|
||||
@@ -694,6 +694,8 @@ void CreateTileDatabase( INT32 iTilesetID )
|
||||
TileElement.bSoundModifier = TileSurf->bSoundModifier;
|
||||
TileElement.bStealthDifficultyModifer = TileSurf->bStealthDifficultyModifer;
|
||||
|
||||
TileElement.bTrapBonus = TileSurf->bTrapBonus;
|
||||
|
||||
TileElement.uiAdditionalFlags = TileSurf->uiAdditionalFlags;
|
||||
|
||||
// Check for multi-z stuff
|
||||
|
||||
@@ -92,6 +92,8 @@ typedef struct
|
||||
INT8 bSoundModifier;
|
||||
INT8 bStealthDifficultyModifer;
|
||||
|
||||
INT8 bTrapBonus;
|
||||
|
||||
UINT32 uiAdditionalFlags;
|
||||
|
||||
|
||||
@@ -151,6 +153,8 @@ typedef struct
|
||||
INT8 bSoundModifier;
|
||||
INT8 bStealthDifficultyModifer;
|
||||
|
||||
INT8 bTrapBonus;
|
||||
|
||||
UINT32 uiAdditionalFlags;
|
||||
|
||||
|
||||
@@ -196,10 +200,11 @@ typedef struct
|
||||
INT8 bSoundModifier;
|
||||
INT8 bStealthDifficultyModifer;
|
||||
|
||||
INT8 bTrapBonus;
|
||||
|
||||
UINT32 uiAdditionalFlags;
|
||||
|
||||
} ADDITIONAL_TILE_PROPERTIES_VALUES;
|
||||
|
||||
extern ADDITIONAL_TILE_PROPERTIES_VALUES zAdditionalTileProperties;
|
||||
|
||||
void CreateTileDatabase( INT32 iTilesetID );
|
||||
|
||||
Reference in New Issue
Block a user