From 1b14c7391cd939257b4b8f63803498b765249bed Mon Sep 17 00:00:00 2001 From: MaddMugsy Date: Thu, 29 Jun 2006 16:50:01 +0000 Subject: [PATCH] -removed ap cost and bullet from interface screens when gun has no semi auto fire -made a new weapon con: "No Semi Auto" git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@311 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- GameVersion.cpp | 4 +-- Tactical/Interface Items.cpp | 57 ++++++++++++++++++++++++------------ Utils/Text.h | 3 +- Utils/_EnglishText.cpp | 1 + Utils/_GermanText.cpp | 3 ++ Utils/_RussianText.cpp | 1 + 6 files changed, 47 insertions(+), 22 deletions(-) diff --git a/GameVersion.cpp b/GameVersion.cpp index 1bb032ec9..38a6d642e 100644 --- a/GameVersion.cpp +++ b/GameVersion.cpp @@ -23,12 +23,12 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" }; #else //RELEASE BUILD VERSION - INT16 zVersionLabel[256] = { L"Release v1.13.309" }; + INT16 zVersionLabel[256] = { L"Release v1.13.312" }; #endif -INT8 czVersionNumber[16] = { "Build 06.06.28" }; +INT8 czVersionNumber[16] = { "Build 06.06.29" }; INT16 zTrackingNumber[16] = { L"Z" }; diff --git a/Tactical/Interface Items.cpp b/Tactical/Interface Items.cpp index 8b53e4e58..3f50690d4 100644 --- a/Tactical/Interface Items.cpp +++ b/Tactical/Interface Items.cpp @@ -731,6 +731,15 @@ void GenerateConsString( UINT16 * zItemCons, OBJECTTYPE * pObject, UINT32 uiPixL } } + if ( Weapon[usItem].NoSemiAuto ) + { + zTemp = Message[STR_NO_SEMI_AUTO]; + if ( ! AttemptToAddSubstring( zItemCons, zTemp, &uiStringLength, uiPixLimit ) ) + { + return; + } + } + // calculate the weight of the item plus ammunition but not including any attachments ubWeight = Item[ usItem ].ubWeight; if (Item[ usItem ].usItemClass == IC_GUN) @@ -3119,7 +3128,8 @@ void RenderItemDescriptionBox( ) if ( Item[ gpItemDescObject->usItem ].usItemClass & IC_GUN || Item[ gpItemDescObject->usItem ].usItemClass & IC_LAUNCHER ) { // display bullets for ROF - BltVideoObjectFromIndex( guiSAVEBUFFER, guiBullet, 0, MAP_BULLET_SING_X, MAP_BULLET_SING_Y, VO_BLT_SRCTRANSPARENCY, NULL ); + if ( !Weapon[gpItemDescObject->usItem].NoSemiAuto ) + BltVideoObjectFromIndex( guiSAVEBUFFER, guiBullet, 0, MAP_BULLET_SING_X, MAP_BULLET_SING_Y, VO_BLT_SRCTRANSPARENCY, NULL ); if (GetShotsPerBurst(gpItemDescObject)> 0) { @@ -3254,7 +3264,8 @@ void RenderItemDescriptionBox( ) if ( Item[ gpItemDescObject->usItem ].usItemClass & IC_GUN || Item[ gpItemDescObject->usItem ].usItemClass & IC_LAUNCHER) { // equals sign - mprintf( gMapWeaponStats[ 7 ].sX + gsInvDescX, gMapWeaponStats[ 7 ].sY + gsInvDescY, L"%s", gWeaponStatsDesc[ 7 ] ); + if ( !Weapon[gpItemDescObject->usItem].NoSemiAuto ) + mprintf( gMapWeaponStats[ 7 ].sX + gsInvDescX, gMapWeaponStats[ 7 ].sY + gsInvDescY, L"%s", gWeaponStatsDesc[ 7 ] ); } mprintf( gMapWeaponStats[ 1 ].sX + gsInvDescX, gMapWeaponStats[ 1 ].sY + gsInvDescY, L"%s", gWeaponStatsDesc[ 1 ] ); @@ -3323,21 +3334,24 @@ void RenderItemDescriptionBox( ) mprintf( usX, usY, pStr ); } - ubAttackAPs = BaseAPsToShootOrStab( DEFAULT_APS, DEFAULT_AIMSKILL, gpItemDescObject ); + ubAttackAPs = BaseAPsToShootOrStab( DEFAULT_APS, DEFAULT_AIMSKILL, gpItemDescObject ); - if (ubAttackAPs <= EXCEPTIONAL_AP_COST) - { - SetFontForeground( ITEMDESC_FONTHIGHLIGHT ); - } - else - { - SetFontForeground( 5 ); - } + if (ubAttackAPs <= EXCEPTIONAL_AP_COST) + { + SetFontForeground( ITEMDESC_FONTHIGHLIGHT ); + } + else + { + SetFontForeground( 5 ); + } //Ap's - swprintf( (wchar_t *)pStr, L"%2d", ubAttackAPs ); - FindFontRightCoordinates( (INT16)(gMapWeaponStats[ 5 ].sX + gsInvDescX + gMapWeaponStats[ 5 ].sValDx), (INT16)(gMapWeaponStats[ 5 ].sY + gsInvDescY ), ITEM_STATS_WIDTH ,ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY); - mprintf( usX, usY, pStr ); + if ( !Weapon[gpItemDescObject->usItem].NoSemiAuto ) + { + swprintf( (wchar_t *)pStr, L"%2d", ubAttackAPs ); + FindFontRightCoordinates( (INT16)(gMapWeaponStats[ 5 ].sX + gsInvDescX + gMapWeaponStats[ 5 ].sValDx), (INT16)(gMapWeaponStats[ 5 ].sY + gsInvDescY ), ITEM_STATS_WIDTH ,ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY); + mprintf( usX, usY, pStr ); + } if (GetShotsPerBurst(gpItemDescObject) > 0) { @@ -3593,7 +3607,8 @@ void RenderItemDescriptionBox( ) if ( Item[ gpItemDescObject->usItem ].usItemClass & IC_GUN || Item[ gpItemDescObject->usItem ].usItemClass & IC_LAUNCHER ) { // display bullets for ROF - BltVideoObjectFromIndex( guiSAVEBUFFER, guiBullet, 0, BULLET_SING_X, BULLET_SING_Y, VO_BLT_SRCTRANSPARENCY, NULL ); + if ( !Weapon[gpItemDescObject->usItem].NoSemiAuto ) + BltVideoObjectFromIndex( guiSAVEBUFFER, guiBullet, 0, BULLET_SING_X, BULLET_SING_Y, VO_BLT_SRCTRANSPARENCY, NULL ); if (GetShotsPerBurst(gpItemDescObject) > 0) { @@ -3720,7 +3735,8 @@ void RenderItemDescriptionBox( ) mprintf( gWeaponStats[ 5 ].sX + gsInvDescX, gWeaponStats[ 5 ].sY + gsInvDescY, L"%s", gWeaponStatsDesc[ 5 ] ); if ( Item[ gpItemDescObject->usItem ].usItemClass & IC_GUN || Item[ gpItemDescObject->usItem ].usItemClass & IC_LAUNCHER ) { - mprintf( gWeaponStats[ 7 ].sX + gsInvDescX, gWeaponStats[ 7 ].sY + gsInvDescY, L"%s", gWeaponStatsDesc[ 7 ] ); + if ( !Weapon[gpItemDescObject->usItem].NoSemiAuto ) + mprintf( gWeaponStats[ 7 ].sX + gsInvDescX, gWeaponStats[ 7 ].sY + gsInvDescY, L"%s", gWeaponStatsDesc[ 7 ] ); } mprintf( gWeaponStats[ 1 ].sX + gsInvDescX, gWeaponStats[ 1 ].sY + gsInvDescY, L"%s", gWeaponStatsDesc[ 1 ] ); @@ -3794,9 +3810,12 @@ void RenderItemDescriptionBox( ) SetFontForeground( 5 ); } - swprintf( (wchar_t *)pStr, L"%2d", ubAttackAPs ); - FindFontRightCoordinates( (INT16)(gWeaponStats[ 5 ].sX + gsInvDescX + gWeaponStats[ 5 ].sValDx), (INT16)(gWeaponStats[ 5 ].sY + gsInvDescY ), ITEM_STATS_WIDTH, ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY); - mprintf( usX, usY, pStr ); + if ( !Weapon[gpItemDescObject->usItem].NoSemiAuto ) + { + swprintf( (wchar_t *)pStr, L"%2d", ubAttackAPs ); + FindFontRightCoordinates( (INT16)(gWeaponStats[ 5 ].sX + gsInvDescX + gWeaponStats[ 5 ].sValDx), (INT16)(gWeaponStats[ 5 ].sY + gsInvDescY ), ITEM_STATS_WIDTH, ITEM_STATS_HEIGHT ,pStr, BLOCKFONT2, &usX, &usY); + mprintf( usX, usY, pStr ); + } if (GetShotsPerBurst(gpItemDescObject)> 0) { diff --git a/Utils/Text.h b/Utils/Text.h index e203d414b..34235baa4 100644 --- a/Utils/Text.h +++ b/Utils/Text.h @@ -327,7 +327,8 @@ enum STR_AUTOFIRE, STR_NO_AUTOFIRE, STR_ACCURATE, - STR_INACCURATE + STR_INACCURATE, + STR_NO_SEMI_AUTO }; #define LARGE_STRING_LENGTH 200 diff --git a/Utils/_EnglishText.cpp b/Utils/_EnglishText.cpp index bfb346a17..662d57b3a 100644 --- a/Utils/_EnglishText.cpp +++ b/Utils/_EnglishText.cpp @@ -299,6 +299,7 @@ UINT16 Message[][STRING_LENGTH] = L"no full auto", L"accurate", L"inaccurate", + L"no semi auto", }; diff --git a/Utils/_GermanText.cpp b/Utils/_GermanText.cpp index c9f834e61..83670ec6f 100644 --- a/Utils/_GermanText.cpp +++ b/Utils/_GermanText.cpp @@ -290,6 +290,9 @@ UINT16 Message[][STRING_LENGTH] = L"Spielzug Bloodcats", L"automatic", L"no full auto", + L"accurate", + L"inaccurate", + L"no semi auto", }; STR16 pTownNames[] = diff --git a/Utils/_RussianText.cpp b/Utils/_RussianText.cpp index a9abf9aba..74091225b 100644 --- a/Utils/_RussianText.cpp +++ b/Utils/_RussianText.cpp @@ -291,6 +291,7 @@ UINT16 Message[][STRING_LENGTH] = L"no full auto", L"accurate", L"inaccurate", + L"no semi auto", };