annotate mm7_6.cpp @ 127:9eac46182d8f

Слияние
author Ritor1
date Sun, 04 Nov 2012 09:37:39 +0600
parents 51a5b0dc3f30
children 8be5293b6b33
rev   line source
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1 #include "MM7.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3 #include "MapInfo.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4 #include "Game.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5 #include "GUIWindow.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6 #include "GUIFont.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7 #include "GUIButton.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8 #include "GUIProgressBar.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9 #include "Party.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10 #include "AudioPlayer.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11 #include "Outdoor.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12 #include "IndoorCamera.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13 #include "Overlays.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14 #include "Monsters.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15 #include "Arcomage.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16 #include "LOD.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17 #include "Actor.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
18 #include "Allocator.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
19 #include "Events.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
20 #include "Viewport.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
21 #include "FrameTableInc.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
22 #include "Math.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
23 #include "LayingItem.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
24 #include "ObjectList.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
25 #include "Chest.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
26 #include "PaletteManager.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
27 #include "DecorationList.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
28 #include "SaveLoad.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
29 #include "stru123.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
30 #include "Time.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
31 #include "IconFrameTable.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
32 #include "stru179.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
33 #include "Awards.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
34 #include "Autonotes.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
35 #include "stru160.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
36 #include "stru279.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
37 #include "TurnEngine.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
38 #include "stru277.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
39 #include "Weather.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
40 #include "stru272.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
41 #include "stru298.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
42 #include "StorylineTextTable.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
43 #include "Events2D.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
45 #include "mm7_data.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
46
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
48
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
49 //----- (00424EE0) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
50 signed int __fastcall sr_424EE0_MakeFanFromTriangle(unsigned int uVertexID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
51 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
52 unsigned int v1; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
53 double v2; // st7@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
54 signed int v3; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
55 char *v4; // esi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
56 char *v5; // ecx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
57 unsigned int v6; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
58 char *v7; // edx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
59 double v8; // st6@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
60 double v9; // st5@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
61 double v10; // st6@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
62 unsigned __int8 v11; // c2@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
63 unsigned __int8 v12; // c3@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
64 void *v13; // edi@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
65 char *v14; // eax@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
66 double v15; // st6@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
67 char *v16; // ecx@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
68 signed int result; // eax@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
69 unsigned int v18; // [sp+8h] [bp-2Ch]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
70 bool v19; // [sp+Ch] [bp-28h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
71 char *v20; // [sp+10h] [bp-24h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
72 char *v21; // [sp+14h] [bp-20h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
73 signed int v22; // [sp+18h] [bp-1Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
74 char *v23; // [sp+1Ch] [bp-18h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
75 RenderVertexSoft *v24; // [sp+20h] [bp-14h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
76 char *v25; // [sp+24h] [bp-10h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
77 char *v26; // [sp+28h] [bp-Ch]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
78 char *v27; // [sp+2Ch] [bp-8h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
79 char *v28; // [sp+30h] [bp-4h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
80
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
81 v1 = uVertexID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
82 v2 = (double)pOutdoorCamera->shading_dist_mist;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
83 memcpy(&array_50AC10[uVertexID], array_50AC10, sizeof(array_50AC10[uVertexID]));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
84 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
85 v22 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
86 if ( array_50AC10[0].vWorldViewPosition.x <= v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
87 v3 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
88 if ( (signed int)(uVertexID + 1) <= 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
89 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
90 v4 = (char *)&array_507D30[0].vWorldViewPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
91 v5 = (char *)&array_507D30[0].vWorldViewPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
92 v6 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
93 v23 = (char *)&array_507D30[0].flt_2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
94 v26 = (char *)&array_507D30[0].flt_20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
95 v24 = array_507D30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
96 v20 = (char *)&array_507D30[0].vWorldViewPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
97 v21 = (char *)&array_507D30[0].vWorldViewPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
98 v25 = (char *)&array_507D30[0].vWorldViewPosition;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
99 v27 = (char *)&array_507D30[0].v;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
100 v28 = (char *)&array_507D30[0].u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
101 v7 = (char *)&array_50AC10[0].v;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
102 v18 = v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
103 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
104 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
105 v19 = v2 >= *((float *)v7 + 5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
106 if ( v3 != v19 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
107 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
108 if ( v19 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
109 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
110 v8 = (v2 - *((float *)v7 - 7)) / (*((float *)v7 + 5) - *((float *)v7 - 7));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
111 *(float *)v5 = (*((float *)v7 + 6) - *((float *)v7 - 6)) * v8 + *((float *)v7 - 6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
112 *(float *)v4 = (*((float *)v7 + 7) - *((float *)v7 - 5)) * v8 + *((float *)v7 - 5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
113 *(float *)v28 = (*((float *)v7 + 11) - *((float *)v7 - 1)) * v8 + *((float *)v7 - 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
114 v9 = (*((float *)v7 + 12) - *(float *)v7) * v8 + *(float *)v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
115 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
116 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
117 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
118 v10 = (v2 - *((float *)v7 + 5)) / (*((float *)v7 - 7) - *((float *)v7 + 5));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
119 *(float *)v5 = (*((float *)v7 - 6) - *((float *)v7 + 6)) * v10 + *((float *)v7 + 6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
120 *(float *)v4 = (*((float *)v7 - 5) - *((float *)v7 + 7)) * v10 + *((float *)v7 + 7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
121 *(float *)v28 = (*((float *)v7 - 1) - *((float *)v7 + 11)) * v10 + *((float *)v7 + 11);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
122 v9 = (*(float *)v7 - *((float *)v7 + 12)) * v10 + *((float *)v7 + 12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
123 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
124 *(float *)v27 = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
125 *(float *)v25 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
126 *(float *)v26 = 1.0 / v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
127 if ( v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
128 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
129 if ( v2 == *((float *)v7 - 7) && *(float *)v5 == *((float *)v7 - 6) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
130 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
131 v11 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
132 v12 = *(float *)v4 == *((float *)v7 - 5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
133 goto LABEL_19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
134 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
135 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
136 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
137 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
138 if ( v2 == *((float *)v7 + 5) && *(float *)v5 == *((float *)v7 + 6) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
139 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
140 v11 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
141 v12 = *(float *)v4 == *((float *)v7 + 7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
142 LABEL_19:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
143 if ( v12 | v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
144 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
145 goto LABEL_20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
146 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
147 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
148 LABEL_20:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
149 v26 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
150 ++v24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
151 v25 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
152 v27 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
153 v28 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
154 v5 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
155 v4 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
156 ++v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
157 v23 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
158 v21 = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
159 v20 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
160 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
161 LABEL_21:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
162 if ( v19 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
163 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
164 v13 = v24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
165 v14 = v26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
166 v21 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
167 v15 = 1.0 / (*((float *)v7 + 5) + 0.0000001);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
168 v20 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
169 ++v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
170 v28 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
171 v27 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
172 v25 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
173 ++v24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
174 v26 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
175 memcpy(v13, v7 + 8, 0x30u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
176 v16 = v23;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
177 v23 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
178 v4 = v20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
179 *(float *)v14 = v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
180 *(int *)v16 = *((int *)v7 + 13);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
181 v5 = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
182 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
183 v3 = v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
184 v7 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
185 --v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
186 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
187 while ( v18 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
188 result = v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
189 if ( v22 < 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
190 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
191 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
192 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
193
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
194 //----- (004250FE) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
195 signed int __fastcall sr_4250FE(unsigned int uVertexID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
196 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
197 unsigned int v1; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
198 char *v2; // edi@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
199 char *v3; // esi@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
200 char *v4; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
201 int v5; // ebx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
202 double v6; // st6@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
203 double v7; // st5@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
204 double v8; // st6@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
205 unsigned __int8 v9; // c2@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
206 unsigned __int8 v10; // c3@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
207 void *v11; // edi@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
208 double v12; // st6@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
209 char *v13; // ecx@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
210 char v14; // zf@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
211 signed int result; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
212 unsigned int v16; // [sp+8h] [bp-28h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
213 bool v17; // [sp+Ch] [bp-24h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
214 bool v18; // [sp+10h] [bp-20h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
215 char *v19; // [sp+14h] [bp-1Ch]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
216 char *v20; // [sp+18h] [bp-18h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
217 signed int v21; // [sp+1Ch] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
218 RenderVertexSoft *v22; // [sp+20h] [bp-10h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
219 char *v23; // [sp+24h] [bp-Ch]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
220 char *v24; // [sp+28h] [bp-8h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
221 char *v25; // [sp+2Ch] [bp-4h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
222
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
223 v1 = uVertexID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
224 memcpy(&array_50AC10[uVertexID], array_50AC10, sizeof(array_50AC10[uVertexID]));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
225 v21 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
226 v17 = array_50AC10[0].vWorldViewPosition.x >= 8.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
227 if ( (signed int)(uVertexID + 1) <= 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
228 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
229 v2 = (char *)&array_507D30[0].vWorldViewPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
230 v3 = (char *)&array_507D30[0].vWorldViewPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
231 v24 = (char *)&array_507D30[0].flt_20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
232 v22 = array_507D30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
233 v19 = (char *)&array_507D30[0].vWorldViewPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
234 v20 = (char *)&array_507D30[0].vWorldViewPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
235 v23 = (char *)&array_507D30[0].vWorldViewPosition;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
236 v25 = (char *)&array_507D30[0].flt_2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
237 v4 = (char *)&array_50AC10[0].vWorldViewPosition;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
238 v16 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
239 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
240 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
241 v5 = (int)(v4 + 48);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
242 v18 = *((float *)v4 + 12) >= 8.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
243 if ( v17 != v18 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
244 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
245 if ( v18 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
246 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
247 v6 = (8.0 - *(float *)v4) / (*(float *)v5 - *(float *)v4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
248 *(float *)v3 = (*((float *)v4 + 13) - *((float *)v4 + 1)) * v6 + *((float *)v4 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
249 *(float *)v2 = (*((float *)v4 + 14) - *((float *)v4 + 2)) * v6 + *((float *)v4 + 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
250 v7 = (*((float *)v4 + 20) - *((float *)v4 + 8)) * v6 + *((float *)v4 + 8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
251 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
252 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
253 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
254 v8 = (8.0 - *(float *)v5) / (*(float *)v4 - *(float *)v5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
255 *(float *)v3 = (*((float *)v4 + 1) - *((float *)v4 + 13)) * v8 + *((float *)v4 + 13);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
256 *(float *)v2 = (*((float *)v4 + 2) - *((float *)v4 + 14)) * v8 + *((float *)v4 + 14);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
257 v7 = (*((float *)v4 + 8) - *((float *)v4 + 20)) * v8 + *((float *)v4 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
258 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
259 *(float *)v25 = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
260 *(float *)v23 = 8.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
261 *(int *)v24 = 0x3E000000u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
262 if ( v17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
263 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
264 if ( 8.0 == *(float *)v4 && *(float *)v3 == *((float *)v4 + 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
265 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
266 v9 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
267 v10 = *(float *)v2 == *((float *)v4 + 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
268 goto LABEL_20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
269 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
270 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
271 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
272 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
273 if ( 8.0 == *(float *)v5 && *(float *)v3 == *((float *)v4 + 13) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
274 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
275 v9 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
276 v10 = *(float *)v2 == *((float *)v4 + 14);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
277 LABEL_20:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
278 if ( v10 | v9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
279 goto LABEL_22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
280 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
281 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
282 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
283 LABEL_21:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
284 ++v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
285 v23 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
286 v25 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
287 v3 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
288 v2 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
289 ++v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
290 v24 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
291 v20 = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
292 v19 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
293 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
294 LABEL_22:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
295 if ( v18 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
296 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
297 v11 = v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
298 v20 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
299 v19 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
300 v12 = 1.0 / (*(float *)v5 + 0.0000001);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
301 ++v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
302 v25 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
303 v23 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
304 ++v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
305 memcpy(v11, v4 + 36, 0x30u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
306 v13 = v24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
307 v24 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
308 v3 = v20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
309 v2 = v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
310 *(float *)v13 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
311 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
312 v14 = v16-- == 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
313 v17 = v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
314 v4 = (char *)v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
315 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
316 while ( !v14 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
317 result = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
318 if ( v21 < 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
319 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
320 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
321 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
322
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
323 //----- (004252E8) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
324 signed int __fastcall sr_4252E8(unsigned int uVertexID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
325 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
326 unsigned int v1; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
327 double v2; // st7@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
328 char *v3; // edi@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
329 char *v4; // esi@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
330 char *v5; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
331 int v6; // ebx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
332 double v7; // st6@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
333 double v8; // st5@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
334 double v9; // st6@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
335 unsigned __int8 v10; // c2@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
336 unsigned __int8 v11; // c3@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
337 void *v12; // edi@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
338 double v13; // st6@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
339 char *v14; // ecx@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
340 char v15; // zf@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
341 signed int result; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
342 unsigned int v17; // [sp+8h] [bp-28h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
343 bool v18; // [sp+Ch] [bp-24h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
344 bool v19; // [sp+10h] [bp-20h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
345 char *v20; // [sp+14h] [bp-1Ch]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
346 char *v21; // [sp+18h] [bp-18h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
347 signed int v22; // [sp+1Ch] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
348 RenderVertexSoft *v23; // [sp+20h] [bp-10h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
349 char *v24; // [sp+24h] [bp-Ch]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
350 char *v25; // [sp+28h] [bp-8h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
351 char *v26; // [sp+2Ch] [bp-4h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
352
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
353 v1 = uVertexID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
354 v2 = (double)pOutdoorCamera->shading_dist_mist;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
355 memcpy(&array_50AC10[uVertexID], array_50AC10, sizeof(array_50AC10[uVertexID]));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
356 v22 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
357 v18 = array_50AC10[0].vWorldViewPosition.x <= v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
358 if ( (signed int)(uVertexID + 1) <= 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
359 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
360 v3 = (char *)&array_507D30[0].vWorldViewPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
361 v4 = (char *)&array_507D30[0].vWorldViewPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
362 v25 = (char *)&array_507D30[0].flt_20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
363 v23 = array_507D30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
364 v20 = (char *)&array_507D30[0].vWorldViewPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
365 v21 = (char *)&array_507D30[0].vWorldViewPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
366 v24 = (char *)&array_507D30[0].vWorldViewPosition;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
367 v26 = (char *)&array_507D30[0].flt_2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
368 v5 = (char *)&array_50AC10[0].vWorldViewPosition;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
369 v17 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
370 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
371 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
372 v6 = (int)(v5 + 48);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
373 v19 = v2 >= *((float *)v5 + 12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
374 if ( v18 != v19 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
375 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
376 if ( v19 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
377 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
378 v7 = (v2 - *(float *)v5) / (*(float *)v6 - *(float *)v5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
379 *(float *)v4 = (*((float *)v5 + 13) - *((float *)v5 + 1)) * v7 + *((float *)v5 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
380 *(float *)v3 = (*((float *)v5 + 14) - *((float *)v5 + 2)) * v7 + *((float *)v5 + 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
381 v8 = (*((float *)v5 + 20) - *((float *)v5 + 8)) * v7 + *((float *)v5 + 8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
382 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
383 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
384 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
385 v9 = (v2 - *(float *)v6) / (*(float *)v5 - *(float *)v6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
386 *(float *)v4 = (*((float *)v5 + 1) - *((float *)v5 + 13)) * v9 + *((float *)v5 + 13);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
387 *(float *)v3 = (*((float *)v5 + 2) - *((float *)v5 + 14)) * v9 + *((float *)v5 + 14);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
388 v8 = (*((float *)v5 + 8) - *((float *)v5 + 20)) * v9 + *((float *)v5 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
389 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
390 *(float *)v26 = v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
391 *(float *)v24 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
392 *(float *)v25 = 1.0 / v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
393 if ( v18 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
394 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
395 if ( v2 == *(float *)v5 && *(float *)v4 == *((float *)v5 + 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
396 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
397 v10 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
398 v11 = *(float *)v3 == *((float *)v5 + 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
399 goto LABEL_20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
400 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
401 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
402 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
403 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
404 if ( v2 == *(float *)v6 && *(float *)v4 == *((float *)v5 + 13) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
405 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
406 v10 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
407 v11 = *(float *)v3 == *((float *)v5 + 14);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
408 LABEL_20:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
409 if ( v11 | v10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
410 goto LABEL_22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
411 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
412 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
413 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
414 LABEL_21:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
415 ++v23;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
416 v24 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
417 v26 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
418 v4 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
419 v3 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
420 ++v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
421 v25 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
422 v21 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
423 v20 = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
424 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
425 LABEL_22:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
426 if ( v19 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
427 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
428 v12 = v23;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
429 v21 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
430 v20 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
431 v13 = 1.0 / (*(float *)v6 + 0.0000001);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
432 ++v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
433 v26 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
434 v24 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
435 ++v23;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
436 memcpy(v12, v5 + 36, 0x30u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
437 v14 = v25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
438 v25 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
439 v4 = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
440 v3 = v20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
441 *(float *)v14 = v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
442 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
443 v15 = v17-- == 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
444 v18 = v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
445 v5 = (char *)v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
446 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
447 while ( !v15 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
448 result = v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
449 if ( v22 < 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
450 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
451 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
452 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
453
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
454
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
455
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
456 //----- (004361EF) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
457 IndoorCameraD3D::IndoorCameraD3D()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
458 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
459 IndoorCameraD3D *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
460 double v2; // st7@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
461 double v3; // st6@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
462 double v4; // st5@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
463 double v5; // st7@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
464 double v6; // st6@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
465 double v7; // st5@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
466
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
467 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
468 //IndoorCameraD3D_Vec3::IndoorCameraD3D_Vec3(&this->field_4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
469 //IndoorCameraD3D_Vec3::IndoorCameraD3D_Vec3(&v1->field_14);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
470 //IndoorCameraD3D_Vec3::IndoorCameraD3D_Vec3(&v1->field_24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
471 /*_eh_vector_constructor_iterator_(v1->std__vector_000034_prolly_frustrum,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
472 24,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
473 6,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
474 (void (__thiscall *)(void *))IndoorCameraD3D_Vec4::IndoorCameraD3D_Vec4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
475 (void (__thiscall *)(void *))IndoorCameraD3D_Vec4::dtor);*/
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
476 v2 = 0;//(double)pBLVRenderParams->vPartyPos.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
477 v3 = 0;//(double)pBLVRenderParams->vPartyPos.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
478 v4 = 0;//(double)pBLVRenderParams->vPartyPos.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
479 v1->field_108 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
480 v1->field_DC = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
481 v1->field_E0 = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
482 v1->field_E4 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
483 v5 = 0;//(double)pBLVRenderParams->vPartyPos.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
484 v6 = 0;//(double)pBLVRenderParams->vPartyPos.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
485 v7 = 300;//(double)(pBLVRenderParams->vPartyPos.x + 300);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
486 v1->field_138 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
487 v1->field_10C = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
488 v1->field_110 = v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
489 v1->field_114 = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
490 v1->field_168 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
491 v1->field_198 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
492 v1->field_1C8 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
493 v1->field_1F8 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
494 v1->field_228 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
495 v1->field_258 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
496 v1->field_288 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
497 v1->field_2B8 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
498 v1->field_2E8 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
499 v1->field_2BC = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
500 v1->field_2C0 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
501 v1->field_2C4 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
502 v1->field_318 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
503 v1->field_2EC = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
504 v1->field_2F0 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
505 v1->field_2F4 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
506 v1->field_348 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
507 v1->field_31C = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
508 v1->field_320 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
509 v1->field_324 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
510 v1->field_378 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
511 v1->field_34C = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
512 v1->field_350 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
513 v1->field_354 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
514 for (uint i = 0; i < 16384; ++i)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
515 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
516 list_0037C[i].field_0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
517 list_0037C[i].flt_30 = 0.0f;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
518 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
519
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
520 list_0037C_size = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
521 for (uint i = 0; i < 256; ++i)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
522 list_E0380[i].mm7__vector_000004_size = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
523 /*v10 = v1->list_E0380;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
524 v12 = 256;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
525 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
526 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
527 v10->mm7__vector_000004_size = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
528 //mm7__vector_constructor(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
529 // v10->mm7__vector_000004,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
530 // 48,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
531 // 64,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
532 // (int (__thiscall *)(int))IndoorCameraD3D_stru1::IndoorCameraD3D_stru1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
533 //++v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
534 --v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
535 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
536 while ( v12 );*/
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
537 list_E0380_size = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
538 //v1->vdestructor_ptr = &stru8_pvdtor;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
539 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
540
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
541
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
542 //----- (004254D2) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
543 int __fastcall sr_4254D2(signed int a1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
544 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
545 signed int v1; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
546 int v2; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
547 int result; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
548 double v4; // ST74_8@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
549 bool v5; // edi@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
550 char *v6; // esi@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
551 char *v7; // ebx@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
552 double v8; // st7@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
553 double v9; // st7@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
554 double v10; // st6@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
555 double v11; // st7@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
556 float v12; // eax@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
557 double v13; // ST4C_8@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
558 double v14; // ST10_8@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
559 double v15; // ST28_8@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
560 double v16; // ST34_8@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
561 char v17; // zf@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
562 double v18; // ST18_8@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
563 double v19; // ST3C_8@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
564 double v20; // ST44_8@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
565 double v21; // ST54_8@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
566 void *v22; // edi@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
567 double v23; // ST54_8@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
568 bool v24; // esi@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
569 char *v25; // edi@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
570 char *v26; // ebx@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
571 bool v27; // ecx@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
572 double v28; // st7@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
573 double v29; // st7@34
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
574 double v30; // st6@34
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
575 double v31; // st7@35
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
576 double v32; // ST44_8@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
577 double v33; // ST3C_8@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
578 double v34; // ST18_8@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
579 double v35; // ST34_8@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
580 char v36; // zf@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
581 double v37; // ST28_8@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
582 double v38; // ST10_8@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
583 double v39; // ST20_8@40
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
584 double v40; // ST5C_8@40
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
585 void *v41; // edi@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
586 double v42; // ST5C_8@47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
587 bool v43; // edi@47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
588 char *v44; // esi@48
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
589 char *v45; // ebx@48
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
590 bool v46; // ecx@49
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
591 double v47; // st6@50
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
592 double v48; // st6@51
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
593 double v49; // st5@51
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
594 double v50; // st6@52
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
595 double v51; // ST20_8@54
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
596 double v52; // ST54_8@54
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
597 double v53; // ST44_8@55
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
598 double v54; // ST3C_8@55
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
599 char v55; // zf@55
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
600 double v56; // ST18_8@56
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
601 double v57; // ST34_8@56
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
602 double v58; // ST28_8@57
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
603 double v59; // ST10_8@57
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
604 void *v60; // edi@61
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
605 double v61; // ST5C_8@64
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
606 bool v62; // edi@64
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
607 char *v63; // esi@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
608 char *v64; // ebx@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
609 bool v65; // ecx@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
610 double v66; // st6@67
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
611 double v67; // st6@68
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
612 double v68; // st5@68
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
613 double v69; // st6@69
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
614 double v70; // ST20_8@71
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
615 double v71; // ST54_8@71
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
616 double v72; // ST44_8@72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
617 double v73; // ST3C_8@72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
618 char v74; // zf@72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
619 double v75; // ST18_8@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
620 double v76; // ST34_8@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
621 double v77; // ST28_8@74
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
622 double v78; // ST10_8@74
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
623 void *v79; // edi@78
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
624 int v80; // ebx@81
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
625 char *v81; // ecx@82
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
626 signed int v82; // esi@82
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
627 float v83; // ST78_4@83
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
628 double v84; // ST5C_8@83
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
629 float v85; // eax@84
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
630 double v86; // ST20_8@85
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
631 double v87; // ST54_8@88
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
632 float v88; // eax@89
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
633 double v89; // ST44_8@90
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
634 unsigned __int8 v90; // sf@94
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
635 unsigned __int8 v91; // of@94
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
636 int v92; // edx@97
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
637 int v93; // esi@97
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
638 int v94; // edi@97
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
639 int v95; // eax@97
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
640 int v96; // eax@104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
641 double v97; // [sp+4Ch] [bp-8Ch]@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
642 double v98; // [sp+54h] [bp-84h]@49
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
643 double v99; // [sp+54h] [bp-84h]@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
644 float v100; // [sp+5Ch] [bp-7Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
645 float v101; // [sp+60h] [bp-78h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
646 float v102; // [sp+64h] [bp-74h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
647 double v103; // [sp+6Ch] [bp-6Ch]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
648 float v104; // [sp+A8h] [bp-30h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
649 signed int v105; // [sp+A8h] [bp-30h]@96
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
650 bool v106; // [sp+ACh] [bp-2Ch]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
651 bool v107; // [sp+ACh] [bp-2Ch]@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
652 bool v108; // [sp+ACh] [bp-2Ch]@49
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
653 bool v109; // [sp+ACh] [bp-2Ch]@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
654 signed int v110; // [sp+B0h] [bp-28h]@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
655 char *v111; // [sp+B8h] [bp-20h]@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
656 signed int v112; // [sp+B8h] [bp-20h]@48
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
657 signed int v113; // [sp+B8h] [bp-20h]@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
658 char *v114; // [sp+BCh] [bp-1Ch]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
659 signed int v115; // [sp+BCh] [bp-1Ch]@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
660 signed int v116; // [sp+BCh] [bp-1Ch]@64
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
661 signed int v117; // [sp+C0h] [bp-18h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
662 char *v118; // [sp+C0h] [bp-18h]@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
663 char *v119; // [sp+C0h] [bp-18h]@48
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
664 char *v120; // [sp+C0h] [bp-18h]@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
665 char *v121; // [sp+C4h] [bp-14h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
666 char *v122; // [sp+C4h] [bp-14h]@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
667 signed int v123; // [sp+C4h] [bp-14h]@47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
668 char *v124; // [sp+C8h] [bp-10h]@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
669 char *v125; // [sp+C8h] [bp-10h]@48
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
670 char *v126; // [sp+C8h] [bp-10h]@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
671 signed int v127; // [sp+CCh] [bp-Ch]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
672 char *v128; // [sp+CCh] [bp-Ch]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
673 char *v129; // [sp+CCh] [bp-Ch]@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
674 RenderVertexSoft *v130; // [sp+CCh] [bp-Ch]@48
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
675 RenderVertexSoft *v131; // [sp+CCh] [bp-Ch]@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
676 RenderVertexSoft *v132; // [sp+D0h] [bp-8h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
677 char *v133; // [sp+D0h] [bp-8h]@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
678 char *v134; // [sp+D0h] [bp-8h]@48
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
679 char *v135; // [sp+D0h] [bp-8h]@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
680 signed int v136; // [sp+D4h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
681 char *v137; // [sp+D4h] [bp-4h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
682 RenderVertexSoft *v138; // [sp+D4h] [bp-4h]@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
683 char *v139; // [sp+D4h] [bp-4h]@48
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
684 char *v140; // [sp+D4h] [bp-4h]@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
685
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
686 v101 = (double)(signed int)pViewport->uViewportX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
687 v100 = (double)(signed int)pViewport->uViewportZ;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
688 v117 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
689 v136 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
690 v104 = (double)(signed int)pViewport->uViewportY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
691 v102 = (double)(pViewport->uViewportW + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
692 if ( a1 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
693 return v117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
694 v127 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
695 v1 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
696 memcpy(array_508690, array_50AC10, 4 * ((unsigned int)(48 * a1) >> 2));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
697 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
698 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
699 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
700 if ( array_50AC10[v2].vWorldViewProjX < (double)v101 || array_50AC10[v2].vWorldViewProjX > (double)v100 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
701 v136 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
702 if ( *(float *)(v2 * 48 + 5286956) < (double)v104 || *(float *)(v2 * 48 + 5286956) > (double)v102 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
703 v136 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
704 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
705 --v127;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
706 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
707 while ( v127 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
708 if ( v136 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
709 return v117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
710 v110 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
711 memcpy(&array_50AC10[v1], array_50AC10, sizeof(array_50AC10[v1]));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
712 v4 = array_50AC10[0].vWorldViewProjX + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
713 v5 = SLODWORD(v4) >= (signed int)pViewport->uViewportX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
714 if ( v117 < 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
715 goto LABEL_112;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
716 v6 = (char *)&array_50A2B0[0].vWorldViewProjY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
717 v132 = array_50A2B0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
718 v137 = (char *)&array_50A2B0[0].vWorldViewProjX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
719 v128 = (char *)&array_50A2B0[0].vWorldViewProjY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
720 v121 = (char *)&array_50A2B0[0].flt_2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
721 v114 = (char *)&array_50A2B0[0].flt_20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
722 v7 = (char *)&array_50AC10[0].flt_2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
723 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
724 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
725 v103 = *((float *)v7 + 7) + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
726 v106 = SLODWORD(v103) >= (signed int)pViewport->uViewportX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
727 if ( !(v5 ^ v106) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
728 goto LABEL_25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
729 v8 = v101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
730 if ( SLODWORD(v103) >= (signed int)pViewport->uViewportX )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
731 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
732 v9 = (v8 - *((float *)v7 - 5)) / (*((float *)v7 + 7) - *((float *)v7 - 5));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
733 *(float *)v6 = (*((float *)v7 + 8) - *((float *)v7 - 4)) * v9 + *((float *)v7 - 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
734 *(float *)v114 = (*((float *)v7 + 9) - *((float *)v7 - 3)) * v9 + *((float *)v7 - 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
735 v10 = (*((float *)v7 + 12) - *(float *)v7) * v9 + *(float *)v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
736 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
737 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
738 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
739 v11 = (v8 - *((float *)v7 + 7)) / (*((float *)v7 - 5) - *((float *)v7 + 7));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
740 *(float *)v6 = (*((float *)v7 - 4) - *((float *)v7 + 8)) * v11 + *((float *)v7 + 8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
741 *(float *)v114 = (*((float *)v7 - 3) - *((float *)v7 + 9)) * v11 + *((float *)v7 + 9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
742 v10 = (*(float *)v7 - *((float *)v7 + 12)) * v11 + *((float *)v7 + 12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
743 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
744 *(float *)v121 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
745 *(int *)v137 = LODWORD(v101);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
746 LODWORD(v12) = *(int *)v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
747 if ( v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
748 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
749 v13 = v12 + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
750 v14 = *((float *)v7 - 4) + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
751 if ( LODWORD(v13) == LODWORD(v14) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
752 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
753 v15 = *(float *)v137 + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
754 v16 = *((float *)v7 - 5) + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
755 v17 = LODWORD(v15) == LODWORD(v16);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
756 goto LABEL_23;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
757 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
758 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
759 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
760 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
761 v18 = v12 + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
762 v19 = *((float *)v7 + 8) + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
763 if ( LODWORD(v18) == LODWORD(v19) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
764 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
765 v20 = *(float *)v137 + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
766 v21 = *((float *)v7 + 7) + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
767 v17 = LODWORD(v20) == LODWORD(v21);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
768 LABEL_23:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
769 if ( v17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
770 goto LABEL_25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
771 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
772 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
773 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
774 LABEL_24:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
775 v121 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
776 v114 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
777 v6 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
778 ++v110;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
779 ++v132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
780 v128 = v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
781 v137 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
782 LABEL_25:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
783 if ( v106 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
784 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
785 v22 = v132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
786 v128 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
787 ++v110;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
788 v114 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
789 v121 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
790 v137 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
791 ++v132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
792 memcpy(v22, v7 + 4, 0x30u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
793 v6 = v128;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
794 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
795 v5 = v106;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
796 v7 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
797 --v117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
798 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
799 while ( v117 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
800 if ( v110 < 3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
801 || (v115 = 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
802 memcpy(&array_50A2B0[v110], array_50A2B0, sizeof(array_50A2B0[v110])),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
803 v23 = array_50A2B0[0].vWorldViewProjX + 6.7553994e15,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
804 v24 = SLODWORD(v23) <= (signed int)pViewport->uViewportZ,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
805 v110 < 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
806 goto LABEL_112;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
807 v25 = (char *)&array_509950[0].flt_20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
808 v138 = array_509950;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
809 v129 = (char *)&array_50A2B0[0].vWorldViewProjX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
810 v118 = (char *)&array_50A2B0[0].vWorldViewProjY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
811 v133 = (char *)&array_509950[0].vWorldViewProjX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
812 v122 = (char *)&array_509950[0].vWorldViewProjY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
813 v124 = (char *)&array_509950[0].flt_2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
814 v111 = (char *)&array_509950[0].flt_20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
815 v26 = (char *)&array_50A2B0[0].flt_2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
816 while ( 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
817 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
818 v97 = *((float *)v26 + 7) + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
819 v27 = SLODWORD(v97) <= (signed int)pViewport->uViewportZ;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
820 v107 = SLODWORD(v97) <= (signed int)pViewport->uViewportZ;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
821 if ( v24 != v27 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
822 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
823 v28 = v100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
824 if ( SLODWORD(v97) <= (signed int)pViewport->uViewportZ )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
825 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
826 v29 = (v28 - *((float *)v26 - 5)) / (*((float *)v26 + 7) - *((float *)v26 - 5));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
827 *(float *)v122 = (*((float *)v26 + 8) - *((float *)v26 - 4)) * v29 + *((float *)v26 - 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
828 *(float *)v25 = (*((float *)v26 + 9) - *((float *)v26 - 3)) * v29 + *((float *)v26 - 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
829 v30 = (*((float *)v26 + 12) - *(float *)v26) * v29 + *(float *)v26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
830 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
831 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
832 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
833 v31 = (v28 - *((float *)v26 + 7)) / (*((float *)v26 - 5) - *((float *)v26 + 7));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
834 *(float *)v122 = (*((float *)v26 - 4) - *((float *)v26 + 8)) * v31 + *((float *)v26 + 8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
835 *(float *)v25 = (*((float *)v26 - 3) - *((float *)v26 + 9)) * v31 + *((float *)v26 + 9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
836 v30 = (*(float *)v26 - *((float *)v26 + 12)) * v31 + *((float *)v26 + 12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
837 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
838 *(float *)v124 = v30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
839 *(int *)v133 = LODWORD(v100);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
840 if ( v24 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
841 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
842 v32 = *(float *)v122 + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
843 v33 = *((float *)v26 - 4) + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
844 if ( LODWORD(v32) == LODWORD(v33) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
845 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
846 v34 = *(float *)v133 + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
847 v35 = *((float *)v26 - 5) + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
848 v36 = LODWORD(v34) == LODWORD(v35);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
849 goto LABEL_41;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
850 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
851 goto LABEL_42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
852 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
853 v37 = *(float *)v118 + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
854 v38 = *((float *)v26 + 8) + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
855 if ( LODWORD(v37) != LODWORD(v38) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
856 goto LABEL_42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
857 v39 = *(float *)v129 + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
858 v40 = *((float *)v26 + 7) + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
859 v36 = LODWORD(v39) == LODWORD(v40);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
860 LABEL_41:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
861 if ( !v36 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
862 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
863 LABEL_42:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
864 v129 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
865 v118 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
866 v133 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
867 v122 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
868 v124 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
869 v111 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
870 ++v115;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
871 ++v138;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
872 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
873 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
874 if ( v27 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
875 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
876 v41 = v138;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
877 ++v115;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
878 v111 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
879 v124 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
880 v122 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
881 v133 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
882 v118 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
883 v129 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
884 ++v138;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
885 memcpy(v41, v26 + 4, 0x30u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
886 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
887 v24 = v107;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
888 v26 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
889 --v110;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
890 if ( v110 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
891 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
892 v25 = v111;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
893 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
894 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
895 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
896 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
897 if ( v115 < 3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
898 || (v123 = 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
899 memcpy(&array_509950[v115], array_509950, sizeof(array_509950[v115])),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
900 v42 = array_509950[0].vWorldViewProjY + 6.7553994e15,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
901 v43 = SLODWORD(v42) >= (signed int)pViewport->uViewportY,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
902 v115 < 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
903 goto LABEL_112;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
904 v44 = (char *)&array_508FF0[0].vWorldViewProjX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
905 v130 = array_508FF0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
906 v119 = (char *)&array_508FF0[0].vWorldViewProjX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
907 v139 = (char *)&array_508FF0[0].vWorldViewProjY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
908 v125 = (char *)&array_508FF0[0].flt_2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
909 v134 = (char *)&array_508FF0[0].flt_20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
910 v45 = (char *)&array_509950[0].flt_2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
911 v112 = v115;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
912 while ( 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
913 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
914 v98 = *((float *)v45 + 8) + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
915 v46 = SLODWORD(v98) >= (signed int)pViewport->uViewportY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
916 v108 = SLODWORD(v98) >= (signed int)pViewport->uViewportY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
917 if ( v43 != v46 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
918 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
919 v47 = v104;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
920 if ( SLODWORD(v98) >= (signed int)pViewport->uViewportY )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
921 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
922 v48 = (v47 - *((float *)v45 - 4)) / (*((float *)v45 + 8) - *((float *)v45 - 4));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
923 *(float *)v44 = (*((float *)v45 + 7) - *((float *)v45 - 5)) * v48 + *((float *)v45 - 5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
924 *(float *)v134 = (*((float *)v45 + 9) - *((float *)v45 - 3)) * v48 + *((float *)v45 - 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
925 v49 = (*((float *)v45 + 12) - *(float *)v45) * v48 + *(float *)v45;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
926 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
927 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
928 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
929 v50 = (v47 - *((float *)v45 + 8)) / (*((float *)v45 - 4) - *((float *)v45 + 8));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
930 *(float *)v44 = (*((float *)v45 - 5) - *((float *)v45 + 7)) * v50 + *((float *)v45 + 7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
931 *(float *)v134 = (*((float *)v45 - 3) - *((float *)v45 + 9)) * v50 + *((float *)v45 + 9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
932 v49 = (*(float *)v45 - *((float *)v45 + 12)) * v50 + *((float *)v45 + 12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
933 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
934 *(float *)v125 = v49;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
935 *(float *)v139 = v104;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
936 if ( v43 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
937 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
938 v51 = v104 + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
939 v52 = *((float *)v45 - 4) + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
940 if ( LODWORD(v51) == LODWORD(v52) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
941 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
942 v53 = *(float *)v44 + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
943 v54 = *((float *)v45 - 5) + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
944 v55 = LODWORD(v53) == LODWORD(v54);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
945 goto LABEL_58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
946 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
947 goto LABEL_59;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
948 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
949 v56 = v104 + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
950 v57 = *((float *)v45 + 8) + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
951 if ( LODWORD(v56) != LODWORD(v57) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
952 goto LABEL_59;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
953 v58 = *(float *)v44 + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
954 v59 = *((float *)v45 + 7) + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
955 v55 = LODWORD(v58) == LODWORD(v59);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
956 LABEL_58:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
957 if ( !v55 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
958 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
959 LABEL_59:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
960 v139 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
961 v125 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
962 v134 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
963 v44 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
964 ++v123;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
965 ++v130;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
966 v119 = v44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
967 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
968 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
969 if ( v46 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
970 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
971 v60 = v130;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
972 v119 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
973 ++v123;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
974 v134 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
975 v125 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
976 v139 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
977 ++v130;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
978 memcpy(v60, v45 + 4, 0x30u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
979 v44 = v119;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
980 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
981 v43 = v108;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
982 v45 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
983 --v112;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
984 if ( v112 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
985 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
986 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
987 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
988 if ( v123 < 3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
989 || (v116 = 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
990 memcpy(&array_508FF0[v123], array_508FF0, sizeof(array_508FF0[v123])),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
991 v61 = array_508FF0[0].vWorldViewProjY + 6.7553994e15,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
992 v62 = SLODWORD(v61) <= (signed int)pViewport->uViewportW,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
993 v123 < 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
994 goto LABEL_112;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
995 v63 = (char *)&array_508690[0].vWorldViewProjX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
996 v131 = array_508690;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
997 v120 = (char *)&array_508690[0].vWorldViewProjX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
998 v140 = (char *)&array_508690[0].vWorldViewProjY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
999 v126 = (char *)&array_508690[0].flt_2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1000 v135 = (char *)&array_508690[0].flt_20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1001 v64 = (char *)&array_508FF0[0].flt_2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1002 v113 = v123;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1003 while ( 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1004 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1005 v99 = *((float *)v64 + 8) + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1006 v65 = SLODWORD(v99) <= (signed int)pViewport->uViewportW;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1007 v109 = SLODWORD(v99) <= (signed int)pViewport->uViewportW;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1008 if ( v62 != v65 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1009 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1010 v66 = v102;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1011 if ( SLODWORD(v99) <= (signed int)pViewport->uViewportW )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1012 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1013 v67 = (v66 - *((float *)v64 - 4)) / (*((float *)v64 + 8) - *((float *)v64 - 4));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1014 *(float *)v63 = (*((float *)v64 + 7) - *((float *)v64 - 5)) * v67 + *((float *)v64 - 5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1015 *(float *)v135 = (*((float *)v64 + 9) - *((float *)v64 - 3)) * v67 + *((float *)v64 - 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1016 v68 = (*((float *)v64 + 12) - *(float *)v64) * v67 + *(float *)v64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1017 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1018 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1019 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1020 v69 = (v66 - *((float *)v64 + 8)) / (*((float *)v64 - 4) - *((float *)v64 + 8));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1021 *(float *)v63 = (*((float *)v64 - 5) - *((float *)v64 + 7)) * v69 + *((float *)v64 + 7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1022 *(float *)v135 = (*((float *)v64 - 3) - *((float *)v64 + 9)) * v69 + *((float *)v64 + 9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1023 v68 = (*(float *)v64 - *((float *)v64 + 12)) * v69 + *((float *)v64 + 12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1024 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1025 *(float *)v126 = v68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1026 *(float *)v140 = v102;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1027 if ( v62 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1028 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1029 v70 = v102 + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1030 v71 = *((float *)v64 - 4) + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1031 if ( LODWORD(v70) == LODWORD(v71) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1032 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1033 v72 = *(float *)v63 + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1034 v73 = *((float *)v64 - 5) + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1035 v74 = LODWORD(v72) == LODWORD(v73);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1036 goto LABEL_75;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1037 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1038 goto LABEL_76;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1039 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1040 v75 = v102 + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1041 v76 = *((float *)v64 + 8) + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1042 if ( LODWORD(v75) != LODWORD(v76) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1043 goto LABEL_76;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1044 v77 = *(float *)v63 + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1045 v78 = *((float *)v64 + 7) + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1046 v74 = LODWORD(v77) == LODWORD(v78);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1047 LABEL_75:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1048 if ( !v74 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1049 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1050 LABEL_76:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1051 v140 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1052 v126 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1053 v135 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1054 v63 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1055 ++v116;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1056 ++v131;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1057 v120 = v63;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1058 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1059 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1060 if ( v65 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1061 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1062 v79 = v131;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1063 v120 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1064 ++v116;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1065 v135 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1066 v126 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1067 v140 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1068 ++v131;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1069 memcpy(v79, v64 + 4, 0x30u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1070 v63 = v120;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1071 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1072 v62 = v109;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1073 v64 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1074 --v113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1075 if ( v113 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1076 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1077 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1078 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1079 if ( v116 < 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1080 goto LABEL_112;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1081 v80 = v116;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1082 memcpy(&array_508690[v116], array_508690, sizeof(array_508690[v116]));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1083 if ( v116 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1084 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1085 v81 = (char *)&array_508690[0].vWorldViewProjX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1086 v82 = v116;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1087 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1088 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1089 LODWORD(v83) = *(int *)v81;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1090 *((float *)v81 - 3) = 1.0 / *((float *)v81 + 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1091 v84 = v83 + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1092 if ( SLODWORD(v84) <= (signed int)pViewport->uViewportZ )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1093 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1094 v86 = *(float *)v81 + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1095 if ( SLODWORD(v86) >= (signed int)pViewport->uViewportX )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1096 goto LABEL_88;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1097 v85 = v101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1098 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1099 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1100 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1101 v85 = v100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1102 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1103 *(int *)v81 = LODWORD(v85);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1104 LABEL_88:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1105 v87 = *((float *)v81 + 1) + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1106 if ( SLODWORD(v87) > (signed int)pViewport->uViewportW )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1107 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1108 v88 = v102;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1109 LABEL_92:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1110 *((int *)v81 + 1) = LODWORD(v88);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1111 goto LABEL_93;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1112 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1113 v89 = *((float *)v81 + 1) + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1114 if ( SLODWORD(v89) < (signed int)pViewport->uViewportY )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1115 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1116 v88 = v104;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1117 goto LABEL_92;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1118 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1119 LABEL_93:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1120 v81 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1121 --v82;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1122 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1123 while ( v82 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1124 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1125 v91 = __OFSUB__(v116, 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1126 v90 = v116 - 3 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1127 if ( v116 > 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1128 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1129 memcpy(&array_508690[v116 + 1], &array_508690[1], sizeof(array_508690[v116 + 1]));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1130 if ( v116 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1131 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1132 v105 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1133 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1134 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1135 v92 = v105;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1136 v93 = v105 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1137 v94 = v105 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1138 v95 = v105 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1139 if ( v105 - 1 >= v80 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1140 v93 -= v80;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1141 if ( v105 >= v80 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1142 v92 = v105 - v80;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1143 if ( v94 >= v80 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1144 v95 = v94 - v80;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1145 if ( (array_508690[v92].vWorldViewProjX - array_508690[v93].vWorldViewProjX)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1146 * (array_508690[v95].vWorldViewProjY - array_508690[v93].vWorldViewProjY)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1147 - (array_508690[v95].vWorldViewProjX - array_508690[v93].vWorldViewProjX)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1148 * (array_508690[v92].vWorldViewProjY - array_508690[v93].vWorldViewProjY) < 0.0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1149 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1150 ++v105;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1151 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1152 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1153 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1154 v96 = v105;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1155 if ( v105 < v80 || (v96 = v105 - v80, v105 - v80 < v80) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1156 memcpy(&array_508690[v96], &array_508690[v96 + 1], 4 * ((unsigned int)(48 * v80 - 48 * v96) >> 2));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1157 --v80;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1158 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1159 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1160 while ( v105 - 1 < v80 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1161 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1162 v91 = __OFSUB__(v80, 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1163 v90 = v80 - 3 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1164 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1165 if ( v90 ^ v91 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1166 LABEL_112:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1167 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1168 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1169 result = v80;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1170 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1171 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1172
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1173 //----- (0042620A) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1174 bool __thiscall sr_42620A(RenderVertexSoft *p)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1175 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1176 __int16 v1; // fps@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1177 unsigned __int8 v2; // c0@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1178 char v3; // c2@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1179 unsigned __int8 v4; // c3@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1180 bool result; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1181 unsigned __int8 v6; // c0@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1182 char v7; // c2@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1183 unsigned __int8 v8; // c3@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1184 unsigned __int8 v9; // c0@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1185 char v10; // c2@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1186 unsigned __int8 v11; // c3@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1187 double v12; // st6@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1188 float v13; // ST04_4@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1189 float v14; // ST00_4@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1190 double v15; // st7@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1191 double v16; // st6@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1192 float v17; // ST04_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1193 float v18; // ST00_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1194 double v19; // st7@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1195
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1196 //UNDEF(v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1197 if ( p->vWorldViewPosition.x < 300.0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1198 || (v2 = 300.0 < p[1].vWorldViewPosition.x,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1199 v3 = 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1200 v4 = 300.0 == p[1].vWorldViewPosition.x,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1201 BYTE1(result) = HIBYTE(v1),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1202 !(v2 | v4)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1203 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1204 if ( p->vWorldViewPosition.x < 300.0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1205 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1206 v6 = 300.0 < p[1].vWorldViewPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1207 v7 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1208 v8 = 300.0 == p[1].vWorldViewPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1209 BYTE1(result) = HIBYTE(v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1210 if ( !(v6 | v8) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1211 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1212 LOBYTE(result) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1213 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1214 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1215 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1216 v9 = 300.0 < p->vWorldViewPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1217 v10 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1218 v11 = 300.0 == p->vWorldViewPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1219 BYTE1(result) = HIBYTE(v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1220 if ( v9 | v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1221 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1222 v16 = 1.0 / (p->vWorldViewPosition.x - p[1].vWorldViewPosition.x);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1223 v17 = (p->vWorldViewPosition.y - p[1].vWorldViewPosition.y) * v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1224 v18 = (p->vWorldViewPosition.z - p[1].vWorldViewPosition.z) * v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1225 v19 = 300.0 - p[1].vWorldViewPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1226 p[1].vWorldViewPosition.x = v19 + p[1].vWorldViewPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1227 p[1].vWorldViewPosition.y = v17 * v19 + p[1].vWorldViewPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1228 p[1].vWorldViewPosition.z = v19 * v18 + p[1].vWorldViewPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1229 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1230 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1231 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1232 v12 = 1.0 / (p[1].vWorldViewPosition.x - p->vWorldViewPosition.x);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1233 v13 = (p[1].vWorldViewPosition.y - p->vWorldViewPosition.y) * v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1234 v14 = (p[1].vWorldViewPosition.z - p->vWorldViewPosition.z) * v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1235 v15 = 300.0 - p->vWorldViewPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1236 p->vWorldViewPosition.x = v15 + p->vWorldViewPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1237 p->vWorldViewPosition.y = v13 * v15 + p->vWorldViewPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1238 p->vWorldViewPosition.z = v15 * v14 + p->vWorldViewPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1239 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1240 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1241 LOBYTE(result) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1242 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1243 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1244
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1245
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1246
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1247
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1248 //----- (004268E3) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1249 int __fastcall _4268E3_smthn_to_a1r5g5b5(unsigned int uColor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1250 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1251 unsigned int v1; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1252 unsigned int v2; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1253 int v3; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1254 int v4; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1255 unsigned int v5; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1256
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1257 v1 = uColor >> 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1258 v2 = uColor >> 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1259 LOWORD(v1) = (uColor >> 9) & 0x7C00;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1260 LOWORD(v2) = (uColor >> 6) & 0x3E0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1261 v3 = v2 | v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1262 v4 = (unsigned __int8)uColor >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1263 v5 = uColor >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1264 LOWORD(v5) = v5 & 0x8000;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1265 return v5 | v4 | v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1266 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1267
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1268 //----- (0042690D) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1269 int __fastcall _42690D_colors_cvt(unsigned int a1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1270 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1271 unsigned int v1; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1272 unsigned int v2; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1273
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1274 v1 = a1 >> 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1275 v2 = a1 >> 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1276 LOWORD(v1) = (a1 >> 8) & 0xF800;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1277 LOWORD(v2) = (a1 >> 5) & 0x7E0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1278 return ((unsigned __int8)a1 >> 3) | v2 | v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1279 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1280
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1281 //----- (00426947) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1282 void __cdecl sub_426947()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1283 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1284 dword_50C968 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1285 dword_50C994 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1286 dword_50C998_turnbased_icon_1A = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1287 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1288 // 50C968: using guessed type int dword_50C968;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1289 // 50C994: using guessed type int dword_50C994;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1290 // 50C998: using guessed type int dword_50C998_turnbased_icon_1A;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1291
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1292
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1293
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1294 //----- (004269A2) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1295 int __fastcall sub_4269A2_GivePartyExp(unsigned int a1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1296 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1297 unsigned __int64 v1; // qax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1298 signed int v2; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1299 char *v3; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1300 bool v4; // edi@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1301 char *v5; // edi@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1302 char *v6; // esi@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1303 int v7; // eax@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1304 unsigned __int8 v8; // cf@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1305 char v10; // [sp+Ch] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1306 int v11; // [sp+1Ch] [bp-4h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1307
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1308 v1 = __PAIR__((int)((char *)&pParty + 2620), a1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1309 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1310 v3 = &v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1311 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1312 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1313 v4 = !(*(int *)(HIDWORD(v1) - 4) | *(int *)(HIDWORD(v1) - 8))
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1314 && !*(int *)HIDWORD(v1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1315 && !*(_QWORD *)(HIDWORD(v1) + 8)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1316 && !*(_QWORD *)(HIDWORD(v1) + 16);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1317 *(int *)v3 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1318 HIDWORD(v1) += 6972;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1319 v2 += v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1320 v3 += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1321 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1322 while ( SHIDWORD(v1) < (signed int)&pParty->pHirelings[1].field_24 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1323 if ( v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1324 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1325 LODWORD(v1) = (signed int)v1 / v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1326 v5 = &v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1327 v6 = (char *)&pParty->pPlayers[0].uExperience;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1328 v11 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1329 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1330 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1331 if ( *(int *)v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1332 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1333 if ( v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1334 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1335 LOBYTE(v7) = ((Player *)(v6 - 160))->GetLearningPercent();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1336 v1 = v11 + v11 * v7 / 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1337 v8 = __CFADD__((int)v1, *(int *)v6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1338 *(int *)v6 += v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1339 *((int *)v6 + 1) += HIDWORD(v1) + v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1340 if ( *(_QWORD *)v6 > 4000000000i64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1341 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1342 *((int *)v6 + 1) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1343 *(int *)v6 = -294967296;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1344 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1345 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1346 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1347 v6 += 6972;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1348 v5 += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1349 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1350 while ( (signed int)v6 < (signed int)&pParty->pPickedItem._bonus_strength );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1351 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1352 return v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1353 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1354
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1355 //----- (00426A5A) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1356 void stru319::LootActor(Actor *pActor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1357 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1358 signed int v2; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1359 char v3; // zf@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1360 unsigned int v4; // eax@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1361 unsigned int v5; // esi@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1362 int v6; // eax@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1363 unsigned __int8 v7; // al@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1364 Party *v8; // esi@34
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1365 char *v9; // [sp-4h] [bp-3Ch]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1366 char *v10; // [sp-4h] [bp-3Ch]@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1367 char *v11; // [sp-4h] [bp-3Ch]@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1368 ItemGen Dst; // [sp+Ch] [bp-2Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1369 int v13; // [sp+30h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1370 int v14; // [sp+34h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1371
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1372 sub_421B2C_PlaceInInventory_or_DropPickedItem();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1373 Dst.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1374 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1375 v3 = ((unsigned int)&array_77EC08[1975].pEdgeList1[1] & pActor->uAttributes) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1376 v13 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1377 v14 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1378 if ( v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1379 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1380 if ( !pActor->pMonsterInfo.uTreasureDiceRolls )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1381 goto LABEL_9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1382 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1383 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1384 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1385 v14 += rand() % pActor->pMonsterInfo.uTreasureDiceSides + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1386 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1387 while ( v2 < pActor->pMonsterInfo.uTreasureDiceRolls );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1388 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1389 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1390 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1391 if ( pItemsTable->pItems[pActor->array_000234[3].uItemID].uEquipType != 18 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1392 goto LABEL_9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1393 v14 = pActor->array_000234[3].uAdditionalValue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1394 pActor->array_000234[3].Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1395 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1396 if ( v14 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1397 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1398 party_finds_gold(v14, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1399 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1400 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1401 LABEL_9:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1402 if ( pActor->uCarriedItemID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1403 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1404 Dst.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1405 Dst.uItemID = pActor->uCarriedItemID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1406 v9 = pItemsTable->pItems[Dst.uItemID].pUnidentifiedName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1407 if ( v14 )
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 82
diff changeset
1408 sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[490], v14, v9);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1409 else
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 82
diff changeset
1410 sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[471], v9);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1411 ShowStatusBarString(pTmpBuf2, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1412 v4 = Dst.uItemID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1413 v5 = Dst.uItemID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1414 if ( pItemsTable->pItems[Dst.uItemID].uEquipType == 12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1415 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1416 v5 = Dst.uItemID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1417 v6 = rand() % 6 + pItemsTable->pItems[Dst.uItemID].uDamageMod + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1418 Dst.uNumCharges = v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1419 Dst.uMaxCharges = v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1420 v4 = Dst.uItemID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1421 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1422 if ( pItemsTable->pItems[v5].uEquipType == 14 && v4 != 220 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1423 Dst._bonus_type = 2 * rand() % 4 + 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1424 pItemsTable->SetSpecialBonus(&Dst);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1425 if ( !pParty->AddItem(&Dst) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1426 pParty->SetHoldingItem(&Dst);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1427 pActor->uCarriedItemID = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1428 if ( pActor->array_000234[0].uItemID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1429 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1430 if ( !pParty->AddItem(pActor->array_000234) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1431 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1432 sub_421B2C_PlaceInInventory_or_DropPickedItem();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1433 pParty->SetHoldingItem(pActor->array_000234);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1434 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1435 pActor->array_000234[0].Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1436 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1437 if ( pActor->array_000234[1].uItemID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1438 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1439 if ( !pParty->AddItem(&pActor->array_000234[1]) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1440 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1441 sub_421B2C_PlaceInInventory_or_DropPickedItem();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1442 pParty->SetHoldingItem(&pActor->array_000234[1]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1443 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1444 pActor->array_000234[1].Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1445 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1446 LABEL_55:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1447 pActor->Remove();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1448 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1449 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1450 if ( (unsigned int)&array_77EC08[1975].pEdgeList1[1] & pActor->uAttributes )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1451 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1452 if ( pActor->array_000234[3].uItemID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1453 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1454 memcpy(&Dst, &pActor->array_000234[3], sizeof(Dst));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1455 pActor->array_000234[3].Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1456 v11 = pItemsTable->pItems[Dst.uItemID].pUnidentifiedName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1457 if ( v14 )
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 82
diff changeset
1458 sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[490], v14, v11);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1459 else
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 82
diff changeset
1460 sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[471], v11);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1461 ShowStatusBarString(pTmpBuf2, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1462 if ( !pParty->AddItem(&Dst) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1463 pParty->SetHoldingItem(&Dst);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1464 v13 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1465 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1466 goto LABEL_44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1467 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1468 if ( rand() % 100 >= pActor->pMonsterInfo.uTreasureDropChance || (v7 = pActor->pMonsterInfo.uTreasureLevel) == 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1469 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1470 LABEL_44:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1471 v8 = pParty;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1472 goto LABEL_45;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1473 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1474 pItemsTable->GenerateItem(v7, pActor->pMonsterInfo.uTreasureType, &Dst);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1475 v10 = pItemsTable->pItems[Dst.uItemID].pUnidentifiedName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1476 if ( v14 )
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 82
diff changeset
1477 sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[490], v14, v10);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1478 else
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 82
diff changeset
1479 sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[471], v10);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1480 ShowStatusBarString(pTmpBuf2, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1481 v8 = pParty;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1482 if ( !pParty->AddItem(&Dst) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1483 pParty->SetHoldingItem(&Dst);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1484 v13 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1485 LABEL_45:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1486 if ( pActor->array_000234[0].uItemID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1487 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1488 if ( !v8->AddItem(pActor->array_000234) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1489 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1490 sub_421B2C_PlaceInInventory_or_DropPickedItem();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1491 v8->SetHoldingItem(pActor->array_000234);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1492 v13 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1493 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1494 pActor->array_000234[0].Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1495 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1496 if ( pActor->array_000234[1].uItemID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1497 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1498 if ( !v8->AddItem(&pActor->array_000234[1]) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1499 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1500 sub_421B2C_PlaceInInventory_or_DropPickedItem();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1501 v8->SetHoldingItem(&pActor->array_000234[1]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1502 v13 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1503 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1504 pActor->array_000234[1].Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1505 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1506 if ( !v13 || rand() % 100 < 90 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1507 goto LABEL_55;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1508 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1509
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1510 //----- (00426E10) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1511 int stru319::which_player_would_attack(Actor *pActor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1512 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1513 signed int v2; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1514 int v3; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1515 signed int v4; // edx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1516 char v5; // zf@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1517 unsigned int v6; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1518 int v7; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1519 int v8; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1520 int v9; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1521 int v10; // eax@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1522 int v11; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1523 int v12; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1524 int v13; // esi@35
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1525 signed int v14; // edi@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1526 enum CHARACTER_RACE v15; // eax@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1527 Player *v16; // ecx@47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1528 unsigned __int8 v17; // sf@50
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1529 unsigned __int8 v18; // of@50
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1530 int v19; // esi@52
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1531 Player *v20; // ecx@53
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1532 int result; // eax@57
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1533 int v22[16]; // [sp+8h] [bp-140h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1534 int v23[60]; // [sp+48h] [bp-100h]@48
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1535 int v24; // [sp+138h] [bp-10h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1536 int v25; // [sp+13Ch] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1537 int v26; // [sp+140h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1538 int v27; // [sp+144h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1539
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1540 v27 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1541 v26 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1542 v25 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1543 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1544 if ( pActor->pMonsterInfo.uAttackPreference )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1545 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1546 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1547 v24 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1548 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1549 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1550 v4 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1551 v6 = pActor->pMonsterInfo.uAttackPreference & (1 << v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1552 v5 = (pActor->pMonsterInfo.uAttackPreference & (1 << v3)) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1553 v22[v3] = v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1554 if ( !v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1555 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1556 if ( (signed int)v6 > 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1557 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1558 switch ( v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1559 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1560 case 0x100u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1561 v27 = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1562 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1563 case 0x200u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1564 v25 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1565 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1566 case 0x400u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1567 v25 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1568 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1569 case 0x800u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1570 v26 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1571 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1572 case 0x1000u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1573 v26 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1574 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1575 case 0x2000u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1576 v26 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1577 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1578 case 0x4000u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1579 v26 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1580 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1581 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1582 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1583 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1584 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1585 if ( v6 == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1586 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1587 v27 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1588 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1589 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1590 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1591 v7 = v6 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1592 if ( v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1593 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1594 v8 = v7 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1595 if ( v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1596 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1597 v9 = v8 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1598 if ( v9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1599 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1600 v10 = v9 - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1601 if ( v10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1602 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1603 v11 = v10 - 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1604 if ( v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1605 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1606 v12 = v11 - 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1607 if ( v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1608 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1609 if ( v12 == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1610 v27 = 20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1611 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1612 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1613 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1614 v27 = 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1615 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1616 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1617 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1618 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1619 v27 = 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1620 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1621 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1622 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1623 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1624 v27 = 28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1625 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1626 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1627 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1628 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1629 v27 = 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1630 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1631 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1632 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1633 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1634 v27 = 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1635 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1636 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1637 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1638 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1639 v27 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1640 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1641 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1642 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1643 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1644 v13 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1645 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1646 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1647 v14 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1648 if ( v27 != -1 && v27 == pPlayers[v13 + 1]->uClass )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1649 v14 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1650 if ( v25 != -1 && v25 == pPlayers[v13 + 1]->uSex )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1651 v14 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1652 if ( v26 != -1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1653 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1654 v15 = pPlayers[v13 + 1]->GetRace();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1655 if ( v26 == v15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1656 v14 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1657 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1658 if ( v14 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1659 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1660 v16 = pPlayers[v13 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1661 if ( !(v16->pConditions[12] | v16->pConditions[13] | v16->pConditions[14] | v16->pConditions[15] | v16->pConditions[16]) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1662 v23[v2++] = v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1663 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1664 ++v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1665 if ( v13 >= 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1666 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1667 v4 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1668 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1669 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1670 v3 = v24 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1671 v18 = __OFSUB__(v24 + 1, 15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1672 v17 = v24++ - 14 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1673 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1674 while ( v17 ^ v18 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1675 if ( v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1676 goto LABEL_61;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1677 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1678 v19 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1679 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1680 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1681 v20 = pPlayers[v19 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1682 if ( !(v20->pConditions[12] | v20->pConditions[13] | v20->pConditions[14] | v20->pConditions[15] | v20->pConditions[16]) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1683 v23[v2++] = v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1684 ++v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1685 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1686 while ( v19 < 4 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1687 if ( v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1688 LABEL_61:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1689 result = v23[rand() % v2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1690 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1691 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1692 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1693 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1694
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1695
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1696 //----- (0042704B) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1697 bool stru319::special_ability_use_check(Actor *pActor, int a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1698 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1699 stru319 *v3; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1700 signed int v4; // ebx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1701 signed int v5; // edi@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1702
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1703 v3 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1704 if ( pActor->pMonsterInfo.uSpecialAbilityType == 2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1705 && pActor->pMonsterInfo.uSpecialAbilityDamageDiceBonus < 3u
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1706 && rand() % 100 < 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1707 pActor->_44FD29(a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1708 v4 = v3->_427102(pActor, pActor->pMonsterInfo.uSpell1ID);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1709 v5 = v3->_427102(pActor, pActor->pMonsterInfo.uSpell2ID);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1710 if ( v4 && pActor->pMonsterInfo.uSpell1UseChance && rand() % 100 < pActor->pMonsterInfo.uSpell1UseChance )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1711 return 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1712 if ( v5 && pActor->pMonsterInfo.uSpell2UseChance && rand() % 100 < pActor->pMonsterInfo.uSpell2UseChance )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1713 return 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1714 return pActor->pMonsterInfo.uAttack2Chance && rand() % 100 < pActor->pMonsterInfo.uAttack2Chance;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1715 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1716
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1717 //----- (00427102) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1718 int stru319::_427102(Actor *pActor, signed int a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1719 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1720 unsigned __int8 v3; // cf@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1721 unsigned __int8 v4; // zf@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1722 SpellBuff *v6; // ecx@46
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1723 char *v7; // esi@49
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1724 signed int v8; // edx@50
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1725 char *v9; // ecx@50
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1726
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1727 if ( a2 > 73 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1728 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1729 if ( a2 == 77 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1730 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1731 if ( pActor->sCurrentHP >= (signed int)pActor->pMonsterInfo.uHP )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1732 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1733 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1734 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1735 if ( a2 == 80 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1736 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1737 v6 = pParty->pPartyBuffs;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1738 while ( (signed __int64)v6->uExpireTime <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1739 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1740 ++v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1741 if ( (signed int)v6 >= (signed int)pParty->pPlayers )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1742 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1743 v7 = (char *)pParty->pPlayers[0].pPlayerBuffs;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1744 LABEL_50:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1745 v8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1746 v9 = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1747 while ( *(_QWORD *)v9 <= 0i64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1748 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1749 ++v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1750 v9 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1751 if ( v8 >= 24 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1752 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1753 v7 += 6972;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1754 if ( (signed int)v7 < (signed int)&pParty->field_871C[464] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1755 goto LABEL_50;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1756 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1757 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1758 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1759 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1760 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1761 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1762 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1763 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1764 if ( a2 == 85 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1765 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1766 if ( SHIDWORD(pActor->pActorBuffs[13].uExpireTime) < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1767 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1768 if ( SHIDWORD(pActor->pActorBuffs[13].uExpireTime) > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1769 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1770 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1771 v4 = LODWORD(pActor->pActorBuffs[13].uExpireTime) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1772 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1773 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1774 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1775 if ( a2 == 86 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1776 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1777 if ( SHIDWORD(pActor->pActorBuffs[14].uExpireTime) < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1778 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1779 if ( SHIDWORD(pActor->pActorBuffs[14].uExpireTime) > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1780 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1781 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1782 v4 = LODWORD(pActor->pActorBuffs[14].uExpireTime) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1783 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1784 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1785 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1786 if ( a2 != 95 || SHIDWORD(pActor->pActorBuffs[20].uExpireTime) < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1787 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1788 if ( SHIDWORD(pActor->pActorBuffs[20].uExpireTime) > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1789 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1790 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1791 v4 = LODWORD(pActor->pActorBuffs[20].uExpireTime) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1792 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1793 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1794 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1795 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1796 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1797 if ( a2 == 73 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1798 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1799 if ( SHIDWORD(pActor->pActorBuffs[21].uExpireTime) < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1800 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1801 if ( SHIDWORD(pActor->pActorBuffs[21].uExpireTime) > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1802 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1803 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1804 v4 = LODWORD(pActor->pActorBuffs[21].uExpireTime) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1805 goto LABEL_15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1806 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1807 if ( a2 == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1808 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1809 if ( SHIDWORD(pActor->pActorBuffs[19].uExpireTime) < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1810 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1811 if ( SHIDWORD(pActor->pActorBuffs[19].uExpireTime) > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1812 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1813 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1814 v4 = LODWORD(pActor->pActorBuffs[19].uExpireTime) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1815 goto LABEL_15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1816 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1817 if ( a2 == 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1818 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1819 if ( SHIDWORD(pActor->pActorBuffs[15].uExpireTime) < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1820 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1821 if ( SHIDWORD(pActor->pActorBuffs[15].uExpireTime) > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1822 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1823 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1824 v4 = LODWORD(pActor->pActorBuffs[15].uExpireTime) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1825 goto LABEL_15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1826 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1827 if ( a2 == 38 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1828 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1829 if ( SHIDWORD(pActor->pActorBuffs[16].uExpireTime) < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1830 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1831 if ( SHIDWORD(pActor->pActorBuffs[16].uExpireTime) > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1832 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1833 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1834 v4 = LODWORD(pActor->pActorBuffs[16].uExpireTime) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1835 goto LABEL_15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1836 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1837 if ( a2 == 46 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1838 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1839 if ( SHIDWORD(pActor->pActorBuffs[17].uExpireTime) < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1840 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1841 if ( SHIDWORD(pActor->pActorBuffs[17].uExpireTime) > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1842 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1843 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1844 v4 = LODWORD(pActor->pActorBuffs[17].uExpireTime) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1845 goto LABEL_15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1846 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1847 if ( a2 != 47 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1848 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1849 if ( a2 != 51 || SHIDWORD(pActor->pActorBuffs[18].uExpireTime) < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1850 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1851 if ( SHIDWORD(pActor->pActorBuffs[18].uExpireTime) <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1852 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1853 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1854 v4 = LODWORD(pActor->pActorBuffs[18].uExpireTime) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1855 goto LABEL_15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1856 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1857 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1858 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1859 if ( SHIDWORD(pActor->pActorBuffs[11].uExpireTime) < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1860 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1861 if ( SHIDWORD(pActor->pActorBuffs[11].uExpireTime) > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1862 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1863 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1864 v4 = LODWORD(pActor->pActorBuffs[11].uExpireTime) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1865 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1866 LABEL_15:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1867 if ( !(v3 | v4) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1868 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1869 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1870 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1871
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1872 //----- (004272F5) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1873 int stru319::PlayerHitOrMiss(Player *pPlayer, Actor *pActor, int a3, int a4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1874 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1875 signed int v5; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1876 signed int v6; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1877 int v7; // esi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1878 int v8; // eax@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1879 int v9; // edx@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1880 int v10; // edx@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1881 int v11; // esi@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1882 unsigned __int8 v12; // sf@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1883 unsigned __int8 v13; // of@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1884 int v14; // edx@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1885 int v15; // eax@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1886 signed int result; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1887
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1888 v5 = pActor->pMonsterInfo.uAC;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1889 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1890 if ( (signed __int64)pActor->pActorBuffs[8].uExpireTime > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1891 v5 /= 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1892 if ( (signed __int64)pActor->pActorBuffs[14].uExpireTime > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1893 v6 = pActor->pActorBuffs[15].uPower;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1894 if ( (signed __int64)pActor->pActorBuffs[16].uExpireTime > 0 && pActor->pActorBuffs[16].uPower > v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1895 v6 = pActor->pActorBuffs[16].uPower;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1896 v7 = v6 + v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1897 if ( a3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1898 v8 = pPlayer->GetRangedAttack();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1899 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1900 v8 = pPlayer->GetActualAttack(0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1901 v9 = rand() % (v7 + 2 * v8 + 30);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1902 if ( a3 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1903 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1904 v14 = a4 + v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1905 v15 = ((v7 + 15) >> 1) + v7 + 15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1906 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1907 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1908 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1909 if ( a3 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1910 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1911 v10 = a4 + v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1912 v11 = v7 + 15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1913 v13 = __OFSUB__(v10, v11);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1914 v12 = v10 - v11 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1915 goto LABEL_16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1916 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1917 v14 = a4 + v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1918 v15 = 2 * v7 + 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1919 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1920 v13 = __OFSUB__(v14, v15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1921 v12 = v14 - v15 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1922 LABEL_16:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1923 if ( v12 ^ v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1924 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1925 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1926 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1927 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1928 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1929
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1930 //----- (004273BB) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1931 bool stru319::_4273BB(Actor *pActor, Actor *a2, int a3, int a4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1932 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1933 Actor *v5; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1934 signed int v6; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1935 signed int v7; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1936 unsigned __int8 v8; // zf@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1937 unsigned __int8 v9; // sf@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1938 int v10; // ebx@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1939 signed int a2a; // [sp+18h] [bp+Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1940
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1941 v5 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1942 v6 = a2->pMonsterInfo.uAC;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1943 v7 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1944 v8 = HIDWORD(a2->pActorBuffs[8].uExpireTime) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1945 v9 = SHIDWORD(a2->pActorBuffs[8].uExpireTime) < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1946 a2a = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1947 if ( !v9 && (!(v9 | v8) || LODWORD(v5->pActorBuffs[8].uExpireTime) > 0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1948 v6 /= 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1949 if ( (signed __int64)v5->pActorBuffs[14].uExpireTime > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1950 v7 = v5->pActorBuffs[14].uPower;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1951 if ( (signed __int64)v5->pActorBuffs[16].uExpireTime > 0 && v5->pActorBuffs[16].uPower > v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1952 v7 = v5->pActorBuffs[16].uPower;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1953 v10 = v7 + v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1954 if ( (signed __int64)pActor->pActorBuffs[14].uExpireTime > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1955 a2a = pActor->pActorBuffs[14].uPower;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1956 if ( (signed __int64)pActor->pActorBuffs[17].uExpireTime > 0 && pActor->pActorBuffs[17].uPower > a2a )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1957 a2a = pActor->pActorBuffs[17].uPower;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1958 if ( (signed __int64)pActor->pActorBuffs[11].uExpireTime > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1959 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1960 a2a += pActor->pActorBuffs[11].uPower;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1961 pActor->pActorBuffs[11].Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1962 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1963 return rand() % (v10 + 2 * pActor->pMonsterInfo.uLevel + 10) + a2a + 1 > v10 + 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1964 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1965
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1966 //----- (004274AD) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1967 bool stru319::ActorHitOrMiss(Actor *pActor, Player *pPlayer)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1968 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1969 signed int v3; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1970 signed int v4; // esi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1971 int v5; // esi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1972
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1973 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1974 if ( (signed __int64)pActor->pActorBuffs[14].uExpireTime > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1975 v3 = pActor->pActorBuffs[14].uPower;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1976 if ( (signed __int64)pActor->pActorBuffs[17].uExpireTime > 0 && pActor->pActorBuffs[17].uPower > v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1977 v3 = pActor->pActorBuffs[17].uPower;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1978 if ( (signed __int64)pActor->pActorBuffs[11].uExpireTime > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1979 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1980 v3 += pActor->pActorBuffs[11].uPower;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1981 pActor->pActorBuffs[11].Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1982 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1983 v4 = pPlayer->GetActualAC() + 2 * pActor->pMonsterInfo.uLevel + 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1984 v5 = rand() % v4 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1985 return v3 + v5 > pPlayer->GetActualAC() + 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1986 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1987
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1988 //----- (00427546) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1989 int stru319::_427546(int a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1990 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1991 int result; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1992
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1993 if ( a2 >= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1994 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1995 if ( a2 >= 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1996 result = (a2 >= 2) + 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1997 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1998 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1999 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2000 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2001 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2002 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2003 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2004 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2005 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2006
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2007 //----- (0042756B) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2008 int stru319::CalcMagicalDamageToActor(Actor *pActor, int a2, signed int a3)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2009 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2010 int v4; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2011 int v5; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2012 signed int v6; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2013 signed int result; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2014 signed int v8; // esi@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2015
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2016 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2017 v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2018 if ( (signed __int64)pActor->pActorBuffs[14].uExpireTime > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2019 v5 = pActor->pActorBuffs[14].uPower;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2020 switch ( a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2021 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2022 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2023 v6 = pActor->pMonsterInfo.uResPhysical;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2024 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2025 case 0:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2026 v6 = pActor->pMonsterInfo.uResFire;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2027 goto LABEL_12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2028 case 1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2029 v6 = pActor->pMonsterInfo.uResAir;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2030 goto LABEL_12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2031 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2032 v6 = pActor->pMonsterInfo.uResWater;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2033 goto LABEL_12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2034 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2035 v6 = pActor->pMonsterInfo.uResEarth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2036 goto LABEL_12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2037 case 6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2038 v6 = pActor->pMonsterInfo.uResSpirit;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2039 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2040 case 7:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2041 v6 = pActor->pMonsterInfo.uResMind;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2042 goto LABEL_12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2043 case 8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2044 v6 = pActor->pMonsterInfo.uResBody;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2045 LABEL_12:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2046 v4 = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2047 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2048 case 9:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2049 v6 = pActor->pMonsterInfo.uResLight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2050 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2051 case 10:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2052 v6 = pActor->pMonsterInfo.uResDark;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2053 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2054 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2055 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2056 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2057 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2058 if ( v6 < 200 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2059 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2060 v8 = v4 + v6 + 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2061 if ( rand() % v8 >= 30 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2062 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2063 a3 >>= 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2064 if ( rand() % v8 >= 30 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2065 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2066 a3 >>= 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2067 if ( rand() % v8 >= 30 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2068 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2069 a3 >>= 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2070 if ( rand() % v8 >= 30 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2071 a3 >>= 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2072 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2073 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2074 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2075 result = a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2076 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2077 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2078 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2079 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2080 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2081 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2082 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2083
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2084 //----- (00427662) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2085 bool stru319::GetMagicalResistance(Actor *pActor, unsigned int uType)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2086 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2087 Actor *v3; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2088 signed int v4; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2089 bool result; // eax@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2090
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2091 switch ( uType )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2092 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2093 case 0u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2094 v3 = pActor;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2095 v4 = pActor->pMonsterInfo.uResFire;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2096 goto LABEL_12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2097 case 1u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2098 v3 = pActor;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2099 v4 = pActor->pMonsterInfo.uResAir;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2100 goto LABEL_12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2101 case 2u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2102 v3 = pActor;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2103 v4 = pActor->pMonsterInfo.uResWater;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2104 goto LABEL_12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2105 case 3u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2106 v3 = pActor;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2107 v4 = pActor->pMonsterInfo.uResEarth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2108 goto LABEL_12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2109 case 7u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2110 v3 = pActor;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2111 v4 = pActor->pMonsterInfo.uResMind;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2112 goto LABEL_12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2113 case 6u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2114 v3 = pActor;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2115 v4 = pActor->pMonsterInfo.uResSpirit;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2116 goto LABEL_12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2117 case 8u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2118 v3 = pActor;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2119 v4 = pActor->pMonsterInfo.uResBody;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2120 goto LABEL_12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2121 case 9u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2122 v3 = pActor;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2123 v4 = pActor->pMonsterInfo.uResLight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2124 goto LABEL_12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2125 case 0xAu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2126 v3 = pActor;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2127 v4 = pActor->pMonsterInfo.uResDark;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2128 goto LABEL_12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2129 case 4u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2130 v3 = pActor;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2131 v4 = pActor->pMonsterInfo.uResPhysical;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2132 LABEL_12:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2133 if ( v4 < 200 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2134 result = rand() % (signed int)(((unsigned int)v3->pMonsterInfo.uLevel >> 2) + v4 + 30) < 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2135 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2136 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2137 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2138 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2139 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2140 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2141 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2142 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2143 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2144
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2145
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2146 //----- (00427769) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2147 bool __fastcall sub_427769_spell(unsigned int uSpellID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2148 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2149 bool result; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2150
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2151 if ( *(&pSpellDatas[0].field_12 + 20 * uSpellID) & 0xC )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2152 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2153 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2154 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2155 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2156 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2157
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2158 //----- (0042777D) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2159 bool __fastcall _42777D_CastSpell_UseWand_ShootArrow(int a1, unsigned int uPlayerID, unsigned int a4, __int16 a5, int a6)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2160 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2161 bool result; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2162 __int16 v6; // bx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2163 Player *v7; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2164 char v8; // zf@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2165 unsigned __int16 v9; // cx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2166 unsigned int v10; // eax@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2167 unsigned __int8 v11; // sf@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2168 unsigned __int8 v12; // of@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2169 unsigned __int16 v13; // cx@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2170 unsigned int v14; // eax@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2171 stru277 *v15; // esi@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2172 stru277 *v16; // eax@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2173 GUIWindow *v17; // eax@43
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2174 GUIWindow *v18; // [sp-30h] [bp-48h]@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2175 unsigned int v19; // [sp-2Ch] [bp-44h]@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2176 unsigned int v20; // [sp-28h] [bp-40h]@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2177 unsigned int v21; // [sp-24h] [bp-3Ch]@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2178 unsigned int v22; // [sp-20h] [bp-38h]@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2179 int v23; // [sp-1Ch] [bp-34h]@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2180 int v24; // [sp-18h] [bp-30h]@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2181 unsigned int v25; // [sp-14h] [bp-2Ch]@43
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2182 unsigned int v26; // [sp-10h] [bp-28h]@43
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2183 unsigned __int8 v27; // [sp-Ch] [bp-24h]@43
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2184 char *v28; // [sp-8h] [bp-20h]@43
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2185 Texture *v29; // [sp-4h] [bp-1Ch]@43
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2186 __int16 a3a; // [sp+10h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2187 __int16 a2a; // [sp+14h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2188
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2189 a3a = uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2190 a2a = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2191 if ( pParty->bTurnBasedModeOn != 1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2192 || (result = pTurnEngine->field_4, pTurnEngine->field_4 != 1) && pTurnEngine->field_4 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2193 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2194 v6 = a5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2195 v7 = &pParty->pPlayers[uPlayerID];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2196 if ( !(a5 & 0x10) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2197 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2198 switch ( a1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2199 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2200 case 47:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2201 case 68:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2202 case 89:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2203 HIBYTE(v6) = HIBYTE(a5) | 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2204 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2205 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2206 case 28:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2207 case 30:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2208 case 91:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2209 LOBYTE(v6) = a5 | 0x80;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2210 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2211 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2212 case 6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2213 case 11:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2214 case 18:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2215 case 20:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2216 case 24:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2217 case 26:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2218 case 29:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2219 case 32:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2220 case 34:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2221 case 35:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2222 case 37:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2223 case 39:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2224 case 44:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2225 case 52:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2226 case 57:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2227 case 60:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2228 case 65:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2229 case 70:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2230 case 76:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2231 case 78:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2232 case 79:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2233 case 87:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2234 case 90:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2235 case 92:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2236 case 93:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2237 case 97:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2238 if ( !a6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2239 goto LABEL_9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2240 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2241 case 59:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2242 case 62:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2243 case 66:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2244 case 81:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2245 case 94:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2246 LABEL_9:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2247 v6 = a5 | 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2248 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2249 case 42:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2250 v6 = a5 | 0x40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2251 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2252 case 46:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2253 if ( a4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2254 v8 = (a4 & 0x1C0) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2255 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2256 v8 = (v7->pActiveSkills[16] & 0x1C0) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2257 if ( v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2258 goto LABEL_25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2259 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2260 case 50:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2261 v9 = a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2262 if ( !a4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2263 v9 = v7->pActiveSkills[16];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2264 goto LABEL_18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2265 case 95:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2266 v9 = a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2267 if ( !a4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2268 v9 = v7->pActiveSkills[20];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2269 LABEL_18:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2270 v10 = SkillToMastery(v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2271 v12 = __OFSUB__(v10, 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2272 v11 = ((v10 - 3) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2273 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2274 case 73:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2275 v13 = a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2276 if ( !a4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2277 v13 = v7->pActiveSkills[18];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2278 v14 = SkillToMastery(v13);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2279 v12 = __OFSUB__(v14, 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2280 v11 = ((v14 - 4) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2281 LABEL_24:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2282 if ( v11 ^ v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2283 goto LABEL_25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2284 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2285 case 40:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2286 case 49:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2287 case 53:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2288 case 55:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2289 case 56:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2290 case 61:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2291 case 64:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2292 case 67:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2293 case 71:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2294 case 72:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2295 case 74:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2296 LABEL_25:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2297 v6 = a5 | 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2298 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2299 case 96:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2300 HIBYTE(v6) = HIBYTE(a5) | 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2301 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2302 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2303 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2304 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2305 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2306 v15 = pStru277;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2307 if ( v6 & 0x3CA )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2308 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2309 v16 = pStru277;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2310 while ( !(v16->field_8 & 0x3CA) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2311 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2312 ++v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2313 if ( (signed int)v16 >= (signed int)&unk_50C190 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2314 goto LABEL_33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2315 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2316 v16->spellnum = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2317 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2318 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2319 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2320 LABEL_33:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2321 if ( v15->spellnum )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2322 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2323 v8 = (v15->field_8 & 0x3CA) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2324 v15->spellnum = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2325 if ( !v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2326 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2327 ptr_507BD4->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2328 ptr_507BD4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2329 pMouse->SetCursorBitmap("MICON1");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2330 GameUI_StatusBar_TimedStringTimeLeft = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2331 unk_50C9A0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2332 back_to_game();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2333 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2334 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2335 ++v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2336 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2337 while ( (signed int)v15 < (signed int)&unk_50C190 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2338 result = pStru277->PushStru277(a2a, a3a, a4, v6, a6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2339 if ( result != -1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2340 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2341 if ( v6 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2342 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2343 if ( ptr_507BD4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2344 return result;
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2345 ptr_507BD4 = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), (int)&pStru277[result], 0);
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
2346 ptr_507BD4->CreateButton(0x34u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 0, 0x31u, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
2347 ptr_507BD4->CreateButton(0xA5u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 1u, 0x32u, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
2348 ptr_507BD4->CreateButton(0x118u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 2u, 0x33u, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
2349 ptr_507BD4->CreateButton(0x186u, 0x1A6u, 0x23u, 0, 2, 0, 0x45u, 3u, 0x34u, "", 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2350 return sub_421B2C_PlaceInInventory_or_DropPickedItem();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2351 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2352 if ( v6 & 8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2353 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2354 if ( ptr_507BD4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2355 return result;
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2356 v17 = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), (int)&pStru277[result], 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2357 v29 = 0;
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
2358 v28 = "";
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2359 v27 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2360 v26 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2361 v25 = 70;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2362 LABEL_44:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2363 v24 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2364 v23 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2365 v22 = 344;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2366 v21 = 460;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2367 v20 = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2368 v19 = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2369 ptr_507BD4 = v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2370 v18 = v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2371 LABEL_56:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2372 v18->CreateButton(v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2373 return sub_421B2C_PlaceInInventory_or_DropPickedItem();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2374 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2375 if ( v6 & 0x40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2376 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2377 if ( ptr_507BD4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2378 return result;
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2379 v17 = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), (int)&pStru277[result], 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2380 v29 = 0;
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
2381 v28 = "";
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2382 v27 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2383 v26 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2384 v25 = 190;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2385 goto LABEL_44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2386 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2387 if ( (char)v6 < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2388 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2389 if ( ptr_507BD4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2390 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2391 ++pIcons_LOD->uTexturePacksCount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2392 if ( !pIcons_LOD->uNumPrevLoadedFiles )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2393 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2394 ptr_507BD4 = pStru277[result].sub_4219BE();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2395 unk_50C9A0 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2396 some_active_character = uActiveCharacter;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2397 return sub_421B2C_PlaceInInventory_or_DropPickedItem();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2398 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2399 if ( HIBYTE(v6) & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2400 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2401 if ( ptr_507BD4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2402 return result;
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2403 ptr_507BD4 = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), 20 * result + 5292232, 0);
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
2404 ptr_507BD4->CreateButton(0x34u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 0, 0x31u, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
2405 ptr_507BD4->CreateButton(0xA5u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 1u, 0x32u, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
2406 ptr_507BD4->CreateButton(0x118u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 2u, 0x33u, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
2407 ptr_507BD4->CreateButton(0x186u, 0x1A6u, 0x23u, 0, 2, 0, 0x8Du, 3u, 0x34u, "", 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2408 v29 = 0;
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
2409 v28 = "";
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2410 v27 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2411 v26 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2412 v25 = 140;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2413 v24 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2414 v23 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2415 v22 = 344;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2416 v21 = 460;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2417 v20 = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2418 v19 = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2419 v18 = ptr_507BD4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2420 goto LABEL_56;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2421 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2422 if ( HIBYTE(v6) & 2 && !ptr_507BD4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2423 {
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2424 ptr_507BD4 = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|0x2), 20 * result + 5292232, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2425 ptr_5079EC = ptr_507BD4->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2426 0x1D5u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2427 0xB2u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2428 (uTextureID_507990 != -1 ? pIcons_LOD->pTextures[uTextureID_507990].uTextureWidth : 24),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2429 (uTextureID_507990 != -1 ? pIcons_LOD->pTextures[uTextureID_507990].uTextureHeight : 26),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2430 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2431 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2432 0xBCu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2433 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2434 0,
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
2435 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2436 (Texture *)(uTextureID_507990 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507990] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2437 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2438 ptr_5079E8 = ptr_507BD4->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2439 0x272u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2440 0xB2u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2441 (uTextureID_50798C != -1 ? pIcons_LOD->pTextures[uTextureID_50798C].uTextureWidth : 24),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2442 (uTextureID_50798C != -1 ? pIcons_LOD->pTextures[uTextureID_50798C].uTextureHeight : 26),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2443 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2444 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2445 0xBCu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2446 1u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2447 0,
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
2448 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2449 (Texture *)(uTextureID_50798C != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_50798C] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2450 0);
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
2451 ptr_507BD4->CreateButton(0x1EBu, 0x95u, 0x40u, 0x4Au, 1, 0, 0x8Fu, 4u, 0x35u, "", 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2452 result = (bool)ptr_507BD4->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2453 0x231u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2454 0x95u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2455 0x40u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2456 0x4Au,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2457 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2458 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2459 0x8Fu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2460 5u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2461 0x36u,
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
2462 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2463 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2464 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2465 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2466 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2467 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2468 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2469
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2470
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2471
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2472 //----- (00427D48) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2473 void stru277::_427D48(unsigned int uPlayerID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2474 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2475 stru277 *v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2476 signed int v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2477
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2478 v2 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2479 v3 = 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2480 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2481 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2482 if ( v2->spellnum )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2483 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2484 if ( v2->field_8 & 0x3CA )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2485 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2486 v2->spellnum = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2487 ptr_507BD4->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2488 ptr_507BD4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2489 pMouse->SetCursorBitmap("MICON1");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2490 GameUI_StatusBar_TimedStringTimeLeft = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2491 unk_50C9A0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2492 back_to_game();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2493 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2494 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2495 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2496 --v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2497 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2498 while ( v3 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2499 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2500
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2501 //----- (00427DA0) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2502 unsigned int stru277::PushStru277(__int16 a2, __int16 uPlayerID, __int16 a4, __int16 a5, int a6)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2503 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2504 unsigned int result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2505 stru277 *v7; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2506 stru277 *v8; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2507
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2508 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2509 v7 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2510 while ( v7->spellnum )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2511 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2512 ++result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2513 ++v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2514 if ( (signed int)result >= 10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2515 goto LABEL_8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2516 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2517 v8 = &this[result];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2518 v8->spellnum = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2519 v8->uPlayerID = uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2520 if ( a5 & 0x10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2521 v8->uPlayerID_2 = uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2522 v8->field_6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2523 *(int *)&v8->field_C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2524 v8->field_8 = a5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2525 v8->field_A = a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2526 v8->field_10 = a6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2527 LABEL_8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2528 if ( result == 10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2529 result = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2530 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2531 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2532
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2533 //----- (00427E01) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2534 void stru277::_427E01_cast_spell()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2535 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2536 int v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2537 int v2; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2538 stru277 *v3; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2539 signed int v4; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2540 __int16 v5; // ax@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2541 signed int v6; // eax@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2542 __int16 v7; // ax@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2543 __int16 v8; // ax@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2544 char v9; // al@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2545 int v10; // eax@45
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2546 unsigned __int16 v11; // cx@45
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2547 signed int v12; // ecx@48
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2548 int v13; // eax@53
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2549 unsigned __int8 v14; // zf@53
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2550 unsigned int v15; // edx@53
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2551 signed int v16; // eax@53
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2552 Player *v17; // esi@70
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2553 int v18; // eax@72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2554 int v19; // eax@74
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2555 char *v20; // eax@74
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2556 signed int i; // esi@76
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2557 int v22; // eax@88
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2558 __int16 v23; // ax@88
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2559 int v24; // ecx@93
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2560 int v25; // ecx@94
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2561 signed __int64 v26; // qax@100
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2562 char *v27; // ecx@100
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2563 unsigned __int64 v28; // qax@102
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2564 int v29; // ecx@105
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2565 int v30; // ecx@106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2566 int v31; // eax@112
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2567 int v32; // eax@112
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2568 char *v33; // edx@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2569 int v34; // eax@121
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2570 int v35; // eax@123
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2571 int v36; // edx@125
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2572 int v37; // eax@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2573 signed int v38; // edi@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2574 signed int v39; // eax@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2575 int v40; // ecx@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2576 int v41; // eax@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2577 signed int v42; // eax@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2578 int *v43; // ecx@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2579 int v44; // eax@132
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2580 int v45; // ecx@132
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2581 int v46; // eax@132
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2582 unsigned int v47; // edx@133
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2583 int v48; // eax@137
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2584 int v49; // eax@137
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2585 int v50; // eax@141
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2586 int v51; // eax@146
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2587 __int16 v52; // ax@153
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2588 int v53; // eax@153
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2589 signed __int64 v54; // qax@164
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2590 int v55; // edi@164
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2591 stru6 *v56; // eax@165
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2592 int v57; // eax@169
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2593 signed __int64 v58; // qax@177
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2594 int v59; // edi@177
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2595 unsigned __int16 v60; // ax@184
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2596 int v61; // ecx@184
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2597 int v62; // eax@186
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2598 int v63; // ecx@187
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2599 int v64; // ecx@188
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2600 int v65; // ecx@189
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2601 const char *v66; // ecx@200
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2602 unsigned int v67; // edx@201
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2603 char v68; // al@207
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2604 int v69; // esi@211
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2605 int v70; // ecx@214
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2606 int v71; // ecx@215
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2607 int v72; // ecx@216
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2608 __int16 v73; // ST1C_2@222
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2609 __int16 v74; // ST18_2@222
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2610 stru6 *v75; // eax@222
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2611 int v76; // ecx@223
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2612 int v77; // ecx@224
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2613 int v78; // ecx@225
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2614 int v79; // eax@227
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2615 int v80; // eax@232
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2616 __int16 v81; // ST18_2@245
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2617 stru6 *v82; // eax@245
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2618 signed int v83; // edi@245
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2619 __int16 v84; // ST18_2@245
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2620 stru6 *v85; // eax@245
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2621 __int16 v86; // ST18_2@245
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2622 stru6 *v87; // eax@245
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2623 __int16 v88; // ST18_2@245
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2624 stru6 *v89; // eax@245
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2625 double v90; // st7@245
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2626 int v91; // eax@250
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2627 char *v92; // eax@255
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2628 __int16 v93; // ST18_2@260
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2629 stru6 *v94; // eax@260
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2630 __int16 v95; // ST18_2@260
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2631 stru6 *v96; // eax@260
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2632 __int16 v97; // ST18_2@260
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2633 stru6 *v98; // eax@260
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2634 __int16 v99; // ST18_2@260
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2635 stru6 *v100; // eax@260
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2636 int v101; // ecx@261
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2637 int v102; // ecx@262
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2638 int v103; // ecx@263
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2639 int v104; // eax@265
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2640 int v105; // edi@271
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2641 __int16 v106; // ST18_2@272
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2642 stru6 *v107; // eax@272
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2643 __int16 v108; // ST1C_2@274
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2644 __int16 v109; // ST18_2@274
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2645 stru6 *v110; // eax@274
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2646 int v111; // eax@274
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2647 Actor *v112; // esi@278
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2648 int v113; // eax@278
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2649 int v114; // ebx@278
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2650 unsigned int v115; // ecx@278
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2651 int v116; // edx@279
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2652 int v117; // edx@281
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2653 int v118; // edx@283
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2654 int v119; // edi@286
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2655 int v120; // eax@286
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2656 int v121; // eax@286
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2657 signed int v122; // eax@286
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2658 int v123; // ecx@288
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2659 int v124; // ecx@289
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2660 int v125; // ecx@290
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2661 int v126; // eax@292
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2662 int v127; // eax@296
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2663 __int16 v128; // ST18_2@303
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2664 stru6 *v129; // eax@303
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2665 __int16 v130; // ST18_2@303
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2666 stru6 *v131; // eax@303
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2667 __int16 v132; // ST18_2@303
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2668 stru6 *v133; // eax@303
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2669 __int16 v134; // ST18_2@303
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2670 stru6 *v135; // eax@303
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2671 unsigned __int64 v136; // qax@304
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2672 char *v137; // ecx@304
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2673 int v138; // ecx@305
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2674 int v139; // ecx@306
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2675 int v140; // eax@308
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2676 __int16 v141; // ST18_2@311
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2677 stru6 *v142; // eax@311
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2678 __int16 v143; // ST18_2@311
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2679 stru6 *v144; // eax@311
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2680 __int16 v145; // ST18_2@311
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2681 stru6 *v146; // eax@311
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2682 __int16 v147; // ST18_2@311
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2683 stru6 *v148; // eax@311
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2684 int v149; // ecx@312
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2685 int v150; // ecx@313
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2686 int v151; // ecx@314
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2687 signed int v152; // eax@322
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2688 int v153; // ecx@322
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2689 int v154; // eax@322
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2690 int v155; // eax@323
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2691 int v156; // eax@323
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2692 int v157; // eax@326
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2693 double v158; // st7@326
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2694 double v159; // st6@326
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2695 signed __int64 v160; // qtt@334
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2696 int v161; // eax@339
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2697 int v162; // edi@340
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2698 int v163; // eax@340
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2699 signed int v164; // eax@340
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2700 signed int v165; // edi@340
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2701 stru6 *v166; // eax@340
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2702 stru6 *v167; // eax@340
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2703 signed int v168; // edi@343
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2704 int v169; // eax@344
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2705 int v170; // ecx@346
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2706 int v171; // ecx@347
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2707 int v172; // ecx@348
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2708 int v173; // edi@350
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2709 signed int v174; // edi@355
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2710 __int16 v175; // ST18_2@357
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2711 stru6 *v176; // eax@357
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2712 __int16 v177; // ST18_2@357
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2713 stru6 *v178; // eax@357
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2714 __int16 v179; // ST18_2@357
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2715 stru6 *v180; // eax@357
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2716 __int16 v181; // ST18_2@357
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2717 stru6 *v182; // eax@357
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2718 signed __int64 v183; // qax@357
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2719 int v184; // ecx@358
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2720 int v185; // ecx@359
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2721 int v186; // ecx@360
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2722 int v187; // eax@367
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2723 int v188; // esi@369
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2724 int v189; // edi@369
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2725 const char *v190; // ecx@377
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2726 signed int v191; // edi@379
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2727 int v192; // ecx@382
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2728 int v193; // ecx@383
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2729 int v194; // ecx@384
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2730 int v195; // eax@386
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2731 int v196; // eax@387
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2732 __int16 v197; // ST18_2@395
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2733 stru6 *v198; // eax@395
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2734 __int16 v199; // ST18_2@395
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2735 stru6 *v200; // eax@395
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2736 __int16 v201; // ST18_2@395
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2737 stru6 *v202; // eax@395
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2738 __int16 v203; // ST18_2@395
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2739 stru6 *v204; // eax@395
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2740 signed int v205; // edi@405
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2741 int v206; // eax@407
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2742 __int16 v207; // cx@407
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2743 int v208; // eax@411
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2744 signed int v209; // ecx@412
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2745 int v210; // edx@412
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2746 signed int v211; // ecx@412
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2747 int v212; // eax@413
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2748 int v213; // eax@413
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2749 int v214; // eax@413
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2750 int v215; // eax@415
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2751 double v216; // st7@415
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2752 double v217; // st6@415
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2753 signed __int64 v218; // qtt@423
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2754 int v219; // ecx@425
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2755 int v220; // ecx@426
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2756 int v221; // edi@428
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2757 char *v222; // edi@434
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2758 char v223; // al@438
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2759 int v224; // ecx@442
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2760 int v225; // ecx@443
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2761 int v226; // eax@451
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2762 int v227; // esi@453
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2763 unsigned int v228; // edi@454
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2764 int v229; // edi@466
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2765 __int16 v230; // ST18_2@469
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2766 stru6 *v231; // eax@469
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2767 signed int v232; // esi@469
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2768 __int16 v233; // ST18_2@469
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2769 stru6 *v234; // eax@469
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2770 __int16 v235; // ST18_2@469
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2771 stru6 *v236; // eax@469
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2772 __int16 v237; // ST18_2@469
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2773 stru6 *v238; // eax@469
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2774 __int16 v239; // ST1C_2@469
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2775 char *v240; // ecx@472
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2776 double v241; // st7@478
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2777 signed __int64 v242; // qax@484
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2778 char *v243; // ecx@484
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2779 char *v244; // eax@488
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2780 int v245; // edi@492
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2781 int v246; // eax@492
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2782 char *v247; // eax@497
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2783 char v248; // al@497
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2784 char v249; // cf@500
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2785 float v250; // esi@507
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2786 char v251; // al@507
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2787 int v252; // edx@510
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2788 int m; // esi@510
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2789 int v254; // eax@513
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2790 int v255; // esi@513
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2791 int v256; // ecx@513
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2792 int v257; // edx@514
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2793 int v258; // ecx@514
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2794 char v259; // al@516
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2795 int v260; // eax@518
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2796 int v261; // esi@519
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2797 int v262; // edx@521
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2798 int v263; // ecx@521
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2799 int v264; // esi@521
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2800 int v265; // edx@521
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2801 int *ii; // eax@522
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2802 int v267; // eax@524
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2803 int v268; // eax@524
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2804 int v269; // eax@526
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2805 char *v270; // eax@531
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2806 char v271; // al@531
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2807 char v272; // cf@534
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2808 float v273; // esi@541
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2809 char v274; // al@541
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2810 int v275; // edx@544
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2811 int k; // esi@544
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2812 int v277; // edx@548
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2813 int v278; // ecx@548
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2814 char v279; // al@550
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2815 int v280; // eax@552
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2816 int v281; // esi@553
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2817 int v282; // edx@555
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2818 int v283; // ecx@555
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2819 int v284; // esi@555
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2820 int v285; // edx@555
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2821 int *l; // eax@556
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2822 int v287; // eax@558
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2823 int v288; // eax@558
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2824 ItemGen *v289; // eax@560
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2825 signed int v290; // eax@560
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2826 unsigned __int8 v291; // al@564
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2827 char v292; // al@573
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2828 int v293; // eax@575
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2829 ItemGen *v294; // esi@575
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2830 int v295; // edx@575
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2831 int kk; // edi@575
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2832 int v297; // edx@579
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2833 int v298; // ecx@579
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2834 char v299; // al@581
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2835 int v300; // eax@583
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2836 int v301; // edi@584
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2837 int v302; // edx@586
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2838 int v303; // ecx@586
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2839 int v304; // edi@586
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2840 int v305; // edx@586
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2841 int *jj; // eax@587
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2842 int v307; // eax@589
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2843 int v308; // eax@589
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2844 char *v309; // ecx@593
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2845 char v310; // sf@593
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2846 unsigned __int8 v311; // of@593
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2847 char v312; // cl@597
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2848 char v313; // al@606
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2849 int v314; // edx@607
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2850 int j; // esi@607
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2851 unsigned int v316; // eax@613
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2852 const char *v317; // ecx@617
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2853 Player *v318; // ecx@619
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2854 unsigned int v319; // edi@627
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2855 int v320; // ecx@629
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2856 int v321; // ecx@630
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2857 int v322; // edi@632
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2858 int v323; // edi@635
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2859 char *v324; // eax@635
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2860 Player *v325; // ecx@640
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2861 int v326; // eax@643
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2862 int v327; // eax@648
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2863 int v328; // ecx@651
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2864 int v329; // ecx@652
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2865 int v330; // edi@654
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2866 __int16 v331; // ST18_2@658
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2867 stru6 *v332; // eax@658
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2868 __int16 v333; // ST18_2@658
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2869 stru6 *v334; // eax@658
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2870 __int16 v335; // ST18_2@658
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2871 stru6 *v336; // eax@658
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2872 __int16 v337; // ST18_2@658
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2873 stru6 *v338; // eax@658
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2874 int v339; // ecx@659
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2875 int v340; // ecx@660
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2876 int v341; // eax@663
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2877 signed int v342; // edi@668
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2878 signed int v343; // edi@670
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2879 unsigned __int64 v344; // ST08_8@670
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2880 __int16 v345; // ST1C_2@671
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2881 __int16 v346; // ST18_2@671
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2882 stru6 *v347; // eax@671
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2883 int v348; // ecx@672
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2884 int v349; // ecx@673
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2885 int v350; // edi@676
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2886 Player *v351; // edi@680
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2887 __int16 v352; // ST18_2@685
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2888 stru6 *v353; // eax@685
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2889 int v354; // ecx@686
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2890 int v355; // ecx@687
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2891 int v356; // eax@689
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2892 SpellBuff *v357; // edi@694
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2893 unsigned __int16 v358; // ST1C_2@695
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2894 __int16 v359; // ST18_2@695
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2895 stru6 *v360; // eax@695
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2896 __int16 v361; // ST1C_2@697
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2897 __int16 v362; // ST18_2@697
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2898 stru6 *v363; // eax@697
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2899 int v364; // ecx@698
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2900 int v365; // ecx@699
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2901 int v366; // eax@701
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2902 stru6 *v367; // eax@704
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2903 int v368; // eax@704
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2904 Actor *v369; // edi@705
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2905 int v370; // eax@706
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2906 int v371; // ecx@709
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2907 int v372; // ecx@710
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2908 int v373; // eax@715
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2909 int v374; // eax@717
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2910 char *v375; // edi@717
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2911 int v376; // eax@717
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2912 Player *v377; // ecx@719
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2913 int v378; // ecx@721
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2914 int v379; // ecx@722
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2915 int v380; // eax@724
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2916 int v381; // edi@727
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2917 int v382; // ecx@727
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2918 Player *v383; // eax@728
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2919 int v384; // eax@733
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2920 int v385; // edi@736
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2921 signed int v386; // eax@736
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2922 Player *v387; // edi@738
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2923 int v388; // edi@740
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2924 unsigned __int16 v389; // ST1C_2@740
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2925 __int16 v390; // ST18_2@740
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2926 stru6 *v391; // eax@740
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2927 int v392; // ecx@742
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2928 int v393; // ecx@743
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2929 int v394; // ecx@744
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2930 int v395; // edi@747
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2931 int v396; // eax@752
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2932 int v397; // eax@757
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2933 int v398; // eax@757
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2934 int v399; // eax@757
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2935 char *v400; // esi@757
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2936 Game *v401; // ecx@759
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2937 __int16 v402; // ST1C_2@759
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2938 __int16 v403; // ST18_2@759
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2939 stru6 *v404; // eax@759
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2940 int v405; // ecx@761
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2941 int v406; // ecx@762
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2942 int v407; // edi@765
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2943 __int16 v408; // ST1C_2@769
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2944 __int16 v409; // ST18_2@769
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2945 stru6 *v410; // eax@769
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2946 int v411; // ecx@772
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2947 int v412; // ecx@773
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2948 int v413; // edi@775
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2949 __int16 v414; // ST1C_2@781
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2950 __int16 v415; // ST18_2@781
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2951 stru6 *v416; // eax@781
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2952 int v417; // eax@787
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2953 int v418; // ecx@789
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2954 __int16 v419; // ax@791
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2955 signed int v420; // eax@793
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2956 int v421; // edx@793
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2957 const char *v422; // eax@801
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2958 int v423; // ecx@808
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2959 int v424; // ecx@809
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2960 int v425; // eax@811
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2961 signed int v426; // eax@815
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2962 signed int v427; // eax@820
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2963 int v428; // ecx@825
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2964 int v429; // ecx@826
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2965 int v430; // eax@828
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2966 stru6 *v431; // eax@831
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2967 int v432; // eax@831
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2968 Actor *v433; // edi@832
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2969 int v434; // eax@833
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2970 int v435; // ecx@837
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2971 int v436; // ecx@838
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2972 __int16 v437; // ST1C_2@843
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2973 __int16 v438; // ST18_2@843
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2974 stru6 *v439; // eax@843
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2975 int v440; // eax@843
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2976 int v441; // eax@847
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2977 int v442; // ecx@850
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2978 int v443; // ecx@851
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2979 int v444; // eax@853
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2980 signed int v445; // edi@857
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2981 int v446; // ecx@862
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2982 LevelDecoration *v447; // edi@864
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2983 __int16 v448; // ax@864
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2984 char *v449; // esi@870
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2985 int v450; // eax@870
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2986 int v451; // ecx@875
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2987 int v452; // ecx@876
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2988 int v453; // edi@878
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2989 __int16 v454; // ST1C_2@884
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2990 __int16 v455; // ST18_2@884
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2991 stru6 *v456; // eax@884
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2992 int v457; // ecx@887
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2993 int v458; // ecx@888
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2994 int v459; // eax@890
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2995 signed int v460; // eax@895
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2996 Actor *v461; // eax@897
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2997 unsigned __int16 v462; // cx@897
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2998 signed int v463; // edx@897
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2999 int v464; // ecx@905
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3000 int v465; // ecx@906
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3001 int v466; // edi@909
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3002 __int16 v467; // ST1C_2@913
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3003 __int16 v468; // ST18_2@913
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3004 stru6 *v469; // eax@913
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3005 int v470; // edi@913
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3006 int v471; // eax@917
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3007 int v472; // eax@917
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3008 char *v473; // esi@918
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3009 __int16 v474; // ST18_2@920
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3010 stru6 *v475; // eax@920
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3011 __int16 v476; // ST18_2@920
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3012 stru6 *v477; // eax@920
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3013 __int16 v478; // ST18_2@920
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3014 stru6 *v479; // eax@920
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3015 __int16 v480; // ST18_2@920
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3016 stru6 *v481; // eax@920
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3017 __int16 v482; // ST18_2@923
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3018 stru6 *v483; // eax@923
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3019 __int16 v484; // ST18_2@923
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3020 stru6 *v485; // eax@923
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3021 __int16 v486; // ST18_2@923
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3022 stru6 *v487; // eax@923
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3023 __int16 v488; // ST18_2@923
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3024 stru6 *v489; // eax@923
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3025 __int16 v490; // ST1C_2@924
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3026 __int16 v491; // ST18_2@924
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3027 stru6 *v492; // eax@924
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3028 int v493; // ecx@925
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3029 int v494; // ecx@926
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3030 __int16 v495; // ST1C_2@931
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3031 __int16 v496; // ST18_2@931
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3032 stru6 *v497; // eax@931
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3033 int v498; // edi@931
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3034 int v499; // eax@935
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3035 int v500; // eax@935
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3036 Player *v501; // edi@939
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3037 __int16 v502; // ST18_2@940
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3038 stru6 *v503; // eax@940
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3039 stru6 *v504; // eax@943
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3040 int v505; // eax@943
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3041 int v506; // eax@943
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3042 int v507; // edi@944
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3043 int v508; // eax@944
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3044 signed int v509; // eax@944
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3045 signed int v510; // edi@944
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3046 Actor *v511; // edi@946
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3047 int v512; // eax@946
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3048 SpellBuff *v513; // edi@946
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3049 int v514; // ecx@950
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3050 int v515; // ecx@951
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3051 int v516; // eax@953
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3052 int v517; // eax@956
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3053 char *v518; // edx@957
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3054 __int16 v519; // cx@958
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3055 int v520; // ecx@968
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3056 int v521; // ecx@969
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3057 int v522; // eax@971
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3058 __int16 v523; // ST18_2@975
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3059 stru6 *v524; // eax@975
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3060 __int16 v525; // ST18_2@975
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3061 stru6 *v526; // eax@975
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3062 __int16 v527; // ST18_2@975
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3063 stru6 *v528; // eax@975
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3064 __int16 v529; // ST18_2@975
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3065 stru6 *v530; // eax@975
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3066 int v531; // eax@982
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3067 int v532; // eax@982
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3068 int v533; // edi@983
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3069 int v534; // eax@983
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3070 signed int v535; // eax@983
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3071 signed int v536; // edi@983
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3072 stru6 *v537; // eax@984
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3073 int v538; // ecx@985
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3074 int v539; // ecx@986
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3075 int v540; // eax@988
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3076 __int16 v541; // ST18_2@991
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3077 stru6 *v542; // eax@991
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3078 __int16 v543; // ST18_2@991
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3079 stru6 *v544; // eax@991
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3080 __int16 v545; // ST18_2@991
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3081 stru6 *v546; // eax@991
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3082 __int16 v547; // ST18_2@991
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3083 stru6 *v548; // eax@991
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3084 double v549; // st7@991
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3085 unsigned __int16 v550; // di@991
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3086 int v551; // ecx@993
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3087 int v552; // ecx@994
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3088 char *v553; // edi@1001
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3089 __int16 v554; // ST18_2@1002
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3090 stru6 *v555; // eax@1002
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3091 __int16 v556; // ST18_2@1002
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3092 stru6 *v557; // eax@1002
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3093 __int16 v558; // ST18_2@1002
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3094 stru6 *v559; // eax@1002
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3095 __int16 v560; // ST18_2@1002
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3096 stru6 *v561; // eax@1002
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3097 unsigned __int16 v562; // di@1005
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3098 signed int v563; // eax@1010
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3099 unsigned int v564; // ecx@1011
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3100 signed int v565; // eax@1012
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3101 Player **v566; // ecx@1012
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3102 int v567; // eax@1012
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3103 unsigned __int16 v568; // ST1C_2@1012
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3104 __int16 v569; // ST18_2@1012
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3105 stru6 *v570; // eax@1012
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3106 Player *v571; // eax@1013
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3107 char *v572; // ecx@1013
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3108 int v573; // ecx@1017
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3109 int v574; // ecx@1018
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3110 int v575; // eax@1020
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3111 signed int v576; // eax@1025
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3112 Player *v577; // eax@1026
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3113 int v578; // eax@1028
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3114 __int16 v579; // ax@1029
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3115 int v580; // eax@1031
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3116 int v581; // edi@1031
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3117 int v582; // eax@1031
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3118 __int16 v583; // ST1C_2@1034
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3119 __int16 v584; // ST18_2@1034
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3120 char *v585; // esi@1034
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3121 stru6 *v586; // eax@1034
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3122 signed int v587; // eax@1035
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3123 int v588; // ecx@1036
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3124 int v589; // ecx@1037
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3125 int v590; // ecx@1038
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3126 char v591; // al@1048
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3127 int v592; // esi@1052
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3128 int v593; // ecx@1057
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3129 int v594; // ecx@1058
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3130 int v595; // eax@1064
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3131 int v596; // esi@1066
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3132 unsigned int v597; // edi@1067
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3133 int v598; // eax@1079
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3134 signed int v599; // eax@1082
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3135 int v600; // edi@1086
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3136 int v601; // edx@1086
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3137 int v602; // eax@1086
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3138 int v603; // ecx@1086
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3139 int v604; // eax@1087
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3140 char *v605; // eax@1089
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3141 int v606; // edx@1091
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3142 int v607; // ecx@1100
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3143 __int16 v608; // ax@1102
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3144 signed int v609; // eax@1104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3145 int v610; // edi@1106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3146 unsigned int v611; // eax@1106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3147 char *v612; // edi@1106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3148 char *v613; // eax@1108
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3149 int v614; // eax@1116
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3150 int v615; // edi@1119
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3151 __int16 v616; // ST1C_2@1122
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3152 __int16 v617; // ST18_2@1122
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3153 stru6 *v618; // eax@1122
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3154 SpellBuff *v619; // edi@1123
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3155 unsigned __int16 v620; // ST1C_2@1124
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3156 __int16 v621; // ST18_2@1124
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3157 stru6 *v622; // eax@1124
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3158 signed __int64 v623; // qax@1127
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3159 int v624; // eax@1127
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3160 int v625; // edi@1129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3161 int v626; // eax@1129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3162 signed int v627; // eax@1129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3163 signed int v628; // edi@1129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3164 int v629; // ecx@1130
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3165 Player *v630; // eax@1131
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3166 int v631; // eax@1137
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3167 int v632; // edi@1140
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3168 Player *v633; // eax@1140
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3169 signed int v634; // eax@1140
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3170 int v635; // edi@1142
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3171 unsigned __int16 v636; // ST1C_2@1142
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3172 __int16 v637; // ST18_2@1142
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3173 stru6 *v638; // eax@1142
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3174 stru6 *v639; // eax@1143
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3175 int v640; // ecx@1146
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3176 int v641; // ecx@1147
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3177 int v642; // edi@1156
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3178 int v643; // eax@1156
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3179 int v644; // eax@1156
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3180 signed int v645; // eax@1158
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3181 Player *v646; // ebx@1169
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3182 int v647; // edi@1169
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3183 signed int v648; // ST1C_4@1170
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3184 Player *v649; // ecx@1170
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3185 unsigned __int64 v650; // [sp-10h] [bp-E94h]@103
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3186 unsigned __int16 v651; // [sp-8h] [bp-E8Ch]@100
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3187 unsigned __int16 v652; // [sp-8h] [bp-E8Ch]@304
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3188 unsigned __int16 v653; // [sp-4h] [bp-E88h]@100
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3189 int v654; // [sp-4h] [bp-E88h]@124
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3190 unsigned __int16 v655; // [sp-4h] [bp-E88h]@304
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3191 unsigned int v656; // [sp-4h] [bp-E88h]@639
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3192 int v657; // [sp-4h] [bp-E88h]@807
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3193 int v658; // [sp+0h] [bp-E84h]@100
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3194 int v659; // [sp+0h] [bp-E84h]@123
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3195 int v660; // [sp+0h] [bp-E84h]@146
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3196 Actor *v661; // [sp+0h] [bp-E84h]@164
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3197 int v662; // [sp+0h] [bp-E84h]@304
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3198 unsigned __int64 v663; // [sp+0h] [bp-E84h]@639
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3199 const char *v664; // [sp+0h] [bp-E84h]@802
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3200 int v665; // [sp+0h] [bp-E84h]@807
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3201 int v666; // [sp+4h] [bp-E80h]@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3202 enum PLAYER_SKILL_TYPE v667; // [sp+4h] [bp-E80h]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3203 unsigned __int8 v668; // [sp+4h] [bp-E80h]@100
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3204 int v669; // [sp+4h] [bp-E80h]@123
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3205 Vec3_int_ *v670; // [sp+4h] [bp-E80h]@133
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3206 int v671; // [sp+4h] [bp-E80h]@146
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3207 unsigned int v672; // [sp+4h] [bp-E80h]@164
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3208 unsigned __int8 v673; // [sp+4h] [bp-E80h]@304
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3209 __int16 v674; // [sp+4h] [bp-E80h]@684
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3210 const char *v675; // [sp+4h] [bp-E80h]@800
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3211 int v676; // [sp+4h] [bp-E80h]@807
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3212 int v677; // [sp+4h] [bp-E80h]@861
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3213 int v678; // [sp+4h] [bp-E80h]@997
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3214 int v679; // [sp+14h] [bp-E70h]@515
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3215 AIDirection a3; // [sp+C94h] [bp-1F0h]@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3216 int v681[4]; // [sp+CB0h] [bp-1D4h]@1137
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3217 int v682[4]; // [sp+CC0h] [bp-1C4h]@731
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3218 ItemGen v683; // [sp+CD0h] [bp-1B4h]@791
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3219 int v684; // [sp+D04h] [bp-180h]@416
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3220 unsigned __int64 v685; // [sp+D08h] [bp-17Ch]@416
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3221 int x; // [sp+D20h] [bp-164h]@327
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3222 unsigned __int64 v687; // [sp+D24h] [bp-160h]@327
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3223 int v688; // [sp+D2Ch] [bp-158h]@943
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3224 int v689; // [sp+D30h] [bp-154h]@943
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3225 int v690; // [sp+D34h] [bp-150h]@943
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3226 int v691; // [sp+D38h] [bp-14Ch]@137
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3227 int v692; // [sp+D3Ch] [bp-148h]@137
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3228 int v693; // [sp+D40h] [bp-144h]@137
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3229 int v694; // [sp+D44h] [bp-140h]@982
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3230 int v695; // [sp+D48h] [bp-13Ch]@982
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3231 int v696; // [sp+D4Ch] [bp-138h]@982
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3232 int v697; // [sp+D50h] [bp-134h]@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3233 int v698; // [sp+D54h] [bp-130h]@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3234 int v699; // [sp+D58h] [bp-12Ch]@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3235 Vec3_int_ v700; // [sp+D5Ch] [bp-128h]@339
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3236 int v701; // [sp+D68h] [bp-11Ch]@286
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3237 int v702; // [sp+D6Ch] [bp-118h]@286
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3238 int v703; // [sp+D70h] [bp-114h]@286
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3239 int v704; // [sp+D74h] [bp-110h]@132
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3240 int v705; // [sp+D78h] [bp-10Ch]@132
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3241 int v706; // [sp+D7Ch] [bp-108h]@132
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3242 int v707; // [sp+D80h] [bp-104h]@1127
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3243 int v708; // [sp+D84h] [bp-100h]@1127
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3244 int v709; // [sp+D88h] [bp-FCh]@1127
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3245 char v710; // [sp+D8Ch] [bp-F8h]@1156
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3246 stru277 *v711; // [sp+D90h] [bp-F4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3247 __int64 v712; // [sp+D94h] [bp-F0h]@991
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3248 int v713; // [sp+D9Ch] [bp-E8h]@324
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3249 int n; // [sp+DA0h] [bp-E4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3250 AIDirection v715; // [sp+DA4h] [bp-E0h]@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3251 int v716; // [sp+DC0h] [bp-C4h]@272
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3252 __int64 v717; // [sp+DC4h] [bp-C0h]@271
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3253 float v718; // [sp+DCCh] [bp-B8h]@176
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3254 signed int sRecoveryTime; // [sp+DD0h] [bp-B4h]@53
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3255 char *y; // [sp+DD4h] [bp-B0h]@325
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3256 int v721; // [sp+DD8h] [bp-ACh]@163
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3257 //LayingItem a1; // [sp+DDCh] [bp-A8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3258 int v723; // [sp+E4Ch] [bp-38h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3259 ItemGen *_this; // [sp+E50h] [bp-34h]@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3260 float v725; // [sp+E54h] [bp-30h]@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3261 Player *v726; // [sp+E58h] [bp-2Ch]@131
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3262 float v727; // [sp+E5Ch] [bp-28h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3263 unsigned int uRequiredMana; // [sp+E60h] [bp-24h]@53
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3264 Player *pPlayer; // [sp+E64h] [bp-20h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3265 int v730; // [sp+E68h] [bp-1Ch]@53
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3266 int v731; // [sp+E6Ch] [bp-18h]@48
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3267 signed int v732; // [sp+E70h] [bp-14h]@325
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3268 unsigned __int64 v733; // [sp+E74h] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3269 signed int a2; // [sp+E7Ch] [bp-8h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3270 int amount; // [sp+E80h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3271
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3272 auto ecx0 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3273
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3274 v711 = ecx0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3275
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3276 LayingItem a1; // [sp+DDCh] [bp-A8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3277 //LayingItem::LayingItem(&a1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3278
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3279 v1 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3280 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3281 amount = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3282 LODWORD(v733) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3283 v723 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3284 v727 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3285 n = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3286 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3287 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3288 v3 = &v711[n];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3289 HIDWORD(v733) = (int)v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3290 if ( v3->spellnum == (short)v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3291 goto LABEL_1166;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3292 if ( pParty->pPartyBuffs[11].NotExpired() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3293 pParty->pPartyBuffs[11].Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3294 if ( v3->field_8 & 0x3CA )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3295 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3296 if ( !pParty->pPlayers[v3->uPlayerID].CanAct() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3297 v711->_427D48(1u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3298 goto LABEL_1166;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3299 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3300 pPlayer = &pParty->pPlayers[v3->uPlayerID];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3301 v4 = *(int *)&v3->field_C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3302 if ( v4 != v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3303 goto LABEL_18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3304 v5 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3305 if ( v3->spellnum == 79 || v5 == 48 || v5 == 94 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3306 v666 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3307 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3308 v666 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3309 a2 = stru_50C198.FindClosesActor(5120, 1, v666);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3310 v6 = pMouse->uPointingObjectID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3311 if ( pMouse->uPointingObjectID != v1 && (v6 & 7) == 3 && pActors[v6 >> 3].CanAct() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3312 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3313 v4 = pMouse->uPointingObjectID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3314 LABEL_18:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3315 a2 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3316 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3317 a1.uItemType = stru_4E3ACC[v3->spellnum].uItemType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3318 if ( (short)a1.uItemType != (short)v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3319 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3320 if ( (a2 & 7) == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3321 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3322 memcpy(&v715, Actor::GetDirectionInfo((8 * v3->uPlayerID + 8) | 4, a2, &a3, 0), sizeof(v715));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3323 v2 = v723;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3324 v1 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3325 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3326 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3327 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3328 v715.uYawAngle = pParty->sRotationY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3329 v715.uPitchAngle = pParty->sRotationX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3330 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3331 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3332 v7 = v3->field_A;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3333 LODWORD(v725) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3334 _this = (ItemGen *)v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3335 if ( v7 == (short)v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3336 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3337 v8 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3338 if ( v3->spellnum >= 12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3339 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3340 if ( v8 >= 23 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3341 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3342 if ( v8 >= 34 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3343 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3344 if ( v8 >= 45 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3345 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3346 if ( v8 >= 56 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3347 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3348 if ( v8 >= 67 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3349 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3350 if ( v8 >= 78 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3351 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3352 if ( v8 >= 89 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3353 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3354 if ( v8 >= 100 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3355 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3356 if ( v8 != 100 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3357 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3358 LABEL_45:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3359 HIWORD(v10) = HIWORD(pPlayer);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3360 v11 = pPlayer->pActiveSkills[LODWORD(v725)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3361 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3362 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3363 v667 = (PLAYER_SKILL_TYPE)5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3364 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3365 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3366 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3367 v667 = (PLAYER_SKILL_TYPE)20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3368 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3369 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3370 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3371 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3372 v667 = (PLAYER_SKILL_TYPE)19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3373 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3374 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3375 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3376 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3377 v667 = (PLAYER_SKILL_TYPE)18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3378 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3379 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3380 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3381 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3382 v667 = (PLAYER_SKILL_TYPE)17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3383 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3384 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3385 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3386 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3387 v667 = (PLAYER_SKILL_TYPE)16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3388 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3389 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3390 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3391 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3392 v667 = (PLAYER_SKILL_TYPE)15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3393 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3394 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3395 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3396 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3397 v667 = (PLAYER_SKILL_TYPE)14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3398 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3399 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3400 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3401 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3402 v667 = (PLAYER_SKILL_TYPE)13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3403 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3404 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3405 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3406 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3407 v667 = (PLAYER_SKILL_TYPE)12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3408 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3409 LODWORD(v725) = v667;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3410 v9 = pPlayer->GetActualSkillLevel(v667);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3411 v723 = v9 & 0x3F;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3412 v2 = v9 & 0x3F;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3413 goto LABEL_45;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3414 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3415 v11 = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3416 v10 = v7 & 0x3F;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3417 v723 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3418 v2 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3419 LABEL_47:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3420 if ( HIBYTE(v11) & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3421 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3422 v12 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3423 v731 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3424 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3425 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3426 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3427 if ( (v11 & 0x80u) == 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3428 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3429 v10 = ((v11 & 0x40) != 0) + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3430 v731 = ((v11 & 0x40) != 0) + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3431 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3432 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3433 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3434 v731 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3435 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3436 v12 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3437 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3438 LOWORD(v10) = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3439 v730 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3440 v13 = v12 + 10 * (signed __int16)v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3441 v14 = v3->field_A == (short)v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3442 v15 = (unsigned __int16)word_4E3C66[v13]; // pSpellDatas [negoffset] indexing
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3443 v16 = *(unsigned __int16 *)((char *)&pSpellDatas[0].uMagisterLevelMana + v13 * 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3444 uRequiredMana = v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3445 sRecoveryTime = v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3446 if ( !v14 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3447 uRequiredMana = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3448 if ( pParty->uCurrentHour == v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3449 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3450 if ( pParty->uCurrentMinute != v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3451 goto LABEL_62;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3452 if ( LODWORD(v725) == 20 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3453 goto LABEL_61;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3454 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3455 if ( pParty->uCurrentHour == 12 && pParty->uCurrentMinute == v1 && LODWORD(v725) == 19 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3456 LABEL_61:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3457 uRequiredMana = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3458 LABEL_62:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3459 if ( (signed __int16)v730 >= 100 || ((pPlayer->sMana - uRequiredMana) & 0x80000000u) == 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3460 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3461 ShowStatusBarString(pGlobalTXT_LocalizationStrings[586], 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3462 LABEL_203:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3463 v3->spellnum = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3464 LABEL_1166:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3465 ++n;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3466 if ( n >= 10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3467 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3468 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3469 if ( !pPlayer->pConditions[0] || (signed __int16)v730 >= 100 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3470 goto LABEL_69;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3471 if ( rand() % 100 >= 50 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3472 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3473 v12 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3474 LABEL_69:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3475 switch ( v3->spellnum )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3476 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3477 case 100:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3478 case 101:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3479 v17 = pPlayer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3480 _this = (ItemGen *)1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3481 if ( (signed int)SkillToMastery(pPlayer->pActiveSkills[5]) >= 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3482 _this = (ItemGen *)2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3483 sRecoveryTime = v17->GetAttackRecoveryTime(1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3484 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3485 v18 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3486 a1.field_4C = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3487 a1.field_48 = v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3488 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3489 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3490 if ( v17->WearsItem(510, 2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3491 a1.uObjectDescID = pObjectList->ObjectIDByItemID(0xBD6u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3492 a1.vPosition.x = pParty->vPosition.x;
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
3493 a1.vPosition.y = pParty->vPosition.y;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3494 a1.uAttributes = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3495 a1.uSpriteFrameID = 0;
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
3496 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3497 v19 = 8 * v3->uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3498 LOBYTE(v19) = v19 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3499 a1.field_58 = v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3500 a1.field_5C = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3501 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3502 a1.uFacing = LOWORD(v715.uYawAngle);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3503 a1.uSoundID = LOWORD(v3->field_10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3504 v20 = (char *)&pParty->pPlayers[v3->uPlayerID];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3505 memcpy(&a1.stru_24, &v20[36 * *((int *)v20 + 1620) + 496], sizeof(a1.stru_24));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3506 a1.uAttributes = 256;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3507 if ( pParty->bTurnBasedModeOn == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3508 a1.uAttributes = 260;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3509 for ( i = 0; i < (signed int)this; ++i )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3510 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3511 if ( i )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3512 a1.vPosition.z += 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3513 a1.uSectorID = pIndoor->GetSector(a1.vPosition.x, a1.vPosition.y, a1.vPosition.z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3514 if ( a1.Create(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3515 v715.uYawAngle,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3516 v715.uPitchAngle,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3517 pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3518 v3->uPlayerID + 1) != -1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3519 && pParty->bTurnBasedModeOn == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3520 ++pTurnEngine->field_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3521 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3522 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3523 case 102:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3524 sRecoveryTime = pPlayer->GetAttackRecoveryTime(0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3525 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3526 a1.field_48 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3527 a1.field_4C = v723;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3528 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3529 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3530 a1.vPosition.x = pParty->vPosition.x;
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
3531 a1.vPosition.y = pParty->vPosition.y;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3532 a1.uAttributes = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3533 a1.uSpriteFrameID = 0;
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
3534 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 2;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3535 v22 = 8 * v3->uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3536 LOBYTE(v22) = v22 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3537 a1.field_58 = v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3538 a1.field_5C = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3539 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3540 a1.uFacing = LOWORD(v715.uYawAngle);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3541 a1.uSoundID = LOWORD(v3->field_10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3542 memcpy(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3543 &a1.stru_24,
23
509744251c8e Player-related members
Nomad
parents: 4
diff changeset
3544 &pParty->pPlayers[v3->uPlayerID].spellbook.pDarkSpellbook.bIsSpellAvailable[36
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3545 * pParty->pPlayers[v3->uPlayerID].pEquipment.uMainHand
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3546 + 5],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3547 sizeof(a1.stru_24));
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
3548 v23 = pIndoor->GetSector(pParty->vPosition.x, pParty->vPosition.y, a1.vPosition.z);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3549 HIBYTE(a1.uAttributes) |= 1u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3550 a1.uSectorID = v23;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3551 if ( pParty->bTurnBasedModeOn == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3552 LOBYTE(a1.uAttributes) |= 4u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3553 if ( a1.Create(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3554 v715.uYawAngle,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3555 v715.uPitchAngle,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3556 pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3557 v3->uPlayerID + 1) != -1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3558 && pParty->bTurnBasedModeOn == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3559 ++pTurnEngine->field_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3560 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3561 case 1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3562 LODWORD(v733) = 3600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3563 v24 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3564 if ( v24 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3565 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3566 v25 = v24 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3567 if ( v25 && v25 != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3568 amount = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3569 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3570 amount = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3571 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3572 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3573 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3574 amount = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3575 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3576 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3577 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3578 v668 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3579 v658 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3580 v653 = amount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3581 v651 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3582 v26 = (signed __int64)((double)(signed int)v733 * 4.2666669);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3583 v27 = (char *)&pParty->pPartyBuffs[16];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3584 goto LABEL_101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3585 case 7:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3586 v29 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3587 if ( v29 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3588 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3589 v30 = v29 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3590 if ( v30 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3591 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3592 if ( v30 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3593 amount = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3594 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3595 amount = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3596 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3597 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3598 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3599 amount = 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3600 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3601 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3602 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3603 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3604 amount = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3605 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3606 v31 = v3->uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3607 HIDWORD(v733) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3608 v32 = 8 * v31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3609 LOBYTE(v32) = v32 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3610 if ( (signed int)uNumLayingItems > v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3611 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3612 v33 = (char *)&pLayingItems[0].field_48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3613 v730 = uNumLayingItems;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3614 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3615 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3616 if ( *((short *)v33 - 36) != (short)v1 && *(int *)v33 == 7 && *((int *)v33 + 4) == v32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3617 ++HIDWORD(v733);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3618 v33 += 112;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3619 --v730;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3620 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3621 while ( v730 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3622 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3623 if ( SHIDWORD(v733) > amount )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3624 goto LABEL_200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3625 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3626 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3627 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3628 a1.field_48 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3629 a1.field_4C = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3630 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3631 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType);
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
3632 a1.vPosition.y = pParty->vPosition.y;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3633 a1.vPosition.x = pParty->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3634 a1.uAttributes = v1;
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
3635 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3636 a1.uSectorID = pIndoor->GetSector(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3637 pParty->vPosition.x,
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
3638 pParty->vPosition.y,
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
3639 pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3640 a1.uSpriteFrameID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3641 v34 = 8 * v3->uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3642 LOBYTE(v34) = v34 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3643 a1.field_58 = v34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3644 a1.field_5C = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3645 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3646 a1.uFacing = LOWORD(v715.uYawAngle);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3647 a1.uSoundID = LOWORD(v3->field_10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3648 if ( pParty->bTurnBasedModeOn == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3649 LOBYTE(a1.uAttributes) |= 4u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3650 v669 = v3->uPlayerID + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3651 v659 = pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3652 v35 = pParty->sRotationX + 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3653 goto LABEL_124;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3654 case 20:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3655 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3656 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3657 if ( a2 == v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3658 goto LABEL_200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3659 if ( (a2 & 7) != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3660 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3661 v699 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3662 v698 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3663 v697 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3664 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3665 a1.field_48 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3666 a1.field_4C = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3667 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3668 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3669 a1.uAttributes = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3670 a1.uSectorID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3671 a1.uSpriteFrameID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3672 v37 = v3->uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3673 a1.field_60_distance_related_prolly_lod = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3674 v37 *= 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3675 LOBYTE(v37) = v37 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3676 a1.uFacing = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3677 a1.field_58 = v37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3678 v38 = a2 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3679 a1.uSoundID = LOWORD(v3->field_10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3680 v39 = a2 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3681 a1.vPosition.x = pActors[v39].vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3682 v40 = pActors[v39].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3683 a1.vPosition.z = pActors[v39].vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3684 v41 = 8 * (a2 >> 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3685 a1.vPosition.y = v40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3686 LOBYTE(v41) = v41 | 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3687 a1.field_5C = v41;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3688 v42 = a1.Create(0, v1, v1, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3689 v43 = &v697;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3690 goto LABEL_133;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3691 case 44:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3692 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3693 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3694 v726 = (Player *)(a2 >> 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3695 HIDWORD(v733) = 836 * (a2 >> 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3696 if ( !stru_50C198.GetMagicalResistance((Actor *)((char *)pActors + HIDWORD(v733)), 3u) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3697 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3698 ((SpellBuff *)((char *)&pActors[0].pActorBuffs[10] + HIDWORD(v733)))->Apply(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3699 pMiscTimer->uTotalGameTimeElapsed + 128,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3700 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3701 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3702 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3703 v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3704 v706 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3705 v705 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3706 v704 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3707 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3708 a1.field_48 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3709 a1.field_4C = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3710 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3711 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3712 a1.uAttributes = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3713 a1.uSectorID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3714 a1.uSpriteFrameID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3715 v44 = v3->uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3716 a1.field_60_distance_related_prolly_lod = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3717 a1.uFacing = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3718 v44 *= 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3719 LOBYTE(v44) = v44 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3720 v38 = (signed int)v726;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3721 a1.field_58 = v44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3722 a1.uSoundID = LOWORD(v3->field_10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3723 a1.vPosition.x = *(__int16 *)((char *)&pActors[0].vPosition.x + HIDWORD(v733));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3724 v45 = *(__int16 *)((char *)&pActors[0].vPosition.y + HIDWORD(v733));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3725 a1.vPosition.z = *(__int16 *)((char *)&pActors[0].vPosition.z + HIDWORD(v733));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3726 v46 = 8 * (int)v726;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3727 a1.vPosition.y = v45;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3728 LOBYTE(v46) = 8 * (char)v726 | 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3729 a1.field_5C = v46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3730 v42 = a1.Create(0, v1, v1, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3731 v43 = &v704;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3732 LABEL_133:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3733 v670 = (Vec3_int_ *)v43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3734 v47 = v38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3735 goto LABEL_139;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3736 case 79:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3737 if ( !pPlayer->CanCastSpell(uRequiredMana) || a2 == v1 || (a2 & 7) != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3738 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3739 v730 = a2 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3740 v693 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3741 HIDWORD(v733) = (int)&pActors[a2 >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3742 v692 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3743 v691 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3744 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3745 a1.field_48 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3746 a1.field_4C = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3747 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3748 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3749 a1.vPosition.x = *(short *)(HIDWORD(v733) + 142);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3750 a1.vPosition.y = *(short *)(HIDWORD(v733) + 144);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3751 v48 = *(short *)(HIDWORD(v733) + 138);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3752 a1.vPosition.z = *(short *)(HIDWORD(v733) + 138);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3753 a1.uAttributes = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3754 a1.uSectorID = pIndoor->GetSector(a1.vPosition.x, a1.vPosition.y, v48);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3755 a1.uSpriteFrameID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3756 v49 = 8 * v3->uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3757 LOBYTE(v49) = v49 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3758 a1.field_58 = v49;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3759 a1.field_5C = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3760 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3761 a1.uFacing = LOWORD(v715.uYawAngle);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3762 LOWORD(v49) = LOWORD(v3->field_10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3763 LOBYTE(a1.uAttributes) |= 0x80u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3764 a1.uSoundID = v49;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3765 v726 = (Player *)a1.Create(0, v1, v1, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3766 if ( !MonsterStats::BelongsToSupertype(*(short *)(HIDWORD(v733) + 96), MONSTER_SUPERTYPE_UNDEAD) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3767 goto LABEL_200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3768 v47 = v730;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3769 v670 = (Vec3_int_ *)&v691;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3770 v42 = (signed int)v726;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3771 LABEL_139:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3772 DamageMonsterFromParty(8 * v42 | 2, v47, v670);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3773 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3774 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3775 case 6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3776 case 11:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3777 case 18:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3778 case 26:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3779 case 32:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3780 case 34:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3781 case 37:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3782 case 57:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3783 case 65:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3784 case 70:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3785 case 78:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3786 case 97:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3787 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3788 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3789 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3790 a1.field_48 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3791 a1.field_4C = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3792 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3793 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType);
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
3794 a1.vPosition.y = pParty->vPosition.y;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3795 a1.vPosition.x = pParty->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3796 a1.uAttributes = v1;
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
3797 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3798 a1.uSectorID = pIndoor->GetSector(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3799 pParty->vPosition.x,
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
3800 pParty->vPosition.y,
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
3801 pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3802 a1.uSpriteFrameID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3803 v50 = 8 * v3->uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3804 LOBYTE(v50) = v50 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3805 a1.field_58 = v50;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3806 a1.field_5C = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3807 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3808 a1.uFacing = LOWORD(v715.uYawAngle);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3809 a1.uSoundID = LOWORD(v3->field_10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3810 if ( pParty->bTurnBasedModeOn == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3811 LOBYTE(a1.uAttributes) |= 4u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3812 if ( v3->spellnum == 18 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3813 LOBYTE(a1.uAttributes) |= 0x40u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3814 goto LABEL_156;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3815 case 29:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3816 case 39:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3817 case 76:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3818 case 90:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3819 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3820 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3821 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3822 a1.field_48 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3823 a1.field_4C = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3824 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3825 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType);
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
3826 v51 = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 2;
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
3827 a1.vPosition.y = pParty->vPosition.y;
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
3828 v671 = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 2;
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
3829 v660 = pParty->vPosition.y;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3830 goto LABEL_153;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3831 case 87:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3832 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3833 || uCurrentlyLoadedLevelType == LEVEL_Outdoor && (pParty->uCurrentHour < 5 || pParty->uCurrentHour >= 0x15) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3834 goto LABEL_200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3835 if ( pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3836 goto LABEL_152;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3837 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3838 case 81:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3839 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3840 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3841 if ( a2 == v1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3842 || (a2 & 7) != 3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3843 || (v730 = a2 >> 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3844 v721 = (int)&pActors[a2 >> 3],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3845 !stru_50C198.GetMagicalResistance(&pActors[a2 >> 3], 9u)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3846 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3847 Actor::_403EB6(v730, 4u, 0x80u, (AIDirection *)v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3848 v726 = (Player *)(23040 * v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3849 v54 = (signed __int64)((double)(23040 * v2) * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3850 v55 = v721;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3851 ((SpellBuff *)(v721 + 308))->Apply(pParty->uTimePlayed + (signed int)v54, v731, v1, v1, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3852 *(char *)(v55 + 38) |= 8u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3853 *(short *)(v55 + 148) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3854 v672 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3855 *(short *)(v55 + 150) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3856 v661 = (Actor *)v55;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3857 goto LABEL_165;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3858 case 35:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3859 if ( v12 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3860 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3861 v57 = 300 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3862 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3863 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3864 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3865 if ( v12 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3866 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3867 amount = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3868 v57 = 300 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3869 goto LABEL_174;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3870 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3871 if ( v12 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3872 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3873 v57 = 300 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3874 amount = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3875 goto LABEL_174;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3876 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3877 v57 = 180 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3878 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3879 amount = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3880 LABEL_174:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3881 LODWORD(v733) = v57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3882 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3883 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3884 if ( (a2 & 7) != 3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3885 || (v721 = 836 * (a2 >> 3),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3886 LODWORD(v718) = (int)(char *)pActors + v721,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3887 !stru_50C198.GetMagicalResistance((Actor *)((char *)pActors + v721), 3u)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3888 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3889 v726 = (Player *)(23040 * v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3890 v58 = (signed __int64)((double)(23040 * v2) * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3891 v59 = v721;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3892 ((SpellBuff *)((char *)&pActors[0].pActorBuffs[7] + v721))->Apply(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3893 pParty->uTimePlayed + (signed int)v58,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3894 v731,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3895 amount,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3896 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3897 v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3898 *((char *)&pActors[0].uAttributes + v59 + 2) |= 8u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3899 v672 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3900 v661 = (Actor *)LODWORD(v718);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3901 goto LABEL_165;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3902 case 60:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3903 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3904 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3905 v730 = 836 * (a2 >> 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3906 if ( !stru_50C198.GetMagicalResistance((Actor *)((char *)pActors + v730), 7u) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3907 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3908 LODWORD(v733) = 300 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3909 if ( v731 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3910 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3911 LODWORD(v733) = 600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3912 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3913 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3914 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3915 if ( v731 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3916 LODWORD(v733) = 29030400;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3917 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3918 ((SpellBuff *)((char *)&pActors[0].pActorBuffs[9] + v730))->Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3919 ((SpellBuff *)((char *)&pActors[0].pActorBuffs[12] + v730))->Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3920 v726 = (Player *)((int)v733 << 7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3921 ((SpellBuff *)((char *)&pActors[0].pActorBuffs[1] + v730))->Apply(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3922 pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3923 v731,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3924 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3925 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3926 v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3927 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3928 a1.field_48 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3929 a1.field_4C = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3930 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3931 v60 = pObjectList->ObjectIDByItemID(a1.uItemType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3932 v61 = v730;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3933 goto LABEL_1086;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3934 case 92:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3935 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3936 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3937 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3938 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3939 a1.vPosition.x = pParty->vPosition.x;
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
3940 a1.vPosition.y = pParty->vPosition.y;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3941 a1.uAttributes = v1;
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
3942 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3943 a1.uSectorID = pIndoor->GetSector(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3944 pParty->vPosition.x,
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
3945 pParty->vPosition.y,
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
3946 pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3947 a1.uSpriteFrameID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3948 v62 = 8 * v3->uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3949 LOBYTE(v62) = v62 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3950 a1.field_58 = v62;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3951 a1.field_5C = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3952 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3953 a1.uFacing = LOWORD(v715.uYawAngle);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3954 a1.uSoundID = LOWORD(v3->field_10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3955 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3956 a1.field_48 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3957 a1.field_4C = 300 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3958 goto LABEL_154;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3959 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3960 v63 = v12 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3961 if ( !v63 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3962 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3963 amount = 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3964 goto LABEL_195;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3965 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3966 v64 = v63 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3967 if ( !v64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3968 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3969 amount = 11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3970 goto LABEL_195;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3971 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3972 v65 = v64 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3973 if ( !v65 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3974 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3975 amount = 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3976 LABEL_195:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3977 LODWORD(v733) = 3600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3978 goto LABEL_196;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3979 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3980 if ( v65 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3981 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3982 LODWORD(v733) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3983 amount = 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3984 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3985 LABEL_196:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3986 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3987 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3988 v730 = (int)&pParty->pPlayers[v3->uPlayerID_2].pInventoryItems[a2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3989 v726 = (Player *)&pItemsTable->pItems[*(int *)v730].pIconName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3990 ((ItemGen *)v730)->UpdateTempBonus(pParty->uTimePlayed);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3991 if ( *(int *)v730 < 64 || *(int *)v730 > 65 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3992 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3993 if ( !(*(char *)(v730 + 20) & 2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3994 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3995 if ( *(int *)(v730 + 12) == v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3996 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3997 if ( *(int *)(v730 + 4) == v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3998 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3999 v68 = BYTE4(v726->pConditions[3]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4000 if ( !v68 || v68 == 1 || v68 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4001 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4002 if ( !pItemsTable->_456D5E_is_some_material((ItemGen *)v730) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4003 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4004 v69 = v730;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4005 v14 = v731 == 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4006 *(int *)(v730 + 12) = amount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4007 if ( !v14 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4008 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4009 v726 = (Player *)((int)v733 << 7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4010 *(_QWORD *)(v69 + 28) = pParty->uTimePlayed
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4011 + (signed int)(signed __int64)((double)(signed int)((int)v733 << 7)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4012 * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4013 *(int *)(v69 + 20) |= 8u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4014 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4015 *(int *)(v69 + 20) |= 0x10u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4016 LABEL_1055:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4017 dword_50C9A8 = 256;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4018 LABEL_1056:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4019 LODWORD(v727) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4020 LABEL_83:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4021 if ( v3->field_8 & 0x20 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4022 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4023 LABEL_1162:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4024 if ( v727 != 0.0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4025 pAudioPlayer->PlaySound(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4026 (SoundID)word_4EE088_sound_ids[v3->spellnum],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4027 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4028 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4029 -1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4030 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4031 v3->field_10,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4032 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4033 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4034 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4035 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4036 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4037 if ( sRecoveryTime < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4038 sRecoveryTime = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4039 if ( pParty->bTurnBasedModeOn )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4040 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4041 v645 = sRecoveryTime;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4042 pParty->pTurnBasedPlayerRecoveryTimes[v3->uPlayerID] = sRecoveryTime;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4043 pPlayer->SetRecoveryTime(v645);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4044 if ( !some_active_character )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4045 pTurnEngine->_40471C();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4046 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4047 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4048 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4049 pPlayer->SetRecoveryTime(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4050 (signed __int64)(flt_6BE3A4_debug_recmod1 * (double)sRecoveryTime * 2.133333333333333));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4051 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4052 if ( v727 != 0.0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4053 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4054 pPlayer->PlaySound(49, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4055 goto LABEL_1162;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4056 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4057 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4058 v3->spellnum = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4059 v1 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4060 LABEL_1165:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4061 v2 = v723;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4062 goto LABEL_1166;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4063 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4064 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4065 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4066 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4067 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4068 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4069 LABEL_199:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4070 dword_50C9D0 = 113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4071 dword_50C9D4 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4072 dword_50C9D8 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4073 LABEL_200:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4074 v66 = pGlobalTXT_LocalizationStrings[428];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4075 LABEL_201:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4076 v67 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4077 LABEL_202:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4078 ShowStatusBarString(v66, v67);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4079 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, v1, v1, -1, v1, v1, v1, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4080 goto LABEL_203;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4081 case 71:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4082 v70 = v12 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4083 LODWORD(v733) = 3600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4084 if ( v70 && (v71 = v70 - 1) != 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4085 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4086 v72 = v71 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4087 if ( v72 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4088 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4089 if ( v72 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4090 amount = 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4091 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4092 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4093 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4094 amount = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4095 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4096 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4097 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4098 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4099 amount = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4100 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4101 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4102 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4103 v73 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4104 v74 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4105 v75 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4106 pGame->GetStru6()->SetPlayerBuffAnim(v74, v73);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4107 v668 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4108 v658 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4109 v653 = amount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4110 v651 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4111 v28 = pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)v733 * 4.2666669);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4112 v27 = (char *)&pParty->pPlayers[v3->uPlayerID_2].pPlayerBuffs[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4113 goto LABEL_103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4114 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4115 case 14:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4116 case 25:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4117 case 36:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4118 case 58:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4119 case 69:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4120 v76 = v12 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4121 LODWORD(v733) = 3600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4122 if ( v76 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4123 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4124 v77 = v76 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4125 if ( v77 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4126 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4127 v78 = v77 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4128 if ( v78 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4129 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4130 if ( v78 != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4131 goto LABEL_232;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4132 v79 = 4 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4133 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4134 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4135 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4136 v79 = 3 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4137 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4138 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4139 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4140 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4141 v79 = 2 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4142 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4143 amount = v79;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4144 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4145 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4146 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4147 amount = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4148 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4149 LABEL_232:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4150 v80 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4151 switch ( v80 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4152 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4153 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4154 LODWORD(v725) = 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4155 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4156 case 14:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4157 LODWORD(v725) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4158 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4159 case 25:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4160 LODWORD(v725) = 17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4161 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4162 case 36:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4163 LODWORD(v725) = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4164 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4165 case 58:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4166 LODWORD(v725) = 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4167 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4168 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4169 if ( v80 != 69 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4170 goto LABEL_1166;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4171 LODWORD(v725) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4172 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4173 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4174 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4175 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4176 v81 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4177 v82 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4178 pGame->GetStru6()->SetPlayerBuffAnim(v81, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4179 v83 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4180 v84 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4181 v85 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4182 pGame->GetStru6()->SetPlayerBuffAnim(v84, 1u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4183 v86 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4184 v87 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4185 pGame->GetStru6()->SetPlayerBuffAnim(v86, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4186 v88 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4187 v89 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4188 pGame->GetStru6()->SetPlayerBuffAnim(v88, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4189 v90 = (double)(signed int)v733 * 4.2666669;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4190 goto LABEL_304;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4191 case 5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4192 if ( v12 <= v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4193 goto LABEL_254;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4194 if ( v12 <= 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4195 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4196 v91 = 60 * (v2 + 60);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4197 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4198 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4199 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4200 if ( v12 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4201 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4202 v91 = 180 * (v2 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4203 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4204 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4205 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4206 if ( v12 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4207 goto LABEL_254;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4208 v91 = 240 * (v2 + 15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4209 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4210 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4211 LODWORD(v733) = v91;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4212 LABEL_254:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4213 if ( pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4214 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4215 v92 = (char *)&pParty->pPlayers[0].pConditions[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4216 LODWORD(v727) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4217 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4218 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4219 if ( *(_QWORD *)v92 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4220 LODWORD(v727) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4221 v92 += 6972;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4222 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4223 while ( (signed int)v92 < (signed int)&pParty->pHirelings[0].uFlags );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4224 if ( LODWORD(v727) != v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4225 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4226 v726 = (Player *)((int)v733 << 7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4227 pParty->pPartyBuffs[8].Apply(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4228 pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4229 v731,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4230 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4231 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4232 v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4233 v93 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4234 v94 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4235 pGame->GetStru6()->SetPlayerBuffAnim(v93, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4236 v95 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4237 v96 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4238 pGame->GetStru6()->SetPlayerBuffAnim(v95, 1u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4239 v97 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4240 v98 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4241 pGame->GetStru6()->SetPlayerBuffAnim(v97, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4242 v99 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4243 v100 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4244 pGame->GetStru6()->SetPlayerBuffAnim(v99, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4245 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4246 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4247 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4248 case 46:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4249 v101 = v12 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4250 if ( v101 && (v102 = v101 - 1) != 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4251 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4252 v103 = v102 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4253 if ( v103 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4254 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4255 if ( v103 != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4256 goto LABEL_269;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4257 v104 = 3600 * (v2 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4258 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4259 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4260 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4261 v104 = 900 * (v2 + 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4262 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4263 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4264 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4265 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4266 v104 = 300 * (v2 + 12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4267 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4268 LODWORD(v733) = v104;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4269 LABEL_269:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4270 amount = v2 + 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4271 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4272 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4273 if ( v731 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4274 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4275 v108 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4276 v109 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4277 v110 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4278 pGame->GetStru6()->SetPlayerBuffAnim(v109, v108);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4279 v111 = pOtherOverlayList->_4418B1(10000, v3->uPlayerID_2 + 310, v1, 65536);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4280 v668 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4281 v716 = v111;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4282 v658 = v111;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4283 v653 = amount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4284 v726 = (Player *)((int)v733 << 7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4285 v651 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4286 v28 = pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4287 v27 = (char *)&pParty->pPlayers[v3->uPlayerID_2].pPlayerBuffs[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4288 goto LABEL_103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4289 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4290 v105 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4291 v726 = (Player *)((int)v733 << 7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4292 v717 = (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4293 v730 = (int)&pParty->pPlayers[0].pPlayerBuffs[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4294 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4295 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4296 v106 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4297 v107 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4298 pGame->GetStru6()->SetPlayerBuffAnim(v106, v105);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4299 v716 = pOtherOverlayList->_4418B1(10000, v105 + 310, v1, 65536);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4300 ((SpellBuff *)v730)->Apply(pParty->uTimePlayed + v717, v731, amount, v716, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4301 v730 += 6972;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4302 ++v105;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4303 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4304 while ( v730 < (signed int)&pParty->field_871C[468] );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4305 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4306 case 52:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4307 if ( pPlayer->CanCastSpell(uRequiredMana) && a2 != v1 && (a2 & 7) == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4308 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4309 v730 = a2 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4310 v112 = &pActors[a2 >> 3];
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
4311 v726 = (Player *)abs(v112->vPosition.z - pParty->vPosition.z);
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
4312 v721 = abs(v112->vPosition.y - pParty->vPosition.y);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4313 v113 = abs(v112->vPosition.x - pParty->vPosition.x);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4314 _this = (ItemGen *)v113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4315 v114 = v721;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4316 v115 = (unsigned int)v726;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4317 if ( v113 < v721 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4318 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4319 v116 = v113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4320 v113 = v721;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4321 v114 = v116;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4322 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4323 if ( v113 < (signed int)v726 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4324 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4325 v117 = v113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4326 v113 = (int)v726;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4327 v115 = v117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4328 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4329 if ( v114 < (signed int)v115 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4330 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4331 v118 = v115;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4332 v115 = v114;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4333 v114 = v118;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4334 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4335 _this = (ItemGen *)(((unsigned int)(11 * v114) >> 5) + (v115 >> 2) + v113);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4336 if ( (double)(signed int)this <= 307.2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4337 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4338 v703 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4339 v702 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4340 v701 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4341 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4342 v119 = HIDWORD(v733);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4343 a1.field_48 = *(int *)HIDWORD(v733);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4344 a1.field_4C = v723;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4345 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4346 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4347 a1.uAttributes = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4348 a1.uSectorID = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4349 a1.uSpriteFrameID = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4350 v120 = 8 * *(short *)(v119 + 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4351 LOBYTE(v120) = v120 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4352 a1.field_60_distance_related_prolly_lod = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4353 a1.field_58 = v120;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4354 a1.uFacing = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4355 a1.uSoundID = *(short *)(v119 + 16);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4356 a1.vPosition.x = v112->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4357 a1.vPosition.y = v112->vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4358 v726 = (Player *)v112->uActorHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4359 v121 = 8 * a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4360 a1.vPosition.z = v112->vPosition.z - (unsigned int)(signed __int64)((double)(signed int)v726 * unk_4D8548);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4361 LOBYTE(v121) = 8 * a2 | 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4362 a1.field_5C = v121;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4363 v122 = a1.Create(0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4364 DamageMonsterFromParty(8 * v122 | 2, v730, (Vec3_int_ *)&v701);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4365 LODWORD(v727) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4366 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4367 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4368 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4369 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4370 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4371 *(int *)HIDWORD(v733) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4372 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4373 v3 = (stru277 *)HIDWORD(v733);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4374 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4375 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4376 case 17:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4377 case 38:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4378 case 51:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4379 v123 = v12 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4380 if ( v123 && (v124 = v123 - 1) != 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4381 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4382 v125 = v124 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4383 if ( v125 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4384 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4385 if ( v125 != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4386 goto LABEL_296;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4387 v126 = 3600 * (v2 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4388 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4389 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4390 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4391 v126 = 900 * (v2 + 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4392 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4393 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4394 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4395 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4396 v126 = 300 * (v2 + 12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4397 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4398 LODWORD(v733) = v126;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4399 LABEL_296:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4400 v127 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4401 if ( v127 == 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4402 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4403 amount = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4404 LODWORD(v725) = 14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4405 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4406 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4407 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4408 if ( v127 == 38 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4409 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4410 LODWORD(v725) = 15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4411 amount = v2 + 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4412 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4413 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4414 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4415 if ( v127 != 51 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4416 goto LABEL_1166;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4417 LODWORD(v725) = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4418 amount = v2 + 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4419 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4420 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4421 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4422 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4423 v128 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4424 v129 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4425 pGame->GetStru6()->SetPlayerBuffAnim(v128, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4426 v83 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4427 v130 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4428 v131 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4429 pGame->GetStru6()->SetPlayerBuffAnim(v130, 1u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4430 v132 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4431 v133 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4432 pGame->GetStru6()->SetPlayerBuffAnim(v132, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4433 v134 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4434 v135 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4435 pGame->GetStru6()->SetPlayerBuffAnim(v134, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4436 v726 = (Player *)((int)v733 << 7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4437 v90 = (double)(signed int)((int)v733 << 7) * 0.033333335;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4438 LABEL_304:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4439 v673 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4440 v662 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4441 v655 = amount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4442 v652 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4443 v136 = pParty->uTimePlayed + (signed int)(signed __int64)v90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4444 v137 = (char *)&pParty->pPartyBuffs[LODWORD(v725)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4445 goto LABEL_977;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4446 case 8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4447 v138 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4448 if ( v138 && (v139 = v138 - 1) != 0 && v139 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4449 v140 = 600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4450 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4451 v140 = 60 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4452 LODWORD(v733) = v140;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4453 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4454 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4455 v141 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4456 v142 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4457 pGame->GetStru6()->SetPlayerBuffAnim(v141, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4458 v143 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4459 v144 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4460 pGame->GetStru6()->SetPlayerBuffAnim(v143, 1u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4461 v145 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4462 v146 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4463 pGame->GetStru6()->SetPlayerBuffAnim(v145, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4464 v147 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4465 v148 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4466 pGame->GetStru6()->SetPlayerBuffAnim(v147, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4467 v668 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4468 v726 = (Player *)((int)v733 << 7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4469 v658 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4470 v653 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4471 v651 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4472 v26 = (signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4473 v27 = (char *)&pParty->pPartyBuffs[10];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4474 goto LABEL_102;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4475 case 9:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4476 v149 = v12 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4477 if ( v149 && (v150 = v149 - 1) != 0 && (v151 = v150 - 1) != 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4478 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4479 if ( v151 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4480 _this = (ItemGen *)20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4481 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4482 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4483 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4484 _this = (ItemGen *)16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4485 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4486 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4487 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4488 v66 = pGlobalTXT_LocalizationStrings[491];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4489 goto LABEL_201;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4490 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4491 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4492 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4493 LODWORD(v725) = a2 & 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4494 if ( (a2 & 7) == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4495 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4496 v152 = a2 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4497 uRequiredMana = pActors[v152].vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4498 v153 = pActors[v152].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4499 v154 = pActors[v152].vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4500 LODWORD(v727) = v153;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4501 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4502 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4503 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4504 v155 = stru_5C6E00->SinCos(pParty->sRotationY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4505 uRequiredMana = pParty->vPosition.x + sub_42EBBE(2048, v155);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4506 v156 = stru_5C6E00->_42EBDB(pParty->sRotationY);
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
4507 LODWORD(v727) = pParty->vPosition.y + sub_42EBBE(2048, v156);
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
4508 v154 = pParty->vPosition.z;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4509 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4510 HIDWORD(v733) = v154;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4511 v713 = v154 + 2500;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4512 v721 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4513 LODWORD(v718) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4514 if ( (signed int)this > v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4515 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4516 *(float *)&y = (double)SHIDWORD(v733);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4517 *(float *)&v732 = (double)v713;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4518 v730 = LODWORD(v725) == 3 ? a2 : 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4519 v726 = (Player *)this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4520 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4521 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4522 v157 = rand();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4523 v158 = (double)SLODWORD(v718);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4524 v718 = v158;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4525 v159 = (double)v721;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4526 *(float *)&v721 = v159;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4527 a2 = v157 % 1000;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4528 *((float *)&v733 + 1) = (double)(v157 % 1000) + *(float *)&y - *(float *)&v732;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4529 v725 = v159 * v159;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4530 *(float *)&_this = v158 * v158;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4531 if ( sqrt(*((float *)&v733 + 1) * *((float *)&v733 + 1) + *(float *)&_this + v725) <= 1.0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4532 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4533 LODWORD(v687) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4534 HIDWORD(v687) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4535 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4536 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4537 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4538 x = (signed __int64)sqrt(*(float *)&_this + v725);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4539 v687 = __PAIR__(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4540 stru_5C6E00->Atan2(x, (signed __int64)*((float *)&v733 + 1)),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4541 stru_5C6E00->Atan2((signed __int64)v718, (signed __int64)*(float *)&v721));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4542 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4543 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4544 a1.field_48 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4545 a1.field_4C = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4546 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4547 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4548 a1.uAttributes = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4549 a1.vPosition.x = uRequiredMana;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4550 a1.vPosition.y = LODWORD(v727);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4551 a1.uSectorID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4552 a1.vPosition.z = a2 + v713;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4553 a1.uSpriteFrameID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4554 a1.field_58 = 8 * v3->uPlayerID | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4555 a1.field_5C = v730;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4556 a1.field_60_distance_related_prolly_lod = stru_50C198._427546(a2 + 2500);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4557 a1.uFacing = v687;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4558 a1.uSoundID = LOWORD(v3->field_10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4559 if ( pParty->bTurnBasedModeOn == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4560 a1.uAttributes = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4561 if ( a1.Create(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4562 v687,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4563 SHIDWORD(v687),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4564 pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4565 v1) != -1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4566 && pParty->bTurnBasedModeOn == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4567 ++pTurnEngine->field_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4568 LODWORD(v718) = rand() % 1024 - 512;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4569 v160 = rand();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4570 v14 = v726 == (Player *)1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4571 v726 = (Player *)((char *)v726 - 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4572 v721 = (unsigned __int64)(v160 % 1024) - 512;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4573 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4574 while ( !v14 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4575 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4576 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4577 case 10:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4578 v67 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4579 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4580 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4581 v66 = pGlobalTXT_LocalizationStrings[492];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4582 goto LABEL_202;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4583 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4584 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4585 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4586 v726 = (Player *)sub_46A6AC((int)dword_50BF30, 100, 4096);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4587 v700.z = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4588 v700.y = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4589 v700.x = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4590 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4591 a1.field_48 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4592 a1.field_4C = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4593 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4594 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4595 a1.uAttributes = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4596 a1.uSectorID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4597 a1.uSpriteFrameID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4598 v161 = v3->uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4599 a1.field_60_distance_related_prolly_lod = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4600 a1.uFacing = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4601 v161 *= 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4602 LOBYTE(v161) = v161 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4603 a1.field_58 = v161;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4604 a1.uSoundID = LOWORD(v3->field_10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4605 a2 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4606 if ( (signed int)v726 > v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4607 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4608 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4609 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4610 v162 = dword_50BF30[a2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4611 a1.vPosition.x = pActors[v162].vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4612 a1.vPosition.y = pActors[v162].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4613 v732 = pActors[v162].uActorHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4614 a1.vPosition.z = pActors[v162].vPosition.z - (unsigned int)(signed __int64)((double)v732 * unk_4D8548);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4615 v163 = 8 * dword_50BF30[a2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4616 LOBYTE(v163) = v163 | 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4617 a1.field_5C = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4618 v164 = a1.Create(0, v1, v1, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4619 v165 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4620 DamageMonsterFromParty(8 * v164 | AI_OBJECT_LAYING_ITEM, dword_50BF30[a2], &v700);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4621 v166 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4622 v166->_4A81CA(&a1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4623 v167 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4624 v167->FadeScreen__like_Turn_Undead_and_mb_Armageddon(0xFF3C1Eu, 0x40u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4625 a2 = v165 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4626 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4627 while ( v165 + 1 < (signed int)v726 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4628 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4629 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4630 case 12:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4631 LODWORD(v733) = 3600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4632 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4633 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4634 v168 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4635 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4636 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4637 v169 = pOtherOverlayList->_4418B1(2000, v168++ + 100, v1, 65536);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4638 v716 = v169;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4639 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4640 while ( v168 < 4 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4641 v668 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4642 v732 = (int)v733 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4643 v658 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4644 v653 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4645 v651 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4646 v28 = pParty->uTimePlayed + (signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4647 goto LABEL_992;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4648 case 13:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4649 v170 = v12 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4650 if ( !v170 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4651 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4652 v173 = 300 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4653 goto LABEL_353;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4654 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4655 v171 = v170 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4656 if ( !v171 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4657 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4658 v173 = 600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4659 goto LABEL_353;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4660 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4661 v172 = v171 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4662 if ( !v172 || v172 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4663 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4664 v173 = 3600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4665 LABEL_353:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4666 LODWORD(v733) = v173;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4667 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4668 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4669 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4670 v174 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4671 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4672 pOtherOverlayList->_4418B1(2010, v174++ + 100, v1, 65536);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4673 while ( v174 < 4 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4674 v175 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4675 v176 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4676 pGame->GetStru6()->SetPlayerBuffAnim(v175, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4677 v83 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4678 v177 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4679 v178 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4680 pGame->GetStru6()->SetPlayerBuffAnim(v177, 1u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4681 v179 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4682 v180 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4683 pGame->GetStru6()->SetPlayerBuffAnim(v179, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4684 v181 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4685 v182 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4686 pGame->GetStru6()->SetPlayerBuffAnim(v181, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4687 v673 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4688 v732 = (int)v733 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4689 v662 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4690 v655 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4691 v652 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4692 v183 = (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4693 v137 = (char *)&pParty->pPartyBuffs[5];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4694 goto LABEL_976;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4695 case 15:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4696 v184 = v12 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4697 if ( v184 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4698 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4699 v185 = v184 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4700 if ( v185 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4701 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4702 v186 = v185 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4703 if ( v186 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4704 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4705 if ( v186 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4706 amount = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4707 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4708 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4709 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4710 amount = 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4711 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4712 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4713 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4714 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4715 amount = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4716 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4717 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4718 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4719 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4720 amount = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4721 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4722 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4723 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4724 v726 = (Player *)((signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4725 v732 = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360 / (amount - 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4726 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4727 a1.field_48 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4728 a1.field_4C = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4729 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4730 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType);
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
4731 a1.vPosition.y = pParty->vPosition.y;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4732 a1.vPosition.x = pParty->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4733 a1.uAttributes = v1;
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
4734 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4735 a1.uSectorID = pIndoor->GetSector(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4736 pParty->vPosition.x,
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
4737 pParty->vPosition.y,
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
4738 pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4739 a1.uSpriteFrameID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4740 v187 = 8 * v3->uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4741 LOBYTE(v187) = v187 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4742 a1.field_58 = v187;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4743 a1.field_5C = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4744 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4745 a1.uSoundID = LOWORD(v3->field_10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4746 if ( pParty->bTurnBasedModeOn == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4747 LOBYTE(a1.uAttributes) |= 4u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4748 v188 = (signed int)v726 / -2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4749 v189 = (signed int)v726 / 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4750 while ( v188 <= v189 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4751 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4752 a1.uFacing = v188 + LOWORD(v715.uYawAngle);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4753 if ( a1.Create(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4754 (signed __int16)(v188 + LOWORD(v715.uYawAngle)),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4755 v715.uPitchAngle,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4756 pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4757 v3->uPlayerID + 1) != -1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4758 && pParty->bTurnBasedModeOn == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4759 ++pTurnEngine->field_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4760 v188 += v732;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4761 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4762 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4763 case 16:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4764 if ( pParty->uFlags & 8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4765 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4766 v190 = pGlobalTXT_LocalizationStrings[493];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4767 goto LABEL_462;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4768 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4769 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4770 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4771 v191 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4772 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4773 pOtherOverlayList->_4418B1(2040, v191++ + 100, v1, 65536);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4774 while ( v191 < 4 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4775 BYTE1(pParty->uFlags) |= 1u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4776 pParty->uFallSpeed = 1000;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4777 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4778 case 19:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4779 v192 = v12 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4780 if ( !v192 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4781 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4782 amount = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4783 goto LABEL_391;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4784 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4785 v193 = v192 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4786 if ( !v193 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4787 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4788 v196 = 2 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4789 LABEL_389:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4790 amount = v196;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4791 LABEL_391:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4792 v195 = 600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4793 goto LABEL_392;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4794 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4795 v194 = v193 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4796 if ( !v194 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4797 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4798 v196 = 3 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4799 goto LABEL_389;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4800 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4801 if ( v194 != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4802 goto LABEL_393;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4803 amount = 4 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4804 v195 = 3600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4805 LABEL_392:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4806 LODWORD(v733) = v195;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4807 LABEL_393:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4808 if ( pParty->uFlags & 0x30 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4809 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4810 v66 = pGlobalTXT_LocalizationStrings[638];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4811 goto LABEL_201;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4812 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4813 if ( pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4814 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4815 v197 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4816 v198 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4817 pGame->GetStru6()->SetPlayerBuffAnim(v197, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4818 v83 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4819 v199 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4820 v200 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4821 pGame->GetStru6()->SetPlayerBuffAnim(v199, 1u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4822 v201 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4823 v202 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4824 pGame->GetStru6()->SetPlayerBuffAnim(v201, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4825 v203 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4826 v204 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4827 pGame->GetStru6()->SetPlayerBuffAnim(v203, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4828 v673 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4829 v732 = (int)v733 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4830 v662 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4831 v655 = amount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4832 v652 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4833 v183 = (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4834 v137 = (char *)&pParty->pPartyBuffs[11];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4835 LABEL_976:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4836 v136 = pParty->uTimePlayed + v183;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4837 LABEL_977:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4838 ((SpellBuff *)v137)->Apply(v136, v652, v655, v662, v673);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4839 LABEL_978:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4840 LODWORD(v727) = v83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4841 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4842 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4843 case 21:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4844 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4845 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4846 v190 = pGlobalTXT_LocalizationStrings[494];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4847 LABEL_462:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4848 ShowStatusBarString(v190, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4849 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, v1, v1, -1, v1, v1, v1, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4850 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4851 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4852 if ( !pPlayers[v3->uPlayerID + 1]->GetMaxMana() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4853 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4854 LABEL_461:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4855 v190 = pGlobalTXT_LocalizationStrings[428];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4856 goto LABEL_462;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4857 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4858 LODWORD(v733) = 3600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4859 if ( v731 == 2 || v731 == 3 || (amount = v1, v731 != 4) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4860 amount = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4861 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4862 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4863 v205 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4864 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4865 pOtherOverlayList->_4418B1(2090, v205++ + 100, v1, 65536);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4866 while ( v205 < 4 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4867 v206 = pOtherOverlayList->_4418B1(10008, 203, v1, 65536);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4868 v207 = v3->uPlayerID + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4869 v716 = v206;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4870 v668 = v207;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4871 v658 = v206;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4872 v653 = amount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4873 v732 = (int)v733 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4874 v651 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4875 v26 = (signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4876 v27 = (char *)&pParty->pPartyBuffs[7];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4877 LABEL_101:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4878 v26 = (signed int)v26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4879 LABEL_102:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4880 v28 = pParty->uTimePlayed + v26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4881 LABEL_103:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4882 HIDWORD(v650) = HIDWORD(v28);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4883 LABEL_104:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4884 LODWORD(v650) = v28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4885 ((SpellBuff *)v27)->Apply(v650, v651, v653, v658, v668);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4886 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4887 case 22:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4888 v67 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4889 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4890 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4891 v66 = pGlobalTXT_LocalizationStrings[495];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4892 goto LABEL_202;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4893 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4894 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4895 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4896 v208 = a2 & 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4897 LODWORD(v725) = a2 & 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4898 if ( v208 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4899 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4900 v209 = a2 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4901 LODWORD(v718) = pActors[v209].vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4902 v210 = pActors[v209].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4903 v211 = pActors[v209].vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4904 v713 = v210;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4905 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4906 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4907 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4908 v212 = stru_5C6E00->SinCos(pParty->sRotationY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4909 LODWORD(v718) = pParty->vPosition.x + sub_42EBBE(2048, v212);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4910 v213 = stru_5C6E00->_42EBDB(pParty->sRotationY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4911 v214 = sub_42EBBE(2048, v213);
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
4912 v211 = pParty->vPosition.z;
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
4913 v713 = pParty->vPosition.y + v214;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4914 v208 = LODWORD(v725);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4915 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4916 v726 = (Player *)v211;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4917 HIDWORD(v733) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4918 *(float *)&v732 = (double)v211;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4919 LODWORD(v725) = v211 + 2500;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4920 v721 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4921 *(float *)&y = (double)(v211 + 2500);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4922 v730 = v208 == 3 ? a2 : 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4923 a2 = 20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4924 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4925 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4926 v215 = rand();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4927 v216 = (double)v721;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4928 v727 = v216;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4929 v217 = (double)SHIDWORD(v733);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4930 *(float *)&uRequiredMana = v217;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4931 _this = (ItemGen *)(v215 % 1000);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4932 *((float *)&v733 + 1) = (double)(v215 % 1000) + *(float *)&v732 - *(float *)&y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4933 *(float *)&v721 = v217 * v217;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4934 *(float *)&v726 = v216 * v216;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4935 if ( sqrt(*((float *)&v733 + 1) * *((float *)&v733 + 1) + *(float *)&v726 + *(float *)&v721) <= 1.0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4936 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4937 LODWORD(v685) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4938 HIDWORD(v685) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4939 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4940 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4941 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4942 v684 = (signed __int64)sqrt(*(float *)&v726 + *(float *)&v721);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4943 v685 = __PAIR__(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4944 stru_5C6E00->Atan2(v684, (signed __int64)*((float *)&v733 + 1)),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4945 stru_5C6E00->Atan2((signed __int64)v727, (signed __int64)*(float *)&uRequiredMana));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4946 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4947 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4948 a1.field_48 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4949 a1.field_4C = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4950 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4951 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4952 a1.uAttributes = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4953 a1.vPosition.x = LODWORD(v718);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4954 a1.vPosition.y = v713;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4955 a1.uSectorID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4956 a1.vPosition.z = (int)((char *)_this + LODWORD(v725));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4957 a1.uSpriteFrameID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4958 a1.field_58 = 8 * v3->uPlayerID | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4959 a1.field_5C = v730;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4960 a1.field_60_distance_related_prolly_lod = stru_50C198._427546((int)&_this[69].uNumCharges);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4961 a1.uFacing = v685;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4962 a1.uSoundID = LOWORD(v3->field_10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4963 if ( pParty->bTurnBasedModeOn == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4964 a1.uAttributes = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4965 if ( a1.Create(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4966 v685,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4967 SHIDWORD(v685),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4968 pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4969 v1) != -1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4970 && pParty->bTurnBasedModeOn == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4971 ++pTurnEngine->field_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4972 v721 = rand() % 1024 - 512;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4973 v218 = rand();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4974 v14 = a2-- == 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4975 HIDWORD(v733) = (unsigned __int64)(v218 % 1024) - 512;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4976 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4977 while ( !v14 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4978 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4979 case 23:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4980 v219 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4981 if ( v219 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4982 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4983 v220 = v219 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4984 if ( v220 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4985 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4986 if ( v220 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4987 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4988 amount = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4989 goto LABEL_433;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4990 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4991 v221 = 180 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4992 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4993 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4994 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4995 v221 = 86400 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4996 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4997 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4998 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4999 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5000 v221 = 3600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5001 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5002 amount = v221;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5003 LABEL_433:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5004 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5005 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5006 v222 = (char *)pParty->pPlayers;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5007 HIDWORD(v733) = (int)(char *)&pParty + 2508;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5008 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5009 case 24:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5010 v224 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5011 if ( v224 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5012 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5013 v225 = v224 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5014 if ( v225 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5015 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5016 if ( v225 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5017 amount = 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5018 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5019 amount = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5020 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5021 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5022 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5023 amount = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5024 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5025 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5026 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5027 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5028 amount = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5029 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5030 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5031 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5032 HIDWORD(v733) = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5033 if ( amount == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5034 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5035 LABEL_152:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5036 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5037 a1.field_48 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5038 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5039 a1.field_4C = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5040 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType);
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
5041 a1.vPosition.y = pParty->vPosition.y;
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
5042 v51 = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3;
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
5043 v671 = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3;
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
5044 v660 = pParty->vPosition.y;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5045 LABEL_153:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5046 a1.uAttributes = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5047 a1.vPosition.x = pParty->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5048 a1.vPosition.z = v51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5049 v52 = pIndoor->GetSector(pParty->vPosition.x, v660, v671);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5050 a1.uSpriteFrameID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5051 a1.uSectorID = v52;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5052 v53 = 8 * v3->uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5053 LOBYTE(v53) = v53 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5054 a1.field_58 = v53;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5055 a1.field_5C = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5056 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5057 a1.uFacing = LOWORD(v715.uYawAngle);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5058 a1.uSoundID = LOWORD(v3->field_10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5059 LABEL_154:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5060 if ( pParty->bTurnBasedModeOn == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5061 LOBYTE(a1.uAttributes) |= 4u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5062 LABEL_156:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5063 v669 = v3->uPlayerID + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5064 v36 = v715.uYawAngle;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5065 v659 = pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5066 v654 = v715.uPitchAngle;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5067 LABEL_157:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5068 if ( a1.Create(v36, v654, v659, v669) != -1 && pParty->bTurnBasedModeOn == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5069 ++pTurnEngine->field_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5070 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5071 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5072 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5073 v732 = SHIDWORD(v733) / (amount - 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5074 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5075 a1.field_48 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5076 a1.field_4C = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5077 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5078 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType);
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
5079 a1.vPosition.y = pParty->vPosition.y;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5080 a1.vPosition.x = pParty->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5081 a1.uAttributes = v1;
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
5082 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5083 a1.uSectorID = pIndoor->GetSector(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5084 pParty->vPosition.x,
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
5085 pParty->vPosition.y,
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
5086 pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5087 a1.uSpriteFrameID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5088 v226 = 8 * v3->uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5089 LOBYTE(v226) = v226 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5090 a1.field_58 = v226;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5091 a1.field_5C = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5092 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5093 a1.uSoundID = LOWORD(v3->field_10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5094 if ( pParty->bTurnBasedModeOn == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5095 LOBYTE(a1.uAttributes) |= 4u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5096 v227 = SHIDWORD(v733) / -2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5097 y = (char *)(SHIDWORD(v733) / 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5098 if ( SHIDWORD(v733) / -2 <= SHIDWORD(v733) / 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5099 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5100 v228 = v715.uYawAngle;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5101 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5102 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5103 a1.uFacing = v227 + v228;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5104 if ( a1.Create(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5105 v227 + v228,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5106 v715.uPitchAngle,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5107 pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5108 v3->uPlayerID + 1) != -1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5109 && pParty->bTurnBasedModeOn == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5110 ++pTurnEngine->field_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5111 v227 += v732;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5112 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5113 while ( v227 <= (signed int)y );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5114 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5115 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5116 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5117 case 27:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5118 if ( !pPlayers[v3->uPlayerID + 1]->GetMaxMana() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5119 goto LABEL_461;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5120 if ( v731 == 2 || v731 != 3 && v731 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5121 v229 = 600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5122 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5123 v229 = 3600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5124 LODWORD(v733) = v229;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5125 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5126 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5127 v716 = pOtherOverlayList->_4418B1(10005, 201, v1, 65536);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5128 v230 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5129 v231 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5130 pGame->GetStru6()->SetPlayerBuffAnim(v230, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5131 v232 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5132 v233 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5133 v234 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5134 pGame->GetStru6()->SetPlayerBuffAnim(v233, 1u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5135 v235 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5136 v236 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5137 pGame->GetStru6()->SetPlayerBuffAnim(v235, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5138 v237 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5139 v238 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5140 pGame->GetStru6()->SetPlayerBuffAnim(v237, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5141 v239 = v3->uPlayerID + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5142 v732 = v229 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5143 pParty->pPartyBuffs[18].Apply(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5144 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v229 << 7) * 0.033333335),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5145 v731,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5146 amount,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5147 v716,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5148 v239);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5149 if ( v731 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5150 pParty->pPartyBuffs[18].uFlags = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5151 goto LABEL_1112;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5152 case 28:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5153 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5154 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5155 v240 = (char *)&pParty->pPlayers[v3->uPlayerID_2].pInventoryItems[a2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5156 y = v240;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5157 if ( pItemsTable->pItems[*(int *)v240].uEquipType != 12 || v240[20] & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5158 goto LABEL_199;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5159 if ( v731 == 1 || v731 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5160 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5161 v241 = (double)v723 * 0.0099999998 + 0.5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5162 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5163 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5164 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5165 if ( v731 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5166 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5167 v241 = (double)v723 * 0.0099999998 + 0.69999999;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5168 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5169 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5170 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5171 if ( v731 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5172 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5173 v241 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5174 goto LABEL_484;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5175 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5176 v241 = (double)v723 * 0.0099999998 + 0.80000001;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5177 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5178 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5179 if ( v241 > 1.0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5180 v241 = 1.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5181 LABEL_484:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5182 v732 = (unsigned __int8)v240[25];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5183 v242 = (signed __int64)((double)v732 * v241);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5184 v243 = y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5185 y[25] = v242;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5186 *((int *)v243 + 4) = (unsigned __int8)v242;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5187 if ( (unsigned __int8)v242 <= v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5188 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5189 *(int *)v243 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5190 dword_50C9D0 = 113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5191 dword_50C9D4 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5192 dword_50C9D8 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5193 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5194 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, v1, v1, -1, v1, v1, v1, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5195 v3->spellnum = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5196 goto LABEL_1165;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5197 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5198 *((int *)v243 + 5) |= 0x40u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5199 goto LABEL_1055;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5200 case 30:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5201 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5202 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5203 uRequiredMana = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5204 HIDWORD(v733) = 10 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5205 v730 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5206 v244 = (char *)&pParty->pPlayers[v3->uPlayerID_2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5207 v726 = &pParty->pPlayers[v3->uPlayerID_2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5208 if ( v731 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5209 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5210 v245 = (int)&v244[36 * a2 + 532];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5211 v309 = (char *)&pItemsTable->pItems[*(int *)v245].pIconName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5212 v311 = __OFSUB__(*(int *)v245, 134);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5213 v14 = *(int *)v245 == 134;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5214 v310 = *(int *)v245 - 134 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5215 LODWORD(v725) = (int)(char *)&pItemsTable + 48 * *(int *)v245 + 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5216 if ( (unsigned __int8)(v310 ^ v311) | v14 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5217 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5218 if ( *(int *)&v244[36 * a2 + 544] == v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5219 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5220 if ( *(int *)&v244[36 * a2 + 536] == v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5221 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5222 if ( *(int *)&v244[36 * a2 + 540] == v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5223 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5224 v312 = v309[28];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5225 if ( v312 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5226 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5227 if ( v312 != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5228 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5229 if ( v312 != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5230 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5231 _this = (ItemGen *)&v244[36 * a2 + 552];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5232 if ( !(v244[36 * a2 + 552] & 2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5233 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5234 if ( ((ItemGen *)v245)->GetValue() < 0x1C2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5235 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5236 uRequiredMana = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5237 v730 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5238 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5239 if ( rand() % 100 >= SHIDWORD(v733) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5240 uRequiredMana = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5241 if ( uRequiredMana == v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5242 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5243 v313 = *(char *)(LODWORD(v725) + 28);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5244 if ( v313 == 3 | v313 == 4 | v313 == 5 | v313 == 6 | v313 == 7 | v313 == 8 | v313 == 9 | v313 == 10 | v313 == 11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5245 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5246 v314 = rand() % pItemsTable->field_116D8[pItemsTable->pItems[*(int *)v245].uEquipType];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5247 *(int *)(v245 + 4) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5248 for ( j = pItemsTable->pEnchantments[0].field_8[pItemsTable->pItems[*(int *)v245].uEquipType
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5249 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5250 ;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5251 j += pItemsTable->pEnchantments[*(int *)(v245 + 4)].field_8[pItemsTable->pItems[*(int *)v245].uEquipType
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5252 + 1] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5253 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5254 ++*(int *)(v245 + 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5255 if ( j >= v314 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5256 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5257 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5258 v254 = rand();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5259 v255 = pItemsTable->field_116D8[17];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5260 v256 = pItemsTable->field_116D8[16];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5261 LABEL_611:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5262 *(int *)(v245 + 8) = v256 + v254 % (v255 - v256 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5263 LABEL_612:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5264 _this->uItemID |= 0x20u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5265 goto LABEL_1055;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5266 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5267 goto LABEL_615;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5268 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5269 LABEL_613:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5270 v316 = _this->uItemID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5271 if ( !(BYTE1(v316) & 2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5272 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5273 LOBYTE(v316) = v316 | 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5274 _this->uItemID = v316;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5275 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5276 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5277 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5278 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5279 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5280 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5281 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5282 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5283 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5284 LABEL_616:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5285 if ( LODWORD(v727) == v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5286 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5287 v317 = pGlobalTXT_LocalizationStrings[428];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5288 if ( v730 == v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5289 v317 = pGlobalTXT_LocalizationStrings[585];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5290 ShowStatusBarString(v317, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5291 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, v1, v1, -1, v1, v1, v1, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5292 v318 = v726;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5293 v3->spellnum = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5294 v318->PlaySound(43, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5295 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5296 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5297 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5298 if ( v731 != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5299 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5300 if ( v731 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5301 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5302 v245 = (int)&v244[36 * a2 + 532];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5303 v269 = *(int *)v245;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5304 if ( *(int *)v245 > 134
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5305 || *(int *)(v245 + 12) != v1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5306 || *(int *)(v245 + 4) != v1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5307 || *(int *)(v245 + 8) != v1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5308 || (_this = (ItemGen *)(v245 + 20), *(char *)(v245 + 20) & 2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5309 goto LABEL_616;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5310 v270 = (char *)&pItemsTable->pItems[v269].pIconName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5311 LODWORD(v725) = (int)v270;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5312 v271 = v270[28];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5313 if ( v271 && v271 != 1 && v271 != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5314 v272 = ((ItemGen *)v245)->GetValue() < 0x1C2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5315 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5316 v272 = ((ItemGen *)v245)->GetValue() < 0xFA;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5317 if ( v272 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5318 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5319 uRequiredMana = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5320 v730 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5321 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5322 if ( rand() % 100 >= SHIDWORD(v733) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5323 uRequiredMana = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5324 if ( uRequiredMana != v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5325 goto LABEL_613;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5326 v273 = v725;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5327 v274 = *(char *)(LODWORD(v725) + 28);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5328 if ( v274 == 0 | v274 == 1 | v274 == 2 | v274 == 3 | v274 == 4 | v274 == 5 | v274 == 6 | v274 == 7 | v274 == 8 | v274 == 9 | v274 == 10 | v274 == 11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5329 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5330 if ( rand() % 100 < 80
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5331 && !(*(char *)(LODWORD(v273) + 28) == 0 | *(char *)(LODWORD(v273) + 28) == 1 | *(char *)(LODWORD(v273) + 28) == 2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5332 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5333 v275 = rand() % pItemsTable->field_116D8[pItemsTable->pItems[*(int *)v245].uEquipType];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5334 *(int *)(v245 + 4) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5335 for ( k = pItemsTable->pEnchantments[0].field_8[pItemsTable->pItems[*(int *)v245].uEquipType + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5336 ;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5337 k += pItemsTable->pEnchantments[*(int *)(v245 + 4)].field_8[pItemsTable->pItems[*(int *)v245].uEquipType
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5338 + 1] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5339 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5340 ++*(int *)(v245 + 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5341 if ( k >= v275 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5342 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5343 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5344 v254 = rand();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5345 v255 = pItemsTable->field_116D8[19];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5346 v256 = pItemsTable->field_116D8[18];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5347 goto LABEL_611;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5348 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5349 v277 = pItemsTable->field_11798;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5350 v278 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5351 v725 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5352 HIDWORD(v733) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5353 if ( pItemsTable->field_11798 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5354 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5355 v730 = (int)&v679;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5356 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5357 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5358 v279 = LOBYTE(pItemsTable->pSpecialEnchantments[v278 + 1].pName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5359 if ( !v279 || v279 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5360 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5361 v280 = *(&pItemsTable->pSpecialEnchantments[0].field_8[pItemsTable->pItems[*(int *)v245].uEquipType
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5362 + 4]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5363 + v278 * 28);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5364 LODWORD(v725) += v280;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5365 if ( v280 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5366 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5367 v281 = v730;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5368 v730 += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5369 *(int *)v281 = HIDWORD(v733);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5370 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5371 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5372 ++HIDWORD(v733);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5373 ++v278;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5374 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5375 while ( SHIDWORD(v733) < v277 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5376 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5377 v282 = rand() % SLODWORD(v725);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5378 v283 = v679;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5379 *(int *)(v245 + 12) = v679;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5380 v284 = pItemsTable->pSpecialEnchantments[v283].field_8[pItemsTable->pItems[*(int *)v245].uEquipType + 4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5381 v285 = v282 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5382 if ( v284 < v285 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5383 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5384 for ( l = &v679; ; l = (int *)v732 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5385 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5386 v287 = (int)(l + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5387 v732 = v287;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5388 v288 = *(int *)v287;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5389 *(int *)(v245 + 12) = v288;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5390 v284 += pItemsTable->pSpecialEnchantments[v288].field_8[pItemsTable->pItems[*(int *)v245].uEquipType
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5391 + 4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5392 if ( v284 >= v285 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5393 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5394 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5395 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5396 goto LABEL_525;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5397 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5398 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5399 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5400 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5401 if ( v731 != 4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5402 || (v245 = (int)&v726->pInventoryItems[a2], v246 = *(int *)v245, *(int *)v245 > 134)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5403 || v726->pInventoryItems[a2].uAdditionalValue != v1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5404 || v726->pInventoryItems[a2]._bonus_type != v1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5405 || v726->pInventoryItems[a2]._bonus_strength != v1
23
509744251c8e Player-related members
Nomad
parents: 4
diff changeset
5406 || (_this = (ItemGen *)((char *)&v726->pInventoryItems[a2] + 20), v726->pInventoryItems[a2].uAttributes & 2) )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5407 goto LABEL_616;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5408 v247 = (char *)&pItemsTable->pItems[v246].pIconName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5409 LODWORD(v725) = (int)v247;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5410 v248 = v247[28];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5411 if ( v248 && v248 != 1 && v248 != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5412 v249 = v726->pInventoryItems[a2].GetValue() < 0x1C2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5413 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5414 v249 = v726->pInventoryItems[a2].GetValue() < 0xFA;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5415 if ( v249 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5416 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5417 uRequiredMana = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5418 v730 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5419 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5420 if ( rand() % 100 >= SHIDWORD(v733) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5421 uRequiredMana = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5422 if ( uRequiredMana != v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5423 goto LABEL_613;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5424 v250 = v725;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5425 v251 = *(char *)(LODWORD(v725) + 28);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5426 if ( v251 == 0 | v251 == 1 | v251 == 2 | v251 == 3 | v251 == 4 | v251 == 5 | v251 == 6 | v251 == 7 | v251 == 8 | v251 == 9 | v251 == 10 | v251 == 11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5427 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5428 if ( rand() % 100 < 80
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5429 && !(*(char *)(LODWORD(v250) + 28) == 0 | *(char *)(LODWORD(v250) + 28) == 1 | *(char *)(LODWORD(v250) + 28) == 2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5430 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5431 v252 = rand() % pItemsTable->field_116D8[pItemsTable->pItems[*(int *)v245].uEquipType];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5432 *(int *)(v245 + 4) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5433 for ( m = pItemsTable->pEnchantments[0].field_8[pItemsTable->pItems[*(int *)v245].uEquipType + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5434 ;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5435 m += pItemsTable->pEnchantments[*(int *)(v245 + 4)].field_8[pItemsTable->pItems[*(int *)v245].uEquipType
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5436 + 1] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5437 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5438 ++*(int *)(v245 + 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5439 if ( m >= v252 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5440 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5441 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5442 v254 = rand();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5443 v255 = pItemsTable->field_116D8[21];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5444 v256 = pItemsTable->field_116D8[20];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5445 goto LABEL_611;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5446 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5447 v257 = pItemsTable->field_11798;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5448 v258 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5449 v725 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5450 HIDWORD(v733) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5451 if ( pItemsTable->field_11798 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5452 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5453 v730 = (int)&v679;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5454 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5455 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5456 v259 = LOBYTE(pItemsTable->pSpecialEnchantments[v258 + 1].pName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5457 if ( !v259 || v259 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5458 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5459 v260 = *(&pItemsTable->pSpecialEnchantments[0].field_8[pItemsTable->pItems[*(int *)v245].uEquipType
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5460 + 4]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5461 + v258 * 28);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5462 LODWORD(v725) += v260;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5463 if ( v260 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5464 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5465 v261 = v730;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5466 v730 += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5467 *(int *)v261 = HIDWORD(v733);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5468 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5469 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5470 ++HIDWORD(v733);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5471 ++v258;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5472 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5473 while ( SHIDWORD(v733) < v257 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5474 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5475 v262 = rand() % SLODWORD(v725);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5476 v263 = v679;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5477 *(int *)(v245 + 12) = v679;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5478 v264 = pItemsTable->pSpecialEnchantments[v263].field_8[pItemsTable->pItems[*(int *)v245].uEquipType + 4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5479 v265 = v262 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5480 if ( v264 < v265 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5481 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5482 for ( ii = &v679; ; ii = (int *)v732 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5483 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5484 v267 = (int)(ii + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5485 v732 = v267;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5486 v268 = *(int *)v267;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5487 *(int *)(v245 + 12) = v268;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5488 v264 += pItemsTable->pSpecialEnchantments[v268].field_8[pItemsTable->pItems[*(int *)v245].uEquipType
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5489 + 4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5490 if ( v264 >= v265 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5491 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5492 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5493 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5494 LABEL_525:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5495 ++*(int *)(v245 + 12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5496 goto LABEL_612;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5497 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5498 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5499 LABEL_615:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5500 v1 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5501 goto LABEL_616;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5502 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5503 v289 = (ItemGen *)&v244[36 * a2 + 532];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5504 _this = v289;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5505 v290 = v289->uItemID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5506 LODWORD(v725) = (int)(char *)&pItemsTable + 48 * v290 + 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5507 if ( v290 > 134
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5508 || _this->uAdditionalValue != v1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5509 || _this->_bonus_type != v1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5510 || _this->_bonus_strength != v1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5511 || (v291 = pItemsTable->pItems[v290].uEquipType) == 0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5512 || v291 == 1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5513 || v291 == 2
23
509744251c8e Player-related members
Nomad
parents: 4
diff changeset
5514 || _this->uAttributes & 2 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5515 goto LABEL_616;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5516 if ( _this->GetValue() < 0x1C2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5517 uRequiredMana = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5518 if ( rand() % 100 >= SHIDWORD(v733) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5519 uRequiredMana = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5520 if ( uRequiredMana != v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5521 goto LABEL_199;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5522 v292 = *(char *)(LODWORD(v725) + 28);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5523 if ( !(v292 == 3 | v292 == 4 | v292 == 5 | v292 == 6 | v292 == 7 | v292 == 8 | v292 == 9 | v292 == 10 | v292 == 11) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5524 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5525 v2 = v723;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5526 v1 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5527 goto LABEL_199;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5528 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5529 if ( rand() % 100 >= 80 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5530 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5531 v297 = pItemsTable->field_11798;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5532 v294 = _this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5533 v298 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5534 v725 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5535 HIDWORD(v733) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5536 if ( pItemsTable->field_11798 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5537 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5538 v730 = (int)&v679;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5539 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5540 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5541 v299 = LOBYTE(pItemsTable->pSpecialEnchantments[v298 + 1].pName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5542 if ( !v299 || v299 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5543 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5544 v300 = *(&pItemsTable->pSpecialEnchantments[0].field_8[pItemsTable->pItems[v294->uItemID].uEquipType + 4]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5545 + v298 * 28);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5546 LODWORD(v725) += v300;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5547 if ( v300 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5548 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5549 v301 = v730;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5550 v730 += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5551 *(int *)v301 = HIDWORD(v733);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5552 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5553 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5554 ++HIDWORD(v733);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5555 ++v298;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5556 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5557 while ( SHIDWORD(v733) < v297 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5558 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5559 v302 = rand() % SLODWORD(v725);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5560 v303 = v679;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5561 v294->uAdditionalValue = v679;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5562 v304 = pItemsTable->pSpecialEnchantments[v303].field_8[pItemsTable->pItems[v294->uItemID].uEquipType + 4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5563 v305 = v302 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5564 if ( v304 < v305 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5565 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5566 for ( jj = &v679; ; jj = (int *)v732 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5567 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5568 v307 = (int)(jj + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5569 v732 = v307;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5570 v308 = *(int *)v307;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5571 v294->uAdditionalValue = v308;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5572 v304 += pItemsTable->pSpecialEnchantments[v308].field_8[pItemsTable->pItems[v294->uItemID].uEquipType + 4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5573 if ( v304 >= v305 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5574 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5575 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5576 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5577 ++v294->uAdditionalValue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5578 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5579 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5580 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5581 v293 = rand();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5582 v294 = _this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5583 v295 = v293 % pItemsTable->field_116D8[pItemsTable->pItems[_this->uItemID].uEquipType];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5584 _this->_bonus_type = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5585 for ( kk = pItemsTable->pEnchantments[0].field_8[pItemsTable->pItems[v294->uItemID].uEquipType + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5586 ;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5587 kk += pItemsTable->pEnchantments[v294->_bonus_type].field_8[pItemsTable->pItems[v294->uItemID].uEquipType
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5588 + 1] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5589 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5590 ++v294->_bonus_type;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5591 if ( kk >= v295 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5592 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5593 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5594 v294->_bonus_strength = pItemsTable->field_116D8[18]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5595 + rand() % (pItemsTable->field_116D8[19] - pItemsTable->field_116D8[18] + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5596 }
23
509744251c8e Player-related members
Nomad
parents: 4
diff changeset
5597 v294->uAttributes |= 0x20u;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5598 goto LABEL_1055;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5599 case 31:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5600 amount = 10 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5601 if ( pPlayer->sMana < (signed int)uRequiredMana )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5602 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5603 if ( pParty->uFlags & 0x30 && v12 != 4 || rand() % 100 >= amount && v731 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5604 goto LABEL_200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5605 byte_50C0C0 = LOBYTE(v3->uPlayerID);
4
4acbadf78023 missing file added
Nomad
parents: 2
diff changeset
5606 pMessageQueue_50CBD0->SendMessage((UIMessageType)195, v1, v1);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5607 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5608 case 33:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5609 LODWORD(v733) = 604800 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5610 if ( !_strcmpi(pCurrentMapName, "d05.blv") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5611 goto LABEL_200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5612 v319 = uRequiredMana;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5613 if ( pPlayer->sMana >= (signed int)uRequiredMana )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5614 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5615 pEventTimer->Pause();
4
4acbadf78023 missing file added
Nomad
parents: 2
diff changeset
5616 pMessageQueue_50CBD0->SendMessage((UIMessageType)177, v1, v1);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5617 qword_506350 = (signed int)v733;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5618 _506348_current_lloyd_playerid = v3->uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5619 ::uRequiredMana = v319;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5620 ::sRecoveryTime = sRecoveryTime;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5621 dword_50633C = v3->field_10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5622 dword_506338 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5623 LOBYTE(v3->field_8) |= 0x20u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5624 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5625 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5626 case 40:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5627 v320 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5628 if ( !v320 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5629 goto LABEL_632;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5630 v321 = v320 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5631 if ( v321 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5632 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5633 if ( v321 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5634 goto LABEL_634;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5635 LABEL_632:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5636 v322 = 3600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5637 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5638 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5639 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5640 v322 = 86400 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5641 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5642 amount = v322;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5643 LABEL_634:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5644 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5645 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5646 v323 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5647 v324 = (char *)&pParty->pPlayers[v323].pConditions[15];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5648 if ( !pParty->pPlayers[v323].pConditions[15] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5649 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5650 if ( v731 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5651 goto LABEL_637;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5652 v732 = amount << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5653 v663 = (signed __int64)((double)(signed __int64)pParty->uTimePlayed - (double)(amount << 7) * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5654 v656 = 15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5655 goto LABEL_640;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5656 case 41:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5657 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5658 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5659 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5660 a1.field_48 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5661 a1.field_4C = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5662 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5663 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType);
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
5664 a1.vPosition.y = pParty->vPosition.y;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5665 a1.vPosition.x = pParty->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5666 a1.uAttributes = v1;
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
5667 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5668 a1.uSectorID = pIndoor->GetSector(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5669 pParty->vPosition.x,
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
5670 pParty->vPosition.y,
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
5671 pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5672 a1.uSpriteFrameID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5673 v326 = 8 * v3->uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5674 LOBYTE(v326) = v326 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5675 a1.field_58 = v326;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5676 a1.field_5C = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5677 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5678 a1.uFacing = LOWORD(pParty->sRotationY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5679 a1.uSoundID = LOWORD(v3->field_10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5680 if ( pParty->bTurnBasedModeOn == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5681 LOBYTE(a1.uAttributes) |= 4u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5682 v669 = v3->uPlayerID + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5683 v659 = pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5684 v654 = pParty->sRotationX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5685 goto LABEL_125;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5686 case 43:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5687 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5688 goto LABEL_200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5689 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5690 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5691 a1.uItemType = 4090;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5692 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5693 a1.field_48 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5694 a1.field_4C = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5695 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5696 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5697 a1.vPosition.x = pParty->vPosition.x;
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
5698 a1.vPosition.y = pParty->vPosition.y;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5699 a1.uAttributes = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5700 a1.uSectorID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5701 a1.uSpriteFrameID = v1;
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
5702 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5703 v327 = 8 * v3->uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5704 LOBYTE(v327) = v327 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5705 a1.field_60_distance_related_prolly_lod = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5706 a1.field_58 = v327;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5707 a1.field_5C = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5708 a1.uFacing = LOWORD(pParty->sRotationY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5709 a1.uSoundID = LOWORD(v3->field_10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5710 if ( pParty->bTurnBasedModeOn == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5711 a1.uAttributes = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5712 v669 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5713 v659 = pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5714 v35 = (signed int)stru_5C6E00->uIntegerHalfPi / 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5715 LABEL_124:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5716 v654 = v35;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5717 LABEL_125:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5718 v36 = pParty->sRotationY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5719 goto LABEL_157;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5720 case 45:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5721 v328 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5722 if ( v328 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5723 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5724 v329 = v328 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5725 if ( v329 && v329 != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5726 v330 = 600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5727 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5728 v330 = 3600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5729 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5730 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5731 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5732 v330 = 1800 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5733 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5734 LODWORD(v733) = v330;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5735 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5736 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5737 v331 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5738 v332 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5739 pGame->GetStru6()->SetPlayerBuffAnim(v331, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5740 v83 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5741 v333 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5742 v334 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5743 pGame->GetStru6()->SetPlayerBuffAnim(v333, 1u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5744 v335 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5745 v336 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5746 pGame->GetStru6()->SetPlayerBuffAnim(v335, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5747 v337 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5748 v338 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5749 pGame->GetStru6()->SetPlayerBuffAnim(v337, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5750 v673 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5751 v732 = (int)v733 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5752 v662 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5753 v655 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5754 v652 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5755 v183 = (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5756 v137 = (char *)&pParty->pPartyBuffs[3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5757 goto LABEL_976;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5758 case 47:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5759 LODWORD(v733) = 300;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5760 v339 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5761 if ( v339 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5762 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5763 v340 = v339 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5764 if ( v340 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5765 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5766 if ( v340 != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5767 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5768 amount = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5769 goto LABEL_667;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5770 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5771 v341 = 6 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5772 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5773 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5774 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5775 v341 = 4 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5776 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5777 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5778 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5779 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5780 v341 = 2 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5781 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5782 amount = v341;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5783 LABEL_667:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5784 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5785 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5786 v342 = *(int *)&v3->field_C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5787 if ( v342 == v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5788 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5789 v345 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5790 v346 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5791 v347 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5792 pGame->GetStru6()->SetPlayerBuffAnim(v346, v345);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5793 v668 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5794 v658 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5795 v653 = amount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5796 LODWORD(v28) = LODWORD(pParty->uTimePlayed) + 1280;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5797 v651 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5798 HIDWORD(v650) = v1 + ((pParty->uTimePlayed + 1280) >> 32);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5799 v27 = (char *)&pParty->pPlayers[v3->uPlayerID_2].pPlayerBuffs[4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5800 goto LABEL_104;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5801 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5802 if ( (v342 & 7) == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5803 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5804 v343 = v342 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5805 HIDWORD(v344) = v1 + ((pParty->uTimePlayed + 1280) >> 32);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5806 LODWORD(v344) = LODWORD(pParty->uTimePlayed) + 1280;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5807 pActors[v343].pActorBuffs[11].Apply(v344, v731, amount, v1, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5808 BYTE2(pActors[v343].uAttributes) |= 8u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5809 v672 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5810 v661 = &pActors[v343];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5811 LABEL_165:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5812 v56 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5813 pGame->GetStru6()->_4A7E89_sparkles_on_actor_after_it_casts_buff(v661, v672);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5814 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5815 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5816 case 49:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5817 v348 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5818 if ( !v348 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5819 goto LABEL_677;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5820 v349 = v348 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5821 if ( v349 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5822 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5823 if ( v349 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5824 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5825 amount = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5826 goto LABEL_679;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5827 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5828 LABEL_677:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5829 v350 = 3600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5830 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5831 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5832 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5833 v350 = 86400 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5834 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5835 amount = v350;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5836 LABEL_679:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5837 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5838 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5839 v351 = &pParty->pPlayers[v3->uPlayerID_2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5840 if ( !v351->pConditions[0] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5841 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5842 if ( v731 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5843 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5844 LODWORD(v351->pConditions[0]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5845 HIDWORD(v351->pConditions[0]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5846 goto LABEL_904;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5847 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5848 v732 = amount << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5849 v351->DiscardConditionIfLastsLongerThan(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5850 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5851 (signed __int64)((double)(signed __int64)pParty->uTimePlayed - (double)(amount << 7) * 0.033333335));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5852 if ( HIDWORD(pParty->pPlayers[v3->uPlayerID_2].pConditions[0]) | LODWORD(pParty->pPlayers[v3->uPlayerID_2].pConditions[0]) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5853 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5854 v674 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5855 goto LABEL_685;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5856 case 50:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5857 v354 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5858 if ( v354 && (v355 = v354 - 1) != 0 && v355 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5859 v356 = 900 * (v2 + 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5860 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5861 v356 = 300 * (v2 + 12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5862 LODWORD(v733) = v356;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5863 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5864 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5865 if ( v731 == 1 || v731 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5866 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5867 v361 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5868 v362 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5869 v363 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5870 pGame->GetStru6()->SetPlayerBuffAnim(v362, v361);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5871 v668 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5872 v732 = (int)v733 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5873 v658 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5874 v653 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5875 v651 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5876 v28 = pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5877 v27 = (char *)&pParty->pPlayers[v3->uPlayerID_2].pPlayerBuffs[11];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5878 goto LABEL_103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5879 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5880 a2 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5881 v732 = (int)v733 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5882 v717 = (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5883 v357 = &pParty->pPlayers[0].pPlayerBuffs[11];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5884 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5885 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5886 v358 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5887 v359 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5888 v360 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5889 pGame->GetStru6()->SetPlayerBuffAnim(v359, v358);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5890 v357->Apply(pParty->uTimePlayed + v717, v731, v1, v1, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5891 ++a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5892 v357 = (SpellBuff *)((char *)v357 + 6972);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5893 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5894 while ( (signed int)v357 < (signed int)&pParty->field_871C[508] );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5895 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5896 case 48:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5897 v364 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5898 if ( !v364 || (v365 = v364 - 1) != 0 && v365 != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5899 v366 = 60 * (v2 + 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5900 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5901 v366 = 300 * v2 + 180;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5902 LODWORD(v733) = v366;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5903 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5904 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5905 v726 = (Player *)sub_46A6AC((int)dword_50BF30, 100, 4096);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5906 v367 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5907 pGame->GetStru6()->FadeScreen__like_Turn_Undead_and_mb_Armageddon(0xFFFFFFu, 0xC0u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5908 ++a1.uItemType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5909 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5910 a1.field_48 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5911 a1.field_4C = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5912 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5913 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5914 a1.uAttributes = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5915 a1.uSectorID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5916 a1.uSpriteFrameID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5917 v368 = v3->uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5918 a1.field_60_distance_related_prolly_lod = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5919 a1.uFacing = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5920 v368 *= 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5921 LOBYTE(v368) = v368 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5922 a1.field_58 = v368;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5923 a1.uSoundID = LOWORD(v3->field_10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5924 for ( a2 = v1; a2 < (signed int)v726; ++a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5925 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5926 v369 = &pActors[dword_50BF30[a2]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5927 if ( MonsterStats::BelongsToSupertype(v369->pMonsterInfo.uID, MONSTER_SUPERTYPE_UNDEAD) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5928 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5929 a1.vPosition.x = v369->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5930 a1.vPosition.y = v369->vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5931 v732 = v369->uActorHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5932 a1.vPosition.z = v369->vPosition.z - (unsigned int)(signed __int64)((double)v732 * unk_4D8548);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5933 v370 = 8 * dword_50BF30[a2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5934 LOBYTE(v370) = v370 | 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5935 a1.field_5C = v370;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5936 a1.Create(0, v1, v1, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5937 v732 = (int)v733 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5938 v369->pActorBuffs[4].Apply(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5939 pParty->uTimePlayed + (signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5940 v731,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5941 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5942 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5943 v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5944 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5945 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5946 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5947 case 53:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5948 v371 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5949 if ( v371 && (v372 = v371 - 1) != 0 && v372 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5950 amount = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5951 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5952 amount = 86400 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5953 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5954 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5955 pOtherOverlayList->_4418B1(5080, v3->uPlayerID_2 + 100, v1, 65536);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5956 v373 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5957 if ( !(HIDWORD(pParty->pPlayers[v373].pConditions[14]) | LODWORD(pParty->pPlayers[v373].pConditions[14])) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5958 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5959 v14 = v731 == 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5960 pParty->pPlayers[v373].sHealth = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5961 if ( v14 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5962 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5963 v374 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5964 v375 = (char *)pParty->pPlayers;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5965 LODWORD(pParty->pPlayers[v374].pConditions[14]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5966 HIDWORD(pParty->pPlayers[v374].pConditions[14]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5967 v376 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5968 LODWORD(pParty->pPlayers[v376].pConditions[13]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5969 HIDWORD(pParty->pPlayers[v376].pConditions[13]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5970 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5971 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5972 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5973 v732 = amount << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5974 *(float *)&a2 = (double)(amount << 7) * 0.033333335;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5975 v375 = (char *)pParty->pPlayers;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5976 pParty->pPlayers[v3->uPlayerID_2].DiscardConditionIfLastsLongerThan(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5977 0xEu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5978 (signed __int64)((double)(signed __int64)pParty->uTimePlayed - *(float *)&a2));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5979 pParty->pPlayers[v3->uPlayerID_2].DiscardConditionIfLastsLongerThan(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5980 0xDu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5981 (signed __int64)((double)(signed __int64)pParty->uTimePlayed - *(float *)&a2));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5982 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5983 v377 = (Player *)&v375[6972 * v3->uPlayerID_2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5984 goto LABEL_720;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5985 case 54:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5986 v378 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5987 if ( v378 && (v379 = v378 - 1) != 0 && v379 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5988 v380 = 4 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5989 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5990 v380 = 3 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5991 amount = v380;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5992 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5993 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5994 v381 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5995 HIDWORD(v733) = amount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5996 v730 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5997 v382 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5998 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5999 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6000 v383 = pPlayers[v382];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6001 if ( !v383->pConditions[14] && !v383->pConditions[15] && !v383->pConditions[16] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6002 v682[v381++] = v382;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6003 ++v382;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6004 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6005 while ( v382 <= 4 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6006 v384 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6007 v730 = v381;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6008 if ( v381 > v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6009 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6010 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6011 HIDWORD(v733) += pPlayers[v682[v384++]]->sHealth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6012 while ( v384 < v381 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6013 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6014 v732 = (signed __int64)((double)SHIDWORD(v733) / (double)v730);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6015 HIDWORD(v733) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6016 if ( v381 > v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6017 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6018 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6019 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6020 v385 = 4 * v682[HIDWORD(v733)] + 10965188;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6021 pPlayers[v682[HIDWORD(v733)]]->sHealth = v732;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6022 v726 = *(Player **)v385;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6023 v386 = v726->GetMaxHealth();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6024 if ( v726->sHealth > v386 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6025 *(int *)(*(int *)v385 + 6460) = v726->GetMaxHealth();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6026 v387 = *(Player **)v385;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6027 if ( v387->sHealth > v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6028 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6029 LODWORD(v387->pConditions[13]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6030 HIDWORD(v387->pConditions[13]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6031 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6032 v388 = HIDWORD(v733);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6033 v389 = LOWORD(v682[HIDWORD(v733)]) - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6034 v390 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6035 v391 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6036 pGame->GetStru6()->SetPlayerBuffAnim(v390, v389);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6037 HIDWORD(v733) = v388 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6038 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6039 while ( v388 + 1 < v730 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6040 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6041 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6042 case 55:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6043 v392 = v12 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6044 if ( !v392 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6045 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6046 v395 = 180 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6047 goto LABEL_750;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6048 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6049 v393 = v392 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6050 if ( !v393 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6051 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6052 v395 = 10800 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6053 goto LABEL_750;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6054 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6055 v394 = v393 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6056 if ( !v394 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6057 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6058 v395 = 259200 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6059 LABEL_750:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6060 amount = v395;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6061 goto LABEL_751;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6062 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6063 if ( v394 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6064 amount = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6065 LABEL_751:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6066 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6067 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6068 v396 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6069 if ( HIDWORD(pParty->pPlayers[v396].pConditions[16]) | LODWORD(pParty->pPlayers[v396].pConditions[16])
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6070 || HIDWORD(pParty->pPlayers[v396].pConditions[14]) | LODWORD(pParty->pPlayers[v396].pConditions[14]) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6071 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6072 if ( !(HIDWORD(pParty->pPlayers[v396].pConditions[1]) | LODWORD(pParty->pPlayers[v396].pConditions[1])) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6073 pParty->pPlayers[v396].PlaySound(25, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6074 if ( v731 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6075 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6076 v397 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6077 LODWORD(pParty->pPlayers[v397].pConditions[16]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6078 HIDWORD(pParty->pPlayers[v397].pConditions[16]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6079 v398 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6080 LODWORD(pParty->pPlayers[v398].pConditions[14]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6081 HIDWORD(pParty->pPlayers[v398].pConditions[14]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6082 v399 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6083 LODWORD(pParty->pPlayers[v399].pConditions[13]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6084 HIDWORD(pParty->pPlayers[v399].pConditions[13]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6085 v400 = (char *)pParty->pPlayers;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6086 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6087 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6088 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6089 v732 = amount << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6090 *(float *)&a2 = (double)(amount << 7) * 0.033333335;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6091 v400 = (char *)pParty->pPlayers;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6092 pParty->pPlayers[v3->uPlayerID_2].DiscardConditionIfLastsLongerThan(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6093 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6094 (signed __int64)((double)(signed __int64)pParty->uTimePlayed - *(float *)&a2));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6095 pParty->pPlayers[v3->uPlayerID_2].DiscardConditionIfLastsLongerThan(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6096 0xEu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6097 (signed __int64)((double)(signed __int64)pParty->uTimePlayed - *(float *)&a2));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6098 pParty->pPlayers[v3->uPlayerID_2].DiscardConditionIfLastsLongerThan(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6099 0xDu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6100 (signed __int64)((double)(signed __int64)pParty->uTimePlayed - *(float *)&a2));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6101 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6102 v83 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6103 ((Player *)&v400[6972 * v3->uPlayerID_2])->SetCondition(1u, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6104 v401 = pGame;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6105 pParty->pPlayers[v3->uPlayerID_2].sHealth = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6106 v402 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6107 v403 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6108 v404 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6109 pGame->GetStru6()->SetPlayerBuffAnim(v403, v402);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6110 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6111 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6112 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6113 v83 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6114 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6115 goto LABEL_978;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6116 case 61:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6117 v405 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6118 if ( !v405 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6119 goto LABEL_766;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6120 v406 = v405 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6121 if ( v406 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6122 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6123 if ( v406 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6124 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6125 amount = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6126 goto LABEL_768;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6127 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6128 LABEL_766:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6129 v407 = 3600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6130 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6131 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6132 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6133 v407 = 86400 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6134 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6135 amount = v407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6136 LABEL_768:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6137 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6138 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6139 v408 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6140 v409 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6141 v410 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6142 pGame->GetStru6()->SetPlayerBuffAnim(v409, v408);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6143 v323 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6144 v324 = (char *)&pParty->pPlayers[v323].pConditions[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6145 if ( !pParty->pPlayers[v323].pConditions[12] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6146 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6147 if ( v731 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6148 goto LABEL_637;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6149 v732 = amount << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6150 v663 = (signed __int64)((double)(signed __int64)pParty->uTimePlayed - (double)(amount << 7) * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6151 v656 = 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6152 goto LABEL_640;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6153 case 56:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6154 v411 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6155 if ( v411 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6156 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6157 v412 = v411 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6158 if ( v412 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6159 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6160 if ( v412 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6161 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6162 amount = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6163 goto LABEL_780;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6164 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6165 v413 = 180 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6166 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6167 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6168 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6169 v413 = 86400 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6170 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6171 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6172 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6173 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6174 v413 = 3600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6175 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6176 amount = v413;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6177 LABEL_780:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6178 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6179 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6180 v414 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6181 v415 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6182 v416 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6183 pGame->GetStru6()->SetPlayerBuffAnim(v415, v414);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6184 v323 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6185 v324 = (char *)&pParty->pPlayers[v323].pConditions[3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6186 if ( !pParty->pPlayers[v323].pConditions[3] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6187 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6188 if ( v731 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6189 goto LABEL_637;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6190 v732 = amount << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6191 v663 = (signed __int64)((double)(signed __int64)pParty->uTimePlayed - (double)(amount << 7) * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6192 v656 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6193 goto LABEL_640;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6194 case 59:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6195 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6196 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6197 if ( a2 == v1 || (a2 & 7) != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6198 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6199 v417 = (int)&pActors[a2 >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6200 v730 = v417;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6201 if ( !(*(char *)(v417 + 38) & 0x80) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6202 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6203 ((Actor *)v417)->SetRandomGoldIfTheresNoItem();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6204 v417 = v730;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6205 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6206 v418 = *(int *)(v417 + 672);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6207 HIDWORD(v733) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6208 if ( pItemsTable->pItems[v418].uEquipType == 18 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6209 HIDWORD(v733) = *(int *)(v417 + 684);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6210
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6211 //ItemGen::ItemGen(&v683);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6212 v683.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6213
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6214 v419 = *(short *)(v730 + 180);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6215 if ( v419 != (short)v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6216 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6217 v683.uItemID = v419;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6218 goto LABEL_799;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6219 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6220 v420 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6221 v421 = v730 + 564;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6222 while ( *(int *)v421 == v1 || pItemsTable->pItems[*(int *)v421].uEquipType == 18 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6223 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6224 ++v420;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6225 v421 += 36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6226 if ( v420 >= 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6227 goto LABEL_799;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6228 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6229 memcpy(&v683, (const void *)(v730 + 36 * v420 + 564), sizeof(v683));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6230 v2 = v723;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6231 v1 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6232 LABEL_799:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6233 if ( HIDWORD(v733) != v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6234 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6235 v675 = (const char *)HIDWORD(v733);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6236 if ( v683.uItemID != v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6237 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6238 v422 = v683.GetDisplayName();
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 82
diff changeset
6239 sprintf(pTmpBuf2, "(%s), and %d gold", v422, v675);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6240 goto LABEL_807;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6241 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6242 v664 = "%d gold";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6243 goto LABEL_803;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6244 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6245 if ( v683.uItemID != v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6246 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6247 v675 = v683.GetDisplayName();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6248 v664 = "(%s)";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6249 LABEL_803:
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 82
diff changeset
6250 sprintf(pTmpBuf2, v664, v675);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6251 goto LABEL_807;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6252 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6253 strcpy(pTmpBuf2, "nothing");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6254 LABEL_807:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6255 ShowStatusBarString(pTmpBuf2, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6256 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6257 a1.field_48 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6258 a1.field_4C = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6259 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6260 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6261 a1.vPosition.x = *(short *)(v730 + 142);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6262 a1.vPosition.y = *(short *)(v730 + 144);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6263 v676 = *(short *)(v730 + 138);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6264 v665 = a1.vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6265 a1.vPosition.z = *(short *)(v730 + 138);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6266 v657 = a1.vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6267 goto LABEL_1087;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6268 case 62:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6269 v423 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6270 if ( !v423 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6271 goto LABEL_813;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6272 v424 = v423 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6273 if ( v424 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6274 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6275 if ( v424 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6276 v425 = 3600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6277 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6278 LABEL_813:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6279 v425 = 300 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6280 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6281 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6282 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6283 v425 = 600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6284 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6285 amount = v425;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6286 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6287 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6288 v426 = a2 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6289 if ( (a2 & 7) != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6290 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6291 v730 = 836 * v426;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6292 if ( stru_50C198.GetMagicalResistance(&pActors[v426], 7u) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6293 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6294 ((SpellBuff *)((char *)&pActors[0].pActorBuffs[1] + v730))->Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6295 ((SpellBuff *)((char *)&pActors[0].pActorBuffs[12] + v730))->Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6296 v732 = amount << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6297 ((SpellBuff *)((char *)&pActors[0].pActorBuffs[9] + v730))->Apply(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6298 pParty->uTimePlayed + (signed __int64)((double)(amount << 7) * 0.033333335),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6299 v731,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6300 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6301 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6302 v1);
29
e62134245ab0 On BLV loading.
Nomad
parents: 23
diff changeset
6303 *(&pActors[0].pMonsterInfo.uHostilityType + v730) = MonsterInfo::Hostility_Long;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6304 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6305 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6306 a1.field_48 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6307 a1.field_4C = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6308 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6309 v60 = pObjectList->ObjectIDByItemID(a1.uItemType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6310 v61 = v730;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6311 goto LABEL_1086;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6312 case 66:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6313 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6314 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6315 amount = 600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6316 v427 = a2 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6317 if ( (a2 & 7) != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6318 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6319 v730 = 836 * v427;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6320 if ( MonsterStats::BelongsToSupertype(pActors[v427].pMonsterInfo.uID, MONSTER_SUPERTYPE_UNDEAD) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6321 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6322 if ( stru_50C198.GetMagicalResistance((Actor *)((char *)pActors + v730), 7u) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6323 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6324 ((SpellBuff *)((char *)&pActors[0].pActorBuffs[9] + v730))->Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6325 ((SpellBuff *)((char *)&pActors[0].pActorBuffs[1] + v730))->Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6326 v732 = amount << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6327 ((SpellBuff *)((char *)&pActors[0].pActorBuffs[12] + v730))->Apply(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6328 pParty->uTimePlayed + (signed __int64)((double)(amount << 7) * 0.033333335),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6329 v731,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6330 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6331 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6332 v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6333 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6334 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6335 a1.field_48 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6336 a1.field_4C = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6337 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6338 v60 = pObjectList->ObjectIDByItemID(a1.uItemType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6339 v61 = v730;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6340 goto LABEL_1086;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6341 case 63:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6342 v428 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6343 if ( v428 && (v429 = v428 - 1) != 0 && v429 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6344 v430 = 300 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6345 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6346 v430 = 180 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6347 amount = v430;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6348 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6349 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6350 v726 = (Player *)sub_46A6AC((int)dword_50BF30, 100, 4096);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6351 v431 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6352 pGame->GetStru6()->FadeScreen__like_Turn_Undead_and_mb_Armageddon(0xA0A0Au, 0xC0u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6353 ++a1.uItemType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6354 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6355 a1.field_48 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6356 a1.field_4C = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6357 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6358 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6359 a1.uAttributes = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6360 a1.uSectorID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6361 a1.uSpriteFrameID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6362 v432 = v3->uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6363 a1.field_60_distance_related_prolly_lod = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6364 a1.uFacing = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6365 v432 *= 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6366 LOBYTE(v432) = v432 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6367 a1.field_58 = v432;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6368 a1.uSoundID = LOWORD(v3->field_10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6369 for ( a2 = v1; a2 < (signed int)v726; ++a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6370 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6371 v433 = &pActors[dword_50BF30[a2]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6372 if ( MonsterStats::BelongsToSupertype(v433->pMonsterInfo.uID, MONSTER_SUPERTYPE_UNDEAD) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6373 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6374 a1.vPosition.x = v433->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6375 a1.vPosition.y = v433->vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6376 v732 = v433->uActorHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6377 a1.vPosition.z = v433->vPosition.z - (unsigned int)(signed __int64)((double)v732 * unk_4D8548);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6378 v434 = 8 * dword_50BF30[a2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6379 LOBYTE(v434) = v434 | 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6380 a1.field_5C = v434;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6381 a1.Create(0, v1, v1, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6382 if ( stru_50C198.GetMagicalResistance(v433, 7u) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6383 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6384 v732 = amount << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6385 v433->pActorBuffs[4].Apply(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6386 pParty->uTimePlayed + (signed __int64)((double)(amount << 7) * 0.033333335),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6387 v731,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6388 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6389 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6390 v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6391 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6392 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6393 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6394 case 64:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6395 v435 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6396 if ( v435 && (v436 = v435 - 1) != 0 && v436 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6397 amount = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6398 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6399 amount = 86400 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6400 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6401 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6402 v437 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6403 v438 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6404 v439 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6405 pGame->GetStru6()->SetPlayerBuffAnim(v438, v437);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6406 v440 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6407 if ( HIDWORD(pParty->pPlayers[v440].pConditions[5]) | LODWORD(pParty->pPlayers[v440].pConditions[5]) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6408 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6409 if ( !(HIDWORD(pParty->pPlayers[v440].pConditions[1]) | LODWORD(pParty->pPlayers[v440].pConditions[1])) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6410 pParty->pPlayers[v440].PlaySound(25, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6411 if ( v731 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6412 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6413 v441 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6414 LODWORD(pParty->pPlayers[v441].pConditions[5]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6415 HIDWORD(pParty->pPlayers[v441].pConditions[5]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6416 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6417 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6418 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6419 v732 = amount << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6420 pParty->pPlayers[v3->uPlayerID_2].DiscardConditionIfLastsLongerThan(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6421 5u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6422 (signed __int64)((double)(signed __int64)pParty->uTimePlayed - (double)(amount << 7) * 0.033333335));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6423 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6424 v377 = &pParty->pPlayers[v3->uPlayerID_2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6425 LABEL_720:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6426 v377->SetCondition(1u, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6427 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6428 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6429 case 42:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6430 v442 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6431 if ( !v442 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6432 goto LABEL_855;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6433 v443 = v442 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6434 if ( v443 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6435 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6436 if ( v443 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6437 v444 = 4 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6438 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6439 LABEL_855:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6440 v444 = 2 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6441 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6442 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6443 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6444 v444 = 3 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6445 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6446 amount = v444;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6447 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6448 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6449 v445 = a2 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6450 if ( (a2 & 7) == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6451 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6452 v449 = (char *)&pLayingItems[v445].stru_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6453 v450 = *(int *)v449;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6454 if ( pItemsTable->pItems[v450].uEquipType == 18 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6455 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6456 party_finds_gold(*((int *)v449 + 3), 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6457 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6458 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6459 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6460 {
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 82
diff changeset
6461 sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[471], pItemsTable->pItems[v450].pUnidentifiedName);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6462 ShowStatusBarString(pTmpBuf2, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6463 if ( !pParty->AddItem(&pLayingItems[v445].stru_24) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6464 pParty->SetHoldingItem(&pLayingItems[v445].stru_24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6465 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6466 LayingItem::_42F933(v445);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6467 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6468 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6469 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6470 if ( (a2 & 7) == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6471 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6472 stru_50C198.LootActor(&pActors[v445]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6473 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6474 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6475 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6476 if ( (a2 & 7) != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6477 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6478 if ( (a2 & 7) != 6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6479 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6480 dword_507CD8 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6481 v677 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6482 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6483 v446 = pIndoor->pFaceExtras[pIndoor->pFaces[v445].uFaceExtraID].uEventID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6484 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6485 v446 = pOutdoor->pBModels[a2 >> 9].pFaces[v445 & 0x3F].sCogTriggeredID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6486 goto LABEL_866;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6487 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6488 v447 = &pLevelDecorations[v445];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6489 dword_507CD8 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6490 v448 = v447->field_16_event_id;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6491 if ( v448 != (short)v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6492 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6493 v677 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6494 v446 = v448;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6495 LABEL_866:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6496 EventProcessor(v446, a2, v677);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6497 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6498 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6499 if ( v447->IsInteractive() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6500 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6501 _5C3420_pDecoration = v447;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6502 EventProcessor(stru_5E4C90.field_0[v447->field_1C] + 380, 0, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6503 _5C3420_pDecoration = (LevelDecoration *)v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6504 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6505 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6506 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6507 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6508 case 67:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6509 v451 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6510 if ( v451 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6511 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6512 v452 = v451 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6513 if ( v452 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6514 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6515 if ( v452 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6516 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6517 amount = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6518 goto LABEL_883;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6519 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6520 v453 = 180 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6521 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6522 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6523 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6524 v453 = 86400 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6525 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6526 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6527 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6528 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6529 v453 = 3600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6530 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6531 amount = v453;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6532 LABEL_883:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6533 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6534 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6535 v454 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6536 v455 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6537 v456 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6538 pGame->GetStru6()->SetPlayerBuffAnim(v455, v454);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6539 v323 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6540 v324 = (char *)&pParty->pPlayers[v323].pConditions[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6541 if ( !pParty->pPlayers[v323].pConditions[1] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6542 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6543 if ( v731 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6544 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6545 LABEL_637:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6546 *(int *)v324 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6547 *((int *)v324 + 1) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6548 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6549 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6550 v732 = amount << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6551 v663 = (signed __int64)((double)(signed __int64)pParty->uTimePlayed - (double)(amount << 7) * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6552 v656 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6553 LABEL_640:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6554 v325 = &pParty->pPlayers[v323];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6555 goto LABEL_641;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6556 case 68:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6557 v457 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6558 if ( v457 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6559 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6560 v458 = v457 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6561 if ( v458 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6562 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6563 if ( v458 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6564 v459 = 5 * v2 + 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6565 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6566 v459 = 2 * v2 + 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6567 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6568 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6569 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6570 v459 = 4 * v2 + 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6571 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6572 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6573 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6574 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6575 v459 = 3 * v2 + 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6576 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6577 amount = v459;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6578 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6579 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6580 v460 = *(int *)&v3->field_C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6581 if ( v460 == v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6582 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6583 pParty->pPlayers[v3->uPlayerID_2].Heal(amount);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6584 LABEL_904:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6585 v674 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6586 LABEL_685:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6587 v352 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6588 v353 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6589 pGame->GetStru6()->SetPlayerBuffAnim(v352, v674);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6590 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6591 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6592 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6593 if ( (v460 & 7) == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6594 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6595 v461 = &pActors[v460 >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6596 v462 = v461->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6597 v463 = v461->pMonsterInfo.uHP;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6598 if ( v462 != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6599 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6600 if ( v462 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6601 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6602 if ( v462 != 19 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6603 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6604 if ( v462 != 11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6605 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6606 v461->sCurrentHP += amount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6607 if ( v461->sCurrentHP > v463 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6608 v461->sCurrentHP = v463;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6609 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6610 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6611 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6612 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6613 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6614 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6615 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6616 case 72:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6617 v464 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6618 if ( !v464 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6619 goto LABEL_910;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6620 v465 = v464 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6621 if ( v465 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6622 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6623 if ( v465 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6624 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6625 amount = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6626 goto LABEL_912;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6627 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6628 LABEL_910:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6629 v466 = 3600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6630 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6631 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6632 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6633 v466 = 86400 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6634 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6635 amount = v466;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6636 LABEL_912:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6637 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6638 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6639 v467 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6640 v468 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6641 v469 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6642 pGame->GetStru6()->SetPlayerBuffAnim(v468, v467);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6643 v470 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6644 if ( !(HIDWORD(pParty->pPlayers[v470].pConditions[6]) | LODWORD(pParty->pPlayers[v470].pConditions[6]))
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6645 && !(HIDWORD(pParty->pPlayers[v470].pConditions[8]) | LODWORD(pParty->pPlayers[v470].pConditions[8]))
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6646 && !(HIDWORD(pParty->pPlayers[v470].pConditions[10]) | LODWORD(pParty->pPlayers[v470].pConditions[10])) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6647 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6648 if ( v731 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6649 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6650 LODWORD(pParty->pPlayers[v470].pConditions[6]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6651 HIDWORD(pParty->pPlayers[v470].pConditions[6]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6652 v471 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6653 LODWORD(pParty->pPlayers[v471].pConditions[8]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6654 HIDWORD(pParty->pPlayers[v471].pConditions[8]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6655 v472 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6656 LODWORD(pParty->pPlayers[v472].pConditions[10]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6657 HIDWORD(pParty->pPlayers[v472].pConditions[10]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6658 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6659 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6660 v732 = amount << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6661 *(float *)&a2 = (double)(amount << 7) * 0.033333335;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6662 pParty->pPlayers[v470].DiscardConditionIfLastsLongerThan(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6663 6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6664 (signed __int64)((double)(signed __int64)pParty->uTimePlayed - *(float *)&a2));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6665 v473 = (char *)pParty->pPlayers;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6666 pParty->pPlayers[v3->uPlayerID_2].DiscardConditionIfLastsLongerThan(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6667 8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6668 (signed __int64)((double)(signed __int64)pParty->uTimePlayed - *(float *)&a2));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6669 v663 = (signed __int64)((double)(signed __int64)pParty->uTimePlayed - *(float *)&a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6670 v656 = 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6671 goto LABEL_937;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6672 case 75:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6673 amount = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6674 LODWORD(v733) = 3600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6675 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6676 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6677 v474 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6678 v475 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6679 pGame->GetStru6()->SetPlayerBuffAnim(v474, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6680 v476 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6681 v477 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6682 pGame->GetStru6()->SetPlayerBuffAnim(v476, 1u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6683 v478 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6684 v479 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6685 pGame->GetStru6()->SetPlayerBuffAnim(v478, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6686 v480 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6687 v481 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6688 pGame->GetStru6()->SetPlayerBuffAnim(v480, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6689 v668 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6690 v732 = (int)v733 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6691 v658 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6692 v653 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6693 v651 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6694 v26 = (signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6695 v27 = (char *)&pParty->pPartyBuffs[13];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6696 goto LABEL_101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6697 case 73:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6698 LODWORD(v733) = 3600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6699 amount = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6700 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6701 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6702 if ( v731 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6703 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6704 v482 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6705 v483 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6706 pGame->GetStru6()->SetPlayerBuffAnim(v482, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6707 v484 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6708 v485 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6709 pGame->GetStru6()->SetPlayerBuffAnim(v484, 1u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6710 v486 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6711 v487 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6712 pGame->GetStru6()->SetPlayerBuffAnim(v486, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6713 v488 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6714 v489 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6715 pGame->GetStru6()->SetPlayerBuffAnim(v488, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6716 v732 = (int)v733 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6717 v717 = (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6718 pParty->pPlayers[0].pPlayerBuffs[6].Apply(pParty->uTimePlayed + v717, 4u, v2, v2, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6719 pParty->pPlayers[1].pPlayerBuffs[6].Apply(pParty->uTimePlayed + v717, 4u, v2, v2, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6720 pParty->pPlayers[2].pPlayerBuffs[6].Apply(pParty->uTimePlayed + v717, 4u, v2, v2, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6721 v668 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6722 v658 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6723 v653 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6724 LODWORD(v28) = LODWORD(pParty->uTimePlayed) + v717;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6725 v651 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6726 HIDWORD(v650) = (pParty->uTimePlayed + v717) >> 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6727 v27 = (char *)&pParty->pPlayers[3].pPlayerBuffs[6];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6728 goto LABEL_104;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6729 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6730 v490 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6731 v491 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6732 v492 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6733 pGame->GetStru6()->SetPlayerBuffAnim(v491, v490);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6734 v668 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6735 v732 = (int)v733 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6736 v658 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6737 v653 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6738 v651 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6739 v28 = pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6740 v27 = (char *)&pParty->pPlayers[v3->uPlayerID_2].pPlayerBuffs[6];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6741 goto LABEL_103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6742 case 74:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6743 v493 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6744 if ( v493 && (v494 = v493 - 1) != 0 && v494 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6745 amount = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6746 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6747 amount = 86400 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6748 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6749 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6750 v495 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6751 v496 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6752 v497 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6753 pGame->GetStru6()->SetPlayerBuffAnim(v496, v495);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6754 v498 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6755 if ( !(HIDWORD(pParty->pPlayers[v498].pConditions[7]) | LODWORD(pParty->pPlayers[v498].pConditions[7]))
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6756 && !(HIDWORD(pParty->pPlayers[v498].pConditions[9]) | LODWORD(pParty->pPlayers[v498].pConditions[9]))
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6757 && !(HIDWORD(pParty->pPlayers[v498].pConditions[11]) | LODWORD(pParty->pPlayers[v498].pConditions[11])) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6758 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6759 if ( v731 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6760 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6761 LODWORD(pParty->pPlayers[v498].pConditions[7]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6762 HIDWORD(pParty->pPlayers[v498].pConditions[7]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6763 v499 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6764 LODWORD(pParty->pPlayers[v499].pConditions[9]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6765 HIDWORD(pParty->pPlayers[v499].pConditions[9]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6766 v500 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6767 LODWORD(pParty->pPlayers[v500].pConditions[11]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6768 HIDWORD(pParty->pPlayers[v500].pConditions[11]) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6769 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6770 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6771 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6772 v732 = amount << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6773 *(float *)&a2 = (double)(amount << 7) * 0.033333335;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6774 pParty->pPlayers[v498].DiscardConditionIfLastsLongerThan(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6775 7u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6776 (signed __int64)((double)(signed __int64)pParty->uTimePlayed - *(float *)&a2));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6777 v473 = (char *)pParty->pPlayers;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6778 pParty->pPlayers[v3->uPlayerID_2].DiscardConditionIfLastsLongerThan(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6779 9u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6780 (signed __int64)((double)(signed __int64)pParty->uTimePlayed - *(float *)&a2));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6781 v663 = (signed __int64)((double)(signed __int64)pParty->uTimePlayed - *(float *)&a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6782 v656 = 11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6783 LABEL_937:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6784 v325 = (Player *)&v473[6972 * v3->uPlayerID_2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6785 LABEL_641:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6786 v325->DiscardConditionIfLastsLongerThan(v656, v663);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6787 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6788 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6789 case 77:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6790 amount = 5 * v2 + 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6791 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6792 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6793 v501 = pParty->pPlayers;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6794 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6795 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6796 v502 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6797 v503 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6798 pGame->GetStru6()->SetPlayerBuffAnim(v502, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6799 v501->Heal(amount);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6800 ++v501;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6801 ++v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6802 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6803 while ( (signed int)v501 < (signed int)pParty->pHirelings );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6804 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6805 case 80:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6806 sRecoveryTime -= v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6807 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6808 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6809 v504 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6810 pGame->GetStru6()->FadeScreen__like_Turn_Undead_and_mb_Armageddon(0xAFF0Au, 0xC0u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6811 v505 = sub_46A6AC((int)dword_50BF30, 100, 4096);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6812 ++a1.uItemType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6813 HIDWORD(v733) = v505;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6814 v690 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6815 v689 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6816 v688 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6817 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6818 a1.field_48 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6819 a1.field_4C = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6820 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6821 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6822 a1.uAttributes = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6823 a1.uSectorID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6824 a1.uSpriteFrameID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6825 v506 = v3->uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6826 a1.field_60_distance_related_prolly_lod = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6827 a1.uFacing = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6828 v506 *= 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6829 LOBYTE(v506) = v506 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6830 a1.field_58 = v506;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6831 a1.uSoundID = LOWORD(v3->field_10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6832 a2 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6833 if ( SHIDWORD(v733) > v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6834 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6835 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6836 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6837 v507 = dword_50BF30[a2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6838 a1.vPosition.x = pActors[v507].vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6839 a1.vPosition.y = pActors[v507].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6840 v732 = pActors[v507].uActorHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6841 a1.vPosition.z = pActors[v507].vPosition.z - (unsigned int)(signed __int64)((double)v732 * unk_4D8548);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6842 v508 = 8 * dword_50BF30[a2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6843 LOBYTE(v508) = v508 | 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6844 a1.field_5C = v508;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6845 v509 = a1.Create(0, v1, v1, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6846 v510 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6847 DamageMonsterFromParty(8 * v509 | 2, dword_50BF30[a2], (Vec3_int_ *)&v688);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6848 a2 = v510 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6849 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6850 while ( v510 + 1 < SHIDWORD(v733) );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6851 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6852 for ( a2 = v1; a2 < SHIDWORD(v733); ++a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6853 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6854 v511 = &pActors[dword_50BF30[a2]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6855 a1.vPosition.x = v511->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6856 a1.vPosition.y = v511->vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6857 v732 = v511->uActorHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6858 a1.vPosition.z = v511->vPosition.z - (unsigned int)(signed __int64)((double)v732 * unk_4D8548);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6859 v512 = 8 * dword_50BF30[a2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6860 LOBYTE(v512) = v512 | 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6861 a1.field_5C = v512;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6862 a1.Create(0, v1, v1, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6863 v513 = v511->pActorBuffs;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6864 v726 = (Player *)22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6865 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6866 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6867 v513->Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6868 ++v513;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6869 v726 = (Player *)((char *)v726 - 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6870 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6871 while ( *(float *)&v726 != 0.0 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6872 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6873 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6874 case 82:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6875 v514 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6876 if ( !v514 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6877 goto LABEL_955;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6878 v515 = v514 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6879 if ( v515 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6880 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6881 if ( v515 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6882 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6883 v516 = 900 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6884 amount = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6885 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6886 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6887 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6888 LABEL_955:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6889 v516 = 300 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6890 amount = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6891 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6892 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6893 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6894 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6895 v516 = 900 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6896 amount = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6897 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6898 v733 = __PAIR__(v1, v516);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6899 v517 = 8 * v3->uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6900 LOBYTE(v517) = v517 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6901 if ( (signed int)uNumActors > v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6902 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6903 v518 = (char *)&pActors[0].uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6904 v726 = (Player *)uNumActors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6905 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6906 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6907 v519 = *(short *)v518;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6908 if ( *(short *)v518 != 5 && v519 != 11 && v519 != 19 && v517 == *((int *)v518 + 159) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6909 ++HIDWORD(v733);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6910 v518 += 836;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6911 v726 = (Player *)((char *)v726 - 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6912 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6913 while ( *(float *)&v726 != 0.0 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6914 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6915 if ( SHIDWORD(v733) >= amount )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6916 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6917 v66 = pGlobalTXT_LocalizationStrings[648];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6918 goto LABEL_201;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6919 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6920 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6921 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6922 sub_44FA4C_spawn_light_elemental(v3->uPlayerID, v731, v733);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6923 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6924 case 83:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6925 v520 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6926 if ( !v520 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6927 goto LABEL_973;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6928 v521 = v520 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6929 if ( v521 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6930 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6931 if ( v521 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6932 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6933 LODWORD(v733) = 18000 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6934 v522 = 5 * v2 + 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6935 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6936 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6937 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6938 LABEL_973:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6939 LODWORD(v733) = 10800 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6940 v522 = 3 * v2 + 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6941 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6942 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6943 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6944 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6945 LODWORD(v733) = 14400 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6946 v522 = 4 * v2 + 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6947 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6948 amount = v522;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6949 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6950 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6951 v523 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6952 v524 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6953 pGame->GetStru6()->SetPlayerBuffAnim(v523, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6954 v83 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6955 v525 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6956 v526 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6957 pGame->GetStru6()->SetPlayerBuffAnim(v525, 1u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6958 v527 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6959 v528 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6960 pGame->GetStru6()->SetPlayerBuffAnim(v527, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6961 v529 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6962 v530 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6963 pGame->GetStru6()->SetPlayerBuffAnim(v529, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6964 v673 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6965 v732 = (int)v733 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6966 v662 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6967 v655 = amount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6968 v652 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6969 v183 = (signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6970 v137 = (char *)&pParty->pPartyBuffs[2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6971 goto LABEL_976;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6972 case 84:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6973 v67 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6974 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6975 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6976 v66 = pGlobalTXT_LocalizationStrings[497];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6977 goto LABEL_202;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6978 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6979 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6980 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6981 v531 = sub_46A6AC((int)dword_50BF30, 100, 4096);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6982 ++a1.uItemType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6983 v726 = (Player *)v531;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6984 v696 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6985 v695 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6986 v694 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6987 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6988 a1.field_48 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6989 a1.field_4C = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6990 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6991 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6992 a1.uAttributes = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6993 a1.uSectorID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6994 a1.uSpriteFrameID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6995 v532 = v3->uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6996 a1.field_60_distance_related_prolly_lod = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6997 a1.uFacing = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6998 v532 *= 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6999 LOBYTE(v532) = v532 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7000 a1.field_58 = v532;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7001 a1.uSoundID = LOWORD(v3->field_10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7002 a2 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7003 if ( (signed int)v726 > v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7004 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7005 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7006 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7007 v533 = dword_50BF30[a2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7008 a1.vPosition.x = pActors[v533].vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7009 a1.vPosition.y = pActors[v533].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7010 v732 = pActors[v533].uActorHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7011 a1.vPosition.z = pActors[v533].vPosition.z - (unsigned int)(signed __int64)((double)v732 * unk_4D8548);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7012 v534 = 8 * dword_50BF30[a2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7013 LOBYTE(v534) = v534 | 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7014 a1.field_5C = v534;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7015 v535 = a1.Create(0, v1, v1, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7016 v536 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7017 DamageMonsterFromParty(8 * v535 | 2, dword_50BF30[a2], (Vec3_int_ *)&v694);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7018 a2 = v536 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7019 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7020 while ( v536 + 1 < (signed int)v726 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7021 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7022 v537 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7023 pGame->GetStru6()->_4A8BFC();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7024 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7025 case 85:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7026 v538 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7027 if ( v538 && (v539 = v538 - 1) != 0 && v539 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7028 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7029 amount = 5 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7030 v540 = 18000 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7031 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7032 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7033 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7034 amount = 4 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7035 v540 = 14400 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7036 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7037 v730 = v540;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7038 LODWORD(v733) = v540;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7039 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7040 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7041 v541 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7042 v542 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7043 pGame->GetStru6()->SetPlayerBuffAnim(v541, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7044 v543 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7045 v544 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7046 pGame->GetStru6()->SetPlayerBuffAnim(v543, 1u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7047 v545 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7048 v546 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7049 pGame->GetStru6()->SetPlayerBuffAnim(v545, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7050 v547 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7051 v548 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7052 pGame->GetStru6()->SetPlayerBuffAnim(v547, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7053 v732 = v730 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7054 v549 = (double)(v730 << 7) * 0.033333335;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7055 *((float *)&v733 + 1) = v549;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7056 v712 = (signed __int64)v549;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7057 pParty->pPartyBuffs[ 1].Apply(pParty->uTimePlayed + (signed __int64)v549, v731, amount, v1, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7058 pParty->pPartyBuffs[12].Apply(pParty->uTimePlayed + v712, v731, amount, v1, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7059 pParty->pPartyBuffs[ 6].Apply(pParty->uTimePlayed + v712, v731, amount, v1, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7060 pParty->pPartyBuffs[17].Apply(pParty->uTimePlayed + v712, v731, amount, v1, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7061 pParty->pPartyBuffs[ 0].Apply(pParty->uTimePlayed + v712, v731, amount, v1, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7062 pParty->pPartyBuffs[ 4].Apply(pParty->uTimePlayed + v712, v731, amount, v1, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7063 v550 = v2 + 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7064 pParty->pPartyBuffs[ 5].Apply(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7065 (signed __int64)((double)(signed __int64)pParty->uTimePlayed + *((float *)&v733 + 1)),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7066 v731,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7067 v550,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7068 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7069 v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7070 v668 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7071 v658 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7072 v653 = v550;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7073 v651 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7074 v28 = (signed __int64)((double)(signed __int64)pParty->uTimePlayed + *((float *)&v733 + 1));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7075 LABEL_992:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7076 v27 = (char *)&pParty->pPartyBuffs[19];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7077 goto LABEL_103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7078 case 86:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7079 v551 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7080 if ( !v551 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7081 goto LABEL_998;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7082 v552 = v551 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7083 if ( v552 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7084 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7085 if ( v552 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7086 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7087 amount = 15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7088 HIDWORD(v733) = 20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7089 goto LABEL_1000;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7090 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7091 LABEL_998:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7092 v678 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7093 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7094 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7095 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7096 v678 = 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7097 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7098 amount = v678;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7099 HIDWORD(v733) = v678;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7100 LABEL_1000:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7101 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7102 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7103 y = (char *)(60 * (v2 * HIDWORD(v733) + 60));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7104 v732 = (300 * amount * v2 + 60) << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7105 v730 = v2 + 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7106 v726 = (Player *)v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7107 v553 = (char *)&pParty->pPlayers[0].pConditions[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7108 *((float *)&v733 + 1) = (double)v732 * 0.033333335;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7109 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7110 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7111 v554 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7112 v555 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7113 pGame->GetStru6()->SetPlayerBuffAnim(v554, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7114 v556 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7115 v557 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7116 pGame->GetStru6()->SetPlayerBuffAnim(v556, 1u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7117 v558 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7118 v559 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7119 pGame->GetStru6()->SetPlayerBuffAnim(v558, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7120 v560 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7121 v561 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7122 pGame->GetStru6()->SetPlayerBuffAnim(v560, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7123 ((SpellBuff *)(v553 + 6056))->Apply(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7124 (signed __int64)((double)(signed __int64)pParty->uTimePlayed + *((float *)&v733 + 1)),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7125 v731,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7126 v730,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7127 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7128 v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7129 if ( *(_QWORD *)v553 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7130 v726 = (Player *)1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7131 v553 += 6972;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7132 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7133 while ( (signed int)v553 < (signed int)&pParty->pHirelings[0].uFlags );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7134 v562 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7135 pParty->pPartyBuffs[9].Apply(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7136 (signed __int64)((double)(signed __int64)pParty->uTimePlayed + *((float *)&v733 + 1)),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7137 v731,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7138 v730,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7139 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7140 v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7141 pParty->pPartyBuffs[14].Apply(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7142 (signed __int64)((double)(signed __int64)pParty->uTimePlayed + *((float *)&v733 + 1)),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7143 v562,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7144 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7145 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7146 v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7147 pParty->pPartyBuffs[15].Apply(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7148 (signed __int64)((double)(signed __int64)pParty->uTimePlayed + *((float *)&v733 + 1)),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7149 v562,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7150 v730,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7151 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7152 v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7153 if ( v726 != (Player *)v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7154 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7155 v668 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7156 v732 = (int)y << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7157 v658 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7158 v653 = v730;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7159 v651 = v562;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7160 v28 = (signed __int64)((double)(signed int)((int)y << 7) * 0.033333335
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7161 + (double)(signed __int64)pParty->uTimePlayed);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7162 v27 = (char *)&pParty->pPartyBuffs[8];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7163 goto LABEL_103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7164 case 88:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7165 amount = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7166 if ( pPlayer->uNumDivineInterventionCastsThisDay >= 3u )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7167 goto LABEL_200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7168 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7169 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7170 a2 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7171 _this = (ItemGen *)&pPlayers[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7172 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7173 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7174 v563 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7175 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7176 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7177 v564 = _this->uItemID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7178 *(int *)(v563 + _this->uItemID) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7179 v563 += 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7180 *(int *)(v563 + v564 - 4) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7181 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7182 while ( v563 <= 128 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7183 v565 = ((Player *)_this->uItemID)->GetMaxHealth();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7184 v566 = (Player **)_this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7185 *(int *)(_this->uItemID + 6460) = v565;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7186 v567 = (*v566)->GetMaxMana();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7187 v568 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7188 *(int *)(_this->uItemID + 6464) = v567;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7189 v569 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7190 v570 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7191 pGame->GetStru6()->SetPlayerBuffAnim(v569, v568);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7192 ++a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7193 _this = (ItemGen *)((char *)_this + 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7194 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7195 while ( (signed int)this < (signed int)&qword_A750D8 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7196 v571 = pPlayer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7197 v572 = (char *)&pPlayer->sAgeModifier;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7198 if ( pPlayer->sAgeModifier + 10 >= 120 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7199 *(short *)v572 = 120;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7200 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7201 *(short *)v572 = pPlayer->sAgeModifier + 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7202 sRecoveryTime += -5 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7203 ++v571->uNumDivineInterventionCastsThisDay;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7204 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7205 case 89:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7206 v573 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7207 if ( v573 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7208 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7209 v574 = v573 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7210 if ( v574 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7211 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7212 if ( v574 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7213 v575 = 5 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7214 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7215 v575 = 2 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7216 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7217 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7218 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7219 v575 = 4 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7220 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7221 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7222 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7223 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7224 v575 = 3 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7225 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7226 amount = v575;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7227 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7228 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7229 v576 = *(int *)&v3->field_C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7230 if ( v576 == v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7231 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7232 v583 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7233 v584 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7234 v585 = (char *)&pParty->pPlayers[v3->uPlayerID_2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7235 v586 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7236 pGame->GetStru6()->SetPlayerBuffAnim(v584, v583);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7237 if ( *((_QWORD *)v585 + 14) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7238 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7239 ((Player *)v585)->SetCondition(0x11u, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7240 v587 = ((Player *)v585)->GetSexByVoice();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7241 ReloadPlayerPortraits(v3->uPlayerID_2, (v587 != 0) + 23);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7242 *((_QWORD *)v585 + 17) = pParty->uTimePlayed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7243 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7244 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7245 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7246 v577 = (Player *)(v576 >> 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7247 v726 = v577;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7248 if ( v577 == (Player *)-1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7249 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7250 v66 = pGlobalTXT_LocalizationStrings[496];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7251 goto LABEL_201;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7252 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7253 v578 = (int)&pActors[(int)v577];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7254 v721 = v578;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7255 if ( *(short *)(v578 + 40) > (signed __int16)v1 || (v579 = *(short *)(v578 + 176), v579 != 5) && v579 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7256 goto LABEL_200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7257 ++a1.uItemType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7258 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7259 a1.field_48 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7260 a1.field_4C = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7261 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7262 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7263 a1.uAttributes = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7264 a1.uSectorID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7265 a1.uSpriteFrameID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7266 v580 = v3->uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7267 a1.field_60_distance_related_prolly_lod = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7268 v581 = v721;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7269 v580 *= 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7270 LOBYTE(v580) = v580 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7271 a1.uFacing = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7272 a1.field_58 = v580;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7273 a1.uSoundID = LOWORD(v3->field_10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7274 a1.vPosition.x = *(short *)(v721 + 142);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7275 a1.vPosition.y = *(short *)(v721 + 144);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7276 v732 = *(short *)(v721 + 138);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7277 v582 = 8 * (int)v726;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7278 a1.vPosition.z = *(short *)(v721 + 146) - (unsigned int)(signed __int64)((double)v732 * unk_4D8548);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7279 LOBYTE(v582) = 8 * (char)v726 | 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7280 a1.field_5C = v582;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7281 a1.Create(0, v1, v1, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7282 if ( *(char *)(v581 + 52) > amount )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7283 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7284 Actor::Resurrect((unsigned int)v726);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7285 *(char *)(v581 + 61) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7286 *(char *)(v581 + 53) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7287 *(char *)(v581 + 54) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7288 *(char *)(v581 + 55) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7289 *(char *)(v581 + 56) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7290 *(char *)(v581 + 57) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7291 *(int *)(v581 + 712) = 9999;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7292 *(char *)(v581 + 38) &= 0xF7u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7293 *(int *)(v581 + 708) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7294 ((SpellBuff *)(v581 + 356))->Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7295 ((SpellBuff *)(v581 + 228))->Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7296 ((SpellBuff *)(v581 + 404))->Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7297 if ( *(short *)(v581 + 40) > 10 * amount )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7298 *(short *)(v581 + 40) = 10 * amount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7299 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7300 case 91:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7301 v588 = v12 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7302 amount = 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7303 if ( v588 && (v589 = v588 - 1) != 0 && (v590 = v589 - 1) != 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7304 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7305 if ( v590 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7306 LODWORD(v733) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7307 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7308 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7309 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7310 LODWORD(v733) = 3600 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7311 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7312 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7313 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7314 HIDWORD(v733) = (int)(char *)&pParty + 6972 * v3->uPlayerID_2 + 36 * a2 + 3040;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7315 v732 = (signed int)&pItemsTable->pItems[*(int *)HIDWORD(v733)].pIconName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7316 ((ItemGen *)HIDWORD(v733))->UpdateTempBonus(pParty->uTimePlayed);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7317 if ( *(int *)HIDWORD(v733) >= 64 && *(int *)HIDWORD(v733) <= 65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7318 || *(char *)(HIDWORD(v733) + 20) & 2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7319 || *(int *)(HIDWORD(v733) + 12) != v1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7320 || *(int *)(HIDWORD(v733) + 4) != v1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7321 || (v591 = *(char *)(v732 + 28)) != 0 && v591 != 1 && v591 != 2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7322 || pItemsTable->_456D5E_is_some_material((ItemGen *)HIDWORD(v733)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7323 goto LABEL_199;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7324 v592 = HIDWORD(v733);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7325 v14 = v731 == 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7326 *(int *)(HIDWORD(v733) + 12) = 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7327 if ( !v14 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7328 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7329 v732 = (int)v733 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7330 *(_QWORD *)(v592 + 28) = pParty->uTimePlayed
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7331 + (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7332 *(int *)(v592 + 20) |= 8u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7333 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7334 *(char *)(v592 + 20) |= 0x80u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7335 goto LABEL_1055;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7336 case 93:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7337 v593 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7338 if ( !v593 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7339 goto LABEL_1062;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7340 v594 = v593 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7341 if ( v594 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7342 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7343 if ( v594 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7344 amount = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7345 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7346 LABEL_1062:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7347 amount = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7348 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7349 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7350 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7351 amount = 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7352 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7353 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7354 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7355 v726 = (Player *)((signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7356 v732 = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360 / (amount - 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7357 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7358 a1.field_48 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7359 a1.field_4C = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7360 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7361 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7362 a1.vPosition.x = pParty->vPosition.x;
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
7363 a1.vPosition.y = pParty->vPosition.y;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7364 a1.uAttributes = v1;
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
7365 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 2;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7366 a1.uSectorID = pIndoor->GetSector(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7367 pParty->vPosition.x,
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
7368 pParty->vPosition.y,
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
7369 pParty->vPosition.z + (signed int)pParty->uPartyHeight / 2);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7370 a1.uSpriteFrameID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7371 v595 = 8 * v3->uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7372 LOBYTE(v595) = v595 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7373 a1.field_58 = v595;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7374 a1.field_5C = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7375 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7376 a1.uSoundID = LOWORD(v3->field_10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7377 if ( pParty->bTurnBasedModeOn == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7378 LOBYTE(a1.uAttributes) |= 4u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7379 v596 = (signed int)v726 / -2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7380 y = (char *)((signed int)v726 / 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7381 if ( (signed int)v726 / -2 <= (signed int)v726 / 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7382 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7383 v597 = v715.uYawAngle;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7384 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7385 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7386 a1.uFacing = v596 + v597;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7387 if ( a1.Create(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7388 v596 + v597,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7389 v715.uPitchAngle,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7390 pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7391 v3->uPlayerID + 1) != -1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7392 && pParty->bTurnBasedModeOn == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7393 ++pTurnEngine->field_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7394 v596 += v732;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7395 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7396 while ( v596 <= (signed int)y );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7397 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7398 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7399 case 94:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7400 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7401 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7402 if ( v731 == 1 || v731 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7403 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7404 v598 = 180 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7405 goto LABEL_1081;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7406 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7407 if ( v731 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7408 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7409 v598 = 300 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7410 LABEL_1081:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7411 LODWORD(v733) = v598;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7412 goto LABEL_1082;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7413 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7414 if ( v731 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7415 LODWORD(v733) = 29030400;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7416 LABEL_1082:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7417 v599 = a2 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7418 if ( (a2 & 7) != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7419 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7420 v730 = 836 * v599;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7421 if ( !MonsterStats::BelongsToSupertype(pActors[v599].pMonsterInfo.uID, MONSTER_SUPERTYPE_UNDEAD) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7422 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7423 if ( !stru_50C198.GetMagicalResistance((Actor *)((char *)pActors + v730), 0xAu) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7424 goto LABEL_200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7425 ((SpellBuff *)((char *)&pActors[0].pActorBuffs[9] + v730))->Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7426 ((SpellBuff *)((char *)&pActors[0].pActorBuffs[1] + v730))->Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7427 v732 = (int)v733 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7428 ((SpellBuff *)((char *)&pActors[0].pActorBuffs[12] + v730))->Apply(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7429 pParty->uTimePlayed + (signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7430 v731,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7431 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7432 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7433 v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7434 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7435 a1.field_48 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7436 a1.field_4C = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7437 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7438 v60 = pObjectList->ObjectIDByItemID(a1.uItemType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7439 v61 = v730;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7440 LABEL_1086:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7441 v600 = *(__int16 *)((char *)&pActors[0].vPosition.y + v61);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7442 v601 = *(__int16 *)((char *)&pActors[0].vPosition.x + v61);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7443 a1.uObjectDescID = v60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7444 a1.vPosition.x = v601;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7445 v602 = *(unsigned __int16 *)((char *)&pActors[0].uActorHeight + v61);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7446 v603 = *(__int16 *)((char *)&pActors[0].vPosition.z + v61);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7447 a1.vPosition.y = v600;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7448 v676 = v603 + v602;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7449 v665 = v600;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7450 a1.vPosition.z = v603 + v602;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7451 v657 = v601;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7452 LABEL_1087:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7453 a1.uAttributes = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7454 a1.uSectorID = pIndoor->GetSector(v657, v665, v676);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7455 a1.uSpriteFrameID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7456 v604 = 8 * v3->uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7457 LOBYTE(v604) = v604 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7458 a1.field_58 = v604;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7459 a1.field_5C = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7460 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7461 a1.uFacing = LOWORD(v715.uYawAngle);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7462 LOWORD(v604) = LOWORD(v3->field_10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7463 LOBYTE(a1.uAttributes) |= 0x80u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7464 a1.uSoundID = v604;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7465 a1.Create(0, v1, v1, v3->uPlayerID + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7466 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7467 case 96:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7468 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7469 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7470 HIDWORD(v733) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7471 memset(&pStru179, v1, 0xFA0u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7472 _this = (ItemGen *)v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7473 v605 = (char *)pParty->pHirelings;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7474 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7475 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7476 if ( *(int *)v605 != v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7477 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7478 v606 = HIDWORD(v733)++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7479 pStru179->field_0[v606] = (int)((char *)&_this->uItemID + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7480 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7481 _this = (ItemGen *)((char *)_this + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7482 v605 += 76;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7483 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7484 while ( (signed int)v605 < (signed int)&pParty->pPickedItem );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7485 _this = (ItemGen *)v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7486 if ( (signed int)pNPCStats->uNumNewNPCs > v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7487 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7488 v730 = (int)pNPCStats->pNewNPCData;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7489 HIDWORD(v733) = 4 * HIDWORD(v733) + 6043152;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7490 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7491 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7492 if ( *(char *)(v730 + 8) & 0x80
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7493 && (pParty->pHirelings[0].pName == (char *)v1 || strcmp(*(const char **)v730, pParty->pHirelings[0].pName))
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7494 && (pParty->pHirelings[1].pName == (char *)v1 || strcmp(*(const char **)v730, pParty->pHirelings[1].pName)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7495 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7496 v607 = HIDWORD(v733);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7497 HIDWORD(v733) += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7498 *(int *)v607 = (int)_this + 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7499 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7500 _this = (ItemGen *)((char *)_this + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7501 v730 += 76;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7502 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7503 while ( (signed int)this < (signed int)pNPCStats->uNumNewNPCs );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7504 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7505 v608 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7506 if ( v608 != 4 && v608 != 5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7507 || (v609 = (signed int)*(&pFontCChar + v608 + (unsigned __int8)pParty->field_709), v609 <= v1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7508 || v609 >= 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7509 goto LABEL_200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7510 v610 = 76 * v609;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7511 *((int *)&pParty->pPlayers[3].pInstalledBeacons[4].uBeaconTime + 19 * v609) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7512 v611 = pIconsFrameTable->FindIcon("spell96");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7513 *(int *)((char *)&pParty->pPlayers[3].pInstalledBeacons[4].uBeaconTime + v610 + 4) = pIconsFrameTable->GetIconAnimLength(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7514 v611);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7515 v232 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7516 *(int *)((char *)&pParty->pPlayers[3].pInstalledBeacons[3].field_18 + v610) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7517 v612 = (char *)pParty->pPlayers;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7518 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7519 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7520 *((int *)v612 + 1615) = ((Player *)v612)->GetMaxHealth();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7521 *((int *)v612 + 1616) = ((Player *)v612)->GetMaxMana();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7522 v612 += 6972;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7523 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7524 while ( (signed int)v612 < (signed int)pParty->pHirelings );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7525 v613 = (char *)&pOutdoor->ddm;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7526 if ( uCurrentlyLoadedLevelType != LEVEL_Outdoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7527 v613 = (char *)&pIndoor->dlv;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7528 *((int *)v613 + 2) += 15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7529 if ( *((int *)v613 + 2) > 10000 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7530 *((int *)v613 + 2) = 10000;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7531 LABEL_1112:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7532 LODWORD(v727) = v232;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7533 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7534 case 95:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7535 if ( v12 <= v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7536 goto LABEL_1119;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7537 if ( v12 <= 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7538 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7539 v614 = 300 * (v2 + 12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7540 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7541 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7542 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7543 if ( v12 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7544 goto LABEL_1119;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7545 v614 = 900 * (v2 + 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7546 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7547 LODWORD(v733) = v614;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7548 LABEL_1119:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7549 v615 = v2 + 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7550 amount = v615;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7551 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7552 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7553 if ( v731 != 3 && v731 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7554 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7555 v616 = v3->uPlayerID_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7556 v617 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7557 v618 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7558 pGame->GetStru6()->SetPlayerBuffAnim(v617, v616);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7559 v668 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7560 v658 = v716;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7561 v732 = (int)v733 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7562 v653 = v615;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7563 v651 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7564 v28 = pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7565 v27 = (char *)&pParty->pPlayers[v3->uPlayerID_2].pPlayerBuffs[10];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7566 goto LABEL_103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7567 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7568 a2 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7569 v732 = (int)v733 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7570 v717 = (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7571 v619 = &pParty->pPlayers[0].pPlayerBuffs[10];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7572 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7573 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7574 v620 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7575 v621 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7576 v622 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7577 pGame->GetStru6()->SetPlayerBuffAnim(v621, v620);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7578 v619->Apply(pParty->uTimePlayed + v717, v731, amount, v716, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7579 ++a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7580 v619 = (SpellBuff *)((char *)v619 + 6972);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7581 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7582 while ( (signed int)v619 < (signed int)&pParty->field_871C[504] );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7583 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7584 case 99:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7585 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7586 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7587 v726 = (Player *)v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7588 pGame->GetIndoorCamera();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7589 v623 = (signed __int64)GetPickDepth();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7590 HIDWORD(v733) = sub_46A6AC((int)dword_50BF30, 100, v623);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7591 v709 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7592 v708 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7593 v707 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7594 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7595 a1.field_48 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7596 a1.field_4C = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7597 a1.field_50 = v731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7598 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uItemType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7599 a1.uAttributes = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7600 a1.uSectorID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7601 a1.uSpriteFrameID = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7602 v624 = v3->uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7603 a1.field_60_distance_related_prolly_lod = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7604 a1.uFacing = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7605 v624 *= 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7606 LOBYTE(v624) = v624 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7607 a1.field_58 = v624;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7608 a1.uSoundID = LOWORD(v3->field_10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7609 a2 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7610 if ( SHIDWORD(v733) > v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7611 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7612 v726 = (Player *)(HIDWORD(v733) * (7 * v2 + 25));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7613 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7614 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7615 v625 = dword_50BF30[a2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7616 a1.vPosition.x = pActors[v625].vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7617 a1.vPosition.y = pActors[v625].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7618 v732 = pActors[v625].uActorHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7619 a1.vPosition.z = pActors[v625].vPosition.z - (unsigned int)(signed __int64)((double)v732 * unk_4D8548);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7620 v626 = 8 * dword_50BF30[a2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7621 LOBYTE(v626) = v626 | 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7622 a1.field_5C = v626;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7623 v627 = a1.Create(0, v1, v1, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7624 v628 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7625 DamageMonsterFromParty(8 * v627 | 2, dword_50BF30[a2], (Vec3_int_ *)&v707);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7626 a2 = v628 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7627 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7628 while ( v628 + 1 < SHIDWORD(v733) );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7629 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7630 v730 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7631 v629 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7632 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7633 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7634 v630 = pPlayers[v629];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7635 if ( !v630->pConditions[2]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7636 && !v630->pConditions[12]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7637 && !v630->pConditions[13]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7638 && !v630->pConditions[14]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7639 && !v630->pConditions[15]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7640 && !v630->pConditions[16] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7641 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7642 v631 = v730++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7643 v681[v631] = v629;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7644 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7645 ++v629;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7646 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7647 while ( v629 <= 4 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7648 v732 = (signed __int64)((double)(signed int)v726 / (double)v730);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7649 HIDWORD(v733) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7650 if ( v730 > v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7651 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7652 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7653 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7654 v632 = 4 * v681[HIDWORD(v733)] + 10965188;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7655 v633 = pPlayers[v681[HIDWORD(v733)]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7656 v633->sHealth += v732;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7657 v726 = *(Player **)v632;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7658 v634 = v726->GetMaxHealth();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7659 if ( v726->sHealth > v634 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7660 *(int *)(*(int *)v632 + 6460) = v726->GetMaxHealth();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7661 v635 = HIDWORD(v733);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7662 v636 = WORD2(v733);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7663 v637 = v3->spellnum;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7664 v638 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7665 pGame->GetStru6()->SetPlayerBuffAnim(v637, v636);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7666 HIDWORD(v733) = v635 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7667 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7668 while ( v635 + 1 < v730 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7669 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7670 v639 = pGame->GetStru6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7671 pGame->GetStru6()->FadeScreen__like_Turn_Undead_and_mb_Armageddon(v1, 0x40u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7672 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7673 case 98:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7674 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7675 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7676 v66 = pGlobalTXT_LocalizationStrings[499];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7677 goto LABEL_201;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7678 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7679 v640 = v12 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7680 if ( !v640 || (v641 = v640 - 1) == 0 || (amount = 4, v641 != 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7681 amount = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7682 if ( pPlayer->uNumArmageddonCasts >= amount || pParty->field_1613C > v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7683 goto LABEL_200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7684 if ( !pPlayer->CanCastSpell(uRequiredMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7685 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7686 pParty->field_1613C = 256;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7687 pParty->field_16140 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7688 ++pPlayer->uNumArmageddonCasts;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7689 if ( pParty->bTurnBasedModeOn == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7690 ++pTurnEngine->field_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7691 v726 = (Player *)50;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7692 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7693 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7694 v642 = rand() % 4096 - 2048;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7695 v643 = rand();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7696 v721 = v642 + pParty->vPosition.x;
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
7697 y = (char *)(pParty->vPosition.y + v643 % 4096 - 2048);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7698 v732 = GetTerrainHeightsAroundParty2(v642 + pParty->vPosition.x, (int)y, (int *)&v710, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7699 v644 = rand();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7700 sub_42F7EB_DropItemAt(0xFE6u, v721, (int)y, v732 + 16, v644 % 500 + 500, 1, v1, v1, (ItemGen *)v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7701 v726 = (Player *)((char *)v726 - 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7702 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7703 while ( *(float *)&v726 != 0.0 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7704 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7705 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7706 goto LABEL_83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7707 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7708 while ( 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7709 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7710 if ( v731 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7711 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7712 if ( *((_QWORD *)v222 + 2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7713 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7714 *((int *)v222 + 4) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7715 *((int *)v222 + 5) = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7716 goto LABEL_439;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7717 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7718 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7719 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7720 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7721 v732 = amount << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7722 v223 = ((Player *)v222)->DiscardConditionIfLastsLongerThan(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7723 2u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7724 pParty->uTimePlayed - (signed int)(signed __int64)((double)(amount << 7) * 0.033333335));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7725 v222 = (char *)HIDWORD(v733);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7726 if ( v223 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7727 LABEL_439:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7728 ((Player *)v222)->PlaySound(103, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7729 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7730 v222 += 6972;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7731 HIDWORD(v733) = (int)v222;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7732 if ( (signed int)v222 >= (signed int)pParty->pHirelings )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7733 goto LABEL_1056;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7734 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7735 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7736 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7737 if ( pParty->bTurnBasedModeOn == v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7738 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7739 v646 = pPlayer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7740 pPlayer->SetRecoveryTime((signed __int64)(flt_6BE3A4_debug_recmod1 * 213.3333333333333));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7741 v647 = n;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7742 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7743 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7744 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7745 v647 = n;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7746 v646 = pPlayer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7747 v648 = sRecoveryTime;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7748 v649 = pPlayer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7749 pParty->pTurnBasedPlayerRecoveryTimes[v711[n].uPlayerID] = 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7750 v649->SetRecoveryTime(v648);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7751 pTurnEngine->_40471C();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7752 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7753 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7754 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, v1, v1, -1, v1, v1, v1, v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7755 v711[v647].spellnum = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7756 v646->sMana -= uRequiredMana;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7757 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7758 //----- (0042EB42) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7759 __int16 ObjectList::ObjectIDByItemID(unsigned __int16 uItemID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7760 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7761 unsigned int v2; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7762 signed int v3; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7763 char *v4; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7764
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7765 v2 = this->uNumObjects;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7766 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7767 if ( (signed int)this->uNumObjects <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7768 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7769 LABEL_5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7770 LOWORD(v3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7771 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7772 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7773 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7774 v4 = (char *)&this->pObjects->uObjectID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7775 while ( uItemID != *(short *)v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7776 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7777 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7778 v4 += 56;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7779 if ( v3 >= (signed int)v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7780 goto LABEL_5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7781 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7782 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7783 return v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7784 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7785
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7786
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7787
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7788 //----- (0042EB78) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7789 int IconFrameTable::GetIconAnimLength(unsigned int uIconID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7790 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7791 return 8 * this->pIcons[uIconID].uAnimLength;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7792 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7793
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7794 //----- (0042EB8D) --------------------------------------------------------
4
4acbadf78023 missing file added
Nomad
parents: 2
diff changeset
7795 void GUIMessageQueue::SendMessage(UIMessageType msg, int param, unsigned int a4)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7796 {
4
4acbadf78023 missing file added
Nomad
parents: 2
diff changeset
7797 if (uNumMessages < 40)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7798 {
4
4acbadf78023 missing file added
Nomad
parents: 2
diff changeset
7799 pMessages[uNumMessages].eType = msg;
4acbadf78023 missing file added
Nomad
parents: 2
diff changeset
7800 pMessages[uNumMessages].param = param;
4acbadf78023 missing file added
Nomad
parents: 2
diff changeset
7801 pMessages[uNumMessages++].field_8 = a4;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7802 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7803 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7804
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7805 //----- (0042EBBE) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7806 int __fastcall sub_42EBBE(int a1, int a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7807 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7808 return (unsigned __int64)(a2 * (signed __int64)a1) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7809 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7810 // 42EBBE: using guessed type int __fastcall sub_42EBBE(int, int);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7811
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7812 //----- (0042EBDB) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7813 int stru193_math::_42EBDB(int angle)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7814 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7815 return SinCos(angle - this->uIntegerHalfPi);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7816 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7817
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7818 //----- (0042ECB5) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7819 bool __cdecl _42ECB5_PlayerAttacksActor()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7820 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7821 unsigned int v0; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7822 Player *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7823 bool result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7824 int v3; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7825 unsigned int v4; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7826 char *v5; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7827 int v6; // ecx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7828 signed int v7; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7829 Actor *v8; // edi@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7830 unsigned int v9; // ecx@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7831 char *v10; // eax@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7832 char *v11; // eax@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7833 unsigned int v12; // eax@47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7834 char *v13; // eax@47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7835 char *v14; // eax@47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7836 unsigned int v15; // ebx@54
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7837 int v16; // [sp-10h] [bp-4Ch]@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7838 int v17; // [sp-10h] [bp-4Ch]@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7839 unsigned int v18; // [sp-Ch] [bp-48h]@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7840 unsigned int v19; // [sp-Ch] [bp-48h]@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7841 __int16 v20; // [sp-8h] [bp-44h]@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7842 __int16 v21; // [sp-8h] [bp-44h]@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7843 int v22; // [sp-4h] [bp-40h]@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7844 int v23; // [sp-4h] [bp-40h]@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7845 SoundID v24; // [sp-4h] [bp-40h]@58
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7846 Vec3_int_ a3; // [sp+Ch] [bp-30h]@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7847 unsigned int a2; // [sp+18h] [bp-24h]@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7848 unsigned int v27; // [sp+1Ch] [bp-20h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7849 char *v28; // [sp+20h] [bp-1Ch]@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7850 int v29; // [sp+24h] [bp-18h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7851 int v30; // [sp+28h] [bp-14h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7852 int v31; // [sp+2Ch] [bp-10h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7853 int v32; // [sp+30h] [bp-Ch]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7854 int v33; // [sp+34h] [bp-8h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7855 int v34; // [sp+38h] [bp-4h]@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7856
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7857 v0 = uActiveCharacter;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7858 v27 = 6972 * uActiveCharacter;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7859 v1 = (Player *)&stru_AA1058[3].pSounds[6972 * uActiveCharacter + 40552];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7860 result = ((Player *)&stru_AA1058[3].pSounds[6972 * uActiveCharacter + 40552])->CanAct();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7861 if ( result )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7862 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7863 pStru277->_427D48(v0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7864 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7865 if ( (signed __int64)pParty->pPartyBuffs[11].uExpireTime > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7866 pParty->pPartyBuffs[11].Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7867 v31 = v1->pEquipment.uBow;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7868 if ( v31 && v1->field_1F5[36 * v31 + 15] & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7869 v31 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7870 v4 = v1->pEquipment.uMainHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7871 v32 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7872 v33 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7873 if ( v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7874 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7875 v5 = (char *)v1 + 36 * v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7876 if ( !(v5[516] & 2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7877 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7878 v28 = v5 + 496;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7879 v6 = *((int *)v5 + 124);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7880 if ( pItemsTable->pItems[v6].uEquipType == 12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7881 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7882 if ( *((int *)v5 + 128) <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7883 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7884 *(int *)v28 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7885 v1->pEquipment.uMainHand = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7886 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7887 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7888 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7889 v32 = *((int *)v5 + 124);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7890 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7891 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7892 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7893 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7894 if ( v6 == 64 || v6 == 65 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7895 v33 = *((int *)v5 + 124);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7896 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7897 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7898 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7899 v30 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7900 v29 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7901 v28 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7902 v7 = pMouse->uPointingObjectID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7903 if ( (pMouse->uPointingObjectID & 7) != 3 || (v34 = pMouse->uPointingObjectID, !pActors[v7 >> 3].CanAct()) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7904 v34 = stru_50C198.FindClosesActor(5120, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7905 a3.z = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7906 a3.y = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7907 a3.x = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7908 if ( (v34 & 7) == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7909 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7910 a2 = v34 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7911 v8 = &pActors[v34 >> 3];
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
7912 v34 = sub_452A9E((v8->vPosition.x - pParty->vPosition.x) * (v8->vPosition.x - pParty->vPosition.x) + (v8->vPosition.y - pParty->vPosition.y) * (v8->vPosition.y - pParty->vPosition.y) + (v8->vPosition.z - pParty->vPosition.z) * (v8->vPosition.z - pParty->vPosition.z))
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7913 - v8->uActorRadius;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7914 if ( v34 >= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7915 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7916 v9 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7917 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7918 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7919 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7920 v9 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7921 v34 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7922 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7923 if ( v33 != v9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7924 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7925 v28 = (char *)1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7926 v22 = v0 + 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7927 v20 = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7928 v18 = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7929 v16 = 102;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7930 LABEL_34:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7931 _42777D_CastSpell_UseWand_ShootArrow(v16, v0 - 1, v18, v20, v22);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7932 LABEL_28:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7933 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7934 goto LABEL_29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7935 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7936 if ( v32 != v9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7937 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7938 v29 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7939 _42777D_CastSpell_UseWand_ShootArrow(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7940 *((int *)&pSpellDatas[66].field_8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7941 + *(int *)(&stru_AA1058[3].pSounds[36 * *(int *)&pParty->pArtifactsFound[v27 + 22] + 41048] + v27)),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7942 v0 - 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7943 8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7944 v9,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7945 v0 + 8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7946 v10 = &v1->field_1F5[36 * v1->pEquipment.uMainHand + 11];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7947 --*(int *)v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7948 v11 = (char *)v1 + 36 * v1->pEquipment.uMainHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7949 if ( *((int *)v11 + 128) <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7950 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7951 *((int *)v11 + 124) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7952 v1->pEquipment.uMainHand = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7953 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7954 goto LABEL_28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7955 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7956 if ( (double)v34 <= 407.2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7957 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7958 a3.x = v8->vPosition.x - pParty->vPosition.x;
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
7959 a3.y = v8->vPosition.y - pParty->vPosition.y;
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
7960 a3.z = v8->vPosition.z - pParty->vPosition.z;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7961 Vec3_int_::Normalize(&a3.x, &a3.y, &a3.z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7962 DamageMonsterFromParty((8 * v0 - 8) | 4, a2, &a3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7963 if ( v1->WearsItem(506, 1) || v1->WearsItem(506, 0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7964 _42FA66_do_explosive_impact(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7965 v8->vPosition.x,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7966 v8->vPosition.y,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7967 v8->vPosition.z + v8->uActorHeight / 2,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7968 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7969 512,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7970 v0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7971 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7972 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7973 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7974 if ( v31 != v9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7975 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7976 v30 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7977 v22 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7978 v20 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7979 v18 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7980 v16 = 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7981 goto LABEL_34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7982 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7983 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7984 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7985 goto LABEL_39;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7986 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7987 if ( v33 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7988 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7989 v28 = (char *)1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7990 v23 = v0 + 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7991 v21 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7992 v19 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7993 v17 = 102;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7994 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7995 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7996 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7997 if ( v32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7998 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7999 v12 = v1->pEquipment.uMainHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8000 v29 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8001 _42777D_CastSpell_UseWand_ShootArrow(
23
509744251c8e Player-related members
Nomad
parents: 4
diff changeset
8002 *((int *)&pSpellDatas[66].field_8 + *(int *)&v1->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v12 + 5]),
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8003 v0 - 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8004 8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8005 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8006 v0 + 8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8007 v13 = &v1->field_1F5[36 * v1->pEquipment.uMainHand + 11];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8008 --*(int *)v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8009 v14 = (char *)v1 + 36 * v1->pEquipment.uMainHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8010 if ( *((int *)v14 + 128) <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8011 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8012 *((int *)v14 + 124) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8013 v1->pEquipment.uMainHand = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8014 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8015 LABEL_29:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8016 v34 = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8017 if ( v30 == v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8018 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8019 if ( v29 != v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8020 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8021 if ( v28 == (char *)v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8022 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8023 v15 = v1->pEquipment.uMainHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8024 if ( v1->HasItemEquipped(EQUIP_TWO_HANDED) )
23
509744251c8e Player-related members
Nomad
parents: 4
diff changeset
8025 v34 = pItemsTable->pItems[*(int *)&v1->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v15 + 5]].uSkillType;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8026 pTurnEngine->_40471C();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8027 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8028 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8029 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8030 v34 = 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8031 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8032 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8033 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8034 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8035 v34 = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8036 v1->PlaySound(50, v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8037 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8038 switch ( v34 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8039 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8040 case 0:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8041 v24 = (SoundID)81;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8042 goto LABEL_66;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8043 case 1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8044 v24 = (SoundID)84;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8045 goto LABEL_66;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8046 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8047 v24 = (SoundID)85;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8048 goto LABEL_66;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8049 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8050 v24 = (SoundID)78;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8051 goto LABEL_66;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8052 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8053 v24 = (SoundID)80;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8054 goto LABEL_66;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8055 case 5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8056 v24 = (SoundID)71;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8057 goto LABEL_66;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8058 case 6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8059 v24 = (SoundID)83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8060 goto LABEL_66;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8061 case 7:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8062 v24 = (SoundID)67;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8063 LABEL_66:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8064 pAudioPlayer->PlaySound(v24, v3, v3, -1, v3, v3, v3, v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8065 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8066 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8067 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8068 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8069 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8070 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8071 if ( !v31 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8072 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8073 LABEL_39:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8074 v31 = v1->GetAttackRecoveryTime(v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8075 if ( v31 < 30 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8076 v31 = 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8077 if ( pParty->bTurnBasedModeOn == v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8078 v1->SetRecoveryTime((signed __int64)(flt_6BE3A4_debug_recmod1 * (double)v31 * 2.133333333333333));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8079 goto LABEL_29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8080 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8081 v23 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8082 v21 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8083 v19 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8084 v30 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8085 v17 = 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8086 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8087 _42777D_CastSpell_UseWand_ShootArrow(v17, v0 - 1, v19, v21, v23);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8088 goto LABEL_29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8089 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8090 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8091 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8092
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8093 //----- (0042F184) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8094 int stru319::FindClosesActor(int a2, int a3, int a4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8095 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8096 int v4; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8097 stru319 *v5; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8098 int v6; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8099 int v7; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8100 int result; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8101 int *v9; // edx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8102 signed int v10; // ebx@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8103 int v11; // edi@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8104 Actor *v12; // esi@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8105 unsigned __int16 v13; // ax@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8106 int v14; // eax@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8107 char v15; // zf@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8108 int v16; // esi@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8109 int v17; // ecx@34
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8110 stru319 *v18; // eax@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8111 int v19; // edx@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8112 int v20; // ecx@41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8113 unsigned __int16 v21; // ax@42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8114 unsigned int v22; // [sp+8h] [bp-24h]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8115 unsigned int v23; // [sp+Ch] [bp-20h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8116 stru319 *v24; // [sp+10h] [bp-1Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8117 unsigned int v25; // [sp+14h] [bp-18h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8118 int *v26; // [sp+18h] [bp-14h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8119 int v27; // [sp+1Ch] [bp-10h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8120 int *v28; // [sp+20h] [bp-Ch]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8121 unsigned int v29; // [sp+24h] [bp-8h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8122 int v30; // [sp+28h] [bp-4h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8123 int i; // [sp+38h] [bp+Ch]@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8124 signed int v32; // [sp+3Ch] [bp+10h]@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8125
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8126 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8127 v5 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8128 v24 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8129 if ( pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8130 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8131 v6 = a3 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8132 if ( a4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8133 LOBYTE(v6) = v6 | 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8134 v7 = pGame->pVisInstance->_4C1944(3, a2, v6, 657456, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8135 if ( v7 != -1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8136 return (unsigned __int16)v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8137 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8138 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8139 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8140 v30 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8141 if ( pRenderer->pActiveZBuffer )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8142 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8143 v29 = viewparams->uScreenX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8144 v23 = viewparams->uScreenZ;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8145 if ( (signed int)viewparams->uScreenY < (signed int)viewparams->uScreenW )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8146 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8147 v25 = viewparams->uScreenW - viewparams->uScreenY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8148 v9 = &pRenderer->pActiveZBuffer[viewparams->uScreenX + 640 * viewparams->uScreenY];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8149 v26 = &pRenderer->pActiveZBuffer[viewparams->uScreenX + 640 * viewparams->uScreenY];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8150 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8151 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8152 if ( (signed int)v29 < (signed int)v23 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8153 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8154 v28 = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8155 v10 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8156 v27 = v23 - v29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8157 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8158 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8159 v22 = *v28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8160 v11 = *v28 & 0xFFFF;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8161 if ( (*(char *)v28 & 7) == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8162 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8163 v12 = &pActors[(unsigned int)v11 >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8164 v13 = v12->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8165 if ( v13 != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8166 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8167 if ( v13 != 4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8168 && v13 != 11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8169 && v13 != 19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8170 && v13 != 17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8171 && (!a3 || pActors[(unsigned int)v11 >> 3].GetActorsRelation(0)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8172 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8173 if ( (!a4 || MonsterStats::BelongsToSupertype(v12->pMonsterInfo.uID, MONSTER_SUPERTYPE_UNDEAD))
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8174 && v22 <= a2 << 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8175 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8176 v14 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8177 if ( v10 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8178 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8179 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8180 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8181 if ( dword_50BDA0[v14] == v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8182 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8183 ++v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8184 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8185 while ( v14 < v30 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8186 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8187 if ( v14 == v30 && v10 < 100 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8188 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8189 ++v30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8190 dword_50BC10[v10] = v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8191 dword_50BDA0[v10] = v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8192 ++v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8193 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8194 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8195 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8196 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8197 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8198 ++v28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8199 --v27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8200 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8201 while ( v27 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8202 v4 = v30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8203 v5 = v24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8204 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8205 v9 = v26 + 640;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8206 v15 = v25-- == 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8207 v26 += 640;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8208 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8209 while ( !v15 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8210 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8211 if ( v4 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8212 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8213 v32 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8214 v16 = (int)dword_50BC10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8215 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8216 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8217 for ( i = v32; i < v4; ++i )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8218 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8219 v17 = dword_50BC10[i];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8220 if ( v17 < *(int *)v16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8221 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8222 dword_50BC10[i] = *(int *)v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8223 *(int *)v16 = v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8224 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8225 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8226 ++v32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8227 v16 += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8228 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8229 while ( v32 - 1 < v4 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8230 v5 = v24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8231 if ( v4 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8232 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8233 v18 = v24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8234 v19 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8235 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8236 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8237 *(int *)&v18->field_0 = (*(int *)&v18[(char *)dword_50BC10 - (char *)v24].field_0 >> 3) & 0x1FFF;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8238 v18 += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8239 --v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8240 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8241 while ( v19 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8242 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8243 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8244 v20 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8245 for ( *(int *)&v5[2000].field_0 = v4; v20 < v4; ++v20 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8246 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8247 v21 = pActors[*(int *)&v5[4 * v20].field_0].uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8248 if ( v21 != 4 && v21 != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8249 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8250 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8251 if ( v20 != v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8252 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8253 result = 8 * *(int *)&v5[4 * v20].field_0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8254 LOBYTE(result) = result | 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8255 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8256 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8257 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8258 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8259 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8260 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8261
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8262
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8263 //----- (0042F3D6) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8264 void InitializeTurnBasedAnimations(void *_this)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8265 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8266 unsigned int *v1; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8267
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8268 pIconIDs_Turn[0] = pIconsFrameTable->FindIcon("turn0");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8269 pIconIDs_Turn[1] = pIconsFrameTable->FindIcon("turn1");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8270 pIconIDs_Turn[2] = pIconsFrameTable->FindIcon("turn2");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8271 pIconIDs_Turn[3] = pIconsFrameTable->FindIcon("turn3");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8272 pIconIDs_Turn[4] = pIconsFrameTable->FindIcon("turn4");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8273 uIconID_TurnStop = pIconsFrameTable->FindIcon("turnstop");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8274 uIconID_TurnHour = pIconsFrameTable->FindIcon("turnhour");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8275 uIconID_TurnStart = pIconsFrameTable->FindIcon("turnstart");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8276 uIconID_CharacterFrame = pIconsFrameTable->FindIcon("aframe1");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8277 uSpriteID_Spell11 = pSpriteFrameTable->FastFindSprite("spell11");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8278 v1 = pIconIDs_Turn;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8279 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8280 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8281 pIconsFrameTable->InitializeAnimation(*v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8282 ++v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8283 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8284 while ( (signed int)v1 < (signed int)&uIconID_TurnStop );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8285 pIconsFrameTable->InitializeAnimation(uIconID_TurnHour);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8286 pIconsFrameTable->InitializeAnimation(uIconID_TurnStop);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8287 pIconsFrameTable->InitializeAnimation(uIconID_TurnStart);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8288 pIconsFrameTable->InitializeAnimation(uIconID_CharacterFrame);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8289 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8290
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8291 //----- (0042F4DA) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8292 signed int __cdecl sub_42F4DA()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8293 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8294 signed int v0; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8295 char *v1; // esi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8296 int v2; // ebx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8297 int v3; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8298 int v4; // ebx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8299 unsigned int v5; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8300 int v6; // edx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8301 unsigned int v7; // edx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8302 unsigned int v8; // edx@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8303 __int16 v9; // ax@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8304 signed int result; // eax@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8305 int v11; // [sp+Ch] [bp-10h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8306 int v12; // [sp+10h] [bp-Ch]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8307 signed int v13; // [sp+14h] [bp-8h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8308
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8309 v0 = 5120;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8310 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8311 v0 = 2560;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8312 v13 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8313 if ( (signed int)uNumActors <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8314 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8315 LABEL_20:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8316 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8317 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8318 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8319 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8320 v1 = (char *)&pActors[0].uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8321 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8322 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8323 v2 = abs(*((short *)v1 - 17) - pParty->vPosition.x);
58
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
8324 v11 = abs(*((short *)v1 - 16) - pParty->vPosition.y);
41cbaabde2cb BLV render
Nomad
parents: 46
diff changeset
8325 v12 = abs(*((short *)v1 - 15) - pParty->vPosition.z);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8326 v3 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8327 v4 = v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8328 v5 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8329 if ( v3 < v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8330 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8331 v6 = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8332 v3 = v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8333 v4 = v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8334 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8335 if ( v3 < v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8336 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8337 v7 = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8338 v3 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8339 v5 = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8340 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8341 if ( v4 < (signed int)v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8342 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8343 v8 = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8344 v5 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8345 v4 = v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8346 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8347 if ( (signed int)(((unsigned int)(11 * v4) >> 5) + (v5 >> 2) + v3) < v0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8348 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8349 v9 = *(short *)v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8350 if ( *(short *)v1 != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8351 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8352 if ( v9 != 4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8353 && v9 != 11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8354 && v9 != 19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8355 && v9 != 17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8356 && (*(v1 - 138) & 8 || ((Actor *)nullptr)->GetActorsRelation( (Actor *)(v1 - 176))) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8357 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8358 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8359 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8360 ++v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8361 v1 += 836;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8362 if ( v13 >= (signed int)uNumActors )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8363 goto LABEL_20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8364 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8365 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8366 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8367 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8368 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8369
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8370 //----- (0042F5ED) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8371 int LayingItem::Create(int yaw, int pitch, int a4, int a5)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8372 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8373 LayingItem *v5; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8374 signed int v6; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8375 char *v7; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8376 signed int result; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8377 LayingItem *v9; // ebx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8378 int v10; // edx@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8379 int v11; // edi@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8380 __int16 v12; // ax@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8381 int v13; // ST2C_4@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8382 int v14; // eax@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8383 int v15; // [sp-28h] [bp-38h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8384 int v16; // [sp-24h] [bp-34h]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8385 Vec3_int_ v17; // [sp-20h] [bp-30h]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8386 int *v18; // [sp-14h] [bp-24h]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8387 int *v19; // [sp-10h] [bp-20h]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8388 int *v20; // [sp-Ch] [bp-1Ch]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8389 signed int v21; // [sp+8h] [bp-8h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8390 int angle; // [sp+Ch] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8391 int a4a; // [sp+1Ch] [bp+Ch]@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8392 int a4b; // [sp+1Ch] [bp+Ch]@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8393 int a5a; // [sp+20h] [bp+10h]@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8394
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8395 auto a1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8396 angle = yaw;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8397 v5 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8398 if ( !a1->uObjectDescID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8399 return -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8400 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8401 v7 = (char *)&pLayingItems[0].uObjectDescID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8402 v21 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8403 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8404 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8405 if ( !*(short *)v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8406 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8407 v7 += 112;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8408 ++v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8409 v21 = v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8410 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8411 while ( (signed int)v7 < (signed int)((char *)&pObjectList->uNumObjects + 2) );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8412 if ( v6 >= 1000 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8413 return -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8414 *(int *)&v5->field_62[2] = v5->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8415 *(int *)&v5->field_62[6] = v5->vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8416 v9 = &pLayingItems[v6];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8417 *(int *)&v5->field_62[10] = v5->vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8418 memcpy(v9, v5, 0x70u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8419 if ( a5 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8420 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8421 v20 = &v9->vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8422 v19 = &v9->vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8423 v18 = (int *)&v9->vPosition;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8424 v17.z = v5->vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8425 *(_QWORD *)&v17.x = *(_QWORD *)&v5->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8426 v16 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8427 v10 = stru_5C6E00->uIntegerHalfPi + v9->uFacing;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8428 goto LABEL_16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8429 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8430 if ( a5 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8431 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8432 v20 = &v9->vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8433 v19 = &v9->vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8434 v18 = (int *)&v9->vPosition;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8435 v17.z = v5->vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8436 *(_QWORD *)&v17.x = *(_QWORD *)&v5->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8437 v16 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8438 v10 = stru_5C6E00->uIntegerHalfPi + v9->uFacing;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8439 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8440 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8441 if ( a5 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8442 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8443 v20 = &v9->vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8444 v19 = &v9->vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8445 v18 = (int *)&v9->vPosition;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8446 v17.z = v5->vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8447 *(_QWORD *)&v17.x = *(_QWORD *)&v5->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8448 v16 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8449 v10 = v9->uFacing - stru_5C6E00->uIntegerHalfPi;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8450 LABEL_14:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8451 v15 = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8452 LABEL_17:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8453 Vec3_int_::Rotate(v15, v10, v16, v17, v18, v19, v20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8454 goto LABEL_18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8455 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8456 if ( a5 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8457 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8458 v20 = &v9->vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8459 v19 = &v9->vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8460 v18 = (int *)&v9->vPosition;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8461 v17.z = v5->vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8462 *(_QWORD *)&v17.x = *(_QWORD *)&v5->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8463 v16 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8464 v10 = v9->uFacing - stru_5C6E00->uIntegerHalfPi;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8465 LABEL_16:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8466 v15 = 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8467 goto LABEL_17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8468 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8469 LABEL_18:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8470 v11 = a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8471 v12 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8472 if ( a4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8473 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8474 a4a = stru_5C6E00->SinCos(angle);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8475 v13 = (unsigned __int64)(a4a * (signed __int64)stru_5C6E00->SinCos(pitch)) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8476 a4b = stru_5C6E00->SinCos(angle - stru_5C6E00->uIntegerHalfPi);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8477 a5a = (unsigned __int64)(a4b * (signed __int64)stru_5C6E00->SinCos(pitch)) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8478 v14 = stru_5C6E00->SinCos(pitch - stru_5C6E00->uIntegerHalfPi);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8479 v9->vVelocity.x = (unsigned int)(v13 * v11) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8480 v9->vVelocity.y = (unsigned int)(a5a * v11) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8481 v12 = (unsigned int)(v14 * v11) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8482 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8483 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8484 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8485 v9->vVelocity.y = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8486 v9->vVelocity.x = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8487 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8488 v9->vVelocity.z = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8489 result = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8490 if ( v21 >= (signed int)uNumLayingItems )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8491 uNumLayingItems = v21 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8492 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8493 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8494
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8495 //----- (0042F7EB) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8496 bool __fastcall sub_42F7EB_DropItemAt(unsigned int uSpriteID, int x, int y, int z, int a4, int count, int a7, unsigned __int16 attributes, ItemGen *a9)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8497 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8498 unsigned int v9; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8499 signed int v10; // edx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8500 char *v11; // ecx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8501 unsigned __int16 v12; // ax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8502 unsigned int v13; // edx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8503 char *v14; // ecx@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8504 int v15; // esi@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8505 int v16; // eax@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8506 int v17; // edi@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8507 int v18; // esi@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8508 //LayingItem a1a; // [sp+Ch] [bp-78h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8509 int v21; // [sp+7Ch] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8510 unsigned int v22; // [sp+80h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8511
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8512 v9 = uSpriteID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8513 v21 = x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8514 v22 = uSpriteID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8515
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8516 LayingItem a1a; // [sp+Ch] [bp-78h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8517 //LayingItem::LayingItem(&a1a);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8518 a1a.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8519
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8520 if ( a9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8521 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8522 memcpy(&a1a.stru_24, a9, sizeof(a1a.stru_24));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8523 v9 = v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8524 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8525 v10 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8526 a1a.field_50 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8527 a1a.field_4C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8528 a1a.field_48 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8529 a1a.field_54 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8530 a1a.uItemType = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8531 if ( (signed int)pObjectList->uNumObjects <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8532 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8533 LABEL_7:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8534 v12 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8535 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8536 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8537 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8538 v11 = (char *)&pObjectList->pObjects->uObjectID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8539 while ( (short)v9 != *(short *)v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8540 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8541 ++v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8542 v11 += 56;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8543 if ( v10 >= (signed int)pObjectList->uNumObjects )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8544 goto LABEL_7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8545 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8546 v12 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8547 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8548 a1a.uObjectDescID = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8549 a1a.vPosition.z = z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8550 a1a.vPosition.x = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8551 a1a.vPosition.y = y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8552 a1a.uSoundID = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8553 a1a.uAttributes = attributes;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8554 a1a.uSectorID = pIndoor->GetSector(v21, y, z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8555 a1a.uSpriteFrameID = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8556 a1a.field_58 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8557 a1a.field_5C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8558 if ( !(a1a.uAttributes & 0x10) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8559 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8560 v13 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8561 if ( (signed int)pItemsTable->pItems[0].uItemID > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8562 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8563 v14 = (char *)&pItemsTable->pItems[0].uSpriteID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8564 while ( *(short *)v14 != v9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8565 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8566 ++v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8567 v14 += 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8568 if ( (signed int)v13 >= (signed int)pItemsTable->pItems[0].uItemID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8569 goto LABEL_16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8570 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8571 a1a.stru_24.uItemID = v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8572 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8573 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8574 LABEL_16:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8575 if ( a7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8576 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8577 v15 = count;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8578 if ( count > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8579 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8580 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8581 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8582 a1a.uFacing = rand() % (signed int)stru_5C6E00->uIntegerDoublePi;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8583 v16 = rand();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8584 a1a.Create(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8585 (signed __int16)a1a.uFacing,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8586 ((signed int)stru_5C6E00->uIntegerHalfPi >> 1) + (v16 % (signed int)stru_5C6E00->uIntegerHalfPi >> 1),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8587 a4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8588 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8589 --v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8590 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8591 while ( v15 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8592 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8593 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8594 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8595 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8596 v17 = count;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8597 v18 = stru_5C6E00->uIntegerHalfPi;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8598 a1a.uFacing = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8599 if ( count > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8600 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8601 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8602 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8603 a1a.Create((signed __int16)a1a.uFacing, v18, a4, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8604 --v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8605 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8606 while ( v17 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8607 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8608 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8609 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8610 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8611
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8612 //----- (0042F960) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8613 void __fastcall sub_42F960_create_object(int x, int y, int z)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8614 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8615 int v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8616 int v4; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8617 signed int v5; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8618 char *v6; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8619 unsigned __int16 v7; // ax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8620 signed int v8; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8621 signed int v9; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8622 //LayingItem a1; // [sp+Ch] [bp-70h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8623
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8624 v3 = x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8625 v4 = y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8626
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8627 LayingItem a1; // [sp+Ch] [bp-70h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8628 //LayingItem::LayingItem(&a1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8629 a1.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8630
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8631 v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8632 a1.field_50 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8633 a1.field_4C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8634 a1.field_48 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8635 a1.field_54 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8636 a1.uItemType = 800;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8637 if ( (signed int)pObjectList->uNumObjects <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8638 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8639 LABEL_5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8640 v7 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8641 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8642 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8643 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8644 v6 = (char *)&pObjectList->pObjects->uObjectID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8645 while ( *(short *)v6 != 800 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8646 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8647 ++v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8648 v6 += 56;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8649 if ( v5 >= (signed int)pObjectList->uNumObjects )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8650 goto LABEL_5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8651 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8652 v7 = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8653 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8654 a1.uObjectDescID = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8655 a1.vPosition.x = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8656 a1.vPosition.y = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8657 a1.vPosition.z = z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8658 a1.uSoundID = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8659 a1.uAttributes = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8660 a1.uSectorID = pIndoor->GetSector(v3, v4, z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8661 a1.uSpriteFrameID = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8662 a1.field_58 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8663 a1.field_5C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8664 v8 = a1.Create(0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8665 if ( v8 != -1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8666 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8667 v9 = 8 * v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8668 LOBYTE(v9) = v9 | 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8669 pAudioPlayer->PlaySound((SoundID)(SOUND_GoldReceived|0x14), v9, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8670 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8671 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8672
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8673 //----- (0042FA22) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8674 char *__cdecl sub_42FA22_mess_with_laying_item_list()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8675 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8676 size_t v0; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8677 int v1; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8678 char *result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8679 void *v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8680
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8681 v0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8682 v1 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8683 result = (char *)&pLayingItems[0].uObjectDescID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8684 v3 = pLayingItems;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8685 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8686 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8687 if ( *(short *)result )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8688 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8689 if ( v1 != v0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8690 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8691 memcpy(v3, result - 2, 0x70u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8692 *(short *)result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8693 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8694 ++v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8695 v3 = (char *)v3 + 112;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8696 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8697 result += 112;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8698 ++v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8699 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8700 while ( (signed int)result < (signed int)((char *)&pObjectList->uNumObjects + 2) );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8701 uNumLayingItems = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8702 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8703 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8704
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8705 //----- (0042FA66) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8706 int __fastcall _42FA66_do_explosive_impact(int a1, int a2, int a3, int a4, __int16 a5, signed int a6)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8707 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8708 int v6; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8709 int v7; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8710 char *v8; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8711 unsigned __int16 v9; // ax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8712 int v10; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8713 signed int result; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8714 __int16 v12; // ax@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8715 //LayingItem a1a; // [sp+Ch] [bp-74h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8716 int v14; // [sp+7Ch] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8717
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8718 v6 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8719 v7 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8720 LayingItem a1a; // [sp+Ch] [bp-74h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8721 //LayingItem::LayingItem(&a1a);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8722 a1a.uItemType = 600;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8723 a1a.stru_24.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8724
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8725 a1a.field_48 = 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8726 a1a.field_4C = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8727 a1a.field_50 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8728 v14 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8729 if ( (signed int)pObjectList->uNumObjects <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8730 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8731 LABEL_5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8732 v9 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8733 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8734 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8735 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8736 v8 = (char *)&pObjectList->pObjects->uObjectID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8737 while ( (short)a1a.uItemType != *(short *)v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8738 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8739 ++v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8740 v8 += 56;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8741 if ( v14 >= (signed int)pObjectList->uNumObjects )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8742 goto LABEL_5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8743 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8744 v9 = v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8745 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8746 a1a.uObjectDescID = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8747 a1a.vPosition.x = v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8748 a1a.vPosition.y = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8749 a1a.vPosition.z = a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8750 a1a.uAttributes = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8751 a1a.uSectorID = pIndoor->GetSector(v6, v7, a3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8752 a1a.uSpriteFrameID = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8753 a1a.field_5C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8754 a1a.field_60_distance_related_prolly_lod = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8755 a1a.uFacing = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8756 a1a.uSoundID = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8757 if ( a6 >= 1 || a6 <= 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8758 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8759 v10 = 8 * a6 - 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8760 LOBYTE(v10) = v10 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8761 a1a.field_58 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8762 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8763 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8764 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8765 a1a.field_58 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8766 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8767 result = a1a.Create(0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8768 if ( result != -1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8769 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8770 v12 = 8 * result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8771 LOBYTE(v12) = v12 | 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8772 result = stru_50FE08.Add(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8773 v12,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8774 a5,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8775 SLOWORD(a1a.vPosition.x),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8776 SLOWORD(a1a.vPosition.y),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8777 SLOWORD(a1a.vPosition.z),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8778 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8779 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8780 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8781 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8782 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8783
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8784
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8785
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8786 //----- (0042FB5C) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8787 bool __fastcall sub_42FB5C(signed int a1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8788 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8789 int v1; // ecx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8790 int v2; // ecx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8791 int v3; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8792 int v4; // ecx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8793 int v5; // ecx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8794 int v6; // ecx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8795 char v7; // zf@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8796
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8797 if ( a1 > 39 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8798 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8799 if ( a1 > 77 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8800 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8801 if ( a1 == 80 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8802 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8803 if ( a1 > 84 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8804 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8805 if ( a1 <= 86 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8806 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8807 v7 = a1 == 95;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8808 goto LABEL_20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8809 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8810 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8811 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8812 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8813 if ( a1 == 77 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8814 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8815 if ( a1 >= 46 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8816 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8817 if ( a1 <= 47 || a1 == 51 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8818 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8819 v7 = a1 == 73;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8820 goto LABEL_20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8821 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8822 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8823 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8824 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8825 if ( a1 == 39 || (v1 = a1 - 2) == 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8826 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8827 v2 = v1 - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8828 if ( !v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8829 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8830 v3 = v2 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8831 if ( !v3 || (v4 = v3 - 3) == 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8832 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8833 v5 = v4 - 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8834 if ( !v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8835 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8836 v6 = v5 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8837 if ( !v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8838 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8839 v7 = v6 == 20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8840 LABEL_20:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8841 if ( !v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8842 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8843 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8844 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8845
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8846 //----- (0042FBDD) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8847 void __cdecl sub_42FBDD()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8848 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8849 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8850 pRenderer->DrawTextureTransparent(ptr_5076FC->uX, ptr_5076FC->uY, ptr_5076FC->pTextures[0]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8851 pRenderer->Present();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8852 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8853
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8854 //----- (0042FC15) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8855 void __cdecl sub_42FC15()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8856 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8857 pAudioPlayer->PlaySound((SoundID)75, -2, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8858 pRenderer->DrawTextureTransparent(ptr_5076F4->uX, ptr_5076F4->uY, ptr_5076F4->pTextures[0]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8859 pRenderer->Present();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8860 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8861
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8862 //----- (0042FC4E) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8863 void __cdecl ProcessInputActions()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8864 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8865 ActionQueue *pActionQueue; // esi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8866 Keyboard *v3; // ecx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8867 char v4; // al@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8868 ActionQueue *v5; // ecx@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8869 Player *v6; // ecx@86
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8870 Player *v7; // esi@100
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8871 char v8; // bl@100
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8872 unsigned __int16 v9; // ax@102
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8873 int v10; // eax@103
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8874 unsigned int v11; // eax@127
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8875 signed int v12; // esi@157
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8876 Keyboard *v13; // ecx@158
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8877 char v14; // al@159
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8878 unsigned int v15; // eax@168
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8879 void *v16; // esi@177
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8880 int v17; // [sp-14h] [bp-1Ch]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8881 PartyAction partyAction; // [sp-14h] [bp-1Ch]@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8882 PartyAction partyAction_; // [sp-14h] [bp-1Ch]@54
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8883 __int16 v20; // [sp-14h] [bp-1Ch]@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8884 int v21; // [sp-14h] [bp-1Ch]@68
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8885 int v22; // [sp-Ch] [bp-14h]@158
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8886 InputAction inputAction; // [sp+0h] [bp-8h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8887 int v24; // [sp+4h] [bp-4h]@87
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8888
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8889 pGame->pKeyboardInstance->EnterCriticalSection();
45
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
8890 auto pKeyboard = pGame->pKeyboardInstance;
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
8891 if (!bAlwaysRun)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8892 {
45
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
8893 if (pKeyboard->IsShiftHeld())
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
8894 pParty->uFlags2 |= PARTY_FLAGS_2_RUNNING;
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
8895 else
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
8896 pParty->uFlags2 &= ~PARTY_FLAGS_2_RUNNING;
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
8897 }
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
8898 else
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
8899 {
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
8900 if (pKeyboard->IsShiftHeld())
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
8901 pParty->uFlags2 &= ~PARTY_FLAGS_2_RUNNING;
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
8902 else
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
8903 pParty->uFlags2 |= PARTY_FLAGS_2_RUNNING;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8904 }
45
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
8905
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8906 pParty->uFlags2 |= PARTY_FLAGS_2_RUNNING;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8907 LABEL_6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8908 if ( !pEventTimer->bPaused )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8909 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8910 inputAction = (InputAction)0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8911 pActionQueue = pPartyActionQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8912 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8913 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8914 v3 = pGame->pKeyboardInstance;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8915 v17 = pKeyActionMap->pVirtualKeyCodesMapping[inputAction];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8916 if ( pKeyActionMap->pToggleTypes[inputAction] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8917 v4 = v3->WasKeyPressed(v17);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8918 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8919 v4 = v3->IsKeyBeingHeld(v17);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8920 if ( v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8921 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8922 switch ( inputAction )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8923 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8924 case INPUT_MoveForward:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 29
diff changeset
8925 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8926 break;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
8927 if (!pParty->bTurnBasedModeOn)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8928 goto _do_move_forward;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
8929 if (pTurnEngine->field_4 != 1 && pTurnEngine->field_4 != 2 && pTurnEngine->uActionPointsLeft > 0 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8930 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8931 pTurnEngine->uActionPointsLeft -= 26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8932 _do_move_forward:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8933 v5 = pActionQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8934 if ( pParty->uFlags2 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8935 partyAction = PARTY_RunForward;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8936 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8937 partyAction = PARTY_WalkForward;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8938 goto _add_action_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8939 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8940 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8941 case INPUT_MoveBackwards:
77
8b0c4d626477 Party movement
Nomad
parents: 59
diff changeset
8942 __debugbreak();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 29
diff changeset
8943 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8944 break;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
8945 if (!pParty->bTurnBasedModeOn)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8946 goto _do_move_backwards;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
8947 if ( pTurnEngine->field_4 != 1 && pTurnEngine->field_4 != 2 && pTurnEngine->uActionPointsLeft > 0 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8948 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8949 pTurnEngine->uActionPointsLeft -= 26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8950 _do_move_backwards:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8951 v5 = pActionQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8952 if ( pParty->uFlags2 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8953 partyAction = PARTY_RunBackward;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8954 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8955 partyAction = PARTY_WalkBackward;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8956 goto _add_action_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8957 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8958 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8959 case INPUT_StrafeLeft:
77
8b0c4d626477 Party movement
Nomad
parents: 59
diff changeset
8960 __debugbreak();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 29
diff changeset
8961 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8962 break;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
8963 if (!pParty->bTurnBasedModeOn)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8964 goto _do_strafe_left;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
8965 if ( pTurnEngine->field_4 == 1 || pTurnEngine->field_4 == 2 || pTurnEngine->uActionPointsLeft <= 0 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8966 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8967 pTurnEngine->uActionPointsLeft -= 26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8968 _do_strafe_left:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8969 partyAction = PARTY_StrafeLeft;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8970 goto _add_action_and_continue_;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8971 case INPUT_StrafeRight:
77
8b0c4d626477 Party movement
Nomad
parents: 59
diff changeset
8972 __debugbreak();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 29
diff changeset
8973 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8974 break;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
8975 if (!pParty->bTurnBasedModeOn)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8976 goto _do_strafe_right;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
8977 if ( pTurnEngine->field_4 == 1 || pTurnEngine->field_4 == 2 || pTurnEngine->uActionPointsLeft <= 0 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8978 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8979 pTurnEngine->uActionPointsLeft -= 26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8980 _do_strafe_right:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8981 partyAction = PARTY_StrafeRight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8982 goto _add_action_and_continue_;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8983 case INPUT_TurnLeft:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 29
diff changeset
8984 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8985 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8986 if ( GetAsyncKeyState(VK_CONTROL) ) // strafing
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8987 {
45
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
8988 if (pParty->bTurnBasedModeOn)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8989 {
45
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
8990 if ( pTurnEngine->field_4 == 1 || pTurnEngine->field_4 == 2 || pTurnEngine->uActionPointsLeft <= 0 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8991 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8992 pTurnEngine->uActionPointsLeft -= 26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8993 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8994 partyAction_ = PARTY_StrafeLeft;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8995 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8996 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8997 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8998 if ( pParty->uFlags2 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8999 partyAction_ = PARTY_FastTurnLeft;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9000 else
45
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
9001 partyAction_ = PARTY_TurnLeft;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9002 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9003 pActionQueue->Add(partyAction_);
45
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
9004 if (uCurrentlyLoadedLevelType == LEVEL_Outdoor && pWeather->bRenderSnow)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9005 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9006 v20 = 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9007 goto LABEL_75;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9008 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9009 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9010 case INPUT_TurnRight:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 29
diff changeset
9011 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9012 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9013 if ( GetAsyncKeyState(17) ) // strafing
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9014 {
45
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
9015 if (pParty->bTurnBasedModeOn)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9016 {
45
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
9017 if ( pTurnEngine->field_4 == 1 || pTurnEngine->field_4 == 2 || pTurnEngine->uActionPointsLeft <= 0 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9018 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9019 pTurnEngine->uActionPointsLeft -= 26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9020 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9021 v21 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9022 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9023 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9024 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9025 if ( pParty->uFlags2 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9026 v21 = 19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9027 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9028 v21 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9029 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9030 pActionQueue->Add((PartyAction)v21);
45
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
9031 if (uCurrentlyLoadedLevelType == LEVEL_Outdoor && pWeather->bRenderSnow)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9032 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9033 v20 = -10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9034 LABEL_75:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9035 pWeather->_4C2F0B(v20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9036 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9037 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9038 case INPUT_Jump:
77
8b0c4d626477 Party movement
Nomad
parents: 59
diff changeset
9039 __debugbreak();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 29
diff changeset
9040 if ( pCurrentScreen
45
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
9041 || pParty->bTurnBasedModeOn)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9042 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9043 partyAction = (PartyAction)12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9044 goto _add_action_and_continue_;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9045 case INPUT_Yell:
77
8b0c4d626477 Party movement
Nomad
parents: 59
diff changeset
9046 __debugbreak();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 29
diff changeset
9047 if ( !pCurrentScreen
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9048 && uActiveCharacter )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9049 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9050 pParty->Yell();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9051 pPlayers[uActiveCharacter]->PlaySound(65, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9052 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9053 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9054 case INPUT_Pass:
77
8b0c4d626477 Party movement
Nomad
parents: 59
diff changeset
9055 __debugbreak();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 29
diff changeset
9056 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9057 break;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
9058 if (pParty->bTurnBasedModeOn && pTurnEngine->field_4 == 3)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9059 goto LABEL_118;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9060 if ( uActiveCharacter )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9061 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9062 v6 = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9063 if ( !v6->uTimeToRecovery )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9064 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9065 v24 = v6->GetAttackRecoveryTime(0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9066 if ( !pParty->bTurnBasedModeOn )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9067 pPlayers[uActiveCharacter]->SetRecoveryTime(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9068 (signed __int64)(flt_6BE3A4_debug_recmod1 * (double)v24 * 2.133333333333333));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9069 pStru277->_427D48(uActiveCharacter);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9070 pTurnEngine->_40471C();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9071 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9072 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9073 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9074 case INPUT_Combat:
77
8b0c4d626477 Party movement
Nomad
parents: 59
diff changeset
9075 __debugbreak();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 29
diff changeset
9076 if ( !pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9077 {
45
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
9078 if (pParty->bTurnBasedModeOn)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9079 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9080 if ( pTurnEngine->field_4 == 3 || (pTurnEngine->pQueue[0].uPackedID & 7) == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9081 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9082 pParty->bTurnBasedModeOn = 0;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
9083 pTurnEngine->End(true);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9084 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9085 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9086 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9087 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9088 pTurnEngine->Start();
45
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
9089 pParty->bTurnBasedModeOn = true;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9090 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9091 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9092 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9093 case INPUT_CastReady:
77
8b0c4d626477 Party movement
Nomad
parents: 59
diff changeset
9094 __debugbreak();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 29
diff changeset
9095 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9096 break;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
9097 if (pParty->bTurnBasedModeOn && pTurnEngine->field_4 == 3)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9098 goto LABEL_118;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9099 if ( !uActiveCharacter )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9100 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9101 v7 = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9102 v8 = v7->uQuickSpell;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9103 if ( !v8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9104 || bUnderwater
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9105 || ((v9 = v7->pActiveSkills[(unsigned __int8)v8 / 11 + 12], !(HIBYTE(v9) & 1)) ? ((v9 & 0x80u) == 0 ? (!(v9 & 0x40) ? (v10 = *(&pSpellDatas[0].uNormalLevelMana + 10 * (unsigned __int8)v8)) : (v10 = *(&pSpellDatas[0].uExpertLevelMana + 10 * (unsigned __int8)v8))) : (v10 = *(&pSpellDatas[0].uMasterLevelMana + 10 * (unsigned __int8)v8))) : (v10 = *(&pSpellDatas[0].uMagisterLevelMana + 10 * (unsigned __int8)v8)),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9106 v10 > v7->sMana) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9107 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9108 pActionQueue = pPartyActionQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9109 LABEL_120:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9110 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9111 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9112 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)23;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9113 goto _send_message;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9114 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9115 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9116 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9117 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9118 pActionQueue = pPartyActionQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9119 if ( dword_50C9E8 < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9120 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9121 dword_50C9EC[3 * dword_50C9E8] = 25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9122 dword_50C9F0[3 * dword_50C9E8] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9123 *(&dword_50C9E8 + 3 * dword_50C9E8 + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9124 ++dword_50C9E8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9125 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9126 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9127 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9128 default:
77
8b0c4d626477 Party movement
Nomad
parents: 59
diff changeset
9129 __debugbreak();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9130 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9131 case INPUT_Attack:
77
8b0c4d626477 Party movement
Nomad
parents: 59
diff changeset
9132 __debugbreak();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 29
diff changeset
9133 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9134 break;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
9135 if (!pParty->bTurnBasedModeOn || pTurnEngine->field_4 != 3)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9136 goto LABEL_120;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9137 LABEL_118:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9138 pTurnEngine->field_18 |= 8u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9139 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9140 case INPUT_EventTrigger:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 29
diff changeset
9141 if ( !pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9142 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9143 if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9144 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9145 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)404;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9146 goto _send_message;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9147 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 29
diff changeset
9148 if ( pCurrentScreen == 4 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9149 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9150 v11 = pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9151 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9152 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9153 if ( pMessageQueue_50CBD0->pMessages[0].field_8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9154 {
45
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
9155 v11 = 1;
bcc051713d20 BLV render & seffects
Nomad
parents: 29
diff changeset
9156 pMessageQueue_50CBD0->uNumMessages = 1;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9157 LABEL_132:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9158 pMessageQueue_50CBD0->pMessages[v11].eType = (UIMessageType)113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9159 _send_message:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9160 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9161 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9162 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9163 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9164 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9165 v11 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9166 pMessageQueue_50CBD0->uNumMessages = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9167 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9168 if ( (signed int)v11 < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9169 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9170 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9171 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9172 case INPUT_CharCycle:
77
8b0c4d626477 Party movement
Nomad
parents: 59
diff changeset
9173 __debugbreak();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 29
diff changeset
9174 if ( pCurrentScreen == 8
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9175 || dword_50C9E8 >= 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9176 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9177 dword_50C9EC[3 * dword_50C9E8] = 176;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9178 goto LABEL_155;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9179 case INPUT_LookUp:
77
8b0c4d626477 Party movement
Nomad
parents: 59
diff changeset
9180 __debugbreak();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9181 if ( pEventTimer->bPaused )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9182 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9183 partyAction = (PartyAction)7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9184 goto _add_action_and_continue_;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9185 case INPUT_CenterView:
77
8b0c4d626477 Party movement
Nomad
parents: 59
diff changeset
9186 __debugbreak();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9187 if ( pEventTimer->bPaused )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9188 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9189 partyAction = (PartyAction)9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9190 goto _add_action_and_continue_;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9191 case INPUT_LookDown:
77
8b0c4d626477 Party movement
Nomad
parents: 59
diff changeset
9192 __debugbreak();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9193 if ( pEventTimer->bPaused )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9194 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9195 partyAction = (PartyAction)8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9196 goto _add_action_and_continue_;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9197 case INPUT_FlyUp:
77
8b0c4d626477 Party movement
Nomad
parents: 59
diff changeset
9198 __debugbreak();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 29
diff changeset
9199 if ( pCurrentScreen
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9200 || pEventTimer->bPaused )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9201 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9202 partyAction = (PartyAction)13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9203 goto _add_action_and_continue_;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9204 case INPUT_Land:
77
8b0c4d626477 Party movement
Nomad
parents: 59
diff changeset
9205 __debugbreak();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 29
diff changeset
9206 if ( pCurrentScreen
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9207 || pEventTimer->bPaused )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9208 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9209 partyAction = (PartyAction)15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9210 goto _add_action_and_continue_;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9211 case INPUT_FlyDown:
77
8b0c4d626477 Party movement
Nomad
parents: 59
diff changeset
9212 __debugbreak();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 29
diff changeset
9213 if ( !pCurrentScreen
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9214 && !pEventTimer->bPaused )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9215 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9216 partyAction = (PartyAction)14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9217 _add_action_and_continue_:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9218 v5 = pActionQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9219 _add_action_and_continue:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9220 v5->Add(partyAction);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9221 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9222 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9223 case INPUT_ZoomIn:
77
8b0c4d626477 Party movement
Nomad
parents: 59
diff changeset
9224 __debugbreak();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9225 if ( dword_50C9E8 >= 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9226 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9227 dword_50C9EC[3 * dword_50C9E8] = 367;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9228 goto LABEL_155;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9229 case INPUT_ZoomOut:
77
8b0c4d626477 Party movement
Nomad
parents: 59
diff changeset
9230 __debugbreak();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9231 if ( dword_50C9E8 < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9232 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9233 dword_50C9EC[3 * dword_50C9E8] = 368;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9234 LABEL_155:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9235 dword_50C9F0[3 * dword_50C9E8] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9236 *(&dword_50C9E8 + 3 * dword_50C9E8 + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9237 ++dword_50C9E8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9238 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9239 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9240 case INPUT_AlwaysRun:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9241 bAlwaysRun = bAlwaysRun == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9242 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9243 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9244 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9245 inputAction = (InputAction)((int)inputAction + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9246 if ( (signed int)inputAction >= 30 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9247 goto LABEL_176;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9248 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9249 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9250 v12 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9251 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9252 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9253 v22 = pKeyActionMap->pVirtualKeyCodesMapping[v12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9254 v13 = pGame->pKeyboardInstance;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9255 if ( pKeyActionMap->pToggleTypes[v12] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9256 v14 = v13->WasKeyPressed(v22);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9257 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9258 v14 = v13->IsKeyBeingHeld(v22);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9259 if ( v14 && v12 == 9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9260 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 29
diff changeset
9261 if ( !pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9262 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9263 if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9264 goto LABEL_175;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9265 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)404;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9266 goto LABEL_174;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9267 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 29
diff changeset
9268 if ( pCurrentScreen == 4
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 29
diff changeset
9269 || pCurrentScreen == 19 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9270 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9271 v15 = pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9272 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9273 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9274 v15 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9275 if ( pMessageQueue_50CBD0->pMessages[0].field_8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9276 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9277 v15 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9278 pMessageQueue_50CBD0->uNumMessages = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9279 goto LABEL_173;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9280 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9281 pMessageQueue_50CBD0->uNumMessages = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9282 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9283 if ( (signed int)v15 >= 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9284 goto LABEL_175;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9285 LABEL_173:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9286 pMessageQueue_50CBD0->pMessages[v15].eType = (UIMessageType)113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9287 LABEL_174:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9288 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9289 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9290 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9291 goto LABEL_175;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9292 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9293 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9294 LABEL_175:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9295 ++v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9296 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9297 while ( v12 < 30 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9298 LABEL_176:
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
9299 if (pGame->pKeyboardInstance->bUsingAsynKeyboard)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9300 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9301 AsyncKeyboard::LeaveCriticalSection();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9302 v16 = pAsyncKeyboard;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9303 AsyncKeyboard::EnterCriticalSection();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9304 memset((char *)v16 + 521, 0, 0x100u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9305 AsyncKeyboard::LeaveCriticalSection();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9306 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9307 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9308