changeset 365:0f35f908547f

fixed missing dagger
author Gloval
date Fri, 22 Feb 2013 01:20:30 +0400
parents 3abebb74fd09
children 85edec9da96b f0f66f690777
files Items.cpp Items.h mm7_1.cpp mm7_5.cpp
diffstat 4 files changed, 41 insertions(+), 45 deletions(-) [+]
line wrap: on
line diff
--- a/Items.cpp	Fri Feb 22 00:52:35 2013 +0400
+++ b/Items.cpp	Fri Feb 22 01:20:30 2013 +0400
@@ -493,82 +493,82 @@
 					{
 					if ( !_strcmpi(test_string, "weapon") )
 						{
-						pItems[item_counter].uEquipType = 0;
+						pItems[item_counter].uEquipType = EQUIP_ONE_OR_TWO_HANDS;
 						break;
 						}
 					if ( !_strcmpi(test_string, "weapon2") )
 						{
-						pItems[item_counter].uEquipType = 1;
+						pItems[item_counter].uEquipType = EQUIP_TWO_HANDED;
 						break;
 						}
 					if ( !_strcmpi(test_string, "weapon1or2") )
 						{
-						pItems[item_counter].uEquipType = 0;
+						pItems[item_counter].uEquipType = EQUIP_ONE_OR_TWO_HANDS;
 						break;
 						}
 					if ( !(_strcmpi(test_string, "missile")&&_strcmpi(test_string, "bow")))
 						{
-						pItems[item_counter].uEquipType = 2;
+						pItems[item_counter].uEquipType = EQUIP_BOW;
 						break;
 						}
 					if ( !_strcmpi(test_string, "armor") )
 						{
-						pItems[item_counter].uEquipType = 3;
+						pItems[item_counter].uEquipType = EQUIP_ARMOUR;
 						break;
 						}
 					if ( !_strcmpi(test_string, "shield") )
 						{
-						pItems[item_counter].uEquipType = 4;
+						pItems[item_counter].uEquipType = EQUIP_SHIELD;
 						break;
 						}
 					if ( !_strcmpi(test_string, "helm") )
 						{
-						pItems[item_counter].uEquipType = 5;
+						pItems[item_counter].uEquipType = EQUIP_HELMET;
 						break;
 						}
 					if ( !_strcmpi(test_string, "belt") )
 						{
-						pItems[item_counter].uEquipType = 6;
+						pItems[item_counter].uEquipType = EQUIP_BELT;
 						break;
 						}
 					if ( !_strcmpi(test_string, "cloak") )
 						{
-						pItems[item_counter].uEquipType = 7;
+						pItems[item_counter].uEquipType = EQUIP_CLOAK;
 						break;
 						}
 					if ( !_strcmpi(test_string, "gauntlets") )
 						{
-						pItems[item_counter].uEquipType = 8;
+						pItems[item_counter].uEquipType = EQUIP_GAUNTLETS;
 						break;
 						}
 					if ( !_strcmpi(test_string, "boots") )
 						{
-						pItems[item_counter].uEquipType = 9;
+						pItems[item_counter].uEquipType = EQUIP_BOOTS;
 						break;
 						}
 					if ( !_strcmpi(test_string, "ring") )
 						{
-						pItems[item_counter].uEquipType = 10;
+						pItems[item_counter].uEquipType = EQUIP_RING;
 						break;
 						}
 					if ( !_strcmpi(test_string, "amulet") )
 						{
-						pItems[item_counter].uEquipType = 11;
+						pItems[item_counter].uEquipType = EQUIP_AMULET;
 						break;
 						}
 					if ( !_strcmpi(test_string, "weaponw") )
 						{
-						pItems[item_counter].uEquipType = 12;
+						pItems[item_counter].uEquipType = EQUIP_WAND;
 						break;
 						}
 					if ( !(_strcmpi(test_string, "herb")&&_strcmpi(test_string, "reagent")))
 						{
-						pItems[item_counter].uEquipType = 13;
+						pItems[item_counter].uEquipType = EQUIP_REAGENT;
 						break;
 						}
 					if ( !_strcmpi(test_string, "bottle") )
 						{
-						pItems[item_counter].uEquipType = 14;
+						pItems[item_counter].uEquipType = EQUIP_POTION;
 						break;
 						}
 					if ( !_strcmpi(test_string, "sscroll") )
@@ -578,7 +578,7 @@
 						}
 					if ( !_strcmpi(test_string, "book") )
 						{
-						pItems[item_counter].uEquipType = 16;
+						pItems[item_counter].uEquipType = EQUIP_BOOK;
 						break;
 						}
 					if ( !_strcmpi(test_string, "mscroll") )
@@ -588,15 +588,15 @@
 						}
 					if ( !_strcmpi(test_string, "gold") )
 						{
-						pItems[item_counter].uEquipType = 18;
+						pItems[item_counter].uEquipType = EQUIP_GOLD;
 						break;
 						}
 					if ( !_strcmpi(test_string, "gem") )
 						{
-						pItems[item_counter].uEquipType = 19;
+						pItems[item_counter].uEquipType = EQUIP_GEM;
 						break;
 						}
