diff Items.h @ 222:8113753ed2ae

more item init fixing
author Gloval
date Sun, 17 Feb 2013 11:29:10 +0400
parents 821fd955c379
children 1bd823f52e3a
line wrap: on
line diff
--- a/Items.h	Sat Feb 16 18:46:59 2013 +0400
+++ b/Items.h	Sun Feb 17 11:29:10 2013 +0400
@@ -123,33 +123,37 @@
 /*  175 */
 #pragma pack(push, 1)
 struct ItemDesc
-{
-  unsigned int uItemID;
-  char *pIconName;
-  char *pName;
-  char *pUnidentifiedName;
-  char *pDescription;
-  unsigned int uValue;
-  unsigned __int16 uSpriteID;
-  __int16 field_1A;
-  unsigned __int16 uEquipX;
-  unsigned __int16 uEquipY;
-  unsigned __int8 uEquipType;
-  unsigned __int8 uSkillType;
-  unsigned __int8 uDamageDice;
-  unsigned __int8 uDamageRoll;
-  unsigned __int8 uDamageMod;
-  unsigned __int8 uMaterial;
-  char _additional_value;
-  char _bonus_type;
-  char _bonus_strength;
+{ //Item # |Pic File|Name|Value|Equip Stat|Skill Group|Mod1|Mod2|material|	
+             ///ID/Rep/St|Not identified name|Sprite Index|VarA|VarB|Equip X|Equip Y|Notes
+  char *pIconName;  //0 4
+  char *pName;   //4 8
+  char *pUnidentifiedName; //8 c
+  char *pDescription;  //0c 10
+  unsigned int uValue;  //10 14
+  unsigned __int16 uSpriteID; //14 18
+  __int16 field_1A; //16 
+  unsigned __int16 uEquipX; //18  1c
+  unsigned __int16 uEquipY; //1a  1e
+  unsigned __int8 uEquipType; //1c 20
+  unsigned __int8 uSkillType; //1d 21
+  unsigned __int8 uDamageDice; //1e 22
+  unsigned __int8 uDamageRoll; //1f 23
+  unsigned __int8 uDamageMod; //20 24
+  unsigned __int8 uMaterial; //21 25
+  char _additional_value; //22 26
+  char _bonus_type; //23  27
+  char _bonus_strength; //24 28
+  char field_25;  //
+  char field_26;
+  char field_27;
+  char field_28; 
   char field_29;
-  char field_2A;
-  char field_2B;
+  char field_2a;
+  char field_2b;
   char field_2C;
-  char field_2D;
-  char field_2E;
-  char field_2F;
+  unsigned char uItemID_Rep_St; //2d
+  char field_2e;
+  char field_2f;
 };
 #pragma pack(pop)
 
@@ -158,26 +162,46 @@
 /*  177 */
 #pragma pack(push, 1)
 struct ItemEnchantment
-{
-  char *pName;
-  char *pParam;
-  char field_8[12];
-};
+	{ //Bonus|Sta|Of Name|Arm|Shld|Helm|Belt|Cape|Gaunt|Boot|Ring|Amul
+	char *pBonusStat;
+	char *pOfName;
+/*	union{
+		struct {
+			unsigned char to_arm;
+			unsigned char to_shld;
+			unsigned char to_helm;
+			unsigned char to_belt;
+			unsigned char to_cape;
+			unsigned char to_gaunt;
+			unsigned char to_boot;
+			unsigned char to_ring;
+			unsigned char to_amul;
+			}; */
+			unsigned char to_item[12];
+	//	};
+	};
 #pragma pack(pop)
 
 /*  178 */
 #pragma pack(push, 1)
 struct ItemSpecialEnchantment
-{
-  char *pName;
-  char *pParam;
-  char field_8[12];
-  int field_14;
-  int field_18;
+{ //Bonus Stat|Name Add|W1|W2|Miss|Arm|Shld|Helm|Belt|Cape|Gaunt|Boot|Ring|Amul|Value|Lvl|Description fo special Bonuses and values			
+
+  char *pBonusStatement;
+  char *pNameAdd;
+  char to_item_apply[12];
+  int iValue;
+  int iTreasureLevel;
 };
 #pragma pack(pop)
 
-
+#pragma pack(push, 1)
+struct BonusRange
+{
+  unsigned int minR;
+  unsigned int maxR;
+};
+#pragma pack(pop)
 
 /*  176 */
 #pragma pack(push, 1)
@@ -192,30 +216,28 @@
   bool _456D5E_is_some_material(ItemGen *pItem);
   char *Release();
 
-
-  ItemDesc pItems[638];
-  char align1[18];
-  unsigned __int8 potion_data[50][50]; //int8!!!! not int16 as in decomp code. hexrays wrong!!
-  unsigned __int8 potion_note[50][50];
-  char align2[2758];
-  ItemEnchantment pEnchantments[24];
-  ItemSpecialEnchantment pSpecialEnchantments[72];
+  int uAllItemsCount;
+  ItemDesc pItems[800]; //4-9604h
+  ItemEnchantment pEnchantments[24]; //9604h
+  ItemSpecialEnchantment pSpecialEnchantments[72]; //97E4h
   char field_9FC0[5000];
   char field_B348[5000];
   char field_C6D0[5000];
   char field_DA58[5000];
-  char field_EDE0[5000];
-  char field_10168[5000];
-  char field_114F0[388];
-  char *pItemsTXT_Raw;
+  char field_EDE0[184];
+  unsigned __int16 potion_data[50][50]; // 77B2h*2=EF64h  -102ECh
+  unsigned __int16 potion_note[50][50]; // 8176h*2=102ECh -11674h
+  char *pItemsTXT_Raw; //11674h
   char *pRndItemsTXT_Raw;
-  char *pStdItemsTXT_Raw;
-  char *pSpcItemsTXT_Raw;
+  char *pStdItemsTXT_Raw; //1167Ch
+  char *pSpcItemsTXT_Raw; //11680h
   int field_11684[6];
   char field_1169C[60];
-  int field_116D8[24];
-  int field_11738[24];
-  int field_11798;
+  int field_116D8[3];
+  unsigned int pEnchantmentsSumm[9]; //116E4h -11708h
+  BonusRange bonus_ranges[6]; //45C2h*4 =11708h
+  int pSpecialEnchantmentsSumm[24]; //11738h
+  int pSpecialEnchantments_count; //11798h
   char field_1179C;
 };
 #pragma pack(pop)