mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
************************************************************
* Merged Source Code from Development Trunk: Revision 4063 * ************************************************************ - Source Code is merged from: https://81.169.133.124/source/ja2/branches/Wanne/JA2%201.13%20MP - This will be the Source for the Beta 2011 Test git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4064 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -67,6 +67,8 @@
|
||||
#include "fov.h"
|
||||
#include "Map Information.h"
|
||||
#include "Soldier Functions.h"//dnl ch40 200909
|
||||
#include "Text.h" // added by SANDRO
|
||||
#include "campaign.h" // yet another one added
|
||||
#endif
|
||||
|
||||
#include "Soldier Macros.h"
|
||||
@@ -1477,6 +1479,294 @@ BOOLEAN DamageSoldierFromBlast( UINT8 ubPerson, UINT8 ubOwner, INT32 sBombGridNo
|
||||
{
|
||||
sNewWoundAmt = 0;
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
// SANDRO - STOMP traits
|
||||
else
|
||||
{
|
||||
if ( (MercPtrs[ ubOwner ] != NULL) && gGameOptions.fNewTraitSystem)
|
||||
{
|
||||
// Demolitions damage bonus with bombs and mines
|
||||
if ( HAS_SKILL_TRAIT( MercPtrs[ ubOwner ], DEMOLITIONS_NT ) &&
|
||||
Explosive[Item[usItem].ubClassIndex].ubType == EXPLOSV_NORMAL && Item[usItem].usItemClass == IC_BOMB &&
|
||||
(!Item[usItem].attachment || Item[usItem].mine ))
|
||||
{
|
||||
sNewWoundAmt = (INT16)(((sNewWoundAmt * (100 + gSkillTraitValues.ubDEDamageOfBombsAndMines)) / 100) + 0.5);
|
||||
}
|
||||
// Heavy Weapons trait bonus damage to tanks
|
||||
if ( HAS_SKILL_TRAIT( MercPtrs[ ubOwner ], HEAVY_WEAPONS_NT ) && TANK( pSoldier ) &&
|
||||
Explosive[Item[usItem].ubClassIndex].ubType == EXPLOSV_NORMAL )
|
||||
{
|
||||
sNewWoundAmt = (INT16)(((sNewWoundAmt * (100 + gSkillTraitValues.ubHWDamageTanksBonusPercent * NUM_SKILL_TRAITS( MercPtrs[ ubOwner ], HEAVY_WEAPONS_NT ))) / 100) + 0.5); // +30%
|
||||
}
|
||||
// Heavy Weapons trait bonus damage with rocket, grenade launchers and mortar
|
||||
else if ( HAS_SKILL_TRAIT( MercPtrs[ ubOwner ], HEAVY_WEAPONS_NT ) &&
|
||||
Explosive[Item[usItem].ubClassIndex].ubType == EXPLOSV_NORMAL &&
|
||||
((Item[usItem].usItemClass == IC_BOMB && Item[usItem].attachment && !Item[usItem].mine ) || // mortar shells
|
||||
(Item[usItem].usItemClass == IC_GRENADE && (Item[usItem].glgrenade || Item[usItem].electronic) ) || // rockets for rocketlaunchers (I haven't found any other way)
|
||||
(Item[usItem].usItemClass == IC_LAUNCHER ) || Item[usItem].rocketlauncher || Item[usItem].singleshotrocketlauncher ) )
|
||||
{
|
||||
sNewWoundAmt = (INT16)(((sNewWoundAmt * (100 + gSkillTraitValues.ubHWDamageBonusPercentForHW * NUM_SKILL_TRAITS( MercPtrs[ ubOwner ], HEAVY_WEAPONS_NT ))) / 100) + 0.5); // +15%
|
||||
}
|
||||
}
|
||||
// adjust damage resistance of TANKS
|
||||
if ( TANK( pSoldier ) && gGameOptions.fNewTraitSystem )
|
||||
{
|
||||
sNewWoundAmt = (INT16)(sNewWoundAmt * (100 - gSkillTraitValues.bTanksDamageResistanceModifier) / 100);
|
||||
// another half of this for ordinary grenades
|
||||
if ( (( Item[usItem].usItemClass == IC_GRENADE ) || Item[usItem].glgrenade ) && !Item[usItem].electronic )
|
||||
sNewWoundAmt = (INT16)(sNewWoundAmt * (100 - (gSkillTraitValues.bTanksDamageResistanceModifier / 2)) / 100);
|
||||
}
|
||||
|
||||
// Bodybuilding damage resistance
|
||||
if ( gGameOptions.fNewTraitSystem && HAS_SKILL_TRAIT( pSoldier, BODYBUILDING_NT ) )
|
||||
sNewWoundAmt = max( 1, (INT16)(sNewWoundAmt * (100 - gSkillTraitValues.ubBBDamageResistance) / 100));
|
||||
|
||||
// Damage resistance for Militia
|
||||
if (pSoldier->ubSoldierClass == SOLDIER_CLASS_GREEN_MILITIA && gGameExternalOptions.bGreenMilitiaDamageResistance != 0)
|
||||
sNewWoundAmt -= ((sNewWoundAmt * gGameExternalOptions.bGreenMilitiaDamageResistance) /100);
|
||||
else if (pSoldier->ubSoldierClass == SOLDIER_CLASS_REG_MILITIA && gGameExternalOptions.bRegularMilitiaDamageResistance != 0)
|
||||
sNewWoundAmt -= ((sNewWoundAmt * gGameExternalOptions.bRegularMilitiaDamageResistance) /100);
|
||||
else if (pSoldier->ubSoldierClass == SOLDIER_CLASS_ELITE_MILITIA && gGameExternalOptions.bVeteranMilitiaDamageResistance != 0)
|
||||
sNewWoundAmt -= ((sNewWoundAmt * gGameExternalOptions.bVeteranMilitiaDamageResistance) /100);
|
||||
// bonus for enemy too
|
||||
else if (pSoldier->ubSoldierClass == SOLDIER_CLASS_ADMINISTRATOR && gGameExternalOptions.sEnemyAdminDamageResistance != 0)
|
||||
sNewWoundAmt -= ((sNewWoundAmt * gGameExternalOptions.sEnemyAdminDamageResistance) /100);
|
||||
else if (pSoldier->ubSoldierClass == SOLDIER_CLASS_ARMY && gGameExternalOptions.sEnemyRegularDamageResistance != 0)
|
||||
sNewWoundAmt -= ((sNewWoundAmt * gGameExternalOptions.sEnemyRegularDamageResistance) /100);
|
||||
else if (pSoldier->ubSoldierClass == SOLDIER_CLASS_ELITE && gGameExternalOptions.sEnemyEliteDamageResistance != 0)
|
||||
sNewWoundAmt -= ((sNewWoundAmt * gGameExternalOptions.sEnemyEliteDamageResistance) /100);
|
||||
|
||||
// we can loose stats due to being hit by the blast
|
||||
else if ( gGameOptions.fNewTraitSystem && Explosive[Item[usItem].ubClassIndex].ubType == EXPLOSV_NORMAL &&
|
||||
!AM_A_ROBOT( pSoldier ) && !(pSoldier->flags.uiStatusFlags & SOLDIER_MONSTER) &&
|
||||
sNewWoundAmt > 2 && sNewWoundAmt < pSoldier->stats.bLife )
|
||||
{
|
||||
if ( PreRandom( sNewWoundAmt ) > gSkillTraitValues.ubDamageNeededToLoseStats )
|
||||
{
|
||||
UINT8 ubStatLoss = PreRandom( sNewWoundAmt ) + 1;
|
||||
UINT8 ubPickStat = PreRandom( 20 );
|
||||
if (ubPickStat < 3 ) // 15% chance to lose Wisdom
|
||||
{
|
||||
if (ubStatLoss >= pSoldier->stats.bWisdom)
|
||||
{
|
||||
ubStatLoss = pSoldier->stats.bWisdom - 1;
|
||||
}
|
||||
if ( ubStatLoss > 0 )
|
||||
{
|
||||
pSoldier->stats.bWisdom -= ubStatLoss;
|
||||
pSoldier->ubCriticalStatDamage[DAMAGED_STAT_WISDOM] += ubStatLoss;
|
||||
|
||||
if (pSoldier->ubProfile != NO_PROFILE)
|
||||
{
|
||||
gMercProfiles[ pSoldier->ubProfile ].bWisdom = pSoldier->stats.bWisdom;
|
||||
}
|
||||
|
||||
if (pSoldier->name[0] && pSoldier->bVisible == TRUE)
|
||||
{
|
||||
// make stat RED for a while...
|
||||
pSoldier->timeChanges.uiChangeWisdomTime = GetJA2Clock();
|
||||
pSoldier->usValueGoneUp &= ~( WIS_INCREASE );
|
||||
|
||||
if (ubStatLoss == 1)
|
||||
{
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, Message[STR_LOSES_1_WISDOM], pSoldier->name );
|
||||
}
|
||||
else
|
||||
{
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, Message[STR_LOSES_WISDOM], pSoldier->name, ubStatLoss );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (ubPickStat < 7 ) // 20% chance to lose Dexterity
|
||||
{
|
||||
if (ubStatLoss >= pSoldier->stats.bDexterity)
|
||||
{
|
||||
ubStatLoss = pSoldier->stats.bDexterity - 1;
|
||||
}
|
||||
if ( ubStatLoss > 0 )
|
||||
{
|
||||
pSoldier->stats.bDexterity -= ubStatLoss;
|
||||
pSoldier->ubCriticalStatDamage[DAMAGED_STAT_DEXTERITY] += ubStatLoss;
|
||||
|
||||
if (pSoldier->ubProfile != NO_PROFILE)
|
||||
{
|
||||
gMercProfiles[ pSoldier->ubProfile ].bDexterity = pSoldier->stats.bDexterity;
|
||||
}
|
||||
|
||||
if (pSoldier->name[0] && pSoldier->bVisible == TRUE)
|
||||
{
|
||||
// make stat RED for a while...
|
||||
pSoldier->timeChanges.uiChangeDexterityTime = GetJA2Clock();
|
||||
pSoldier->usValueGoneUp &= ~( DEX_INCREASE );
|
||||
|
||||
if (ubStatLoss == 1)
|
||||
{
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, Message[STR_LOSES_1_DEX], pSoldier->name );
|
||||
}
|
||||
else
|
||||
{
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, Message[STR_LOSES_DEX], pSoldier->name, ubStatLoss );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (ubPickStat < 11 ) // 20% chance to lose Strength
|
||||
{
|
||||
if (ubStatLoss >= pSoldier->stats.bStrength)
|
||||
{
|
||||
ubStatLoss = pSoldier->stats.bStrength - 1;
|
||||
}
|
||||
if ( ubStatLoss > 0 )
|
||||
{
|
||||
pSoldier->stats.bStrength -= ubStatLoss;
|
||||
// added this for healing lost stats feature
|
||||
pSoldier->ubCriticalStatDamage[DAMAGED_STAT_STRENGTH] += ubStatLoss;
|
||||
|
||||
if (pSoldier->ubProfile != NO_PROFILE)
|
||||
{
|
||||
gMercProfiles[ pSoldier->ubProfile ].bStrength = pSoldier->stats.bStrength;
|
||||
}
|
||||
|
||||
if (pSoldier->name[0] && pSoldier->bVisible == TRUE)
|
||||
{
|
||||
// make stat RED for a while...
|
||||
pSoldier->timeChanges.uiChangeStrengthTime = GetJA2Clock();
|
||||
pSoldier->usValueGoneUp &= ~( STRENGTH_INCREASE );
|
||||
|
||||
if (ubStatLoss == 1)
|
||||
{
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, Message[STR_LOSES_1_STRENGTH], pSoldier->name );
|
||||
}
|
||||
else
|
||||
{
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, Message[STR_LOSES_STRENGTH], pSoldier->name, ubStatLoss );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (ubPickStat < 15 ) // 20% chance to lose Agility
|
||||
{
|
||||
if (ubStatLoss >= pSoldier->stats.bAgility)
|
||||
{
|
||||
ubStatLoss = pSoldier->stats.bAgility - 1;
|
||||
}
|
||||
if ( ubStatLoss > 0 )
|
||||
{
|
||||
pSoldier->stats.bAgility -= ubStatLoss;
|
||||
// added this for healing lost stats feature
|
||||
pSoldier->ubCriticalStatDamage[DAMAGED_STAT_AGILITY] += ubStatLoss;
|
||||
|
||||
if (pSoldier->ubProfile != NO_PROFILE)
|
||||
{
|
||||
gMercProfiles[ pSoldier->ubProfile ].bAgility = pSoldier->stats.bAgility;
|
||||
}
|
||||
|
||||
if (pSoldier->name[0] && pSoldier->bVisible == TRUE)
|
||||
{
|
||||
// make stat RED for a while...
|
||||
pSoldier->timeChanges.uiChangeAgilityTime = GetJA2Clock();
|
||||
pSoldier->usValueGoneUp &= ~( AGIL_INCREASE );
|
||||
|
||||
if (ubStatLoss == 1)
|
||||
{
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, Message[STR_LOSES_1_AGIL], pSoldier->name );
|
||||
}
|
||||
else
|
||||
{
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, Message[STR_LOSES_AGIL], pSoldier->name, ubStatLoss );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (ubPickStat < 18 ) // 15% chance to lose Health
|
||||
{
|
||||
if (ubStatLoss >= (pSoldier->stats.bLifeMax - OKLIFE))
|
||||
{
|
||||
ubStatLoss = pSoldier->stats.bLifeMax - OKLIFE - 1;
|
||||
}
|
||||
if ( ubStatLoss > sNewWoundAmt)
|
||||
{
|
||||
ubStatLoss = (UINT8)sNewWoundAmt;
|
||||
}
|
||||
if ( ubStatLoss > 0 )
|
||||
{
|
||||
pSoldier->stats.bLifeMax -= ubStatLoss;
|
||||
pSoldier->ubCriticalStatDamage[DAMAGED_STAT_HEALTH] += ubStatLoss;
|
||||
|
||||
if (pSoldier->ubProfile != NO_PROFILE)
|
||||
{
|
||||
gMercProfiles[ pSoldier->ubProfile ].bLifeMax = pSoldier->stats.bLifeMax;
|
||||
}
|
||||
|
||||
if (pSoldier->name[0] && pSoldier->bVisible == TRUE)
|
||||
{
|
||||
// make stat RED for a while...
|
||||
pSoldier->timeChanges.uiChangeDexterityTime = GetJA2Clock();
|
||||
pSoldier->usValueGoneUp &= ~( HEALTH_INCREASE );
|
||||
|
||||
if (ubStatLoss == 1)
|
||||
{
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, New113Message[MSG113_LOSES_ONE_POINT_MAX_HEALTH], pSoldier->name );
|
||||
}
|
||||
else
|
||||
{
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, New113Message[MSG113_LOSES_X_POINTS_MAX_HEALTH], pSoldier->name, ubStatLoss );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else // 10% chance to be blinded
|
||||
{
|
||||
if (pSoldier->bBlindedCounter < ubStatLoss )
|
||||
{
|
||||
pSoldier->bBlindedCounter = ubStatLoss ;
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%s was blinded by the blast!", pSoldier->name );
|
||||
}
|
||||
}
|
||||
// SANDRO - new merc records - times stat damaged
|
||||
if ( ubStatLoss > 0 && pSoldier->ubProfile != NO_PROFILE )
|
||||
gMercProfiles[ pSoldier->ubProfile ].records.usTimesStatDamaged++;
|
||||
}
|
||||
}
|
||||
|
||||
sNewWoundAmt = max(1, sNewWoundAmt);
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
// SANDRO - option to make special NPCs stronger - damage resistance
|
||||
if (gGameExternalOptions.usSpecialNPCStronger > 0)
|
||||
{
|
||||
switch( pSoldier->ubProfile )
|
||||
{
|
||||
case CARMEN:
|
||||
case QUEEN:
|
||||
case JOE:
|
||||
case ANNIE:
|
||||
case CHRIS:
|
||||
case KINGPIN:
|
||||
case TIFFANY:
|
||||
case T_REX:
|
||||
case DRUGGIST:
|
||||
case GENERAL:
|
||||
case JACK:
|
||||
case OLAF:
|
||||
case RAY:
|
||||
case OLGA:
|
||||
case TYRONE:
|
||||
case MIKE:
|
||||
sNewWoundAmt -= (sNewWoundAmt * gGameExternalOptions.usSpecialNPCStronger / 200);
|
||||
sNewWoundAmt = max( 1, sNewWoundAmt);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// SANDRO - new merc records - times wounded (blasted by explosion)
|
||||
if ( ( sNewWoundAmt > 1 || sBreathAmt > 1000 ) && pSoldier->ubProfile != NO_PROFILE )
|
||||
gMercProfiles[ pSoldier->ubProfile ].records.usTimesWoundedBlasted++;
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// Lesh: flashbang does affect on soldier or not - check it
|
||||
if ( (Item[usItem].usItemClass & IC_EXPLOSV) && fFlashbang )
|
||||
@@ -3359,12 +3649,18 @@ void DecayBombTimers( void )
|
||||
if ( (*pObj)[0]->data.misc.ubBombOwner > 1 )
|
||||
{
|
||||
gubPersonToSetOffExplosions = (UINT8) ((*pObj)[0]->data.misc.ubBombOwner - 2);
|
||||
// SANDRO - merc records - detonating explosives
|
||||
if ( MercPtrs[ gubPersonToSetOffExplosions ]->ubProfile != NO_PROFILE && MercPtrs[ gubPersonToSetOffExplosions ]->bTeam == gbPlayerNum )
|
||||
{
|
||||
gMercProfiles[ MercPtrs[ gubPersonToSetOffExplosions ]->ubProfile ].records.usExpDetonated++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gubPersonToSetOffExplosions = NOBODY;
|
||||
}
|
||||
|
||||
|
||||
// put this bomb on the queue
|
||||
AddBombToQueue( uiWorldBombIndex, uiTimeStamp );
|
||||
|
||||
@@ -3397,6 +3693,17 @@ void SetOffBombsByFrequency( UINT8 ubID, INT8 bFrequency )
|
||||
// Found a remote bomb, so check to see if it has the same frequency
|
||||
if ((*pObj)[0]->data.misc.bFrequency == bFrequency)
|
||||
{
|
||||
// SANDRO - added merc records and some exp
|
||||
if ( ((*pObj)[0]->data.misc.ubBombOwner) > 1 )
|
||||
{
|
||||
if ( MercPtrs[((*pObj)[0]->data.misc.ubBombOwner - 2)]->ubProfile != NO_PROFILE &&
|
||||
MercPtrs[((*pObj)[0]->data.misc.ubBombOwner - 2)]->bTeam == gbPlayerNum )
|
||||
{
|
||||
gMercProfiles[MercPtrs[((*pObj)[0]->data.misc.ubBombOwner - 2)]->ubProfile].records.usExpDetonated++;
|
||||
|
||||
StatChange( MercPtrs[((*pObj)[0]->data.misc.ubBombOwner - 2)], EXPLODEAMT, ( 5 ), FALSE );
|
||||
}
|
||||
}
|
||||
|
||||
gubPersonToSetOffExplosions = ubID;
|
||||
|
||||
@@ -3497,6 +3804,14 @@ BOOLEAN SetOffBombsInGridNo( UINT8 ubID, INT32 sGridNo, BOOLEAN fAllBombs, INT8
|
||||
{
|
||||
gubPersonToSetOffExplosions = ubID;
|
||||
|
||||
// SANDRO - merc records
|
||||
// only if we blew up somebody not in our team(no achievement for blowing our guys :)), only if owner exists and have profile
|
||||
if ( (MercPtrs[ubID]->bTeam != gbPlayerNum) && ((*pObj)[0]->data.misc.ubBombOwner > 1) )
|
||||
{
|
||||
if ( MercPtrs[ ((*pObj)[0]->data.misc.ubBombOwner - 2) ]->ubProfile != NO_PROFILE && MercPtrs[ ((*pObj)[0]->data.misc.ubBombOwner - 2) ]->bTeam == gbPlayerNum )
|
||||
gMercProfiles[ MercPtrs[ ((*pObj)[0]->data.misc.ubBombOwner - 2) ]->ubProfile ].records.usExpDetonated++;
|
||||
}
|
||||
|
||||
// put this bomb on the queue
|
||||
AddBombToQueue( uiWorldBombIndex, uiTimeStamp );
|
||||
if (pObj->usItem != ACTION_ITEM || (*pObj)[0]->data.misc.bActionValue == ACTION_ITEM_BLOW_UP)
|
||||
|
||||
@@ -133,4 +133,12 @@ BOOLEAN DishOutGasDamage( SOLDIERTYPE * pSoldier, EXPLOSIVETYPE * pExplosive, IN
|
||||
void SpreadEffect( INT32 sGridNo, UINT8 ubRadius, UINT16 usItem, UINT8 ubOwner, BOOLEAN fSubsequent, INT8 bLevel, INT32 iSmokeEffectNum , BOOL fFromRemoteClient = FALSE , BOOL fNewSmokeEffect = FALSE );
|
||||
void AddBombToQueue( UINT32 uiWorldBombIndex, UINT32 uiTimeStamp, BOOL fFromRemoteClient = FALSE );
|
||||
|
||||
extern void ToggleActionItemsByFrequency( INT8 bFrequency );
|
||||
extern void PerformItemAction( INT32 sGridNo, OBJECTTYPE * pObj );
|
||||
extern BOOLEAN gfExplosionQueueMayHaveChangedSight;
|
||||
extern void TogglePressureActionItemsInGridNo( INT32 sGridNo );
|
||||
|
||||
extern BOOLEAN DoesSAMExistHere( INT16 sSectorX, INT16 sSectorY, INT16 sSectorZ, INT32 sGridNo );
|
||||
|
||||
extern BOOLEAN HookerInRoom( UINT8 ubRoom );
|
||||
#endif
|
||||
@@ -144,7 +144,7 @@ BOOLEAN StartInteractiveObject( INT32 sGridNo, UINT16 usStructureID, SOLDIERTYPE
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN CalcInteractiveObjectAPs( INT32 sGridNo, STRUCTURE * pStructure, INT16 *psAPCost, INT16 *psBPCost )
|
||||
BOOLEAN CalcInteractiveObjectAPs( SOLDIERTYPE * pSoldier, INT32 sGridNo, STRUCTURE * pStructure, INT16 *psAPCost, INT16 *psBPCost ) // SANDRO - added argument
|
||||
{
|
||||
if (pStructure == NULL)
|
||||
{
|
||||
@@ -156,7 +156,8 @@ BOOLEAN CalcInteractiveObjectAPs( INT32 sGridNo, STRUCTURE * pStructure, INT16 *
|
||||
// If closed, we do not know what to do yet...
|
||||
//if ( pStructure->fFlags & STRUCTURE_OPEN )
|
||||
//{
|
||||
*psAPCost = APBPConstants[AP_OPEN_DOOR];
|
||||
// SANDRO - changed this
|
||||
*psAPCost = GetAPsToOpenDoor( pSoldier );
|
||||
*psBPCost = APBPConstants[AP_OPEN_DOOR];
|
||||
//}
|
||||
//else
|
||||
@@ -167,7 +168,8 @@ BOOLEAN CalcInteractiveObjectAPs( INT32 sGridNo, STRUCTURE * pStructure, INT16 *
|
||||
}
|
||||
else
|
||||
{
|
||||
*psAPCost = APBPConstants[AP_OPEN_DOOR];
|
||||
// SANDRO - changed this
|
||||
*psAPCost = GetAPsToOpenDoor( pSoldier );
|
||||
*psBPCost = APBPConstants[AP_OPEN_DOOR];
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ UINT32 GetInteractiveTileCursor( UINT32 uiOldCursor, BOOLEAN fConfirm );
|
||||
BOOLEAN InteractWithInteractiveObject( SOLDIERTYPE *pSoldier, STRUCTURE *pStructure, UINT8 ubDirection );
|
||||
BOOLEAN SoldierHandleInteractiveObject( SOLDIERTYPE *pSoldier );
|
||||
|
||||
BOOLEAN CalcInteractiveObjectAPs( INT32 sGridNo, STRUCTURE * pStructure, INT16 *psAPCost, INT16 *psBPCost );
|
||||
BOOLEAN CalcInteractiveObjectAPs( SOLDIERTYPE * pSoldier, INT32 sGridNo, STRUCTURE * pStructure, INT16 *psAPCost, INT16 *psBPCost ); // SANDRO - added argument
|
||||
|
||||
void HandleStructChangeFromGridNo( SOLDIERTYPE *pSoldier, INT32 sGridNo );
|
||||
|
||||
|
||||
@@ -185,6 +185,344 @@ UINT8 gPurpendicularDirection[ NUM_WORLD_DIRECTIONS ][ NUM_WORLD_DIRECTIONS ] =
|
||||
};
|
||||
|
||||
|
||||
//----------------------legion by Jazz-----------------
|
||||
|
||||
BOOLEAN FindWindowJumpDirection( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bStartingDir, INT8 *pbDirection )
|
||||
{
|
||||
INT32 cnt;
|
||||
INT32 sNewGridNo, sOtherSideOfFence;
|
||||
BOOLEAN fFound = FALSE;
|
||||
UINT8 bMinNumTurns = 100;
|
||||
INT8 bNumTurns;
|
||||
INT8 bMinDirection = 0;
|
||||
INT8 direction2 = -1;
|
||||
|
||||
if ( pSoldier->ubDirection == NORTH )
|
||||
direction2 = NORTH;
|
||||
else if ( pSoldier->ubDirection == EAST )
|
||||
direction2 = EAST;
|
||||
else if ( pSoldier->ubDirection == SOUTH )
|
||||
direction2 = SOUTH;
|
||||
else if ( pSoldier->ubDirection == WEST )
|
||||
direction2 = WEST;
|
||||
|
||||
// WANNE: No need to check on SOUTH and EAST tile, because it is the tile that has the fence we are standing on!
|
||||
if (direction2 == NORTH || direction2 == WEST)
|
||||
{
|
||||
// IF there is a fence in this gridno, return false!
|
||||
if ( IsJumpableWindowPresentAtGridNo( sGridNo, direction2 ) )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
}
|
||||
|
||||
// LOOP THROUGH ALL 8 DIRECTIONS
|
||||
for ( cnt = 0; cnt < 8; cnt+= 2 )
|
||||
{
|
||||
if (cnt != direction2)
|
||||
continue;
|
||||
|
||||
// get the fence tile
|
||||
if (cnt == NORTH || cnt == WEST)
|
||||
{
|
||||
sNewGridNo = NewGridNo( sGridNo, (UINT16)DirectionInc( (UINT8)cnt ) );
|
||||
sOtherSideOfFence = sNewGridNo;
|
||||
}
|
||||
// current tile we are standing is the fence tile
|
||||
else
|
||||
{
|
||||
sNewGridNo = sGridNo;
|
||||
sOtherSideOfFence = NewGridNo( sNewGridNo, (UINT16)DirectionInc( (UINT8)cnt ) );
|
||||
}
|
||||
|
||||
//if ( NewOKDestination( pSoldier, sOtherSideOfFence, TRUE, 0 ) && validDestTile)
|
||||
if ( NewOKDestination( pSoldier, sOtherSideOfFence, TRUE, 0 ) /*&& validDestTile*/)
|
||||
{
|
||||
// ATE: Check if there is somebody waiting here.....
|
||||
|
||||
// Check if we have a fence here
|
||||
if ( IsJumpableWindowPresentAtGridNo( sNewGridNo , direction2) )
|
||||
{
|
||||
fFound = TRUE;
|
||||
|
||||
// FInd how many turns we should go to get here
|
||||
bNumTurns = FindNumTurnsBetweenDirs( (INT8)cnt, bStartingDir );
|
||||
|
||||
if ( bNumTurns < bMinNumTurns )
|
||||
{
|
||||
bMinNumTurns = bNumTurns;
|
||||
bMinDirection = (INT8)cnt;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( fFound )
|
||||
{
|
||||
*pbDirection = bMinDirection;
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
BOOLEAN FindFenceDirection( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bStartingDir, INT8 *pbDirection )
|
||||
{
|
||||
INT32 cnt;
|
||||
INT32 sNewGridNo, sOtherSideOfFence;
|
||||
BOOLEAN fFound = FALSE;
|
||||
UINT8 bMinNumTurns = 100;
|
||||
INT8 bNumTurns;
|
||||
INT8 bMinDirection = 0;
|
||||
|
||||
// IF there is a fence in this gridno, return false!
|
||||
if ( IsLegionFencePresentAtGridno( sGridNo ) )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
// LOOP THROUGH ALL 8 DIRECTIONS
|
||||
for ( cnt = 0; cnt < 8; cnt+= 2 )
|
||||
{
|
||||
// go out *2* tiles
|
||||
sNewGridNo = NewGridNo( sGridNo, (UINT16)DirectionInc( (UINT8)cnt ) );
|
||||
sOtherSideOfFence = NewGridNo( sNewGridNo, (UINT16)DirectionInc( (UINT8)cnt ) );
|
||||
|
||||
if ( NewOKDestination( pSoldier, sOtherSideOfFence, TRUE, 0 ) )
|
||||
{
|
||||
// ATE: Check if there is somebody waiting here.....
|
||||
|
||||
|
||||
// Check if we have a fence here
|
||||
if ( IsLegionFencePresentAtGridno( sNewGridNo ) )
|
||||
{
|
||||
fFound = TRUE;
|
||||
|
||||
// FInd how many turns we should go to get here
|
||||
bNumTurns = FindNumTurnsBetweenDirs( (INT8)cnt, bStartingDir );
|
||||
|
||||
if ( bNumTurns < bMinNumTurns )
|
||||
{
|
||||
bMinNumTurns = bNumTurns;
|
||||
bMinDirection = (INT8)cnt;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ( fFound )
|
||||
{
|
||||
*pbDirection = bMinDirection;
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
BOOLEAN FindHeigherLevelOkno( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bStartingDir, INT8 *pbDirection )
|
||||
{
|
||||
|
||||
INT32 cnt;
|
||||
INT32 sNewGridNo;
|
||||
BOOLEAN fFound = FALSE;
|
||||
UINT8 bMinNumTurns = 100;
|
||||
INT8 bNumTurns;
|
||||
INT8 bMinDirection = 0;
|
||||
|
||||
// LOOP THROUGH ALL 8 DIRECTIONS
|
||||
for ( cnt = 0; cnt < 8; cnt+= 2 )
|
||||
{
|
||||
sNewGridNo = NewGridNo( sGridNo, (UINT16)DirectionInc( (UINT8)cnt ) );
|
||||
|
||||
// Make sure there is NOT a roof here...
|
||||
// Check OK destination
|
||||
if ( NewOKDestination( pSoldier, sNewGridNo, TRUE, 0 ) )
|
||||
{
|
||||
if ( FindStructure( sNewGridNo, STRUCTURE_WALLNWINDOW ) == NULL )
|
||||
{
|
||||
{
|
||||
fFound = TRUE;
|
||||
|
||||
// FInd how many turns we should go to get here
|
||||
bNumTurns = FindNumTurnsBetweenDirs( (INT8)cnt, bStartingDir );
|
||||
|
||||
if ( bNumTurns < bMinNumTurns )
|
||||
{
|
||||
bMinNumTurns = bNumTurns;
|
||||
bMinDirection = (INT8)cnt;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( fFound )
|
||||
{
|
||||
*pbDirection = bMinDirection;
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
return( FALSE );
|
||||
|
||||
/* INT32 cnt;
|
||||
INT32 sNewGridNo;
|
||||
BOOLEAN fFound = FALSE;
|
||||
UINT8 bMinNumTurns = 100;
|
||||
INT8 bNumTurns;
|
||||
INT8 bMinDirection = 0;
|
||||
|
||||
//STRUCTURE * pStructure;
|
||||
|
||||
// IF there is a roof over our heads, this is an ivalid....
|
||||
// return ( FALSE );l
|
||||
if ( FindStructure( sGridNo, STRUCTURE_WALLNWINDOW ) != NULL )
|
||||
{
|
||||
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
for ( cnt = 0; cnt < 8; cnt+= 2 )
|
||||
{
|
||||
sNewGridNo = NewGridNo( sGridNo, (UINT16)DirectionInc( (UINT8)cnt ) );
|
||||
|
||||
if ( NewOKDestination( pSoldier, sNewGridNo, TRUE, 0 ) )
|
||||
{
|
||||
// Check if this tile has a higher level
|
||||
if ( IsOknoLevel( sNewGridNo ) )
|
||||
{
|
||||
fFound = TRUE;
|
||||
|
||||
// FInd how many turns we should go to get here
|
||||
bNumTurns = FindNumTurnsBetweenDirs( (INT8)cnt, bStartingDir );
|
||||
|
||||
if ( bNumTurns < bMinNumTurns )
|
||||
{
|
||||
bMinNumTurns = bNumTurns;
|
||||
bMinDirection = (INT8)cnt;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ( fFound )
|
||||
{
|
||||
*pbDirection = bMinDirection;
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
return( FALSE );
|
||||
*/
|
||||
}
|
||||
|
||||
BOOLEAN FindHeigherLevelFence( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bStartingDir, INT8 *pbDirection )
|
||||
{
|
||||
INT32 cnt;
|
||||
INT32 sNewGridNo;
|
||||
BOOLEAN fFound = FALSE;
|
||||
UINT8 bMinNumTurns = 100;
|
||||
INT8 bNumTurns;
|
||||
INT8 bMinDirection = 0;
|
||||
|
||||
//STRUCTURE * pStructure;
|
||||
|
||||
// IF there is a roof over our heads, this is an ivalid....
|
||||
// return ( FALSE );l
|
||||
if ( FindStructure( sGridNo, STRUCTURE_FENCE ) != NULL )
|
||||
{
|
||||
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
for ( cnt = 0; cnt < 8; cnt+= 2 )
|
||||
{
|
||||
sNewGridNo = NewGridNo( sGridNo, (UINT16)DirectionInc( (UINT8)cnt ) );
|
||||
|
||||
if ( NewOKDestination( pSoldier, sNewGridNo, TRUE, 0 ) )
|
||||
{
|
||||
// Check if this tile has a higher level
|
||||
if ( IsLegionLevel( sNewGridNo ) )
|
||||
{
|
||||
fFound = TRUE;
|
||||
|
||||
// FInd how many turns we should go to get here
|
||||
bNumTurns = FindNumTurnsBetweenDirs( (INT8)cnt, bStartingDir );
|
||||
|
||||
if ( bNumTurns < bMinNumTurns )
|
||||
{
|
||||
bMinNumTurns = bNumTurns;
|
||||
bMinDirection = (INT8)cnt;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ( fFound )
|
||||
{
|
||||
*pbDirection = bMinDirection;
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
BOOLEAN FindLowerLevelFence( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bStartingDir, INT8 *pbDirection )
|
||||
{
|
||||
INT32 cnt;
|
||||
INT32 sNewGridNo;
|
||||
BOOLEAN fFound = FALSE;
|
||||
UINT8 bMinNumTurns = 100;
|
||||
INT8 bNumTurns;
|
||||
INT8 bMinDirection = 0;
|
||||
|
||||
// LOOP THROUGH ALL 8 DIRECTIONS
|
||||
for ( cnt = 0; cnt < 8; cnt+= 2 )
|
||||
{
|
||||
sNewGridNo = NewGridNo( sGridNo, (UINT16)DirectionInc( (UINT8)cnt ) );
|
||||
|
||||
// Make sure there is NOT a roof here...
|
||||
// Check OK destination
|
||||
if ( NewOKDestination( pSoldier, sNewGridNo, TRUE, 0 ) )
|
||||
{
|
||||
if ( FindStructure( sNewGridNo, STRUCTURE_FENCE ) == NULL )
|
||||
{
|
||||
{
|
||||
fFound = TRUE;
|
||||
|
||||
// FInd how many turns we should go to get here
|
||||
bNumTurns = FindNumTurnsBetweenDirs( (INT8)cnt, bStartingDir );
|
||||
|
||||
if ( bNumTurns < bMinNumTurns )
|
||||
{
|
||||
bMinNumTurns = bNumTurns;
|
||||
bMinDirection = (INT8)cnt;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( fFound )
|
||||
{
|
||||
*pbDirection = bMinDirection;
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
return( FALSE );
|
||||
}
|
||||
//---------------------------------------------------------------------------------
|
||||
|
||||
|
||||
GridNode::MapXY_t GridNode::MapXY;
|
||||
static GridNode::MapXY_t *pMapXY = GridNode::initGridNodes(); // A hack to initialize the MapXY grid
|
||||
|
||||
@@ -632,7 +970,7 @@ INT32 GetRangeFromGridNoDiff( INT32 sGridNo1, INT32 sGridNo2 )
|
||||
// Convert our grid-not into an XY
|
||||
ConvertGridNoToXY( sGridNo2, &sXPos2, &sYPos2 );
|
||||
|
||||
uiDist = sqrt((double) ( sXPos2 - sXPos )*( sXPos2 - sXPos ) + ( sYPos2 - sYPos ) * ( sYPos2 - sYPos ) );
|
||||
uiDist = (INT32)(sqrt((double) ( sXPos2 - sXPos )*( sXPos2 - sXPos ) + ( sYPos2 - sYPos ) * ( sYPos2 - sYPos ) ));
|
||||
|
||||
return( uiDist );
|
||||
}
|
||||
|
||||
@@ -140,4 +140,12 @@ public:
|
||||
static MapXY_t *initGridNodes() { for (INT32 i=0; i<WORLD_MAX; i++){ConvertGridNoToXY(i, &MapXY[i].x, &MapXY[i].y); } return &MapXY; };
|
||||
};
|
||||
|
||||
//Legion by JAzz
|
||||
BOOLEAN FindHeigherLevelOkno( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bStartingDir, INT8 *pbDirection );
|
||||
BOOLEAN FindHeigherLevelFence( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bStartingDir, INT8 *pbDirection );
|
||||
BOOLEAN FindFenceDirection( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bStartingDir, INT8 *pbDirection );
|
||||
BOOLEAN FindLowerLevelFence( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bStartingDir, INT8 *pbDirection );
|
||||
BOOLEAN FindWindowJumpDirection( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bStartingDir, INT8 *pbDirection );
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1154,7 +1154,7 @@ void AllocateVideoOverlayArea( UINT32 uiCount )
|
||||
// Allocate
|
||||
if( ( gVideoOverlays[ uiCount ].pSaveArea = (INT16 *) MemAlloc( uiBufSize ) ) == NULL )
|
||||
{
|
||||
THROWEXCEPTION(L"Memory allocation failed");
|
||||
SGP_THROW(L"Memory allocation failed");
|
||||
}
|
||||
BYTE* data = (BYTE*)gVideoOverlays[ uiCount ].pSaveArea;
|
||||
SurfaceData::SetApplicationData(data);
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "environment.h"
|
||||
#include "dialogue control.h"
|
||||
#include "Random.h"
|
||||
#include "gamesettings.h"
|
||||
#endif
|
||||
|
||||
// Room Information
|
||||
@@ -289,7 +290,11 @@ void RemoveRoomRoof( INT32 sGridNo, UINT8 bRoomNum, SOLDIERTYPE *pSoldier )
|
||||
|
||||
if ( pSoldier != NULL )
|
||||
{
|
||||
TacticalCharacterDialogue( pSoldier, (UINT16)( QUOTE_SPOTTED_SOMETHING_ONE + Random( 2 ) ) );
|
||||
//ddd
|
||||
//TacticalCharacterDialogue( pSoldier, (UINT16)( QUOTE_SPOTTED_SOMETHING_ONE + Random( 2 ) ) );
|
||||
if(Chance(gGameExternalOptions.iChanceSayAnnoyingPhrase) )
|
||||
TacticalCharacterDialogue( pSoldier, (UINT16)( QUOTE_SPOTTED_SOMETHING_ONE + Random( 2 ) ) );
|
||||
//ddd
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "Smell.h"
|
||||
#endif
|
||||
|
||||
#include "VFS/vfs.h"
|
||||
#include <vfs/Core/vfs.h>
|
||||
//SB: make size of gpRevealedMap dependable from variable tactical map dimensions
|
||||
#define NUM_REVEALED_BYTES (WORLD_MAX/8)
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "Fileman.h"
|
||||
#endif
|
||||
|
||||
#include "VFS/vfs.h"
|
||||
#include <vfs/Core/vfs.h>
|
||||
|
||||
#define SHADE_TABLE_DIR "ShadeTables"
|
||||
|
||||
|
||||
@@ -386,13 +386,10 @@ void InitTacticalPlacementGUI()
|
||||
gMercPlacement[ giPlacements ].pSoldier = MercPtrs[ i ];
|
||||
gMercPlacement[ giPlacements ].ubStrategicInsertionCode = MercPtrs[ i ]->ubStrategicInsertionCode;
|
||||
gMercPlacement[ giPlacements ].fPlaced = FALSE;
|
||||
#ifdef JA2BETAVERSION
|
||||
CheckForValidMapEdge( &MercPtrs[ i ]->ubStrategicInsertionCode );
|
||||
#else
|
||||
// WANNE: We need to have valid map edges in multiplayer!
|
||||
if (is_networked)
|
||||
CheckForValidMapEdge( &MercPtrs[ i ]->ubStrategicInsertionCode );
|
||||
#endif
|
||||
|
||||
// WANNE: We always want to have edgepoints
|
||||
CheckForValidMapEdge( &MercPtrs[ i ]->ubStrategicInsertionCode );
|
||||
|
||||
switch( MercPtrs[ i ]->ubStrategicInsertionCode )
|
||||
{
|
||||
case INSERTION_CODE_NORTH:
|
||||
@@ -743,7 +740,6 @@ void RenderTacticalPlacementGUI()
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO.RW: Check for insertion
|
||||
if (is_networked)
|
||||
{
|
||||
gMercPlacement[ gbCursorMercID ].ubStrategicInsertionCode = GetValidInsertionDirectionForMP(gMercPlacement[ gbCursorMercID ].ubStrategicInsertionCode);
|
||||
@@ -991,8 +987,8 @@ void TacticalPlacementHandle()
|
||||
case ENTER:
|
||||
if( ButtonList[ iTPButtons[ DONE_BUTTON ] ]->uiFlags & BUTTON_ENABLED )
|
||||
{
|
||||
/*if(!is_client)KillTacticalPlacementGUI();*/
|
||||
//if(is_client)send_donegui(0); only by mouse //hayden
|
||||
if(!is_client)KillTacticalPlacementGUI();
|
||||
if(is_client)send_donegui(0);
|
||||
}
|
||||
break;
|
||||
case 'c':
|
||||
@@ -1010,25 +1006,6 @@ void TacticalPlacementHandle()
|
||||
HandleShortCutExitState();
|
||||
}
|
||||
break;
|
||||
case 'l'://hayden
|
||||
if( InputEvent.usKeyState & ALT_DOWN )
|
||||
{
|
||||
/*
|
||||
if (is_networked)
|
||||
{
|
||||
KillTacticalPlacementGUI();
|
||||
DoQuickLoad();
|
||||
}
|
||||
*/
|
||||
}
|
||||
break;
|
||||
case '7':
|
||||
if (is_networked)
|
||||
{
|
||||
if(is_server)
|
||||
manual_overide();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,667 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8,00"
|
||||
Name="TileEngine"
|
||||
ProjectGUID="{FC1938E8-9253-49A8-AA99-4639BBB46C1B}"
|
||||
RootNamespace="TileEngine"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="..\lib\VS2005\$(ConfigurationName)"
|
||||
IntermediateDirectory="..\build\VS2005\$(ProjectName)_$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="..\ja2.vsprops;..\ja2_Debug.vsprops"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE""
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
DisableSpecificWarnings="4100"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="..\lib\VS2005\$(ConfigurationName)"
|
||||
IntermediateDirectory="..\build\VS2005\$(ProjectName)_$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="..\ja2.vsprops"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE""
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
|
||||
RuntimeLibrary="0"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="MapEditor|Win32"
|
||||
OutputDirectory="..\lib\VS2005\$(ConfigurationName)"
|
||||
IntermediateDirectory="..\build\VS2005\$(ProjectName)_$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="..\ja2.vsprops;..\ja2_Editor.vsprops"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE""
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
|
||||
RuntimeLibrary="0"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="MapEditorD|Win32"
|
||||
OutputDirectory="..\lib\VS2005\$(ConfigurationName)"
|
||||
IntermediateDirectory="..\build\VS2005\$(ProjectName)_$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="..\ja2.vsprops;..\ja2_Editor.vsprops"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE""
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
DisableSpecificWarnings="4100"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release_WithDebugInfo|Win32"
|
||||
OutputDirectory="..\lib\VS2005\$(ConfigurationName)"
|
||||
IntermediateDirectory="..\build\VS2005\$(ProjectName)_$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="..\ja2.vsprops"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE""
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
|
||||
RuntimeLibrary="0"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\Ambient Control.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Ambient Types.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Buildings.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\environment.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Exit Grids.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Explosion Control.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Fog Of War.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Interactive Tiles.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Isometric Utils.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\LightEffects.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\lighting.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Map Edgepoints.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\overhead map.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\phys math.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\physics.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pits.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Radar Screen.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Render Dirty.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Render Fun.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Render Z.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\renderworld.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\SaveLoadMap.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Shade Table Util.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Simple Render Utils.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Smell.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\SmokeEffects.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Structure Internals.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\structure.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sysutil.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Tactical Placement GUI.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Tile Animation.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Tile Cache.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Tile Surface.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TileDat.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\tiledef.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TileEngine All.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\World Tileset Enums.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\WorldDat.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\worlddef.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\worldman.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\XML_StructureData.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\XML_TileSet.hpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\Ambient Control.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Buildings.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\environment.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Exit Grids.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Explosion Control.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Fog Of War.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Interactive Tiles.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Isometric Utils.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\LightEffects.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\lighting.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Map Edgepoints.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\overhead map.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\phys math.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\physics.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pits.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Radar Screen.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Render Dirty.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Render Fun.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Render Z.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\renderworld.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\SaveLoadMap.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Shade Table Util.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Simple Render Utils.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Smell.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\SmokeEffects.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\structure.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sysutil.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Tactical Placement GUI.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Tile Animation.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Tile Cache.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Tile Surface.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TileDat.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\tiledef.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\WorldDat.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\worlddef.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\worldman.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\XML_ExplosionData.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
@@ -21,7 +21,7 @@
|
||||
OutputDirectory="..\lib\VS2008\$(ConfigurationName)"
|
||||
IntermediateDirectory="..\build\VS2008\$(ProjectName)_$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="..\ja2_VS2008.vsprops;..\ja2_VS2008Debug.vsprops"
|
||||
InheritedPropertySheets="..\ja2.vsprops;..\ja2_Debug.vsprops"
|
||||
CharacterSet="0"
|
||||
>
|
||||
<Tool
|
||||
@@ -83,7 +83,7 @@
|
||||
OutputDirectory="..\lib\VS2008\$(ConfigurationName)"
|
||||
IntermediateDirectory="..\build\VS2008\$(ProjectName)_$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="..\ja2_VS2008.vsprops"
|
||||
InheritedPropertySheets="..\ja2.vsprops"
|
||||
CharacterSet="0"
|
||||
WholeProgramOptimization="0"
|
||||
>
|
||||
@@ -147,7 +147,7 @@
|
||||
OutputDirectory="..\lib\VS2008\$(ConfigurationName)"
|
||||
IntermediateDirectory="..\build\VS2008\$(ProjectName)_$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="..\ja2_VS2008.vsprops;..\ja2_VS2008Editor.vsprops"
|
||||
InheritedPropertySheets="..\ja2.vsprops;..\ja2_Editor.vsprops"
|
||||
CharacterSet="0"
|
||||
WholeProgramOptimization="0"
|
||||
>
|
||||
@@ -211,7 +211,7 @@
|
||||
OutputDirectory="..\lib\VS2008\$(ConfigurationName)"
|
||||
IntermediateDirectory="..\build\VS2008\$(ProjectName)_$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="..\ja2_VS2008.vsprops;..\ja2_VS2008Editor.vsprops"
|
||||
InheritedPropertySheets="..\ja2.vsprops;..\ja2_Editor.vsprops"
|
||||
CharacterSet="0"
|
||||
>
|
||||
<Tool
|
||||
@@ -273,7 +273,7 @@
|
||||
OutputDirectory="..\lib\VS2008\$(ConfigurationName)"
|
||||
IntermediateDirectory="..\build\VS2008\$(ProjectName)_$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="..\ja2_VS2008.vsprops"
|
||||
InheritedPropertySheets="..\ja2.vsprops"
|
||||
CharacterSet="0"
|
||||
WholeProgramOptimization="0"
|
||||
>
|
||||
@@ -499,6 +499,14 @@
|
||||
RelativePath="worldman.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\XML_StructureData.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\XML_TileSet.hpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
|
||||
@@ -0,0 +1,292 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="MapEditorD|Win32">
|
||||
<Configuration>MapEditorD</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="MapEditor|Win32">
|
||||
<Configuration>MapEditor</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Relese_WithDebugInfo|Win32">
|
||||
<Configuration>Relese_WithDebugInfo</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Ambient Control.h" />
|
||||
<ClInclude Include="Ambient Types.h" />
|
||||
<ClInclude Include="Buildings.h" />
|
||||
<ClInclude Include="environment.h" />
|
||||
<ClInclude Include="Exit Grids.h" />
|
||||
<ClInclude Include="Explosion Control.h" />
|
||||
<ClInclude Include="Fog Of War.h" />
|
||||
<ClInclude Include="Interactive Tiles.h" />
|
||||
<ClInclude Include="Isometric Utils.h" />
|
||||
<ClInclude Include="LightEffects.h" />
|
||||
<ClInclude Include="lighting.h" />
|
||||
<ClInclude Include="Map Edgepoints.h" />
|
||||
<ClInclude Include="overhead map.h" />
|
||||
<ClInclude Include="phys math.h" />
|
||||
<ClInclude Include="physics.h" />
|
||||
<ClInclude Include="pits.h" />
|
||||
<ClInclude Include="Radar Screen.h" />
|
||||
<ClInclude Include="Render Dirty.h" />
|
||||
<ClInclude Include="Render Fun.h" />
|
||||
<ClInclude Include="Render Z.h" />
|
||||
<ClInclude Include="renderworld.h" />
|
||||
<ClInclude Include="SaveLoadMap.h" />
|
||||
<ClInclude Include="Shade Table Util.h" />
|
||||
<ClInclude Include="Simple Render Utils.h" />
|
||||
<ClInclude Include="Smell.h" />
|
||||
<ClInclude Include="SmokeEffects.h" />
|
||||
<ClInclude Include="Structure Internals.h" />
|
||||
<ClInclude Include="structure.h" />
|
||||
<ClInclude Include="sysutil.h" />
|
||||
<ClInclude Include="Tactical Placement GUI.h" />
|
||||
<ClInclude Include="Tile Animation.h" />
|
||||
<ClInclude Include="Tile Cache.h" />
|
||||
<ClInclude Include="Tile Surface.h" />
|
||||
<ClInclude Include="TileDat.h" />
|
||||
<ClInclude Include="tiledef.h" />
|
||||
<ClInclude Include="TileEngine All.h" />
|
||||
<ClInclude Include="World Tileset Enums.h" />
|
||||
<ClInclude Include="WorldDat.h" />
|
||||
<ClInclude Include="worlddef.h" />
|
||||
<ClInclude Include="worldman.h" />
|
||||
<ClInclude Include="XML_StructureData.hpp" />
|
||||
<ClInclude Include="XML_TileSet.hpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Ambient Control.cpp" />
|
||||
<ClCompile Include="Buildings.cpp" />
|
||||
<ClCompile Include="environment.cpp" />
|
||||
<ClCompile Include="Exit Grids.cpp" />
|
||||
<ClCompile Include="Explosion Control.cpp" />
|
||||
<ClCompile Include="Fog Of War.cpp" />
|
||||
<ClCompile Include="Interactive Tiles.cpp" />
|
||||
<ClCompile Include="Isometric Utils.cpp" />
|
||||
<ClCompile Include="LightEffects.cpp" />
|
||||
<ClCompile Include="lighting.cpp" />
|
||||
<ClCompile Include="Map Edgepoints.cpp" />
|
||||
<ClCompile Include="overhead map.cpp" />
|
||||
<ClCompile Include="phys math.cpp" />
|
||||
<ClCompile Include="physics.cpp" />
|
||||
<ClCompile Include="pits.cpp" />
|
||||
<ClCompile Include="Radar Screen.cpp" />
|
||||
<ClCompile Include="Render Dirty.cpp" />
|
||||
<ClCompile Include="Render Fun.cpp" />
|
||||
<ClCompile Include="Render Z.cpp" />
|
||||
<ClCompile Include="renderworld.cpp" />
|
||||
<ClCompile Include="SaveLoadMap.cpp" />
|
||||
<ClCompile Include="Shade Table Util.cpp" />
|
||||
<ClCompile Include="Simple Render Utils.cpp" />
|
||||
<ClCompile Include="Smell.cpp" />
|
||||
<ClCompile Include="SmokeEffects.cpp" />
|
||||
<ClCompile Include="structure.cpp" />
|
||||
<ClCompile Include="sysutil.cpp" />
|
||||
<ClCompile Include="Tactical Placement GUI.cpp" />
|
||||
<ClCompile Include="Tile Animation.cpp" />
|
||||
<ClCompile Include="Tile Cache.cpp" />
|
||||
<ClCompile Include="Tile Surface.cpp" />
|
||||
<ClCompile Include="TileDat.cpp" />
|
||||
<ClCompile Include="tiledef.cpp" />
|
||||
<ClCompile Include="WorldDat.cpp" />
|
||||
<ClCompile Include="worlddef.cpp" />
|
||||
<ClCompile Include="worldman.cpp" />
|
||||
<ClCompile Include="XML_ExplosionData.cpp" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{D027A0E1-C661-4B8C-8159-4E0BF3D163AA}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>TileEngine</RootNamespace>
|
||||
<ProjectName>TileEngine</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditorD|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditor|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Relese_WithDebugInfo|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\ja2.props" />
|
||||
<Import Project="..\ja2_Debug.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='MapEditorD|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\ja2.props" />
|
||||
<Import Project="..\ja2_Debug.props" />
|
||||
<Import Project="..\ja2_Editor.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\ja2.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='MapEditor|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\ja2.props" />
|
||||
<Import Project="..\ja2_Editor.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Relese_WithDebugInfo|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\ja2.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditorD|Win32'">
|
||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditor|Win32'">
|
||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Relese_WithDebugInfo|Win32'">
|
||||
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
|
||||
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeaderFile>
|
||||
</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>
|
||||
</PrecompiledHeaderOutputFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MapEditorD|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeaderFile>
|
||||
</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>
|
||||
</PrecompiledHeaderOutputFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeaderFile>
|
||||
</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>
|
||||
</PrecompiledHeaderOutputFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MapEditor|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeaderFile>
|
||||
</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>
|
||||
</PrecompiledHeaderOutputFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Relese_WithDebugInfo|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeaderFile>
|
||||
</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>
|
||||
</PrecompiledHeaderOutputFile>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,252 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{74f02e9a-2a7e-4654-8228-90ca0ba88a66}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{878cd328-bcac-4171-a25a-60953e8550e3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Ambient Control.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Ambient Types.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Buildings.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="environment.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Exit Grids.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Explosion Control.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Fog Of War.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Interactive Tiles.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Isometric Utils.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="LightEffects.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="lighting.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Map Edgepoints.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="overhead map.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="phys math.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="physics.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="pits.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Radar Screen.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Render Dirty.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Render Fun.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Render Z.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="renderworld.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SaveLoadMap.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Shade Table Util.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Simple Render Utils.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Smell.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SmokeEffects.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Structure Internals.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="structure.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="sysutil.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Tactical Placement GUI.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Tile Animation.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Tile Cache.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Tile Surface.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TileDat.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="tiledef.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TileEngine All.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="World Tileset Enums.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="WorldDat.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="worlddef.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="worldman.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="XML_StructureData.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="XML_TileSet.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Ambient Control.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Buildings.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="environment.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Exit Grids.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Explosion Control.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Fog Of War.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Interactive Tiles.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Isometric Utils.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="LightEffects.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="lighting.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Map Edgepoints.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="overhead map.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="phys math.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="physics.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="pits.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Radar Screen.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Render Dirty.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Render Fun.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Render Z.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="renderworld.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SaveLoadMap.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Shade Table Util.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Simple Render Utils.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Smell.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SmokeEffects.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="structure.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="sysutil.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Tactical Placement GUI.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Tile Animation.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Tile Cache.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Tile Surface.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TileDat.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="tiledef.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="WorldDat.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="worlddef.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="worldman.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="XML_ExplosionData.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
+139
-65
@@ -12,10 +12,16 @@
|
||||
#include "sys globals.h"
|
||||
#include "tile surface.h"
|
||||
#include "fileMan.h"
|
||||
#include "Debug.h"
|
||||
#endif
|
||||
|
||||
#include "VFS/vfs.h"
|
||||
#include <vfs/Core/vfs.h>
|
||||
#include <vfs/Core/vfs_file_raii.h>
|
||||
#include "XML_TileSet.hpp"
|
||||
#include "XMLWriter.h"
|
||||
|
||||
void ExportTilesets(vfs::Path const& filename);
|
||||
|
||||
// THIS FILE CONTAINS DEFINITIONS FOR TILESET FILES
|
||||
|
||||
void SetTilesetThreeTerrainValues();
|
||||
@@ -28,76 +34,156 @@ UINT8 gubNumSets = MAX_TILESETS;
|
||||
|
||||
TILESET gTilesets[ MAX_TILESETS ];
|
||||
|
||||
|
||||
extern bool g_bUseXML_Tilesets;
|
||||
void InitEngineTilesets( )
|
||||
{
|
||||
UINT32 cnt, cnt2, uiNumFiles;
|
||||
// FILE *hfile;
|
||||
HWFILE hfile;
|
||||
CHAR8 zName[32];
|
||||
UINT32 uiNumBytesRead;
|
||||
XMLWriter xmlw;
|
||||
|
||||
//OPEN FILE
|
||||
// hfile = fopen( "BINARYDATA\\JA2SET.DAT", "rb" );
|
||||
hfile = FileOpen( "BINARYDATA\\JA2SET.DAT", FILE_ACCESS_READ, FALSE );
|
||||
if ( !hfile )
|
||||
if(g_bUseXML_Tilesets)
|
||||
{
|
||||
SET_ERROR( "Cannot open tileset data file" );
|
||||
return;
|
||||
const vfs::Path tileset_filename(L"Ja2Set.dat.xml");
|
||||
if(!getVFS()->fileExists(tileset_filename))
|
||||
{
|
||||
SGP_TRYCATCH_RETHROW( ExportTilesets(tileset_filename), L"Could not export tileset XML file");
|
||||
}
|
||||
vfs::tReadableFile* file = getVFS()->getReadFile(tileset_filename);
|
||||
SGP_THROW_IFFALSE(file,
|
||||
_BS(L"File '") << tileset_filename << L"' does not exist and could not be created" << _BS::wget);
|
||||
|
||||
CTilesetReader tileset_reader(gTilesets);
|
||||
xml_auto::TGenericXMLParser<CTilesetReader> pars(&tileset_reader,NULL);
|
||||
|
||||
SGP_TRYCATCH_RETHROW( pars.parseFile(file),
|
||||
_BS(L"Parser Error in file : ") << file->getPath() << _BS::wget );
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT32 cnt, cnt2, uiNumFiles;
|
||||
//FILE *hfile;
|
||||
HWFILE hfile;
|
||||
CHAR8 zName[32];
|
||||
UINT32 uiNumBytesRead;
|
||||
|
||||
//OPEN FILE
|
||||
hfile = FileOpen( "BINARYDATA\\JA2SET.DAT", FILE_ACCESS_READ, FALSE );
|
||||
if ( !hfile )
|
||||
{
|
||||
SET_ERROR( "Cannot open tileset data file" );
|
||||
return;
|
||||
}
|
||||
|
||||
// READ # TILESETS and compare
|
||||
FileRead( hfile, &gubNumSets, sizeof( gubNumSets ), &uiNumBytesRead );
|
||||
// CHECK
|
||||
if ( gubNumSets > MAX_TILESETS )
|
||||
{
|
||||
// Report error
|
||||
SET_ERROR( "Too many tilesets in the data file" );
|
||||
return;
|
||||
}
|
||||
|
||||
// READ #files
|
||||
FileRead( hfile, &uiNumFiles, sizeof( uiNumFiles ), &uiNumBytesRead );
|
||||
|
||||
// COMPARE
|
||||
if ( uiNumFiles != NUMBEROFTILETYPES )
|
||||
{
|
||||
// Report error
|
||||
SET_ERROR( "Number of tilesets slots in code does not match data file" );
|
||||
return;
|
||||
}
|
||||
|
||||
// Loop through each tileset, load name then files
|
||||
for ( cnt = 0; cnt < gubNumSets; cnt++ )
|
||||
{
|
||||
//Read name
|
||||
FileRead( hfile, &zName, sizeof( zName ), &uiNumBytesRead );
|
||||
|
||||
// Read ambience value
|
||||
FileRead( hfile, &(gTilesets[ cnt ].ubAmbientID), sizeof( UINT8 ), &uiNumBytesRead );
|
||||
|
||||
// Set into tileset
|
||||
swprintf( gTilesets[ cnt ].zName, L"%S", zName );
|
||||
|
||||
// Loop for files
|
||||
for ( cnt2 = 0; cnt2 < uiNumFiles; cnt2++ )
|
||||
{
|
||||
// Read file name
|
||||
FileRead( hfile, &zName, sizeof( zName ), &uiNumBytesRead );
|
||||
|
||||
// Set into database
|
||||
strcpy( gTilesets[ cnt ].TileSurfaceFilenames[ cnt2 ], zName );
|
||||
}
|
||||
}
|
||||
|
||||
FileClose( hfile );
|
||||
}
|
||||
|
||||
// SET CALLBACK FUNTIONS!!!!!!!!!!!!!
|
||||
gTilesets[ TLS_CAVES_1 ].MovementCostFnc = (TILESET_CALLBACK)SetTilesetTwoTerrainValues;
|
||||
gTilesets[ TLS_AIRSTRIP ].MovementCostFnc = (TILESET_CALLBACK)SetTilesetThreeTerrainValues;
|
||||
gTilesets[ TLS_DEAD_AIRSTRIP ].MovementCostFnc = (TILESET_CALLBACK)SetTilesetThreeTerrainValues;
|
||||
gTilesets[ TLS_PALACE ].MovementCostFnc = (TILESET_CALLBACK)SetTilesetThreeTerrainValues;
|
||||
gTilesets[ TLS_BALIME ].MovementCostFnc = (TILESET_CALLBACK)SetTilesetThreeTerrainValues;
|
||||
gTilesets[ TLS_BALIME_MUSEUM ].MovementCostFnc = (TILESET_CALLBACK)SetTilesetThreeTerrainValues;
|
||||
gTilesets[ TLS_QUEENS_TROPICAL ].MovementCostFnc = (TILESET_CALLBACK)SetTilesetThreeTerrainValues;
|
||||
gTilesets[ TLS_MEDUNA_INNER_TOWN ].MovementCostFnc = (TILESET_CALLBACK)SetTilesetThreeTerrainValues;
|
||||
gTilesets[ TLS_QUEENS_SAM ].MovementCostFnc = (TILESET_CALLBACK)SetTilesetThreeTerrainValues;
|
||||
gTilesets[ TLS_QUEENS_AIRPORT ].MovementCostFnc = (TILESET_CALLBACK)SetTilesetThreeTerrainValues;
|
||||
|
||||
gTilesets[ TLS_TROPICAL_1 ].MovementCostFnc = (TILESET_CALLBACK)SetTilesetFourTerrainValues;
|
||||
gTilesets[ TLS_DESERT_SAM ].MovementCostFnc = (TILESET_CALLBACK)SetTilesetFourTerrainValues;
|
||||
}
|
||||
|
||||
#ifdef USE_VFS
|
||||
void ExportTilesets(vfs::Path const& filename)
|
||||
{
|
||||
UINT32 uiNumBytesRead = 0;
|
||||
CHAR8 zName[32];
|
||||
|
||||
//OPEN FILE
|
||||
HWFILE hfile = FileOpen( "BINARYDATA\\JA2SET.DAT", FILE_ACCESS_READ, FALSE );
|
||||
SGP_THROW_IFFALSE(hfile, L"Cannot open tileset data file" );
|
||||
|
||||
XMLWriter xmlw;
|
||||
xmlw.openNode("JA2SET");
|
||||
|
||||
// READ # TILESETS and compare
|
||||
// fread( &gubNumSets, sizeof( gubNumSets ), 1, hfile );
|
||||
FileRead( hfile, &gubNumSets, sizeof( gubNumSets ), &uiNumBytesRead );
|
||||
UINT8 numSets = 0;
|
||||
FileRead( hfile, &numSets, sizeof( numSets ), &uiNumBytesRead );
|
||||
|
||||
// CHECK
|
||||
if ( gubNumSets > MAX_TILESETS )
|
||||
{
|
||||
// Report error
|
||||
SET_ERROR( "Too many tilesets in the data file" );
|
||||
return;
|
||||
}
|
||||
xmlw.addAttributeToNextValue("numTilesets",(int)gubNumSets);
|
||||
SGP_THROW_IFFALSE( numSets <= MAX_TILESETS, L"Too many tilesets in the data file" );
|
||||
xmlw.addAttributeToNextValue("numTilesets",(int)numSets);
|
||||
|
||||
// READ #files
|
||||
// fread( &uiNumFiles, sizeof( uiNumFiles ), 1, hfile );
|
||||
FileRead( hfile, &uiNumFiles, sizeof( uiNumFiles ), &uiNumBytesRead );
|
||||
UINT32 numFiles;
|
||||
FileRead( hfile, &numFiles, sizeof( numFiles ), &uiNumBytesRead );
|
||||
|
||||
// COMPARE
|
||||
if ( uiNumFiles != NUMBEROFTILETYPES )
|
||||
{
|
||||
// Report error
|
||||
SET_ERROR( "Number of tilesets slots in code does not match data file" );
|
||||
return;
|
||||
}
|
||||
xmlw.addAttributeToNextValue("numFiles",(int)uiNumFiles);
|
||||
SGP_THROW_IFFALSE( numFiles == NUMBEROFTILETYPES,
|
||||
L"Number of tilesets slots in code does not match data file" );
|
||||
|
||||
xmlw.addAttributeToNextValue("numFiles",(int)numFiles);
|
||||
xmlw.openNode("tilesets");
|
||||
// Loop through each tileset, load name then files
|
||||
for ( cnt = 0; cnt < gubNumSets; cnt++ )
|
||||
for ( UINT8 cnt = 0; cnt < numSets; cnt++ )
|
||||
{
|
||||
xmlw.addAttributeToNextValue("index",(int)cnt);
|
||||
xmlw.openNode("Tileset");
|
||||
|
||||
//Read name
|
||||
// fread( &zName, sizeof( zName ), 1, hfile );
|
||||
FileRead( hfile, &zName, sizeof( zName ), &uiNumBytesRead );
|
||||
xmlw.addValue("Name",std::string(zName));
|
||||
|
||||
// Read ambience value
|
||||
// fread( &(gTilesets[ cnt ].ubAmbientID), sizeof( UINT8), 1, hfile );
|
||||
FileRead( hfile, &(gTilesets[ cnt ].ubAmbientID), sizeof( UINT8 ), &uiNumBytesRead );
|
||||
xmlw.addValue("AmbientID",(int)gTilesets[ cnt ].ubAmbientID);
|
||||
|
||||
// Set into tileset
|
||||
swprintf( gTilesets[ cnt ].zName, L"%S", zName );
|
||||
UINT8 ambientID = 0;
|
||||
FileRead( hfile, &ambientID, sizeof( UINT8 ), &uiNumBytesRead );
|
||||
xmlw.addValue("AmbientID",(int)ambientID);
|
||||
|
||||
xmlw.openNode("Files");
|
||||
// Loop for files
|
||||
for ( cnt2 = 0; cnt2 < uiNumFiles; cnt2++ )
|
||||
for ( UINT32 cnt2 = 0; cnt2 < numFiles; cnt2++ )
|
||||
{
|
||||
// Read file name
|
||||
// fread( &zName, sizeof( zName ), 1, hfile );
|
||||
FileRead( hfile, &zName, sizeof( zName ), &uiNumBytesRead );
|
||||
if(!std::string(zName).empty())
|
||||
{
|
||||
@@ -107,38 +193,26 @@ void InitEngineTilesets( )
|
||||
|
||||
// Set into database
|
||||
strcpy( gTilesets[ cnt ].TileSurfaceFilenames[ cnt2 ], zName );
|
||||
|
||||
//ddd{ äîáàâëÿåì â èíäåêñ 250 ôàéë îêîï.
|
||||
// if((cnt==0)&&(cnt2+1 == uiNumFiles))
|
||||
// { strcpy( gTilesets[ cnt ].TileSurfaceFilenames[ 151 ], "okop.sti" );
|
||||
// xmlw.AddAttributeToNextValue("index",(int)151); //for exp in xml
|
||||
// xmlw.AddValue("file",std::string("okop.sti"));
|
||||
// }
|
||||
//ddd}
|
||||
|
||||
}
|
||||
xmlw.closeNode(); // Files
|
||||
xmlw.closeNode(); // tileset
|
||||
}
|
||||
xmlw.closeNode();
|
||||
|
||||
// fclose( hfile );
|
||||
FileClose( hfile );
|
||||
|
||||
xmlw.closeNode();
|
||||
#ifdef USE_VFS
|
||||
xmlw.writeToFile("Ja2Set.dat.xml");
|
||||
#endif
|
||||
// SET CALLBACK FUNTIONS!!!!!!!!!!!!!
|
||||
gTilesets[ TLS_CAVES_1 ].MovementCostFnc = (TILESET_CALLBACK)SetTilesetTwoTerrainValues;
|
||||
gTilesets[ TLS_AIRSTRIP ].MovementCostFnc = (TILESET_CALLBACK)SetTilesetThreeTerrainValues;
|
||||
gTilesets[ TLS_DEAD_AIRSTRIP ].MovementCostFnc = (TILESET_CALLBACK)SetTilesetThreeTerrainValues;
|
||||
gTilesets[ TLS_PALACE ].MovementCostFnc = (TILESET_CALLBACK)SetTilesetThreeTerrainValues;
|
||||
gTilesets[ TLS_BALIME ].MovementCostFnc = (TILESET_CALLBACK)SetTilesetThreeTerrainValues;
|
||||
gTilesets[ TLS_BALIME_MUSEUM ].MovementCostFnc = (TILESET_CALLBACK)SetTilesetThreeTerrainValues;
|
||||
gTilesets[ TLS_QUEENS_TROPICAL ].MovementCostFnc = (TILESET_CALLBACK)SetTilesetThreeTerrainValues;
|
||||
gTilesets[ TLS_MEDUNA_INNER_TOWN ].MovementCostFnc = (TILESET_CALLBACK)SetTilesetThreeTerrainValues;
|
||||
gTilesets[ TLS_QUEENS_SAM ].MovementCostFnc = (TILESET_CALLBACK)SetTilesetThreeTerrainValues;
|
||||
gTilesets[ TLS_QUEENS_AIRPORT ].MovementCostFnc = (TILESET_CALLBACK)SetTilesetThreeTerrainValues;
|
||||
|
||||
gTilesets[ TLS_TROPICAL_1 ].MovementCostFnc = (TILESET_CALLBACK)SetTilesetFourTerrainValues;
|
||||
gTilesets[ TLS_DESERT_SAM ].MovementCostFnc = (TILESET_CALLBACK)SetTilesetFourTerrainValues;
|
||||
xmlw.writeToFile(filename);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
void SetTilesetOneTerrainValues( )
|
||||
{
|
||||
|
||||
@@ -0,0 +1,640 @@
|
||||
#ifndef _XML_STRUCTUREDATA_HPP_
|
||||
#define _XML_STRUCTUREDATA_HPP_
|
||||
|
||||
#include "XML_auto_parse.h"
|
||||
|
||||
#include <vfs/Tools/vfs_parser_tools.h>
|
||||
#include <vfs/Tools/vfs_tools.h>
|
||||
|
||||
class CStructureDataStates
|
||||
{
|
||||
public:
|
||||
enum States
|
||||
{
|
||||
STATE_NONE,
|
||||
STATE_STRUCTURE_FILE,
|
||||
// ***********
|
||||
STATE_HEADER,
|
||||
STATE_HEADER_id,
|
||||
STATE_HEADER_num_structures,
|
||||
STATE_HEADER_num_images,
|
||||
STATE_HEADER_struct_stored,
|
||||
STATE_HEADER_tile_locs_stores,
|
||||
STATE_HEADER_data_size,
|
||||
STATE_HEADER_flags,
|
||||
STATE_HEADER_flags_any,
|
||||
// ***********
|
||||
STATE_AUXIMAGE_DATA,
|
||||
STATE_AUX_image,
|
||||
STATE_AUX_image_tile_index,
|
||||
STATE_AUX_image_wall_orient,
|
||||
STATE_AUX_image_num_tiles,
|
||||
STATE_AUX_image_num_frames,
|
||||
STATE_AUX_image_cur_frame,
|
||||
STATE_AUX_image_FLAGS,
|
||||
STATE_AUX_image_FLAGS_any,
|
||||
// ***********
|
||||
STATE_TILE_OFFSETS,
|
||||
STATE_TOFF_offset,
|
||||
// ***********
|
||||
STATE_STRUCTURE_DATA,
|
||||
// --
|
||||
STATE_SD_structure,
|
||||
STATE_SD_structure_number,
|
||||
STATE_SD_structure_armour,
|
||||
STATE_SD_structure_hitpoits,
|
||||
STATE_SD_structure_density,
|
||||
STATE_SD_structure_wallrientation,
|
||||
STATE_SD_structure_destr_partner,
|
||||
STATE_SD_structure_desct_delta,
|
||||
STATE_SD_structure_ZoffsetX,
|
||||
STATE_SD_structure_ZoffsetY,
|
||||
STATE_SD_structure_flags,
|
||||
STATE_SD_structure_flags_any,
|
||||
STATE_SD_structure_numtiles,
|
||||
// --
|
||||
STATE_SD_TILES,
|
||||
STATE_SD_TILES_tile,
|
||||
STATE_SD_TILES_tile_OffsetX,
|
||||
STATE_SD_TILES_tile_OffsetY,
|
||||
STATE_SD_TILES_tile_OffsetBase,
|
||||
STATE_SD_TILES_tile_vehitLoc,
|
||||
STATE_SD_TILES_tile_flags,
|
||||
STATE_SD_TILES_tile_flags_any,
|
||||
STATE_SD_TILES_tile_profile,
|
||||
STATE_SD_TILES_tile_profile_any,
|
||||
};
|
||||
};
|
||||
|
||||
PARSER_CLASS_MACRO(CStructureDataReader, CStructureDataStates)
|
||||
{
|
||||
typedef CStructureDataReader _myt;
|
||||
|
||||
struct StructureData
|
||||
{
|
||||
DB_STRUCTURE structure;
|
||||
std::vector<DB_STRUCTURE_TILE> tiles;
|
||||
};
|
||||
std::vector<StructureData> _structures;
|
||||
public:
|
||||
PURE_TRANSITION(NOOP, _myt);
|
||||
|
||||
/**********************************************************************/
|
||||
/* HEADER */
|
||||
/**********************************************************************/
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_Header,_myt,false);
|
||||
TRANSITION_ENTER{
|
||||
memset(&(P_DATA->oHeader), 0, sizeof(STRUCTURE_FILE_HEADER));
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_Header_NumStructures,_myt,true);
|
||||
TRANSITION_LEAVE{
|
||||
P_DATA->oHeader.usNumberOfStructures = atoi(char_data.c_str());
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_Header_NumImages,_myt,true);
|
||||
TRANSITION_LEAVE{
|
||||
P_DATA->oHeader.usNumberOfImages = atoi(char_data.c_str());
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_Header_StructStored,_myt,true);
|
||||
TRANSITION_LEAVE{
|
||||
P_DATA->oHeader.usNumberOfStructuresStored = atoi(char_data.c_str());
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_Header_TileLocsStored,_myt,true);
|
||||
TRANSITION_LEAVE{
|
||||
P_DATA->oHeader.usNumberOfImageTileLocsStored = atoi(char_data.c_str());
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_Header_DataSize,_myt,true);
|
||||
TRANSITION_LEAVE{
|
||||
P_DATA->oHeader.usStructureDataSize = atoi(char_data.c_str());
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
DEFINE_TRANSITION(TR_Header_Flags,_myt,true);
|
||||
TRANSITION_LEAVE{
|
||||
if(std::string(tag_name) == "STRUCTURE_FILE_CONTAINS_STRUCTUREDATA") P_DATA->oHeader.fFlags |= STRUCTURE_FILE_CONTAINS_STRUCTUREDATA;
|
||||
if(std::string(tag_name) == "STRUCTURE_FILE_CONTAINS_AUXIMAGEDATA") P_DATA->oHeader.fFlags |= STRUCTURE_FILE_CONTAINS_AUXIMAGEDATA;
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
/* AUXIMAGE_DATA */
|
||||
/**********************************************************************/
|
||||
int count_aux_tiles;
|
||||
DEFINE_TRANSITION(TR_AUXIMAGE_DATA, _myt, false);
|
||||
TRANSITION_ENTER{
|
||||
long num = 0;
|
||||
SGP_THROW_IFFALSE(atts.getLong("number_of",num), L"no attribute 'number_of'");
|
||||
if(num > 0)
|
||||
{
|
||||
SGP_THROW_IFFALSE(num == P_DATA->oHeader.usNumberOfImages , L"inconsistent data");
|
||||
P_DATA->pStructureFileRef->usNumberOfStructures = (UINT16)num;
|
||||
int size = sizeof(AuxObjectData) * num;
|
||||
P_DATA->pStructureFileRef->pAuxData = (AuxObjectData*)MemAlloc(size);
|
||||
memset(P_DATA->pStructureFileRef->pAuxData, 0, size);
|
||||
P_DATA->count_aux_tiles = 0;
|
||||
}
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
AuxObjectData* current_aux;
|
||||
DEFINE_TRANSITION(TR_AUX_image, _myt, false);
|
||||
TRANSITION_ENTER{
|
||||
long index = -1;
|
||||
SGP_THROW_IFFALSE(atts.getLong("index", index), L"no attribute 'index'");
|
||||
SGP_THROW_IFFALSE(index >= 0 && index < P_DATA->oHeader.usNumberOfImages, L"index out of range");
|
||||
P_DATA->current_aux = &P_DATA->pStructureFileRef->pAuxData[index];
|
||||
}
|
||||
TRANSITION_LEAVE{
|
||||
P_DATA->current_aux = NULL;
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_AUX_image_tile_index, _myt, true);
|
||||
TRANSITION_LEAVE{
|
||||
SGP_THROW_IFFALSE(P_DATA->current_aux, L"aux is null");
|
||||
P_DATA->current_aux->usTileLocIndex = atoi(char_data.c_str());
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_AUX_image_wall_orient, _myt, true);
|
||||
TRANSITION_LEAVE{
|
||||
SGP_THROW_IFFALSE(P_DATA->current_aux, L"aux is null");
|
||||
P_DATA->current_aux->ubWallOrientation = atoi(char_data.c_str());
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_AUX_image_num_tiles, _myt, true);
|
||||
TRANSITION_LEAVE{
|
||||
SGP_THROW_IFFALSE(P_DATA->current_aux, L"aux is null");
|
||||
int num_tiles = atoi(char_data.c_str());
|
||||
P_DATA->current_aux->ubNumberOfTiles = num_tiles;
|
||||
P_DATA->count_aux_tiles += num_tiles;
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_AUX_image_num_frames, _myt, true);
|
||||
TRANSITION_LEAVE{
|
||||
SGP_THROW_IFFALSE(P_DATA->current_aux, L"aux is null");
|
||||
P_DATA->current_aux->ubNumberOfFrames = atoi(char_data.c_str());
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_AUX_image_cur_frame, _myt, true);
|
||||
TRANSITION_LEAVE{
|
||||
SGP_THROW_IFFALSE(P_DATA->current_aux, L"aux is null");
|
||||
P_DATA->current_aux->ubCurrentFrame = atoi(char_data.c_str());
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_AUX_image_FLAGS, _myt, true);
|
||||
TRANSITION_LEAVE{
|
||||
SGP_THROW_IFFALSE(P_DATA->current_aux, L"aux is null");
|
||||
if(std::string(tag_name) == "AUX_FULL_TILE") P_DATA->current_aux->fFlags |= AUX_FULL_TILE;
|
||||
if(std::string(tag_name) == "AUX_ANIMATED_TILE") P_DATA->current_aux->fFlags |= AUX_ANIMATED_TILE;
|
||||
if(std::string(tag_name) == "AUX_DYNAMIC_TILE") P_DATA->current_aux->fFlags |= AUX_DYNAMIC_TILE;
|
||||
if(std::string(tag_name) == "AUX_INTERACTIVE_TILE") P_DATA->current_aux->fFlags |= AUX_INTERACTIVE_TILE;
|
||||
if(std::string(tag_name) == "AUX_IGNORES_HEIGHT") P_DATA->current_aux->fFlags |= AUX_IGNORES_HEIGHT;
|
||||
if(std::string(tag_name) == "AUX_USES_LAND_Z") P_DATA->current_aux->fFlags |= AUX_USES_LAND_Z;
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
/* AUXTILE_DATA */
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_AUX_TILES, _myt, false);
|
||||
TRANSITION_ENTER{
|
||||
long num = 0;
|
||||
SGP_THROW_IFFALSE(atts.getLong("number_of",num), L"no attribute 'number_of'");
|
||||
if(num > 0)
|
||||
{
|
||||
SGP_THROW_IFFALSE(num == P_DATA->count_aux_tiles && num == P_DATA->oHeader.usNumberOfImageTileLocsStored,
|
||||
L"counted number and given number of tiles aux images are not equal");
|
||||
|
||||
int size = num * sizeof(RelTileLoc);
|
||||
P_DATA->pStructureFileRef->pTileLocData = (RelTileLoc*)MemAlloc(size);
|
||||
memset(P_DATA->pStructureFileRef->pTileLocData, 0, size);
|
||||
}
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
DEFINE_TRANSITION(TR_AUX_Tile_offset, _myt, false);
|
||||
TRANSITION_ENTER{
|
||||
long index = 0, x = 0 , y = 0;
|
||||
SGP_THROW_IFFALSE(atts.getLong("index", index), L"nu attribute 'index'");
|
||||
SGP_THROW_IFFALSE(index >= 0 && index < P_DATA->oHeader.usNumberOfImageTileLocsStored, L"index out of range");
|
||||
SGP_THROW_IFFALSE(atts.getLong("x", x), L"no attribute 'x'");
|
||||
SGP_THROW_IFFALSE(atts.getLong("y", y), L"no attribute 'y'");
|
||||
P_DATA->pStructureFileRef->pTileLocData[index].bTileOffsetX = (INT8)x;
|
||||
P_DATA->pStructureFileRef->pTileLocData[index].bTileOffsetY = (INT8)y;
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
/* STRUCTURE_DATA */
|
||||
/**********************************************************************/
|
||||
StructureData* current_structure;
|
||||
int structure_index, structure_count;
|
||||
DEFINE_TRANSITION(TR_Structure_data,_myt, false);
|
||||
TRANSITION_ENTER{
|
||||
long num = 0, stored = 0;
|
||||
SGP_THROW_IFFALSE(atts.getLong("number_of",num), L"structure data : no attribute 'number_of'");
|
||||
if(!atts.getLong("stored",stored))
|
||||
{
|
||||
stored = num;
|
||||
}
|
||||
if(num > 0)
|
||||
{
|
||||
// header consistency check (to be removed later ?)
|
||||
SGP_THROW_IFFALSE(num == P_DATA->oHeader.usNumberOfStructures, L"inconsistent data : number of structures");
|
||||
SGP_THROW_IFFALSE(stored == P_DATA->oHeader.usNumberOfStructuresStored, L"inconsistent data : number of stored structures");
|
||||
P_DATA->_structures.resize(stored);
|
||||
for(int i=0; i < stored; ++i)
|
||||
{
|
||||
memset(&P_DATA->_structures[i].structure, 0, sizeof(DB_STRUCTURE));
|
||||
}
|
||||
// save data
|
||||
P_DATA->pStructureFileRef->usNumberOfStructures = (UINT16)num;
|
||||
P_DATA->pStructureFileRef->usNumberOfStructuresStored = (UINT16)stored;
|
||||
}
|
||||
P_DATA->structure_count = 0;
|
||||
P_DATA->structure_index = -1;
|
||||
}
|
||||
TRANSITION_LEAVE{
|
||||
// copy gathered data into game object
|
||||
if(!P_DATA->_structures.empty())
|
||||
{
|
||||
SGP_THROW_IFFALSE(P_DATA->pStructureFileRef->usNumberOfStructuresStored == P_DATA->structure_count, L"wrong number of structures");
|
||||
|
||||
int size = 0;
|
||||
for(::size_t i = 0; i < P_DATA->_structures.size(); ++i)
|
||||
{
|
||||
size += sizeof(DB_STRUCTURE);
|
||||
for(::size_t j = 0; j < P_DATA->_structures[i].tiles.size(); ++j)
|
||||
{
|
||||
size += sizeof(DB_STRUCTURE_TILE);
|
||||
}
|
||||
}
|
||||
|
||||
SGP_THROW_IFFALSE(size == P_DATA->oHeader.usStructureDataSize,
|
||||
_BS(L"data size is supposed to be '") << P_DATA->oHeader.usStructureDataSize << L"' but is '" << size << L"'" << _BS::wget);
|
||||
|
||||
P_DATA->structure_data_size = size;
|
||||
|
||||
P_DATA->pStructureFileRef->pubStructureData = (UINT8*)MemAlloc(size);
|
||||
UINT8 *tmp = P_DATA->pStructureFileRef->pubStructureData;
|
||||
for(::size_t i = 0; i < P_DATA->_structures.size(); ++i)
|
||||
{
|
||||
memcpy(tmp, &P_DATA->_structures[i].structure, sizeof(DB_STRUCTURE));
|
||||
tmp += sizeof(DB_STRUCTURE);
|
||||
for(::size_t j = 0; j < P_DATA->_structures[i].tiles.size(); ++j)
|
||||
{
|
||||
memcpy(tmp, &P_DATA->_structures[i].tiles[j], sizeof(DB_STRUCTURE_TILE));
|
||||
tmp += sizeof(DB_STRUCTURE_TILE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_Structure, _myt, false);
|
||||
TRANSITION_ENTER{
|
||||
long index;
|
||||
SGP_THROW_IFFALSE( atts.getLong("index", index), L"no attribute 'index'" );
|
||||
SGP_THROW_IFFALSE( (index >= 0) && (index < P_DATA->pStructureFileRef->usNumberOfStructures), L"structure index out of range");
|
||||
SGP_THROW_IFFALSE( (P_DATA->structure_count >= 0) && (P_DATA->structure_count < P_DATA->pStructureFileRef->usNumberOfStructuresStored), L"structure count larger than announced");
|
||||
P_DATA->current_structure = &P_DATA->_structures[P_DATA->structure_count];
|
||||
P_DATA->current_structure->structure.usStructureNumber = (UINT16)index;
|
||||
P_DATA->structure_index = index;
|
||||
}
|
||||
TRANSITION_LEAVE{
|
||||
// finished this structure, increase index for next run
|
||||
P_DATA->structure_index = -1;
|
||||
P_DATA->structure_count += 1;
|
||||
P_DATA->current_structure = NULL;
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
//DEFINE_TRANSITION(TR_Structure_number, _myt, true);
|
||||
//TRANSITION_LEAVE{
|
||||
// SGP_THROW_IFFALSE( P_DATA->current_structure, L"null structure" );
|
||||
// P_DATA->current_structure->structure.usStructureNumber = atoi(char_data.c_str());
|
||||
// SGP_THROW_IFFALSE( P_DATA->current_structure->structure.usStructureNumber == P_DATA->structure_index, L"inconsistent data");
|
||||
//}
|
||||
//FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_Structure_armour, _myt, true);
|
||||
TRANSITION_LEAVE{
|
||||
SGP_THROW_IFFALSE( P_DATA->current_structure, L"null structure" );
|
||||
P_DATA->current_structure->structure.ubArmour = atoi(char_data.c_str());
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_Structure_hitpoints, _myt, true);
|
||||
TRANSITION_LEAVE{
|
||||
SGP_THROW_IFFALSE( P_DATA->current_structure, L"null structure" );
|
||||
P_DATA->current_structure->structure.ubHitPoints = atoi(char_data.c_str());
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_Structure_density, _myt, true);
|
||||
TRANSITION_LEAVE{
|
||||
SGP_THROW_IFFALSE( P_DATA->current_structure, L"null structure" );
|
||||
P_DATA->current_structure->structure.ubDensity = atoi(char_data.c_str());
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_Structure_wall_orient, _myt, true);
|
||||
TRANSITION_LEAVE{
|
||||
SGP_THROW_IFFALSE( P_DATA->current_structure, L"null structure" );
|
||||
P_DATA->current_structure->structure.ubWallOrientation = atoi(char_data.c_str());
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_Structure_destr_partner, _myt, true);
|
||||
TRANSITION_LEAVE{
|
||||
SGP_THROW_IFFALSE( P_DATA->current_structure, L"null structure" );
|
||||
P_DATA->current_structure->structure.bDestructionPartner = atoi(char_data.c_str());
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_Structure_partner_delta, _myt, true);
|
||||
TRANSITION_LEAVE{
|
||||
SGP_THROW_IFFALSE( P_DATA->current_structure, L"null structure" );
|
||||
P_DATA->current_structure->structure.bPartnerDelta = atoi(char_data.c_str());
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_Structure_offX, _myt, true);
|
||||
TRANSITION_LEAVE{
|
||||
SGP_THROW_IFFALSE( P_DATA->current_structure, L"null structure" );
|
||||
P_DATA->current_structure->structure.bZTileOffsetX = atoi(char_data.c_str());
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_Structure_offY, _myt, true);
|
||||
TRANSITION_LEAVE{
|
||||
SGP_THROW_IFFALSE( P_DATA->current_structure, L"null structure" );
|
||||
P_DATA->current_structure->structure.bZTileOffsetY = atoi(char_data.c_str());
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_Structure_num_tiles, _myt, true);
|
||||
TRANSITION_LEAVE{
|
||||
SGP_THROW_IFFALSE( P_DATA->current_structure, L"null structure" );
|
||||
int num_tiles = atoi(char_data.c_str());
|
||||
SGP_THROW_IFFALSE(num_tiles >= 0, L"invalid number");
|
||||
P_DATA->current_structure->structure.ubNumberOfTiles = num_tiles;
|
||||
P_DATA->current_structure->tiles.resize(num_tiles);
|
||||
for(int i = 0 ;i < num_tiles; ++i)
|
||||
{
|
||||
memset(&P_DATA->current_structure->tiles[i], 0, sizeof(DB_STRUCTURE_TILE));
|
||||
}
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_Structure_FLAGS, _myt, true);
|
||||
TRANSITION_LEAVE{
|
||||
SGP_THROW_IFFALSE( P_DATA->current_structure, L"null structure" );
|
||||
if(std::string(tag_name) == "STRUCTURE_BASE_TILE") P_DATA->current_structure->structure.fFlags |= STRUCTURE_BASE_TILE;
|
||||
if(std::string(tag_name) == "STRUCTURE_OPEN") P_DATA->current_structure->structure.fFlags |= STRUCTURE_OPEN;
|
||||
if(std::string(tag_name) == "STRUCTURE_OPENABLE") P_DATA->current_structure->structure.fFlags |= STRUCTURE_OPENABLE;
|
||||
if(std::string(tag_name) == "STRUCTURE_CLOSEABLE") P_DATA->current_structure->structure.fFlags |= STRUCTURE_CLOSEABLE;
|
||||
if(std::string(tag_name) == "STRUCTURE_SEARCHABLE") P_DATA->current_structure->structure.fFlags |= STRUCTURE_SEARCHABLE;
|
||||
if(std::string(tag_name) == "STRUCTURE_HIDDEN") P_DATA->current_structure->structure.fFlags |= STRUCTURE_HIDDEN;
|
||||
if(std::string(tag_name) == "STRUCTURE_MOBILE") P_DATA->current_structure->structure.fFlags |= STRUCTURE_MOBILE;
|
||||
if(std::string(tag_name) == "STRUCTURE_PASSABLE") P_DATA->current_structure->structure.fFlags |= STRUCTURE_PASSABLE;
|
||||
if(std::string(tag_name) == "STRUCTURE_EXPLOSIVE") P_DATA->current_structure->structure.fFlags |= STRUCTURE_EXPLOSIVE;
|
||||
if(std::string(tag_name) == "STRUCTURE_TRANSPARENT") P_DATA->current_structure->structure.fFlags |= STRUCTURE_TRANSPARENT;
|
||||
if(std::string(tag_name) == "STRUCTURE_GENERIC") P_DATA->current_structure->structure.fFlags |= STRUCTURE_GENERIC;
|
||||
if(std::string(tag_name) == "STRUCTURE_TREE") P_DATA->current_structure->structure.fFlags |= STRUCTURE_TREE;
|
||||
if(std::string(tag_name) == "STRUCTURE_FENCE") P_DATA->current_structure->structure.fFlags |= STRUCTURE_FENCE;
|
||||
if(std::string(tag_name) == "STRUCTURE_WIREFENCE") P_DATA->current_structure->structure.fFlags |= STRUCTURE_WIREFENCE;
|
||||
if(std::string(tag_name) == "STRUCTURE_HASITEMONTOP") P_DATA->current_structure->structure.fFlags |= STRUCTURE_HASITEMONTOP;
|
||||
if(std::string(tag_name) == "STRUCTURE_SPECIAL") P_DATA->current_structure->structure.fFlags |= STRUCTURE_SPECIAL;
|
||||
if(std::string(tag_name) == "STRUCTURE_LIGHTSOURCE") P_DATA->current_structure->structure.fFlags |= STRUCTURE_LIGHTSOURCE;
|
||||
if(std::string(tag_name) == "STRUCTURE_VEHICLE") P_DATA->current_structure->structure.fFlags |= STRUCTURE_VEHICLE;
|
||||
if(std::string(tag_name) == "STRUCTURE_WALL") P_DATA->current_structure->structure.fFlags |= STRUCTURE_WALL;
|
||||
if(std::string(tag_name) == "STRUCTURE_WALLNWINDOW") P_DATA->current_structure->structure.fFlags |= STRUCTURE_WALLNWINDOW;
|
||||
if(std::string(tag_name) == "STRUCTURE_SLIDINGDOOR") P_DATA->current_structure->structure.fFlags |= STRUCTURE_SLIDINGDOOR;
|
||||
if(std::string(tag_name) == "STRUCTURE_DOOR") P_DATA->current_structure->structure.fFlags |= STRUCTURE_DOOR;
|
||||
if(std::string(tag_name) == "STRUCTURE_MULTI") P_DATA->current_structure->structure.fFlags |= STRUCTURE_MULTI;
|
||||
if(std::string(tag_name) == "STRUCTURE_CAVEWALL") P_DATA->current_structure->structure.fFlags |= STRUCTURE_CAVEWALL;
|
||||
if(std::string(tag_name) == "STRUCTURE_DDOOR_LEFT") P_DATA->current_structure->structure.fFlags |= STRUCTURE_DDOOR_LEFT;
|
||||
if(std::string(tag_name) == "STRUCTURE_DDOOR_RIGHT") P_DATA->current_structure->structure.fFlags |= STRUCTURE_DDOOR_RIGHT;
|
||||
if(std::string(tag_name) == "STRUCTURE_NORMAL_ROOF") P_DATA->current_structure->structure.fFlags |= STRUCTURE_NORMAL_ROOF;
|
||||
if(std::string(tag_name) == "STRUCTURE_SLANTED_ROOF") P_DATA->current_structure->structure.fFlags |= STRUCTURE_SLANTED_ROOF;
|
||||
if(std::string(tag_name) == "STRUCTURE_TALL_ROOF") P_DATA->current_structure->structure.fFlags |= STRUCTURE_TALL_ROOF;
|
||||
if(std::string(tag_name) == "STRUCTURE_SWITCH") P_DATA->current_structure->structure.fFlags |= STRUCTURE_SWITCH;
|
||||
if(std::string(tag_name) == "STRUCTURE_ON_LEFT_WALL") P_DATA->current_structure->structure.fFlags |= STRUCTURE_ON_LEFT_WALL;
|
||||
if(std::string(tag_name) == "STRUCTURE_ON_RIGHT_WALL") P_DATA->current_structure->structure.fFlags |= STRUCTURE_ON_RIGHT_WALL;
|
||||
if(std::string(tag_name) == "STRUCTURE_CORPSE") P_DATA->current_structure->structure.fFlags |= STRUCTURE_CORPSE;
|
||||
if(std::string(tag_name) == "STRUCTURE_PERSON") P_DATA->current_structure->structure.fFlags |= STRUCTURE_PERSON;
|
||||
if(std::string(tag_name) == "STRUCTURE_ANYFENCE") P_DATA->current_structure->structure.fFlags |= STRUCTURE_ANYFENCE;
|
||||
if(std::string(tag_name) == "STRUCTURE_ANYDOOR") P_DATA->current_structure->structure.fFlags |= STRUCTURE_ANYDOOR;
|
||||
if(std::string(tag_name) == "STRUCTURE_OBSTACLE") P_DATA->current_structure->structure.fFlags |= STRUCTURE_OBSTACLE;
|
||||
if(std::string(tag_name) == "STRUCTURE_WALLSTUFF") P_DATA->current_structure->structure.fFlags |= STRUCTURE_WALLSTUFF;
|
||||
if(std::string(tag_name) == "STRUCTURE_BLOCKSMOVES") P_DATA->current_structure->structure.fFlags |= STRUCTURE_BLOCKSMOVES;
|
||||
if(std::string(tag_name) == "STRUCTURE_TYPE_DEFINED") P_DATA->current_structure->structure.fFlags |= STRUCTURE_TYPE_DEFINED;
|
||||
if(std::string(tag_name) == "STRUCTURE_ROOF") P_DATA->current_structure->structure.fFlags |= STRUCTURE_ROOF;
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
/* STRUCTURE_TILES */
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_SD_TILES, _myt, false);
|
||||
TRANSITION_ENTER{
|
||||
long num = 0;
|
||||
if(atts.getLong("number_of",num))
|
||||
{
|
||||
SGP_THROW_IFFALSE(num == P_DATA->current_structure->structure.ubNumberOfTiles, L"inconsistent data");
|
||||
}
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DB_STRUCTURE_TILE* current_str_tile;
|
||||
DEFINE_TRANSITION(TR_SD_Tile, _myt, false);
|
||||
TRANSITION_ENTER{
|
||||
long index = 0;
|
||||
SGP_THROW_IFFALSE( atts.getLong("index",index), L"no attribute 'index'" );
|
||||
SGP_THROW_IFFALSE( index >= 0 && index < (long)P_DATA->current_structure->tiles.size(), L"structure index out of range");
|
||||
P_DATA->current_str_tile = &P_DATA->current_structure->tiles[index];
|
||||
}
|
||||
TRANSITION_LEAVE{
|
||||
P_DATA->current_str_tile = NULL;
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_SD_Tile_offX, _myt, true);
|
||||
TRANSITION_LEAVE{
|
||||
SGP_THROW_IFFALSE(P_DATA->current_str_tile, L"null structure tile");
|
||||
P_DATA->current_str_tile->bXPosRelToBase = atoi(char_data.c_str());
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_SD_Tile_offY, _myt, true);
|
||||
TRANSITION_LEAVE{
|
||||
SGP_THROW_IFFALSE(P_DATA->current_str_tile, L"null structure tile");
|
||||
P_DATA->current_str_tile->bYPosRelToBase = atoi(char_data.c_str());
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_SD_Tile_offBase, _myt, true);
|
||||
TRANSITION_LEAVE{
|
||||
SGP_THROW_IFFALSE(P_DATA->current_str_tile, L"null structure tile");
|
||||
P_DATA->current_str_tile->sPosRelToBase = atoi(char_data.c_str());
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_SD_Tile_VehHitLoc, _myt, true);
|
||||
TRANSITION_LEAVE{
|
||||
SGP_THROW_IFFALSE(P_DATA->current_str_tile, L"null structure tile");
|
||||
P_DATA->current_str_tile->ubVehicleHitLocation = atoi(char_data.c_str());
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_SD_Tile_FLAGS, _myt, true);
|
||||
TRANSITION_LEAVE{
|
||||
SGP_THROW_IFFALSE(P_DATA->current_str_tile, L"null structure tile");
|
||||
if(std::string(tag_name) == "TILE_ON_ROOF") P_DATA->current_str_tile->fFlags |= TILE_ON_ROOF;
|
||||
if(std::string(tag_name) == "TILE_PASSABLE") P_DATA->current_str_tile->fFlags |= TILE_PASSABLE;
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
DEFINE_TRANSITION(TR_SD_Tile_profile, _myt, true);
|
||||
TRANSITION_LEAVE{
|
||||
SGP_THROW_IFFALSE(P_DATA->current_str_tile, L"null structure tile");
|
||||
int y = -1;
|
||||
if (std::string(tag_name) == "y0") y = 0;
|
||||
else if(std::string(tag_name) == "y1") y = 1;
|
||||
else if(std::string(tag_name) == "y2") y = 2;
|
||||
else if(std::string(tag_name) == "y3") y = 3;
|
||||
else if(std::string(tag_name) == "y4") y = 4;
|
||||
|
||||
if(y != -1)
|
||||
{
|
||||
int x = 0;
|
||||
vfs::String token;
|
||||
vfs::CTokenizer tok(char_data);
|
||||
while(tok.next(token, L','))
|
||||
{
|
||||
if(x >= 0 && x < 5)
|
||||
{
|
||||
int z;
|
||||
SGP_THROW_IFFALSE( vfs::convertTo<int>(token,z), L"" );
|
||||
if(z >= 0 && z < 16)
|
||||
{
|
||||
P_DATA->current_str_tile->Shape[y][x] = z;
|
||||
}
|
||||
}
|
||||
x++;
|
||||
}
|
||||
}
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**********************************************************************/
|
||||
UINT32 structure_data_size;
|
||||
|
||||
STRUCTURE_FILE_REF* pStructureFileRef;
|
||||
STRUCTURE_FILE_HEADER oHeader;
|
||||
CStructureDataReader(STRUCTURE_FILE_REF* sfr)
|
||||
: pStructureFileRef(sfr), current_structure(NULL), current_str_tile(NULL), current_aux(NULL)
|
||||
{
|
||||
SGP_THROW_IFFALSE(sfr, L"");
|
||||
|
||||
TR_PASS (STATE_NONE, "STRUCTURE_FILE", STATE_STRUCTURE_FILE);
|
||||
// HEADER
|
||||
TR_HANDLE( STATE_STRUCTURE_FILE, "HEADER", STATE_HEADER, TR_Header );
|
||||
TR_HANDLE( STATE_HEADER, "usNumberOfStructures", STATE_HEADER_num_structures, TR_Header_NumStructures );
|
||||
TR_HANDLE( STATE_HEADER, "usNumberOfImages", STATE_HEADER_num_images, TR_Header_NumImages );
|
||||
TR_HANDLE( STATE_HEADER, "usNumberOfStructuresStored", STATE_HEADER_struct_stored, TR_Header_StructStored );
|
||||
TR_HANDLE( STATE_HEADER, "usNumberOfImageTileLocsStored", STATE_HEADER_tile_locs_stores, TR_Header_TileLocsStored );
|
||||
TR_HANDLE( STATE_HEADER, "usStructureDataSize", STATE_HEADER_data_size, TR_Header_DataSize );
|
||||
TR_PASS ( STATE_HEADER, "flags", STATE_HEADER_flags );
|
||||
TR_HANDLE( STATE_HEADER_flags, "", STATE_HEADER_flags_any, TR_Header_Flags );
|
||||
// AUX IMAGE
|
||||
TR_HANDLE( STATE_STRUCTURE_FILE, "AUXIMAGE_DATA", STATE_AUXIMAGE_DATA, TR_AUXIMAGE_DATA);
|
||||
TR_HANDLE( STATE_AUXIMAGE_DATA, "auximage", STATE_AUX_image, TR_AUX_image);
|
||||
TR_HANDLE( STATE_AUX_image, "tile_loc_index", STATE_AUX_image_tile_index, TR_AUX_image_tile_index);
|
||||
TR_HANDLE( STATE_AUX_image, "wall_orientation", STATE_AUX_image_wall_orient, TR_AUX_image_wall_orient);
|
||||
TR_HANDLE( STATE_AUX_image, "number_of_tiles", STATE_AUX_image_num_tiles, TR_AUX_image_num_tiles);
|
||||
TR_HANDLE( STATE_AUX_image, "number_of_frames", STATE_AUX_image_num_frames, TR_AUX_image_num_frames);
|
||||
TR_HANDLE( STATE_AUX_image, "current_frame", STATE_AUX_image_cur_frame, TR_AUX_image_cur_frame);
|
||||
TR_PASS ( STATE_AUX_image, "flags", STATE_AUX_image_FLAGS);
|
||||
TR_HANDLE( STATE_AUX_image_FLAGS, "", STATE_AUX_image_FLAGS_any, TR_AUX_image_FLAGS);
|
||||
// AUX TILES
|
||||
TR_HANDLE( STATE_STRUCTURE_FILE, "TILE_OFFSETS", STATE_TILE_OFFSETS, TR_AUX_TILES);
|
||||
TR_HANDLE( STATE_TILE_OFFSETS, "offset", STATE_TOFF_offset, TR_AUX_Tile_offset);
|
||||
// STRUCTURE
|
||||
TR_HANDLE( STATE_STRUCTURE_FILE, "STRUCTURE_DATA", STATE_STRUCTURE_DATA, TR_Structure_data );
|
||||
TR_HANDLE( STATE_STRUCTURE_DATA, "STRUCTURE", STATE_SD_structure, TR_Structure );
|
||||
// TR_HANDLE( STATE_SD_structure, "usStructureNumber", STATE_SD_structure_number, TR_Structure_number );
|
||||
TR_HANDLE( STATE_SD_structure, "ubArmour", STATE_SD_structure_armour, TR_Structure_armour );
|
||||
TR_HANDLE( STATE_SD_structure, "ubHitPoints", STATE_SD_structure_hitpoits, TR_Structure_hitpoints );
|
||||
TR_HANDLE( STATE_SD_structure, "ubDensity", STATE_SD_structure_density, TR_Structure_density );
|
||||
TR_HANDLE( STATE_SD_structure, "ubWallOrientation", STATE_SD_structure_wallrientation, TR_Structure_wall_orient );
|
||||
TR_HANDLE( STATE_SD_structure, "bDestructionPartner", STATE_SD_structure_destr_partner, TR_Structure_destr_partner );
|
||||
TR_HANDLE( STATE_SD_structure, "bPartnerDelta", STATE_SD_structure_desct_delta, TR_Structure_partner_delta );
|
||||
TR_HANDLE( STATE_SD_structure, "bZTileOffsetX", STATE_SD_structure_ZoffsetX, TR_Structure_offX );
|
||||
TR_HANDLE( STATE_SD_structure, "bZTileOffsetY", STATE_SD_structure_ZoffsetY, TR_Structure_offY );
|
||||
TR_PASS ( STATE_SD_structure, "flags", STATE_SD_structure_flags );
|
||||
TR_HANDLE( STATE_SD_structure_flags, "", STATE_SD_structure_flags_any, TR_Structure_FLAGS );
|
||||
TR_HANDLE( STATE_SD_structure, "ubNumberOfTiles", STATE_SD_structure_numtiles, TR_Structure_num_tiles );
|
||||
// STRUCTURE TILES
|
||||
TR_HANDLE( STATE_SD_structure, "TILES", STATE_SD_TILES, TR_SD_TILES);
|
||||
TR_HANDLE( STATE_SD_TILES, "STRUCTURE_TILE", STATE_SD_TILES_tile, TR_SD_Tile);
|
||||
TR_HANDLE( STATE_SD_TILES_tile, "bXPosRelToBase", STATE_SD_TILES_tile_OffsetX, TR_SD_Tile_offX);
|
||||
TR_HANDLE( STATE_SD_TILES_tile, "bYPosRelToBase", STATE_SD_TILES_tile_OffsetY, TR_SD_Tile_offY);
|
||||
TR_HANDLE( STATE_SD_TILES_tile, "sPosRelToBase", STATE_SD_TILES_tile_OffsetBase, TR_SD_Tile_offBase);
|
||||
TR_HANDLE( STATE_SD_TILES_tile, "ubVehicleHitLocation", STATE_SD_TILES_tile_vehitLoc, TR_SD_Tile_VehHitLoc);
|
||||
TR_PASS ( STATE_SD_TILES_tile, "flags", STATE_SD_TILES_tile_flags );
|
||||
TR_HANDLE( STATE_SD_TILES_tile_flags, "", STATE_SD_TILES_tile_flags_any, TR_SD_Tile_FLAGS );
|
||||
TR_PASS ( STATE_SD_TILES_tile, "profile", STATE_SD_TILES_tile_profile );
|
||||
TR_HANDLE( STATE_SD_TILES_tile_profile, "", STATE_SD_TILES_tile_profile_any, TR_SD_Tile_profile );
|
||||
}
|
||||
};
|
||||
|
||||
#endif // _XML_STRUCTUREDATA_HPP_
|
||||
@@ -0,0 +1,125 @@
|
||||
#ifndef _XML_TILESET_HPP_
|
||||
#define _XML_TILESET_HPP_
|
||||
|
||||
#include "XML_auto_parse.h"
|
||||
#include "WorldDat.h"
|
||||
#include <vfs/Tools/vfs_tools.h>
|
||||
|
||||
class CTilesetStates
|
||||
{
|
||||
public:
|
||||
enum States
|
||||
{
|
||||
STATE_NONE,
|
||||
STATE_JA2SET,
|
||||
STATE_tilesets,
|
||||
STATE_ts_tileset,
|
||||
STATE_ts_tileset_name,
|
||||
STATE_ts_tileset_ambientid,
|
||||
STATE_ts_tileset_files,
|
||||
STATE_ts_tileset_files_file,
|
||||
};
|
||||
};
|
||||
|
||||
PARSER_CLASS_MACRO(CTilesetReader, CTilesetStates)
|
||||
{
|
||||
typedef CTilesetReader _myt;
|
||||
public:
|
||||
/**
|
||||
* NOOP
|
||||
*/
|
||||
PURE_TRANSITION(NOOP, _myt);
|
||||
|
||||
|
||||
/**
|
||||
* Tilesets
|
||||
*/
|
||||
DEFINE_TRANSITION_WDATA(TilesetsAttrib, _myt, false, struct TilesetInfo{int numTilesets; int numFiles;});
|
||||
TRANSITION_ENTER{
|
||||
long T_num, F_num;
|
||||
if(atts.getLong("numTilesets", T_num)) T_DATA.numTilesets = (int)T_num;
|
||||
else SGP_THROW(L"Attribute 'numTileset' not found");
|
||||
|
||||
if(atts.getLong("numFiles",F_num)) T_DATA.numFiles = (int)F_num ;
|
||||
else SGP_THROW(L"Attribute 'numFiles' not found");
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**
|
||||
* Tileset
|
||||
*/
|
||||
TILESET* _current_tileset;
|
||||
DEFINE_TRANSITION(Tileset, _myt, false);
|
||||
TRANSITION_ENTER{
|
||||
long lindex;
|
||||
if(atts.getLong("index", lindex)){
|
||||
SGP_THROW_IFFALSE(lindex < MAX_TILESETS, _BS(L"tileset index is too large : ") << lindex << _BS::wget );
|
||||
P_DATA->_current_tileset = &(P_DATA->_tilesets[ lindex ]);
|
||||
}
|
||||
else SGP_THROW(L"Attribute 'index' not found");
|
||||
}
|
||||
TRANSITION_LEAVE{
|
||||
P_DATA->_current_tileset = NULL;
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**
|
||||
* Tileset Name
|
||||
*/
|
||||
DEFINE_TRANSITION(TilesetName, _myt, true);
|
||||
TRANSITION_LEAVE{
|
||||
SGP_THROW_IFFALSE( P_DATA->_current_tileset != NULL, L"No tileset selected" );
|
||||
std::string tmpString = vfs::trimString(char_data, 0, char_data.length());
|
||||
wcsncpy( P_DATA->_current_tileset->zName, vfs::String( tmpString ).c_str(), 32 );
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**
|
||||
* Tileset ID
|
||||
*/
|
||||
DEFINE_TRANSITION(TilesetAmbientID, _myt, true);
|
||||
TRANSITION_LEAVE{
|
||||
SGP_THROW_IFFALSE( P_DATA->_current_tileset != NULL, L"No tileset selected" );
|
||||
int tmp;
|
||||
SGP_THROW_IFFALSE( vfs::convertTo<int>(char_data, tmp),
|
||||
_BS(L"Could not convert to int : ") << char_data << _BS::wget );
|
||||
P_DATA->_current_tileset->ubAmbientID = tmp;
|
||||
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
/**
|
||||
* Tileset File
|
||||
*/
|
||||
DEFINE_TRANSITION_WDATA(TilesetFile, _myt, true, struct Index{int index;});
|
||||
TRANSITION_ENTER{
|
||||
long lindex;
|
||||
if(atts.getLong("index", lindex)){
|
||||
SGP_THROW_IFFALSE(lindex < NUMBEROFTILETYPES,
|
||||
_BS(L"tileset file index is too large : ") << lindex << _BS::wget );
|
||||
T_DATA.index = lindex;
|
||||
}
|
||||
else SGP_THROW(L"Attribute 'index' not found");
|
||||
}
|
||||
TRANSITION_LEAVE{
|
||||
SGP_THROW_IFFALSE( P_DATA->_current_tileset != NULL, L"No tileset selected" );
|
||||
std::string tmpString = vfs::trimString(char_data, 0, char_data.length());
|
||||
strncpy( P_DATA->_current_tileset->TileSurfaceFilenames[T_DATA.index], tmpString.c_str(), 32);
|
||||
}
|
||||
FINISH_TRANSITION;
|
||||
|
||||
|
||||
TILESET* _tilesets;
|
||||
CTilesetReader(TILESET tilesets[ MAX_TILESETS ]) : _tilesets(tilesets), _current_tileset(NULL)
|
||||
{
|
||||
TR_PASS ( STATE_NONE, "JA2SET", STATE_JA2SET);
|
||||
TR_HANDLE( STATE_JA2SET, "tilesets", STATE_tilesets, TilesetsAttrib );
|
||||
TR_HANDLE( STATE_tilesets, "Tileset", STATE_ts_tileset, Tileset );
|
||||
TR_HANDLE( STATE_ts_tileset, "Name", STATE_ts_tileset_name, TilesetName );
|
||||
TR_HANDLE( STATE_ts_tileset, "AmbientID", STATE_ts_tileset_ambientid, TilesetAmbientID );
|
||||
TR_PASS ( STATE_ts_tileset, "Files", STATE_ts_tileset_files );
|
||||
TR_HANDLE( STATE_ts_tileset_files, "file", STATE_ts_tileset_files_file, TilesetFile );
|
||||
}
|
||||
};
|
||||
|
||||
#endif // _XML_TILESET_HPP_
|
||||
@@ -960,12 +960,13 @@ void UpdateTemperature( UINT8 ubTemperatureCode )
|
||||
|
||||
INT8 SectorTemperature( UINT32 uiTime, INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ )
|
||||
{
|
||||
// SANDRO - updated this code
|
||||
if (bSectorZ > 0)
|
||||
{
|
||||
// cool underground
|
||||
return( 0 );
|
||||
}
|
||||
else if ( IsSectorDesert( sSectorX, sSectorY ) ) // is desert
|
||||
else if ( IsSectorDesert( sSectorX, sSectorY ) && !( guiEnvWeather & ( WEATHER_FORECAST_SHOWERS | WEATHER_FORECAST_THUNDERSHOWERS ) ) ) // is desert
|
||||
{
|
||||
return( gubDesertTemperature );
|
||||
}
|
||||
|
||||
@@ -1359,8 +1359,6 @@ void RenderOverheadOverlays()
|
||||
if(pSoldier->bSide==0)
|
||||
{
|
||||
int personIndex = pSoldier->bTeam + 4;
|
||||
// TODO.RW: Get the correct person index (depending on the pSoldier->bTeam)
|
||||
//Blt8BPPDataTo16BPPBufferTransparent((UINT16*)pDestBuf, uiDestPitchBYTES, hVObject, sX, sY, 3 );
|
||||
Blt8BPPDataTo16BPPBufferTransparent((UINT16*)pDestBuf, uiDestPitchBYTES, hVObject, sX, sY, personIndex );
|
||||
}
|
||||
}
|
||||
@@ -1405,9 +1403,6 @@ void RenderOverheadOverlays()
|
||||
if(pSoldier->bSide==0)
|
||||
{
|
||||
int personIndex = pSoldier->bTeam + 4;
|
||||
// TODO.RW: Get the correct person index (depending on the pSoldier->bTeam)
|
||||
|
||||
//Blt8BPPDataTo16BPPBufferTransparent((UINT16*)pDestBuf, uiDestPitchBYTES, hVObject, sX, sY, 3 );
|
||||
Blt8BPPDataTo16BPPBufferTransparent((UINT16*)pDestBuf, uiDestPitchBYTES, hVObject, sX, sY, personIndex );
|
||||
}
|
||||
}
|
||||
|
||||
+19
-13
@@ -369,9 +369,9 @@ void RemoveAllPhysicsObjects( )
|
||||
void SimulateObject( REAL_OBJECT *pObject, real deltaT )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"SimulateObject");
|
||||
|
||||
if ( !PhysicsUpdateLife( pObject, (float)deltaT ) )
|
||||
{
|
||||
// DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"SimulateObject: don't update life, returning");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -486,10 +486,15 @@ BOOLEAN PhysicsUpdateLife( REAL_OBJECT *pObject, real DeltaTime )
|
||||
|
||||
}
|
||||
|
||||
// End life if we are out of bounds....
|
||||
if ( !GridNoOnVisibleWorldTile( pObject->sGridNo ) )
|
||||
// WANNE.BMP: Only do this check on normal maps.
|
||||
// When we do this check on Big Maps it always returns false and we got wrong physics when trowing items!
|
||||
if (WORLD_COLS <= 160 && WORLD_ROWS <= 160)
|
||||
{
|
||||
pObject->fAlive = FALSE;
|
||||
// End life if we are out of bounds....
|
||||
if ( !GridNoOnVisibleWorldTile( pObject->sGridNo ) )
|
||||
{
|
||||
pObject->fAlive = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if ( !pObject->fAlive )
|
||||
@@ -1496,9 +1501,7 @@ vector_3 FindBestForceForTrajectory( INT32 sSrcGridNo, INT32 sGridNo,INT16 sStar
|
||||
dRange = (float)GetRangeInCellCoordsFromGridNoDiff( sGridNo, sSrcGridNo );
|
||||
|
||||
//calculate force needed
|
||||
{
|
||||
dForce = (float)( 12.0 * ( sqrt( ( GRAVITY * dRange ) / sin( 2.0 * dzDegrees ) ) ) );
|
||||
}
|
||||
dForce = (float)( 12.0 * ( sqrt( ( GRAVITY * dRange ) / sin( 2.0 * dzDegrees ) ) ) );
|
||||
|
||||
do
|
||||
{
|
||||
@@ -1537,12 +1540,6 @@ vector_3 FindBestForceForTrajectory( INT32 sSrcGridNo, INT32 sGridNo,INT16 sStar
|
||||
|
||||
} while( TRUE );
|
||||
|
||||
// OK, we have our force, calculate change to get through without collide
|
||||
//if ( ChanceToGetThroughObjectTrajectory( sEndZ, pItem, &vPosition, &vForce, NULL ) == 0 )
|
||||
{
|
||||
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Chance to get through throw is 0." );
|
||||
}
|
||||
|
||||
if ( pdMagForce )
|
||||
{
|
||||
(*pdMagForce) = dForce;
|
||||
@@ -2152,6 +2149,9 @@ FLOAT CalculateForceFromRange( INT16 sRange, FLOAT dDegrees )
|
||||
|
||||
FindBestForceForTrajectory( sSrcGridNo, sDestGridNo, GET_SOLDIER_THROW_HEIGHT( 0 ), 0, dDegrees, &gTempObject, &sFinalGridNo, &dMagForce );
|
||||
|
||||
// WANNE: Problem is the FORCE!!
|
||||
// dMagForce = 460.00;
|
||||
|
||||
return( dMagForce );
|
||||
}
|
||||
|
||||
@@ -2204,6 +2204,12 @@ void CalculateLaunchItemParamsForThrow( SOLDIERTYPE *pSoldier, INT32 sGridNo, UI
|
||||
{
|
||||
// then we hit!
|
||||
bMissBy = 0;
|
||||
|
||||
// SANDRO - new merc records
|
||||
if( pSoldier->bTeam == 0 && pSoldier->ubProfile != NO_PROFILE )
|
||||
{
|
||||
gMercProfiles[ pSoldier->ubProfile ].records.usShotsHit++;
|
||||
}
|
||||
}
|
||||
|
||||
//if ( 0 )
|
||||
|
||||
+106
-9
@@ -23,7 +23,7 @@
|
||||
#include "Smell.h"
|
||||
#include "SaveLoadMap.h"
|
||||
#include "strategicmap.h"
|
||||
|
||||
#include "sgp_logger.h"
|
||||
|
||||
#include "Sys Globals.h" //for access to gfEditMode flag
|
||||
|
||||
@@ -432,25 +432,122 @@ BOOLEAN CreateFileStructureArrays( STRUCTURE_FILE_REF * pFileRef, UINT32 uiDataS
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
#include <vfs/Core/vfs_file_raii.h>
|
||||
#include <vfs/Core/vfs.h>
|
||||
#include "XML_StructureData.hpp"
|
||||
|
||||
void checkStructureValidity(STRUCTURE_FILE_REF *str1, STRUCTURE_FILE_REF* str2, UINT32 size1, UINT32 size2)
|
||||
{
|
||||
if(str1 == str2 && str1 == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(str1->pubStructureData && str2->pubStructureData)
|
||||
{
|
||||
SGP_THROW_IFFALSE( size1 == size2, L"");
|
||||
//SGP_THROW_IFFALSE( 0 == memcmp(str1->pubStructureData, str2->pubStructureData, size1), L"" );
|
||||
UINT8* ptr1 = str1->pubStructureData;
|
||||
UINT8* ptr2 = str2->pubStructureData;
|
||||
unsigned int count = 0;
|
||||
for(; count < size1 && (*ptr1++ == *ptr2++); count++) {}
|
||||
SGP_THROW_IFFALSE(count == size1, L"bad structure data");
|
||||
}
|
||||
else if(str1->pubStructureData || str2->pubStructureData)
|
||||
{
|
||||
SGP_THROW(L"bad structure data");
|
||||
}
|
||||
|
||||
int count_tiles_1 = 0, count_tiles_2 = 0;
|
||||
if(str1->pAuxData && str2->pAuxData)
|
||||
{
|
||||
SGP_THROW_IFFALSE(str1->usNumberOfStructures == str2->usNumberOfStructures, L"");
|
||||
SGP_THROW_IFFALSE(str1->usNumberOfStructuresStored == str2->usNumberOfStructuresStored, L"");
|
||||
//SGP_THROW_IFFALSE( 0 == memcmp(str1->pAuxData, str2->pAuxData, sizeof(AuxObjectData)*str2->usNumberOfStructures), L"" );
|
||||
for(int i = 0; i < str2->usNumberOfStructures; ++i)
|
||||
{
|
||||
SGP_THROW_IFFALSE( 0 == memcmp(&str1->pAuxData[i], &str2->pAuxData[i], sizeof(AuxObjectData)), _BS(L"bad aux_image : ") << i << _BS::wget );
|
||||
}
|
||||
|
||||
for(int i = 0; i < str1->usNumberOfStructures; ++i){
|
||||
count_tiles_1 += str1->pAuxData[i].ubNumberOfTiles;
|
||||
}
|
||||
for(int j = 0; j < str2->usNumberOfStructures; ++j){
|
||||
count_tiles_2 += str2->pAuxData[j].ubNumberOfTiles;
|
||||
}
|
||||
SGP_THROW_IFFALSE(count_tiles_1 == count_tiles_2, L"");
|
||||
}
|
||||
else if(str1->pAuxData || str2->pAuxData)
|
||||
{
|
||||
SGP_THROW(L"bad aux image data");
|
||||
}
|
||||
|
||||
if(str1->pTileLocData && str2->pTileLocData)
|
||||
{
|
||||
SGP_THROW_IFFALSE( 0 == memcmp(str1->pTileLocData, str2->pTileLocData, count_tiles_1*sizeof(RelTileLoc)), L"" );
|
||||
}
|
||||
else if(str1->pTileLocData || str2->pTileLocData)
|
||||
{
|
||||
SGP_THROW(L"bad aux tile data");
|
||||
}
|
||||
}
|
||||
|
||||
STRUCTURE_FILE_REF * LoadStructureFile( STR szFileName )
|
||||
{
|
||||
// NB should be passed in expected number of structures so we can check equality
|
||||
UINT32 uiDataSize = 0;
|
||||
BOOLEAN fOk;
|
||||
STRUCTURE_FILE_REF * pFileRef;
|
||||
UINT32 uiDataSize = 0;
|
||||
BOOLEAN fOk;
|
||||
STRUCTURE_FILE_REF* pFileRef;
|
||||
|
||||
pFileRef = (STRUCTURE_FILE_REF *) MemAlloc( sizeof( STRUCTURE_FILE_REF ) );
|
||||
if (pFileRef == NULL)
|
||||
bool found_jsd_xml_file = false;
|
||||
extern bool g_bUseXML_Structures;
|
||||
|
||||
if(g_bUseXML_Structures)
|
||||
{
|
||||
return( NULL );
|
||||
vfs::Path filename = std::string(szFileName) + ".xml";
|
||||
|
||||
if(getVFS()->fileExists(filename))
|
||||
{
|
||||
pFileRef = (STRUCTURE_FILE_REF *) MemAlloc( sizeof( STRUCTURE_FILE_REF ) );
|
||||
memset( pFileRef, 0, sizeof( STRUCTURE_FILE_REF ) );
|
||||
|
||||
CStructureDataReader str_reader(pFileRef);
|
||||
xml_auto::TGenericXMLParser<CStructureDataReader> str_parser(&str_reader);
|
||||
|
||||
SGP_TRYCATCH_RETHROW( str_parser.parseFile(filename), _BS(L"Could not parse file : ") << filename << _BS::wget);
|
||||
|
||||
uiDataSize = str_reader.structure_data_size;
|
||||
fOk = TRUE;
|
||||
|
||||
found_jsd_xml_file = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
memset( pFileRef, 0, sizeof( STRUCTURE_FILE_REF ) );
|
||||
fOk = LoadStructureData( szFileName, pFileRef, &uiDataSize );
|
||||
if(!found_jsd_xml_file)
|
||||
{
|
||||
pFileRef = (STRUCTURE_FILE_REF *) MemAlloc( sizeof( STRUCTURE_FILE_REF ) );
|
||||
if (pFileRef == NULL)
|
||||
{
|
||||
return( NULL );
|
||||
}
|
||||
memset( pFileRef, 0, sizeof( STRUCTURE_FILE_REF ) );
|
||||
|
||||
if(g_bUseXML_Structures)
|
||||
{
|
||||
}
|
||||
|
||||
fOk = LoadStructureData( szFileName, pFileRef, &uiDataSize );
|
||||
}
|
||||
|
||||
if (!fOk)
|
||||
{
|
||||
SGP_WARNING("Could not load structure file : ") << szFileName << "[.jsd|.xml]" << sgp::endl << sgp::flush;
|
||||
MemFree( pFileRef );
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
if (pFileRef->pubStructureData != NULL)
|
||||
{
|
||||
fOk = CreateFileStructureArrays( pFileRef, uiDataSize );
|
||||
|
||||
+272
-1
@@ -68,6 +68,8 @@
|
||||
#include "LoadScreen.h"//dnl ch30 150909
|
||||
#include "Interface Cursors.h"
|
||||
#include "Simple Render Utils.h"//dnl ch54 111009
|
||||
///ddd
|
||||
#include "gamesettings.h"
|
||||
#endif
|
||||
|
||||
#define SET_MOVEMENTCOST( a, b, c, d ) ( ( gubWorldMovementCosts[ a ][ b ][ c ] < d ) ? ( gubWorldMovementCosts[ a ][ b ][ c ] = d ) : 0 );
|
||||
@@ -159,7 +161,11 @@ INT32 *gpDirtyData;
|
||||
UINT32 gSurfaceMemUsage;
|
||||
//UINT8 gubWorldMovementCosts[ WORLD_MAX ][MAXDIR][2];
|
||||
UINT8 (*gubWorldMovementCosts)[MAXDIR][2] = NULL;//dnl ch43 260909
|
||||
|
||||
//ddd äëÿ óáûñòðåíèÿ ïîèñêà îñâåùåííûõ ó÷àñòêîâ â ïàòõàè.
|
||||
BOOLEAN gubWorldTileInLight[ MAX_ALLOWED_WORLD_MAX ];
|
||||
BOOLEAN gubIsCorpseThere[ MAX_ALLOWED_WORLD_MAX ];
|
||||
INT32 gubMerkCanSeeThisTile[ MAX_ALLOWED_WORLD_MAX ];
|
||||
//ddd
|
||||
// set to nonzero (locs of base gridno of structure are good) to have it defined by structure code
|
||||
INT16 gsRecompileAreaTop = 0;
|
||||
INT16 gsRecompileAreaLeft = 0;
|
||||
@@ -735,6 +741,48 @@ void CompileWorldTerrainIDs( void )
|
||||
}
|
||||
}
|
||||
|
||||
///dddokno {
|
||||
#pragma optimize("gpt",on)
|
||||
__forceinline
|
||||
BOOLEAN IsNotRestrictedWindow(STRUCTURE * pStructure)
|
||||
{
|
||||
|
||||
if ( (pStructure->fFlags & STRUCTURE_WALLNWINDOW) && gGameExternalOptions.fCanJumpThroughWindows
|
||||
&& !(pStructure->fFlags & STRUCTURE_SPECIAL)
|
||||
&& (pStructure->fFlags & STRUCTURE_OPEN)
|
||||
&& (pStructure->pDBStructureRef->pDBStructure->bPartnerDelta == NO_PARTNER_STRUCTURE) )
|
||||
{
|
||||
//ðó÷íàÿ ïðîâåðêà íà çàêîëî÷åíûå îêíà ;( {
|
||||
//build_13.sti - çàêîëî÷åííûå îêíà íäåêñ:
|
||||
|
||||
LEVELNODE *pNode = NULL;// STRUCTURE *pBase=NULL;
|
||||
UINT32 uiTileType=0;
|
||||
//pBase = FindStructure( pStructure->sGridNo, STRUCTURE_WALLNWINDOW );
|
||||
//if(pBase!= NULL)
|
||||
pNode = FindLevelNodeBasedOnStructure( pStructure->sGridNo, pStructure );
|
||||
//pNode = gpWorldLevelData[ pStructure->sGridNo ].pStructHead;
|
||||
if(pNode != NULL)
|
||||
GetTileType( pNode->usIndex, &uiTileType );
|
||||
|
||||
UINT16 RestrSubIndex;
|
||||
GetSubIndexFromTileIndex( pNode->usIndex, (UINT16 *)&RestrSubIndex );
|
||||
|
||||
//ýòîò òèï îêîí íå ñîäåðæèòñÿ â 0 òàéëñåòå, ïðîâåðêà íóëåâîãî òàéëñåòà â ýòîì ñëó÷àå íå íóæíà
|
||||
if ( _stricmp( gTilesets[ giCurrentTilesetID ].TileSurfaceFilenames[ uiTileType ], "build_13.sti" ) == 0
|
||||
//&& ( pNode->usIndex == 814 || pNode->usIndex == 816 || pNode->usIndex == 817 || pNode->usIndex == 823) -çàïðåùàåò òîëüêî â êîíêðåòíîì òàéëñåòå ;( â äðóãîì íå ñðàáîòàåò
|
||||
&& (RestrSubIndex == 40 || RestrSubIndex == 41 || RestrSubIndex == 37 || RestrSubIndex == 38
|
||||
|| RestrSubIndex == 43 || RestrSubIndex == 44 || RestrSubIndex == 46 || RestrSubIndex == 47) //íîìåðà ôðåéìîâ â ñòèøêå
|
||||
|
||||
)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
///dddokno }
|
||||
|
||||
void CompileTileMovementCosts( INT32 usGridNo )
|
||||
{
|
||||
UINT8 ubTerrainID;
|
||||
@@ -845,6 +893,229 @@ void CompileTileMovementCosts( INT32 usGridNo )
|
||||
}
|
||||
// all other passable structures do not block movement in any way
|
||||
}
|
||||
|
||||
/*
|
||||
//dddokno{ =============================================================
|
||||
else if ( IsNotRestrictedWindow(pStructure) )
|
||||
{
|
||||
// standard door
|
||||
switch( pStructure->ubWallOrientation )
|
||||
{
|
||||
case OUTSIDE_TOP_LEFT:
|
||||
SET_CURRMOVEMENTCOST( NORTHEAST, TRAVELCOST_WALL );
|
||||
SET_CURRMOVEMENTCOST( NORTH, TRAVELCOST_JUMPABLEWINDOW );
|
||||
SET_CURRMOVEMENTCOST( NORTHWEST, TRAVELCOST_WALL );
|
||||
|
||||
SET_MOVEMENTCOST( usGridNo + WORLD_COLS, SOUTHEAST, 0, TRAVELCOST_WALL );
|
||||
SET_MOVEMENTCOST( usGridNo + WORLD_COLS, SOUTH, 0, TRAVELCOST_JUMPABLEWINDOW_N );
|
||||
SET_MOVEMENTCOST( usGridNo + WORLD_COLS, SOUTHWEST, 0, TRAVELCOST_WALL );
|
||||
|
||||
// DO CORNERS
|
||||
SET_MOVEMENTCOST( usGridNo - 1, NORTHWEST, 0, TRAVELCOST_WALL );
|
||||
SET_MOVEMENTCOST( usGridNo + 1, NORTHEAST, 0, TRAVELCOST_WALL );
|
||||
SET_MOVEMENTCOST( usGridNo + WORLD_COLS - 1, SOUTHWEST, 0, TRAVELCOST_WALL );
|
||||
SET_MOVEMENTCOST( usGridNo + WORLD_COLS + 1, SOUTHEAST, 0, TRAVELCOST_WALL );
|
||||
|
||||
break;
|
||||
|
||||
case INSIDE_TOP_LEFT:
|
||||
SET_CURRMOVEMENTCOST( NORTHEAST, TRAVELCOST_WALL );
|
||||
SET_CURRMOVEMENTCOST( NORTH, TRAVELCOST_JUMPABLEWINDOW );
|
||||
SET_CURRMOVEMENTCOST( NORTHWEST, TRAVELCOST_WALL );
|
||||
|
||||
SET_MOVEMENTCOST( usGridNo + WORLD_COLS, SOUTHEAST, 0, TRAVELCOST_OBSTACLE );
|
||||
SET_MOVEMENTCOST( usGridNo + WORLD_COLS, SOUTH, 0, TRAVELCOST_JUMPABLEWINDOW_N );
|
||||
SET_MOVEMENTCOST( usGridNo + WORLD_COLS, SOUTHWEST, 0, TRAVELCOST_OBSTACLE );
|
||||
|
||||
// DO CORNERS
|
||||
SET_MOVEMENTCOST( usGridNo - 1, NORTHWEST, 0, TRAVELCOST_OBSTACLE );
|
||||
SET_MOVEMENTCOST( usGridNo + 1, NORTHEAST, 0, TRAVELCOST_OBSTACLE );
|
||||
SET_MOVEMENTCOST( usGridNo + WORLD_COLS - 1, SOUTHWEST, 0, TRAVELCOST_OBSTACLE );
|
||||
SET_MOVEMENTCOST( usGridNo + WORLD_COLS + 1, SOUTHEAST, 0, TRAVELCOST_OBSTACLE );
|
||||
|
||||
break;
|
||||
|
||||
case OUTSIDE_TOP_RIGHT:
|
||||
SET_CURRMOVEMENTCOST( SOUTHWEST, TRAVELCOST_OBSTACLE );
|
||||
SET_CURRMOVEMENTCOST( WEST, TRAVELCOST_JUMPABLEWINDOW );
|
||||
SET_CURRMOVEMENTCOST( NORTHWEST, TRAVELCOST_OBSTACLE );
|
||||
|
||||
SET_MOVEMENTCOST( usGridNo + 1, SOUTHEAST, 0, TRAVELCOST_OBSTACLE );
|
||||
SET_MOVEMENTCOST( usGridNo + 1, EAST, 0, TRAVELCOST_JUMPABLEWINDOW_W );
|
||||
SET_MOVEMENTCOST( usGridNo + 1, NORTHEAST, 0, TRAVELCOST_OBSTACLE );
|
||||
|
||||
// DO CORNERS
|
||||
SET_MOVEMENTCOST( usGridNo - WORLD_COLS + 1, NORTHEAST, 0, TRAVELCOST_OBSTACLE );
|
||||
SET_MOVEMENTCOST( usGridNo - WORLD_COLS, NORTHWEST, 0, TRAVELCOST_OBSTACLE );
|
||||
SET_MOVEMENTCOST( usGridNo + WORLD_COLS + 1, SOUTHEAST, 0, TRAVELCOST_OBSTACLE );
|
||||
SET_MOVEMENTCOST( usGridNo + WORLD_COLS, SOUTHWEST, 0, TRAVELCOST_OBSTACLE );
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case INSIDE_TOP_RIGHT:
|
||||
SET_CURRMOVEMENTCOST( SOUTHWEST, TRAVELCOST_OBSTACLE );
|
||||
SET_CURRMOVEMENTCOST( WEST, TRAVELCOST_JUMPABLEWINDOW );
|
||||
SET_CURRMOVEMENTCOST( NORTHWEST, TRAVELCOST_OBSTACLE );
|
||||
|
||||
SET_MOVEMENTCOST( usGridNo + 1, SOUTHEAST, 0, TRAVELCOST_OBSTACLE );
|
||||
SET_MOVEMENTCOST( usGridNo + 1, EAST, 0, TRAVELCOST_JUMPABLEWINDOW_W );
|
||||
SET_MOVEMENTCOST( usGridNo + 1, NORTHEAST, 0, TRAVELCOST_OBSTACLE );
|
||||
|
||||
// DO CORNERS
|
||||
SET_MOVEMENTCOST( usGridNo - WORLD_COLS + 1, NORTHEAST, 0, TRAVELCOST_OBSTACLE );
|
||||
SET_MOVEMENTCOST( usGridNo - WORLD_COLS, NORTHWEST, 0, TRAVELCOST_OBSTACLE );
|
||||
SET_MOVEMENTCOST( usGridNo + WORLD_COLS + 1, SOUTHEAST, 0, TRAVELCOST_OBSTACLE );
|
||||
SET_MOVEMENTCOST( usGridNo + WORLD_COLS, SOUTHWEST, 0, TRAVELCOST_OBSTACLE );
|
||||
|
||||
break;
|
||||
|
||||
|
||||
//switch( pStructure->ubWallOrientation )
|
||||
//{
|
||||
// case OUTSIDE_TOP_LEFT: //3 \# - êëåòêà âíóòðè ïîìåùåíèÿ, ñòåíà íàðóæó
|
||||
// case INSIDE_TOP_LEFT: //1 -êëåòêà ñíàðóæè ïîìåùåíèÿ \¹ ñòåíà âíóòðü
|
||||
// SET_CURRMOVEMENTCOST( NORTH, TRAVELCOST_JUMPABLEWINDOW );
|
||||
// SET_CURRMOVEMENTCOST( NORTHEAST, TRAVELCOST_OBSTACLE);
|
||||
// SET_CURRMOVEMENTCOST( EAST, TRAVELCOST_OBSTACLE );
|
||||
// SET_CURRMOVEMENTCOST( EAST, TRAVELCOST_OBSTACLE );
|
||||
// SET_CURRMOVEMENTCOST( SOUTHEAST, TRAVELCOST_OBSTACLE);
|
||||
// SET_CURRMOVEMENTCOST( SOUTH, TRAVELCOST_JUMPABLEWINDOW);
|
||||
// SET_CURRMOVEMENTCOST( SOUTHWEST, TRAVELCOST_OBSTACLE );
|
||||
// SET_CURRMOVEMENTCOST( WEST, TRAVELCOST_OBSTACLE );
|
||||
// SET_CURRMOVEMENTCOST( NORTHWEST, TRAVELCOST_OBSTACLE );
|
||||
// //?
|
||||
// FORCE_SET_MOVEMENTCOST( sGridNo - WORLD_COLS, NORTH, 0, TRAVELCOST_NONE );
|
||||
// SET_MOVEMENTCOST( sGridNo - WORLD_COLS + 1, NORTHEAST, 0, TRAVELCOST_OBSTACLE );
|
||||
// SET_MOVEMENTCOST( sGridNo + 1, EAST, 0, TRAVELCOST_OBSTACLE );
|
||||
// SET_MOVEMENTCOST( sGridNo + WORLD_COLS + 1, SOUTHEAST, 0, TRAVELCOST_OBSTACLE );
|
||||
// FORCE_SET_MOVEMENTCOST( sGridNo + WORLD_COLS, SOUTH, 0, TRAVELCOST_NONE );
|
||||
// SET_MOVEMENTCOST( sGridNo + WORLD_COLS - 1, SOUTHWEST, 0, TRAVELCOST_OBSTACLE );
|
||||
// SET_MOVEMENTCOST( sGridNo - 1, WEST, 0, TRAVELCOST_OBSTACLE );
|
||||
// SET_MOVEMENTCOST( sGridNo - WORLD_COLS - 1, NORTHWEST, 0, TRAVELCOST_OBSTACLE );
|
||||
//
|
||||
|
||||
|
||||
// break;
|
||||
|
||||
// case OUTSIDE_TOP_RIGHT: //4 #/ //êëåòêà âíóòðè ïîìåùåíèÿ, ñòåíà íàðóæó
|
||||
|
||||
// case INSIDE_TOP_RIGHT:
|
||||
|
||||
// //2 #/
|
||||
// //. ñòåíà ñòîèò íà ïðàâîì íèæí. êðàþ è ñìîòðèò íà ÞÂ
|
||||
// // êëåòêà íàõîäèòñÿ ñíàðóæè ïîìåùåíèÿ, ñòåíà âíóòðè êëåòêè
|
||||
|
||||
|
||||
// SET_CURRMOVEMENTCOST( NORTH, TRAVELCOST_OBSTACLE );
|
||||
// SET_CURRMOVEMENTCOST( NORTHEAST, TRAVELCOST_OBSTACLE );
|
||||
// SET_CURRMOVEMENTCOST( EAST, TRAVELCOST_JUMPABLEWINDOW );
|
||||
// SET_CURRMOVEMENTCOST( SOUTHEAST, TRAVELCOST_OBSTACLE );
|
||||
// SET_CURRMOVEMENTCOST( SOUTH, TRAVELCOST_OBSTACLE );
|
||||
// SET_CURRMOVEMENTCOST( SOUTHWEST, TRAVELCOST_OBSTACLE );
|
||||
// SET_CURRMOVEMENTCOST( WEST, TRAVELCOST_JUMPABLEWINDOW );
|
||||
// SET_CURRMOVEMENTCOST( NORTHWEST, TRAVELCOST_OBSTACLE );
|
||||
// //?
|
||||
// // set values for the tiles EXITED from this location
|
||||
// SET_MOVEMENTCOST( sGridNo - WORLD_COLS, NORTH, 0, TRAVELCOST_OBSTACLE );
|
||||
// SET_MOVEMENTCOST( sGridNo - WORLD_COLS + 1, NORTHEAST, 0, TRAVELCOST_OBSTACLE );
|
||||
// // make sure no obstacle costs exists before changing path cost to 0
|
||||
// if ( gubWorldMovementCosts[ sGridNo + 1 ][ EAST ][ 0 ] < TRAVELCOST_BLOCKED )
|
||||
// {
|
||||
// FORCE_SET_MOVEMENTCOST( sGridNo + 1, EAST, 0, TRAVELCOST_NONE );
|
||||
// }
|
||||
// SET_MOVEMENTCOST( sGridNo + WORLD_COLS + 1, SOUTHEAST, 0, TRAVELCOST_OBSTACLE );
|
||||
// SET_MOVEMENTCOST( sGridNo + WORLD_COLS, SOUTH, 0, TRAVELCOST_OBSTACLE );
|
||||
// SET_MOVEMENTCOST( sGridNo + WORLD_COLS - 1, SOUTHWEST, 0, TRAVELCOST_OBSTACLE );
|
||||
// if ( gubWorldMovementCosts[ sGridNo - 1 ][ WEST ][ 0 ] < TRAVELCOST_BLOCKED )
|
||||
// {
|
||||
// FORCE_SET_MOVEMENTCOST( sGridNo - 1, WEST, 0, TRAVELCOST_NONE );
|
||||
// }
|
||||
// SET_MOVEMENTCOST( sGridNo - WORLD_COLS - 1, NORTHWEST, 0, TRAVELCOST_OBSTACLE );
|
||||
|
||||
|
||||
// break;
|
||||
// default:
|
||||
// // corners aren't jumpable
|
||||
// for (ubDirLoop=0; ubDirLoop < NUM_WORLD_DIRECTIONS; ubDirLoop++)
|
||||
// {
|
||||
// SET_CURRMOVEMENTCOST( ubDirLoop, TRAVELCOST_OBSTACLE );
|
||||
// }
|
||||
// break;
|
||||
//}
|
||||
|
||||
|
||||
|
||||
//************************************ñòàðûé ïî÷òè ðàáîòàþùèé êîä. òîêà àè èíîãäà òóïèò ))
|
||||
//if ( (pStructure->fFlags & STRUCTURE_WALLNWINDOW) //&& !(pStructure->fFlags & STRUCTURE_SPECIAL)
|
||||
// && (pStructure->fFlags & STRUCTURE_WALLSTUFF)==0 )
|
||||
//if(pStructure->pDBStructureRef->pDBStructure->bPartnerDelta == NO_PARTNER_STRUCTURE)
|
||||
|
||||
// jumpable!
|
||||
// switch( pStructure->ubWallOrientation )
|
||||
// {
|
||||
// case OUTSIDE_TOP_LEFT:
|
||||
// case INSIDE_TOP_LEFT:
|
||||
// // can be jumped north and south
|
||||
// SET_CURRMOVEMENTCOST( NORTH, TRAVELCOST_FENCE );
|
||||
// SET_CURRMOVEMENTCOST( NORTHEAST, TRAVELCOST_OBSTACLE );
|
||||
// SET_CURRMOVEMENTCOST( EAST, TRAVELCOST_OBSTACLE );
|
||||
// SET_CURRMOVEMENTCOST( SOUTHEAST, TRAVELCOST_OBSTACLE );
|
||||
// SET_CURRMOVEMENTCOST( SOUTH, TRAVELCOST_FENCE );
|
||||
// SET_CURRMOVEMENTCOST( SOUTHWEST, TRAVELCOST_OBSTACLE );
|
||||
// SET_CURRMOVEMENTCOST( WEST, TRAVELCOST_OBSTACLE );
|
||||
// SET_CURRMOVEMENTCOST( NORTHWEST, TRAVELCOST_OBSTACLE );
|
||||
// // set values for the tiles EXITED from this location
|
||||
// FORCE_SET_MOVEMENTCOST( sGridNo - WORLD_COLS, NORTH, 0, TRAVELCOST_NONE );
|
||||
// SET_MOVEMENTCOST( sGridNo - WORLD_COLS + 1, NORTHEAST, 0, TRAVELCOST_OBSTACLE );
|
||||
// SET_MOVEMENTCOST( sGridNo + 1, EAST, 0, TRAVELCOST_OBSTACLE );
|
||||
// SET_MOVEMENTCOST( sGridNo + WORLD_COLS + 1, SOUTHEAST, 0, TRAVELCOST_OBSTACLE );
|
||||
// FORCE_SET_MOVEMENTCOST( sGridNo + WORLD_COLS, SOUTH, 0, TRAVELCOST_NONE );
|
||||
// SET_MOVEMENTCOST( sGridNo + WORLD_COLS - 1, SOUTHWEST, 0, TRAVELCOST_OBSTACLE );
|
||||
// SET_MOVEMENTCOST( sGridNo - 1, WEST, 0, TRAVELCOST_OBSTACLE );
|
||||
// SET_MOVEMENTCOST( sGridNo - WORLD_COLS - 1, NORTHWEST, 0, TRAVELCOST_OBSTACLE );
|
||||
// break;
|
||||
|
||||
// case OUTSIDE_TOP_RIGHT:
|
||||
// case INSIDE_TOP_RIGHT:
|
||||
// // can be jumped east and west
|
||||
// SET_CURRMOVEMENTCOST( NORTH, TRAVELCOST_OBSTACLE );
|
||||
// SET_CURRMOVEMENTCOST( NORTHEAST, TRAVELCOST_OBSTACLE );
|
||||
// SET_CURRMOVEMENTCOST( EAST, TRAVELCOST_FENCE );
|
||||
// SET_CURRMOVEMENTCOST( SOUTHEAST, TRAVELCOST_OBSTACLE );
|
||||
// SET_CURRMOVEMENTCOST( SOUTH, TRAVELCOST_OBSTACLE );
|
||||
// SET_CURRMOVEMENTCOST( SOUTHWEST, TRAVELCOST_OBSTACLE );
|
||||
// SET_CURRMOVEMENTCOST( WEST, TRAVELCOST_FENCE );
|
||||
// SET_CURRMOVEMENTCOST( NORTHWEST, TRAVELCOST_OBSTACLE );
|
||||
// // set values for the tiles EXITED from this location
|
||||
// SET_MOVEMENTCOST( sGridNo - WORLD_COLS, NORTH, 0, TRAVELCOST_OBSTACLE );
|
||||
// SET_MOVEMENTCOST( sGridNo - WORLD_COLS + 1, NORTHEAST, 0, TRAVELCOST_OBSTACLE );
|
||||
// // make sure no obstacle costs exists before changing path cost to 0
|
||||
// if ( gubWorldMovementCosts[ sGridNo + 1 ][ EAST ][ 0 ] < TRAVELCOST_BLOCKED )
|
||||
// {
|
||||
// FORCE_SET_MOVEMENTCOST( sGridNo + 1, EAST, 0, TRAVELCOST_NONE );
|
||||
// }
|
||||
// SET_MOVEMENTCOST( sGridNo + WORLD_COLS + 1, SOUTHEAST, 0, TRAVELCOST_OBSTACLE );
|
||||
// SET_MOVEMENTCOST( sGridNo + WORLD_COLS, SOUTH, 0, TRAVELCOST_OBSTACLE );
|
||||
// SET_MOVEMENTCOST( sGridNo + WORLD_COLS - 1, SOUTHWEST, 0, TRAVELCOST_OBSTACLE );
|
||||
// if ( gubWorldMovementCosts[ sGridNo - 1 ][ WEST ][ 0 ] < TRAVELCOST_BLOCKED )
|
||||
// {
|
||||
// FORCE_SET_MOVEMENTCOST( sGridNo - 1, WEST, 0, TRAVELCOST_NONE );
|
||||
// }
|
||||
// SET_MOVEMENTCOST( sGridNo - WORLD_COLS - 1, NORTHWEST, 0, TRAVELCOST_OBSTACLE );
|
||||
// break;
|
||||
|
||||
// //default:
|
||||
// // corners aren't jumpable
|
||||
// for (ubDirLoop=0; ubDirLoop < NUM_WORLD_DIRECTIONS; ubDirLoop++)
|
||||
// {
|
||||
// SET_CURRMOVEMENTCOST( ubDirLoop, TRAVELCOST_OBSTACLE );
|
||||
// }
|
||||
// break;
|
||||
// }//switch
|
||||
//}//}if dddokno==============================================================================
|
||||
*/
|
||||
|
||||
else if (pStructure->fFlags & STRUCTURE_BLOCKSMOVES)
|
||||
{
|
||||
if ( (pStructure->fFlags & STRUCTURE_FENCE) && !(pStructure->fFlags & STRUCTURE_SPECIAL) )
|
||||
|
||||
+10
-2
@@ -33,8 +33,10 @@ extern INT32 guiWorldRows;
|
||||
#define WORLD_MAX (WORLD_COLS*WORLD_ROWS)
|
||||
|
||||
// WANNE - BMP: The maximum value WORLD_MAX can have. DONE!
|
||||
#define MAX_ALLOWED_WORLD_MAX 4000000 // (1000 cols x 1000 rows)
|
||||
|
||||
// CptMoore - DC: added MAX values here so it is known that display cover depends on them
|
||||
#define WORLD_COLS_MAX 2000
|
||||
#define WORLD_ROWS_MAX 2000
|
||||
#define MAX_ALLOWED_WORLD_MAX WORLD_COLS_MAX*WORLD_ROWS_MAX // (2000 cols x 2000 rows)
|
||||
|
||||
//</SB>
|
||||
|
||||
@@ -284,6 +286,12 @@ extern MAP_ELEMENT *gpWorldLevelData;
|
||||
|
||||
// World Movement Costs
|
||||
//UINT8 gubWorldMovementCosts[ WORLD_MAX ][MAXDIR][2];
|
||||
//ddd äëÿ óáûñòðåíèÿ ïîèñêà îñâåùåííûõ ó÷àñòêîâ â ïàòõàè.
|
||||
extern BOOLEAN gubWorldTileInLight[ MAX_ALLOWED_WORLD_MAX ];
|
||||
extern BOOLEAN gubIsCorpseThere[ MAX_ALLOWED_WORLD_MAX ]; //íàäî áû ó÷èòûâàòü êðûøà\çåìëÿ ;)
|
||||
extern INT32 gubMerkCanSeeThisTile[ MAX_ALLOWED_WORLD_MAX ]; //ïîëîæåíèå äðàíèêà íå ó÷èòûâàåì, êðûøà\çåìëÿ òîæ?
|
||||
//ddd
|
||||
|
||||
extern UINT8 (*gubWorldMovementCosts)[MAXDIR][2];//dnl ch43 260909
|
||||
|
||||
//dnl ch44 290909 Translation routine
|
||||
|
||||
@@ -3768,3 +3768,37 @@ void SetTreeTopStateForMap()
|
||||
// FOR THE NEXT RENDER LOOP, RE-EVALUATE REDUNDENT TILES
|
||||
InvalidateWorldRedundency( );
|
||||
}
|
||||
|
||||
|
||||
|
||||
//--------------------legion 2 Jazz---------------------------------------------------------------
|
||||
BOOLEAN IsOknoLevel( INT32 sGridNo )
|
||||
{
|
||||
STRUCTURE * pStructure;
|
||||
|
||||
pStructure = FindStructure( sGridNo, STRUCTURE_WALLNWINDOW );
|
||||
|
||||
if ( pStructure != NULL && !( pStructure->fFlags & STRUCTURE_OPEN ))
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
return( FALSE );
|
||||
|
||||
}
|
||||
|
||||
BOOLEAN IsLegionLevel( INT32 sGridNo )
|
||||
{
|
||||
STRUCTURE * pStructure;
|
||||
|
||||
pStructure = FindStructure( sGridNo, STRUCTURE_FENCE );
|
||||
|
||||
if ( pStructure != NULL )//&& !( pStructure->fFlags & STRUCTURE_OPEN ))
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
return( FALSE );
|
||||
|
||||
}
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
@@ -153,4 +153,8 @@ extern UINT32 gCurrentBackground;
|
||||
|
||||
void SetTreeTopStateForMap();
|
||||
|
||||
//legion by Jazz
|
||||
BOOLEAN IsOknoLevel( INT32 sGridNo );
|
||||
BOOLEAN IsLegionLevel( INT32 sGridNo );
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user