From ea7e68297cda773554be4dd0048df438da89fec8 Mon Sep 17 00:00:00 2001 From: lalien Date: Wed, 7 Jun 2006 18:44:37 +0000 Subject: [PATCH] - Bobby Ray's tool tips for GL fixed - bug fix: CTD when shoot at soldier and see items afterwards (happens not always) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@189 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- GameVersion.cpp | 2 +- JA2.vcproj | 4 +-- Laptop/BobbyRGuns.cpp | 66 ++++++++++++++++++++++++++++++++++-- Tactical/Soldier Control.cpp | 11 +++--- 4 files changed, 72 insertions(+), 11 deletions(-) diff --git a/GameVersion.cpp b/GameVersion.cpp index 073429d7..8ba65bf4 100644 --- a/GameVersion.cpp +++ b/GameVersion.cpp @@ -23,7 +23,7 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" }; #else //RELEASE BUILD VERSION - INT16 zVersionLabel[256] = { L"Release v1.13.187" }; + INT16 zVersionLabel[256] = { L"Release v1.13.189" }; #endif diff --git a/JA2.vcproj b/JA2.vcproj index 46502553..92316950 100644 --- a/JA2.vcproj +++ b/JA2.vcproj @@ -43,7 +43,7 @@ 0) + // { + // swprintf( (wchar_t *)apStr2, L" / %d", ubAttackAPs + CalcAPsToBurst( DEFAULT_APS, pObject ) ); + // wcscat( apStr, apStr2 ); + // } + // else + // { + // wcscat( apStr, L" / -" ); + // } + + // if (GetAutofireShotsPerFiveAPs(pObject) > 0) + // { + // swprintf( (wchar_t *)apStr2, L" / %d", ubAttackAPs + CalcAPsToAutofire( DEFAULT_APS, pObject, 3 ) ); + // wcscat( apStr, apStr2 ); + // } + // else + // { + // wcscat( apStr, L" / -" ); + // } + //} + //else + //{ + // swprintf( (wchar_t *)apStr, L"" ); + //} + + //Info for weapons + //if ( Item[ pItemNumbers[ i ] ].usItemClass == IC_GUN ) + { + UINT16 gunDamage = (UINT16)( Weapon[ pItemNumbers[ i ] ].ubImpact + ( (double) Weapon[ pItemNumbers[ i ] ].ubImpact / 100) * gGameExternalOptions.ubGunDamageMultiplier ); + + swprintf( (wchar_t *)pStr, L"%s (%s)\n%s %d\n%s %d\n%s %d\n%s %s\n%s %1.1f %s", + ItemNames[ pItemNumbers[ i ] ], + AmmoCaliber[ Weapon[ pItemNumbers[ i ] ].ubCalibre ], + gWeaponStatsDesc[ 9 ], //Accuracy String + Weapon[ pItemNumbers[ i ] ].bAccuracy, //Accuracy + gWeaponStatsDesc[ 11 ], //Damage String + gunDamage, //Gun damage + gWeaponStatsDesc[ 10 ], //Range String + Weapon[ pItemNumbers[ i ] ].usRange, //Gun Range + gWeaponStatsDesc[ 5 ], //AP String + //apStr, //AP's + L"- / - / -", + gWeaponStatsDesc[ 12 ], //Weight String + fWeight, //Weight + GetWeightUnitString() //Weight units + ); + } + break; + + + case IC_LAUNCHER: //Calculate AP's //INT16 apStr[20]; @@ -1364,13 +1425,12 @@ void CreateMouseRegionForBigImage( UINT16 usPosY, UINT8 ubCount, INT16 *pItemNum //} //Info for weapons - if ( Item[ pItemNumbers[ i ] ].usItemClass == IC_GUN ) + //if ( Item[ pItemNumbers[ i ] ].usItemClass == IC_GUN ) { UINT16 gunDamage = (UINT16)( Weapon[ pItemNumbers[ i ] ].ubImpact + ( (double) Weapon[ pItemNumbers[ i ] ].ubImpact / 100) * gGameExternalOptions.ubGunDamageMultiplier ); - swprintf( (wchar_t *)pStr, L"%s (%s)\n%s %d\n%s %d\n%s %d\n%s %s\n%s %1.1f %s", + swprintf( (wchar_t *)pStr, L"%s\n%s %d\n%s %d\n%s %d\n%s %s\n%s %1.1f %s", ItemNames[ pItemNumbers[ i ] ], - AmmoCaliber[ Weapon[ pItemNumbers[ i ] ].ubCalibre ], gWeaponStatsDesc[ 9 ], //Accuracy String Weapon[ pItemNumbers[ i ] ].bAccuracy, //Accuracy gWeaponStatsDesc[ 11 ], //Damage String diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp index 467ff800..af05e2d2 100644 --- a/Tactical/Soldier Control.cpp +++ b/Tactical/Soldier Control.cpp @@ -9789,7 +9789,7 @@ void SelectMoveAnimationFromStance( SOLDIERTYPE *pSoldier ) void GetActualSoldierAnimDims( SOLDIERTYPE *pSoldier, INT16 *psHeight, INT16 *psWidth ) { - UINT16 usAnimSurface; + UINT16 usAnimSurface; ETRLEObject *pTrav; usAnimSurface = GetSoldierAnimationSurface( pSoldier, pSoldier->usAnimState ); @@ -9802,12 +9802,12 @@ void GetActualSoldierAnimDims( SOLDIERTYPE *pSoldier, INT16 *psHeight, INT16 *ps return; } - if ( gAnimSurfaceDatabase[ usAnimSurface ].hVideoObject == NULL ) - { + if ( gAnimSurfaceDatabase[ usAnimSurface ].hVideoObject == NULL ) + { *psHeight = (INT16)5; *psWidth = (INT16)5; return; - } + } // OK, noodle here on what we should do... If we take each frame, it will be different slightly // depending on the frame and the value returned here will vary thusly. However, for the @@ -9815,7 +9815,8 @@ void GetActualSoldierAnimDims( SOLDIERTYPE *pSoldier, INT16 *psHeight, INT16 *ps if ( pSoldier->usAniFrame >= gAnimSurfaceDatabase[ usAnimSurface ].hVideoObject->usNumberOfObjects ) { - int i = 0; + //int i = 0; + return; } pTrav = &(gAnimSurfaceDatabase[ usAnimSurface ].hVideoObject->pETRLEObject[ pSoldier->usAniFrame ] );