2498
|
1 #pragma once
|
2566
|
2 #include "Engine/VectorTypes.h"
|
|
3 #include "Engine/Objects/Items.h"
|
|
4
|
|
5
|
|
6
|
|
7
|
|
8 enum SPRITE_OBJECT_TYPE : unsigned __int16
|
|
9 {
|
|
10 SPRITE_NULL = 0,
|
|
11
|
|
12 SPRITE_SPELL_0 = 10,
|
|
13
|
|
14 SPRITE_PROJECTILE_500 = 500, // blue bolt projectile + smoke e.g. blue dragon attack
|
|
15 SPRITE_PROJECTILE_500_IMPACT = 501,
|
|
16 SPRITE_PROJECTILE_505 = 505, // dark-brown bolt
|
|
17 SPRITE_PROJECTILE_505_IMPACT = 506,
|
|
18 SPRITE_PROJECTILE_510 = 510, // red bolt projectile + smoke e.g. red dragon attack
|
|
19 SPRITE_PROJECTILE_510_IMPACT = 511,
|
|
20 SPRITE_PROJECTILE_515 = 515, // deep-blue bolt
|
|
21 SPRITE_PROJECTILE_515_IMPACT = 516,
|
|
22 SPRITE_PROJECTILE_520 = 520, // light-green bolt
|
|
23 SPRITE_PROJECTILE_520_IMPACT = 521,
|
|
24 SPRITE_PROJECTILE_525 = 525, // yellow bolt
|
|
25 SPRITE_PROJECTILE_525_IMPACT = 526,
|
|
26 SPRITE_PROJECTILE_530 = 530, // blue bolt projectile + smoke e.g. blue dragon attack
|
|
27 SPRITE_PROJECTILE_530_IMPACT = 531,
|
|
28 SPRITE_PROJECTILE_535 = 535, // white bolt
|
|
29 SPRITE_PROJECTILE_535_IMPACT = 536,
|
|
30 SPRITE_PROJECTILE_540 = 540, // gray bolt
|
|
31 SPRITE_PROJECTILE_540_IMPACT = 541,
|
|
32 SPRITE_PROJECTILE_545 = 545,
|
|
33 SPRITE_PROJECTILE_550 = 550,
|
|
34 SPRITE_PROJECTILE_555 = 555,
|
|
35
|
|
36 SPRITE_556 = 556, // some red mobile light applied
|
|
37 SPRITE_600 = 600, // some reddish mobile light applied
|
|
38 SPRITE_601 = 601,
|
|
39
|
|
40 SPRITE_800 = 800,
|
|
41
|
|
42 SPRITE_811 = 811,
|
|
43 SPRITE_812 = 812,
|
|
44 SPRITE_813 = 813,
|
|
45 SPRITE_814 = 814,
|
|
46
|
|
47 SPRITE_SPELL_FIRE_TORCH_LIGHT = 1000,
|
|
48 SPRITE_SPELL_FIRE_FIRE_BOLT = 1010,
|
|
49 SPRITE_SPELL_FIRE_FIRE_BOLT_IMPACT = 1011,
|
|
50 SPRITE_SPELL_FIRE_PROTECTION_FROM_FIRE = 1020,
|
|
51 SPRITE_SPELL_FIRE_FIRE_AURA = 1030,
|
|
52 SPRITE_SPELL_FIRE_HASTE = 1040,
|
|
53 SPRITE_SPELL_FIRE_FIREBALL = 1050,
|
|
54 SPRITE_SPELL_FIRE_FIREBALL_IMPACT = 1051,
|
|
55 SPRITE_SPELL_FIRE_FIRE_SPIKE = 1060,
|
|
56 SPRITE_SPELL_FIRE_FIRE_SPIKE_IMPACT = 1061,
|
|
57 SPRITE_SPELL_FIRE_IMMOLATION = 1070,
|
|
58 SPRITE_SPELL_FIRE_METEOR_SHOWER = 1080,
|
|
59 SPRITE_SPELL_FIRE_METEOR_SHOWER_1 = 1081,
|
|
60 SPRITE_SPELL_FIRE_INFERNO = 1090,
|
|
61 SPRITE_SPELL_FIRE_INCINERATE = 1100,
|
|
62 SPRITE_SPELL_FIRE_INCINERATE_IMPACT = 1101,
|
|
63
|
|
64 SPRITE_SPELL_AIR_WIZARD_EYE = 2000,
|
|
65 SPRITE_SPELL_AIR_FEATHER_FALL = 2010,
|
|
66 SPRITE_SPELL_AIR_PROTECTION_FROM_AIR = 2020,
|
|
67 SPRITE_SPELL_AIR_SPARKS = 2030,
|
|
68 SPRITE_SPELL_AIR_JUMP = 2040,
|
|
69 SPRITE_SPELL_AIR_SHIELD = 2050,
|
|
70 SPRITE_SPELL_AIR_LIGHNING_BOLT = 2060,
|
|
71 SPRITE_SPELL_AIR_LIGHNING_BOLT_IMPACT = 2061,
|
|
72 SPRITE_SPELL_AIR_INVISIBILITY = 2070,
|
|
73 SPRITE_SPELL_AIR_IMPLOSION = 2080,
|
|
74 SPRITE_SPELL_AIR_IMPLOSION_IMPACT = 2081,
|
|
75 SPRITE_SPELL_AIR_FLY = 2090,
|
|
76 SPRITE_SPELL_AIR_STARBURST = 2100,
|
|
77 SPRITE_SPELL_AIR_STARBURST_1 = 2101,
|
|
78
|
|
79 SPRITE_SPELL_WATER_AWAKEN = 3000,
|
|
80 SPRITE_SPELL_WATER_POISON_SPRAY = 3010,
|
|
81 SPRITE_SPELL_WATER_POISON_SPRAY_IMPACT = 3011,
|
|
82 SPRITE_SPELL_WATER_PROTECTION_FROM_WATER = 3020,
|
|
83 SPRITE_SPELL_WATER_ICE_BOLT = 3030,
|
|
84 SPRITE_SPELL_WATER_ICE_BOLT_IMPACT = 3031,
|
|
85 SPRITE_SPELL_WATER_WATER_WALK = 3040,
|
|
86 SPRITE_SPELL_WATER_RECHARGE_ITEM = 3050,
|
|
87 SPRITE_SPELL_WATER_ACID_BURST = 3060,
|
|
88 SPRITE_SPELL_WATER_ACID_BURST_IMPACT = 3061,
|
|
89 SPRITE_SPELL_WATER_ENCHANT_ITEM = 3070,
|
|
90 SPRITE_SPELL_WATER_TOWN_PORTAL = 3080,
|
|
91 SPRITE_SPELL_WATER_ICE_BLAST = 3090,
|
|
92 SPRITE_SPELL_WATER_ICE_BLAST_IMPACT = 3091,
|
|
93 SPRITE_SPELL_WATER_ICE_BLAST_FALLOUT = 3092,
|
|
94 SPRITE_SPELL_WATER_LLOYDS_BEACON = 3100,
|
|
95
|
|
96 SPRITE_SPELL_EARTH_STUN = 4000,
|
|
97 SPRITE_SPELL_EARTH_SLOW = 4010,
|
|
98 SPRITE_SPELL_EARTH_PROTECTION_FROM_EARTH = 4020,
|
|
99 SPRITE_SPELL_EARTH_DEADLY_SWARM = 4030,
|
|
100 SPRITE_SPELL_EARTH_DEADLY_SWARM_IMPACT = 4031,
|
|
101 SPRITE_SPELL_EARTH_STONESKIN = 4040,
|
|
102 SPRITE_SPELL_EARTH_BLADES = 4050,
|
|
103 SPRITE_SPELL_EARTH_BLADES_IMPACT = 4051,
|
|
104 SPRITE_SPELL_EARTH_STONE_TO_FLESH = 4060,
|
|
105 SPRITE_SPELL_EARTH_ROCK_BLAST = 4070,
|
|
106 SPRITE_SPELL_EARTH_ROCK_BLAST_IMPACT = 4071,
|
|
107 SPRITE_SPELL_EARTH_TELEKINESIS = 4080,
|
|
108 SPRITE_SPELL_EARTH_DEATH_BLOSSOM = 4090,
|
|
109 SPRITE_SPELL_EARTH_DEATH_BLOSSOM_IMPACT = 4091,
|
|
110 SPRITE_SPELL_EARTH_DEATH_BLOSSOM_FALLOUT = 4092,
|
|
111 SPRITE_SPELL_EARTH_MASS_DISTORTION = 4100,
|
|
112
|
|
113 SPRITE_SPELL_SPIRIT_DETECT_LIFE = 5000,
|
|
114 SPRITE_SPELL_SPIRIT_BLESS = 5010,
|
|
115 SPRITE_SPELL_SPIRIT_FATE = 5020,
|
|
116 SPRITE_SPELL_SPIRIT_TURN_UNDEAD = 5030,
|
|
117 SPRITE_SPELL_SPIRIT_TURN_UNDEAD_1 = 5031,
|
|
118 SPRITE_SPELL_SPIRIT_REMOVE_CURSE = 5040,
|
|
119 SPRITE_SPELL_SPIRIT_PRESERVATION = 5050,
|
|
120 SPRITE_SPELL_SPIRIT_HEROISM = 5060,
|
|
121 SPRITE_SPELL_SPIRIT_SPIRIT_LASH = 5070,
|
|
122 SPRITE_SPELL_SPIRIT_RAISE_DEAD = 5080,
|
|
123 SPRITE_SPELL_SPIRIT_SHARED_LIFE = 5090,
|
|
124 SPRITE_SPELL_SPIRIT_RESSURECTION = 5100,
|
|
125
|
|
126 SPRITE_SPELL_MIND_REMOVE_FEAR = 6000,
|
|
127 SPRITE_SPELL_MIND_MIND_BLAST = 6010,
|
|
128 SPRITE_SPELL_MIND_MIND_BLAST_IMPACT = 6011,
|
|
129 SPRITE_SPELL_MIND_PROTECTION_FROM_MIND = 6020,
|
|
130 SPRITE_SPELL_MIND_TELEPATHY = 6030,
|
|
131 SPRITE_SPELL_MIND_CHARM = 6040,
|
|
132 SPRITE_SPELL_MIND_CURE_PARALYSIS = 6050,
|
|
133 SPRITE_SPELL_MIND_BERSERK = 6060,
|
|
134 SPRITE_SPELL_MIND_MASS_FEAR = 6070,
|
|
135 SPRITE_SPELL_MIND_MASS_FEAR_1 = 6071,
|
|
136 SPRITE_SPELL_MIND_CURE_INSANITY = 6080,
|
|
137 SPRITE_SPELL_MIND_PSYCHIC_SHOCK = 6090,
|
|
138 SPRITE_SPELL_MIND_ENSLAVE = 6100,
|
|
139
|
|
140 SPRITE_SPELL_BODY_CURE_WEAKNESS = 7000,
|
|
141 SPRITE_SPELL_BODY_FIRST_AID = 7010,
|
|
142 SPRITE_SPELL_BODY_PROTECTION_FROM_BODY = 7020,
|
|
143 SPRITE_SPELL_BODY_HARM = 7030,
|
|
144 SPRITE_SPELL_BODY_HARM_IMPACT = 7031,
|
|
145 SPRITE_SPELL_BODY_REGENERATION = 7040,
|
|
146 SPRITE_SPELL_BODY_CURE_POISON = 7050,
|
|
147 SPRITE_SPELL_BODY_HAMMERHANDS = 7060,
|
|
148 SPRITE_SPELL_BODY_CURE_DISEASE = 7070,
|
|
149 SPRITE_SPELL_BODY_PROTECTION_FROM_MAGIC = 7080,
|
|
150 SPRITE_SPELL_BODY_FLYING_FIST = 7090,
|
|
151 SPRITE_SPELL_BODY_FLYING_FIST_IMPACT = 7091,
|
|
152 SPRITE_SPELL_BODY_POWER_CURE = 7100,
|
|
153
|
|
154 SPRITE_SPELL_LIGHT_LIGHT_BOLT = 8000,
|
|
155 SPRITE_SPELL_LIGHT_LIGHT_BOLT_IMPACT = 8001,
|
|
156 SPRITE_SPELL_LIGHT_DESTROY_UNDEAD = 8010,
|
|
157 SPRITE_SPELL_LIGHT_DESTROY_UNDEAD_1 = 8011,
|
|
158 SPRITE_SPELL_LIGHT_DISPEL_MAGIC = 8020,
|
|
159 SPRITE_SPELL_LIGHT_DISPEL_MAGIC_1 = 8021,
|
|
160 SPRITE_SPELL_LIGHT_PARALYZE = 8030,
|
|
161 SPRITE_SPELL_LIGHT_SUMMON_ELEMENTAL = 8040,
|
|
162 SPRITE_SPELL_LIGHT_DAY_OF_THE_GODS = 8050,
|
|
163 SPRITE_SPELL_LIGHT_PRISMATIC_LIGHT = 8060,
|
|
164 SPRITE_SPELL_LIGHT_PRISMATIC_LIGHT_1 = 8061,
|
|
165 SPRITE_SPELL_LIGHT_DAY_OF_PROTECTION = 8070,
|
|
166 SPRITE_SPELL_LIGHT_HOUR_OF_POWER = 8080,
|
|
167 SPRITE_SPELL_LIGHT_SUNRAY = 8090,
|
|
168 SPRITE_SPELL_LIGHT_SUNRAY_IMPACT = 8091,
|
|
169 SPRITE_SPELL_LIGHT_DIVINE_INTERVENTION = 8100,
|
|
170
|
|
171 SPRITE_SPELL_DARK_REANIMATE = 9000,
|
|
172 SPRITE_SPELL_DARK_REANIMATE_1 = 9001,
|
|
173 SPRITE_SPELL_DARK_TOXIC_CLOUD = 9010,
|
|
174 SPRITE_SPELL_DARK_VAMPIRIC_WEAPON = 9020,
|
|
175 SPRITE_SPELL_DARK_SHRINKING_RAY = 9030,
|
|
176 SPRITE_SPELL_DARK_SHARPMETAL = 9040,
|
|
177 SPRITE_SPELL_DARK_SHARPMETAL_IMPACT = 9041,
|
|
178 SPRITE_SPELL_DARK_CONTROL_UNDEAD = 9050,
|
|
179 SPRITE_SPELL_DARK_PAIN_REFLECTION = 9060,
|
|
180 SPRITE_SPELL_DARK_SACRIFICE = 9070,
|
|
181 SPRITE_SPELL_DARK_DRAGON_BREATH = 9080,
|
|
182 SPRITE_SPELL_DARK_DRAGON_BREATH_1 = 9081,
|
|
183 SPRITE_SPELL_DARK_ARMAGEDDON = 9090,
|
|
184 SPRITE_SPELL_DARK_SOULDRINKER = 9100,
|
|
185
|
|
186 SPRITE_SPELL_BOW_ARROW = 545,
|
|
187 SPRITE_SPELL_101 = 545,
|
|
188 SPRITE_SPELL_LASER_PROJECTILE = 555,
|
|
189 };
|
2498
|
190
|
|
191 enum
|
|
192 {
|
|
193 OBJECT_40 = 0x40
|
|
194 , OBJECT_ATTACHED_TO_ACTOR = 0x80
|
|
195 };
|
|
196
|
|
197 #define MAX_SPRITE_OBJECTS 1000
|
|
198 /* 72 */
|
|
199 #pragma pack(push, 1)
|
|
200 struct SpriteObject
|
|
201 {
|
|
202 inline bool AttachedToActor() const {return (uAttributes & OBJECT_ATTACHED_TO_ACTOR) != 0;}
|
|
203
|
|
204 SpriteObject();
|
|
205 int Create(int yaw, int pitch, int a4, int a5);
|
|
206 void _46BEF1_apply_spells_aoe();
|
|
207 void ExplosionTraps();
|
|
208
|
|
209 static void UpdateObject_fn0_BLV(unsigned int uLayingItemID);
|
|
210 static void UpdateObject_fn0_ODM(unsigned int uLayingItemID);
|
|
211 static void OnInteraction(unsigned int uLayingItemID);
|
2566
|
212 static bool sub_42F7EB_DropItemAt(SPRITE_OBJECT_TYPE sprite, int x, int y, int z, int a4, int count, int a7, unsigned __int16 attributes, ItemGen *a9);
|
2498
|
213 static void sub_42F960_create_object(int x, int y, int z);
|
|
214 static void InitializeSpriteObjects();
|
|
215
|
|
216
|
2566
|
217 SPRITE_OBJECT_TYPE uType;
|
|
218 //unsigned __int16 uType;
|
2498
|
219 unsigned __int16 uObjectDescID;
|
|
220 struct Vec3_int_ vPosition;
|
|
221 struct Vec3_short_ vVelocity;
|
|
222 unsigned __int16 uFacing;
|
|
223 unsigned __int16 uSoundID;
|
|
224 unsigned __int16 uAttributes;
|
|
225 __int16 uSectorID;
|
|
226 unsigned __int16 uSpriteFrameID;
|
|
227 __int16 field_20;
|
|
228 __int16 field_22_glow_radius_multiplier;
|
2566
|
229 struct ItemGen containing_item;
|
2498
|
230 int spell_id;
|
|
231 int spell_level;
|
|
232 int spell_skill;
|
|
233 int field_54;
|
|
234 int spell_caster_pid;
|
|
235 int spell_target_pid;
|
|
236 char field_60_distance_related_prolly_lod;
|
|
237 char field_61;
|
|
238 char field_62[2];
|
|
239 Vec3_int_ field_64;
|
|
240 };
|
|
241 #pragma pack(pop)
|
|
242
|
|
243
|
|
244 void CompactLayingItemsList();
|
|
245
|
|
246 extern size_t uNumSpriteObjects;
|
|
247 extern std::array<SpriteObject, MAX_SPRITE_OBJECTS> pSpriteObjects;
|
|
248
|
2566
|
249 bool __fastcall _46BFFA_update_spell_fx(unsigned int uLayingItemID, signed int a2);
|
2498
|
250 void __fastcall sub_43A97E(unsigned int uLayingItemID, signed int a2); // idb
|