1. PItems are now variable, from 3-20 and can be set in JA2Options.ini via NUM_P_ITEMS

2. USE_XML_TILESETS moved from JA2.ini to JA2Options.ini
3. New Feature - Ctrl+Click on an item with an item in hand to auto-attach/merge them.  Attach works with stacks.  Merge only works on single items, for now at least.
4. New Feature - To accompany Quiet Training, there are now Quiet Repairing and Quiet Doctoring options.
5. Bugfix - inseparable attachments of attachments were getting lost again when using ctrl+f/the map screen button to remove attachments
6. Bugfix - INT8 overflow error causing vehicle repair to actually lower its status
7. GasMask tag in items.xml can now be applied to helmets as well as face items.
8. Bugfix - AI code was referencing hard coded GASMASK item number instead of looking for the tag
9. Bugfix - "break;" was removed in Explosion Control.cpp, thereby causing mustard gas to deal out fire damage. (Not sure if this was deliberate?  But the new implementation differs from the JA2 standard, so it should be added to JA2Options.ini at least)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5320 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
MaddMugsy
2012-05-30 10:19:53 +00:00
parent 67fee5f14f
commit 49a590ed34
37 changed files with 427 additions and 208 deletions
+9 -3
View File
@@ -686,9 +686,15 @@ void ChangeStat( MERCPROFILESTRUCT *pProfile, SOLDIERTYPE *pSoldier, UINT8 ubSta
{
// Pipe up with "I'm getting better at this!"
TacticalCharacterDialogueWithSpecialEventEx( pSoldier, 0, DIALOGUE_SPECIAL_EVENT_DISPLAY_STAT_CHANGE, fChangeTypeIncrease, sPtsChanged, ubStat );
if ( (ubReason != FROM_TRAINING && pSoldier->bAssignment != TRAIN_TEAMMATE ) || !gGameSettings.fOptions[TOPTION_QUIET_TRAINING] ) //Madd: option to make mercs quiet during training
TacticalCharacterDialogue( pSoldier, QUOTE_EXPERIENCE_GAIN );
//Madd: option to make mercs quiet during training / doctoring / repairing
if ( ((pSoldier->bAssignment == TRAIN_BY_OTHER || pSoldier->bAssignment == TRAIN_TEAMMATE || pSoldier->bAssignment == TRAIN_SELF ||
pSoldier->bAssignment == FACILITY_STAFF || pSoldier->bAssignment == TRAIN_TOWN || pSoldier->bAssignment == TRAIN_MOBILE )
&& !gGameSettings.fOptions[TOPTION_QUIET_TRAINING]) ||
(pSoldier->bAssignment == REPAIR && !gGameSettings.fOptions[TOPTION_QUIET_REPAIRING]) ||
(pSoldier->bAssignment == DOCTOR && !gGameSettings.fOptions[TOPTION_QUIET_DOCTORING]))
TacticalCharacterDialogue( pSoldier, QUOTE_EXPERIENCE_GAIN );
}
else
{
+4 -4
View File
@@ -368,7 +368,7 @@ void HandleEndTurnDrugAdjustments( SOLDIERTYPE *pSoldier )
/*
//////////////// STRENGTH ////////////////
// strength we would normally have right now
INT8 strength = gMercProfiles[ pSoldier->ubProfile ].bStrength - pSoldier->ubCriticalStatDamage[ DAMAGED_STAT_STRENGTH ];
INT8 strength = gMercProfiles[ pSoldier->ubProfile ].bStrength;// Madd: commenting out this part b/c it breaks doctoring! - pSoldier->ubCriticalStatDamage[ DAMAGED_STAT_STRENGTH ];
INT8 strengthmodifier = pSoldier->drugs.bDrugEffect[ DRUG_TYPE_STRENGTH ] - pSoldier->drugs.bDrugSideEffect[ DRUG_TYPE_STRENGTH ];
@@ -393,7 +393,7 @@ void HandleEndTurnDrugAdjustments( SOLDIERTYPE *pSoldier )
//////////////// DEXTERITY ////////////////
// dexterity we would normally have right now
INT8 dexterity = gMercProfiles[ pSoldier->ubProfile ].bDexterity - pSoldier->ubCriticalStatDamage[ DAMAGED_STAT_DEXTERITY ];
INT8 dexterity = gMercProfiles[ pSoldier->ubProfile ].bDexterity;// Madd: commenting out this part b/c it breaks doctoring! - pSoldier->ubCriticalStatDamage[ DAMAGED_STAT_DEXTERITY ];
INT8 dexteritymodifier = pSoldier->drugs.bDrugEffect[ DRUG_TYPE_DEXTERITY ] - pSoldier->drugs.bDrugSideEffect[ DRUG_TYPE_DEXTERITY ];
@@ -418,7 +418,7 @@ void HandleEndTurnDrugAdjustments( SOLDIERTYPE *pSoldier )
//////////////// AGILITY ////////////////
// agility we would normally have right now
INT8 agility = gMercProfiles[ pSoldier->ubProfile ].bAgility - pSoldier->ubCriticalStatDamage[ DAMAGED_STAT_AGILITY ];
INT8 agility = gMercProfiles[ pSoldier->ubProfile ].bAgility;// Madd: commenting out this part b/c it breaks doctoring! - pSoldier->ubCriticalStatDamage[ DAMAGED_STAT_AGILITY ];
INT8 agilitymodifier = pSoldier->drugs.bDrugEffect[ DRUG_TYPE_AGILITY ] - pSoldier->drugs.bDrugSideEffect[ DRUG_TYPE_AGILITY ];
@@ -443,7 +443,7 @@ void HandleEndTurnDrugAdjustments( SOLDIERTYPE *pSoldier )
//////////////// WISDOM ////////////////
// wisdom we would normally have right now
INT8 wisdom = gMercProfiles[ pSoldier->ubProfile ].bWisdom - pSoldier->ubCriticalStatDamage[ DAMAGED_STAT_WISDOM ];
INT8 wisdom = gMercProfiles[ pSoldier->ubProfile ].bWisdom;// Madd: commenting out this part b/c it breaks doctoring! - pSoldier->ubCriticalStatDamage[ DAMAGED_STAT_WISDOM ];
INT8 wisdommodifier = pSoldier->drugs.bDrugEffect[ DRUG_TYPE_WISDOM ] - pSoldier->drugs.bDrugSideEffect[ DRUG_TYPE_WISDOM ];
+9 -29
View File
@@ -9282,51 +9282,31 @@ UINT32 GetInterfaceGraphicForItem( INVTYPE *pItem )
UINT16 GetTileGraphicForItem( INVTYPE *pItem )
{
UINT16 usIndex;
UINT8 ubGraphicType = pItem->ubGraphicType;
if ( pItem->ubClassIndex >= M900 )
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, String("GetTileGraphicForItem: item %d graphic %d",pItem->ubClassIndex, pItem->ubGraphicNum));
// CHECK SUBCLASS
if ( pItem->ubGraphicType == 0 )
if ( ubGraphicType == 0 )
{
GetTileIndexFromTypeSubIndex( GUNS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
}
else if ( pItem->ubGraphicType == 1 )
else if ( ubGraphicType == 1 )
{
GetTileIndexFromTypeSubIndex( P1ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
}
else if ( pItem->ubGraphicType == 2 )
else if ( ubGraphicType == 2 )
{
GetTileIndexFromTypeSubIndex( P2ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
}
else if ( pItem->ubGraphicType == 3 )
else if ( ubGraphicType == 3 )
{
GetTileIndexFromTypeSubIndex( P3ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
}
////MM: New item tileslots start here
//else if ( pItem->ubGraphicType == 4 )
//{
// GetTileIndexFromTypeSubIndex( P4ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
//}
//else if ( pItem->ubGraphicType == 5 )
//{
// GetTileIndexFromTypeSubIndex( P5ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
//}
//else if ( pItem->ubGraphicType == 6 )
//{
// GetTileIndexFromTypeSubIndex( P6ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
//}
//else if ( pItem->ubGraphicType == 7 )
//{
// GetTileIndexFromTypeSubIndex( P7ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
//}
//else if ( pItem->ubGraphicType == 8 )
//{
// GetTileIndexFromTypeSubIndex( P8ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
//}
//else
//{
// GetTileIndexFromTypeSubIndex( P9ITEMS, (INT16)(pItem->ubGraphicNum+1), &usIndex );
//}
//MM: New item tileslots start here
else
GetTileIndexFromTypeSubIndex( P4ITEMS + ubGraphicType - 4, (INT16)(pItem->ubGraphicNum+1), &usIndex );
if ( pItem->ubClassIndex >= M900 )
+17 -1
View File
@@ -3385,7 +3385,23 @@ BOOLEAN UIHandleItemPlacement( UINT8 ubHandPos, UINT16 usOldItemIndex, UINT16 us
{
if ( _KeyDown(CTRL) )
{
CleanUpStack( &( gpSMCurrentMerc->inv[ ubHandPos ] ), gpItemPointer );
if ( gpItemPointer->exists() && gpSMCurrentMerc->inv[ ubHandPos ].exists() )
{
if ( gpItemPointer->usItem == gpSMCurrentMerc->inv[ ubHandPos ].usItem )
CleanUpStack( &( gpSMCurrentMerc->inv[ ubHandPos ] ), gpItemPointer );
else // Madd: attach / merge object, merge only works on single objects for now
{
UINT8 cnt = gpSMCurrentMerc->inv[ ubHandPos ].ubNumberOfObjects;
if ( gpItemPointer->ubNumberOfObjects < cnt )
cnt = gpItemPointer->ubNumberOfObjects;
for (UINT8 i = 0; i<cnt;i++)
{
gpSMCurrentMerc->inv[ ubHandPos ].AttachObject(gpSMCurrentMerc,gpItemPointer,TRUE,i);
}
}
}
if ( gpItemPointer->exists() == false )
{
EndItemPointer( );
+2 -2
View File
@@ -3,7 +3,7 @@
#include "DEBUG.H"
#include "vobject.h"
#include "utilities.h"
#include "GameSettings.h"
#include <vfs/Core/vfs.h>
extern void WriteMessageToFile( const STR16 pString );
@@ -112,7 +112,7 @@ bool RegisterItemImages()
return false;
}
for (UINT8 ubLoop = 0; ubLoop < MAX_PITEMS; ubLoop++)
for (UINT8 ubLoop = 0; ubLoop < gGameExternalOptions.ubNumPItems; ubLoop++)
{
// LOAD INTERFACE ITEM PICTURES
if(!g_bUsePngItemImages)
+1 -1
View File
@@ -21,7 +21,7 @@ private:
extern bool g_bUsePngItemImages;
const UINT8 MAX_PITEMS = 3;
const UINT8 MAX_PITEMS = 20;
// old item image handles
extern UINT32 guiGUNSM;
extern UINT32 guiPITEMS[MAX_PITEMS];
+1 -1
View File
@@ -7899,7 +7899,7 @@ BOOLEAN OBJECTTYPE::RemoveAttachment( OBJECTTYPE* pAttachment, OBJECTTYPE * pNew
if(pNewObj != NULL)
*pNewObj = removedAttachment;
if(pAttachment->exists() && pAttachment->usItem == 0)
if(pAttachment->exists() && (pAttachment->usItem == 0 || pAttachment->usItem == removedAttachment.usItem ))
*pAttachment = removedAttachment;
if (pNewObj->exists() && Item[pNewObj->usItem].grenadelauncher )//UNDER_GLAUNCHER)
+2 -2
View File
@@ -1615,7 +1615,7 @@ void GetRTMousePositionInput( UINT32 *puiNewEvent )
// return;
// }
//
// for(uiType = 0; uiType < NUMBEROFTILETYPES; uiType++)
// for(uiType = 0; uiType < giNumberOfTileTypes; uiType++)
// {
// if( !gTilesets[ giCurrentTilesetID].TileSurfaceFilenames[ uiType ][0] )
// {
@@ -1629,7 +1629,7 @@ void GetRTMousePositionInput( UINT32 *puiNewEvent )
// }
// }
//
// if(uiType >= NUMBEROFTILETYPES)
// if(uiType >= giNumberOfTileTypes)
// return;*/
//
// if( GetMouseMapPos( &sGridNo ) )
+2 -2
View File
@@ -1839,7 +1839,7 @@ BOOLEAN DoesVehicleNeedAnyRepairs( INT32 iVehicleId )
}
INT8 RepairVehicle( INT32 iVehicleId, INT8 bRepairPtsLeft, BOOLEAN *pfNothingToRepair )
INT8 RepairVehicle( INT32 iVehicleId, UINT8 ubRepairPtsLeft, BOOLEAN *pfNothingToRepair )
{
SOLDIERTYPE *pVehicleSoldier = NULL;
INT8 bRepairPtsUsed = 0;
@@ -1869,7 +1869,7 @@ INT8 RepairVehicle( INT32 iVehicleId, INT8 bRepairPtsLeft, BOOLEAN *pfNothingToR
bOldLife = pVehicleSoldier->stats.bLife;
// Repair
pVehicleSoldier->stats.bLife += ( bRepairPtsLeft / VEHICLE_REPAIR_POINTS_DIVISOR );
pVehicleSoldier->stats.bLife += ( ubRepairPtsLeft / VEHICLE_REPAIR_POINTS_DIVISOR );
// Check
if ( pVehicleSoldier->stats.bLife > pVehicleSoldier->stats.bLifeMax )
+1 -1
View File
@@ -398,7 +398,7 @@ void SetUpArmorForVehicle( UINT8 ubID );
BOOLEAN DoesVehicleNeedAnyRepairs( INT32 iVehicleId );
// repair the vehicle
INT8 RepairVehicle( INT32 iVehicleId, INT8 bTotalPts, BOOLEAN *pfNothingToRepair );
INT8 RepairVehicle( INT32 iVehicleId, UINT8 ubTotalPts, BOOLEAN *pfNothingToRepair );
//Save all the vehicle information to the saved game file