-					pItems[item_counter].uEquipType = 20;
+					pItems[item_counter].uEquipType = EQUIP_NONE;
 					break;
 					}
 				case 5: //Skill Group
--- a/Items.h	Fri Feb 22 00:52:35 2013 +0400
+++ b/Items.h	Fri Feb 22 01:20:30 2013 +0400
@@ -63,26 +63,27 @@
 /*  331 */
 enum ITEM_EQUIP_TYPE
 {
-  EQUIP_ONE_OR_TWO_HANDS = 0x0,
-  EQUIP_TWO_HANDED = 0x1,
-  EQUIP_BOW = 0x2,
-  EQUIP_ARMOUR = 0x3,
-  EQUIP_SHIELD = 0x4,
-  EQUIP_HELMET = 0x5,
-  EQUIP_BELT = 0x6,
-  EQUIP_CLOAK = 0x7,
+  EQUIP_ONE_OR_TWO_HANDS = 0,
+  EQUIP_TWO_HANDED       = 1,
+  EQUIP_BOW              = 2,
+  EQUIP_ARMOUR           = 3,
+  EQUIP_SHIELD           = 4,
+  EQUIP_HELMET           = 5,
+  EQUIP_BELT             = 6,
+  EQUIP_CLOAK            = 7,
   EQUIP_GAUNTLETS = 0x8,
   EQUIP_BOOTS = 0x9,
-  EQUIP_RING = 0xA,
-  EQUIP_AMULET = 0xB,
+  EQUIP_RING = 10,
+  EQUIP_AMULET = 11,
   EQUIP_WAND = 12,
-  EQUIP_REAGENT = 0xD,
-  EQUIP_POTION = 0xE,
+  EQUIP_REAGENT = 13,
+  EQUIP_POTION = 14,
   EQUIP_F = 0xF,
-  EQUIP_BOOK = 0x10,
-  EQUIP_11 = 0x11,
+  EQUIP_BOOK = 16,
+  EQUIP_11 = 17,
   EQUIP_GOLD = 18,
-  EQUIP_GEM = 0x13,
+  EQUIP_GEM = 19,
+  EQUIP_NONE = 20
 };
 
 
@@ -140,8 +141,8 @@
 	unsigned int uValue;  //10 14
 	unsigned __int16 uSpriteID; //14 18
 	__int16 field_1A; //16 
-	unsigned __int16 uEquipX; //18  1c
-	unsigned __int16 uEquipY; //1a  1e
+	signed __int16 uEquipX; //18  1c
+	signed __int16 uEquipY; //1a  1e
 	unsigned __int8 uEquipType; //1c 20
 	unsigned __int8 uSkillType; //1d 21
 	unsigned __int8 uDamageDice; //1e 22
--- a/mm7_1.cpp	Fri Feb 22 00:52:35 2013 +0400
+++ b/mm7_1.cpp	Fri Feb 22 01:20:30 2013 +0400
@@ -2878,12 +2878,7 @@
   v106.uFlags = 0;
   pRenderer->Clip_v2(0, 0, 0x27Fu, 0x1DFu);
   pRenderer->Line2D(v106.uViewportX - 1, v106.uViewportY - 1, v106.uViewportX + 129, v106.uViewportY - 1, a5);
-  pRenderer->Line2D(
-    v106.uViewportX + 129,
-    v106.uViewportY - 1,
-    v106.uViewportX + 129,
-    v106.uViewportW + 1,
-    a5);
+  pRenderer->Line2D( v106.uViewportX + 129,  v106.uViewportY - 1,  v106.uViewportX + 129,    v106.uViewportW + 1,    a5);
   pRenderer->Line2D(v106.uViewportX + 129, v106.uViewportW + 1, v106.uViewportX - 1, v106.uViewportW + 1, a5);
   pRenderer->Line2D(v106.uViewportX - 1, v106.uViewportW + 1, v106.uViewportX - 1, v106.uViewportY - 1, a5);
   if ( pRenderer->pRenderD3D )
--- a/mm7_5.cpp	Fri Feb 22 00:52:35 2013 +0400
+++ b/mm7_5.cpp	Fri Feb 22 01:20:30 2013 +0400
@@ -8781,13 +8781,13 @@
   {
     v229 = pPlayer->pEquipment.uMainHand;
     v9 = (int)&pPlayer->pInventoryItems[v8-1];
-    v10 = pBodyComplection << 7;
+   // v10 = pBodyComplection << 7;
     v218 = v9;
     v11 = *(int *)v9;
     v12 = *(int *)v9;
     v13 = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[v12].uEquipX;
     a2a = v13;
-    a3a = pPaperdoll_BodyY + *(int *)((char *)&paperdoll_Weapon[0][1][1] + v10) - pItemsTable->pItems[v12].uEquipY;
+    a3a = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][1][1] - pItemsTable->pItems[v12].uEquipY;
     if ( v11 == 64 )
       v166 = "item64v1";
     else