QOL change: show additional ammo stats at bobby ray's website (by rftr).

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9176 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2021-10-14 06:40:28 +00:00
parent b689b51962
commit 9f787dd73d
10 changed files with 88 additions and 0 deletions
+61
View File
@@ -338,6 +338,9 @@ UINT16 DisplayExplosiveDamage(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight
UINT16 DisplayExplosiveStunDamage(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
UINT16 DisplayProtection(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
UINT16 DisplayCamo(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
UINT16 DisplayAmmoArmourPierceModifier(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
UINT16 DisplayAmmoDamageModifier(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
UINT16 DisplayAmmoProjectileCount(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
void CreateMouseRegionForBigImage(UINT16 usPosY, UINT8 ubCount, INT16 *pItemNumbers );
// HEADROCK HAM 4: Now can purchase ALL items available.
void PurchaseBobbyRayItem(UINT16 usItemNumber, BOOLEAN fAllItems );
@@ -1869,6 +1872,11 @@ BOOLEAN DisplayAmmoInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT16
//Magazine
usHeight = DisplayMagazine(usHeight, usIndex, usFontHeight);
// rftr: display ammo stats
usHeight = DisplayAmmoArmourPierceModifier(usHeight, usIndex, usFontHeight);
usHeight = DisplayAmmoDamageModifier(usHeight, usIndex, usFontHeight);
usHeight = DisplayAmmoProjectileCount(usHeight, usIndex, usFontHeight);
//Display the Cost and the qty bought and on hand
usHeight = DisplayCostAndQty(usTextPosY, usIndex, usFontHeight, usBobbyIndex, fUsed);
@@ -2331,6 +2339,59 @@ UINT16 DisplayCamo(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight)
return(usPosY);
}
UINT16 DisplayAmmoArmourPierceModifier(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight)
{
CHAR16 sTemp[10];
DrawTextToScreen(BobbyRText[BOBBYR_GUNS_ARMOUR_PIERCING_MODIFIER], BOBBYR_ITEM_WEIGHT_TEXT_X, (UINT16)usPosY, 0, BOBBYR_ITEM_DESC_TEXT_FONT, BOBBYR_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
// armour piercing modifier
const FLOAT armourImpactReductionModifier = (FLOAT)AmmoTypes[Magazine[Item[usIndex].ubClassIndex].ubAmmoType].armourImpactReductionMultiplier / (FLOAT)AmmoTypes[Magazine[Item[usIndex].ubClassIndex].ubAmmoType].armourImpactReductionDivisor;
swprintf(sTemp, L"%1.2f", armourImpactReductionModifier);
UINT8 color = BOBBYR_ITEM_DESC_TEXT_COLOR_ALT;
if (armourImpactReductionModifier > 1.0f)
color = FONT_MCOLOR_DKRED;
else if (armourImpactReductionModifier < 1.0f)
color = FONT_MCOLOR_LTGREEN;
DrawTextToScreen(sTemp, BOBBYR_ITEM_WEIGHT_NUM_X, (UINT16)usPosY, BOBBYR_ITEM_WEIGHT_NUM_WIDTH, BOBBYR_ITEM_DESC_TEXT_FONT, color, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
usPosY += usFontHeight + 2;
return(usPosY);
}
UINT16 DisplayAmmoDamageModifier(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight)
{
CHAR16 sTemp[10];
DrawTextToScreen(BobbyRText[BOBBYR_GUNS_BULLET_TUMBLE_MODIFIER], BOBBYR_ITEM_WEIGHT_TEXT_X, (UINT16)usPosY, 0, BOBBYR_ITEM_DESC_TEXT_FONT, BOBBYR_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
// body damage modifier (bullet tumble)
const FLOAT afterArmourDamageModifier = (FLOAT)AmmoTypes[Magazine[Item[usIndex].ubClassIndex].ubAmmoType].afterArmourDamageMultiplier / (FLOAT)AmmoTypes[Magazine[Item[usIndex].ubClassIndex].ubAmmoType].afterArmourDamageDivisor;
swprintf(sTemp, L"%1.2f", afterArmourDamageModifier);
UINT8 color = BOBBYR_ITEM_DESC_TEXT_COLOR_ALT;
if (afterArmourDamageModifier > 1.0f)
color = FONT_MCOLOR_LTGREEN;
else if (afterArmourDamageModifier < 1.0f)
color = FONT_MCOLOR_DKRED;
DrawTextToScreen(sTemp, BOBBYR_ITEM_WEIGHT_NUM_X, (UINT16)usPosY, BOBBYR_ITEM_WEIGHT_NUM_WIDTH, BOBBYR_ITEM_DESC_TEXT_FONT, color, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
usPosY += usFontHeight + 2;
return(usPosY);
}
UINT16 DisplayAmmoProjectileCount(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight)
{
const UINT8 numProjectiles = AmmoTypes[Magazine[Item[usIndex].ubClassIndex].ubAmmoType].numberOfBullets;
if (numProjectiles == 1)
return(usPosY);
CHAR16 sTemp[4];
DrawTextToScreen(BobbyRText[BOBBYR_GUNS_NUM_PROJECTILES], BOBBYR_ITEM_WEIGHT_TEXT_X, (UINT16)usPosY, 0, BOBBYR_ITEM_DESC_TEXT_FONT, BOBBYR_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
swprintf(sTemp, L"%d", numProjectiles);
DrawTextToScreen(sTemp, BOBBYR_ITEM_WEIGHT_NUM_X, (UINT16)usPosY, BOBBYR_ITEM_WEIGHT_NUM_WIDTH, BOBBYR_ITEM_DESC_TEXT_FONT, BOBBYR_ITEM_DESC_TEXT_COLOR_ALT, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
usPosY += usFontHeight + 2;
return(usPosY);
}
// CHRISL: New display function for LBE Gear
UINT16 DisplayLBEInfo(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight)
{
+3
View File
@@ -1499,6 +1499,9 @@ enum
BOBBYR_GUNS_STUN,
BOBBYR_GUNS_PROTECTION,
BOBBYR_GUNS_CAMO,
BOBBYR_GUNS_ARMOUR_PIERCING_MODIFIER,
BOBBYR_GUNS_BULLET_TUMBLE_MODIFIER,
BOBBYR_GUNS_NUM_PROJECTILES,
BOBBYR_GUNS_COST,
BOBBYR_GUNS_IN_STOCK,
BOBBYR_GUNS_QTY_ON_ORDER,
+3
View File
@@ -5731,6 +5731,9 @@ STR16 BobbyRText[] =
L"晕眩: ", //L"Stun:", // Weapon's Stun Damage
L"防护: ", //L"Protect:", // Armour's Protection
L"伪装: ", //L"Camo:", // Armour's Camouflage
L"Armor Pen:", // Ammo's Armour Piercing modifier (see AmmoTypes.xml - armourImpactReduction)
L"Dmg Mod:", // Ammo's Bullet Tumble modifier (see AmmoTypes.xml - afterArmourDamage)
L"Projectiles:", // Ammo's bullet count (for buckshot) (see AmmoTypes.xml - numberOfBullets)
L"单价: ", //"Cost:", // Cost of the item
L"库存: ", //"In stock:", // The number of items still in the store's inventory
L"购买量: ", //"Qty on Order:", // The number of items on order
+3
View File
@@ -5720,6 +5720,9 @@ STR16 BobbyRText[] =
L"Stun:", // Weapon's Stun Damage
L"Protect:", // Armour's Protection
L"Camo:", // Armour's Camouflage
L"Armor Pen:", // Ammo's Armour Piercing modifier (see AmmoTypes.xml - armourImpactReduction)
L"Dmg Mod:", // Ammo's Bullet Tumble modifier (see AmmoTypes.xml - afterArmourDamage)
L"Projectiles:", // Ammo's bullet count (for buckshot) (see AmmoTypes.xml - numberOfBullets)
L"Kost:", // Cost of the item
L"Aanwezig:", // The number of items still in the store's inventory
L"# Besteld:", // The number of items on order
+3
View File
@@ -5731,6 +5731,9 @@ STR16 BobbyRText[] =
L"Stun:", // Weapon's Stun Damage
L"Protect:", // Armour's Protection
L"Camo:", // Armour's Camouflage
L"Armor Pen:", // Ammo's Armour Piercing modifier (see AmmoTypes.xml - armourImpactReduction)
L"Dmg Mod:", // Ammo's Bullet Tumble modifier (see AmmoTypes.xml - afterArmourDamage)
L"Projectiles:", // Ammo's bullet count (for buckshot) (see AmmoTypes.xml - numberOfBullets)
L"Cost:", // Cost of the item
L"In stock:", // The number of items still in the store's inventory
L"Qty on Order:", // The number of items on order
+3
View File
@@ -5724,6 +5724,9 @@ STR16 BobbyRText[] =
L"Étourdis. :", // Weapon's Stun Damage
L"Prot. :", // Armour's Protection
L"Cam. :", // Armour's Camouflage
L"Armor Pen:", // Ammo's Armour Piercing modifier (see AmmoTypes.xml - armourImpactReduction)
L"Dmg Mod:", // Ammo's Bullet Tumble modifier (see AmmoTypes.xml - afterArmourDamage)
L"Projectiles:", // Ammo's bullet count (for buckshot) (see AmmoTypes.xml - numberOfBullets)
L"Prix :", // Cost of the item
L"Stock :", // The number of items still in the store's inventory
L"Quantité :", // The number of items on order
+3
View File
@@ -5641,6 +5641,9 @@ STR16 BobbyRText[] =
L"Bet.:", // Weapon's Stun Damage
L"Rüstung:", // Armour's Protection
L"Tarn.:", // Armour's Camouflage
L"Armor Pen:", // Ammo's Armour Piercing modifier (see AmmoTypes.xml - armourImpactReduction)
L"Dmg Mod:", // Ammo's Bullet Tumble modifier (see AmmoTypes.xml - afterArmourDamage)
L"Projectiles:", // Ammo's bullet count (for buckshot) (see AmmoTypes.xml - numberOfBullets)
L"Preis:", // Cost of the item
L"Vorrätig:", // The number of items still in the store's inventory
L"Bestellt:", // The number of items on order
+3
View File
@@ -5706,6 +5706,9 @@ STR16 BobbyRText[] =
L"Stun:", // Weapon's Stun Damage
L"Protect:", // Armour's Protection
L"Trav.:", // Armour's Camouflage
L"Armor Pen:", // Ammo's Armour Piercing modifier (see AmmoTypes.xml - armourImpactReduction)
L"Dmg Mod:", // Ammo's Bullet Tumble modifier (see AmmoTypes.xml - afterArmourDamage)
L"Projectiles:", // Ammo's bullet count (for buckshot) (see AmmoTypes.xml - numberOfBullets)
L"Costo:", // Cost of the item
L"Inventario:", // The number of items still in the store's inventory
L"Num. ordine:", // The number of items on order
+3
View File
@@ -5720,6 +5720,9 @@ STR16 BobbyRText[] =
L"Ogłuszenie:", // Weapon's Stun Damage
L"Ochrona:", // Armour's Protection
L"Kamuf.:", // Armour's Camouflage
L"Armor Pen:", // Ammo's Armour Piercing modifier (see AmmoTypes.xml - armourImpactReduction)
L"Dmg Mod:", // Ammo's Bullet Tumble modifier (see AmmoTypes.xml - afterArmourDamage)
L"Projectiles:", // Ammo's bullet count (for buckshot) (see AmmoTypes.xml - numberOfBullets)
L"Koszt:", // Cost of the item
L"Na stanie:", // The number of items still in the store's inventory
L"Ilość na zamów.:", // The number of items on order
+3
View File
@@ -5726,6 +5726,9 @@ STR16 BobbyRText[] =
L"Оглушение:", // Weapon's Stun Damage
L"Броня:", // Armour's Protection
L"Камуф.:", // Armour's Camouflage
L"Armor Pen:", // Ammo's Armour Piercing modifier (see AmmoTypes.xml - armourImpactReduction)
L"Dmg Mod:", // Ammo's Bullet Tumble modifier (see AmmoTypes.xml - afterArmourDamage)
L"Projectiles:", // Ammo's bullet count (for buckshot) (see AmmoTypes.xml - numberOfBullets)
L"Цена:", // Cost of the item
L"Склад:", // The number of items still in the store's inventory
L"Штук в заказе:", // The number of items on order