annotate mm7_5.cpp @ 51:4211cceb3813

Merge
author Nomad
date Tue, 23 Oct 2012 23:40:55 +0200
parents fde5c5acb66e 25fabc49627b
children 0f4ed4f0f472 663d5bf032d9
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 #include "Log.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
45
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
46 #include "mm7_data.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
48
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
49
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
50
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
51
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
52
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
53
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
54
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
55
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
56
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
57
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
58
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
59 static char static_sub_417BB5_out_string[1200]; // static to a file, not sub actually
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
61
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
62
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
63 //----- (004304E7) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
64 void __cdecl GameUI_MsgProc()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
65 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
66 signed int v0; // edi@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
67 char *v1; // esi@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
68 unsigned int v2; // edx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
69 Actor *v3; // ecx@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
70 int v4; // ecx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
71 NPCData *v5; // eax@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
72 int v6; // edx@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
73 int v7; // ecx@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
74 unsigned int v8; // edx@59
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
75 unsigned int v9; // ecx@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
76 unsigned int v10; // ecx@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
77 unsigned int v11; // eax@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
78 unsigned __int8 v12; // sf@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
79 unsigned __int8 v13; // of@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
80 int v14; // eax@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
81 unsigned int v15; // eax@102
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
82 unsigned __int8 v16; // al@104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
83 unsigned __int8 v17; // al@105
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
84 int v18; // eax@106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
85 float v19; // ST64_4@121
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
86 unsigned int v20; // ecx@121
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
87 float v21; // ST64_4@126
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
88 float v22; // ST64_4@127
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
89 unsigned int v23; // ecx@135
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
90 unsigned int v24; // ecx@149
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
91 unsigned int v25; // ecx@165
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
92 GUIWindow *v26; // eax@204
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
93 unsigned int v27; // edx@204
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
94 unsigned int v28; // ecx@204
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
95 GUIWindow *v29; // ecx@248
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
96 int v30; // edx@258
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
97 const char *v31; // ecx@262
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
98 signed int v32; // eax@269
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
99 unsigned int v33; // eax@277
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
100 unsigned __int8 v34; // al@279
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
101 unsigned __int8 v35; // al@280
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
102 GUIWindow *v36; // ecx@332
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
103 int v37; // eax@341
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
104 int v38; // eax@358
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
105 SHORT v39; // ax@365
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
106 signed int v40; // eax@365
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
107 char *v41; // eax@380
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
108 int v42; // eax@396
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
109 POINT *v43; // eax@397
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
110 signed int v44; // eax@398
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
111 int v45; // edx@398
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
112 signed int v46; // ecx@398
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
113 char v47; // zf@399
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
114 char v48; // zf@405
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
115 BLVFace *v49; // ecx@410
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
116 ODMFace *v50; // ecx@412
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
117 void *v51; // ecx@415
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
118 void *v52; // eax@424
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
119 __int16 v53; // ax@431
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
120 int v54; // eax@432
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
121 int v55; // ecx@432
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
122 int v56; // edx@432
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
123 int v57; // eax@432
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
124 Player *v58; // edx@442
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
125 unsigned int v59; // eax@445
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
126 signed int v60; // ST64_4@459
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
127 NPCData *v61; // eax@467
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
128 unsigned __int64 v62; // kr00_8@467
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
129 __int16 v63; // dx@479
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
130 unsigned int v64; // eax@486
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
131 int v65; // ecx@486
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
132 int v66; // eax@488
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
133 char *v67; // eax@489
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
134 __int16 v68; // dx@498
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
135 char *v69; // eax@512
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
136 int v70; // eax@525
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
137 int v71; // edi@527
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
138 NPCData *v72; // esi@527
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
139 char *v73; // ecx@533
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
140 signed int v74; // edi@535
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
141 int v75; // eax@535
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
142 int v76; // esi@535
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
143 int v77; // eax@537
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
144 Player *v78; // ecx@549
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
145 int v79; // ecx@550
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
146 unsigned int v80; // edx@550
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
147 signed int v81; // eax@552
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
148 POINT *v82; // eax@553
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
149 signed int v83; // ecx@554
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
150 signed int v84; // ecx@554
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
151 GUIButton *v85; // eax@578
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
152 unsigned int v86; // eax@583
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
153 const char *v87; // ecx@595
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
154 const char *v88; // ecx@596
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
155 unsigned int v89; // eax@598
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
156 unsigned int v90; // eax@602
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
157 int v91; // edx@605
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
158 int v92; // eax@605
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
159 int v93; // edx@605
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
160 int v94; // edx@611
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
161 int v95; // eax@611
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
162 const char *v96; // ecx@621
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
163 unsigned int v97; // eax@624
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
164 int v98; // eax@636
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
165 unsigned __int8 v99; // al@643
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
166 Player *v100; // eax@648
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
167 int v101; // ecx@648
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
168 int v102; // edx@652
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
169 int v103; // eax@671
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
170 Player *v104; // ecx@718
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
171 int v105; // eax@718
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
172 Player *v106; // ST78_4@758
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
173 unsigned int v107; // eax@758
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
174 unsigned int v108; // eax@758
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
175 char *v109; // ST64_4@759
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
176 Player *v110; // ST78_4@759
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
177 int v111; // ST60_4@759
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
178 int v112; // ST5C_4@759
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
179 char *v113; // ST58_4@759
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
180 signed int v114; // eax@759
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
181 unsigned int v115; // eax@764
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
182 int v116; // eax@776
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
183 POINT *v117; // eax@777
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
184 unsigned int v118; // eax@785
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
185 unsigned int v119; // ecx@786
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
186 unsigned int v120; // [sp-28h] [bp-624h]@86
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
187 unsigned int v121; // [sp-28h] [bp-624h]@711
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
188 unsigned int v122; // [sp-24h] [bp-620h]@86
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
189 unsigned int v123; // [sp-24h] [bp-620h]@711
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
190 unsigned int v124; // [sp-20h] [bp-61Ch]@86
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
191 unsigned int v125; // [sp-20h] [bp-61Ch]@711
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
192 unsigned int v126; // [sp-1Ch] [bp-618h]@86
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
193 int v127; // [sp-1Ch] [bp-618h]@107
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
194 unsigned int v128; // [sp-1Ch] [bp-618h]@711
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
195 int v129; // [sp-18h] [bp-614h]@86
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
196 signed int v130; // [sp-18h] [bp-614h]@107
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
197 int v131; // [sp-14h] [bp-610h]@86
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
198 unsigned int v132; // [sp-14h] [bp-610h]@107
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
199 unsigned int v133; // [sp-10h] [bp-60Ch]@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
200 unsigned int v134; // [sp-10h] [bp-60Ch]@86
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
201 signed int v135; // [sp-10h] [bp-60Ch]@107
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
202 unsigned int v136; // [sp-10h] [bp-60Ch]@121
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
203 unsigned int v137; // [sp-Ch] [bp-608h]@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
204 unsigned int v138; // [sp-Ch] [bp-608h]@86
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
205 signed int v139; // [sp-Ch] [bp-608h]@107
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
206 unsigned int v140; // [sp-Ch] [bp-608h]@121
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
207 enum WindowType v141; // [sp-8h] [bp-604h]@56
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
208 enum WindowType v142; // [sp-8h] [bp-604h]@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
209 unsigned __int8 v143; // [sp-8h] [bp-604h]@86
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
210 int v144; // [sp-8h] [bp-604h]@107
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
211 enum WindowType v145; // [sp-8h] [bp-604h]@121
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
212 const char *v146; // [sp-8h] [bp-604h]@449
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
213 unsigned int v147; // [sp-8h] [bp-604h]@550
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
214 int v148; // [sp-4h] [bp-600h]@56
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
215 GUIButton *v149; // [sp-4h] [bp-600h]@59
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
216 const char *v150; // [sp-4h] [bp-600h]@86
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
217 unsigned int v151; // [sp-4h] [bp-600h]@107
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
218 int v152; // [sp-4h] [bp-600h]@121
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
219 int v153; // [sp-4h] [bp-600h]@135
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
220 int v154; // [sp-4h] [bp-600h]@149
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
221 int v155; // [sp-4h] [bp-600h]@165
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
222 int v156; // [sp-4h] [bp-600h]@204
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
223 const char *v157; // [sp-4h] [bp-600h]@444
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
224 unsigned int v158; // [sp-4h] [bp-600h]@449
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
225 __int16 v159; // [sp-4h] [bp-600h]@550
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
226 int v160; // [sp-4h] [bp-600h]@599
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
227 const char *v161; // [sp-4h] [bp-600h]@637
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
228 int v162; // [sp+0h] [bp-5FCh]@56
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
229 int v163; // [sp+0h] [bp-5FCh]@59
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
230 Texture *v164; // [sp+0h] [bp-5FCh]@86
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
231 int v165; // [sp+0h] [bp-5FCh]@107
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
232 int v166; // [sp+0h] [bp-5FCh]@121
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
233 int v167; // [sp+0h] [bp-5FCh]@135
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
234 int v168; // [sp+0h] [bp-5FCh]@149
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
235 int v169; // [sp+0h] [bp-5FCh]@165
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
236 int v170; // [sp+0h] [bp-5FCh]@204
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
237 signed int v171; // [sp+0h] [bp-5FCh]@259
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
238 KeyToggleType v172; // [sp+0h] [bp-5FCh]@287
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
239 char *v173; // [sp+0h] [bp-5FCh]@444
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
240 char *v174; // [sp+0h] [bp-5FCh]@449
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
241 int v175; // [sp+0h] [bp-5FCh]@550
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
242 int v176; // [sp+0h] [bp-5FCh]@599
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
243 const char *v177; // [sp+0h] [bp-5FCh]@629
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
244 char *v178; // [sp+0h] [bp-5FCh]@637
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
245 int v179; // [sp+4h] [bp-5F8h]@0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
246 signed int _this; // [sp+14h] [bp-5E8h]@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
247 signed int thisa; // [sp+14h] [bp-5E8h]@251
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
248 signed int thisb; // [sp+14h] [bp-5E8h]@272
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
249 Player *thisc; // [sp+14h] [bp-5E8h]@373
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
250 Player *thisd; // [sp+14h] [bp-5E8h]@377
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
251 char *thise; // [sp+14h] [bp-5E8h]@445
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
252 Player *thisf; // [sp+14h] [bp-5E8h]@455
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
253 int thisg; // [sp+14h] [bp-5E8h]@467
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
254 int thish; // [sp+14h] [bp-5E8h]@528
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
255 signed int thisi; // [sp+14h] [bp-5E8h]@535
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
256 MapInfo *thisj; // [sp+14h] [bp-5E8h]@604
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
257 Player *thisk; // [sp+14h] [bp-5E8h]@641
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
258 int thisl; // [sp+14h] [bp-5E8h]@648
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
259 int uMessageParam; // [sp+18h] [bp-5E4h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
260 int uAction; // [sp+1Ch] [bp-5E0h]@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
261 NPCData *v195; // [sp+20h] [bp-5DCh]@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
262 unsigned int uNumSeconds; // [sp+24h] [bp-5D8h]@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
263 char v197; // [sp+2Bh] [bp-5D1h]@101
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
264 enum UIMessageType uMessage; // [sp+2Ch] [bp-5D0h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
265 unsigned int v199; // [sp+30h] [bp-5CCh]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
266 char *v200; // [sp+34h] [bp-5C8h]@518
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
267 POINT v201; // [sp+38h] [bp-5C4h]@553
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
268 POINT v202; // [sp+40h] [bp-5BCh]@141
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
269 POINT a2; // [sp+48h] [bp-5B4h]@127
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
270 POINT v204; // [sp+50h] [bp-5ACh]@777
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
271 POINT v205; // [sp+58h] [bp-5A4h]@171
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
272 POINT v206; // [sp+60h] [bp-59Ch]@553
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
273 POINT v207; // [sp+68h] [bp-594h]@155
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
274 POINT v208; // [sp+70h] [bp-58Ch]@397
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
275 POINT v209; // [sp+78h] [bp-584h]@777
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
276 POINT v210; // [sp+80h] [bp-57Ch]@397
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
277 POINT v211; // [sp+88h] [bp-574h]@704
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
278 __int64 v212; // [sp+90h] [bp-56Ch]@467
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
279 char v213; // [sp+98h] [bp-564h]@385
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
280 char pLevelName; // [sp+9Ch] [bp-560h]@380
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
281 char pOut; // [sp+BCh] [bp-540h]@370
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
282 FrameTableTxtLine v216; // [sp+DCh] [bp-520h]@524
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
283 int v217[9]; // [sp+158h] [bp-4A4h]@652
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
284 FrameTableTxtLine v218; // [sp+17Ch] [bp-480h]@524
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
285 char a1[64]; // [sp+1F8h] [bp-404h]@467
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
286 char Str2[128]; // [sp+238h] [bp-3C4h]@527
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
287 Actor actor; // [sp+2B8h] [bp-344h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
288
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
289 dword_50CDC8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
290 if ( !pEventTimer->bPaused )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
291 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
292 pParty->sEyelevel = pParty->uDefaultEyelevel;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
293 pParty->uPartyHeight = pParty->uDefaultPartyHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
294 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
295 if ( bDialogueUI_InitializeActor_NPC_ID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
296 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
297 //Actor::Actor(&actor);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
298 memset(&actor, 0, 0x344u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
299 dword_5B65D0_dialogue_actor_npc_id = bDialogueUI_InitializeActor_NPC_ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
300 actor.uNPC_ID = bDialogueUI_InitializeActor_NPC_ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
301 actor.InitializeDialogue(0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
302 bDialogueUI_InitializeActor_NPC_ID = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
303 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
304 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
305 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
306 v0 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
307 v1 = nullstring;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
308 while ( 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
309 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
310 pMessageQueue_50CBD0->PopMessage(&uMessage, &uMessageParam, (int *)&v199);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
311 switch ( uMessage )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
312 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
313 case UIMSG_ChangeGameState:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
314 uGameState = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
315 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
316 case UIMSG_PlayArcomage:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
317 pVideoPlayer->_4BF5B2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
318 pArcomageGame->bGameInProgress = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
319 PrepareArcomage();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
320 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
321 case UIMSG_StartNPCDialogue:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
322 if ( !uActiveCharacter )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
323 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
324 viewparams->field_48 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
325 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
326 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
327 dword_5B65D0_dialogue_actor_npc_id = pActors[uMessageParam].uNPC_ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
328 v3 = &pActors[uMessageParam];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
329 goto _actor_init_dlg;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
330 case UIMSG_Quit|0x2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
331 case 0x87:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
332 if ( bNoNPCHiring != 1
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
333 && !pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
334 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
335 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
336 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
337 uAction = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
338 uNumSeconds = uMessage - 134;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
339 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
340 v5 = pParty->pHirelings;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
341 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
342 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
343 if ( v5->pName )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
344 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
345 v6 = uAction++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
346 pTmpBuf[v6] = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
347 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
348 ++v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
349 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
350 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
351 while ( (signed int)v5 < (signed int)&pParty->pPickedItem );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
352 _this = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
353 if ( (signed int)pNPCStats->uNumNewNPCs > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
354 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
355 v195 = pNPCStats->pNewNPCData;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
356 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
357 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
358 if ( v195->uFlags & 0x80
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
359 && (!pParty->pHirelings[0].pName || strcmp(v195->pName, pParty->pHirelings[0].pName))
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
360 && (!pParty->pHirelings[1].pName || strcmp(v195->pName, pParty->pHirelings[1].pName)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
361 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
362 v7 = uAction++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
363 pTmpBuf[v7] = _this + 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
364 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
365 ++_this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
366 ++v195;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
367 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
368 while ( _this < (signed int)pNPCStats->uNumNewNPCs );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
369 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
370 if ( (signed int)(uNumSeconds + (unsigned __int8)pParty->field_709) < uAction )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
371 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
372 //Actor::Actor(&actor);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
373 memset(&actor, 0, 0x344u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
374 actor.uNPC_ID += -1 - (unsigned __int8)pParty->field_709 - uNumSeconds;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
375 v3 = &actor;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
376 _actor_init_dlg:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
377 v3->InitializeDialogue(v0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
378 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
379 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
380 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
381 case 0x51:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
382 sub_4BDB56_buy_skill____();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
383 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
384 case UIMSG_AF:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
385 sub_4B2001(uMessageParam);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
386 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
387 case 0x195:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
388 sub_4BCACC_bounties(uMessageParam);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
389 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
390 case 0x88:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
391 sub_4BC49B(uMessageParam);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
392 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
393 case 0x19A:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
394 _4B4224_UpdateNPCTopics(uMessageParam);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
395 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
396 case UIMSG_StartNewGame:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
397 if ( dword_6BE138 == 124 || uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
398 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
399 pIcons_LOD->_40F9C5();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
400 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
401 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
402 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
403 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
404 uGameState = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
405 LABEL_188:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
406 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
407 viewparams->bRedrawGameUI = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
408 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
409 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
410 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
411 ShowStatusBarString(pGlobalTXT_LocalizationStrings[201], 2u);// "Are you sure? Click again to start a New Game"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
412 pAudioPlayer->PlaySound(SOUND_20001, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
413 dword_6BE138 = 124;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
414 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
415 _release_tex_and_continue:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
416 stru_506E40.Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
417 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
418 case UIMSG_Game_OpenLoadGameDialog:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
419 pIcons_LOD->_40F9C5();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
420 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
421 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
422 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
423 pGUIWindow_CurrentMenu->Release();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
424 pCurrentScreen = 12;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
425 GameUI_DrawLoadMenu(v0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
426 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
427 case UIMSG_Quit:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
428 if ( dword_6BE138 == 132 || uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
429 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
430 pIcons_LOD->_40F9C5();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
431 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
432 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
433 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
434 pGUIWindow_CurrentMenu->Release();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
435 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
436 viewparams->bRedrawGameUI = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
437 if ( !uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
438 pAudioPlayer->PlaySound((SoundID)(SOUND_EnteringAHouse|0x1), 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
439 uGameState = 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
440 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
441 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
442 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
443 ShowStatusBarString(pGlobalTXT_LocalizationStrings[82], 2u);// "Are you sure? Click again to quit"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
444 pAudioPlayer->PlaySound(SOUND_20001, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
445 dword_6BE138 = 132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
446 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
447 goto _release_tex_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
448 case 0x80:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
449 pIcons_LOD->_40F9C5();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
450 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
451 pGUIWindow_CurrentMenu->Release();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
452 pCurrentScreen = 2;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
453 v162 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
454 v148 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
455 v141 = (WindowType)8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
456 goto LABEL_439;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
457 case UIMSG_A2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
458 --dword_6A0C9C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
459 if ( dword_6A0C9C < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
460 dword_6A0C9C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
461 v163 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
462 v8 = 199;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
463 v149 = ptr_69BD5C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
464 goto LABEL_60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
465 case UIMSG_A3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
466 ++dword_6A0C9C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
467 if ( dword_6A0C9C >= uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
468 dword_6A0C9C = uMessageParam - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
469 v163 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
470 v8 = 323;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
471 v149 = ptr_69BD58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
472 LABEL_60:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
473 v142 = (WindowType)90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
474 v137 = 17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
475 v133 = 17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
476 v9 = 215;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
477 goto LABEL_733;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
478 case UIMSG_A6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
479 v163 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
480 v8 = 302;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
481 v149 = ptr_69BD60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
482 v9 = 350;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
483 v142 = (WindowType)96;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
484 v137 = 42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
485 v133 = 106;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
486 goto LABEL_733;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
487 case UIMSG_A4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
488 v163 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
489 v8 = 302;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
490 v149 = ptr_69BD64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
491 v9 = 241;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
492 v142 = (WindowType)94;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
493 v137 = 42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
494 v133 = 106;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
495 goto LABEL_733;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
496 case UIMSG_A5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
497 if ( pGUIWindow_CurrentMenu->field_40 == v0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
498 pKeyActionMap->_459ED1(0);
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
499 if ( pCurrentScreen != 11
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
500 || uLoadGameUI_SelectedSlot != dword_6A0C9C + uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
501 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
502 v10 = dword_6A0C9C + uMessageParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
503 if ( dword_6BE138 == dword_6A0C9C + uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
504 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
505 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
506 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
507 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)164;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
508 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
509 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
510 v11 = pMessageQueue_50CBD0->uNumMessages + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
511 v13 = __OFSUB__(pMessageQueue_50CBD0->uNumMessages + 1, 40);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
512 v12 = (signed int)pMessageQueue_50CBD0->uNumMessages - 39 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
513 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
514 if ( v12 ^ v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
515 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
516 pMessageQueue_50CBD0->pMessages[v11].eType = (UIMessageType)82;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
517 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
518 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
519 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
520 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
521 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
522 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
523 uLoadGameUI_SelectedSlot = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
524 dword_6BE138 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
525 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
526 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
527 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
528 pKeyActionMap->_459E5A(0, 19, pGUIWindow_CurrentMenu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
529 if ( strcmp(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
530 (const char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
531 pGlobalTXT_LocalizationStrings[72]) )// "Empty"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
532 strcpy(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
533 (char *)pKeyActionMap->pPressedKeysBuffer,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
534 (const char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
535 pKeyActionMap->uNumKeysPressed = strlen((const char *)pKeyActionMap->pPressedKeysBuffer);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
536 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
537 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
538 case UIMSG_LoadGame:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
539 if ( pSavegameUsedSlots[uLoadGameUI_SelectedSlot] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
540 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
541 LoadGame(uLoadGameUI_SelectedSlot);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
542 uGameState = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
543 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
544 goto _release_tex_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
545 case UIMSG_SaveGame:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
546 if ( pGUIWindow_CurrentMenu->field_40 == v0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
547 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
548 pKeyActionMap->_459ED1(0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
549 strcpy(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
550 (char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
551 (const char *)pKeyActionMap->pPressedKeysBuffer);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
552 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
553 DoSavegame(uLoadGameUI_SelectedSlot);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
554 goto _release_tex_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
555 case UIMSG_StartNewGame|0x2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
556 pGUIWindow_CurrentMenu->Release();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
557 pCurrentScreen = 11;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
558 GameUI_DrawSaveMenu();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
559 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
560 case UIMSG_Game_OpenOptionsDialog:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
561 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
562 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
563 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
564 viewparams->field_48 = v0;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
565 pCurrentScreen = 2;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
566 uTextureID_507C60 = pIcons_LOD->LoadTexture("ControlBG", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
567 uTextureID_507C6C = pIcons_LOD->LoadTexture("con_16x", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
568 uTextureID_507C68 = pIcons_LOD->LoadTexture("con_32x", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
569 uTextureID_507C70 = pIcons_LOD->LoadTexture("con_ArrL", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
570 uTextureID_507C74 = pIcons_LOD->LoadTexture("con_ArrR", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
571 uTextureID_507C64[0] = pIcons_LOD->LoadTexture("con_Smoo", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
572 pTextureIDs_SoundLevels[9] = pIcons_LOD->LoadTexture("convol00", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
573 pTextureIDs_SoundLevels[0] = pIcons_LOD->LoadTexture("convol10", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
574 pTextureIDs_SoundLevels[1] = pIcons_LOD->LoadTexture("convol20", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
575 pTextureIDs_SoundLevels[2] = pIcons_LOD->LoadTexture("convol30", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
576 pTextureIDs_SoundLevels[3] = pIcons_LOD->LoadTexture("convol40", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
577 pTextureIDs_SoundLevels[4] = pIcons_LOD->LoadTexture("convol50", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
578 pTextureIDs_SoundLevels[5] = pIcons_LOD->LoadTexture("convol60", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
579 pTextureIDs_SoundLevels[6] = pIcons_LOD->LoadTexture("convol70", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
580 pTextureIDs_SoundLevels[7] = pIcons_LOD->LoadTexture("convol80", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
581 pTextureIDs_SoundLevels[8] = pIcons_LOD->LoadTexture("convol90", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
582 uTextureID_507C84 = pIcons_LOD->LoadTexture("option04", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
583 uTextureID_507CB0 = pIcons_LOD->LoadTexture("option03", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
584 uTextureID_507CB8 = pIcons_LOD->LoadTexture("option02", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
585 uTextureID_507CB4 = pIcons_LOD->LoadTexture("option01", TEXTURE_16BIT_PALETTE);
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
586 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Options, 0, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
587 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
588 0x16u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
589 0x10Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
590 (uTextureID_507C6C != -1 ? pIcons_LOD->pTextures[uTextureID_507C6C].uTextureWidth : 24),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
591 (uTextureID_507C6C != -1 ? pIcons_LOD->pTextures[uTextureID_507C6C].uTextureHeight : 26),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
592 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
593 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
594 0xB8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
595 0x80u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
596 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
597 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
598 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
599 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
600 0x5Du,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
601 0x10Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
602 (uTextureID_507C68 != -1 ? pIcons_LOD->pTextures[uTextureID_507C68].uTextureWidth : 24),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
603 (uTextureID_507C68 != -1 ? pIcons_LOD->pTextures[uTextureID_507C68].uTextureHeight : 26),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
604 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
605 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
606 0xB8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
607 0x40u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
608 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
609 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
610 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
611 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
612 0xA4u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
613 0x10Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
614 (uTextureID_507C64[0] != -1 ? pIcons_LOD->pTextures[uTextureID_507C64[0]].uTextureWidth : 24),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
615 (uTextureID_507C64[0] != -1 ? pIcons_LOD->pTextures[uTextureID_507C64[0]].uTextureHeight : 26),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
616 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
617 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
618 0xB8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
619 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
620 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
621 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
622 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
623 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
624 0x14u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
625 0x12Fu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
626 (uTextureID_507CB4 != -1 ? pIcons_LOD->pTextures[uTextureID_507CB4].uTextureWidth : 24),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
627 (uTextureID_507CB4 != -1 ? pIcons_LOD->pTextures[uTextureID_507CB4].uTextureHeight : 26),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
628 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
629 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
630 0xB9u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
631 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
632 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
633 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
634 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
635 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
636 0x80u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
637 0x12Fu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
638 (uTextureID_507CB8 != -1 ? pIcons_LOD->pTextures[uTextureID_507CB8].uTextureWidth : 24),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
639 (uTextureID_507CB8 != -1 ? pIcons_LOD->pTextures[uTextureID_507CB8].uTextureHeight : 26),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
640 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
641 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
642 0xBBu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
643 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
644 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
645 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
646 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
647 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
648 0x14u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
649 0x145u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
650 (uTextureID_507CB0 != -1 ? pIcons_LOD->pTextures[uTextureID_507CB0].uTextureWidth : 24),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
651 (uTextureID_507CB0 != -1 ? pIcons_LOD->pTextures[uTextureID_507CB0].uTextureHeight : 26),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
652 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
653 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
654 0xE1u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
655 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
656 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
657 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
658 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
659 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
660 0x80u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
661 0x145u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
662 (uTextureID_507C84 != -1 ? pIcons_LOD->pTextures[uTextureID_507C84].uTextureWidth : 24),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
663 (uTextureID_507C84 != -1 ? pIcons_LOD->pTextures[uTextureID_507C84].uTextureHeight : 26),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
664 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
665 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
666 0xE2u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
667 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
668 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
669 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
670 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
671 ptr_50C9CC = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
672 243u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
673 162u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
674 16u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
675 16u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
676 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
677 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
678 111u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
679 4u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
680 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
681 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
682 &pIcons_LOD->pTextures[uTextureID_507C70],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
683 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
684 ptr_50C9C8 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
685 0x1B3u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
686 0xA2u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
687 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
688 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
689 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
690 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
691 0x6Fu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
692 5u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
693 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
694 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
695 &pIcons_LOD->pTextures[uTextureID_507C74],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
696 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
697 pGUIWindow_CurrentMenu->CreateButton(0x107u, 0xA2u, 0xACu, 0x11u, v0, 0, 0x6Fu, 0, 0, v1, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
698 ptr_50C9CC = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
699 0xF3u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
700 0xD8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
701 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
702 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
703 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
704 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
705 0x70u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
706 4u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
707 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
708 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
709 &pIcons_LOD->pTextures[uTextureID_507C70],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
710 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
711 ptr_50C9C8 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
712 0x1B3u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
713 0xD8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
714 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
715 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
716 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
717 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
718 0x70u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
719 5u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
720 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
721 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
722 &pIcons_LOD->pTextures[uTextureID_507C74],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
723 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
724 pGUIWindow_CurrentMenu->CreateButton(0x107u, 0xD8u, 0xACu, 0x11u, v0, 0, 0x70u, 0, 0, v1, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
725 ptr_50C9CC = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
726 0xF3u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
727 0x10Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
728 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
729 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
730 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
731 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
732 0xBAu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
733 4u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
734 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
735 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
736 &pIcons_LOD->pTextures[uTextureID_507C70],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
737 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
738 ptr_50C9C8 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
739 0x1B3u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
740 0x10Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
741 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
742 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
743 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
744 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
745 0xBAu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
746 5u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
747 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
748 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
749 &pIcons_LOD->pTextures[uTextureID_507C74],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
750 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
751 pGUIWindow_CurrentMenu->CreateButton(0x107u, 0x10Eu, 0xACu, 0x11u, v0, 0, 0xBAu, 0, 0, v1, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
752 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
753 0xF1u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
754 0x12Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
755 0xD6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
756 0x28u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
757 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
758 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
759 0x71u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
760 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
761 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
762 pGlobalTXT_LocalizationStrings[619],// "Return to Game"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
763 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
764 pGUIWindow_CurrentMenu->CreateButton(0x13u, 0x8Cu, 0xD6u, 0x28u, v0, 0, 0x19Fu, 0, 0x4Bu, v1, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
765 v164 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
766 v150 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
767 v143 = 86;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
768 v138 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
769 v134 = 421;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
770 v131 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
771 v129 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
772 v126 = 40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
773 v124 = 214;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
774 v122 = 194;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
775 v120 = 19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
776 goto LABEL_117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
777 case UIMSG_OpenKeyMappingOptions:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
778 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
779 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
780 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
781 viewparams->field_48 = 1;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
782 pCurrentScreen = 26;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
783 uTextureID_507BF4 = pIcons_LOD->LoadTexture("optkb", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
784 uTextureID_507BF8 = pIcons_LOD->LoadTexture("optkb_h", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
785 uTextureID_507BFC = pIcons_LOD->LoadTexture("resume1", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
786 uTextureID_507C00 = pIcons_LOD->LoadTexture("optkb_1", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
787 uTextureID_507C04 = pIcons_LOD->LoadTexture("optkb_2", TEXTURE_16BIT_PALETTE);
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
788 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_KeyMappingOptions, 0, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
789 pGUIWindow_CurrentMenu->CreateButton(0xF1u, 0x12Eu, 0xD6u, 0x28u, 1, 0, 0x71u, 0, 0, nullstring, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
790 pGUIWindow_CurrentMenu->CreateButton(19u, 0x12Eu, 0x6Cu, 0x14u, 1, 0, 0x1A0u, 0, 0, nullstring, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
791 pGUIWindow_CurrentMenu->CreateButton(127u, 0x12Eu, 0x6Cu, 0x14u, 1, 0, 0x1A1u, 0, 0, nullstring, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
792 pGUIWindow_CurrentMenu->CreateButton(127u, 0x144u, 0x6Cu, 0x14u, 1, 0, 0x1A2u, 0, 0, nullstring, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
793 pGUIWindow_CurrentMenu->CreateButton(19u, 0x144u, 0x6Cu, 0x14u, 1, 0, 0x7Fu, 0, 0, nullstring, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
794 pGUIWindow_CurrentMenu->CreateButton(129u, 0x94u, 0x46u, 0x13u, 1, 0, 0x1A3u, 0, 0, nullstring, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
795 pGUIWindow_CurrentMenu->CreateButton(129u, 0xA7u, 0x46u, 0x13u, 1, 0, 0x1A3u, 1u, 0, nullstring, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
796 pGUIWindow_CurrentMenu->CreateButton(129u, 0xBAu, 0x46u, 0x13u, 1, 0, 0x1A3u, 2u, 0, nullstring, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
797 pGUIWindow_CurrentMenu->CreateButton(129u, 0xCDu, 0x46u, 0x13u, 1, 0, 0x1A3u, 3u, 0, nullstring, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
798 pGUIWindow_CurrentMenu->CreateButton(129u, 224u, 70u, 19u, 1, 0, 0x1A3u, 4u, 0, nullstring, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
799 pGUIWindow_CurrentMenu->CreateButton(129u, 243u, 70u, 0x13u, 1, 0, 0x1A3u, 5u, 0, nullstring, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
800 pGUIWindow_CurrentMenu->CreateButton(129u, 262u, 70u, 0x13u, 1, 0, 0x1A3u, 6u, 0, nullstring, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
801 pGUIWindow_CurrentMenu->CreateButton(350u, 148u, 70u, 0x13u, 1, 0, 0x1A3u, 7u, 0, nullstring, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
802 pGUIWindow_CurrentMenu->CreateButton(350u, 167u, 70u, 0x13u, 1, 0, 0x1A3u, 8u, 0, nullstring, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
803 pGUIWindow_CurrentMenu->CreateButton(350u, 186u, 70u, 0x13u, 1, 0, 0x1A3u, 9u, 0, nullstring, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
804 pGUIWindow_CurrentMenu->CreateButton(350u, 205u, 70u, 0x13u, 1, 0, 0x1A3u, 0xAu, 0, nullstring, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
805 pGUIWindow_CurrentMenu->CreateButton(350u, 224u, 70u, 0x13u, 1, 0, 0x1A3u, 0xBu, 0, nullstring, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
806 pGUIWindow_CurrentMenu->CreateButton(350u, 243u, 70u, 0x13u, 1, 0, 0x1A3u, 0xCu, 0, nullstring, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
807 pGUIWindow_CurrentMenu->CreateButton(350u, 262u, 70u, 0x13u, 1, 0, 0x1A3u, 0xDu, 0, nullstring, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
808 dword_506E68 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
809 dword_506F08 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
810 memset(word_506E6C, 0, 0x1Cu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
811 word_506E6C[14] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
812 memcpy(pPrevVirtualCidesMapping, pKeyActionMap->pVirtualKeyCodesMapping, 0x78u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
813 goto LABEL_90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
814 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
815 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
816 case UIMSG_ResetKeyMapping|0x1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
817 if ( dword_506E68 != -1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
818 goto LABEL_623;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
819 v14 = uMessageParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
820 if ( dword_506F08 != v0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
821 v14 = uMessageParam + 14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
822 dword_506E68 = v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
823 pKeyActionMap->_459E5A(0, v0, pGUIWindow_CurrentMenu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
824 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
825 case UIMSG_ResetKeyMapping:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
826 v197 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
827 pKeyActionMap->SetDefaultMapping();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
828 uAction = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
829 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
830 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
831 v15 = pKeyActionMap->GetActionVKey((enum InputAction)uAction);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
832 if ( v15 != pPrevVirtualCidesMapping[uAction] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
833 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
834 if ( v197 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
835 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
836 v16 = pKeyActionMap->GetActionVKey((enum InputAction)uAction);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
837 GUI_ReplaceHotkey(LOBYTE(pPrevVirtualCidesMapping[uAction]), v16, v0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
838 v197 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
839 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
840 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
841 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
842 v17 = pKeyActionMap->GetActionVKey((enum InputAction)uAction);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
843 GUI_ReplaceHotkey(LOBYTE(pPrevVirtualCidesMapping[uAction]), v17, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
844 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
845 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
846 pPrevVirtualCidesMapping[uAction] = pKeyActionMap->GetActionVKey(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
847 (enum InputAction)uAction);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
848 v18 = uAction++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
849 v13 = __OFSUB__(uAction, 28);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
850 v12 = uAction - 28 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
851 *((char *)word_506E6C + v18) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
852 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
853 while ( v12 ^ v13 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
854 v165 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
855 v151 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
856 v144 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
857 v139 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
858 v135 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
859 v132 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
860 v130 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
861 v127 = 219;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
862 goto _play_sound_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
863 case 0x1A0:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
864 dword_506F08 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
865 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
866 case UIMSG_StartNPCDialogue|0x100:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
867 dword_506F08 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
868 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
869 case UIMSG_OpenVideoOptions:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
870 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
871 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
872 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
873 viewparams->field_48 = v0;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
874 pCurrentScreen = 28;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
875 uTextureID_507C10 = pIcons_LOD->LoadTexture("optvid", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
876 uTextureID_507C14 = pIcons_LOD->LoadTexture("opvdH-bs", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
877 uTextureID_507C18 = pIcons_LOD->LoadTexture("opvdH-cl", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
878 uTextureID_507C1C = pIcons_LOD->LoadTexture("opvdH-tn", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
879 uTextureID_507C20 = pIcons_LOD->LoadTexture("con_ArrL", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
880 uTextureID_507C24 = pIcons_LOD->LoadTexture("con_ArrR", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
881 pTextureIDs_GammaPositions[0] = pIcons_LOD->LoadTexture("convol10", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
882 pTextureIDs_GammaPositions[1] = pIcons_LOD->LoadTexture("convol20", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
883 pTextureIDs_GammaPositions[2] = pIcons_LOD->LoadTexture("convol30", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
884 pTextureIDs_GammaPositions[3] = pIcons_LOD->LoadTexture("convol40", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
885 pTextureIDs_GammaPositions[4] = pIcons_LOD->LoadTexture("convol50", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
886 pTextureIDs_GammaPositions[5] = pIcons_LOD->LoadTexture("convol60", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
887 pTextureIDs_GammaPositions[6] = pIcons_LOD->LoadTexture("convol70", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
888 pTextureIDs_GammaPositions[7] = pIcons_LOD->LoadTexture("convol80", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
889 pTextureIDs_GammaPositions[8] = pIcons_LOD->LoadTexture("convol90", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
890 pTextureIDs_GammaPositions[9] = pIcons_LOD->LoadTexture("convol00", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
891 uTextureID_507C50 = pIcons_LOD->LoadTexture("opvdG-bs", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
892 uTextureID_507C54 = pIcons_LOD->LoadTexture("opvdG-cl", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
893 uTextureID_507C58 = pIcons_LOD->LoadTexture("opvdG-tn", TEXTURE_16BIT_PALETTE);
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
894 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_VideoOptions, 0, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
895 pGUIWindow_CurrentMenu->CreateButton(0xF1u, 0x12Eu, 0xD6u, 0x28u, v0, 0, 0x71u, 0, 0, v1, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
896 if ( pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
897 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
898 pGUIWindow_CurrentMenu->CreateButton(0x13u, 0x118u, 0xD6u, 0x12u, v0, 0, 0x1A6u, 0, 0, v1, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
899 pGUIWindow_CurrentMenu->CreateButton(0x13u, 0x12Eu, 0xD6u, 0x12u, v0, 0, 0x1A7u, 0, 0, v1, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
900 pGUIWindow_CurrentMenu->CreateButton(0x13u, 0x144u, 0xD6u, 0x12u, v0, 0, 0x1A8u, 0, 0, v1, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
901 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
902 if ( !pRenderer->bWindowMode )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
903 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
904 v0 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
905 if ( GammaController::IsGammaSupported() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
906 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
907 ptr_50C9CC = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
908 0x15u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
909 0xA1u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
910 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
911 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
912 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
913 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
914 0x1A9u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
915 4u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
916 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
917 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
918 &pIcons_LOD->pTextures[uTextureID_507C20],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
919 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
920 ptr_50C9C8 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
921 0xD5u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
922 0xA1u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
923 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
924 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
925 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
926 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
927 0x1A9u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
928 5u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
929 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
930 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
931 &pIcons_LOD->pTextures[uTextureID_507C24],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
932 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
933 v164 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
934 v150 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
935 v143 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
936 v138 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
937 v134 = 425;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
938 v131 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
939 v129 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
940 v126 = 18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
941 v124 = 170;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
942 v122 = 162;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
943 v120 = 42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
944 LABEL_117:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
945 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
946 v120,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
947 v122,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
948 v124,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
949 v126,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
950 v129,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
951 v131,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
952 v134,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
953 v138,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
954 v143,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
955 v150,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
956 v164);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
957 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
958 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
959 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
960 case UIMSG_ToggleTint|0x1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
961 if ( uMessageParam == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
962 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
963 --uGammaPos;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
964 if ( (uGammaPos & 0x80000000u) != 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
965 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
966 uGammaPos = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
967 goto LABEL_128;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
968 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
969 v19 = (double)(signed int)uGammaPos * 0.1 + 0.6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
970 pGame->pGammaController->Initialize(v19);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
971 v166 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
972 v152 = (int)ptr_50C9CC;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
973 v145 = (WindowType)90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
974 v140 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
975 v136 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
976 v20 = 21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
977 goto LABEL_122;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
978 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
979 if ( uMessageParam == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
980 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
981 ++uGammaPos;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
982 if ( (signed int)uGammaPos <= 9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
983 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
984 v21 = (double)(signed int)uGammaPos * 0.1 + 0.6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
985 pGame->pGammaController->Initialize(v21);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
986 v20 = 213;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
987 v166 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
988 v152 = (int)ptr_50C9C8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
989 v145 = (WindowType)90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
990 v140 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
991 v136 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
992 LABEL_122:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
993 GUIWindow::Create(v20, 0xA1u, v136, v140, v145, v152, v166);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
994 goto LABEL_128;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
995 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
996 uGammaPos = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
997 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
998 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
999 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1000 uGammaPos = (pMouse->GetCursorPos(&a2)->x - 42) / 17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1001 v22 = (double)(signed int)uGammaPos * 0.1 + 0.6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1002 pGame->pGammaController->Initialize(v22);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1003 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1004 LABEL_128:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1005 v165 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1006 v151 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1007 v144 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1008 v139 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1009 v135 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1010 v132 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1011 v130 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1012 v127 = 21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1013 goto _play_sound_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1014 case UIMSG_ToggleBloodsplats:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1015 pGame->ToggleFlags2(0x20u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1016 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1017 case UIMSG_ToggleColoredLights:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1018 pRenderer->bUseColoredLights = pRenderer->bUseColoredLights == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1019 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1020 case UIMSG_ToggleTint:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1021 pRenderer->bTinting = pRenderer->bTinting == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1022 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1023 case UIMSG_ChangeMusicVolume:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1024 if ( uMessageParam == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1025 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1026 --uMusicVolimeMultiplier;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1027 if ( (char)uMusicVolimeMultiplier < 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1028 uMusicVolimeMultiplier = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1029 v167 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1030 v23 = 243;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1031 v153 = (int)ptr_50C9CC;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1032 LABEL_136:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1033 GUIWindow::Create(v23, 0xD8u, 0, 0, (enum WindowType)90, v153, v167);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1034 goto LABEL_143;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1035 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1036 if ( uMessageParam == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1037 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1038 ++uMusicVolimeMultiplier;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1039 if ( (char)uMusicVolimeMultiplier > 9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1040 uMusicVolimeMultiplier = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1041 v167 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1042 v23 = 435;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1043 v153 = (int)ptr_50C9C8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1044 goto LABEL_136;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1045 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1046 uMusicVolimeMultiplier = (pMouse->GetCursorPos(&v202)->x - 263) / 17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1047 if ( (char)uMusicVolimeMultiplier > 9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1048 uMusicVolimeMultiplier = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1049 LABEL_143:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1050 if ( uMusicVolimeMultiplier )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1051 pAudioPlayer->PlaySound(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1052 SOUND_Bell,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1053 -1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1054 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1055 -1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1056 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1057 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1058 (signed __int64)(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1059 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1060 pAudioPlayer->SetMusicVolume(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1061 (signed __int64)(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1062 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1063 case UIMSG_ChangeSoundVolume:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1064 if ( uMessageParam == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1065 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1066 --uSoundVolumeMultiplier;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1067 if ( (char)uSoundVolumeMultiplier < 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1068 uSoundVolumeMultiplier = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1069 v168 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1070 v24 = 243;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1071 v154 = (int)ptr_50C9CC;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1072 LABEL_150:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1073 GUIWindow::Create(v24, 0xA2u, 0, 0, (enum WindowType)90, v154, v168);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1074 goto LABEL_157;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1075 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1076 if ( uMessageParam == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1077 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1078 ++uSoundVolumeMultiplier;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1079 if ( (char)uSoundVolumeMultiplier > 8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1080 uSoundVolumeMultiplier = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1081 v168 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1082 v24 = 435;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1083 v154 = (int)ptr_50C9C8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1084 goto LABEL_150;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1085 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1086 uSoundVolumeMultiplier = (pMouse->GetCursorPos(&v207)->x - 263) / 17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1087 if ( (char)uSoundVolumeMultiplier > 8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1088 uSoundVolumeMultiplier = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1089 LABEL_157:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1090 pAudioPlayer->SetMasterVolume(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1091 (signed __int64)(pSoundVolumeLevels[(char)uSoundVolumeMultiplier] * 128.0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1092 v165 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1093 v151 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1094 v144 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1095 v139 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1096 v135 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1097 v132 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1098 v130 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1099 v127 = 218;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1100 goto _play_sound_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1101 case UIMSG_ToggleFlipOnExit:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1102 bFlipOnExit = bFlipOnExit == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1103 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1104 case UIMSG_ToggleAlwaysRun:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1105 bAlwaysRun = bAlwaysRun == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1106 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1107 case UIMSG_ToggleWalkSound:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1108 bWalkSound = bWalkSound == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1109 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1110 case UIMSG_ToggleShowDamage:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1111 bShowDamage = bShowDamage == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1112 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1113 case UIMSG_ChangeVoiceVolume:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1114 if ( uMessageParam == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1115 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1116 --uVoicesVolumeMultiplier;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1117 if ( (char)uVoicesVolumeMultiplier < 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1118 uVoicesVolumeMultiplier = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1119 v169 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1120 v25 = 243;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1121 v155 = (int)ptr_50C9CC;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1122 LABEL_166:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1123 GUIWindow::Create(v25, 0x10Eu, 0, 0, (enum WindowType)90, v155, v169);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1124 goto LABEL_173;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1125 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1126 if ( uMessageParam == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1127 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1128 ++uVoicesVolumeMultiplier;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1129 if ( (char)uVoicesVolumeMultiplier > 8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1130 uVoicesVolumeMultiplier = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1131 v169 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1132 v25 = 435;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1133 v155 = (int)ptr_50C9C8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1134 goto LABEL_166;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1135 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1136 uVoicesVolumeMultiplier = (pMouse->GetCursorPos(&v205)->x - 263) / 17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1137 if ( (char)uVoicesVolumeMultiplier > 8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1138 uVoicesVolumeMultiplier = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1139 LABEL_173:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1140 if ( !uVoicesVolumeMultiplier )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1141 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1142 v165 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1143 v151 = (signed __int64)(pSoundVolumeLevels[(char)uVoicesVolumeMultiplier] * 128.0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1144 v144 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1145 v139 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1146 v135 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1147 v132 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1148 v130 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1149 v127 = 5788;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1150 goto _play_sound_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1151 case UIMSG_SetTurnSpeed:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1152 if ( uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1153 pParty->sRotationY = uMessageParam * pParty->sRotationY / uMessageParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1154 uTurnSpeed = uMessageParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1155 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1156 case UIMSG_SetGraphicsMode:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1157 if ( !bUseLoResSprites )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1158 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1159 byte_6BE388_graphicsmode = uMessageParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1160 LABEL_184:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1161 MM7Initialization();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1162 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1163 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1164 if ( uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1165 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1166 if ( uMessageParam == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1167 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1168 byte_6BE388_graphicsmode = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1169 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1170 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1171 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1172 if ( uMessageParam != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1173 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1174 byte_6BE388_graphicsmode = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1175 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1176 goto LABEL_184;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1177 }
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
1178 ModalWindow(pNPCTopics[453].pText, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1179 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1180 case UIMSG_SkillUp|0x2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1181 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1182 pEventTimer->Resume();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1183 goto LABEL_188;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1184 case UIMSG_OpenQuestBook:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1185 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1186 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1187 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1188 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1189 pEventTimer->Pause();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1190 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1191 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1192 ptr_507BE0 = GUIWindow::Create(493u, 355u, 0, 0, (enum WindowType)99, (int)ptr_507A10, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1193 bFlashQuestBook = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1194 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1195 case UIMSG_OpenAutonotes:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1196 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1197 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1198 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1199 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1200 pEventTimer->Pause();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1201 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1202 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1203 ptr_507BE0 = GUIWindow::Create(527u, 353u, 0, 0, (enum WindowType)99, (int)ptr_507A0C, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1204 bFlashAutonotesBook = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1205 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1206 case UIMSG_OpenMapBook:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1207 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1208 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1209 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1210 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1211 pEventTimer->Pause();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1212 viewparams->sPartyPosX = pParty->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1213 viewparams->sPartyPosZ = pParty->vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1214 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1215 v26 = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1216 v27 = 353;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1217 v28 = 546;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1218 v170 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1219 v156 = (int)ptr_507A08;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1220 goto LABEL_210;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1221 case UIMSG_OpenCalendar:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1222 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1223 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1224 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1225 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1226 pEventTimer->Pause();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1227 pAudioPlayer->StopChannels(-1, -1);
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
1228 v26 = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, uMessage, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1229 v27 = 354;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1230 v28 = 570;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1231 v170 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1232 v156 = (int)dword_507A04;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1233 LABEL_210:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1234 pGUIWindow_CurrentMenu = v26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1235 ptr_507BE0 = GUIWindow::Create(v28, v27, 0, 0, (enum WindowType)99, v156, v170);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1236 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1237 case UIMSG_OpenHistoryBook:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1238 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1239 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1240 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1241 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1242 pEventTimer->Pause();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1243 pAudioPlayer->StopChannels(-1, -1);
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
1244 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, uMessage, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1245 ptr_507BE0 = GUIWindow::Create(0x258u, 0x169u, 0, 0, (enum WindowType)99, (int)ptr_507A00, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1246 bFlashHistoryBook = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1247 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1248 case UIMSG_CloseBook:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1249 back_to_game();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1250 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1251 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1252 if ( pCurrentScreen > 15 )
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1253 {
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1254 if ( pCurrentScreen >= 17
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1255 && (pCurrentScreen <= 18
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1256 || pCurrentScreen == 104) )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1257 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1258 LABEL_229:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1259 if ( dword_50CDC8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1260 goto LABEL_232;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1261 sub_42FC15();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1262 goto LABEL_231;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1263 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1264 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1265 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1266 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1267 if ( pCurrentScreen >= 14
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1268 || pCurrentScreen == 4
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1269 || pCurrentScreen == 10 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1270 goto LABEL_229;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1271 if ( pCurrentScreen == 13
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1272 && !dword_50CDC8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1273 && !dword_5C35C8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1274 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1275 sub_42FC15();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1276 dword_5C35C8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1277 LABEL_231:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1278 uMessageParam = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1279 goto LABEL_232;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1280 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1281 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1282 LABEL_232:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1283 if ( !ptr_507BDC )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1284 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1285 pRenderer->ClearZBuffer(0, 479);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1286 viewparams->bRedrawGameUI = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1287 viewparams->field_48 = v0;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1288 if ( pCurrentScreen )
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1289 {
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1290 if ( pCurrentScreen > 103 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1291 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1292 if ( pCurrentScreen == 104 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1293 goto LABEL_321;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1294 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1295 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1296 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1297 if ( pCurrentScreen < 100 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1298 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1299 switch ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1300 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1301 case 23:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1302 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1303 if ( some_active_character )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1304 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1305 uActiveCharacter = some_active_character;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1306 uActiveCharacter = pParty->GetNextActiveCharacter();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1307 some_active_character = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1308 if ( pParty->bTurnBasedModeOn )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1309 pTurnEngine->_40471C();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1310 dword_50C9D0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1311 dword_50C9D4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1312 dword_50C9D8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1313 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1314 if ( ptr_50C9A4 && ptr_50C9A4->uItemID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1315 {
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
1316 LOBYTE(ptr_50C9A4->uAttributes) &= 0xFu;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1317 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1318 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1319 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1320 goto LABEL_322;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1321 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1322 ptr_507BE0->Release();
26
93bf1d5f6a6d Game loading.
Nomad
parents: 23
diff changeset
1323 //crt_deconstruct_ptr_6A0118();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1324 ptr_507BE0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1325 pEventTimer->Resume();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1326 goto LABEL_322;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1327 case 11:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1328 case 12:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1329 pIcons_LOD->_4114F2();
26
93bf1d5f6a6d Game loading.
Nomad
parents: 23
diff changeset
1330 //crt_deconstruct_ptr_6A0118();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1331 goto LABEL_291;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1332 case 15:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1333 pCurrentScreen = 10;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1334 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1335 case 10:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1336 v29 = ptr_507BB8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1337 goto LABEL_249;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1338 case 25:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1339 v29 = ptr_507BC8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1340 LABEL_249:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1341 v29->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1342 pIcons_LOD->_4114F2();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1343 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1344 viewparams->bRedrawGameUI = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1345 pEventTimer->Resume();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1346 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1347 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1348 thisa = (signed int)&uTextureID_507C60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1349 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1350 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1351 if ( *(int *)thisa )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1352 pIcons_LOD->pTextures[*(int *)thisa].Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1353 thisa += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1354 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1355 while ( thisa < (signed int)&dword_507CBC );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1356 memset(&uTextureID_507C60, 0, 0x5Cu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1357 pIcons_LOD->_40F9C5();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1358 WriteWindowsRegistryInt("soundflag", (char)uSoundVolumeMultiplier);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1359 WriteWindowsRegistryInt("musicflag", (char)uMusicVolimeMultiplier);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1360 WriteWindowsRegistryInt("CharVoices", (char)uVoicesVolumeMultiplier);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1361 WriteWindowsRegistryInt("WalkSound", bWalkSound);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1362 WriteWindowsRegistryInt("ShowDamage", bShowDamage);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1363 WriteWindowsRegistryInt("graphicsmode", (unsigned __int8)byte_6BE388_graphicsmode);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1364 WriteWindowsRegistryInt("valAlwaysRun", bAlwaysRun);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1365 WriteWindowsRegistryInt("FlipOnExit", bFlipOnExit);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1366 if ( !uTurnSpeed )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1367 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1368 v171 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1369 goto LABEL_261;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1370 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1371 if ( uTurnSpeed == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1372 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1373 v171 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1374 LABEL_261:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1375 v30 = v171;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1376 goto LABEL_262;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1377 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1378 if ( uTurnSpeed != 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1379 goto LABEL_291;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1380 v30 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1381 LABEL_262:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1382 v31 = "TurnDelta";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1383 LABEL_263:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1384 WriteWindowsRegistryInt(v31, v30);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1385 LABEL_291:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1386 stru_506E40.Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1387 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1388 case 1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1389 pIcons_LOD->_40F9C5();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1390 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1391 pIcons_LOD->_40F9C5();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1392 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1393 goto LABEL_291;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1394 case 28:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1395 if ( pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1396 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1397 WriteWindowsRegistryInt("Colored Lights", pRenderer->bUseColoredLights);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1398 WriteWindowsRegistryInt("Tinting", pRenderer->bTinting);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1399 WriteWindowsRegistryInt("Bloodsplats", (LOBYTE(pGame->uFlags2) >> 5) & 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1400 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1401 if ( pRenderer->bWindowMode )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1402 goto LABEL_291;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1403 v30 = uGammaPos;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1404 v31 = "GammaPos";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1405 goto LABEL_263;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1406 case 26:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1407 v197 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1408 v32 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1409 while ( *((char *)word_506E6C + v32) != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1410 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1411 ++v32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1412 if ( v32 >= 28 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1413 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1414 thisb = (signed int)&uTextureID_507BF4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1415 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1416 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1417 if ( *(int *)thisb )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1418 pIcons_LOD->pTextures[*(int *)thisb].Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1419 thisb += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1420 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1421 while ( thisb < (signed int)&dword_507C08 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1422 memset(&uTextureID_507BF4, 0, 0x14u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1423 pIcons_LOD->_40F9C5();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1424 uAction = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1425 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1426 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1427 v33 = pKeyActionMap->GetActionVKey((enum InputAction)uAction);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1428 if ( v33 != pPrevVirtualCidesMapping[uAction] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1429 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1430 if ( v197 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1431 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1432 v34 = pKeyActionMap->GetActionVKey((enum InputAction)uAction);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1433 GUI_ReplaceHotkey(v34, LOBYTE(pPrevVirtualCidesMapping[uAction]), v0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1434 v197 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1435 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1436 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1437 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1438 v35 = pKeyActionMap->GetActionVKey((enum InputAction)uAction);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1439 GUI_ReplaceHotkey(v35, LOBYTE(pPrevVirtualCidesMapping[uAction]), 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1440 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1441 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1442 if ( uAction
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1443 && uAction != 2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1444 && uAction != 3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1445 && uAction != v0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1446 && uAction != 25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1447 && uAction != 26 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1448 v172 = (KeyToggleType)v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1449 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1450 v172 = (KeyToggleType)0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1451 pKeyActionMap->SetKeyMapping(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1452 uAction,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1453 pPrevVirtualCidesMapping[uAction],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1454 v172);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1455 ++uAction;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1456 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1457 while ( uAction < 28 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1458 pKeyActionMap->StoreMappings();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1459 goto LABEL_291;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1460 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1461 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1462 goto LABEL_623;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1463 case 5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1464 if ( dword_506F14 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1465 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1466 Rest(_506F18_num_hours_to_sleep);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1467 pParty->pPlayers[3].pConditions[2] = 0i64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1468 pParty->pPlayers[2].pConditions[2] = 0i64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1469 pParty->pPlayers[1].pConditions[2] = 0i64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1470 pParty->pPlayers[0].pConditions[2] = 0i64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1471 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1472 pTexture_RestUI_CurrentSkyFrame->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1473 pTexture_RestUI_CurrentHourglassFrame->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1474 pTexture_RestUI_CurrentHourglassFrame = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1475 pTexture_RestUI_CurrentSkyFrame = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1476 pIcons_LOD->_40F9C5();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1477 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1478 _506F18_num_hours_to_sleep = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1479 dword_506F14 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1480 dword_507B94 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1481 goto LABEL_322;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1482 case 14:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1483 pGUIWindow_CurrentMenu->Release();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1484 pCurrentScreen = 13;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1485 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1486 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1487 case 13:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1488 if ( uDialogueType )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1489 uDialogueType = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1490 if ( uGameState == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1491 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1492 while ( sub_4BD8B5() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1493 ;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1494 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1495 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1496 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1497 if ( sub_4BD8B5() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1498 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1499 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1500 sub_4B1D27();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1501 pAudioPlayer->PlaySound((SoundID)(SOUND_EnteringAHouse|0x1), 814, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1502 pVideoPlayer->Unload();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1503 pGUIWindow_CurrentMenu = ptr_507BC0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1504 goto LABEL_322;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1505 case 18:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1506 if ( uCurrentHouse_Animation == 153 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1507 HousePlaySomeSound(0x99u, 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1508 pVideoPlayer->Unload();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1509 goto LABEL_306;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1510 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1511 LABEL_306:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1512 if ( dword_5B65CC )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1513 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1514 pParty->field_709 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1515 LOBYTE(pNPCStats->pNewNPCData[dword_5B65CC].uFlags) &= 0x7Fu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1516 sub_44A56A();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1517 viewparams->bRedrawGameUI = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1518 dword_5B65CC = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1519 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1520 goto LABEL_317;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1521 case 19:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1522 memset(GameUI_StatusBar_TimedString, 0, 0xC8u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1523 sub_4452BB();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1524 goto LABEL_317;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1525 case 17:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1526 if ( pParty->vPosition.x < -22528 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1527 pParty->vPosition.x = -22528;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1528 if ( pParty->vPosition.x > 22528 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1529 pParty->vPosition.x = 22528;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1530 if ( pParty->vPosition.z < -22528 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1531 pParty->vPosition.z = -22528;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1532 if ( pParty->vPosition.z > 22528 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1533 pParty->vPosition.z = 22528;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1534 goto LABEL_317;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1535 case 16:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1536 pVideoPlayer->Unload();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1537 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1538 case 7:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1539 goto LABEL_319;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1540 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1541 goto LABEL_322;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1542 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1543 goto LABEL_322;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1544 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1545 LABEL_319:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1546 sub_4196A0();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1547 sub_419379();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1548 LABEL_321:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1549 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1550 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1551 LABEL_322:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1552 if ( ptr_507BD4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1553 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1554 if ( pCurrentScreen == 7 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1555 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1556 pMouse->SetCursorBitmap("MICON2");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1557 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1558 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1559 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1560 ptr_507BD4->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1561 ptr_507BD4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1562 pMouse->SetCursorBitmap("MICON1");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1563 GameUI_StatusBar_TimedStringTimeLeft = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1564 unk_50C9A0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1565 back_to_game();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1566 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1567 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1568 if ( (signed int)uActiveCharacter < v0 || (signed int)uActiveCharacter > 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1569 uActiveCharacter = pParty->GetNextActiveCharacter();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1570 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1571 if ( pGUIWindow_CurrentMenu == ptr_507BC0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1572 ptr_507BC0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1573 pGUIWindow_CurrentMenu = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1574 pEventTimer->Resume();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1575 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1576 viewparams->bRedrawGameUI = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1577 pIcons_LOD->_4355F7();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1578 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1579 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1580 v36 = ptr_507BD4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1581 if ( !ptr_507BD4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1582 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1583 dword_6BE138 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1584 GUIWindow::Create(0x25Au, 0x1C2u, 0, 0, (enum WindowType)90, (int)ptr_5079F0, v0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1585 pEventTimer->Pause();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1586 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1587 ++pIcons_LOD->uTexturePacksCount;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1588 pCurrentScreen = v0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1589 if ( !pIcons_LOD->uNumPrevLoadedFiles )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1590 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
1591 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)3, 0, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1592 uTextureID_507944 = pIcons_LOD->LoadTexture("options", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1593 uTextureID_507940 = pIcons_LOD->LoadTexture("new1", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1594 uTextureID_50793C = pIcons_LOD->LoadTexture("load1", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1595 uTextureID_507938 = pIcons_LOD->LoadTexture("save1", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1596 uTextureID_507934 = pIcons_LOD->LoadTexture("controls1", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1597 uTextureID_507930 = pIcons_LOD->LoadTexture("resume1", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1598 uTextureID_50792C = pIcons_LOD->LoadTexture("quit1", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1599 ptr_50C9C4 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1600 0x13u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1601 0x9Bu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1602 0xD6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1603 0x28u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1604 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1605 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1606 0x7Cu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1607 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1608 0x4Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1609 pGlobalTXT_LocalizationStrings[614],// "New Game"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1610 (Texture *)(uTextureID_507940 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507940] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1611 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1612 ptr_50C9C0 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1613 0x13u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1614 0xD1u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1615 0xD6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1616 0x28u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1617 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1618 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1619 0x7Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1620 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1621 0x53u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1622 pGlobalTXT_LocalizationStrings[615],// "Save Game"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1623 (Texture *)(uTextureID_507938 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507938] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1624 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1625 ptr_50C9BC = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1626 0x13u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1627 0x107u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1628 0xD6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1629 0x28u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1630 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1631 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1632 0x7Du,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1633 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1634 0x4Cu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1635 pGlobalTXT_LocalizationStrings[616],// "Load Game"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1636 (Texture *)(uTextureID_50793C != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_50793C] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1637 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1638 pyt_50C9B8 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1639 0xF1u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1640 0x9Bu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1641 0xD6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1642 0x28u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1643 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1644 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1645 0x7Fu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1646 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1647 0x43u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1648 pGlobalTXT_LocalizationStrings[617],// ""Sound, Keyboard, Game Options:""
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1649 (Texture *)(uTextureID_507934 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507934] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1650 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1651 ptr_50C9B4 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1652 0xF1u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1653 0xD1u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1654 0xD6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1655 0x28u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1656 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1657 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1658 0x84u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1659 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1660 0x51u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1661 pGlobalTXT_LocalizationStrings[618],// "Quit"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1662 (Texture *)(uTextureID_50792C != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_50792C] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1663 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1664 ptr_50C9B0 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1665 0xF1u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1666 0x107u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1667 0xD6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1668 0x28u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1669 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1670 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1671 0x7Bu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1672 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1673 0x52u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1674 pGlobalTXT_LocalizationStrings[619],// "Return to Game"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1675 (Texture *)(uTextureID_507930 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507930] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1676 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1677 pGUIWindow_CurrentMenu->_41D08F(6, v0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1678 viewparams->field_48 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1679 stru_506E40.Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1680 uNumSeconds = (unsigned int)MakeScreenshot(155, 117);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1681 pRenderer->SavePCXImage("gamma.pcx", (char *)uNumSeconds, 155, 117);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1682 free((void *)uNumSeconds);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1683 stru_506E40._40E55E("gamma.pcx", 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1684 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1685 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1686 goto LABEL_333;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1687 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1688 sub_41426F();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1689 _continue:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1690 if ( !pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1691 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1692 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1693 case UIMSG_BC:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1694 if ( uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1695 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1696 GUIWindow::Create(0x272u, 0xB3u, 0, 0, (enum WindowType)90, (int)ptr_5079E8, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1697 v37 = (pParty->pHirelings[0].pName != 0)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1698 + (pParty->pHirelings[1].pName != 0)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1699 + (unsigned __int8)pParty->field_70A
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1700 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1701 if ( (unsigned __int8)pParty->field_709 < v37 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1702 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1703 ++pParty->field_709;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1704 if ( (unsigned __int8)pParty->field_709 >= v37 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1705 pParty->field_709 = (pParty->pHirelings[0].pName != 0)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1706 + (pParty->pHirelings[1].pName != 0)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1707 + pParty->field_70A
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1708 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1709 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1710 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1711 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1712 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1713 GUIWindow::Create(0x1D5u, 0xB3u, 0, 0, (enum WindowType)90, (int)ptr_5079EC, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1714 if ( pParty->field_709 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1715 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1716 --pParty->field_709;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1717 if ( pParty->field_709 < 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1718 pParty->field_709 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1719 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1720 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1721 DrawHiredNPCs();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1722 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1723 case UIMSG_OpenRestUI|0x2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1724 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1725 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1726 dword_50CDC8 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1727 sub_42FBDD();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1728 HousePlaySomeSound(uCurrentHouse_Animation, 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1729 pVideoPlayer->Unload();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1730 sub_44603D();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1731 viewparams->bRedrawGameUI = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1732 if ( dword_59117C_teleportx | dword_591178_teleporty | dword_591174_teleportz | dword_591170_teleport_directiony | dword_59116C_teleport_directionx | dword_591168_teleport_speedz )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1733 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1734 if ( dword_59117C_teleportx )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1735 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1736 pParty->vPosition.x = dword_59117C_teleportx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1737 _5B65A8_npcdata_uflags_or_other = dword_59117C_teleportx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1738 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1739 if ( dword_591178_teleporty )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1740 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1741 pParty->vPosition.z = dword_591178_teleporty;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1742 _5B65AC_npcdata_fame_or_other = dword_591178_teleporty;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1743 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1744 if ( dword_591174_teleportz )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1745 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1746 pParty->vPosition.y = dword_591174_teleportz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1747 _5B65B0_npcdata_rep_or_other = dword_591174_teleportz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1748 pParty->uFallStartY = dword_591174_teleportz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1749 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1750 if ( dword_591170_teleport_directiony )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1751 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1752 pParty->sRotationY = dword_591170_teleport_directiony;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1753 _5B65B4_npcdata_loword_house_or_other = dword_591170_teleport_directiony;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1754 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1755 if ( dword_59116C_teleport_directionx )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1756 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1757 pParty->sRotationX = dword_59116C_teleport_directionx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1758 _5B65B8_npcdata_hiword_house_or_other = dword_59116C_teleport_directionx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1759 v38 = dword_591168_teleport_speedz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1760 pParty->uFallSpeed = dword_591168_teleport_speedz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1761 dword_5B65BC = dword_591168_teleport_speedz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1762 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1763 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1764 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1765 v38 = dword_5B65BC;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1766 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1767 if ( *dword_591164_teleport_map_name != 48 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1768 {
27
be2066176d89 On level initialization
Nomad
parents: 26
diff changeset
1769 pGameLoadingUI_ProgressBar->uType = (GUIProgressBar::Type)2;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1770 dword_5B65C0 = _5B65A8_npcdata_uflags_or_other | _5B65AC_npcdata_fame_or_other | _5B65B0_npcdata_rep_or_other | _5B65B4_npcdata_loword_house_or_other | _5B65B8_npcdata_hiword_house_or_other | v38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1771 OnMapLeave();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1772 sub_44987B(dword_591164_teleport_map_name, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1773 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1774 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1775 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1776 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1777 dword_597F18 = dword_5C341C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1778 EventProcessor(dword_5C3418, 0, v0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1779 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1780 dword_597F18 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1781 if ( !_strcmpi(byte_6BE3B0, "d05.blv") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1782 pParty->uTimePlayed += 1474560i64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1783 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1784 case 0x19C:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1785 sub_42FC15();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1786 pVideoPlayer->Unload();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1787 sub_44603D();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1788 dword_597F18 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1789 goto LABEL_422;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1790 case UIMSG_CycleCharacters:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1791 v39 = GetAsyncKeyState(VK_SHIFT);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1792 v40 = CycleCharacter(v39);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1793 goto LABEL_421;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1794 case UIMSG_LoadGame|0x8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1795 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1796 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1797 dword_50CDC8 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1798 sub_42FBDD();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1799 v195 = (NPCData *)GetTravelTime();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1800 strcpy(pOutdoor->pLevelFilename, pCurrentMapName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1801 if ( bUnderwater != 1 && pParty->bFlying
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1802 || pOutdoor->GetTravelDestination(pParty->vPosition.x, pParty->vPosition.z, &pOut, 20) != v0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1803 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1804 viewparams->bRedrawGameUI = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1805 LABEL_387:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1806 sub_42FC15();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1807 if ( pParty->vPosition.x < -22528 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1808 pParty->vPosition.x = -22528;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1809 if ( pParty->vPosition.x > 22528 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1810 pParty->vPosition.x = 22528;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1811 if ( pParty->vPosition.z < -22528 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1812 pParty->vPosition.z = -22528;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1813 if ( pParty->vPosition.z > 22528 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1814 pParty->vPosition.z = 22528;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1815 LABEL_317:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1816 sub_44603D();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1817 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1818 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1819 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1820 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1821 pParty->field_6E4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1822 pParty->field_6E0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1823 pStru277->_427D48(v0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1824 sub_44603D();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1825 pEventTimer->Pause();
27
be2066176d89 On level initialization
Nomad
parents: 26
diff changeset
1826 pGameLoadingUI_ProgressBar->_443484((GUIProgressBar::Type)2);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1827 ++pGameLoadingUI_ProgressBar->uProgressMax;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1828 SaveGame(v0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1829 pGameLoadingUI_ProgressBar->Progress();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1830 RestAndHeal(1440 * (signed int)v195);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1831 if ( pParty->uNumFoodRations )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1832 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1833 pParty->RestAndHeal();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1834 if ( ((pParty->uNumFoodRations - (signed int)v195) & 0x80000000u) != 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1835 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1836 thisc = pParty->pPlayers;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1837 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1838 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1839 thisc->SetCondition(v0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1840 ++thisc;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1841 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1842 while ( (signed int)thisc < (signed int)pParty->pHirelings );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1843 ++pParty->field_764;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1844 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1845 Party::TakeFood((unsigned int)v195);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1846 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1847 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1848 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1849 thisd = pParty->pPlayers;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1850 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1851 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1852 thisd->SetCondition(v0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1853 ++thisd;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1854 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1855 while ( (signed int)thisd < (signed int)pParty->pHirelings );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1856 ++pParty->field_764;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1857 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1858 pPaletteManager->ResetNonLocked();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1859 pSpriteFrameTable->ResetSomeSpriteFlags();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1860 strcpy(pCurrentMapName, &pOut);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1861 strcpy(&pLevelName, pCurrentMapName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1862 v41 = strtok(&pLevelName, ".");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1863 strcpy(&pLevelName, v41);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1864 Level_LoadEvtAndStr(&pLevelName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1865 pDecalBuilder->Reset( 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1866 LoadLevel_InitializeLevelEvt();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1867 uLevelMapStatsID = pMapStats->GetMapInfo(pCurrentMapName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1868 bUnderwater = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1869 bNoNPCHiring = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1870 pGame->uFlags2 &= 0xFFFFFFF7u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1871 if ( Is_out15odm_underwater() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1872 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1873 bUnderwater = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1874 pGame->uFlags2 |= 8u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1875 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1876 if ( !_strcmpi(pCurrentMapName, "out15.odm") || !_strcmpi(pCurrentMapName, "d47.blv") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1877 bNoNPCHiring = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1878 v0 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1879 PrepareToLoadODM(1u, (OutdoorCamera *)1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1880 pAudioPlayer->SetMapEAX();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1881 bDialogueUI_InitializeActor_NPC_ID = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1882 OnMapLoad();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1883 pOutdoor->SetFog();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1884 TeleportToStartingPoint(uLevel_StartingPointType);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1885 pParty->vPosition.y = GetTerrainHeightsAroundParty2(pParty->vPosition.x, pParty->vPosition.z, (int *)&v213, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1886 pParty->uFallStartY = pParty->vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1887 sub_461103();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1888 pEventTimer->Resume();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1889 viewparams->bRedrawGameUI = 1;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1890 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1891 pGameLoadingUI_ProgressBar->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1892 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1893 goto LABEL_422;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1894 case UIMSG_SaveGame|0x8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1895 goto LABEL_387;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1896 case UIMSG_BE:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1897 if ( pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1898 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1899 LOWORD(v42) = pGame->pVisInstance->get_picked_object_zbuf_val();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1900 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1901 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1902 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1903 uNumSeconds = (unsigned int)pMouse->GetCursorPos(&v210);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1904 v43 = pMouse->GetCursorPos(&v208);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1905 v42 = pRenderer->pActiveZBuffer[*(int *)uNumSeconds + pSRZBufferLineOffsets[v43->y]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1906 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1907 v44 = (unsigned __int16)v42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1908 v45 = v44 & 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1909 uNumSeconds = v44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1910 v46 = v44 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1911 if ( v45 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1912 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1913 v47 = pActors[v46].uAIState == Dead;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1914 goto LABEL_400;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1915 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1916 if ( v45 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1917 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1918 v47 = (pObjectList->pObjects[pLayingItems[v46].uObjectDescID].uFlags & 0x10) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1919 LABEL_400:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1920 if ( !v47 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1921 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1922 goto LABEL_415;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1923 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1924 if ( v45 == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1925 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1926 v48 = pLevelDecorations[v46].field_16_event_id == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1927 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1928 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1929 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1930 if ( v45 != 6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1931 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1932 if ( uCurrentlyLoadedLevelType != v0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1933 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1934 v50 = &pOutdoor->pBModels[v44 >> 9].pFaces[v46 & 0x3F];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1935 if ( !(BYTE3(v50->uFaceAttributes) & 2) || !v50->sCogTriggeredID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1936 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1937 v44 = uNumSeconds;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1938 goto LABEL_415;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1939 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1940 v49 = &pIndoor->pFaces[v46];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1941 if ( !(BYTE3(v49->uAttributes) & 2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1942 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1943 v48 = pIndoor->pFaceExtras[v49->uFaceExtraID].uEventID == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1944 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1945 if ( v48 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1946 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1947 LABEL_415:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1948 v51 = ptr_507BD4->ptr_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1949 *((char *)v51 + 8) &= 0xBFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1950 LABEL_416:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1951 *((short *)v51 + 2) = uMessageParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1952 *((int *)v51 + 3) = v44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1953 pParty->pPlayers[*((short *)v51 + 1)].SetRecoveryTime(300);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1954 v36 = ptr_507BD4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1955 LABEL_333:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1956 v36->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1957 ptr_507BD4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1958 pMouse->SetCursorBitmap("MICON1");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1959 GameUI_StatusBar_TimedStringTimeLeft = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1960 unk_50C9A0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1961 back_to_game();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1962 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1963 case UIMSG_ChangeGameState|0x40:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1964 case 0x8D:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1965 case 0x8F:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1966 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1967 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1968 if ( unk_50C9A0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1969 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1970 v40 = uMessageParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1971 LABEL_421:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1972 uActiveCharacter = v40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1973 LABEL_422:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1974 viewparams->bRedrawGameUI = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1975 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1976 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1977 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1978 if ( ptr_507BD4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1979 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1980 v52 = ptr_507BD4->ptr_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1981 switch ( uMessage )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1982 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1983 case 69:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1984 *((char *)v52 + 8) &= 0xFDu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1985 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1986 case 141:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1987 *((char *)v52 + 9) &= 0xFEu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1988 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1989 case 143:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1990 *((char *)v52 + 9) &= 0xFDu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1991 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1992 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1993 *((short *)v52 + 2) = uMessageParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1994 pParty->pPlayers[*((short *)v52 + 1)].SetRecoveryTime(300);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1995 ptr_507BD4->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1996 ptr_507BD4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1997 pEventTimer->Resume();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1998 pMouse->SetCursorBitmap("MICON1");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1999 GameUI_StatusBar_TimedStringTimeLeft = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2000 unk_50C9A0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2001 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2002 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2003 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2004 case UIMSG_BF:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2005 dword_50CDC8 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2006 sub_42FBDD();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2007 SaveGame(v0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2008 strcpy(pCurrentMapName, pMapStats->pInfos[uHouse_ExitPic].pFilename);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2009 dword_6BE364_game_settings_1 |= v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2010 uGameState = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2011
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2012
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2013 //v53 = p2DEvents_minus1_::30[26 * (unsigned int)ptr_507BC0->ptr_1C];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2014 v53 = p2DEvents[(unsigned int)ptr_507BC0->ptr_1C - 1]._quest_related;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2015
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2016 if ( v53 < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2017 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2018 v54 = abs(v53) - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2019 _5B65B8_npcdata_hiword_house_or_other = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2020 dword_5B65BC = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2021 v55 = dword_4E4560[v54];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2022 _5B65AC_npcdata_fame_or_other = dword_4E4578[v54];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2023 v56 = dword_4E4590[v54];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2024 v57 = dword_4E45A8[v54];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2025 _5B65A8_npcdata_uflags_or_other = v55;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2026 _5B65B4_npcdata_loword_house_or_other = v57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2027 _5B65B0_npcdata_rep_or_other = v56;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2028 dword_5B65C0 = v55 | _5B65AC_npcdata_fame_or_other | v56 | v57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2029 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2030 sub_4BD8B5();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2031 goto LABEL_434;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2032 case UIMSG_C3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2033 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2034 v162 = uMessageParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2035 v148 = 195;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2036 goto LABEL_438;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2037 case UIMSG_B1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2038 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2039 v162 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2040 v148 = 177;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2041 LABEL_438:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2042 v141 = (WindowType)9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2043 LABEL_439:
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2044 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, v141, v148, v162);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2045 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2046 case UIMSG_B2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2047 v165 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2048 v151 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2049 v144 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2050 v139 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2051 bRecallingBeacon = uMessageParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2052 v135 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2053 v132 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2054 v130 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2055 v127 = uMessageParam + 204;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2056 goto _play_sound_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2057 case UIMSG_B4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2058 if ( !pGUIWindow_CurrentMenu )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2059 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2060 v58 = pPlayers[_506348_current_lloyd_playerid + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2061 uNumSeconds = (unsigned int)&v58->pInstalledBeacons[uMessageParam];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2062 if ( bRecallingBeacon )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2063 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2064 if ( !*((int *)&pSavegameThumbnails->pPixels + 10 * uMessageParam) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2065 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2066 v173 = pMapStats->pInfos[sub_410D99_get_map_index(HIWORD(v58->pInstalledBeacons[uMessageParam].field_18))].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2067 v157 = pGlobalTXT_LocalizationStrings[474];// "Recall to %s"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2068 goto _sprintex_2args_draw_status_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2069 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2070 v59 = pMapStats->GetMapInfo(pCurrentMapName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2071 thise = "Not in Map Stats";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2072 if ( v59 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2073 thise = pMapStats->pInfos[v59].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2074 if ( !*((int *)&pSavegameThumbnails->pPixels + 10 * uMessageParam) || !v59 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2075 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2076 v173 = thise;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2077 v157 = pGlobalTXT_LocalizationStrings[476];// "Set to %s"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2078 goto _sprintex_2args_draw_status_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2079 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2080 v174 = pMapStats->pInfos[sub_410D99_get_map_index(*(short *)(uNumSeconds + 26))].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2081 v158 = (unsigned int)thise;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2082 v146 = pGlobalTXT_LocalizationStrings[475];// "Set %s over %s"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2083 _sprintex_draw_status_and_continue:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2084 sprintfex(pTmpBuf, v146, v158, v174);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2085 goto _set_status_string_pTmpBuf_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2086 case UIMSG_B5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2087 dword_50CDC8 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2088 goto LABEL_453;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2089 case UIMSG_B3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2090 thisf = pPlayers[_506348_current_lloyd_playerid + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2091 v195 = (NPCData *)&thisf->pInstalledBeacons[uMessageParam];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2092 if ( !*(_QWORD *)&v195->pName && bRecallingBeacon )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2093 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2094 byte_506360 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2095 thisf->CanCastSpell(uRequiredMana);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2096 if ( pParty->bTurnBasedModeOn )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2097 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2098 v60 = sRecoveryTime;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2099 pParty->pTurnBasedPlayerRecoveryTimes[_506348_current_lloyd_playerid] = sRecoveryTime;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2100 thisf->SetRecoveryTime(v60);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2101 pTurnEngine->_40471C();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2102 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2103 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2104 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2105 thisf->SetRecoveryTime(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2106 (signed __int64)(flt_6BE3A4_debug_recmod1 * (double)sRecoveryTime * 2.133333333333333));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2107 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2108 pAudioPlayer->PlaySound(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2109 (SoundID)word_4EE088_sound_ids[dword_506338],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2110 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2111 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2112 -1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2113 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2114 dword_50633C,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2115 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2116 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2117 if ( bRecallingBeacon )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2118 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2119 if ( _strcmpi(pCurrentMapName, (const char *)&pGames_LOD->pSubIndices[HIWORD(v195->uProfession)]) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2120 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2121 SaveGame(v0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2122 OnMapLeave();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2123 strcpy(pCurrentMapName, (const char *)&pGames_LOD->pSubIndices[HIWORD(v195->uProfession)]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2124 dword_6BE364_game_settings_1 |= v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2125 uGameState = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2126 _5B65A8_npcdata_uflags_or_other = v195->uFlags;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2127 _5B65AC_npcdata_fame_or_other = v195->fame;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2128 _5B65B0_npcdata_rep_or_other = v195->rep;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2129 _5B65B4_npcdata_loword_house_or_other = LOWORD(v195->house);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2130 _5B65B8_npcdata_hiword_house_or_other = HIWORD(v195->house);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2131 dword_5B65C0 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2132 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2133 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2134 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2135 pParty->vPosition.x = v195->uFlags;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2136 pParty->vPosition.z = v195->fame;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2137 pParty->vPosition.y = v195->rep;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2138 pParty->uFallStartY = pParty->vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2139 pParty->sRotationY = LOWORD(v195->house);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2140 pParty->sRotationX = HIWORD(v195->house);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2141 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2142 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2143 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2144 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2145 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2146 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2147 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2148 }
26
93bf1d5f6a6d Game loading.
Nomad
parents: 23
diff changeset
2149 //crt_deconstruct_ptr_6A0118();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2150 ptr_507BE0->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2151 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2152 ptr_507BE0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2153 pGUIWindow_CurrentMenu = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2154 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2155 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2156 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2157 sprintfex(a1, "data\\lloyd%d%d.pcx", _506348_current_lloyd_playerid + 1, uMessageParam + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2158 SaveScreenshot(a1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2159 LoadThumbnailLloydTexture(uMessageParam, _506348_current_lloyd_playerid + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2160 v212 = qword_506350 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2161 v61 = v195;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2162 thisg = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2163 v62 = pParty->uTimePlayed + (signed __int64)((double)(qword_506350 << 7) * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2164 v195->pName = (char *)v62;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2165 v61->uPortraitID = HIDWORD(v62);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2166 v61->uFlags = pParty->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2167 v61->fame = pParty->vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2168 v61->rep = pParty->vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2169 LOWORD(v61->house) = LOWORD(pParty->sRotationY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2170 HIWORD(v61->house) = LOWORD(pParty->sRotationX);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2171 if ( (signed int)pGames_LOD->uNumSubIndices / 2 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2172 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2173 uAction = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2174 while ( _strcmpi((const char *)pGames_LOD->pSubIndices + uAction, pCurrentMapName) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2175 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2176 ++thisg;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2177 uAction += 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2178 if ( thisg >= (signed int)pGames_LOD->uNumSubIndices / 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2179 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2180 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2181 HIWORD(v195->uProfession) = thisg;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2182 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2183 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2184 case UIMSG_B7:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2185 if ( uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2186 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2187 switch ( uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2188 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2189 case 1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2190 v63 = 208;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2191 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2192 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2193 v63 = 207;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2194 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2195 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2196 v63 = 211;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2197 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2198 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2199 v63 = 209;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2200 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2201 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2202 if ( uMessageParam != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2203 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2204 LABEL_486:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2205 SaveGame(v0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2206 v64 = pMapStats->GetMapInfo(pCurrentMapName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2207 v65 = uMessageParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2208 if ( v64 == stru_4ECBB8[uMessageParam].uMapInfoID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2209 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2210 pParty->vPosition.x = stru_4ECBB8[v65].pos.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2211 pParty->vPosition.z = stru_4ECBB8[v65].pos.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2212 pParty->vPosition.y = stru_4ECBB8[v65].pos.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2213 pParty->uFallStartY = pParty->vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2214 pParty->sRotationY = stru_4ECBB8[v65].rot_y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2215 pParty->sRotationX = stru_4ECBB8[v65].rot_x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2216 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2217 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2218 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2219 SaveGame(v0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2220 OnMapLeave();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2221 dword_6BE364_game_settings_1 |= v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2222 uGameState = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2223 strcpy(pCurrentMapName, pMapStats->pInfos[stru_4ECBB8[uMessageParam].uMapInfoID].pFilename);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2224 dword_5B65C0 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2225 _5B65A8_npcdata_uflags_or_other = stru_4ECBB8[uMessageParam].pos.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2226 _5B65AC_npcdata_fame_or_other = stru_4ECBB8[uMessageParam].pos.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2227 _5B65B0_npcdata_rep_or_other = stru_4ECBB8[uMessageParam].pos.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2228 v66 = stru_4ECBB8[uMessageParam].rot_x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2229 _5B65B4_npcdata_loword_house_or_other = stru_4ECBB8[uMessageParam].rot_y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2230 _5B65B8_npcdata_hiword_house_or_other = v66;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2231 UpdateActors();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2232 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2233 v67 = pGUIWindow_CurrentMenu->Hint;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2234 if ( v67 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2235 *((int *)v67 + 17) = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2236 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2237 pParty->pPlayers[(unsigned __int8)byte_50C0C0].CanCastSpell(0x14u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2238 LABEL_434:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2239 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2240 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2241 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2242 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2243 LABEL_771:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2244 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2245 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2246 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2247 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2248 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2249 v63 = 210;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2250 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2251 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2252 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2253 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2254 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2255 v63 = 206;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2256 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2257 if ( !(unsigned __int16)_449B57_test_bit(pParty->_award_bits, v63) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2258 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2259 goto LABEL_486;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2260 case UIMSG_B6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2261 if ( uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2262 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2263 switch ( uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2264 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2265 case 1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2266 v68 = 208;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2267 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2268 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2269 v68 = 207;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2270 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2271 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2272 v68 = 211;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2273 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2274 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2275 v68 = 209;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2276 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2277 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2278 if ( uMessageParam != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2279 goto LABEL_506;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2280 v68 = 210;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2281 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2282 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2283 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2284 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2285 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2286 v68 = 206;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2287 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2288 if ( !(unsigned __int16)_449B57_test_bit(pParty->_award_bits, v68) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2289 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2290 pRenderer->DrawTextureRGB(0, 0x160u, pTexture_StatusBar);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2291 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2292 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2293 LABEL_506:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2294 if ( uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2295 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2296 switch ( uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2297 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2298 case 1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2299 v69 = pMapStats->pInfos[4].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2300 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2301 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2302 v69 = pMapStats->pInfos[3].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2303 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2304 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2305 v69 = pMapStats->pInfos[10].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2306 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2307 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2308 v69 = pMapStats->pInfos[7].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2309 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2310 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2311 if ( uMessageParam != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2312 goto LABEL_519;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2313 v69 = pMapStats->pInfos[8].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2314 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2315 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2316 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2317 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2318 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2319 v69 = pMapStats->pInfos[21].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2320 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2321 v200 = v69;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2322 LABEL_519:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2323 v173 = v200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2324 v157 = pGlobalTXT_LocalizationStrings[35];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2325 goto _sprintex_2args_draw_status_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2326 case UIMSG_ShowFinalWindow:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2327 sprintfex(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2328 pFinalMessage,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2329 "%s\n \n%s\n \n%s",
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2330 pGlobalTXT_LocalizationStrings[151],// "Congratulations Adventurer."
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2331 pGlobalTXT_LocalizationStrings[118],// "We hope that you've enjoyed playing Might and Magic VII as much as we did making it. We have saved this screen as MM7_WIN.PCX in your MM7 directory. You can print it out as proof of your accomplishment."
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2332 pGlobalTXT_LocalizationStrings[167]);// "- The Might and Magic VII Development Team."
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2333 ModalWindow(pFinalMessage, 196);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2334 uGameState = GAME_STATE_FINAL_WINDOW;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2335 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2336 case UIMSG_C4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2337 uGameState = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2338 strcpy((char *)pKeyActionMap->pPressedKeysBuffer, "2");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2339 goto LABEL_524;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2340 case UIMSG_D5|0x8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2341 LABEL_524:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2342 sprintfex(pTmpBuf, "%s", pKeyActionMap->pPressedKeysBuffer);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2343 memcpy(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2344 &v216,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2345 texture_frame_table_txt_parser((const char *)pKeyActionMap->pPressedKeysBuffer, &v218),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2346 sizeof(v216));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2347 if ( v216.field_0 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2348 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2349 v195 = (NPCData *)((signed int)pGames_LOD->uNumSubIndices / 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2350 v70 = atoi(v216.pProperties[0]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2351 if ( v70 <= 0 || v70 >= 77 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2352 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2353 LABEL_90:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2354 v1 = nullstring;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2355 LABEL_91:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2356 v0 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2357 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2358 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2359 v71 = v70;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2360 strcpy(Str2, pMapStats->pInfos[v70].pFilename);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2361 v72 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2362 if ( (signed int)v195 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2363 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2364 thish = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2365 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2366 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2367 if ( !_strcmpi((const char *)&pGames_LOD->pSubIndices[thish], Str2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2368 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2369 ++thish;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2370 v72 = (NPCData *)((char *)v72 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2371 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2372 while ( (signed int)v72 < (signed int)v195 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2373 if ( (signed int)v72 < (signed int)v195 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2374 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2375 strcpy(pCurrentMapName, (const char *)&pGames_LOD->pSubIndices[(int)v72]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2376 dword_6BE364_game_settings_1 |= 1u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2377 uGameState = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2378 OnMapLeave();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2379 goto LABEL_90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2380 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2381 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2382 sprintfex(Str2, "No map found for %s", pMapStats->pInfos[v71].pName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2383 v73 = Str2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2384 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2385 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2386 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2387 if ( v216.field_0 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2388 goto LABEL_90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2389 v74 = atoi(v216.pProperties[0]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2390 thisi = atoi(v216.pProperties[1]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2391 v75 = atoi(v216.pProperties[2]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2392 v76 = v75;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2393 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2394 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2395 if ( pIndoor->GetSector(v74, thisi, v75) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2396 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2397 v77 = thisi;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2398 LABEL_544:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2399 pParty->vPosition.x = v74;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2400 pParty->vPosition.z = v77;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2401 pParty->vPosition.y = v76;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2402 pParty->uFallStartY = v76;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2403 goto LABEL_90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2404 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2405 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2406 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2407 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2408 if ( v74 > -32768 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2409 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2410 if ( v74 < 32768 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2411 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2412 v77 = thisi;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2413 if ( thisi > -32768 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2414 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2415 if ( thisi < 32768 && v76 >= 0 && v76 < 10000 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2416 goto LABEL_544;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2417 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2418 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2419 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2420 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2421 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2422 v73 = "Can't jump to that location!";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2423 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2424 ShowStatusBarString(v73, 6u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2425 goto LABEL_90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2426 case 0x19:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2427 if ( bUnderwater == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2428 goto LABEL_682;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2429 if ( !uActiveCharacter || (v78 = pPlayers[uActiveCharacter], v78->uTimeToRecovery) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2430 goto LABEL_90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2431 v79 = v78->uQuickSpell;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2432 v175 = uActiveCharacter;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2433 v159 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2434 v147 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2435 v80 = uActiveCharacter - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2436 goto LABEL_679;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2437 case 0x46:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2438 case UIMSG_Quit|0x8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2439 if ( pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2440 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2441 v81 = pGame->pVisInstance->get_picked_object_zbuf_val();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2442 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2443 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2444 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2445 uNumSeconds = (unsigned int)pMouse->GetCursorPos(&v206);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2446 v82 = pMouse->GetCursorPos(&v201);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2447 v81 = pRenderer->pActiveZBuffer[*(int *)uNumSeconds + pSRZBufferLineOffsets[v82->y]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2448 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2449 v83 = v81;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2450 v44 = (unsigned __int16)v81;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2451 v84 = v83 >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2452 if ( (v44 & 7) != 3 || v84 >= 5120 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2453 goto LABEL_90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2454 v51 = ptr_507BD4->ptr_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2455 if ( uMessage == 70 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2456 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2457 *((char *)v51 + 8) &= 0xF7u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2458 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2459 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2460 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2461 if ( uMessage == 140 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2462 *((char *)v51 + 9) &= 0xFEu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2463 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2464 *((char *)v51 + 9) &= 0xFDu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2465 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2466 goto LABEL_416;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2467 case 0x1C:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2468 if ( !uActiveCharacter
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2469 || pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2470 goto LABEL_90;
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2471 ptr_507BC8 = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)104, uMessageParam, 0);
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2472 pCurrentScreen = 25;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2473 pEventTimer->Pause();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2474 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2475 case 0x1B:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2476 if ( !uActiveCharacter )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2477 goto LABEL_90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2478 if ( pParty->bTurnBasedModeOn != v0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2479 goto LABEL_569;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2480 if ( pTurnEngine->field_4 == v0 || pTurnEngine->field_4 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2481 goto LABEL_90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2482 if ( !(pTurnEngine->field_18 & 2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2483 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2484 LABEL_569:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2485 if ( pActors[uMessageParam].uAIState == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2486 stru_50C198.LootActor(&pActors[uMessageParam]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2487 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2488 Actor::StealFrom(uMessageParam);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2489 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2490 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2491 case 0x17:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2492 if ( !uActiveCharacter )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2493 goto LABEL_90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2494 if ( pParty->bTurnBasedModeOn != v0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2495 goto LABEL_577;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2496 if ( pTurnEngine->field_4 == v0 || pTurnEngine->field_4 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2497 goto LABEL_90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2498 if ( !(pTurnEngine->field_18 & 2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2499 LABEL_577:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2500 _42ECB5_PlayerAttacksActor();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2501 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2502 case UIMSG_A7:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2503 v163 = (int)pGlobalTXT_LocalizationStrings[81];// "Exit Rest"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2504 v85 = pButton_RestUI_Exit;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2505 v149 = pButton_RestUI_Exit;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2506 v142 = (WindowType)96;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2507 goto LABEL_731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2508 case UIMSG_ShowStatus_Player|0x1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2509 if ( dword_506F14 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2510 goto LABEL_621;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2511 GUIWindow::Create(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2512 pButton_RestUI_Wait5Minutes->uX,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2513 pButton_RestUI_Wait5Minutes->uY,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2514 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2515 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2516 (enum WindowType)90,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2517 (int)pButton_RestUI_Wait5Minutes,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2518 (int)pGlobalTXT_LocalizationStrings[238]);// "Wait 5 Minutes"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2519 dword_506F14 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2520 _506F18_num_hours_to_sleep = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2521 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2522 case 0x60:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2523 if ( dword_506F14 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2524 goto LABEL_621;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2525 GUIWindow::Create(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2526 pButton_RestUI_Wait1Hour->uX,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2527 pButton_RestUI_Wait1Hour->uY,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2528 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2529 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2530 (enum WindowType)90,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2531 (int)pButton_RestUI_Wait1Hour,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2532 (int)pGlobalTXT_LocalizationStrings[239]);// "Wait 1 Hour"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2533 dword_506F14 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2534 _506F18_num_hours_to_sleep = 60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2535 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2536 case UIMSG_OpenRestUI:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2537 dword_506F14 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2538 RestUI_Initialize();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2539 v86 = 60 * (sub_494820(pParty->uCurrentHour) + 1) - pParty->uCurrentMinute;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2540 _506F18_num_hours_to_sleep = v86;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2541 if ( uMessageParam == 111 || uMessageParam == 114 || uMessageParam == 116 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2542 _506F18_num_hours_to_sleep = v86 + 720;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2543 goto LABEL_615;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2544 case 0x68:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2545 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2546 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2547 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2548 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2549 if ( sub_42F4DA() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2550 goto LABEL_594;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2551 if ( pParty->bTurnBasedModeOn == v0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2552 goto LABEL_595;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2553 if ( !(pParty->uFlags & 0x88) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2554 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2555 RestUI_Initialize();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2556 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2557 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2558 LABEL_594:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2559 if ( pParty->bTurnBasedModeOn == v0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2560 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2561 LABEL_595:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2562 v87 = pGlobalTXT_LocalizationStrings[478];// "You can't rest in turn-based mode!"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2563 goto _draw_status_string_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2564 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2565 v88 = pGlobalTXT_LocalizationStrings[480];// "There are hostile enemies near!"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2566 if ( pParty->uFlags & 0x88 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2567 v88 = pGlobalTXT_LocalizationStrings[479];// "You can't rest here!"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2568 ShowStatusBarString(v88, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2569 v89 = uActiveCharacter;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2570 if ( !uActiveCharacter )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2571 goto LABEL_90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2572 v176 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2573 v160 = 13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2574 goto LABEL_619;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2575 case 0x61:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2576 if ( dword_506F14 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2577 goto LABEL_621;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2578 if ( pParty->uNumFoodRations < uRestUI_FoodRequiredToRest )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2579 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2580 ShowStatusBarString(pGlobalTXT_LocalizationStrings[482], 2u);// "You don't have enough food to rest"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2581 if ( uActiveCharacter && pPlayers[uActiveCharacter]->CanAct() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2582 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2583 v89 = uActiveCharacter;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2584 v176 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2585 v160 = 108;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2586 LABEL_619:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2587 pPlayers[v89]->PlaySound(v160, v176);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2588 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2589 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2590 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2591 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2592 pParty->pPlayers[3].pConditions[2] = pParty->uTimePlayed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2593 pParty->pPlayers[2].pConditions[2] = pParty->uTimePlayed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2594 pParty->pPlayers[1].pConditions[2] = pParty->uTimePlayed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2595 pParty->pPlayers[0].pConditions[2] = pParty->uTimePlayed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2596 v90 = pMapStats->GetMapInfo(pCurrentMapName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2597 if ( !v90 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2598 v90 = rand() % (signed int)pMapStats->uNumMaps + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2599 thisj = &pMapStats->pInfos[v90];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2600 if ( rand() % 100 + 1 <= thisj->field_30 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2601 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2602 v91 = rand() % 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2603 v92 = thisj->field_31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2604 v93 = v91 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2605 if ( v93 > v92 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2606 v195 = (NPCData *)((v93 > v92 + thisj->field_32) + 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2607 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2608 v195 = (NPCData *)v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2609 if ( !sub_45063B(thisj, (int)v195) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2610 v195 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2611 if ( v195 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2612 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2613 v94 = rand() % 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2614 LODWORD(pParty->pPlayers[v94].pConditions[2]) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2615 HIDWORD(pParty->pPlayers[v94].pConditions[2]) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2616 v95 = rand();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2617 Rest(v95 % 6 + 60);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2618 _506F18_num_hours_to_sleep = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2619 dword_506F14 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2620 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2621 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2622 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2623 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2624 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2625 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2626 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2627 ShowStatusBarString(pGlobalTXT_LocalizationStrings[481], 2u);// "Encounter!"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2628 v165 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2629 v151 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2630 v144 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2631 v139 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2632 v135 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2633 v132 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2634 v130 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2635 v127 = 227;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2636 goto _play_sound_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2637 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2638 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2639 Party::TakeFood(uRestUI_FoodRequiredToRest);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2640 _506F18_num_hours_to_sleep = 480;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2641 LABEL_615:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2642 dword_506F14 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2643 pParty->RestAndHeal();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2644 pParty->field_764 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2645 pParty->pPlayers[3].pConditions[2] = pParty->uTimePlayed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2646 pParty->pPlayers[2].pConditions[2] = pParty->uTimePlayed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2647 pParty->pPlayers[1].pConditions[2] = pParty->uTimePlayed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2648 pParty->pPlayers[0].pConditions[2] = pParty->uTimePlayed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2649 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2650 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2651 case UIMSG_ShowStatus_Funds|0x8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2652 if ( dword_506F14 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2653 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2654 LABEL_621:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2655 v96 = pGlobalTXT_LocalizationStrings[477];// "You are already resting!"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2656 goto LABEL_622;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2657 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2658 GUIWindow::Create(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2659 pButton_RestUI_WaitUntilDawn->uX,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2660 pButton_RestUI_WaitUntilDawn->uY,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2661 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2662 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2663 (enum WindowType)90,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2664 (int)pButton_RestUI_WaitUntilDawn,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2665 (int)pGlobalTXT_LocalizationStrings[237]);// "Wait until Dawn"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2666 v97 = sub_494820(pParty->uCurrentHour);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2667 dword_506F14 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2668 _506F18_num_hours_to_sleep = 60 * v97 - pParty->uCurrentMinute;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2669 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2670 case 0x4E:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2671 if ( dword_50654C && byte_506550 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2672 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2673 v173 = pSpellStats->pInfos[dword_50654C + 11 * pPlayers[uActiveCharacter]->field_1A4E].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2674 v157 = pGlobalTXT_LocalizationStrings[483];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2675 _sprintex_2args_draw_status_and_continue:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2676 sprintfex(pTmpBuf, v157, v173);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2677 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2678 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2679 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2680 if ( pPlayers[uActiveCharacter]->uQuickSpell )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2681 v177 = pGlobalTXT_LocalizationStrings[584];// "Click here to remove your Quick Spell"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2682 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2683 v177 = pGlobalTXT_LocalizationStrings[484];// "Select a spell then click here to set a QuickSpell"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2684 strcpy(pTmpBuf, v177);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2685 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2686 _set_status_string_pTmpBuf_and_continue:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2687 sub_41C0B8_set_status_string(pTmpBuf);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2688 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2689 case 0x4F:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2690 if ( !uActiveCharacter
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2691 || (uNumSeconds = (unsigned int)pPlayers[uActiveCharacter],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2692 !*(char *)(uNumSeconds + 11 * *(char *)(uNumSeconds + 6734) + uMessageParam + 402)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2693 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2694 if ( sub_4637E0_is_there_popup_onscreen() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2695 dword_507B00_spell_info_to_draw_in_popup = uMessageParam + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2696 v98 = *(char *)(uNumSeconds + 6734);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2697 if ( dword_50654C - 1 == uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2698 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2699 v178 = pSpellStats->pInfos[uMessageParam + 11 * v98 + 1].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2700 v161 = pGlobalTXT_LocalizationStrings[485];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2701 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2702 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2703 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2704 v178 = pSpellStats->pInfos[uMessageParam + 11 * v98 + 1].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2705 v161 = pGlobalTXT_LocalizationStrings[486];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2706 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2707 sprintfex(pTmpBuf, v161, v178);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2708 sub_41C0B8_set_status_string(pTmpBuf);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2709 goto LABEL_91;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2710 case 0x58:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2711 GUIWindow::Create(ptr_5064F8->uX, ptr_5064F8->uY, 0, 0, (enum WindowType)90, (int)ptr_5064F8, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2712 if ( !uActiveCharacter )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2713 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2714 thisk = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2715 if ( !byte_506550 || !dword_50654C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2716 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2717 v165 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2718 v151 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2719 v144 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2720 v139 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2721 v135 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2722 v132 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2723 thisk->uQuickSpell = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2724 v130 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2725 dword_50654C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2726 v127 = 203;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2727 goto _play_sound_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2728 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2729 v99 = dword_50654C + 11 * pPlayers[uActiveCharacter]->field_1A4E;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2730 pPlayers[uActiveCharacter]->uQuickSpell = v99;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2731 stru_A750F8[uActiveCharacter + 3]._494836(v99, uActiveCharacter);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2732 if ( uActiveCharacter )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2733 thisk->PlaySound(12, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2734 byte_506550 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2735 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2736 case 0x33:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2737 if ( !uActiveCharacter )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2738 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2739 v100 = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2740 v195 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2741 uAction = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2742 v101 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2743 thisl = (int)&v100->pActiveSkills[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2744 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2745 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2746 if ( *(short *)thisl )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2747 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2748 if ( v100->field_1A4E == v101 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2749 uAction = (int)v195;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2750 v102 = (int)v195;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2751 v195 = (NPCData *)((char *)v195 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2752 v217[v102] = v101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2753 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2754 thisl += 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2755 ++v101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2756 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2757 while ( v101 < 9 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2758 if ( !v195 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2759 goto LABEL_662;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2760 if ( GetAsyncKeyState(16) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2761 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2762 --uAction;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2763 if ( uAction < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2764 uAction = (int)((char *)v195 - 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2765 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2766 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2767 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2768 ++uAction;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2769 if ( uAction >= (signed int)v195 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2770 uAction = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2771 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2772 sub_41140B();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2773 pPlayers[uActiveCharacter]->field_1A4E = LOBYTE(v217[uAction]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2774 goto LABEL_661;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2775 case UIMSG_SaveGame|0x4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2776 if ( pTurnEngine->field_4 == 3 || !uActiveCharacter || uMessageParam == pPlayers[uActiveCharacter]->field_1A4E )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2777 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2778 sub_41140B();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2779 pPlayers[uActiveCharacter]->field_1A4E = uMessageParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2780 LABEL_661:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2781 pGUIWindow_CurrentMenu->_411621();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2782 LABEL_662:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2783 v165 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2784 v151 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2785 v144 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2786 v139 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2787 v135 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2788 v132 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2789 v130 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2790 v127 = rand() % 2 + 204;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2791 goto _play_sound_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2792 case UIMSG_LoadGame|0x4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2793 if ( pTurnEngine->field_4 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2794 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2795 if ( uActiveCharacter )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2796 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2797 uNumSeconds = (unsigned int)pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2798 if ( *(char *)(uNumSeconds + 11 * *(char *)(uNumSeconds + 6734) + uMessageParam + 402) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2799 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2800 if ( dword_50654C - 1 == uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2801 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2802 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2803 pEventTimer->Resume();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2804 viewparams->bRedrawGameUI = v0;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2805 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2806 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2807 v103 = dword_50654C + 11 * *(char *)(uNumSeconds + 6734);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2808 if ( dword_50C9E8 < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2809 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2810 dword_50C9EC[3 * dword_50C9E8] = 142;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2811 dword_50C9F0[3 * dword_50C9E8] = v103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2812 *(&dword_50C9E8 + 3 * dword_50C9E8 + 3) = uActiveCharacter - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2813 ++dword_50C9E8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2814 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2815 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2816 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2817 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2818 byte_506550 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2819 dword_50654C = uMessageParam + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2820 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2821 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2822 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2823 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2824 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2825 case 0x8E:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2826 if ( pTurnEngine->field_4 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2827 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2828 v175 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2829 v159 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2830 v147 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2831 goto LABEL_678;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2832 case 0x92:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2833 if ( pTurnEngine->field_4 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2834 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2835 v175 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2836 v159 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2837 v147 = 133;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2838 LABEL_678:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2839 v80 = v199;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2840 v79 = uMessageParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2841 LABEL_679:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2842 _42777D_CastSpell_UseWand_ShootArrow(v79, v80, v147, v159, v175);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2843 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2844 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2845 case 0x69:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2846 if ( pTurnEngine->field_4 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2847 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2848 if ( bUnderwater == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2849 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2850 LABEL_682:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2851 v96 = pGlobalTXT_LocalizationStrings[652];// "You can not do that while you are underwater!"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2852 LABEL_622:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2853 ShowStatusBarString(v96, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2854 LABEL_623:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2855 v165 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2856 v151 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2857 v144 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2858 v139 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2859 v135 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2860 v132 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2861 v130 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2862 v127 = 27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2863 _play_sound_and_continue:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2864 pAudioPlayer->PlaySound((SoundID)v127, v130, v132, v135, v139, v144, v151, v165);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2865 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2866 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2867 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2868 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2869 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2870 if ( uActiveCharacter && !pPlayers[uActiveCharacter]->uTimeToRecovery )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2871 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2872 if ( !pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2873 goto LABEL_693;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2874 if ( pCurrentScreen != 5
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2875 && pCurrentScreen != 7
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2876 && (pCurrentScreen <= 99
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2877 || pCurrentScreen > 103) )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2878 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2879 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2880 LABEL_693:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2881 GUIWindow::Create(0x1DCu, 0x1C2u, 0, 0, (enum WindowType)90, (int)ptr_5079F8, 0);
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2882 pCurrentScreen = 8;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2883 pEventTimer->Pause();
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2884 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)18, 0, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2885 pAudioPlayer->PlaySound((SoundID)48, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2886 viewparams->field_48 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2887 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2888 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2889 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2890 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2891 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2892 case 0x6A:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2893 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2894 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2895 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2896 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2897 ++pIcons_LOD->uTexturePacksCount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2898 if ( !pIcons_LOD->uNumPrevLoadedFiles )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2899 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2900 GUIWindow::Create(0x230u, 0x1C2u, 0, 0, (enum WindowType)90, (int)ptr_5079F4, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2901 viewparams->bRedrawGameUI = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2902 pEventTimer->Pause();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2903 pAudioPlayer->StopChannels(-1, -1);
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2904 pCurrentScreen = 104;
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2905 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)12, 5, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2906 papredoll_dbrds[2] = pIcons_LOD->LoadTexture("BUTTEXI1", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2907 ptr_5076F4 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2908 0x187u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2909 0x13Cu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2910 0x4Bu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2911 0x21u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2912 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2913 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2914 0x71u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2915 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2916 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2917 pGlobalTXT_LocalizationStrings[79],// "Exit"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2918 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2919 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2920 v179);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2921 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2922 case 0x6B:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2923 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2924 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2925 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2926 pEventTimer->Resume();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2927 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2928 viewparams->bRedrawGameUI = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2929 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2930 stru_506E40.Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2931 uNumSeconds = (unsigned int)MakeScreenshot(155, 117);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2932 pRenderer->SavePCXImage("gamma.pcx", (char *)uNumSeconds, 155, 117);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2933 free((void *)uNumSeconds);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2934 stru_506E40._40E55E("gamma.pcx", 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2935 GUIWindow::Create(0x25Au, 0x1C2u, 0, 0, (enum WindowType)92, (int)ptr_5079F0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2936 LABEL_453:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2937 if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2938 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2939 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2940 goto LABEL_770;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2941 case UIMSG_C0:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2942 dword_50651C = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2943 if ( pMouse->GetCursorPos(&v211)->y > 178 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2944 dword_50651C = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2945 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2946 case UIMSG_A9:
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2947 GUIWindow::Create(ptr_507B9C->uX, ptr_507B9C->uY, 0, 0, (WindowType)(WINDOW_HouseInterior|0x42), (int)ptr_507B9C, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2948 LABEL_707:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2949 dword_506548 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2950 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2951 case UIMSG_AA:
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2952 GUIWindow::Create(ptr_507BA0->uX, ptr_507BA0->uY, 0, 0, (WindowType)(WINDOW_HouseInterior|0x42), (int)ptr_507BA0, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2953 LABEL_709:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2954 dword_506544 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2955 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2956 case 0x55:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2957 bRingsShownInCharScreen ^= v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2958 GUIButton::_41D0D8(ptr_507694);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2959 GUIButton::_41D0D8(ptr_507690);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2960 if ( bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2961 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2962 v128 = (uTextureID_5118C8 != -1 ? pIcons_LOD->pTextures[uTextureID_5118C8].uTextureHeight : 26);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2963 v125 = (uTextureID_5118C8 != -1 ? pIcons_LOD->pTextures[uTextureID_5118C8].uTextureWidth : 24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2964 v123 = 445;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2965 v121 = 470;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2966 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2967 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2968 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2969 v128 = 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2970 v125 = 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2971 v123 = 300;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2972 v121 = 600;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2973 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2974 ptr_507694 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2975 v121,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2976 v123,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2977 v125,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2978 v128,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2979 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2980 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2981 0x55u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2982 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2983 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2984 pGlobalTXT_LocalizationStrings[64],// "Detail Toggle"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2985 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2986 ptr_507690 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2987 0x1DCu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2988 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2989 0xA4u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2990 0x159u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2991 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2992 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2993 0x85u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2994 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2995 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2996 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2997 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2998 goto LABEL_422;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2999 case UIMSG_Quit|0x1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3000 OnPaperdollLeftClick();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3001 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3002 case UIMSG_CloseBook|0x2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3003 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3004 sub_4196A0();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3005 sub_419379();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3006 v85 = pCharacterScreen_StatsBtn;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3007 goto LABEL_716;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3008 case UIMSG_ChangeMusicVolume|0x2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3009 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3010 sub_4196A0();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3011 sub_419379();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3012 sub_419401();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3013 v85 = pCharacterScreen_SkillsBtn;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3014 goto LABEL_716;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3015 case UIMSG_SkillUp:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3016 v104 = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3017 v105 = (int)&v104->pActiveSkills[uMessageParam];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3018 LOWORD(v2) = *(short *)v105;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3019 uNumSeconds = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3020 if ( v104->uSkillPoints < (v2 & 0x3F) + 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3021 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3022 v87 = pGlobalTXT_LocalizationStrings[488];// "You don't have enough skill points!"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3023 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3024 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3025 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3026 if ( (uNumSeconds & 0x3F) < 0x3C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3027 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3028 *(short *)v105 = uNumSeconds + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3029 v104->uSkillPoints -= v104->pActiveSkills[uMessageParam] & 0x3F;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3030 v104->PlaySound(14, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3031 v165 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3032 v151 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3033 v144 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3034 v139 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3035 v135 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3036 v132 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3037 v130 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3038 v127 = 20001;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3039 goto _play_sound_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3040 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3041 v87 = pGlobalTXT_LocalizationStrings[487];// "You have already mastered this skill!"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3042 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3043 _draw_status_string_and_continue:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3044 ShowStatusBarString(v87, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3045 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3046 case UIMSG_ChangeMusicVolume|0x4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3047 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3048 sub_419379();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3049 sub_4196A0();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3050 v85 = pCharacterScreen_InventoryBtn;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3051 LABEL_716:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3052 v163 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3053 v149 = v85;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3054 v142 = (WindowType)91;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3055 goto LABEL_731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3056 case UIMSG_A8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3057 v85 = ptr_50767C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3058 v163 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3059 v149 = ptr_50767C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3060 v142 = (WindowType)97;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3061 goto LABEL_731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3062 case UIMSG_CloseBook|0x4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3063 sub_419379();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3064 sub_4196A0();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3065 sub_419220();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3066 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 102;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3067 GUIWindow::Create(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3068 pCharacterScreen_AwardsBtn->uX,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3069 pCharacterScreen_AwardsBtn->uY,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3070 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3071 0,
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
3072 (WindowType)(WINDOW_HouseInterior|0x42),
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3073 (int)pCharacterScreen_AwardsBtn,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3074 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3075 sub_419100();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3076 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3077 case 0x47:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3078 switch ( uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3079 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3080 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3081 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3082 case 11:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3083 goto LABEL_707;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3084 case 10:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3085 goto LABEL_709;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3086 case 0:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3087 v85 = pBtn_Book_1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3088 dword_506544 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3089 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3090 case 1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3091 v85 = pBtn_Book_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3092 dword_506548 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3093 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3094 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3095 dword_506540 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3096 if ( dword_506364 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3097 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3098 v85 = pBtn_Book_3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3099 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3100 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3101 dword_50653C = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3102 if ( dword_506364 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3103 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3104 v85 = pBtn_Book_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3105 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3106 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3107 dword_506538 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3108 if ( dword_506364 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3109 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3110 v85 = pBtn_Book_5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3111 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3112 case 5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3113 dword_506534 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3114 if ( dword_506364 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3115 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3116 v85 = pBtn_Book_6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3117 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3118 case 6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3119 v85 = pBtn_Autonotes_Misc;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3120 dword_506530 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3121 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3122 case 7:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3123 v85 = pBtn_Autonotes_Instructors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3124 dword_50652C = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3125 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3126 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3127 v163 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3128 v149 = v85;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3129 v142 = (WindowType)92;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3130 LABEL_731:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3131 v8 = v85->uY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3132 v9 = v85->uX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3133 goto LABEL_732;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3134 case UIMSG_SelectCharacter:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3135 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3136 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3137 GameUI_OnPlayerPortraitLeftClick(uMessageParam);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3138 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3139 case UIMSG_ShowStatus_Funds:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3140 v174 = (char *)pParty->uNumGoldInBank;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3141 v158 = pParty->uNumGold + pParty->uNumGoldInBank;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3142 v146 = pGlobalTXT_LocalizationStrings[489];// "You have %d total gold, %d in the Bank""
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3143 goto _sprintex_draw_status_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3144 case UIMSG_ShowStatus_DateTime:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3145 v195 = (NPCData *)pParty->uCurrentHour;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3146 if ( (signed int)pParty->uCurrentHour <= 12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3147 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3148 if ( !v195 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3149 v195 = (NPCData *)12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3150 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3151 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3152 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3153 v195 = (NPCData *)((char *)v195 - 12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3154 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3155 if ( pParty->uCurrentHour < 0xC || (uNumSeconds = v0, pParty->uCurrentHour >= 0x18) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3156 uNumSeconds = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3157 sprintfex(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3158 pTmpBuf,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3159 "%d:%02d%s %s %d %s %d",
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3160 v195,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3161 pParty->uCurrentMinute,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3162 aAMPMNames[uNumSeconds],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3163 aDayNames[pParty->uDaysPlayed % 7],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3164 7 * pParty->uCurrentMonthWeek + pParty->uDaysPlayed % 7 + 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3165 aMonthNames[pParty->uCurrentMonth],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3166 pParty->uCurrentYear);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3167 goto _set_status_string_pTmpBuf_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3168 case UIMSG_ShowStatus_Food:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3169 v173 = (char *)pParty->uNumFoodRations;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3170 v157 = pGlobalTXT_LocalizationStrings[501];// You have %lu food"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3171 goto _sprintex_2args_draw_status_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3172 case UIMSG_ShowStatus_Player:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3173 v106 = pPlayers[uMessageParam];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3174 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[429], v106->pName, pClassNames[v106->uClass]);// "%s the %s"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3175 strcat(pTmpBuf, ": ");
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
3176 v107 = v106->GetMajorConditionIdx();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3177 strcat(pTmpBuf, aCharacterConditionNames[v107]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3178 sub_41C0B8_set_status_string(pTmpBuf);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3179 v108 = 8 * uMessageParam - 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3180 LOBYTE(v108) = v108 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3181 pMouse->uPointingObjectID = v108;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3182 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3183 case UIMSG_ShowStatus_ManaHP:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3184 v109 = pGlobalTXT_LocalizationStrings[212];// "Spell Points"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3185 v110 = pPlayers[uMessageParam];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3186 v111 = v110->GetMaxMana();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3187 v112 = v110->sMana;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3188 v113 = pGlobalTXT_LocalizationStrings[108];// "Hit Points"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3189 v114 = v110->GetMaxHealth();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3190 sprintfex(pTmpBuf, "%d / %d %s %d / %d %s", v110->sHealth, v114, v113, v112, v111, v109);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3191 goto _set_status_string_pTmpBuf_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3192 case 0xC:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3193 if ( pCurrentScreen == 15 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3194 goto LABEL_762;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3195 sub_420E01();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3196 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3197 case UIMSG_ChangeMusicVolume|0x8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3198 LABEL_762:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3199 sub_421EA6_OnInventoryLeftClick();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3200 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3201 case 0xA:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3202 if ( !pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3203 goto LABEL_772;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3204 v115 = pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3205 if ( !pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3206 goto LABEL_768;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3207 if ( pMessageQueue_50CBD0->pMessages[0].field_8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3208 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3209 v115 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3210 pMessageQueue_50CBD0->uNumMessages = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3211 LABEL_769:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3212 pMessageQueue_50CBD0->pMessages[v115].eType = (UIMessageType)14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3213 LABEL_770:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3214 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3215 goto LABEL_771;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3216 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3217 v115 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3218 pMessageQueue_50CBD0->uNumMessages = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3219 LABEL_768:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3220 if ( (signed int)v115 < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3221 goto LABEL_769;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3222 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3223 case 0xE:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3224 LABEL_772:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3225 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3226 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3227 OnGameViewportClick();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3228 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3229 case 0xF:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3230 if ( pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3231 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3232 LOWORD(v116) = pGame->pVisInstance->get_picked_object_zbuf_val();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3233 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3234 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3235 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3236 uNumSeconds = (unsigned int)pMouse->GetCursorPos(&v209);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3237 v117 = pMouse->GetCursorPos(&v204);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3238 v116 = pRenderer->pActiveZBuffer[*(int *)uNumSeconds + pSRZBufferLineOffsets[v117->y]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3239 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3240 v163 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3241 v149 = (GUIButton *)(unsigned __int16)v116;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3242 v142 = (WindowType)15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3243 goto LABEL_779;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3244 case 0x54:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3245 v163 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3246 v149 = (GUIButton *)uMessageParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3247 v142 = (WindowType)22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3248 LABEL_779:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3249 v8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3250 v9 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3251 LABEL_732:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3252 v137 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3253 v133 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3254 LABEL_733:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3255 GUIWindow::Create(v9, v8, v133, v137, v142, (int)v149, v163);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3256 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3257 case 0x194:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3258 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3259 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3260 OnPressSpace();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3261 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3262 case UIMSG_ChangeSoundVolume|0x100:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3263 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3264 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3265 pParty->uFlags |= 2u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3266 GUIWindow::Create(0x207u, 0x88u, 0, 0, (enum WindowType)90, (int)dword_507A14, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3267 uNumSeconds = 131072;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3268 v118 = 2 * viewparams->uMinimapZoom;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3269 ++viewparams->field_28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3270 viewparams->uMinimapZoom *= 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3271 if ( uCurrentlyLoadedLevelType != LEVEL_Outdoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3272 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3273 if ( (signed int)v118 > 4096 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3274 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3275 viewparams->uMinimapZoom = 4096;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3276 viewparams->field_28 = 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3277 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3278 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3279 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3280 v119 = 2048;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3281 if ( (signed int)v118 <= 2048 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3282 goto LABEL_789;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3283 viewparams->field_28 = 11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3284 goto LABEL_788;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3285 case UIMSG_ChangeMusicVolume|0x100:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3286 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3287 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3288 pParty->uFlags |= 2u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3289 GUIWindow::Create(0x23Eu, 0x88u, 0, 0, (enum WindowType)90, (int)dword_507A18, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3290 uNumSeconds = 32768;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3291 v118 = (unsigned __int64)((signed __int64)(signed int)viewparams->uMinimapZoom << 15) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3292 --viewparams->field_28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3293 viewparams->uMinimapZoom = (unsigned __int64)((signed __int64)(signed int)viewparams->uMinimapZoom << 15) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3294 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3295 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3296 v119 = 512;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3297 if ( (signed int)v118 < 512 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3298 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3299 viewparams->field_28 = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3300 LABEL_788:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3301 v118 = v119;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3302 viewparams->uMinimapZoom = v119;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3303 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3304 LABEL_789:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3305 dword_576E2C = v118;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3306 dword_576E28 = viewparams->field_28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3307 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3308 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3309 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3310 if ( (signed int)v118 < 256 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3311 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3312 viewparams->uMinimapZoom = 256;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3313 viewparams->field_28 = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3314 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3315 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3316 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3317 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3318 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3319 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3320 pMessageQueue_50CBD0->uNumMessages = dword_50C9E8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3321 memcpy(pMessageQueue_50CBD0->pMessages, dword_50C9EC, 12 * dword_50C9E8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3322 dword_50C9E8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3323 if ( dword_50C9DC )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3324 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3325 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3326 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3327 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)dword_50C9DC;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3328 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = (int)ptr_50C9E0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3329 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3330 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3331 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3332 dword_50C9DC = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3333 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3334 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3335 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3336 if ( dword_50C9D0 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3337 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3338 dword_50C9D8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3339 if ( dword_50C9D8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3340 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3341 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3342 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3343 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)dword_50C9D0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3344 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = dword_50C9D4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3345 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3346 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3347 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3348 dword_50C9D0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3349 dword_50C9D4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3350 dword_50C9D8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3351 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3352 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3353 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3354 pStru277->_427E01_cast_spell();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3355 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3356
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3357
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3358 //----- (004356FF) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3359 void __cdecl back_to_game()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3360 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3361 dword_507BF0_is_there_popup_onscreen = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3362 dword_4E455C = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3363 dword_50CDCC = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3364 if ( ptr_507BC4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3365 free_book_subwindow();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3366 if ( !pCurrentScreen
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3367 && !ptr_507BD4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3368 pEventTimer->Resume();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3369 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3370 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3371 //----- (00435748) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3372 void __cdecl GUI_MainMenuMessageProc()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3373 {
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
3374 //AudioPlayer *v0; // ebp@2
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3375 char *v1; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3376 unsigned int v2; // ecx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3377 void *v3; // edi@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3378 signed int v4; // eax@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3379 int v5; // ecx@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3380 enum PLAYER_SKILL_TYPE v6; // edi@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3381 GUIWindow *v7; // eax@56
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3382 unsigned int v8; // edx@56
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3383 Player *v9; // edi@57
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3384 signed int v10; // eax@58
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3385 GUIButton *v11; // eax@59
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3386 unsigned __int8 v12; // sf@62
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3387 signed int v13; // eax@64
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3388 unsigned int v14; // eax@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3389 int v15; // edi@70
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3390 char v16; // zf@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3391 int v17; // eax@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3392 unsigned int v18; // ecx@105
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3393 int v19; // edi@116
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3394 char v20; // dl@116
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3395 unsigned int v21; // eax@116
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3396 Player *v22; // ecx@116
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3397 char *v23; // ebx@118
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3398 int v24; // eax@118
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3399 unsigned int v25; // eax@120
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3400 unsigned int v26; // ecx@127
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3401 unsigned int v27; // eax@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3402 unsigned __int8 v28; // of@129
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3403 SoundID pSoundID; // [sp-2Ch] [bp-3Ch]@36
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3404 signed int v30; // [sp-28h] [bp-38h]@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3405 unsigned int v31; // [sp-24h] [bp-34h]@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3406 signed int v32; // [sp-20h] [bp-30h]@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3407 unsigned int v33; // [sp-20h] [bp-30h]@105
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3408 signed int v34; // [sp-1Ch] [bp-2Ch]@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3409 unsigned int v35; // [sp-1Ch] [bp-2Ch]@105
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3410 int v36; // [sp-18h] [bp-28h]@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3411 enum WindowType v37; // [sp-18h] [bp-28h]@105
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3412 unsigned int v38; // [sp-14h] [bp-24h]@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3413 int v39; // [sp-14h] [bp-24h]@56
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3414 signed int v40; // [sp-10h] [bp-20h]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3415 signed int v41; // [sp-10h] [bp-20h]@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3416 int v42; // [sp-10h] [bp-20h]@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3417 int v43; // [sp-10h] [bp-20h]@56
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3418 int uNum; // [sp+4h] [bp-Ch]@3
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3419 UIMessageType v45; // [sp+8h] [bp-8h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3420 int v46; // [sp+Ch] [bp-4h]@3
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3421 Player *pPlayer;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3422
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3423 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3424 {
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
3425 //v0 = pAudioPlayer;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3426 v1 = (char *)pParty->pPlayers;
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3427 pPlayer = pParty->pPlayers;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3428 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3429 {
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3430 pMessageQueue_50CBD0->PopMessage(&v45, &uNum, &v46);
3
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3431 switch (v45)
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3432 {
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3433 case UIMSG_MainMenu_ShowPartyCreationWnd:
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3434 {
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3435 GUIWindow::Create(495, 172, 0, 0, WINDOW_5A, (int)pMainMenu_BtnNew, 0);
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3436 SetCurrentMenuID(MENU_NEWGAME);
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3437 }
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3438 continue;
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3439
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3440 case UIMSG_MainMenu_ShowLoadWindow:
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3441 {
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3442 GUIWindow::Create(495, 227, 0, 0, WINDOW_5A, (int)pMainMenu_BtnLoad, 0);
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3443 SetCurrentMenuID(MENU_SAVELOAD);
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3444 }
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3445 continue;
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3446
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3447 case UIMSG_ShowCredits:
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3448 {
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3449 GUIWindow::Create(495, 282, 0, 0, WINDOW_5A, (int)pMainMenu_BtnCredits, 0);
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3450 SetCurrentMenuID(MENU_CREDITS);
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3451 }
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3452 continue;
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3453
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3454 case UIMSG_ExitToWindows:
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3455 {
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3456 GUIWindow::Create(495, 337, 0, 0, WINDOW_5A, (int)pMainMenu_BtnExit, 0);
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3457 SetCurrentMenuID(MENU_FINISHED);
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3458 }
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3459 continue;
14
Nomad
parents: 4
diff changeset
3460
Nomad
parents: 4
diff changeset
3461 case UIMSG_LoadGame:
Nomad
parents: 4
diff changeset
3462 {
Nomad
parents: 4
diff changeset
3463 if (!pSavegameUsedSlots[uLoadGameUI_SelectedSlot])
Nomad
parents: 4
diff changeset
3464 continue;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
3465
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
3466 SetCurrentMenuID(MENU_LOAD);
14
Nomad
parents: 4
diff changeset
3467 }
Nomad
parents: 4
diff changeset
3468 continue;
3
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3469 }
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3470
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3471
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3472 switch (v45)
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3473 {
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3474 case UIMSG_A5: // WINDOW_5A
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3475 {
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3476 //main menu save/load wnd clicking on savegame lines
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3477 if (pGUIWindow_CurrentMenu->field_40 == 1)
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3478 pKeyActionMap->_459ED1(0);
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3479 if ( pCurrentScreen != 11
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3480 || uLoadGameUI_SelectedSlot != uNum + dword_6A0C9C )
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3481 {
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3482 //load clicked line
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3483 v26 = uNum + dword_6A0C9C;
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3484 if ( dword_6BE138 == uNum + dword_6A0C9C )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3485 {
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3486 pMessageQueue_50CBD0->SendMessage(UIMSG_A4, 0, 0);
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3487 pMessageQueue_50CBD0->SendMessage(UIMSG_LoadGame, 0, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3488 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3489 uLoadGameUI_SelectedSlot = v26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3490 dword_6BE138 = v26;
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3491 }
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3492 else
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3493 {
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3494 //typing in the line
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3495 pKeyActionMap->_459E5A(0, 19, pGUIWindow_CurrentMenu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3496 strcpy(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3497 (char *)pKeyActionMap->pPressedKeysBuffer,
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3498 pSavegameHeader[uLoadGameUI_SelectedSlot].pName);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3499 pKeyActionMap->uNumKeysPressed = strlen((const char *)pKeyActionMap->pPressedKeysBuffer);
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3500 }
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3501 }
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3502 continue;
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3503
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3504
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3505 case UIMSG_A4:
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3506 {
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3507 GUIWindow::Create(pGUIWindow_CurrentMenu->uFrameX + 241,
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3508 pGUIWindow_CurrentMenu->uFrameY + 302,
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3509 61, 28, WINDOW_5E, (int)ptr_69BD64, 0);
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3510 }
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3511 continue;
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3512 }
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3513
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3514 if ( (signed int)v45 > 75 )
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3515 {
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3516 if ( v45 > UIMSG_A3 )
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3517 {
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3518 if ( v45 == UIMSG_A6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3519 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3520 v43 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3521 v39 = (int)ptr_69BD60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3522 v8 = pGUIWindow_CurrentMenu->uFrameY + 302;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3523 v37 = (WindowType)95;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3524 v18 = pGUIWindow_CurrentMenu->uFrameX + 350;
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3525 v35 = 28;
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3526 v33 = 61;
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3527 GUIWindow::Create(v18, v8, v33, v35, v37, v39, v43);
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3528 continue;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3529 }
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3530 if ( v45 == UIMSG_AB ) // sellect face -1
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3531 {
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3532 pPlayer = &pParty->pPlayers[uNum];
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3533 v12 = (char)((int)pPlayer->uFace - 1) < 0;
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3534 --pPlayer->uFace;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3535 if ( v12 )
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3536 pPlayer->uFace = 19;
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3537 pPlayer->uVoiceID = pPlayer->uFace;
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3538 pPlayer->SetInitialStats();
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3539 pPlayer->SetSexByVoice();
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3540 pPlayer->RandomizeName();
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3541 v25 = uNum;
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3542 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3543 - pGUIWindow_CurrentMenu->pStartingPosActiveItem)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3544 % 7
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3545 + pGUIWindow_CurrentMenu->pStartingPosActiveItem
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3546 + 7 * uNum;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3547 uPlayerCreationUI_SelectedCharacter = v25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3548 GUIWindow::Create(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3549 pCreationUI_BtnPressLeft[v25]->uX,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3550 pCreationUI_BtnPressLeft[v25]->uY,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3551 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3552 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3553 (enum WindowType)92,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3554 (int)pCreationUI_BtnPressLeft[v25],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3555 1);
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
3556 //v0 = pAudioPlayer;
37
cad1f62f21c0 18.10.12
Ritor1
parents: 27
diff changeset
3557 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0.0, 0);
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3558 v22 = pPlayer;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3559 goto LABEL_117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3560 }
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3561 if ( v45 == UIMSG_AC ) //sellect face +1
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3562 {
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3563 pPlayer = &pParty->pPlayers[uNum];
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3564 v20 = (char)((int)pPlayer->uFace + 1) % 20;
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3565 pPlayer->uFace = v20;
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3566 pPlayer->uVoiceID = v20;
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3567 pPlayer->SetInitialStats();
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3568 pPlayer->SetSexByVoice();
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3569 pPlayer->RandomizeName();
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3570 v21 = uNum;
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3571 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3572 - pGUIWindow_CurrentMenu->pStartingPosActiveItem)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3573 % 7
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3574 + pGUIWindow_CurrentMenu->pStartingPosActiveItem
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3575 + 7 * uNum;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3576 uPlayerCreationUI_SelectedCharacter = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3577 GUIWindow::Create(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3578 pCreationUI_BtnPressRight[v21]->uX,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3579 pCreationUI_BtnPressRight[v21]->uY,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3580 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3581 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3582 (enum WindowType)92,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3583 (int)pCreationUI_BtnPressRight[v21],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3584 1);
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
3585 //v0 = pAudioPlayer;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3586 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0);
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3587 v22 = pPlayer;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3588 LABEL_117:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3589 v22->PlaySound(102, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3590 v1 = (char *)pParty->pPlayers;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3591 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3592 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3593 if ( v45 == UIMSG_AD )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3594 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3595 GUIWindow::Create(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3596 pMainMenu_BtnNew->uX,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3597 pMainMenu_BtnNew->uY,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3598 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3599 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3600 (enum WindowType)90,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3601 (int)pMainMenu_BtnNew,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3602 0);
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
3603 SetCurrentMenuID(MENU_LOAD);
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
3604 continue;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3605 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3606 if ( v45 != 174 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3607 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3608 GUIWindow::Create(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3609 pMainMenu_BtnExit->uX,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3610 pMainMenu_BtnExit->uY,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3611 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3612 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3613 (enum WindowType)90,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3614 (int)pMainMenu_BtnExit,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3615 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3616 LABEL_114:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3617 v40 = 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3618 LABEL_89:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3619 v2 = v40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3620 LABEL_90:
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
3621 SetCurrentMenuID((MENU_STATE)v2);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3622 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3623 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3624 if ( v45 == UIMSG_A3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3625 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3626 ++dword_6A0C9C;
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3627 if ( dword_6A0C9C >= uNum )
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3628 dword_6A0C9C = uNum - 1;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3629 if ( dword_6A0C9C < 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3630 dword_6A0C9C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3631 v7 = pGUIWindow_CurrentMenu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3632 v43 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3633 v39 = (int)ptr_69BD58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3634 v8 = pGUIWindow_CurrentMenu->uFrameY + 323;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3635 goto LABEL_105;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3636 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3637 if ( v45 == 107 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3638 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3639 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3640 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3641 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3642 pEventTimer->Resume();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3643 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3644 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3645 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3646 GUIWindow::Create(0x25Au, 0x1C2u, 0, 0, (enum WindowType)92, (int)ptr_5079F0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3647 if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3648 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3649 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3650 goto LABEL_93;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3651 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3652 if ( v45 == UIMSG_CloseBook )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3653 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3654 if ( ptr_507BDC )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3655 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3656 sub_41426F();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3657 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3658 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3659 if ( !(BYTE1(dword_6BE364_game_settings_1) & 0x40) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3660 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3661 v15 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3662 pVideoPlayer->bStopBeforeSchedule = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3663 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3664 viewparams->field_48 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3665 if ( !GetCurrentMenuID() || GetCurrentMenuID() == 6 || GetCurrentMenuID() == 7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3666 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3667 v17 = pCurrentScreen;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3668 LABEL_83:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3669 if ( v17 == 16 )
21
3fa5d0522f92 Both Bink 1.5.21.0 & 3.0.0.0 support added
Nomad
parents: 14
diff changeset
3670 pVideoPlayer->FastForwardToFrame(pVideoPlayer->field_40);
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
3671 if (GetCurrentMenuID() == MENU_7)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3672 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3673 v40 = 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3674 goto LABEL_89;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3675 }
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
3676 if (GetCurrentMenuID() == MENU_Credits)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3677 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3678 v40 = 11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3679 goto LABEL_89;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3680 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3681 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3682 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3683 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3684 LABEL_93:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3685 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3686 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3687 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3688 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3689 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3690 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3691 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3692 v16 = GetCurrentMenuID() == 8;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3693 v17 = pCurrentScreen;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3694 if ( v16
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3695 && !pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3696 goto LABEL_83;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3697 if ( pCurrentScreen == 12 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3698 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3699 pIcons_LOD->_4114F2();
26
93bf1d5f6a6d Game loading.
Nomad
parents: 23
diff changeset
3700 //crt_deconstruct_ptr_6A0118();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3701 pTexture_PCX.Release();
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3702 pTexture_PCX.Load("title.pcx", 0);
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
3703 SetCurrentMenuID(MENU_MAIN);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3704 v15 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3705 LABEL_81:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3706 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3707 pGUIWindow2->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3708 pGUIWindow2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3709 pEventTimer->Resume();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3710 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3711 viewparams->bRedrawGameUI = v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3712 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3713 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3714 if ( pCurrentScreen == 16 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3715 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3716 pVideoPlayer->Unload();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3717 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3718 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3719 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3720 if ( pCurrentScreen != 27 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3721 goto LABEL_81;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3722 //VideoPlayer::dtor();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3723 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3724 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3725 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3726 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3727 if ( v45 == 118 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3728 {
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3729 v14 = uNum;
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3730 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3731 - pGUIWindow_CurrentMenu->pStartingPosActiveItem)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3732 % 7
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3733 + pGUIWindow_CurrentMenu->pStartingPosActiveItem
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3734 + 7 * uNum;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3735 uPlayerCreationUI_SelectedCharacter = v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3736 LABEL_36:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3737 v42 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3738 v38 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3739 v36 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3740 v34 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3741 v32 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3742 v31 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3743 v30 = 0;
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3744 pSoundID = (SoundID)66;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3745 LABEL_40:
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3746 pAudioPlayer->PlaySound(pSoundID, v30, v31, v32, v34, v36, v38, v42);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3747 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3748 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3749 if ( v45 == 144 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3750 {
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3751 v9 = &pPlayer[uNum];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3752 v46 = v9->GetSexByVoice();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3753 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3754 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3755 v12 = ((v9->uVoiceID-- - 1) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3756 if ( v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3757 v9->uVoiceID = 19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3758 v13 = v9->GetSexByVoice();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3759 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3760 while ( v13 != v46 );
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3761 v11 = pCreationUI_BtnPressLeft2[uNum];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3762 goto LABEL_60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3763 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3764 if ( v45 == 145 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3765 {
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3766 v9 = &pPlayer[uNum];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3767 v46 = v9->GetSexByVoice();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3768 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3769 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3770 v9->uVoiceID = (signed int)(v9->uVoiceID + 1) % 20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3771 v10 = v9->GetSexByVoice();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3772 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3773 while ( v10 != v46 );
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3774 v11 = pCreationUI_BtnPressRight2[uNum];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3775 LABEL_60:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3776 GUIWindow::Create(v11->uX, v11->uY, 0, 0, (enum WindowType)92, (int)v11, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3777 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3778 v9->PlaySound(102, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3779 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3780 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3781 if ( v45 == UIMSG_A2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3782 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3783 --dword_6A0C9C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3784 if ( dword_6A0C9C < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3785 dword_6A0C9C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3786 v7 = pGUIWindow_CurrentMenu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3787 v43 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3788 v39 = (int)ptr_69BD5C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3789 v8 = pGUIWindow_CurrentMenu->uFrameY + 197;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3790 LABEL_105:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3791 v37 = (WindowType)90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3792 v35 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3793 v33 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3794 v18 = v7->uFrameX + 215;
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3795 GUIWindow::Create(v18, v8, v33, v35, v37, v39, v43);
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3796 continue;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3797 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3798 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3799 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3800 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3801 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3802 if ( v45 == 75 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3803 {
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3804 uPlayerCreationUI_SelectedCharacter = uNum;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3805 v41 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3806 v1 = (char *)pParty->pPlayers;
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3807 v5 = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3808 + pGUIWindow_CurrentMenu->pStartingPosActiveItem
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3809 + 7 * uNum;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3810 goto LABEL_44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3811 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3812 if ( (signed int)v45 > 60 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3813 {
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3814 if ( v45 == 62 ) //click +
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3815 {
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3816 GUIWindow::Create(613, 393, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnPlus, 1);
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3817 (&pPlayer[uPlayerCreationUI_SelectedCharacter])->IncreaseAttribute(
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3818 (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3819 v42 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3820 v38 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3821 v36 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3822 v34 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3823 v32 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3824 v31 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3825 v30 = 0;
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3826 pSoundID = (SoundID)20;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3827 goto LABEL_40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3828 }
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3829 if ( v45 == 63 ) // click -
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3830 {
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3831 GUIWindow::Create(523, 393, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnMinus, 1);
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3832 (&pPlayer[uPlayerCreationUI_SelectedCharacter])->DecreaseAttribute(
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3833 (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3834 v42 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3835 v38 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3836 v36 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3837 v34 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3838 v32 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3839 v31 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3840 v30 = 0;
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3841 pSoundID = (SoundID)23;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3842 goto LABEL_40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3843 }
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3844 if ( v45 == 64 ) // sellect active skill
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3845 {
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3846 auto _t = &pPlayer[uPlayerCreationUI_SelectedCharacter];
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3847 v6 = _t->GetSkillIdxByOrder(uNum + 4);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3848 if ( _t->GetSkillIdxByOrder(3) == 37 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3849 pParty->pPlayers[0].pActiveSkills[v6 + 3486 * uPlayerCreationUI_SelectedCharacter] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3850 v42 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3851 v38 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3852 v36 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3853 v34 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3854 v32 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3855 v31 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3856 v30 = 0;
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3857 pSoundID = (SoundID)24;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3858 goto LABEL_40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3859 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3860 if ( v45 == 65 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3861 {
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3862 (&pPlayer[uPlayerCreationUI_SelectedCharacter])->Reset(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3863 goto LABEL_36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3864 }
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3865 if ( v45 == 66 ) // click ok
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3866 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3867 GUIWindow::Create(0x244u, 0x1AFu, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnOK, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3868 if ( PlayerCreation_ComputeAttributeBonus() || !sub_4908DE() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3869 GameUI_StatusBar_TimedStringTimeLeft = GetTickCount() + 4000;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3870 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3871 uGameState = 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3872 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3873 }
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3874 if ( v45 == 67 ) // click reset
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3875 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3876 GUIWindow::Create(0x20Fu, 0x1AFu, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnReset, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3877 pParty->Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3878 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3879 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3880 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3881 if ( v45 == 74 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3882 {
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3883 uPlayerCreationUI_SelectedCharacter = uNum;
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3884 v4 = pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem;
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3885 v46 = pGUIWindow_CurrentMenu->pStartingPosActiveItem;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3886 v41 = 2;
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3887 v5 = (v4 % 7) + v46 + 7 * uNum;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3888 LABEL_44:
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3889 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = v5;
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3890 pParty->pPlayers[0].pActiveSkills[(&pPlayer[uPlayerCreationUI_SelectedCharacter])->GetSkillIdxByOrder(v41)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3891 + 3486 * uPlayerCreationUI_SelectedCharacter] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3892 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3893 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3894 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3895 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3896 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3897 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3898 switch ( v45 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3899 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3900 case 60:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3901 pAudioPlayer->PlaySound((SoundID)24, 0, 0, -1, 0, 0, 0, 0);
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3902 v3 = (void *)uNum;
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3903 uPlayerCreationUI_SelectedCharacter = uNum;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3904 pKeyActionMap->_459E5A(0, 15, pGUIWindow_CurrentMenu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3905 pGUIWindow_CurrentMenu->ptr_1C = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3906 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3907 case 5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3908 uGameState = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3909 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3910 case 17:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3911 pMouse->SetCursorBitmap("MICON2");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3912 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3913 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3914 if ( v45 == 58 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3915 goto LABEL_114;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3916 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3917 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3918 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3919 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3920 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3921 while ( pMessageQueue_50CBD0->uNumMessages );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3922 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3923 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3924
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3925 //----- (00436427) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3926 double __cdecl get_shading_dist_mist()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3927 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3928 double result; // st7@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3929
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3930 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3931 result = (double)pOutdoorCamera->shading_dist_mist;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3932 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3933 result = 16192.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3934 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3935 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3936
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3937 //----- (0043643E) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3938 double __cdecl GetPickDepth()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3939 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3940 double result; // st7@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3941
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3942 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3943 result = (double)pOutdoorCamera->uPickDepth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3944 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3945 result = 16192.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3946 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3947 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3948
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3949 //----- (0043648F) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3950 void __thiscall Vec3_short__to_RenderVertexSoft(RenderVertexSoft *_this, Vec3_short_ *a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3951 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3952 signed int v2; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3953 double v3; // st7@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3954
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3955 _this->flt_2C = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3956 v2 = a2->y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3957 v3 = (double)a2->z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3958 _this->vWorldPosition.x = (double)a2->x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3959 _this->vWorldPosition.y = (double)v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3960 _this->vWorldPosition.z = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3961 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3962
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3963 //----- (004369DB) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3964 void Vec3_float_::Normalize()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3965 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3966 Vec3_float_ *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3967 double v2; // st7@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3968
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3969 auto a1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3970 v1 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3971 v2 = 1.0 / sqrt(a1->x * a1->x + a1->y * a1->y + a1->z * a1->z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3972 v1->x = v2 * v1->x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3973 v1->y = v2 * v1->y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3974 v1->z = v2 * v1->z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3975 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3976
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3977
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3978
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3979
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3980
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3981
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3982
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3983 //----- (004382BC) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3984 __int16 __thiscall sub_4382BC(int _this)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3985 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3986 LOG_DECOMPILATION_WARNING();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3987 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3988 /*__int16 result; // ax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3989 __int16 v14; // sp@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3990 int v15; // [sp-4h] [bp-Ch]@0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3991 signed __int16 v16; // [sp+4h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3992 __int16 v17; // [sp+4h] [bp-4h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3993 __int16 v18; // [sp+4h] [bp-4h]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3994
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3995 v16 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3996 __asm { pushf }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3997 if ( v15 == (v15 ^ 0x200000) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3998 v16 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3999 if ( v16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4000 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4001 result = sub_43847A();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4002 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4003 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4004 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4005 //UNDEF(_ZF);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4006 //UNDEF(_SF);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4007 //UNDEF(_OF);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4008 _CF = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4009 if ( !_ZF )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4010 _CF = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4011 __asm { pushfw }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4012 bProcessorIsNotIntel = (BYTE2(v15) & 1 ^ 1) & 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4013 _CF = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4014 _OF = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4015 _ZF = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4016 _SF = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4017 __asm { pushfw }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4018 v17 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4019 if ( (HIWORD(v15) | 0xF000) & 0xF000 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4020 v17 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4021 __asm { popfw }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4022 result = v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4023 if ( v17 != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4024 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4025 _CF = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4026 _OF = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4027 _ZF = v14 == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4028 _SF = v14 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4029 __asm { pushf }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4030 v18 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4031 if ( v15 != (v15 ^ 0x40000) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4032 v18 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4033 __asm { popf }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4034 result = v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4035 if ( v18 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4036 result = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4037 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4038 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4039 if ( bProcessorIsNotIntel )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4040 HIBYTE(result) |= 0x80u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4041 return result;*/
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4042 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4043
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4044 //----- (004383ED) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4045 int __cdecl sub_4383ED()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4046 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4047 LOG_DECOMPILATION_WARNING();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4048 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4049 /*signed int v9; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4050 int v16; // [sp-4h] [bp-38h]@0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4051 int v17[3]; // [sp+Ch] [bp-28h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4052 char v18; // [sp+18h] [bp-1Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4053 char v19; // [sp+19h] [bp-1Bh]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4054 int v20[4]; // [sp+1Ch] [bp-18h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4055 int v21; // [sp+2Ch] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4056 int v22; // [sp+30h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4057
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4058 v17[0] = *(int *)"------------";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4059 v17[1] = *(int *)"--------";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4060 v17[2] = *(int *)"----";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4061 v18 = asc_4E4938[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4062 v19 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4063 v22 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4064 v20[0] = *(int *)"GenuineIntel";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4065 v20[1] = *(int *)"ineIntel";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4066 v20[2] = *(int *)"ntel";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4067 LOBYTE(v20[3]) = aGenuineintel[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4068 _CF = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4069 _OF = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4070 _ZF = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4071 _SF = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4072 v21 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4073 __asm { pushf }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4074 if ( v16 == (v16 ^ 0x200000) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4075 v21 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4076 if ( (short)v21 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4077 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4078 _EAX = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4079 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4080 v17[0] = _EBX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4081 v17[1] = _EDX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4082 v17[2] = _ECX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4083 v9 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4084 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4085 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4086 if ( *((char *)v17 + v9) != *((char *)v20 + v9) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4087 bProcessorIsNotIntel = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4088 ++v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4089 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4090 while ( v9 < 12 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4091 if ( v9 >= 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4092 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4093 _EAX = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4094 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4095 v22 = _EDX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4096 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4097 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4098 return v22;*/
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4099 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4100
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4101 //----- (0043847A) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4102 __int16 __cdecl sub_43847A()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4103 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4104 __debugbreak();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4105 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4106 /*signed int v5; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4107 char v12[12]; // [sp+Ch] [bp-28h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4108 char v13; // [sp+18h] [bp-1Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4109 char v14; // [sp+19h] [bp-1Bh]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4110 int v15[4]; // [sp+1Ch] [bp-18h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4111 int v16; // [sp+2Eh] [bp-6h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4112 char v17; // [sp+32h] [bp-2h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4113 char v18; // [sp+33h] [bp-1h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4114
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4115 *(int *)v12 = *(int *)"------------";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4116 *(int *)&v12[4] = *(int *)"--------";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4117 *(int *)&v12[8] = *(int *)"----";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4118 v13 = asc_4E4938[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4119 v14 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4120 v18 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4121 v15[0] = *(int *)"GenuineIntel";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4122 v15[1] = *(int *)"ineIntel";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4123 v15[2] = *(int *)"ntel";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4124 v16 = 65535;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4125 LOBYTE(v15[3]) = aGenuineintel[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4126 _EAX = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4127 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4128 *(int *)v12 = _EBX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4129 *(int *)&v12[4] = _EDX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4130 *(int *)&v12[8] = _ECX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4131 v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4132 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4133 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4134 if ( v12[v5] != *((char *)v15 + v5) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4135 bProcessorIsNotIntel = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4136 ++v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4137 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4138 while ( v5 < 12 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4139 if ( v5 >= 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4140 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4141 _EAX = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4142 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4143 v18 = _EAX & 0xF;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4144 LOBYTE(_EAX) = (unsigned __int8)(_EAX & 0xF0) >> 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4145 v17 = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4146 LOWORD(v16) = ((_EAX & 0xF00u) >> 8) & 0xF;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4147 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4148 return v16;*/
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4149 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4150
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4151
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4152
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4153 //----- (004385B5) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4154 void stru11::CheckCPU()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4155 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4156 LOG_DECOMPILATION_WARNING();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4157 /*
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4158 int v5; // [sp-4h] [bp-10h]@0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4159 signed int v6; // [sp+4h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4160 signed int v7; // [sp+8h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4161
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4162 _CF = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4163 _OF = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4164 _ZF = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4165 _SF = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4166 v7 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4167 __asm { pushf }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4168 v6 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4169 if ( v5 != (v5 ^ 0x40000) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4170 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4171 __asm { popf }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4172 v6 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4173 __asm { pushf }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4174 if ( v5 != (v5 ^ 0x200000) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4175 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4176 v7 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4177 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4178 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4179 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4180 if ( v6 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4181 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4182 this->field_AC = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4183 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4184 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4185 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4186 if ( v6 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4187 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4188 this->field_AC = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4189 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4190 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4191 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4192 if ( v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4193 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4194 this->field_AC = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4195 RunCPUID();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4196 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4197 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4198 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4199 this->field_AC = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4200 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4201 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4202 }*/
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4203 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4204
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4205 //----- (00438659) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4206 void stru11::RunCPUID()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4207 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4208 __debugbreak();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4209 /*stru11 *v6; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4210 unsigned int uNumOps; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4211 int uNumExtOps; // edi@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4212 char pCyrixString[16]; // [sp+Ch] [bp-60h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4213 char pCentaurString[16]; // [sp+1Ch] [bp-50h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4214 char pAMDString[16]; // [sp+2Ch] [bp-40h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4215 char pIntelString[16]; // [sp+3Ch] [bp-30h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4216 char pCPUString[16]; // [sp+4Ch] [bp-20h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4217 stru11 *thisa; // [sp+5Ch] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4218 char *v35; // [sp+60h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4219 int v36; // [sp+64h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4220 int v37; // [sp+68h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4221
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4222 thisa = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4223 *(int *)pIntelString = *(int *)"GenuineIntel";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4224 *(int *)&pIntelString[4] = *(int *)"ineIntel";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4225 *(int *)&pIntelString[8] = *(int *)"ntel";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4226 pIntelString[12] = aGenuineintel[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4227 *(int *)pAMDString = *(int *)"AuthenticAMD";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4228 *(int *)&pAMDString[4] = *(int *)"enticAMD";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4229 *(int *)&pAMDString[8] = *(int *)"cAMD";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4230 pAMDString[12] = aAuthenticamd[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4231 *(int *)pCyrixString = *(int *)"CyrixInstead";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4232 *(int *)&pCyrixString[4] = *(int *)"xInstead";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4233 *(int *)&pCyrixString[8] = *(int *)"tead";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4234 pCyrixString[12] = aCyrixinstead[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4235 *(int *)pCentaurString = *(int *)"CentaurHauls";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4236 *(int *)&pCentaurString[4] = *(int *)"aurHauls";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4237 *(int *)&pCentaurString[8] = *(int *)"auls";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4238 v37 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4239 v36 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4240 pCentaurString[12] = aCentaurhauls[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4241 v35 = pCPUString;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4242 pCPUString[12] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4243 _EAX = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4244 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4245 v37 = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4246 *(int *)pCPUString = _EBX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4247 *(int *)&pCPUString[4] = _EDX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4248 *(int *)&pCPUString[8] = _ECX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4249 v6 = thisa;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4250 uNumOps = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4251 thisa->cpuid_00000000_ebx_vendorstr1 = _EBX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4252 v6->cpuid_00000000_edx_vendorstr2 = *(int *)&pCPUString[4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4253 v6->cpuid_00000000_ecx_vendorstr3 = *(int *)&pCPUString[8];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4254 v6->cpuid_00000000_eax_numops = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4255 strcpy(v6->pCPUString, pCPUString);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4256 if ( strcmp(pIntelString, pCPUString) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4257 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4258 if ( strcmp(pAMDString, pCPUString) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4259 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4260 if ( strcmp(pCyrixString, pCPUString) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4261 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4262 if ( strcmp(pCentaurString, pCPUString) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4263 v6->uProcessorManufacturer = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4264 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4265 v6->uProcessorManufacturer = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4266 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4267 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4268 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4269 v6->uProcessorManufacturer = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4270 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4271 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4272 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4273 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4274 v6->uProcessorManufacturer = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4275 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4276 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4277 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4278 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4279 v6->uProcessorManufacturer = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4280 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4281 if ( uNumOps >= 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4282 RunCPUID_op1();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4283 if ( uNumOps >= 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4284 RunCPUID_op2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4285 _EAX = 0x80000000u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4286 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4287 if ( !(_EAX & 0x80000000) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4288 _EAX = 0x80000000u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4289 v36 = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4290 v6->cpuid_80000000_edx = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4291 uNumExtOps = _EAX ^ 0x80000000;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4292 if ( (_EAX ^ 0x80000000u) >= 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4293 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4294 _EAX = 0x80000001u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4295 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4296 thisa = (stru11 *)_EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4297 v35 = (char *)_EDX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4298 v6->cpuid_80000001_eax = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4299 v6->cpuid_80000001_edx = (int)v35;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4300 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4301 if ( (unsigned int)uNumExtOps >= 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4302 RunCPUID_ext2_3_4();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4303 if ( (unsigned int)uNumExtOps >= 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4304 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4305 _EAX = 0x80000005u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4306 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4307 thisa = (stru11 *)_EBX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4308 v35 = (char *)_ECX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4309 v36 = _EDX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4310 v6->cpuid_80000005_ebx = _EBX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4311 v6->cpuid_80000005_ecx = (int)v35;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4312 v6->cpuid_80000005_edx = v36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4313 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4314 if ( (unsigned int)uNumExtOps >= 6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4315 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4316 _EAX = 0x80000006u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4317 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4318 v6->cpuid_80000006_ecx = _ECX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4319 }*/
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4320 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4321
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4322 //----- (00438821) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4323 void stru11::RunCPUID_op1()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4324 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4325 __debugbreak();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4326 /*stru11 *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4327 unsigned int v7; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4328 int v8; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4329 int v9; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4330 signed int v10; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4331 int v11; // ecx@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4332 int v12; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4333 signed int v13; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4334 int v14; // ecx@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4335 signed int v15; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4336 int v16; // ecx@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4337 signed int v17; // eax@34
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4338 int v18; // ecx@34
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4339
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4340 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4341 _EAX = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4342 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4343 v7 = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4344 v1->cpuid_00000001_edx = _EDX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4345 v1->cpuid_00000001_eax = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4346 if ( (_EAX & 0x3000) == 8192 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4347 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4348 LOBYTE(v1->cpuid_80000002_registers2[0]) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4349 v7 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4350 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4351 v8 = (v7 >> 8) & 0xF;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4352 switch ( v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4353 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4354 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4355 v1->field_AC = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4356 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4357 case 5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4358 v1->field_AC = 15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4359 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4360 case 6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4361 v1->field_AC = 36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4362 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4363 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4364 v1->field_AC = 49;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4365 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4366 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4367 v9 = v1->uProcessorManufacturer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4368 if ( v9 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4369 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4370 v10 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4371 v11 = v7 & 0x3FF0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4372 while ( v11 != dword_4E4948[2 * v10] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4373 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4374 ++v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4375 if ( v10 >= 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4376 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4377 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4378 v12 = dword_4E494C[2 * v10];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4379 goto LABEL_39;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4380 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4381 if ( v9 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4382 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4383 if ( (v7 & 0xF00) == dword_4E49D0[0] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4384 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4385 v12 = dword_4E49D4[0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4386 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4387 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4388 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4389 v13 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4390 v14 = v7 & 0x3FF0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4391 while ( v14 != dword_4E49D0[2 * v13] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4392 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4393 ++v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4394 if ( v13 >= 9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4395 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4396 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4397 v12 = dword_4E49D4[2 * v13];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4398 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4399 goto LABEL_39;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4400 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4401 if ( v9 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4402 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4403 if ( v9 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4404 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4405 v17 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4406 v18 = v7 & 0x3FF0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4407 while ( v18 != dword_4E4A40[2 * v17] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4408 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4409 ++v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4410 if ( v17 >= 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4411 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4412 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4413 v12 = dword_4E4A44[2 * v17];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4414 goto LABEL_39;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4415 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4416 v15 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4417 v16 = v7 & 0x3FF0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4418 while ( v16 != dword_4E4A18[2 * v15] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4419 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4420 ++v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4421 if ( v15 >= 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4422 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4423 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4424 v1->field_AC = dword_4E4A1C[2 * v15];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4425 LABEL_30:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4426 v12 = 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4427 if ( v1->field_AC == 24 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4428 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4429 if ( _EDX != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4430 v12 = (((_EDX != 261) - 1) & 0xA) + 15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4431 LABEL_39:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4432 v1->field_AC = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4433 }*/
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4434 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4435
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4436 //----- (00438992) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4437 void stru11::RunCPUID_op2()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4438 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4439 __debugbreak();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4440 /*
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4441 stru11 *v1; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4442 int v7; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4443 signed int v8; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4444 unsigned __int8 v9; // al@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4445 signed int v10; // ecx@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4446 unsigned __int8 v11; // al@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4447 int v12; // [sp+Ch] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4448 int v13; // [sp+10h] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4449 int v14; // [sp+14h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4450 int v15; // [sp+18h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4451 int *v16; // [sp+1Ch] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4452
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4453 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4454 v16 = &v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4455 _EAX = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4456 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4457 v12 = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4458 v13 = _EBX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4459 v14 = _ECX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4460 v15 = _EDX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4461 v1->cpuid_00000002_eax = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4462 v1->cpuid_00000002_ebx = v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4463 v1->cpuid_00000002_ecx = v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4464 v1->cpuid_00000002_edx = v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4465 v7 = v1->field_AC;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4466 if ( v7 == 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4467 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4468 v8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4469 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4470 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4471 v9 = *((char *)&v12 + v8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4472 if ( v9 == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4473 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4474 v1->field_AC = 43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4475 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4476 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4477 if ( v9 >= 0x41u && v9 <= 0x43u )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4478 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4479 v1->field_AC = 41;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4480 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4481 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4482 if ( v9 >= 0x44u && v9 <= 0x45u )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4483 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4484 ++v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4485 if ( v8 >= 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4486 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4487 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4488 v1->field_AC = 42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4489 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4490 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4491 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4492 if ( v7 == 45 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4493 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4494 v10 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4495 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4496 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4497 v11 = *((char *)&v12 + v10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4498 if ( v11 >= 0x40u && v11 <= 0x43u )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4499 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4500 v1->field_AC = 46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4501 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4502 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4503 if ( v11 >= 0x44u && v11 <= 0x45u )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4504 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4505 ++v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4506 if ( v10 >= 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4507 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4508 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4509 v1->field_AC = 47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4510 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4511 }*/
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4512 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4513
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4514 //----- (00438A67) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4515 void stru11::RunCPUID_ext2_3_4()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4516 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4517 __debugbreak();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4518 /*stru11 *v1; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4519 stru11 *v17; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4520 int v18[3][4]; // [sp+Ch] [bp-38h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4521 stru11 *v19; // [sp+3Ch] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4522
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4523 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4524 v19 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4525 _EAX = 0x80000002u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4526 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4527 v18[0][0] = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4528 *(_QWORD *)&v18[0][1] = __PAIR__(_ECX, _EBX);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4529 v18[0][3] = _EDX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4530 _EAX = 0x80000003u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4531 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4532 v18[1][0] = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4533 *(_QWORD *)&v18[1][1] = __PAIR__(_ECX, _EBX);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4534 v18[1][3] = _EDX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4535 _EAX = 0x80000004u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4536 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4537 v18[2][0] = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4538 *(_QWORD *)&v18[2][1] = __PAIR__(_ECX, _EBX);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4539 v18[2][3] = _EDX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4540 v17 = v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4541 memcpy(v1->cpuid_80000002_registers, v18, 0x30u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4542 memcpy((char *)&v17->cpuid_80000002_registers2[0] + 1, v18, 0x30u);*/
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4543 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4544
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4545
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4546
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4547 //----- (00438BDF) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4548 bool MonsterStats::BelongsToSupertype(unsigned int uMonsterInfoID, enum MONSTER_SUPERTYPE eSupertype)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4549 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4550 unsigned __int8 v2; // zf@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4551 char v3; // sf@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4552 unsigned __int8 v4; // of@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4553 bool result; // eax@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4554
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4555 switch ( eSupertype )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4556 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4557 case MONSTER_SUPERTYPE_UNDEAD:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4558 if ( (signed int)uMonsterInfoID >= MONSTER_GHOST_1 && (signed int)uMonsterInfoID <= MONSTER_GHOST_3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4559 || (signed int)uMonsterInfoID >= MONSTER_LICH_1 && (signed int)uMonsterInfoID <= MONSTER_LICH_3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4560 || (signed int)uMonsterInfoID >= MONSTER_SKELETON_1 && (signed int)uMonsterInfoID <= MONSTER_SKELETON_3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4561 || (signed int)uMonsterInfoID >= MONSTER_VAMPIRE_1 && (signed int)uMonsterInfoID <= MONSTER_VAMPIRE_3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4562 || (signed int)uMonsterInfoID >= MONSTER_WIGHT_1 && (signed int)uMonsterInfoID <= MONSTER_WIGHT_3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4563 || (signed int)uMonsterInfoID >= MONSTER_ZOMBIE_1 && (signed int)uMonsterInfoID <= MONSTER_ZOMBIE_3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4564 goto ret_true;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4565 if ( (signed int)uMonsterInfoID < MONSTER_GHOUL_1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4566 goto ret_false;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4567 v4 = __OFSUB__(uMonsterInfoID, (int)MONSTER_GHOUL_3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4568 v2 = uMonsterInfoID == MONSTER_GHOUL_3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4569 v3 = ((uMonsterInfoID - MONSTER_GHOUL_3) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4570 goto false_if_outside;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4571 case MONSTER_SUPERTYPE_KREEGAN:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4572 if ( (signed int)uMonsterInfoID < MONSTER_DEVIL_1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4573 goto ret_false;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4574 v4 = __OFSUB__(uMonsterInfoID, (int)MONSTER_DEVIL_3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4575 v2 = uMonsterInfoID == MONSTER_DEVIL_3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4576 v3 = ((uMonsterInfoID - MONSTER_DEVIL_3) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4577 goto false_if_outside;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4578 case MONSTER_SUPERTYPE_ELF:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4579 if ( (signed int)uMonsterInfoID >= MONSTER_PEASANT_ELF_FEMALE_1_1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4580 && (signed int)uMonsterInfoID <= MONSTER_PEASANT_ELF_MALE_3_3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4581 || (signed int)uMonsterInfoID >= MONSTER_ELF_ARCHER_1 && (signed int)uMonsterInfoID <= MONSTER_ELF_ARCHER_3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4582 goto ret_true;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4583 if ( (signed int)uMonsterInfoID < MONSTER_ELF_SPEARMAN_1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4584 goto ret_false;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4585 v4 = __OFSUB__(uMonsterInfoID, (int)MONSTER_ELF_SPEARMAN_3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4586 v2 = uMonsterInfoID == MONSTER_ELF_SPEARMAN_3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4587 v3 = ((uMonsterInfoID - MONSTER_ELF_SPEARMAN_3) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4588 goto false_if_outside;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4589 case MONSTER_SUPERTYPE_DRAGON:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4590 if ( (signed int)uMonsterInfoID < MONSTER_DRAGON_1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4591 goto ret_false;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4592 v4 = __OFSUB__(uMonsterInfoID, (int)MONSTER_DRAGON_3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4593 v2 = uMonsterInfoID == MONSTER_DRAGON_3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4594 v3 = ((uMonsterInfoID - MONSTER_DRAGON_3) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4595 goto false_if_outside;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4596 case MONSTER_SUPERTYPE_WATER_ELEMENTAL:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4597 if ( (signed int)uMonsterInfoID < MONSTER_ELEMENTAL_WATER_1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4598 goto ret_false;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4599 v4 = __OFSUB__(uMonsterInfoID, (int)MONSTER_ELEMENTAL_WATER_3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4600 v2 = uMonsterInfoID == MONSTER_ELEMENTAL_WATER_3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4601 v3 = ((uMonsterInfoID - MONSTER_ELEMENTAL_WATER_3) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4602 goto false_if_outside;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4603 case MONSTER_SUPERTYPE_TREANT:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4604 if ( (signed int)uMonsterInfoID < MONSTER_TREANT_1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4605 goto ret_false;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4606 v4 = __OFSUB__(uMonsterInfoID, (int)MONSTER_TREANT_3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4607 v2 = uMonsterInfoID == MONSTER_TREANT_3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4608 v3 = ((uMonsterInfoID - MONSTER_TREANT_3) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4609 goto false_if_outside;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4610 case MONSTER_SUPERTYPE_TITAN:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4611 if ( (signed int)uMonsterInfoID < MONSTER_TITAN_1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4612 goto ret_false;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4613 v4 = __OFSUB__(uMonsterInfoID, (int)MONSTER_TITAN_3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4614 v2 = uMonsterInfoID == MONSTER_TITAN_3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4615 v3 = ((uMonsterInfoID - MONSTER_TITAN_3) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4616 false_if_outside:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4617 if ( !((unsigned __int8)(v3 ^ v4) | v2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4618 goto ret_false;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4619 ret_true:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4620 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4621 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4622 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4623 ret_false:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4624 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4625 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4626 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4627 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4628 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4629
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4630
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4631 //----- (00438F8F) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4632 void __cdecl _438F8F_area_of_effect__damage_evaluate()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4633 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4634 int v0; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4635 char *v1; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4636 int v2; // ecx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4637 signed int v3; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4638 LayingItem *v4; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4639 signed int v5; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4640 signed int v6; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4641 unsigned int v7; // edi@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4642 int v8; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4643 __int16 v9; // bx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4644 int v10; // edi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4645 Vec3_int_ v11; // ST04_12@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4646 int v12; // ST0C_4@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4647 Actor *v13; // edi@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4648 int v14; // edx@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4649 int v15; // edx@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4650 int v16; // ebx@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4651 signed int v17; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4652 int v18; // edi@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4653 int v19; // edi@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4654 Vec3_int_ v20; // ST04_12@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4655 Vec3_int_ *v21; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4656 unsigned int v22; // edx@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4657 int v23; // edx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4658 int v24; // eax@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4659 Vec3_int_ v25; // ST04_12@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4660 unsigned int v26; // ebx@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4661 char *v27; // edi@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4662 char *v28; // edi@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4663 int v29; // ebx@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4664 int v30; // eax@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4665 int v31; // edx@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4666 int v32; // eax@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4667 int v33; // ST24_4@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4668 Vec3_int_ v34; // ST04_12@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4669 Vec3_int_ *v35; // eax@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4670 LayingItem *v36; // [sp+0h] [bp-28h]@0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4671 signed int v37; // [sp+4h] [bp-24h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4672 int v38; // [sp+4h] [bp-24h]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4673 signed int v39; // [sp+8h] [bp-20h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4674 int v40; // [sp+8h] [bp-20h]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4675 int v41; // [sp+Ch] [bp-1Ch]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4676 int v42; // [sp+Ch] [bp-1Ch]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4677 int v43; // [sp+10h] [bp-18h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4678 int v44; // [sp+14h] [bp-14h]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4679 unsigned int uActorID; // [sp+18h] [bp-10h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4680 Vec3_int_ *pVelocity; // [sp+1Ch] [bp-Ch]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4681 int a1; // [sp+20h] [bp-8h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4682 int v48; // [sp+24h] [bp-4h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4683
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4684 v0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4685 v43 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4686 if ( stru_50FE08.count > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4687 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4688 pVelocity = &stru_50FE08.vec_4B4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4689 v1 = (char *)stru_50FE08.pZs;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4690 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4691 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4692 v2 = *((short *)v1 - 300) & 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4693 v3 = (signed int)*((short *)v1 - 300) >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4694 v39 = (signed int)*((short *)v1 - 300) >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4695 if ( v2 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4696 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4697 v4 = &pLayingItems[v3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4698 v36 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4699 v5 = v4->field_58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4700 v2 = v5 & 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4701 v3 = v5 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4702 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4703 v41 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4704 v37 = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4705 if ( stru_50FE08.field_3EC[v0] & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4706 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4707 v6 = dword_4F6E08[v3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4708 v7 = v6 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4709 v8 = (v6 & 7) - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4710 uActorID = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4711 if ( v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4712 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4713 if ( v8 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4714 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4715 v9 = *(short *)v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4716 v10 = pParty->vPosition.z - *((short *)v1 - 100);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4717 a1 = pParty->vPosition.x - *((short *)v1 - 200);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4718 v48 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4719 if ( a1 * a1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4720 + v10 * v10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4721 + ((signed int)(pParty->vPosition.y + pParty->uPartyHeight) >> (1 - v9))
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4722 * ((signed int)(pParty->vPosition.y + pParty->uPartyHeight) >> (1 - v9)) < (unsigned int)((*((short *)v1 + 100) + 32) * (*((short *)v1 + 100) + 32)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4723 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4724 v11.z = *(short *)v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4725 v11.y = *((short *)v1 - 100);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4726 v11.x = *((short *)v1 - 200);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4727 if ( sub_407A1C(pParty->vPosition.x, pParty->vPosition.z, pParty->vPosition.y + pParty->sEyelevel, v11) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4728 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4729 v12 = stru_50C198.which_player_would_attack(&pActors[v39]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4730 DamagePlayerFromMonster(*((short *)v1 - 300), stru_50FE08.field_450[v43], pVelocity, v12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4731 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4732 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4733 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4734 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4735 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4736 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4737 v13 = &pActors[v7];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4738 if ( SHIDWORD(v13->pActorBuffs[6].uExpireTime) > 0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4739 || SHIDWORD(v13->pActorBuffs[6].uExpireTime) >= 0 && LODWORD(v13->pActorBuffs[6].uExpireTime)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4740 || v13->CanAct() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4741 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4742 v14 = v13->vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4743 v40 = v13->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4744 v38 = v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4745 v15 = v14 - *((short *)v1 - 100);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4746 v16 = *(short *)v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4747 v42 = v13->vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4748 a1 = v40 - *((short *)v1 - 200);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4749 v17 = v13->uActorHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4750 v18 = v13->uActorRadius;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4751 v44 = v42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4752 v19 = *((short *)v1 + 100) + v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4753 v48 = v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4754 if ( a1 * a1 + v15 * v15 + (v42 + (v17 >> 1) - v16) * (v42 + (v17 >> 1) - v16) < (unsigned int)(v19 * v19) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4755 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4756 v20.z = *(short *)v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4757 v20.y = *((short *)v1 - 100);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4758 v20.x = *((short *)v1 - 200);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4759 if ( sub_407A1C(v40, v38, v42 + 50, v20) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4760 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4761 Vec3_int_::Normalize(&a1, &v48, &v44);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4762 v21 = pVelocity;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4763 v22 = uActorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4764 pVelocity->x = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4765 v21->y = v48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4766 v21->z = v44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4767 sub_43B1B0(*((short *)v1 - 300), v22, v21, stru_50FE08.field_450[v43]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4768 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4769 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4770 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4771 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4772 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4773 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4774 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4775 v23 = pParty->vPosition.z - *((short *)v1 - 100);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4776 v24 = ((signed int)pParty->uPartyHeight >> 1) - *(short *)v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4777 a1 = pParty->vPosition.x - *((short *)v1 - 200);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4778 v48 = v23;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4779 if ( a1 * a1 + v23 * v23 + (pParty->vPosition.y + v24) * (pParty->vPosition.y + v24) < (unsigned int)((*((short *)v1 + 100) + 32) * (*((short *)v1 + 100) + 32)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4780 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4781 v25.z = *(short *)v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4782 v25.y = *((short *)v1 - 100);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4783 v25.x = *((short *)v1 - 200);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4784 if ( sub_407A1C(pParty->vPosition.x, pParty->vPosition.z, pParty->vPosition.y + pParty->sEyelevel, v25) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4785 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4786 v26 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4787 v27 = (char *)&pParty->pPlayers[0].pConditions[15];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4788 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4789 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4790 if ( !(*((int *)v27 - 1) | *((int *)v27 - 2)) && !*(_QWORD *)v27 && !*((_QWORD *)v27 + 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4791 DamagePlayerFromMonster(*((short *)v1 - 300), stru_50FE08.field_450[v43], pVelocity, v26);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4792 v27 += 6972;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4793 ++v26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4794 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4795 while ( (signed int)v27 < (signed int)&pParty->pHirelings[1].evtb );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4796 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4797 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4798 uActorID = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4799 if ( (signed int)uNumActors > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4800 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4801 v28 = (char *)&pActors[0].vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4802 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4803 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4804 if ( ((Actor *)(v28 - 146))->CanAct() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4805 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4806 v29 = *(short *)v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4807 v30 = *((short *)v28 - 1) - *((short *)v1 - 100);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4808 a1 = *((short *)v28 - 2) - *((short *)v1 - 200);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4809 v31 = *(short *)v28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4810 v48 = v30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4811 v44 = v31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4812 v32 = ((signed int)*((short *)v28 - 4) >> 1) - v29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4813 v33 = *((short *)v28 - 5) + *((short *)v1 + 100);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4814 if ( a1 * a1 + v48 * v48 + (v31 + v32) * (v31 + v32) < (unsigned int)(v33 * v33) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4815 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4816 v34.z = *(short *)v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4817 v34.y = *((short *)v1 - 100);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4818 v34.x = *((short *)v1 - 200);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4819 if ( sub_407A1C(*((short *)v28 - 2), *((short *)v28 - 1), *(short *)v28 + 50, v34) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4820 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4821 Vec3_int_::Normalize(&a1, &v48, &v44);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4822 v35 = pVelocity;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4823 pVelocity->x = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4824 v35->y = v48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4825 v35->z = v44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4826 switch ( v41 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4827 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4828 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4829 DamageMonsterFromParty(*((short *)v1 - 300), uActorID, v35);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4830 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4831 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4832 if ( v36 && pActors[v37].GetActorsRelation((Actor *)(v28 - 146)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4833 sub_43B1B0(*((short *)v1 - 300), uActorID, pVelocity, v36->field_61);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4834 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4835 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4836 sub_43B057(*((short *)v1 - 300), uActorID, v35);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4837 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4838 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4839 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4840 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4841 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4842 ++uActorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4843 v28 += 836;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4844 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4845 while ( (signed int)uActorID < (signed int)uNumActors );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4846 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4847 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4848 ++pVelocity;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4849 v0 = v43 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4850 v1 += 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4851 ++v43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4852 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4853 while ( v43 < stru_50FE08.count );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4854 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4855 stru_50FE08.count = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4856 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4857 // 50FE08: using guessed type stru298 stru_50FE08;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4858
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4859 //----- (00439474) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4860 bool __fastcall DamageMonsterFromParty(signed int a1, unsigned int uActorID_Monster, Vec3_int_ *pVelocity)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4861 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4862 signed int v3; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4863 LayingItem *v4; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4864 int v5; // edx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4865 bool uPlayerID; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4866 Player *pPlayer; // edi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4867 Actor *pMonster; // esi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4868 LayingItem *v9; // ebx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4869 int v10; // eax@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4870 int v11; // ebx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4871 unsigned int v12; // ecx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4872 int v13; // edx@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4873 int v14; // edx@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4874 int v15; // eax@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4875 unsigned __int16 v16; // cx@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4876 int v17; // eax@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4877 int v18; // eax@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4878 unsigned __int8 v19; // zf@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4879 unsigned __int8 v20; // sf@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4880 int v21; // edx@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4881 int v22; // eax@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4882 unsigned __int8 v23; // zf@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4883 unsigned __int8 v24; // sf@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4884 int v25; // edx@51
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4885 int v26; // ecx@51
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4886 signed int v27; // eax@51
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4887 int v28; // eax@53
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4888 signed int v29; // eax@76
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4889 signed int v30; // eax@84
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4890 signed int v31; // eax@92
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4891 int v32; // eax@94
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4892 int v33; // eax@100
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4893 int v34; // eax@104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4894 signed int v35; // eax@104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4895 double v36; // st7@104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4896 float v37; // ST08_4@104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4897 float v38; // ST04_4@104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4898 float v39; // ST00_4@104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4899 int v40; // ebx@107
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4900 unsigned int v41; // ebx@109
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4901 signed __int64 v42; // qax@125
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4902 unsigned __int16 v43; // ax@132
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4903 char v44; // bl@132
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4904 unsigned __int16 v45; // ax@132
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4905 unsigned __int64 v46; // [sp+Ch] [bp-60h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4906 const char *v47; // [sp+14h] [bp-58h]@104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4907 char *pPlayerName; // [sp+18h] [bp-54h]@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4908 char *pMonsterName; // [sp+1Ch] [bp-50h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4909 int v50; // [sp+20h] [bp-4Ch]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4910 unsigned __int64 *v51; // [sp+30h] [bp-3Ch]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4911 int v52; // [sp+34h] [bp-38h]@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4912 int v53; // [sp+38h] [bp-34h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4913 int v54; // [sp+3Ch] [bp-30h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4914 int v55; // [sp+40h] [bp-2Ch]@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4915 signed int a4; // [sp+44h] [bp-28h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4916 PlayerEquipment *v57; // [sp+48h] [bp-24h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4917 int v58; // [sp+4Ch] [bp-20h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4918 int v59; // [sp+50h] [bp-1Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4919 unsigned int uActorID_Monster_; // [sp+54h] [bp-18h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4920 int v61; // [sp+58h] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4921 int v62; // [sp+5Ch] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4922 int uDamageAmount; // [sp+60h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4923 int a2; // [sp+64h] [bp-8h]@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4924 int a3; // [sp+6Bh] [bp-1h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4925
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4926 v3 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4927 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4928 uActorID_Monster_ = uActorID_Monster;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4929 v54 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4930 uDamageAmount = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4931 a4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4932 v61 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4933 v59 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4934 v62 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4935 if ( (a1 & 7) == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4936 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4937 v4 = &pLayingItems[a1 >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4938 uDamageAmount = (int)v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4939 v61 = v4->field_60_distance_related_prolly_lod;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4940 v3 = v4->field_58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4941 v54 = v4->field_58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4942 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4943 v5 = v3 & 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4944 uPlayerID = v3 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4945 if ( v5 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4946 return uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4947 pPlayer = &pParty->pPlayers[uPlayerID];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4948 if ( uPlayerID < 0 && uPlayerID > 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4949 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4950 MessageBoxW(nullptr, L"Invalid player in damageMonsterFromParty!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Damage.cpp:457", 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4951 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4952 pMonster = &pActors[uActorID_Monster_];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4953 uPlayerID = pMonster->IsAlive();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4954 if ( uPlayerID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4955 return uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4956 BYTE1(pMonster->uAttributes) |= 0xC0u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4957 if ( pMonster->uAIState == Fleeing )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4958 pMonster->uAttributes |= 0x20000u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4959 v58 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4960 v53 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4961 v57 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4962 if ( !v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4963 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4964 v51 = (unsigned __int64 *)pPlayer->pEquipment.uMainHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4965 v59 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4966 if ( pPlayer->HasItemEquipped(EQUIP_TWO_HANDED) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4967 {
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
4968 v55 = pItemsTable->pItems[*(int *)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * (int)v51 + 5]].uSkillType;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4969 v28 = SkillToMastery(pPlayer->pActiveSkills[v55]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4970 uDamageAmount = v28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4971 if ( v55 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4972 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4973 if ( v55 == 6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4974 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4975 if ( v28 >= 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4976 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4977 LOBYTE(v51) = pPlayer->GetActualSkillLevel(PLAYER_SKILL_MACE) & 0x3F;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4978 v51 = (unsigned __int64 *)(unsigned __int8)v51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4979 if ( rand() % 100 < (unsigned __int8)v51 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4980 v58 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4981 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4982 if ( uDamageAmount >= 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4983 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4984 LOBYTE(v51) = pPlayer->GetActualSkillLevel(PLAYER_SKILL_MACE) & 0x3F;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4985 v51 = (unsigned __int64 *)(unsigned __int8)v51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4986 if ( rand() % 100 < (unsigned __int8)v51 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4987 v53 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4988 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4989 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4990 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4991 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4992 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4993 if ( uDamageAmount >= 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4994 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4995 LOBYTE(v51) = pPlayer->GetActualSkillLevel((PLAYER_SKILL_TYPE)0) & 0x3F;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4996 v51 = (unsigned __int64 *)(unsigned __int8)v51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4997 if ( rand() % 100 < (unsigned __int8)v51 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4998 v58 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4999 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5000 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5001 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5002 v50 = pMonster->pMonsterInfo.uID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5003 a2 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5004 v27 = pPlayer->CalculateMeleeDamageTo(0, 0, v50);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5005 goto LABEL_65;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5006 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5007 v19 = v4->field_48 == 99;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5008 v61 = v4->field_60_distance_related_prolly_lod;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5009 if ( !v19 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5010 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5011 v9 = (LayingItem *)uDamageAmount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5012 v50 = pParty->vPosition.x - *(int *)(uDamageAmount + 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5013 v55 = abs(v50);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5014 pMonsterName = (char *)(pParty->vPosition.z - v9->vPosition.y);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5015 v51 = (unsigned __int64 *)abs((int)pMonsterName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5016 pPlayerName = (char *)(pParty->vPosition.y - v9->vPosition.z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5017 v52 = abs((int)pPlayerName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5018 v61 = v55;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5019 v10 = v55;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5020 v11 = (int)v51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5021 v12 = v52;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5022 if ( v55 < (signed int)v51 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5023 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5024 v10 = (int)v51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5025 v11 = v55;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5026 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5027 if ( v10 < v52 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5028 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5029 v13 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5030 v10 = v52;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5031 v12 = v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5032 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5033 if ( v11 < (signed int)v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5034 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5035 v14 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5036 v12 = v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5037 v11 = v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5038 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5039 uPlayerID = ((unsigned int)(11 * v11) >> 5) + (v12 >> 2) + v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5040 v61 = uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5041 if ( uPlayerID >= 2560 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5042 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5043 if ( v61 >= 5120 && !(BYTE1(pMonster->uAttributes) & 4) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5044 return uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5045 v61 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5046 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5047 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5048 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5049 v61 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5050 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5051 v4 = (LayingItem *)uDamageAmount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5052 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5053 v15 = v4->field_48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5054 if ( v15 == 102 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5055 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5056 v16 = pPlayer->pActiveSkills[7];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5057 v61 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5058 if ( (signed int)SkillToMastery(v16) >= 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5059 a4 = pPlayer->pActiveSkills[7] & 0x3F;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5060 a2 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5061 uDamageAmount = pPlayer->CalculateMeleeDamageTo(1, 1, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5062 goto LABEL_67;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5063 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5064 if ( v15 != 100 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5065 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5066 if ( v15 == 101 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5067 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5068 a2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5069 v18 = pPlayer->CalculateRangedDamageTo(0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5070 v19 = HIDWORD(pMonster->pActorBuffs[15].uExpireTime) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5071 v20 = SHIDWORD(pMonster->pActorBuffs[15].uExpireTime) < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5072 uDamageAmount = v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5073 if ( !v20 && (!(v20 | v19) || LODWORD(pMonster->pActorBuffs[15].uExpireTime)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5074 uDamageAmount >>= 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5075 v59 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5076 goto LABEL_67;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5077 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5078 if ( v15 == 39 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5079 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5080 a4 = 5 * v4->field_4C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5081 a2 = pPlayer->GetSpellSchool(0x27u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5082 v21 = v4->field_4C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5083 v50 = pMonster->sCurrentHP;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5084 pMonsterName = (char *)v4->field_50;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5085 v22 = _43AFE3_calc_spell_damage(39, v21, (signed int)pMonsterName, v50);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5086 v23 = HIDWORD(pMonster->pActorBuffs[15].uExpireTime) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5087 v24 = SHIDWORD(pMonster->pActorBuffs[15].uExpireTime) < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5088 uDamageAmount = v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5089 if ( !v24 && (!(v24 | v23) || LODWORD(pMonster->pActorBuffs[15].uExpireTime)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5090 uDamageAmount >>= 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5091 v59 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5092 LABEL_67:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5093 if ( !stru_50C198.PlayerHitOrMiss(pPlayer, pMonster, v61, a4) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5094 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5095 LABEL_68:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5096 LOWORD(uPlayerID) = pPlayer->PlaySound(52, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5097 return uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5098 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5099 goto LABEL_69;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5100 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5101 if ( v15 == 34 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5102 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5103 uDamageAmount = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5104 a2 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5105 v58 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5106 goto LABEL_67;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5107 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5108 v50 = v4->field_48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5109 a2 = pPlayer->GetSpellSchool(v50);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5110 v25 = v4->field_4C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5111 v26 = v4->field_48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5112 v50 = pMonster->sCurrentHP;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5113 pMonsterName = (char *)v4->field_50;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5114 v27 = _43AFE3_calc_spell_damage(v26, v25, (signed int)pMonsterName, v50);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5115 v59 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5116 v57 = (PlayerEquipment *)1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5117 LABEL_65:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5118 uDamageAmount = v27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5119 goto LABEL_66;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5120 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5121 v50 = pMonster->word_000086_some_monster_id;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5122 a2 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5123 v17 = pPlayer->CalculateRangedDamageTo(v50);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5124 v19 = v4->stru_24.uItemID == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5125 uDamageAmount = v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5126 if ( !v19 && v4->stru_24.uAdditionalValue == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5127 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5128 a2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5129 v57 = (PlayerEquipment *)1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5130 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5131 if ( SHIDWORD(pMonster->pActorBuffs[15].uExpireTime) >= 0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5132 && (SHIDWORD(pMonster->pActorBuffs[15].uExpireTime) > 0 || LODWORD(pMonster->pActorBuffs[15].uExpireTime)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5133 uDamageAmount >>= 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5134 v59 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5135 LABEL_66:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5136 if ( !v57 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5137 goto LABEL_67;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5138 LABEL_69:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5139 if ( pPlayer->pConditions[1] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5140 uDamageAmount >>= 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5141 if ( (signed __int64)pMonster->pActorBuffs[5].uExpireTime > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5142 uDamageAmount = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5143 v61 = stru_50C198.CalcMagicalDamageToActor(pMonster, a2, uDamageAmount);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5144 if ( !v4 && pPlayer->IsUnarmed() && (signed __int64)pPlayer->pPlayerBuffs[6].uExpireTime > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5145 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5146 v50 = pPlayer->pPlayerBuffs[6].uPower;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5147 v29 = stru_50C198.CalcMagicalDamageToActor(pMonster, 8, v50);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5148 v61 += v29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5149 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5150 uDamageAmount = v61;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5151 if ( v59 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5152 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5153 if ( v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5154 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5155 a4 = v4->stru_24._439DF3_get_additional_damage(&a2, &v62);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5156 if ( v62 && pMonster->sCurrentHP > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5157 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5158 pPlayer->sHealth += v61 / 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5159 if ( pPlayer->sHealth > pPlayer->GetMaxHealth() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5160 pPlayer->sHealth = pPlayer->GetMaxHealth();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5161 v62 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5162 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5163 v30 = stru_50C198.CalcMagicalDamageToActor(pMonster, a2, a4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5164 uDamageAmount = v61 + v30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5165 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5166 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5167 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5168 v59 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5169 v57 = &pPlayer->pEquipment;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5170 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5171 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5172 if ( pPlayer->HasItemEquipped((ITEM_EQUIP_TYPE)v59) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5173 {
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
5174 auto _s = (ItemGen *)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v57->uOffHand + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5175 a4 = _s->_439DF3_get_additional_damage(&a2, &v62);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5176 if ( v62 && pMonster->sCurrentHP > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5177 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5178 pPlayer->sHealth += v61 / 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5179 if ( pPlayer->sHealth > pPlayer->GetMaxHealth() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5180 pPlayer->sHealth = pPlayer->GetMaxHealth();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5181 v62 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5182 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5183 v31 = stru_50C198.CalcMagicalDamageToActor(pMonster, a2, a4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5184 uDamageAmount += v31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5185 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5186 ++v59;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5187 v57 = (PlayerEquipment *)((char *)v57 + 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5188 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5189 while ( v59 <= 1 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5190 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5191 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5192 v32 = uDamageAmount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5193 pMonster->sCurrentHP -= uDamageAmount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5194 if ( !v32 && !v58 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5195 goto LABEL_68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5196 if ( pMonster->sCurrentHP > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5197 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5198 Actor::_4030AD(uActorID_Monster_, v54, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5199 Actor::_43AC45(uActorID_Monster_, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5200 if ( bShowDamage )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5201 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5202 v50 = uDamageAmount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5203 pMonsterName = (char *)pMonster;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5204 pPlayerName = pPlayer->pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5205 if ( v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5206 v47 = pGlobalTXT_LocalizationStrings[189];// "%s shoots %s for %lu points"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5207 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5208 v47 = pGlobalTXT_LocalizationStrings[164];// "%s hits %s for %lu damage"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5209 sprintfex(pTmpBuf, v47, pPlayerName, pMonsterName, v50);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5210 ShowStatusBarString(pTmpBuf, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5211 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5212 v41 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5213 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5214 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5215 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5216 if ( pMonsterStats->pInfos[pMonster->pMonsterInfo.uID].bQuestMonster & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5217 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5218 v33 = byte_4D864C && BYTE2(pGame->uFlags) & 8 ? 10 * pMonster->uActorRadius : pMonster->uActorRadius;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5219 v55 = v33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5220 if ( pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5221 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5222 if ( pGame->uFlags2 & 0x20 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5223 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5224 v50 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5225 pMonsterName = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5226 v34 = pMonster->vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5227 *(float *)&pPlayerName = (double)v55;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5228 v51 = (unsigned __int64 *)v34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5229 *(float *)&v47 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5230 v35 = pMonster->vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5231 *((float *)&v46 + 1) = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5232 *(float *)&v46 = 1.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5233 v36 = (double)(signed int)v51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5234 v51 = (unsigned __int64 *)v35;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5235 v37 = v36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5236 v51 = (unsigned __int64 *)pMonster->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5237 v38 = (double)v35;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5238 v39 = (double)(signed int)v51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5239 pDecalBuilder->AddBloodsplat(v39, v38, v37, 1.0, 0.0, 0.0, *(float *)&pPlayerName, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5240 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5241 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5242 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5243 Actor::Die(uActorID_Monster_);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5244 Actor::_438CF3(uActorID_Monster_);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5245 Actor::_43AC45(uActorID_Monster_, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5246 if ( pMonster->pMonsterInfo.uExp )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5247 sub_4269A2_GivePartyExp(pMonsterStats->pInfos[pMonster->pMonsterInfo.uID].uExp);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5248 v40 = 51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5249 if ( rand() % 100 < 20 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5250 v40 = ((signed int)pMonster->pMonsterInfo.uHP >= 100) + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5251 pPlayer->PlaySound(v40, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5252 v41 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5253 if ( bShowDamage )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5254 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5255 v50 = (int)pMonster;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5256 pMonsterName = (char *)uDamageAmount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5257 pPlayerName = pPlayer->pName; // "%s inflicts %lu points killing %s"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5258 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[175], pPlayer->pName, uDamageAmount, pMonster);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5259 ShowStatusBarString(pTmpBuf, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5260 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5261 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5262 if ( SHIDWORD(pMonster->pActorBuffs[20].uExpireTime) >= (signed int)v41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5263 && (SHIDWORD(pMonster->pActorBuffs[20].uExpireTime) > (signed int)v41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5264 || LODWORD(pMonster->pActorBuffs[20].uExpireTime) > v41)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5265 && uDamageAmount != v41 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5266 pPlayer->ReceiveDamage(uDamageAmount, a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5267 v50 = 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5268 v59 = 20 * v61 / (signed int)pMonster->pMonsterInfo.uHP;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5269 if ( (pPlayer->_48EA46_calc_special_bonus_by_items(24) || v58 != v41)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5270 && stru_50C198.GetMagicalResistance(pMonster, 3u) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5271 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5272 LODWORD(v42) = 20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5273 v59 = 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5274 if ( pParty->bTurnBasedModeOn == v41 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5275 v42 = (signed __int64)(flt_6BE3A8_debug_recmod2 * 42.66666666666666);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5276 pMonster->pMonsterInfo.uRecoveryTime += v42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5277 if ( bShowDamage != v41 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5278 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5279 v50 = (int)pMonster;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5280 pMonsterName = pPlayer->pName; // "%s stuns %s"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5281 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[635], pPlayer->pName, pMonster);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5282 ShowStatusBarString(pTmpBuf, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5283 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5284 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5285 if ( v53 != v41 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5286 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5287 if ( pMonster->CanAct() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5288 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5289 if ( stru_50C198.GetMagicalResistance(pMonster, 3u) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5290 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5291 LOBYTE(v43) = pPlayer->GetActualSkillLevel(PLAYER_SKILL_MACE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5292 v44 = v43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5293 v45 = SkillToMastery(v43);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5294 v51 = (unsigned __int64 *)(7680 * (v44 & 0x3F));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5295 v46 = pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)v51 * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5296 pMonster->pActorBuffs[6].Apply(v46, v45, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5297 if ( bShowDamage )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5298 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5299 v50 = (int)pMonster;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5300 pMonsterName = pPlayer->pName; // "%s paralyzes %s"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5301 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[636], pPlayer->pName, pMonster);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5302 ShowStatusBarString(pTmpBuf, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5303 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5304 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5305 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5306 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5307 if ( v59 > 10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5308 v59 = 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5309 if ( !MonsterStats::BelongsToSupertype(pMonster->pMonsterInfo.uID, MONSTER_SUPERTYPE_TREANT) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5310 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5311 pVelocity->x = (unsigned __int64)(v59 * (signed __int64)pVelocity->x) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5312 pVelocity->y = (unsigned __int64)(v59 * (signed __int64)pVelocity->y) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5313 pVelocity->z = (unsigned __int64)(v59 * (signed __int64)pVelocity->z) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5314 pMonster->vVelocity.x = 50 * LOWORD(pVelocity->x);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5315 pMonster->vVelocity.y = 50 * LOWORD(pVelocity->y);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5316 pMonster->vVelocity.z = 50 * LOWORD(pVelocity->z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5317 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5318 return Actor::AddBloodsplatOnDamageOverlay(uActorID_Monster_, 1, v61);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5319 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5320 // 4D864C: using guessed type char byte_4D864C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5321
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5322
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5323 //----- (00439FCB) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5324 void __fastcall DamagePlayerFromMonster(unsigned int uObjID, int a2, Vec3_int_ *pPos, unsigned int a4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5325 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5326 signed int v4; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5327 unsigned int v5; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5328 Player *v6; // ebx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5329 Actor *v7; // esi@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5330 unsigned int v8; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5331 char *v9; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5332 signed int v10; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5333 int v11; // edx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5334 int v12; // edx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5335 int v13; // edx@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5336 int v14; // edx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5337 int v15; // edx@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5338 int v16; // edx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5339 enum SoundID v17; // eax@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5340 int v18; // eax@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5341 unsigned __int8 v19; // zf@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5342 unsigned __int8 v20; // sf@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5343 unsigned __int16 v21; // ax@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5344 signed int v22; // edi@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5345 int v23; // eax@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5346 signed int v24; // eax@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5347 unsigned __int16 v25; // cx@47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5348 signed int v26; // eax@49
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5349 int v27; // eax@54
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5350 float v28; // ST18_4@58
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5351 double v29; // st7@58
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5352 float v30; // ST08_4@58
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5353 double v31; // st7@58
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5354 float v32; // ST04_4@58
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5355 float v33; // ST00_4@58
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5356 int v34; // edi@61
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5357 int v35; // eax@70
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5358 double v36; // st7@70
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5359 LayingItem *v37; // ebx@77
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5360 int v38; // edi@77
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5361 int v39; // esi@77
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5362 int v40; // eax@77
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5363 int v41; // eax@77
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5364 int v42; // eax@78
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5365 char *v43; // eax@81
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5366 Actor *v44; // esi@82
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5367 char *v45; // edi@84
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5368 unsigned __int16 v46; // ax@84
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5369 int v47; // ebx@105
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5370 int v48; // eax@107
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5371 unsigned __int16 v49; // ax@116
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5372 int v50; // ebx@123
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5373 unsigned __int16 v51; // ax@124
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5374 char v52; // bl@124
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5375 int v53; // eax@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5376 signed int v54; // eax@134
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5377 unsigned __int16 v55; // cx@137
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5378 signed int v56; // eax@139
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5379 int v57; // eax@144
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5380 float v58; // ST18_4@148
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5381 double v59; // st7@148
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5382 float v60; // ST08_4@148
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5383 double v61; // st7@148
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5384 float v62; // ST04_4@148
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5385 float v63; // ST00_4@148
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5386 int v64; // ebx@151
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5387 int v65; // eax@161
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5388 double v66; // st7@161
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5389 signed int v67; // ecx@164
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5390 signed int v68; // eax@170
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5391 int v69; // ecx@170
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5392 int v70; // eax@171
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5393 enum SoundID v71; // [sp+20h] [bp-34h]@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5394 int v72; // [sp+30h] [bp-24h]@164
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5395 double v73; // [sp+40h] [bp-14h]@72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5396 signed int v74; // [sp+44h] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5397 unsigned int v75; // [sp+48h] [bp-Ch]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5398 unsigned int uActorID; // [sp+4Ch] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5399 int v77; // [sp+50h] [bp-4h]@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5400 signed int a4a; // [sp+60h] [bp+Ch]@162
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5401 Player *a4b; // [sp+60h] [bp+Ch]@168
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5402
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5403 v4 = (signed int)uObjID >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5404 v5 = (uObjID & 7) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5405 v74 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5406 uActorID = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5407 if ( v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5408 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5409 if ( v5 != 1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5410 || (v6 = &pParty->pPlayers[a4], v7 = &pActors[v4],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5411 v75 = v6->sHealth,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5412 !stru_50C198.ActorHitOrMiss(v7, v6)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5413 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5414 v8 = v6->pEquipment.uBody;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5415 if ( !v8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5416 || (v9 = (char *)v6 + 36 * v8, v9[516] & 2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5417 || (v10 = pItemsTable->pItems[*((int *)v9 + 124)].uSkillType, v10 < 10)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5418 || v10 > 11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5419 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5420 v14 = rand() % 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5421 if ( !v14 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5422 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5423 v71 = (SoundID)108;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5424 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5425 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5426 v15 = v14 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5427 if ( !v15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5428 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5429 v71 = (SoundID)109;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5430 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5431 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5432 v16 = v15 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5433 if ( !v16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5434 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5435 v71 = (SoundID)110;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5436 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5437 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5438 if ( v16 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5439 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5440 v71 = (SoundID)44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5441 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5442 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5443 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5444 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5445 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5446 v11 = rand() % 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5447 if ( !v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5448 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5449 v71 = (SoundID)105;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5450 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5451 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5452 v12 = v11 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5453 if ( !v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5454 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5455 v71 = (SoundID)106;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5456 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5457 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5458 v13 = v12 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5459 if ( !v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5460 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5461 v71 = (SoundID)107;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5462 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5463 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5464 if ( v13 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5465 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5466 v71 = (SoundID)45;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5467 LABEL_24:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5468 v17 = v71;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5469 goto LABEL_26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5470 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5471 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5472 v17 = (SoundID)a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5473 LABEL_26:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5474 pAudioPlayer->PlaySound(v17, (8 * a4 + 80) | 4, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5475 v18 = Actor::_43B3E0_CalcDamage(v7, v74);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5476 v19 = HIDWORD(v7->pActorBuffs[3].uExpireTime) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5477 v20 = SHIDWORD(v7->pActorBuffs[3].uExpireTime) < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5478 v77 = v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5479 if ( !v20 && (!(v20 | v19) || LODWORD(v7->pActorBuffs[3].uExpireTime) > 0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5480 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5481 v21 = v7->pActorBuffs[3].uPower;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5482 if ( v21 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5483 v77 /= (signed int)v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5484 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5485 if ( v74 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5486 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5487 if ( v74 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5488 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5489 v22 = v7->pMonsterInfo.uAttack2Type;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5490 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5491 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5492 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5493 if ( v74 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5494 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5495 v23 = v7->pMonsterInfo.uSpell1ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5496 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5497 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5498 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5499 if ( v74 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5500 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5501 if ( v74 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5502 v22 = v7->pMonsterInfo.field_3C_some_special_attack;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5503 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5504 v22 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5505 goto LABEL_43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5506 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5507 v23 = v7->pMonsterInfo.uSpell2ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5508 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5509 v22 = LOBYTE(pSpellStats->pInfos[v23].uSchool);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5510 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5511 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5512 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5513 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5514 v22 = v7->pMonsterInfo.uAttack1Type;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5515 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5516 LABEL_43:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5517 if ( !(dword_6BE368_debug_settings_2 & 0x10) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5518 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5519 v24 = v6->ReceiveDamage(v77, v22);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5520 if ( SHIDWORD(v6->pPlayerBuffs[10].uExpireTime) >= 0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5521 && (SHIDWORD(v6->pPlayerBuffs[10].uExpireTime) > 0 || LODWORD(v6->pPlayerBuffs[10].uExpireTime)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5522 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5523 v25 = v7->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5524 if ( v25 != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5525 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5526 if ( v25 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5527 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5528 v26 = stru_50C198.CalcMagicalDamageToActor(v7, v22, v24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5529 v7->sCurrentHP -= v26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5530 if ( v26 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5531 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5532 if ( v7->sCurrentHP >= 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5533 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5534 Actor::_4030AD(uActorID, 8 * a4 | 4, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5535 Actor::_43AC45(uActorID, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5536 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5537 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5538 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5539 if ( pMonsterStats->pInfos[v7->pMonsterInfo.uID].bQuestMonster & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5540 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5541 v27 = byte_4D864C && BYTE2(pGame->uFlags) & 8 ? 10 * v7->uActorRadius : v7->uActorRadius;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5542 v74 = v27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5543 if ( pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5544 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5545 if ( pGame->uFlags2 & 0x20 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5546 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5547 v28 = (double)v74;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5548 v74 = v7->vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5549 v29 = (double)v74;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5550 v74 = v7->vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5551 v30 = v29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5552 v31 = (double)v74;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5553 v74 = v7->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5554 v32 = v31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5555 v33 = (double)v74;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5556 pDecalBuilder->AddBloodsplat(v33, v32, v30, 1.0, 0.0, 0.0, v28, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5557 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5558 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5559 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5560 Actor::Die(uActorID);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5561 Actor::_438CF3(uActorID);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5562 Actor::_43AC45(uActorID, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5563 if ( v7->pMonsterInfo.uExp )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5564 sub_4269A2_GivePartyExp(pMonsterStats->pInfos[v7->pMonsterInfo.uID].uExp);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5565 v34 = 51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5566 if ( rand() % 100 < 20 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5567 v34 = ((signed int)v7->pMonsterInfo.uHP >= 100) + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5568 v6->PlaySound(v34, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5569 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5570 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5571 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5572 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5573 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5574 if ( !(dword_6BE368_debug_settings_2 & 0x10)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5575 && v7->pMonsterInfo.uSpecialAttack
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5576 && rand() % 100 < v7->pMonsterInfo.uLevel * v7->pMonsterInfo.uSpecialAttackType )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5577 v6->_48DCF6(v7->pMonsterInfo.uSpecialAttack, v7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5578 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5579 if ( !pParty->bTurnBasedModeOn )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5580 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5581 v35 = v6->GetActualEndurance();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5582 v36 = (double)(20 - v6->_48EA1B_get_static_effect(v35)) * flt_6BE3A4_debug_recmod1 * 2.133333333333333;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5583 v6->SetRecoveryTime((signed __int64)v36);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5584 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5585 if ( v77 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5586 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5587 v73 = (double)(signed int)v75;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5588 if ( (double)v6->GetMaxHealth() * 0.25 < v73 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5589 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5590 if ( v6->sHealth > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5591 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5592 if ( (double)v6->GetMaxHealth() * 0.25 >= (double)v6->sHealth )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5593 v6->PlaySound(48, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5594 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5595 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5596 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5597 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5598 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5599 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5600 v37 = &pLayingItems[uActorID];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5601 v38 = v37->field_58 & 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5602 v39 = v37->field_58 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5603 v40 = v37->field_58 & 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5604 uActorID = v37->field_58 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5605 v41 = v40 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5606 if ( !v41 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5607 goto LABEL_80;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5608 v42 = v41 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5609 if ( !v42 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5610 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5611 v44 = &pActors[v39];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5612 if ( a4 == -1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5613 a4 = stru_50C198.which_player_would_attack(v44);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5614 v45 = (char *)&pParty->pPlayers[a4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5615 v77 = Actor::_43B3E0_CalcDamage(v44, v74);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5616 v46 = v37->uItemType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5617 if ( v37->uItemType == 545 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5618 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5619 LOBYTE(v51) = ((Player *)v45)->GetActualSkillLevel(PLAYER_SKILL_UNARMED);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5620 v52 = v51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5621 if ( (signed int)SkillToMastery(v51) >= 4 && rand() % 100 < (v52 & 0x3F) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5622 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5623 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[637], v45 + 168);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5624 ShowStatusBarString(pTmpBuf, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5625 ((Player *)v45)->PlaySound(6, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5626 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5627 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5628 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5629 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5630 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5631 if ( v46 != 555
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5632 && v46 != 510
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5633 && v46 != 500
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5634 && v46 != 515
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5635 && v46 != 505
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5636 && v46 != 530
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5637 && v46 != 525
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5638 && v46 != 520
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5639 && v46 != 535
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5640 && v46 != 540 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5641 goto LABEL_115;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5642 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5643 if ( !stru_50C198.ActorHitOrMiss(v44, (Player *)v45) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5644 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5645 if ( *((_QWORD *)v45 + 782) > 0i64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5646 v77 >>= 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5647 if ( ((Player *)v45)->HasEnchantedItemEquipped(36) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5648 v77 >>= 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5649 if ( ((Player *)v45)->HasEnchantedItemEquipped(69) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5650 v77 >>= 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5651 if ( ((Player *)v45)->HasItemEquipped(EQUIP_ARMOUR)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5652 && *(int *)&v45[36 * *((int *)v45 + 1621) + 496] == 504 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5653 v77 >>= 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5654 v75 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5655 v47 = (int)(v45 + 6472);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5656 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5657 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5658 if ( ((Player *)v45)->HasItemEquipped((ITEM_EQUIP_TYPE)v75) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5659 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5660 v48 = *(int *)&v45[36 * *(int *)v47 + 496];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5661 if ( v48 == 520 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5662 v77 >>= 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5663 if ( v48 == 531 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5664 v77 >>= 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5665 if ( ((Player *)v45)->GetEquippedItemEquipType(v75) == 4 && SkillToMastery(*((short *)v45 + 140)) == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5666 v77 >>= 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5667 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5668 ++v75;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5669 v47 += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5670 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5671 while ( (signed int)v75 <= 1 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5672 LABEL_115:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5673 if ( (signed __int64)v44->pActorBuffs[3].uExpireTime > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5674 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5675 v49 = v44->pActorBuffs[3].uPower;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5676 if ( v49 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5677 v77 /= (signed int)v49;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5678 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5679 if ( !v74 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5680 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5681 v50 = v44->pMonsterInfo.uAttack1Type;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5682 goto LABEL_133;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5683 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5684 if ( v74 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5685 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5686 v50 = v44->pMonsterInfo.uAttack2Type;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5687 goto LABEL_133;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5688 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5689 if ( v74 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5690 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5691 v53 = v44->pMonsterInfo.uSpell1ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5692 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5693 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5694 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5695 if ( v74 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5696 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5697 if ( v74 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5698 v50 = v44->pMonsterInfo.field_3C_some_special_attack;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5699 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5700 v50 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5701 LABEL_133:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5702 if ( !(dword_6BE368_debug_settings_2 & 0x10) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5703 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5704 v54 = ((Player *)v45)->ReceiveDamage(v77, v50);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5705 if ( *((int *)v45 + 1553) >= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5706 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5707 if ( *((int *)v45 + 1553) > 0 || *((int *)v45 + 1552) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5708 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5709 v55 = v44->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5710 if ( v55 != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5711 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5712 if ( v55 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5713 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5714 v56 = stru_50C198.CalcMagicalDamageToActor(v44, v50, v54);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5715 v44->sCurrentHP -= v56;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5716 if ( v56 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5717 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5718 if ( v44->sCurrentHP >= 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5719 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5720 Actor::_4030AD(uActorID, 8 * a4 | 4, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5721 Actor::_43AC45(uActorID, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5722 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5723 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5724 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5725 if ( pMonsterStats->pInfos[v44->pMonsterInfo.uID].bQuestMonster & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5726 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5727 v57 = byte_4D864C && BYTE2(pGame->uFlags) & 8 ? 10 * v44->uActorRadius : v44->uActorRadius;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5728 v75 = v57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5729 if ( pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5730 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5731 if ( pGame->uFlags2 & 0x20 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5732 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5733 v58 = (double)(signed int)v75;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5734 v75 = v44->vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5735 v59 = (double)(signed int)v75;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5736 v75 = v44->vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5737 v60 = v59;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5738 v61 = (double)(signed int)v75;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5739 v75 = v44->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5740 v62 = v61;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5741 v63 = (double)(signed int)v75;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5742 pDecalBuilder->AddBloodsplat(v63, v62, v60, 1.0, 0.0, 0.0, v58, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5743 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5744 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5745 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5746 Actor::Die(uActorID);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5747 Actor::_438CF3(uActorID);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5748 Actor::_43AC45(uActorID, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5749 if ( v44->pMonsterInfo.uExp )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5750 sub_4269A2_GivePartyExp(pMonsterStats->pInfos[v44->pMonsterInfo.uID].uExp);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5751 v64 = 51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5752 if ( rand() % 100 < 20 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5753 v64 = ((signed int)v44->pMonsterInfo.uHP >= 100) + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5754 ((Player *)v45)->PlaySound(v64, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5755 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5756 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5757 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5758 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5759 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5760 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5761 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5762 if ( !v74
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5763 && !(dword_6BE368_debug_settings_2 & 0x10)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5764 && v44->pMonsterInfo.uSpecialAttack
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5765 && rand() % 100 < v44->pMonsterInfo.uLevel * v44->pMonsterInfo.uSpecialAttackType )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5766 ((Player *)v45)->_48DCF6(v44->pMonsterInfo.uSpecialAttack, v44);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5767 if ( !pParty->bTurnBasedModeOn )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5768 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5769 v65 = ((Player *)v45)->GetActualEndurance();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5770 v66 = (double)(20 - ((Player *)v45)->_48EA1B_get_static_effect(v65))
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5771 * flt_6BE3A4_debug_recmod1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5772 * 2.133333333333333;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5773 ((Player *)v45)->SetRecoveryTime((signed __int64)v66);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5774 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5775 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5776 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5777 v53 = v44->pMonsterInfo.uSpell2ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5778 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5779 v50 = LOBYTE(pSpellStats->pInfos[v53].uSchool);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5780 goto LABEL_133;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5781 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5782 if ( v42 != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5783 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5784 LABEL_80:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5785 if ( a4 != -1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5786 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5787 v43 = (char *)&pParty->pPlayers[a4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5788 LABEL_168:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5789 a4b = (Player *)v43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5790 if ( v38 != 4 || v37->field_48 != 100 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5791 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5792 v70 = ((Player *)v43)->GetMaxHealth();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5793 v68 = _43AFE3_calc_spell_damage(v37->field_48, v37->field_4C, v37->field_50, v70);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5794 v69 = LOBYTE(pSpellStats->pInfos[v37->field_48].uSchool);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5795 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5796 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5797 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5798 v68 = pParty->pPlayers[uActorID].CalculateRangedDamageTo(0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5799 v69 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5800 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5801 a4b->ReceiveDamage(v68, v69);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5802 if ( v38 == 4 && !qword_A750D8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5803 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5804 qword_A750D8 = 256i64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5805 word_A750E0 = 44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5806 word_A750E2 = uActorID + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5807 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5808 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5809 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5810 v74 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5811 a4a = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5812 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5813 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5814 if ( pPlayers[a4a]->CanAct() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5815 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5816 v67 = v74++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5817 *(&v72 + v67) = a4a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5818 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5819 ++a4a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5820 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5821 while ( a4a <= 4 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5822 if ( v74 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5823 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5824 v43 = &stru_AA1058[3].pSounds[6972 * *(&v72 + rand() % v74) + 40552];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5825 goto LABEL_168;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5826 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5827 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5828
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5829
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5830 //----- (0043A97E) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5831 void __fastcall sub_43A97E(unsigned int uLayingItemID, signed int a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5832 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5833 unsigned int v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5834 unsigned int v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5835 int v4; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5836 int v5; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5837 unsigned int v6; // [sp+10h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5838
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5839 v6 = uLayingItemID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5840 v2 = uLayingItemID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5841 v3 = a2 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5842 v4 = pLayingItems[uLayingItemID].field_58 & 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5843 v5 = (a2 & 7) - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5844 if ( v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5845 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5846 if ( v5 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5847 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5848 layingitem_vel_50FDFC.x = pLayingItems[v2].vVelocity.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5849 layingitem_vel_50FDFC.y = pLayingItems[v2].vVelocity.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5850 layingitem_vel_50FDFC.z = pLayingItems[v2].vVelocity.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5851 Vec3_int_::Normalize(&layingitem_vel_50FDFC.x, &layingitem_vel_50FDFC.y, &layingitem_vel_50FDFC.z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5852 DamagePlayerFromMonster(8 * v6 | 2, pLayingItems[v2].field_61, &layingitem_vel_50FDFC, 0xFFFFFFFFu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5853 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5854 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5855 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5856 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5857 layingitem_vel_50FDFC.x = pLayingItems[v2].vVelocity.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5858 layingitem_vel_50FDFC.y = pLayingItems[v2].vVelocity.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5859 layingitem_vel_50FDFC.z = pLayingItems[v2].vVelocity.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5860 Vec3_int_::Normalize(&layingitem_vel_50FDFC.x, &layingitem_vel_50FDFC.y, &layingitem_vel_50FDFC.z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5861 switch ( v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5862 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5863 case OBJECT_Actor:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5864 sub_43B1B0(8 * v6 | AI_OBJECT_LAYING_ITEM, v3, &layingitem_vel_50FDFC, pLayingItems[v2].field_61);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5865 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5866 case OBJECT_Player:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5867 DamageMonsterFromParty(8 * v6 | AI_OBJECT_LAYING_ITEM, v3, &layingitem_vel_50FDFC);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5868 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5869 case OBJECT_Item:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5870 sub_43B057(8 * v6 | AI_OBJECT_LAYING_ITEM, v3, &layingitem_vel_50FDFC);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5871 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5872 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5873 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5874 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5875
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5876 //----- (0043AA99) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5877 void __fastcall Vec3_int_::Rotate(int sDepth, int sRotY, int sRotX, Vec3_int_ v, int *outx, int *outy, int *outz)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5878 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5879 int v7; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5880 int v8; // ST14_4@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5881 int v9; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5882 int anglea; // [sp+20h] [bp+8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5883
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5884 v7 = sRotX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5885 v8 = sDepth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5886 v9 = sRotY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5887 anglea = (unsigned __int64)(stru_5C6E00->SinCos(sRotX) * (signed __int64)sDepth) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5888 *outx = v.x + ((unsigned __int64)(stru_5C6E00->SinCos(v9) * (signed __int64)anglea) >> 16);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5889 *outy = v.y
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5890 + ((unsigned __int64)(stru_5C6E00->SinCos(v9 - stru_5C6E00->uIntegerHalfPi)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5891 * (signed __int64)anglea) >> 16);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5892 *outz = v.z
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5893 + ((unsigned __int64)(stru_5C6E00->SinCos(v7 - stru_5C6E00->uIntegerHalfPi) * (signed __int64)v8) >> 16);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5894 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5895
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5896 //----- (0043AB61) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5897 void Vec3_int_::Normalize(int *x, int *y, int *z)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5898 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5899 int *v3; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5900 int *v4; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5901 signed int v5; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5902
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5903 v3 = x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5904 v4 = y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5905 v5 = sub_452A9E(*y * *y + *z * *z + *x * *x);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5906 *v3 *= 65536 / (v5 | 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5907 *v4 *= 65536 / (v5 | 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5908 *z *= 65536 / (v5 | 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5909 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5910
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5911
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5912
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5913
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5914 //----- (0043AE12) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5915 double __fastcall sub_43AE12(signed int a1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5916 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5917 signed int v1; // ST00_4@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5918 signed int v2; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5919 double v3; // st7@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5920 double result; // st7@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5921
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5922 v1 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5923 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5924 v3 = (double)v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5925 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5926 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5927 if ( v3 < flt_4E4A80[v2 + 5] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5928 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5929 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5930 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5931 while ( v2 < 5 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5932 if ( v2 <= 0 || v2 >= 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5933 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5934 if ( v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5935 result = flt_4E4A80[4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5936 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5937 result = flt_4E4A80[0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5938 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5939 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5940 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5941 result = (flt_4E4A80[v2] - *(float *)&aAuthenticamd[4 * v2 + 12])
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5942 * (v3 - flt_4E4A80[v2 + 4])
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5943 / (flt_4E4A80[v2 + 5] - flt_4E4A80[v2 + 4])
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5944 + flt_4E4A80[v2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5945 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5946 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5947 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5948
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5949 //----- (0043AFE3) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5950 int __fastcall _43AFE3_calc_spell_damage(int a1, int a2, signed int a3, int a4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5951 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5952 int result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5953 unsigned int v5; // [sp-4h] [bp-8h]@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5954
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5955 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5956 if ( a1 == 7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5957 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5958 if ( a3 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5959 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5960 if ( a3 <= 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5961 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5962 v5 = 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5963 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5964 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5965 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5966 if ( a3 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5967 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5968 v5 = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5969 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5970 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5971 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5972 if ( a3 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5973 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5974 v5 = 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5975 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5976 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5977 result = GetDiceResult(a2, v5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5978 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5979 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5980 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5981 if ( a1 == 44 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5982 result = a4 * (LOBYTE(pSpellDatas[40].field_10) + 2 * a2) / 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5983 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5984 result = *((char *)&pSpellDatas[0].field_10 + 20 * a1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5985 + GetDiceResult(a2, *((char *)&pSpellDatas[0].field_10 + 20 * a1 + 1));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5986 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5987 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5988 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5989
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5990 //----- (0043B057) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5991 void __fastcall sub_43B057(unsigned int uObjID, unsigned int uActorID, Vec3_int_ *pVelocity)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5992 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5993 Actor *pActor; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5994 LayingItem *v4; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5995 int v5; // ecx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5996 int v6; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5997 int v7; // edi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5998 unsigned int uActorIDa; // [sp+8h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5999 unsigned int a2; // [sp+Ch] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6000 int a2a; // [sp+Ch] [bp-4h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6001
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6002 uActorIDa = uActorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6003 pActor = &pActors[uActorID];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6004 a2 = uObjID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6005 if ( !pActors[uActorID].IsAlive() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6006 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6007 if ( (a2 & 7) == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6008 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6009 v4 = &pLayingItems[(signed int)a2 >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6010 v5 = v4->field_48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6011 if ( v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6012 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6013 v6 = _43AFE3_calc_spell_damage(v5, v4->field_4C, v4->field_50, pActor->sCurrentHP);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6014 v7 = stru_50C198.CalcMagicalDamageToActor(pActor, 0, v6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6015 pActor->sCurrentHP -= v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6016 if ( v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6017 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6018 if ( pActor->sCurrentHP > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6019 Actor::_4030AD(uActorIDa, a2, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6020 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6021 Actor::Die(uActorIDa);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6022 a2a = 20 * v7 / (signed int)pActor->pMonsterInfo.uHP;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6023 if ( 20 * v7 / (signed int)pActor->pMonsterInfo.uHP > 10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6024 a2a = 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6025 if ( !MonsterStats::BelongsToSupertype(pActor->pMonsterInfo.uID, MONSTER_SUPERTYPE_TREANT) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6026 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6027 pVelocity->x = (unsigned __int64)(a2a * (signed __int64)pVelocity->x) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6028 pVelocity->y = (unsigned __int64)(a2a * (signed __int64)pVelocity->y) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6029 pVelocity->z = (unsigned __int64)(a2a * (signed __int64)pVelocity->z) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6030 pActor->vVelocity.x = 50 * LOWORD(pVelocity->x);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6031 pActor->vVelocity.y = 50 * LOWORD(pVelocity->y);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6032 pActor->vVelocity.z = 50 * LOWORD(pVelocity->z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6033 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6034 Actor::AddBloodsplatOnDamageOverlay(uActorIDa, 1, v7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6035 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6036 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6037 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6038 Actor::_4030AD(uActorIDa, a2, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6039 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6040 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6041 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6042 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6043 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6044
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6045 //----- (0043B1B0) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6046 __int16 __fastcall sub_43B1B0(signed int a1, unsigned int a2, Vec3_int_ *pVelocity, signed int a4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6047 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6048 int v4; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6049 LayingItem *v5; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6050 bool v6; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6051 Actor *v7; // esi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6052 Actor *v8; // edi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6053 char v9; // zf@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6054 __int64 v10; // qax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6055 signed __int16 v11; // cx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6056 signed int v12; // ecx@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6057 int v13; // ecx@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6058 int v14; // edi@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6059 unsigned int uActorID; // [sp+Ch] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6060 signed int v17; // [sp+10h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6061 int v18; // [sp+20h] [bp+Ch]@34
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6062
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6063 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6064 uActorID = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6065 v17 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6066 if ( (a1 & 7) == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6067 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6068 v5 = &pLayingItems[a1 >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6069 v4 = v5->field_60_distance_related_prolly_lod;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6070 v17 = v5->field_58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6071 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6072 LOWORD(v6) = v17 & 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6073 if ( v6 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6074 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6075 v7 = &pActors[a2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6076 v8 = &pActors[v17 >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6077 v6 = pActors[a2].IsAlive();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6078 if ( !v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6079 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6080 v9 = v7->uAIState == 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6081 v7->uLastCharacterIDToHit = v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6082 if ( v9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6083 BYTE2(v7->uAttributes) |= 2u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6084 v6 = stru_50C198._4273BB(v8, v7, v4, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6085 if ( v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6086 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6087 v10 = (unsigned int)Actor::_43B3E0_CalcDamage(v8, a4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6088 if ( (signed __int64)v8->pActorBuffs[3].uExpireTime > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6089 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6090 v11 = v8->pActorBuffs[3].uPower;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6091 if ( v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6092 v10 = (signed int)v10 / (unsigned __int16)v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6093 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6094 if ( SHIDWORD(v7->pActorBuffs[5].uExpireTime) >= SHIDWORD(v10)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6095 && (SHIDWORD(v7->pActorBuffs[5].uExpireTime) > SHIDWORD(v10)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6096 || LODWORD(v7->pActorBuffs[5].uExpireTime) > HIDWORD(v10)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6097 LODWORD(v10) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6098 if ( a4 != HIDWORD(v10) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6099 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6100 if ( a4 - HIDWORD(v10) == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6101 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6102 v12 = v8->pMonsterInfo.uAttack2Type;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6103 if ( SHIDWORD(v7->pActorBuffs[15].uExpireTime) >= SHIDWORD(v10)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6104 && (SHIDWORD(v7->pActorBuffs[15].uExpireTime) > SHIDWORD(v10)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6105 || LODWORD(v7->pActorBuffs[15].uExpireTime) > HIDWORD(v10)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6106 LODWORD(v10) = (signed int)v10 >> 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6107 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6108 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6109 if ( a4 - HIDWORD(v10) == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6110 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6111 v13 = v7->pMonsterInfo.uSpell1ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6112 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6113 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6114 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6115 if ( a4 - HIDWORD(v10) != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6116 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6117 if ( a4 - HIDWORD(v10) == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6118 v12 = v8->pMonsterInfo.field_3C_some_special_attack;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6119 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6120 v12 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6121 LABEL_30:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6122 v14 = stru_50C198.CalcMagicalDamageToActor(v7, v12, v10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6123 v7->sCurrentHP -= v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6124 if ( v14 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6125 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6126 if ( v7->sCurrentHP > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6127 Actor::_4030AD(uActorID, v17, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6128 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6129 Actor::Die(uActorID);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6130 Actor::_43AC45(uActorID, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6131 v18 = 20 * v14 / (signed int)v7->pMonsterInfo.uHP;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6132 if ( 20 * v14 / (signed int)v7->pMonsterInfo.uHP > 10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6133 v18 = 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6134 if ( !MonsterStats::BelongsToSupertype(v7->pMonsterInfo.uID, MONSTER_SUPERTYPE_TREANT) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6135 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6136 pVelocity->x = (unsigned __int64)(v18 * (signed __int64)pVelocity->x) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6137 pVelocity->y = (unsigned __int64)(v18 * (signed __int64)pVelocity->y) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6138 pVelocity->z = (unsigned __int64)(v18 * (signed __int64)pVelocity->z) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6139 v7->vVelocity.x = 50 * LOWORD(pVelocity->x);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6140 v7->vVelocity.y = 50 * LOWORD(pVelocity->y);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6141 v7->vVelocity.z = 50 * LOWORD(pVelocity->z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6142 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6143 LOWORD(v6) = Actor::AddBloodsplatOnDamageOverlay(uActorID, 1, v14);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6144 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6145 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6146 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6147 LOWORD(v6) = Actor::_4030AD(uActorID, v17, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6148 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6149 return v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6150 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6151 v13 = v7->pMonsterInfo.uSpell2ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6152 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6153 v12 = LOBYTE(pSpellStats->pInfos[v13].uSchool);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6154 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6155 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6156 v12 = v8->pMonsterInfo.uAttack1Type;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6157 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6158 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6159 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6160 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6161 return v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6162 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6163
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6164
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6165 //----- (0043BCA7) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6166 int __cdecl CharacterUI_LoadPaperdollTextures()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6167 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6168 int v0; // edi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6169 enum CHARACTER_RACE v1; // ebx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6170 signed int v2; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6171 int v3; // ebx@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6172 Player *v4; // edi@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6173 unsigned __int8 v5; // cl@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6174 int v6; // edi@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6175 unsigned int v7; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6176 Player *v8; // ebx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6177 char *v9; // ebx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6178 char v10; // al@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6179 signed int v11; // edi@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6180 Player *v12; // ebx@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6181 Player *v13; // edi@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6182 int v14; // ebp@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6183 stru331 *v15; // edi@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6184 signed int v16; // ebx@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6185 unsigned int v17; // eax@67
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6186 unsigned int *v18; // ecx@67
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6187 unsigned int *v19; // ebx@68
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6188 int v20; // edi@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6189 int v21; // ebp@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6190 unsigned int v22; // eax@76
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6191 int v23; // ecx@76
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6192 unsigned int v24; // eax@78
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6193 int v25; // ecx@78
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6194 int v26; // ebx@79
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6195 unsigned int v27; // eax@80
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6196 int v28; // ecx@80
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6197 int result; // eax@83
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6198 int v30; // [sp+10h] [bp-28h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6199 signed int v31; // [sp+10h] [bp-28h]@68
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6200 signed int v32; // [sp+10h] [bp-28h]@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6201 signed int v33; // [sp+10h] [bp-28h]@77
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6202 int v34; // [sp+10h] [bp-28h]@79
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6203 char *v35; // [sp+14h] [bp-24h]@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6204 int v36; // [sp+14h] [bp-24h]@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6205 int v37; // [sp+14h] [bp-24h]@77
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6206 signed int v38; // [sp+14h] [bp-24h]@79
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6207 unsigned int *v39; // [sp+18h] [bp-20h]@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6208 int *v40; // [sp+18h] [bp-20h]@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6209 unsigned int *v41; // [sp+1Ch] [bp-1Ch]@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6210 int v42; // [sp+20h] [bp-18h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6211 int v43; // [sp+20h] [bp-18h]@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6212 char pContainer[128]; // [sp+24h] [bp-14h]@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6213
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6214 uTextureID_MAGNIF_B = pIcons_LOD->LoadTexture("MAGNIF-B", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6215 if ( !pParty->uAlignment || pParty->uAlignment == 1 || pParty->uAlignment == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6216 uTextureID_BACKDOLL = pIcons_LOD->LoadTexture("BACKDOLL", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6217 uTextureID_507B04 = uTextureID_right_panel;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6218 v30 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6219 uTextureID_BACKHAND = pIcons_LOD->LoadTexture("BACKHAND", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6220 uTextureID_5118C8 = uTextureID_506438;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6221 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6222 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6223 v42 = v30 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6224 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(v30 + 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6225 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6226 v0 = v30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6227 v1 = pPlayers[v30 + 1]->GetRace();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6228 v2 = pPlayers[v30 + 1]->GetSexByVoice();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6229 if ( v1 && v1 != 1 && v1 != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6230 v3 = (v2 != 0) + 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6231 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6232 v3 = (v2 != 0) + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6233 wsprintfA(pContainer, "pc23v%dBod", v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6234 papredoll_dbods[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6235 wsprintfA(pContainer, "pc23v%dlad", v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6236 papredoll_dlads[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6237 wsprintfA(pContainer, "pc23v%dlau", v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6238 papredoll_dlaus[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6239 wsprintfA(pContainer, "pc23v%drh", v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6240 papredoll_drhs[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6241 wsprintfA(pContainer, "pc23v%dlh", v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6242 papredoll_dlhs[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6243 wsprintfA(pContainer, "pc23v%dlhu", v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6244 papredoll_dlhus[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6245 v4 = pPlayers[v0 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6246 v5 = v4->uFace;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6247 if ( v5 == 12 || v5 == 13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6248 papredoll_dbrds[(char)v5] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6249 papredoll_flying_feet[v4->uFace] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6250 IsPlayerWearingWatersuit[v30 + 1] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6251 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6252 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6253 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6254 v6 = v30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6255 papredoll_dbods[v30] = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6256 dbod_texnames_by_face[pPlayers[v30 + 1]->uFace],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6257 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6258 papredoll_dlads[v30] = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6259 dlad_texnames_by_face[pPlayers[v30 + 1]->uFace],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6260 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6261 papredoll_dlaus[v30] = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6262 dlau_texnames_by_face[pPlayers[v30 + 1]->uFace],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6263 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6264 papredoll_drhs[v30] = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6265 drh_texnames_by_face[pPlayers[v30 + 1]->uFace],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6266 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6267 papredoll_dlhs[v30] = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6268 dlh_texnames_by_face[pPlayers[v30 + 1]->uFace],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6269 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6270 v7 = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6271 dlhu_texnames_by_face[pPlayers[v30 + 1]->uFace],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6272 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6273 v8 = pPlayers[v30 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6274 papredoll_dlhus[v30] = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6275 v9 = (char *)&v8->uFace;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6276 v10 = *v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6277 if ( *v9 == 12 || v10 == 13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6278 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6279 wsprintfA(pContainer, "pc%02dbrd", v10 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6280 v9 = (char *)&pPlayers[v6 + 1]->uFace;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6281 papredoll_dbrds[*v9] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6282 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6283 wsprintfA(pContainer, "item281pc%02d", *v9 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6284 papredoll_flying_feet[pPlayers[v6 + 1]->uFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6285 IsPlayerWearingWatersuit[v30 + 1] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6286 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6287 ++v30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6288 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6289 while ( v42 < 4 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6290 uTextureID_ar_up_up = pIcons_LOD->LoadTexture("ar_up_up", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6291 uTextureID_ar_up_dn = pIcons_LOD->LoadTexture("ar_up_dn", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6292 uTextureID_ar_dn_up = pIcons_LOD->LoadTexture("ar_dn_up", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6293 uTextureID_ar_dn_dn = pIcons_LOD->LoadTexture("ar_dn_dn", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6294 papredoll_dbrds[9] = pIcons_LOD->LoadTexture("ib-cd1-d", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6295 papredoll_dbrds[7] = pIcons_LOD->LoadTexture("ib-cd2-d", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6296 papredoll_dbrds[5] = pIcons_LOD->LoadTexture("ib-cd3-d", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6297 papredoll_dbrds[3] = pIcons_LOD->LoadTexture("ib-cd4-d", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6298 papredoll_dbrds[1] = pIcons_LOD->LoadTexture("ib-cd5-d", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6299 v11 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6300 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6301 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6302 byte_5111C0[v11] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6303 if ( pParty->pPickedItem.uItemID != v11 + 66 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6304 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6305 v12 = pParty->pPlayers;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6306 while ( !sub_43EE15_player_has_item(v11 + 66, v12, 0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6307 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6308 ++v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6309 if ( (signed int)v12 >= (signed int)pParty->pHirelings )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6310 goto LABEL_28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6311 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6312 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6313 byte_5111C0[v11] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6314 LABEL_28:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6315 ++v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6316 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6317 while ( v11 < 54 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6318 *(int *)byte_5111F6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6319 *(int *)&byte_5111F6[4] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6320 *(int *)&byte_5111F6[8] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6321 *(int *)&byte_5111F6[12] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6322 *(int *)&byte_5111F6[16] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6323 v13 = pParty->pPlayers;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6324 v14 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6325 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6326 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6327 if ( sub_43EE15_player_has_item(0x204u, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6328 byte_5111F6[2] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6329 if ( sub_43EE15_player_has_item(0x1F8u, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6330 byte_5111F6[0] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6331 if ( sub_43EE15_player_has_item(0x1F9u, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6332 byte_5111F6[1] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6333 if ( sub_43EE15_player_has_item(0x215u, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6334 byte_5111F6[16] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6335 if ( sub_43EE15_player_has_item(0x200u, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6336 byte_5111F6[3] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6337 if ( sub_43EE15_player_has_item(0x209u, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6338 byte_5111F6[4] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6339 if ( sub_43EE15_player_has_item(0x20Au, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6340 byte_5111F6[5] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6341 if ( sub_43EE15_player_has_item(0x20Bu, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6342 byte_5111F6[6] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6343 if ( sub_43EE15_player_has_item(0x214u, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6344 byte_5111F6[7] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6345 if ( sub_43EE15_player_has_item(0x220u, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6346 byte_5111F6[8] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6347 if ( sub_43EE15_player_has_item(0x20Cu, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6348 byte_5111F6[9] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6349 if ( sub_43EE15_player_has_item(0x217u, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6350 byte_5111F6[10] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6351 if ( sub_43EE15_player_has_item(0x20Du, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6352 byte_5111F6[11] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6353 if ( sub_43EE15_player_has_item(0x212u, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6354 byte_5111F6[12] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6355 if ( sub_43EE15_player_has_item(0x223u, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6356 byte_5111F6[13] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6357 if ( sub_43EE15_player_has_item(0x224u, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6358 byte_5111F6[14] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6359 if ( sub_43EE15_player_has_item(0x226u, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6360 byte_5111F6[15] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6361 ++v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6362 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6363 while ( (signed int)v13 < (signed int)pParty->pHirelings );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6364 v15 = &stru_511698.field_2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6365 v35 = (char *)&stru_511718.field_18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6366 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6367 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6368 v16 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6369 v39 = (unsigned int *)(v35 - 24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6370 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6371 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6372 _43C91D_FormItemTextureFilename(pContainer, v16 + 100, v14, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6373 v17 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6374 ++v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6375 v18 = v39;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6376 ++v39;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6377 *v18 = v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6378 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6379 while ( v16 < 5 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6380 _43C91D_FormItemTextureFilename(pContainer, 535, v14, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6381 v31 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6382 v19 = (unsigned int *)((char *)v15 - 44);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6383 *(int *)v35 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6384 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6385 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6386 _43C91D_FormItemTextureFilename(pContainer, v31++ + 89, v14, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6387 *v19 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6388 ++v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6389 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6390 while ( v31 < 11 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6391 _43C91D_FormItemTextureFilename(pContainer, 521, v14, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6392 v15->field_0 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6393 _43C91D_FormItemTextureFilename(pContainer, 522, v14, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6394 v15->field_4 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6395 _43C91D_FormItemTextureFilename(pContainer, 523, v14, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6396 v15->field_8 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6397 _43C91D_FormItemTextureFilename(pContainer, 532, v14, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6398 v15->field_C = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6399 _43C91D_FormItemTextureFilename(pContainer, 544, v14, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6400 v15->field_10 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6401 if ( sub_43ED6F_get_some_race_sex_relation(1u) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6402 papredoll_dbrds[11] = pIcons_LOD->LoadTexture("item092v3", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6403 v35 += 28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6404 ++v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6405 ++v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6406 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6407 while ( v14 - 1 < 2 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6408 v43 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6409 v20 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6410 v40 = &dword_511638[0][5];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6411 v21 = (int)paperdoll_array_511290[0][13];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6412 v41 = (unsigned int *)&stru_511718.texid1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6413 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6414 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6415 if ( sub_43EDB9_get_some_race_sex_relation_2(v20 - 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6416 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6417 _43C91D_FormItemTextureFilename(pContainer, 524, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6418 v32 = 66;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6419 *v41 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6420 v36 = v21 - 152;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6421 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6422 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6423 _43C91D_FormItemTextureFilename(pContainer, v32, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6424 *(int *)(v36 - 4) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6425 _43C91D_FormItemTextureFilename(pContainer, v32, v20, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6426 *(int *)v36 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6427 _43C91D_FormItemTextureFilename(pContainer, v32, v20, 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6428 v22 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6429 v23 = v36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6430 v36 += 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6431 ++v32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6432 *(int *)(v23 + 4) = v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6433 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6434 while ( v32 - 66 < 13 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6435 _43C91D_FormItemTextureFilename(pContainer, 516, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6436 *(int *)v21 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6437 _43C91D_FormItemTextureFilename(pContainer, 516, v20, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6438 *(int *)(v21 + 4) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6439 _43C91D_FormItemTextureFilename(pContainer, 516, v20, 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6440 *(int *)(v21 + 8) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6441 _43C91D_FormItemTextureFilename(pContainer, 505, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6442 *(int *)(v21 + 12) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6443 _43C91D_FormItemTextureFilename(pContainer, 505, v20, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6444 *(int *)(v21 + 16) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6445 _43C91D_FormItemTextureFilename(pContainer, 505, v20, 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6446 *(int *)(v21 + 20) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6447 _43C91D_FormItemTextureFilename(pContainer, 504, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6448 *(int *)(v21 + 24) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6449 _43C91D_FormItemTextureFilename(pContainer, 504, v20, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6450 *(int *)(v21 + 28) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6451 _43C91D_FormItemTextureFilename(pContainer, 504, v20, 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6452 *(int *)(v21 + 32) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6453 _43C91D_FormItemTextureFilename(pContainer, 533, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6454 *(int *)(v21 + 36) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6455 _43C91D_FormItemTextureFilename(pContainer, 533, v20, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6456 *(int *)(v21 + 40) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6457 _43C91D_FormItemTextureFilename(pContainer, 533, v20, 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6458 *(int *)(v21 + 44) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6459 v33 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6460 v37 = (int)(v40 - 5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6461 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6462 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6463 _43C91D_FormItemTextureFilename(pContainer, v33 + 115, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6464 v24 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6465 ++v33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6466 v25 = v37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6467 v37 += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6468 *(int *)v25 = v24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6469 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6470 while ( v33 < 5 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6471 _43C91D_FormItemTextureFilename(pContainer, 512, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6472 v26 = v43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6473 v38 = 105;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6474 v34 = v43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6475 *v40 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6476 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6477 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6478 _43C91D_FormItemTextureFilename(pContainer, v38, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6479 *(int *)((char *)paperdoll_array_511828 + v34) = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6480 pContainer,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6481 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6482 _43C91D_FormItemTextureFilename(pContainer, v38, v20, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6483 v27 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6484 v28 = v34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6485 v34 += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6486 ++v38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6487 *(int *)((char *)dword_511788 + v28) = v27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6488 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6489 while ( v38 - 105 < 5 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6490 _43C91D_FormItemTextureFilename(pContainer, 525, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6491 *(int *)((char *)&paperdoll_array_511828[0][5] + v43) = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6492 pContainer,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6493 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6494 _43C91D_FormItemTextureFilename(pContainer, 530, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6495 *(int *)((char *)&paperdoll_array_511828[0][6] + v43) = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6496 pContainer,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6497 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6498 _43C91D_FormItemTextureFilename(pContainer, 547, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6499 *(int *)((char *)&paperdoll_array_511828[0][7] + v43) = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6500 pContainer,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6501 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6502 _43C91D_FormItemTextureFilename(pContainer, 548, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6503 *(int *)((char *)&paperdoll_array_511828[0][8] + v43) = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6504 pContainer,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6505 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6506 _43C91D_FormItemTextureFilename(pContainer, 550, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6507 *(int *)((char *)&paperdoll_array_511828[0][9] + v43) = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6508 pContainer,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6509 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6510 _43C91D_FormItemTextureFilename(pContainer, 525, v20, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6511 *(int *)((char *)&dword_51179C + v43) = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6512 pContainer,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6513 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6514 _43C91D_FormItemTextureFilename(pContainer, 530, v20, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6515 *(int *)((char *)&dword_5117A0 + v43) = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6516 pContainer,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6517 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6518 _43C91D_FormItemTextureFilename(pContainer, 547, v20, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6519 *(int *)((char *)&dword_5117A4 + v43) = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6520 pContainer,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6521 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6522 _43C91D_FormItemTextureFilename(pContainer, 548, v20, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6523 *(int *)((char *)&dword_5117A8 + v43) = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6524 pContainer,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6525 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6526 _43C91D_FormItemTextureFilename(pContainer, 550, v20, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6527 *(int *)((char *)&dword_5117AC + v43) = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6528 pContainer,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6529 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6530 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6531 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6532 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6533 v26 = v43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6534 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6535 v41 += 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6536 v40 += 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6537 v21 += 204;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6538 ++v20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6539 result = v20 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6540 v43 = v26 + 40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6541 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6542 while ( v20 - 1 < 4 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6543 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6544 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6545
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6546
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6547
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6548 //----- (0043C91D) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6549 int __fastcall _43C91D_FormItemTextureFilename(char *a1, signed int a2, int a3, int a4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6550 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6551 int result; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6552 char v5; // zf@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6553 const char *v6; // [sp-Ch] [bp-18h]@88
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6554 signed int v7; // [sp-8h] [bp-14h]@61
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6555 int v8; // [sp-4h] [bp-10h]@61
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6556 signed int v9; // [sp-4h] [bp-10h]@69
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6557
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6558 if ( a2 <= 500 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6559 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6560 v5 = *((char *)&pBloodsplatContainer->std__vector_pBloodsplats[62].field_20 + a2 + 2) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6561 LABEL_21:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6562 if ( v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6563 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6564 result = 516;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6565 if ( a2 < 66 || a2 > 78 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6566 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6567 if ( a2 == 516 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6568 goto LABEL_79;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6569 if ( a2 != 504 && a2 != 505 && a2 != 533 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6570 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6571 if ( (a2 < 100 || a2 > 104) && a2 != 524 && a2 != 535 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6572 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6573 if ( a2 >= 115 && a2 <= 119 || a2 == 512 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6574 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6575 if ( a2 == 512 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6576 a2 = 312;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6577 goto LABEL_87;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6578 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6579 if ( (a2 < 89 || a2 > 99) && a2 != 521 && a2 != 522 && a2 != 523 && a2 != 532 && a2 != 544 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6580 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6581 result = 525;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6582 if ( (a2 < 105 || a2 > 109) && a2 != 525 && a2 != 530 && a2 != 547 && a2 != 548 && a2 != 550 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6583 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6584 switch ( a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6585 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6586 case 525:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6587 a2 = 325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6588 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6589 case 530:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6590 a2 = 330;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6591 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6592 case 547:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6593 a2 = 347;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6594 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6595 case 548:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6596 a2 = 348;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6597 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6598 case 550:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6599 a2 = 350;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6600 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6601 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6602 v8 = a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6603 v7 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6604 if ( !a4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6605 goto LABEL_88;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6606 LABEL_91:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6607 v6 = "item%3.3dv%da1";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6608 return sprintfex(a1, v6, v7, v8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6609 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6610 if ( a2 == 521 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6611 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6612 a2 = 239;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6613 goto LABEL_87;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6614 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6615 if ( a2 == 522 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6616 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6617 a2 = 240;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6618 goto LABEL_87;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6619 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6620 if ( a2 == 523 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6621 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6622 a2 = 241;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6623 goto LABEL_87;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6624 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6625 if ( a2 != 532 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6626 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6627 if ( a2 == 544 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6628 a2 = 344;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6629 goto LABEL_87;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6630 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6631 v9 = 93;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6632 goto LABEL_70;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6633 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6634 if ( a2 == 524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6635 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6636 a2 = 324;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6637 goto LABEL_87;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6638 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6639 if ( a2 == 535 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6640 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6641 v9 = 104;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6642 LABEL_70:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6643 a2 = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6644 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6645 LABEL_87:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6646 v8 = a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6647 v7 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6648 LABEL_88:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6649 v6 = "item%3.3dv%d";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6650 return sprintfex(a1, v6, v7, v8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6651 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6652 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6653 if ( a2 != 516 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6654 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6655 switch ( a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6656 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6657 case 504:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6658 a2 = 235;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6659 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6660 case 505:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6661 a2 = 236;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6662 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6663 case 533:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6664 a2 = 73;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6665 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6666 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6667 LABEL_86:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6668 if ( a4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6669 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6670 if ( a4 != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6671 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6672 if ( a4 != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6673 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6674 v8 = a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6675 v7 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6676 v6 = "item%3.3dv%da2";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6677 return sprintfex(a1, v6, v7, v8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6678 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6679 v8 = a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6680 v7 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6681 goto LABEL_91;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6682 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6683 goto LABEL_87;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6684 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6685 LABEL_79:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6686 a2 = 234;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6687 goto LABEL_86;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6688 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6689 result = a2 - 504;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6690 switch ( a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6691 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6692 case 516:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6693 v5 = byte_5111F6[2] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6694 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6695 case 505:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6696 v5 = byte_5111F6[1] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6697 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6698 case 504:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6699 v5 = byte_5111F6[0] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6700 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6701 case 533:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6702 v5 = byte_5111F6[16] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6703 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6704 case 512:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6705 v5 = byte_5111F6[3] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6706 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6707 case 521:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6708 v5 = byte_5111F6[4] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6709 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6710 case 522:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6711 v5 = byte_5111F6[5] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6712 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6713 case 523:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6714 v5 = byte_5111F6[6] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6715 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6716 case 532:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6717 v5 = byte_5111F6[7] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6718 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6719 case 544:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6720 v5 = byte_5111F6[8] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6721 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6722 case 524:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6723 v5 = byte_5111F6[9] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6724 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6725 case 535:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6726 v5 = byte_5111F6[10] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6727 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6728 case 525:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6729 v5 = byte_5111F6[11] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6730 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6731 case 530:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6732 v5 = byte_5111F6[12] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6733 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6734 case 547:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6735 v5 = byte_5111F6[13] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6736 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6737 case 548:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6738 v5 = byte_5111F6[14] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6739 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6740 case 550:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6741 v5 = byte_5111F6[15] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6742 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6743 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6744 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6745 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6746 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6747 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6748
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6749 //----- (0043CC7C) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6750 void __fastcall CharacterUI_DrawPaperdoll(unsigned int uPlayerID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6751 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6752 Player **ppPlayer; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6753 Player *pPlayer; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6754 enum CHARACTER_RACE v3; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6755 signed int v4; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6756 int v5; // edi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6757 unsigned int v6; // ecx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6758 int v7; // ecx@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6759 unsigned int v8; // eax@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6760 int v9; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6761 int v10; // edx@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6762 int v11; // ecx@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6763 int v12; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6764 unsigned int v13; // edi@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6765 unsigned int v14; // ebx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6766 int v15; // ecx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6767 Texture *v16; // ebp@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6768 double v17; // st7@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6769 int v18; // edi@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6770 char *v19; // eax@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6771 Texture *v20; // edi@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6772 unsigned int v21; // eax@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6773 int v22; // edi@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6774 int v23; // eax@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6775 int v24; // ebx@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6776 int v25; // eax@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6777 LODFile_IconsBitmaps *v26; // ecx@42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6778 Texture *v27; // edi@51
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6779 double v28; // st7@51
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6780 char v29; // zf@54
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6781 char *v30; // eax@54
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6782 unsigned int v31; // eax@59
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6783 int v32; // edx@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6784 int v33; // eax@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6785 int v34; // eax@74
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6786 int v35; // ebx@74
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6787 unsigned int v36; // ecx@74
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6788 int v37; // eax@74
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6789 LODFile_IconsBitmaps *v38; // ecx@78
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6790 Texture *v39; // edi@85
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6791 double v40; // st7@87
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6792 int v41; // edi@88
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6793 Texture *v42; // edi@89
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6794 unsigned int v43; // eax@93
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6795 int v44; // edx@94
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6796 int v45; // eax@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6797 int v46; // eax@106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6798 int v47; // ecx@106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6799 int v48; // ebx@106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6800 int v49; // eax@106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6801 LODFile_IconsBitmaps *v50; // ecx@110
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6802 Texture *v51; // edi@117
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6803 double v52; // st7@119
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6804 int v53; // edi@120
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6805 Texture *v54; // edi@121
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6806 char *v55; // eax@122
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6807 unsigned int v56; // eax@127
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6808 int v57; // edi@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6809 int v58; // ecx@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6810 int v59; // ebx@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6811 int v60; // ecx@132
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6812 int v61; // eax@134
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6813 int v62; // ecx@136
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6814 Texture *v63; // edi@145
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6815 double v64; // st7@147
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6816 int v65; // edi@148
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6817 char *v66; // eax@148
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6818 Texture *v67; // edi@149
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6819 Player *v68; // ebx@155
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6820 unsigned int v69; // edx@155
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6821 int v70; // edx@156
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6822 unsigned int v71; // eax@160
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6823 int v72; // edi@161
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6824 int v73; // edx@163
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6825 int v74; // ecx@168
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6826 unsigned int v75; // ebx@170
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6827 int v76; // ecx@172
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6828 Texture *v77; // edi@181
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6829 double v78; // st7@183
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6830 int v79; // edi@184
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6831 char *v80; // eax@184
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6832 Texture *v81; // edi@185
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6833 unsigned int v82; // eax@192
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6834 int v83; // eax@193
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6835 int v84; // eax@197
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6836 int v85; // eax@197
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6837 int v86; // ecx@197
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6838 int v87; // eax@197
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6839 int v88; // eax@198
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6840 int v89; // eax@199
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6841 int v90; // edi@201
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6842 int v91; // edi@213
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6843 int v92; // ebx@213
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6844 int v93; // edi@214
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6845 int v94; // ebx@214
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6846 int v95; // eax@214
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6847 char *v96; // edi@226
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6848 double v97; // st7@228
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6849 int v98; // edi@229
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6850 char *v99; // eax@229
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6851 Render *v100; // ecx@229
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6852 Texture *v101; // edi@230
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6853 int v102; // edi@236
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6854 int v103; // eax@237
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6855 int v104; // ecx@237
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6856 int v105; // edx@237
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6857 int v106; // edx@238
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6858 int v107; // edx@239
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6859 int v108; // edx@240
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6860 int v109; // edi@250
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6861 char *v110; // edx@250
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6862 unsigned int v111; // eax@259
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6863 int v112; // eax@260
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6864 int v113; // eax@260
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6865 int v114; // eax@265
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6866 int v115; // eax@274
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6867 int v116; // ebx@274
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6868 unsigned int v117; // edi@274
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6869 double v118; // st7@286
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6870 int v119; // edi@287
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6871 char *v120; // eax@287
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6872 Texture *v121; // edi@288
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6873 unsigned int v122; // edi@295
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6874 int v123; // ebx@297
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6875 int v124; // edi@298
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6876 int v125; // ecx@303
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6877 int v126; // eax@312
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6878 unsigned int v127; // ebx@314
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6879 int v128; // ecx@316
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6880 Texture *v129; // edi@325
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6881 double v130; // st7@327
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6882 int v131; // edi@328
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6883 char *v132; // eax@328
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6884 Texture *v133; // edi@329
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6885 unsigned int v134; // eax@335
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6886 int v135; // eax@336
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6887 int v136; // edx@336
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6888 int v137; // eax@336
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6889 unsigned int v138; // ebx@339
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6890 int v139; // ecx@339
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6891 Texture *v140; // edi@348
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6892 double v141; // st7@350
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6893 int v142; // edi@351
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6894 char *v143; // eax@351
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6895 Texture *v144; // edi@352
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6896 unsigned int v145; // eax@358
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6897 int v146; // eax@359
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6898 int v147; // ecx@359
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6899 int v148; // eax@359
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6900 int v149; // edx@359
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6901 int v150; // ebx@362
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6902 int v151; // ecx@363
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6903 int v152; // ecx@364
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6904 unsigned int v153; // eax@370
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6905 unsigned int v154; // edi@370
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6906 int v155; // eax@370
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6907 LODFile_IconsBitmaps *v156; // ecx@374
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6908 Texture *v157; // ebp@381
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6909 double v158; // st7@383
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6910 Texture *v159; // edi@385
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6911 char *v160; // eax@386
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6912 unsigned int v161; // eax@393
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6913 int v162; // eax@394
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6914 unsigned int v163; // [sp-Ch] [bp-58h]@230
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6915 unsigned int v164; // [sp-Ch] [bp-58h]@233
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6916 signed int v165; // [sp-Ch] [bp-58h]@235
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6917 char *v166; // [sp-8h] [bp-54h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6918 const char *v167; // [sp-8h] [bp-54h]@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6919 const char *v168; // [sp-8h] [bp-54h]@43
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6920 const char *v169; // [sp-8h] [bp-54h]@79
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6921 const char *v170; // [sp-8h] [bp-54h]@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6922 const char *v171; // [sp-8h] [bp-54h]@141
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6923 const char *v172; // [sp-8h] [bp-54h]@177
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6924 const char *v173; // [sp-8h] [bp-54h]@222
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6925 int v174; // [sp-8h] [bp-54h]@228
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6926 unsigned int v175; // [sp-8h] [bp-54h]@230
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6927 unsigned int v176; // [sp-8h] [bp-54h]@233
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6928 signed int v177; // [sp-8h] [bp-54h]@235
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6929 const char *v178; // [sp-8h] [bp-54h]@242
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6930 const char *v179; // [sp-8h] [bp-54h]@280
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6931 const char *v180; // [sp-8h] [bp-54h]@321
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6932 char *v181; // [sp-8h] [bp-54h]@337
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6933 const char *v182; // [sp-8h] [bp-54h]@344
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6934 const char *v183; // [sp-8h] [bp-54h]@375
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6935 signed int v184; // [sp-4h] [bp-50h]@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6936 signed int v185; // [sp-4h] [bp-50h]@99
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6937 signed int v186; // [sp-4h] [bp-50h]@202
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6938 int v187; // [sp-4h] [bp-50h]@228
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6939 Texture *v188; // [sp-4h] [bp-50h]@230
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6940 Texture *v189; // [sp-4h] [bp-50h]@233
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6941 Texture *v190; // [sp-4h] [bp-50h]@235
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6942 signed int v191; // [sp-4h] [bp-50h]@266
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6943 signed int v192; // [sp-4h] [bp-50h]@304
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6944 unsigned int a3; // [sp+10h] [bp-3Ch]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6945 int a3a; // [sp+10h] [bp-3Ch]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6946 int a3b; // [sp+10h] [bp-3Ch]@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6947 unsigned int a3c; // [sp+10h] [bp-3Ch]@74
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6948 unsigned int a3d; // [sp+10h] [bp-3Ch]@106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6949 int a3e; // [sp+10h] [bp-3Ch]@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6950 int a3f; // [sp+10h] [bp-3Ch]@168
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6951 unsigned int a3g; // [sp+10h] [bp-3Ch]@216
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6952 unsigned int a3h; // [sp+10h] [bp-3Ch]@274
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6953 int a3i; // [sp+10h] [bp-3Ch]@312
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6954 int a3j; // [sp+10h] [bp-3Ch]@336
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6955 int a3k; // [sp+10h] [bp-3Ch]@362
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6956 signed int a2; // [sp+14h] [bp-38h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6957 unsigned int a2a; // [sp+14h] [bp-38h]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6958 Texture *a2b; // [sp+14h] [bp-38h]@49
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6959 int a2c; // [sp+14h] [bp-38h]@74
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6960 int a2d; // [sp+14h] [bp-38h]@106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6961 int a2e; // [sp+14h] [bp-38h]@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6962 int a2f; // [sp+14h] [bp-38h]@168
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6963 int a2g; // [sp+14h] [bp-38h]@214
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6964 int a2h; // [sp+14h] [bp-38h]@274
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6965 Texture *a2i; // [sp+14h] [bp-38h]@284
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6966 int a2j; // [sp+14h] [bp-38h]@312
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6967 int a2k; // [sp+14h] [bp-38h]@336
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6968 Player *v217; // [sp+18h] [bp-34h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6969 int v218; // [sp+1Ch] [bp-30h]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6970 int v219; // [sp+1Ch] [bp-30h]@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6971 int v220; // [sp+1Ch] [bp-30h]@94
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6972 int v221; // [sp+1Ch] [bp-30h]@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6973 int v222; // [sp+1Ch] [bp-30h]@161
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6974 int v223; // [sp+1Ch] [bp-30h]@213
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6975 char v224; // [sp+1Ch] [bp-30h]@237
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6976 int v225; // [sp+1Ch] [bp-30h]@260
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6977 int v226; // [sp+1Ch] [bp-30h]@298
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6978 int v227; // [sp+1Ch] [bp-30h]@336
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6979 int v228; // [sp+1Ch] [bp-30h]@359
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6980 int v229; // [sp+20h] [bp-2Ch]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6981 int v230; // [sp+20h] [bp-2Ch]@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6982 int v231; // [sp+20h] [bp-2Ch]@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6983 int v232; // [sp+20h] [bp-2Ch]@94
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6984 int v233; // [sp+20h] [bp-2Ch]@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6985 int v234; // [sp+20h] [bp-2Ch]@161
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6986 int v235; // [sp+20h] [bp-2Ch]@197
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6987 int v236; // [sp+20h] [bp-2Ch]@260
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6988 int v237; // [sp+20h] [bp-2Ch]@298
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6989 int v238; // [sp+20h] [bp-2Ch]@336
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6990 int v239; // [sp+24h] [bp-28h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6991 int v240; // [sp+28h] [bp-24h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6992 unsigned int v241; // [sp+2Ch] [bp-20h]@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6993 int v242; // [sp+2Ch] [bp-20h]@197
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6994 unsigned int v243; // [sp+2Ch] [bp-20h]@370
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6995 int v244; // [sp+34h] [bp-18h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6996 signed int v245; // [sp+34h] [bp-18h]@361
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6997 unsigned int uPlayerID_; // [sp+38h] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6998 int uPlayerID_a; // [sp+38h] [bp-14h]@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6999 signed int v248; // [sp+40h] [bp-Ch]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7000 int v249; // [sp+40h] [bp-Ch]@358
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7001 signed int v250; // [sp+44h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7002
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7003 ppPlayer = &pPlayers[uPlayerID];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7004 pPlayer = *ppPlayer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7005 uPlayerID_ = uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7006 v217 = *ppPlayer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7007 pIcons_LOD->LoadTexture("sptext01", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7008 v3 = pPlayer->GetRace();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7009 v4 = pPlayer->GetSexByVoice();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7010 v250 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7011 if ( v3 && v3 != 1 && v3 != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7012 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7013 v248 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7014 v5 = (v4 != 0) + 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7015 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7016 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7017 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7018 v248 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7019 v5 = v4 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7020 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7021 v239 = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7022 v244 = (*ppPlayer)->uFace;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7023 pRenderer->ResetClip();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7024 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7025 0x1D3u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7026 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7027 (Texture *)(uTextureID_BACKDOLL != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BACKDOLL] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7028 if ( !IsPlayerWearingWatersuit[uPlayerID_] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7029 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7030 v21 = pPlayer->pEquipment.uBow;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7031 if ( !v21 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7032 goto LABEL_59;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7033 v230 = pPlayer->pEquipment.uBow;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7034 v22 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v21 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7035 v23 = *(int *)v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7036 v24 = papredoll_4E4C28 + array_4E4C30[v239].equip_x - pItemsTable->pItems[v23].uEquipX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7037 a3b = paperdoll_4E4C2C + array_4E4C30[v239].equip_y - pItemsTable->pItems[v23].uEquipY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7038 v241 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v23].pIconName, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7039 v25 = *(int *)(v22 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7040 if ( !(*(int *)(v22 + 20) & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7041 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7042 if ( v25 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7043 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7044 v27 = (Texture *)(v241 != -1 ? (int)&pIcons_LOD->pTextures[v241] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7045 pRenderer->_4A6776(v24, a3b, v27);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7046 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7047 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7048 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7049 v29 = (v25 & 1) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7050 v30 = (char *)&pIcons_LOD->pTextures[v241];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7051 if ( v29 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7052 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7053 v27 = (Texture *)(v241 != -1 ? (int)v30 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7054 pRenderer->DrawTransparentGreenShade(v24, a3b, (Texture *)(v241 != -1 ? (int)v30 : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7055 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7056 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7057 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7058 v27 = (Texture *)(v241 != -1 ? (int)v30 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7059 pRenderer->DrawTextureTransparent(v24, a3b, (Texture *)(v241 != -1 ? (int)v30 : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7060 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7061 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7062 LABEL_57:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7063 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7064 pRenderer->_4A612A(v24, a3b, v27, v230);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7065 LABEL_59:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7066 v31 = v217->pEquipment.uCloak;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7067 if ( !v31 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7068 goto LABEL_93;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7069 v231 = v217->pEquipment.uCloak;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7070 v32 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v31 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7071 v219 = v32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7072 if ( *(int *)v32 != 525 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7073 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7074 switch ( *(int *)v32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7075 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7076 case 0x212:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7077 v184 = 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7078 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7079 case 0x223:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7080 v184 = 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7081 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7082 case 0x224:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7083 v184 = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7084 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7085 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7086 if ( *(int *)v32 != 550 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7087 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7088 v33 = *(int *)v32 - 105;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7089 LABEL_72:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7090 if ( v33 < 0 || v33 >= 10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7091 goto LABEL_93;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7092 LABEL_74:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7093 v34 = v33 + 10 * v239;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7094 v35 = paperdoll_array_511828[0][v34];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7095 a2c = papredoll_4E4C28 + paperdoll_array_4E5570[0][v34][0];// TODO indexing
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7096 v36 = paperdoll_4E4C2C + paperdoll_array_4E5570[0][v34][1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7097 v37 = *(int *)(v32 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7098 a3c = v36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7099 if ( !(v37 & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7100 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7101 v41 = v35 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7102 if ( v37 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7103 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7104 v42 = (Texture *)(v41 != 0 ? (int)&pIcons_LOD->pTextures[v35] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7105 pRenderer->_4A6776(a2c, v36, v42);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7106 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7107 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7108 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7109 v42 = (Texture *)(v41 != 0 ? (int)&pIcons_LOD->pTextures[v35] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7110 pRenderer->DrawTextureTransparent(a2c, v36, v42);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7111 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7112 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7113 pRenderer->_4A612A(a2c, a3c, v42, v231);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7114 LABEL_93:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7115 v240 = 4 * uPlayerID_ - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7116 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7117 papredoll_4E4C28,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7118 paperdoll_4E4C2C,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7119 (Texture *)(*(unsigned int *)((char *)papredoll_dbods + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dbods + v240)] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7120 v43 = v217->pEquipment.uBody;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7121 if ( !v43 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7122 goto LABEL_127;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7123 v232 = v217->pEquipment.uBody;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7124 v44 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v43 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7125 v220 = v44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7126 if ( *(int *)v44 != 504 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7127 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7128 if ( *(int *)v44 == 505 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7129 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7130 v185 = 14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7131 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7132 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7133 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7134 if ( *(int *)v44 == 516 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7135 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7136 v185 = 13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7137 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7138 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7139 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7140 if ( *(int *)v44 != 533 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7141 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7142 v45 = *(int *)v44 - 66;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7143 LABEL_104:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7144 if ( v45 < 0 || v45 >= 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7145 goto LABEL_127;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7146 LABEL_106:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7147 v46 = 17 * v239 + v45;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7148 a2d = papredoll_4E4C28 + paperdoll_array_4E4E30[0][v46][0];// TODO indexing
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7149 v47 = paperdoll_4E4C2C + paperdoll_array_4E4E30[0][v46][1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7150 v48 = paperdoll_array_511290[0][v46][0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7151 v49 = *(int *)(v44 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7152 a3d = v47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7153 if ( !(v49 & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7154 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7155 v53 = v48 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7156 if ( v49 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7157 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7158 v54 = (Texture *)(v53 != 0 ? (int)&pIcons_LOD->pTextures[v48] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7159 pRenderer->_4A6776(a2d, v47, v54);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7160 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7161 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7162 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7163 v29 = (v49 & 1) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7164 v55 = (char *)&pIcons_LOD->pTextures[v48];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7165 if ( v29 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7166 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7167 v54 = (Texture *)(v53 != 0 ? (int)v55 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7168 pRenderer->DrawTransparentGreenShade(a2d, v47, v54);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7169 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7170 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7171 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7172 v54 = (Texture *)(v53 != 0 ? (int)v55 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7173 pRenderer->DrawTextureTransparent(a2d, v47, v54);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7174 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7175 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7176 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7177 pRenderer->_4A612A(a2d, a3d, v54, v232);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7178 LABEL_127:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7179 v56 = v217->pEquipment.field_20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7180 if ( !v56 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7181 goto LABEL_155;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7182 v233 = v217->pEquipment.field_20;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7183 v57 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v56 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7184 v221 = v57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7185 v58 = *(int *)v57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7186 if ( *(int *)v57 == 529 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7187 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7188 a3e = paperdoll_4E4C2C + paredoll_array_4E54B8[v239][1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7189 a2e = papredoll_4E4C28 + paredoll_array_4E54B8[v239][0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7190 v59 = papredoll_flying_feet[v244];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7191 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7192 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7193 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7194 if ( v58 == 512 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7195 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7196 a3e = paperdoll_4E4C2C + paredoll_array_4E54B8[v239][3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7197 a2e = papredoll_4E4C28 + paredoll_array_4E54B8[v239][2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7198 v59 = dword_511638[v239][5];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7199 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7200 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7201 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7202 v60 = v58 - 115;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7203 if ( v60 < 0 || v60 >= 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7204 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7205 a2e = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7206 a3e = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7207 v59 = dword_511638[v239][0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7208 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7209 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7210 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7211 v61 = v60 + 7 * v239;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7212 a3e = paperdoll_4E4C2C + dword_4E5490[0][v61][1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7213 a2e = papredoll_4E4C28 + dword_4E5490[0][v61][0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7214 v59 = dword_511638[0][v60 + 6 * v239];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7215 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7216 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7217 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7218 v62 = *(int *)(v57 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7219 if ( !(*(int *)(v57 + 20) & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7220 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7221 v65 = v59 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7222 v66 = (char *)&pIcons_LOD->pTextures[v59];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7223 if ( v62 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7224 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7225 v67 = (Texture *)(v65 != 0 ? (int)v66 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7226 pRenderer->_4A6776(a2e, a3e, v67);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7227 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7228 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7229 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7230 if ( v62 & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7231 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7232 v67 = (Texture *)(v65 != 0 ? (int)v66 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7233 pRenderer->DrawTextureTransparent(a2e, a3e, v67);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7234 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7235 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7236 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7237 v67 = (Texture *)(v65 != 0 ? (int)v66 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7238 pRenderer->DrawTransparentGreenShade(a2e, a3e, v67);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7239 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7240 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7241 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7242 pRenderer->_4A612A(a2e, a3e, v67, v233);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7243 LABEL_155:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7244 v68 = v217;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7245 v69 = v217->pEquipment.uMainHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7246 uPlayerID_a = 2 * v239;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7247 if ( !v69
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7248 || (v70 = *(int *)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v69 + 5],
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7249 pItemsTable->pItems[v70].uEquipType != 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7250 && (pItemsTable->pItems[v70].uSkillType != 4 || v217->pEquipment.uOffHand) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7251 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7252 papredoll_4E4C28 + dword_4E5AE0[2 * v239],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7253 paperdoll_4E4C2C + dword_4E5AE0[2 * v239 + 1],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7254 (Texture *)(*(unsigned int *)((char *)papredoll_dlads + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlads + v240)] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7255 v71 = v217->pEquipment.uBelt;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7256 if ( v71 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7257 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7258 v234 = v217->pEquipment.uBelt;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7259 v72 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v71 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7260 v222 = v72;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7261 if ( *(int *)v72 == 524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7262 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7263 v73 = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7264 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7265 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7266 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7267 if ( *(int *)v72 == 535 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7268 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7269 v73 = 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7270 goto LABEL_168;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7271 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7272 v73 = *(int *)v72 - 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7273 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7274 if ( v73 >= 0 && v73 < 7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7275 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7276 LABEL_168:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7277 v74 = 7 * v239 + v73;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7278 a2f = papredoll_4E4C28 + dword_4E57F0[0][v74][0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7279 a3f = paperdoll_4E4C2C + dword_4E57F0[0][v74][1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7280 if ( v248 != 1 || v73 == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7281 v75 = stru_511718.texids[v74];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7282 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7283 v75 = stru_511718.texids[v73 + 7 * (v239 - 2)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7284 v76 = *(int *)&v217->field_1F5[36 * v71 + 15];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7285 if ( !(*(int *)&v217->field_1F5[36 * v71 + 15] & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7286 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7287 v79 = v75 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7288 v80 = (char *)&pIcons_LOD->pTextures[v75];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7289 if ( v76 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7290 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7291 v81 = (Texture *)(v79 != 0 ? (int)v80 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7292 pRenderer->_4A6776(a2f, a3f, v81);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7293 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7294 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7295 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7296 if ( v76 & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7297 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7298 v81 = (Texture *)(v79 != 0 ? (int)v80 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7299 pRenderer->DrawTextureTransparent(a2f, a3f, v81);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7300 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7301 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7302 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7303 v81 = (Texture *)(v79 != 0 ? (int)v80 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7304 pRenderer->DrawTransparentGreenShade(a2f, a3f, v81);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7305 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7306 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7307 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7308 pRenderer->_4A612A(a2f, a3f, v81, v234);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7309 goto LABEL_191;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7310 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7311 if ( (*(int *)&v217->field_1F5[36 * v71 + 15] & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7312 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7313 if ( (*(int *)&v217->field_1F5[36 * v71 + 15] & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7314 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7315 v172 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7316 goto LABEL_181;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7317 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7318 if ( (*(int *)&v217->field_1F5[36 * v71 + 15] & 0xF0) == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7319 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7320 v172 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7321 goto LABEL_181;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7322 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7323 if ( (*(int *)&v217->field_1F5[36 * v71 + 15] & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7324 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7325 v172 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7326 LABEL_181:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7327 v77 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v172, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7328 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7329 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7330 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7331 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7332 *(char *)(v222 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7333 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7334 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7335 v78 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7336 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7337 a2f,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7338 a3f,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7339 (Texture *)(v75 != -1 ? (int)&pIcons_LOD->pTextures[v75] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7340 v77,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7341 (signed __int64)v78,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7342 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7343 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7344 LABEL_191:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7345 v68 = v217;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7346 goto LABEL_192;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7347 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7348 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7349 v172 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7350 goto LABEL_181;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7351 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7352 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7353 LABEL_192:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7354 v82 = v68->pEquipment.uMainHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7355 if ( v82 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7356 {
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7357 v83 = *(int *)&v68->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v82 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7358 if ( pItemsTable->pItems[v83].uEquipType == 1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7359 || pItemsTable->pItems[v83].uSkillType == 4 && !v68->pEquipment.uOffHand )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7360 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7361 papredoll_4E4C28 + pPaperdollLeftHand[uPlayerID_a],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7362 paperdoll_4E4C2C + pPaperdollLeftHand[uPlayerID_a + 1],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7363 (Texture *)(*(unsigned int *)((char *)papredoll_dlaus + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlaus + v240)] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7364 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7365 v84 = v68->pEquipment.uBody;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7366 v235 = v84;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7367 v85 = (int)((char *)v68 + 36 * v84);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7368 v242 = v85;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7369 v86 = *(int *)(v85 + 496);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7370 v87 = *(int *)(v85 + 496) - 504;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7371 if ( v87 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7372 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7373 v88 = v87 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7374 if ( v88 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7375 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7376 v89 = v88 - 11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7377 if ( v89 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7378 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7379 if ( v89 != 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7380 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7381 v90 = v86 - 66;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7382 LABEL_207:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7383 if ( v90 < 0 || v90 > 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7384 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7385 LABEL_259:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7386 v111 = v68->pEquipment.uCloak;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7387 if ( !v111 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7388 goto LABEL_293;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7389 v236 = v68->pEquipment.uCloak;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7390 v112 = (int)&v68->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v111 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7391 v225 = v112;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7392 v113 = *(int *)v112;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7393 if ( v113 != 525 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7394 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7395 switch ( v113 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7396 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7397 case 530:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7398 v191 = 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7399 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7400 case 547:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7401 v191 = 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7402 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7403 case 548:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7404 v191 = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7405 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7406 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7407 if ( v113 != 550 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7408 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7409 v114 = v113 - 105;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7410 LABEL_272:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7411 if ( v114 < 0 || v114 >= 10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7412 goto LABEL_293;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7413 LABEL_274:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7414 v115 = v114 + 10 * v239;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7415 v116 = dword_511788[v115];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7416 v115 *= 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7417 v117 = papredoll_4E4C28 + *(int *)((char *)&dword_4E56B0 + v115);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7418 a2h = papredoll_4E4C28 + *(int *)((char *)&dword_4E56B0 + v115);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7419 a3h = paperdoll_4E4C2C + *(int *)((char *)&dword_4E56B4 + v115);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7420 if ( v116 == pIcons_LOD->FindTextureByName("pending") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7421 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7422 LABEL_292:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7423 v68 = v217;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7424 LABEL_293:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7425 if ( v244 == 12 || v244 == 13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7426 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7427 v122 = papredoll_dbrds[v244];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7428 if ( v122 != pIcons_LOD->FindTextureByName("Pending") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7429 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7430 papredoll_4E4C28 + dword_4E5AD0[2 * v244 - 24],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7431 paperdoll_4E4C2C + dword_4E5AD4[2 * v244 - 24],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7432 (Texture *)(v122 != -1 ? (int)&pIcons_LOD->pTextures[v122] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7433 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7434 v123 = v68->pEquipment.uHelm;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7435 if ( !v123 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7436 goto LABEL_335;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7437 v237 = v123;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7438 v124 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v123 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7439 v226 = v124;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7440 if ( *(int *)v124 != 521 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7441 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7442 switch ( *(int *)v124 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7443 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7444 case 0x20A:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7445 v192 = 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7446 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7447 case 0x20B:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7448 v192 = 13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7449 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7450 case 0x214:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7451 v192 = 14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7452 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7453 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7454 if ( *(int *)v124 != 544 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7455 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7456 v125 = *(int *)v124 - 89;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7457 LABEL_310:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7458 if ( v125 < 0 || v125 >= 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7459 goto LABEL_335;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7460 goto LABEL_312;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7461 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7462 v192 = 15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7463 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7464 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7465 v125 = v192;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7466 LABEL_312:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7467 v126 = 2 * (v125 + 16 * v239);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7468 a2j = papredoll_4E4C28 + dword_4E58D0[v126];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7469 a3i = paperdoll_4E4C2C + dword_4E58D4[v126];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7470 if ( v248 != 1 || *(int *)v124 != 92 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7471 v127 = stru_511698.texids[v125 + 16 * v250];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7472 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7473 v127 = papredoll_dbrds[11];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7474 v128 = *(int *)(v124 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7475 if ( *(int *)(v124 + 20) & 0xF0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7476 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7477 if ( (*(int *)(v124 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7478 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7479 if ( (*(int *)(v124 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7480 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7481 v180 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7482 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7483 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7484 if ( (*(int *)(v124 + 20) & 0xF0) == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7485 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7486 v180 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7487 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7488 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7489 if ( (*(int *)(v124 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7490 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7491 v180 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7492 LABEL_325:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7493 v129 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v180, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7494 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7495 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7496 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7497 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7498 *(char *)(v226 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7499 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7500 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7501 v130 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7502 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7503 a2j,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7504 a3i,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7505 (Texture *)(v127 != -1 ? (int)&pIcons_LOD->pTextures[v127] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7506 v129,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7507 (signed __int64)v130,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7508 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7509 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7510 goto LABEL_335;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7511 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7512 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7513 v180 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7514 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7515 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7516 v131 = v127 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7517 v132 = (char *)&pIcons_LOD->pTextures[v127];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7518 if ( v128 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7519 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7520 v133 = (Texture *)(v131 != 0 ? (int)v132 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7521 pRenderer->_4A6776(a2j, a3i, v133);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7522 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7523 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7524 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7525 if ( v128 & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7526 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7527 v133 = (Texture *)(v131 != 0 ? (int)v132 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7528 pRenderer->DrawTextureTransparent(a2j, a3i, v133);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7529 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7530 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7531 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7532 v133 = (Texture *)(v131 != 0 ? (int)v132 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7533 pRenderer->DrawTransparentGreenShade(a2j, a3i, v133);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7534 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7535 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7536 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7537 pRenderer->_4A612A(a2j, a3i, v133, v237);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7538 LABEL_335:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7539 v134 = v217->pEquipment.uMainHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7540 if ( !v134 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7541 goto LABEL_358;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7542 v238 = v217->pEquipment.uMainHand;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7543 v135 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v134 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7544 v227 = v135;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7545 v136 = *(int *)v135;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7546 v137 = *(int *)v135;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7547 a2k = papredoll_4E4C28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7548 + array_4E4C30[v239].field_8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7549 - pItemsTable->pItems[v137].uEquipX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7550 a3j = paperdoll_4E4C2C
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7551 + array_4E4C30[v239].field_C
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7552 - pItemsTable->pItems[v137].uEquipY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7553 if ( v136 == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7554 v181 = "item64v1";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7555 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7556 v181 = pItemsTable->pItems[v137].pIconName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7557 v138 = pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7558 v139 = *(int *)(v227 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7559 if ( !(*(int *)(v227 + 20) & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7560 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7561 v142 = v138 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7562 v143 = (char *)&pIcons_LOD->pTextures[v138];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7563 if ( v139 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7564 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7565 v144 = (Texture *)(v142 != 0 ? (int)v143 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7566 pRenderer->_4A6776(a2k, a3j, v144);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7567 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7568 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7569 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7570 if ( v139 & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7571 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7572 v144 = (Texture *)(v142 != 0 ? (int)v143 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7573 pRenderer->DrawTextureTransparent(a2k, a3j, v144);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7574 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7575 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7576 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7577 v144 = (Texture *)(v142 != 0 ? (int)v143 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7578 pRenderer->DrawTransparentGreenShade(a2k, a3j, v144);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7579 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7580 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7581 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7582 pRenderer->_4A612A(a2k, a3j, v144, v238);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7583 LABEL_358:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7584 v145 = v217->pEquipment.uOffHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7585 v249 = v217->pEquipment.uOffHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7586 if ( !v145 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7587 goto LABEL_393;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7588 v146 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v145 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7589 v228 = v146;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7590 v147 = *(int *)v146;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7591 v148 = *(int *)v146;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7592 v149 = pItemsTable->pItems[v148].uSkillType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7593 if ( v149 != 2 && v149 != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7594 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7595 v245 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7596 LABEL_362:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7597 v150 = papredoll_4E4C28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7598 + array_4E4C30[v239].field_0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7599 - pItemsTable->pItems[v148].uEquipX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7600 a3k = paperdoll_4E4C2C
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7601 + LODWORD(array_4E4C30[v239].field_4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7602 - pItemsTable->pItems[v148].uEquipY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7603 goto LABEL_370;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7604 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7605 v151 = v147 - 400;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7606 v245 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7607 if ( v151 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7608 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7609 v152 = v151 - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7610 if ( v152 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7611 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7612 if ( v152 != 12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7613 goto LABEL_362;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7614 v150 = 595;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7615 a3k = 33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7616 LABEL_370:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7617 v153 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v148].pIconName, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7618 v154 = v153;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7619 v243 = v153;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7620 v155 = *(int *)(v228 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7621 if ( !(*(int *)(v228 + 20) & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7622 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7623 if ( v155 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7624 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7625 v159 = (Texture *)(v243 != -1 ? (int)&pIcons_LOD->pTextures[v243] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7626 pRenderer->_4A6776(v150, a3k, v159);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7627 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7628 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7629 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7630 v29 = (v155 & 1) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7631 v160 = (char *)&pIcons_LOD->pTextures[v243];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7632 if ( v29 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7633 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7634 v159 = (Texture *)(v243 != -1 ? (int)v160 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7635 pRenderer->DrawTransparentGreenShade(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7636 v150,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7637 a3k,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7638 (Texture *)(v243 != -1 ? (int)v160 : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7639 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7640 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7641 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7642 v159 = (Texture *)(v243 != -1 ? (int)v160 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7643 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7644 v150,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7645 a3k,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7646 (Texture *)(v243 != -1 ? (int)v160 : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7647 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7648 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7649 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7650 pRenderer->_4A612A(v150, a3k, v159, v249);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7651 goto LABEL_391;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7652 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7653 if ( (*(int *)(v228 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7654 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7655 if ( (*(int *)(v228 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7656 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7657 v183 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7658 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7659 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7660 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7661 if ( (*(int *)(v228 + 20) & 0xF0) != 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7662 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7663 v156 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7664 if ( (*(int *)(v228 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7665 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7666 v183 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7667 LABEL_381:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7668 v157 = &pIcons_LOD->pTextures[v156->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7669 v183,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7670 TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7671 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7672 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7673 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7674 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7675 *(char *)(v228 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7676 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7677 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7678 v158 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7679 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7680 v150,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7681 a3k,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7682 (Texture *)(v154 != -1 ? (int)&pIcons_LOD->pTextures[v154] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7683 v157,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7684 (signed __int64)v158,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7685 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7686 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7687 LABEL_391:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7688 if ( v245 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7689 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7690 papredoll_4E4C28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7691 + pPaperdollLeftEmptyHand[uPlayerID_a],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7692 paperdoll_4E4C2C
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7693 + pPaperdollLeftEmptyHand[uPlayerID_a + 1],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7694 (Texture *)(*(unsigned int *)((char *)papredoll_dlhs
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7695 + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlhs + v240)] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7696 goto LABEL_393;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7697 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7698 LABEL_380:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7699 v183 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7700 goto LABEL_381;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7701 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7702 v183 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7703 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7704 v156 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7705 goto LABEL_381;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7706 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7707 v156 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7708 goto LABEL_380;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7709 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7710 a3k = 28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7711 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7712 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7713 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7714 a3k = 86;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7715 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7716 v150 = 596;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7717 goto LABEL_370;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7718 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7719 if ( (*(int *)(v227 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7720 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7721 if ( (*(int *)(v227 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7722 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7723 v182 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7724 goto LABEL_348;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7725 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7726 if ( (*(int *)(v227 + 20) & 0xF0) == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7727 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7728 v182 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7729 goto LABEL_348;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7730 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7731 if ( (*(int *)(v227 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7732 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7733 v182 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7734 LABEL_348:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7735 v140 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v182, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7736 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7737 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7738 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7739 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7740 *(char *)(v227 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7741 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7742 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7743 v141 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7744 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7745 a2k,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7746 a3j,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7747 (Texture *)(v138 != -1 ? (int)&pIcons_LOD->pTextures[v138] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7748 v140,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7749 (signed __int64)v141,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7750 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7751 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7752 goto LABEL_358;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7753 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7754 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7755 v182 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7756 goto LABEL_348;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7757 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7758 v125 = 11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7759 goto LABEL_310;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7760 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7761 if ( !(*(int *)(v225 + 20) & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7762 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7763 v119 = v116 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7764 v120 = (char *)&pIcons_LOD->pTextures[v116];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7765 if ( *(int *)(v225 + 20) & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7766 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7767 v121 = (Texture *)(v119 != 0 ? (int)v120 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7768 pRenderer->_4A6776(a2h, a3h, v121);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7769 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7770 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7771 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7772 v121 = (Texture *)(v119 != 0 ? (int)v120 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7773 pRenderer->DrawTextureTransparent(a2h, a3h, v121);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7774 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7775 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7776 pRenderer->_4A612A(a2h, a3h, v121, v236);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7777 goto LABEL_292;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7778 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7779 if ( (*(int *)(v225 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7780 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7781 if ( (*(int *)(v225 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7782 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7783 v179 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7784 goto LABEL_284;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7785 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7786 if ( (*(int *)(v225 + 20) & 0xF0) == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7787 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7788 v179 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7789 goto LABEL_284;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7790 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7791 if ( (*(int *)(v225 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7792 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7793 v179 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7794 LABEL_284:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7795 a2i = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v179, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7796 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7797 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7798 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7799 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7800 *(char *)(v225 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7801 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7802 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7803 v118 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7804 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7805 v117,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7806 a3h,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7807 (Texture *)(v116 != -1 ? (int)&pIcons_LOD->pTextures[v116] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7808 a2i,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7809 (signed __int64)v118,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7810 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7811 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7812 goto LABEL_292;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7813 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7814 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7815 v179 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7816 goto LABEL_284;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7817 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7818 v191 = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7819 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7820 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7821 v114 = v191;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7822 goto LABEL_274;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7823 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7824 v114 = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7825 goto LABEL_272;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7826 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7827 LABEL_209:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7828 if ( v68->pEquipment.uMainHand
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7829 && (v68->GetEquippedItemEquipType(1u) == 1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7830 || v68->GetEquippedItemSkillType(EQUIP_TWO_HANDED) == 4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7831 && !v68->pEquipment.uOffHand) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7832 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7833 v91 = 17 * v239 + v90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7834 v92 = v91;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7835 v223 = paperdoll_array_511290[0][v91][2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7836 if ( v223 == pIcons_LOD->FindTextureByName("pending") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7837 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7838 v93 = 2 * v91;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7839 v94 = paperdoll_array_511290[0][v92][1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7840 a2g = papredoll_4E4C28 + dword_4E5050[v93];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7841 v95 = dword_4E5050[v93 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7842 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7843 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7844 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7845 v94 = v223;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7846 a2g = papredoll_4E4C28 + dword_4E5270[2 * v91];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7847 v95 = dword_4E5270[2 * v91 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7848 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7849 a3g = paperdoll_4E4C2C + v95;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7850 if ( v94 == pIcons_LOD->FindTextureByName("pending") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7851 goto LABEL_258;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7852 if ( *(int *)(v242 + 516) & 0xF0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7853 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7854 if ( (*(int *)(v242 + 516) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7855 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7856 if ( (*(int *)(v242 + 516) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7857 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7858 v173 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7859 goto LABEL_226;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7860 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7861 if ( (*(int *)(v242 + 516) & 0xF0) == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7862 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7863 v173 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7864 goto LABEL_226;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7865 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7866 if ( (*(int *)(v242 + 516) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7867 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7868 v173 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7869 LABEL_226:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7870 v96 = (char *)&pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v173, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7871 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7872 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7873 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7874 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7875 *(char *)(v242 + 516) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7876 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7877 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7878 v187 = 255;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7879 v174 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7880 v97 = (double)GetTickCount();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7881 LABEL_249:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7882 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7883 a2g,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7884 a3g,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7885 (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7886 (Texture *)v96,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7887 (signed __int64)(v97 * 0.1),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7888 v174,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7889 v187);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7890 goto LABEL_258;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7891 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7892 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7893 v173 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7894 goto LABEL_226;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7895 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7896 v98 = v94 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7897 v99 = (char *)&pIcons_LOD->pTextures[v94];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7898 v100 = pRenderer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7899 if ( *(int *)(v242 + 516) & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7900 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7901 v101 = (Texture *)(v98 != 0 ? (int)v99 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7902 v188 = v101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7903 v175 = a3g;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7904 v163 = a2g;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7905 LABEL_231:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7906 v100->_4A6776(v163, v175, v188);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7907 goto LABEL_256;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7908 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7909 if ( *(char *)(v242 + 516) & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7910 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7911 v101 = (Texture *)(v98 != 0 ? (int)v99 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7912 v189 = v101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7913 v176 = a3g;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7914 v164 = a2g;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7915 LABEL_234:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7916 pRenderer->DrawTextureTransparent(v164, v176, v189);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7917 goto LABEL_256;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7918 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7919 v101 = (Texture *)(v98 != 0 ? (int)v99 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7920 v190 = v101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7921 v177 = a3g;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7922 v165 = a2g;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7923 goto LABEL_255;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7924 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7925 v102 = 17 * v239 + v90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7926 v94 = paperdoll_array_511290[0][v102][1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7927 if ( v94 == pIcons_LOD->FindTextureByName("pending") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7928 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7929 LABEL_258:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7930 v68 = v217;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7931 goto LABEL_259;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7932 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7933 v103 = papredoll_4E4C28 + dword_4E5050[2 * v102];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7934 v104 = paperdoll_4E4C2C + dword_4E5050[2 * v102 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7935 v224 = *(int *)(v242 + 516);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7936 v105 = *(int *)(v242 + 516) & 0xF0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7937 a2g = papredoll_4E4C28 + dword_4E5050[2 * v102];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7938 a3g = paperdoll_4E4C2C + dword_4E5050[2 * v102 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7939 if ( !v105 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7940 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7941 v109 = v94 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7942 v110 = (char *)&pIcons_LOD->pTextures[v94];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7943 if ( v224 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7944 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7945 v101 = (Texture *)(v109 != 0 ? (int)v110 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7946 v188 = v101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7947 v175 = v104;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7948 v163 = v103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7949 v100 = pRenderer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7950 goto LABEL_231;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7951 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7952 if ( v224 & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7953 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7954 v101 = (Texture *)(v109 != 0 ? (int)v110 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7955 v189 = v101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7956 v176 = v104;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7957 v164 = v103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7958 v100 = pRenderer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7959 goto LABEL_234;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7960 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7961 v101 = (Texture *)(v109 != 0 ? (int)v110 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7962 v190 = v101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7963 v177 = v104;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7964 v165 = v103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7965 v100 = pRenderer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7966 LABEL_255:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7967 pRenderer->DrawTransparentGreenShade(v165, v177, v190);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7968 LABEL_256:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7969 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7970 pRenderer->_4A612A(a2g, a3g, v101, v235);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7971 goto LABEL_258;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7972 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7973 v106 = v105 - 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7974 if ( v106 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7975 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7976 v107 = v106 - 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7977 if ( !v107 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7978 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7979 v178 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7980 goto LABEL_246;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7981 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7982 v108 = v107 - 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7983 if ( !v108 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7984 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7985 v178 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7986 goto LABEL_246;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7987 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7988 if ( v108 == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7989 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7990 v178 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7991 LABEL_246:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7992 v96 = (char *)&pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v178, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7993 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7994 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7995 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7996 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7997 *(char *)(v242 + 516) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7998 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7999 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8000 v187 = 255;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8001 v174 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8002 v97 = (double)GetTickCount();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8003 goto LABEL_249;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8004 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8005 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8006 v178 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8007 goto LABEL_246;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8008 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8009 v186 = 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8010 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8011 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8012 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8013 v186 = 13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8014 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8015 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8016 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8017 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8018 v186 = 14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8019 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8020 v90 = v186;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8021 goto LABEL_209;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8022 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8023 v90 = 15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8024 goto LABEL_207;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8025 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8026 if ( (*(int *)(v57 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8027 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8028 if ( (*(int *)(v57 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8029 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8030 v171 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8031 goto LABEL_145;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8032 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8033 if ( (*(int *)(v57 + 20) & 0xF0) == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8034 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8035 v171 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8036 goto LABEL_145;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8037 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8038 if ( (*(int *)(v57 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8039 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8040 v171 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8041 LABEL_145:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8042 v63 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v171, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8043 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8044 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8045 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8046 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8047 *(char *)(v221 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8048 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8049 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8050 v64 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8051 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8052 a2e,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8053 a3e,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8054 (Texture *)(v59 != -1 ? (int)&pIcons_LOD->pTextures[v59] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8055 v63,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8056 (signed __int64)v64,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8057 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8058 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8059 goto LABEL_155;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8060 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8061 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8062 v171 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8063 goto LABEL_145;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8064 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8065 if ( (*(int *)(v44 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8066 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8067 if ( (*(int *)(v44 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8068 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8069 v170 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8070 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8071 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8072 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8073 if ( (*(int *)(v44 + 20) & 0xF0) != 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8074 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8075 v50 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8076 if ( (*(int *)(v44 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8077 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8078 v170 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8079 LABEL_117:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8080 v51 = &pIcons_LOD->pTextures[v50->LoadTexture(v170, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8081 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8082 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8083 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8084 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8085 *(char *)(v220 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8086 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8087 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8088 v52 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8089 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8090 a2d,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8091 a3d,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8092 (Texture *)(v48 != -1 ? (int)&pIcons_LOD->pTextures[v48] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8093 v51,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8094 (signed __int64)v52,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8095 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8096 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8097 goto LABEL_127;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8098 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8099 LABEL_116:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8100 v170 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8101 goto LABEL_117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8102 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8103 v170 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8104 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8105 v50 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8106 goto LABEL_117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8107 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8108 v50 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8109 goto LABEL_116;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8110 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8111 v185 = 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8112 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8113 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8114 v45 = v185;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8115 goto LABEL_106;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8116 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8117 v45 = 15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8118 goto LABEL_104;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8119 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8120 if ( (*(int *)(v32 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8121 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8122 if ( (*(int *)(v32 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8123 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8124 v169 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8125 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8126 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8127 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8128 if ( (*(int *)(v32 + 20) & 0xF0) != 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8129 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8130 v38 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8131 if ( (*(int *)(v32 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8132 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8133 v169 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8134 LABEL_85:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8135 v39 = &pIcons_LOD->pTextures[v38->LoadTexture(v169, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8136 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8137 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8138 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8139 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8140 *(char *)(v219 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8141 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8142 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8143 v40 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8144 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8145 a2c,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8146 a3c,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8147 (Texture *)(v35 != -1 ? (int)&pIcons_LOD->pTextures[v35] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8148 v39,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8149 (signed __int64)v40,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8150 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8151 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8152 goto LABEL_93;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8153 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8154 LABEL_84:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8155 v169 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8156 goto LABEL_85;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8157 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8158 v169 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8159 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8160 v38 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8161 goto LABEL_85;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8162 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8163 v38 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8164 goto LABEL_84;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8165 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8166 v184 = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8167 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8168 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8169 v33 = v184;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8170 goto LABEL_74;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8171 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8172 v33 = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8173 goto LABEL_72;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8174 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8175 if ( (*(int *)(v22 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8176 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8177 if ( (*(int *)(v22 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8178 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8179 v168 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8180 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8181 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8182 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8183 if ( (*(int *)(v22 + 20) & 0xF0) != 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8184 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8185 v26 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8186 if ( (*(int *)(v22 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8187 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8188 v168 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8189 LABEL_49:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8190 a2b = &pIcons_LOD->pTextures[v26->LoadTexture(v168, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8191 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8192 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8193 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8194 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8195 *(char *)(v22 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8196 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8197 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8198 v27 = (Texture *)(v241 != -1 ? (int)&pIcons_LOD->pTextures[v241] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8199 v28 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8200 pRenderer->_4A63E6(v24, a3b, v27, a2b, (signed __int64)v28, 0, 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8201 goto LABEL_57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8202 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8203 LABEL_48:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8204 v168 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8205 goto LABEL_49;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8206 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8207 v168 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8208 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8209 v26 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8210 goto LABEL_49;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8211 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8212 v26 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8213 goto LABEL_48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8214 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8215 a3 = paperdoll_4E4C2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8216 a2 = papredoll_4E4C28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8217 v240 = 4 * uPlayerID_ - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8218 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8219 papredoll_4E4C28,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8220 paperdoll_4E4C2C,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8221 (Texture *)(*(unsigned int *)((char *)papredoll_dbods + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dbods + v240)] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8222 //(Texture *)(*(unsigned int *)((char *)papredoll_dbods + v240) != -1 ? 72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8223 // * *(unsigned int *)((char *)papredoll_dbods
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8224 // + v240)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8225 // + 7145548 : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8226 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8227 pRenderer->_4A612A(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8228 a2,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8229 a3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8230 //(Texture *)(*(unsigned int *)((char *)papredoll_dbods + v240) != -1 ? 72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8231 // * *(unsigned int *)((char *)papredoll_dbods
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8232 // + v240)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8233 // + 7145548 : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8234 (Texture *)(*(unsigned int *)((char *)papredoll_dbods + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dbods + v240)] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8235 pPlayer->pEquipment.uBody);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8236 uPlayerID_a = 2 * v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8237 v6 = pPlayer->pEquipment.uMainHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8238 if ( !v6
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8239 || (v7 = *(int *)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v6 + 5], pItemsTable->pItems[v7].uEquipType != 1)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8240 && (pItemsTable->pItems[v7].uSkillType != 4 || pPlayer->pEquipment.uOffHand) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8241 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8242 papredoll_4E4C28 + dword_4E5AE0[2 * v5],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8243 paperdoll_4E4C2C + dword_4E5AE0[2 * v5 + 1],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8244 (Texture *)(*(unsigned int *)((char *)papredoll_dlads + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlads + v240)] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8245 //(Texture *)(*(unsigned int *)((char *)papredoll_dlads + v240) != -1 ? 72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8246 // * *(unsigned int *)((char *)papredoll_dlads
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8247 // + v240)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8248 // + 7145548 : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8249 v8 = pPlayer->pEquipment.uMainHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8250 if ( v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8251 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8252 v229 = pPlayer->pEquipment.uMainHand;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8253 v9 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v8 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8254 v10 = v5 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8255 v218 = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8256 v11 = *(int *)v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8257 v12 = *(int *)v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8258 v13 = papredoll_4E4C28 + array_4E4C30[v5].field_8 - pItemsTable->pItems[v12].uEquipX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8259 a2a = v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8260 a3a = paperdoll_4E4C2C + *(int *)((char *)&array_4E4C30[0].field_C + v10) - pItemsTable->pItems[v12].uEquipY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8261 if ( v11 == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8262 v166 = "item64v1";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8263 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8264 v166 = pItemsTable->pItems[v12].pIconName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8265 v14 = pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8266 v15 = *(int *)(v218 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8267 if ( *(int *)(v218 + 20) & 0xF0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8268 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8269 if ( (*(int *)(v218 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8270 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8271 if ( (*(int *)(v218 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8272 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8273 v167 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8274 goto LABEL_27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8275 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8276 if ( (*(int *)(v218 + 20) & 0xF0) == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8277 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8278 v167 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8279 goto LABEL_27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8280 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8281 if ( (*(int *)(v218 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8282 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8283 v167 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8284 LABEL_27:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8285 //v16 = (Texture *)(72 * pIcons_LOD->LoadTexture(v167, TEXTURE_16BIT_PALETTE) + 7145548);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8286 v16 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v167, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8287
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8288 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8289 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8290 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8291 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8292 *(char *)(v218 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8293 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8294 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8295 v17 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8296 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8297 v13,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8298 a3a,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8299 (Texture *)(v14 != -1 ? (int)&pIcons_LOD->pTextures[v14] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8300 v16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8301 (signed __int64)v17,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8302 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8303 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8304 goto LABEL_393;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8305 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8306 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8307 v167 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8308 goto LABEL_27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8309 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8310 v18 = v14 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8311 v19 = (char *)&pIcons_LOD->pTextures[v14];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8312 if ( v15 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8313 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8314 v20 = (Texture *)(v18 != 0 ? (int)v19 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8315 pRenderer->_4A6776(a2a, a3a, v20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8316 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8317 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8318 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8319 if ( v15 & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8320 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8321 v20 = (Texture *)(v18 != 0 ? (int)v19 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8322 pRenderer->DrawTextureTransparent(a2a, a3a, v20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8323 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8324 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8325 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8326 v20 = (Texture *)(v18 != 0 ? (int)v19 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8327 pRenderer->DrawTransparentGreenShade(a2a, a3a, v20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8328 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8329 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8330 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8331 pRenderer->_4A612A(a2a, a3a, v20, v229);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8332 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8333 LABEL_393:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8334 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8335 papredoll_4E4C28 + pPaperdollRightHand[uPlayerID_a],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8336 paperdoll_4E4C2C + pPaperdollRightHand[uPlayerID_a + 1],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8337 (Texture *)(*(unsigned int *)((char *)papredoll_drhs + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_drhs + v240)] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8338 //(Texture *)(*(unsigned int *)((char *)papredoll_drhs + v240) != -1 ? 72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8339 // * *(unsigned int *)((char *)papredoll_drhs + v240)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8340 // + 7145548 : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8341 v161 = v217->pEquipment.uMainHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8342 if ( v161 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8343 {
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8344 v162 = *(int *)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v161 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8345 if ( pItemsTable->pItems[v162].uEquipType == 1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8346 || pItemsTable->pItems[v162].uSkillType == 4 && !v217->pEquipment.uOffHand )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8347 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8348 papredoll_4E4C28 + pPaperdollLeftHand[uPlayerID_a],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8349 paperdoll_4E4C2C + pPaperdollLeftHand[uPlayerID_a + 1],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8350 (Texture *)(*(unsigned int *)((char *)papredoll_dlhus + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlhus + v240)] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8351 //(Texture *)(*(unsigned int *)((char *)papredoll_dlhus + v240) != -1 ? 72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8352 // * *(unsigned int *)((char *)papredoll_dlhus
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8353 // + v240)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8354 // + 7145548 : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8355 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8356 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8357 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8358 0x25Bu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8359 0x12Bu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8360 (Texture *)(uTextureID_MAGNIF_B != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_MAGNIF_B] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8361 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8362 0x1D4u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8363 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8364 (Texture *)(uTextureID_507B04 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507B04] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8365 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8366
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8367
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8368 //----- (0043E825) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8369 void __fastcall CharacterUI_DrawPaperdollWithRingOverlay(unsigned int uPlayerID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8370 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8371 unsigned int v1; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8372 Player *pPlayer; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8373 int v3; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8374 int v4; // edi@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8375 unsigned int v5; // ebx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8376 int v6; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8377 LODFile_IconsBitmaps *v7; // ecx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8378 double v8; // st7@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8379 int v9; // edi@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8380 Texture *v10; // edi@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8381 unsigned __int8 v11; // zf@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8382 Texture *v12; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8383 char v13; // sf@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8384 unsigned __int8 v14; // of@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8385 unsigned int v15; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8386 unsigned int v16; // ebx@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8387 int v17; // eax@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8388 LODFile_IconsBitmaps *v18; // ecx@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8389 double v19; // st7@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8390 int v20; // edi@40
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8391 int v21; // eax@41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8392 signed int v22; // ebx@41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8393 Texture *v23; // edi@41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8394 int v24; // eax@42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8395 char *v25; // eax@42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8396 unsigned int v26; // eax@46
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8397 int v27; // edi@47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8398 unsigned int v28; // ebx@47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8399 int v29; // eax@47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8400 LODFile_IconsBitmaps *v30; // ecx@51
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8401 Texture *v31; // esi@58
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8402 double v32; // st7@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8403 int v33; // esi@61
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8404 int v34; // esi@62
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8405 Texture *v35; // eax@63
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8406 const char *v36; // [sp-8h] [bp-38h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8407 const char *v37; // [sp-8h] [bp-38h]@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8408 const char *v38; // [sp-8h] [bp-38h]@52
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8409 int v39; // [sp+10h] [bp-20h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8410 Texture *v40; // [sp+10h] [bp-20h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8411 int v41; // [sp+10h] [bp-20h]@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8412 Texture *v42; // [sp+10h] [bp-20h]@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8413 int v43; // [sp+10h] [bp-20h]@47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8414 unsigned int a3; // [sp+14h] [bp-1Ch]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8415 unsigned int a2; // [sp+18h] [bp-18h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8416 int v46; // [sp+1Ch] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8417 Player *v47; // [sp+20h] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8418 int v48; // [sp+24h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8419 int v49; // [sp+24h] [bp-Ch]@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8420
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8421 v1 = uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8422 pPlayer = pPlayers[uPlayerID];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8423 v47 = pPlayers[uPlayerID];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8424 pIcons_LOD->LoadTexture("sptext01", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8425 CharacterUI_DrawPaperdoll(v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8426 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8427 0x1D9u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8428 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8429 (Texture *)(uTextureID_BACKHAND != -1 ? &pIcons_LOD->pTextures[uTextureID_BACKHAND] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8430 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8431 0x1D4u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8432 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8433 (Texture *)(uTextureID_507B04 != -1 ? &pIcons_LOD->pTextures[uTextureID_507B04] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8434 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8435 ptr_507694->uX,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8436 ptr_507694->uY,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8437 (Texture *)(uTextureID_5118C8 != -1 ? &pIcons_LOD->pTextures[uTextureID_5118C8] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8438 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8439 v46 = (int)&pPlayer->pEquipment.field_28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8440 v48 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8441 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8442 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8443 if ( !*(int *)v46 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8444 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8445 v39 = *(int *)v46;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8446 v4 = (int)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * *(int *)v46 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8447 a3 = *(int *)((char *)dword_4E5C34 + v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8448 a2 = *(int *)((char *)dword_4E5C1C + v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8449 v5 = pIcons_LOD->LoadTexture(pItemsTable->pItems[*(int *)v4].pIconName, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8450 v6 = *(int *)(v4 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8451 if ( *(int *)(v4 + 20) & 0xF0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8452 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8453 if ( (*(int *)(v4 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8454 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8455 if ( (*(int *)(v4 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8456 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8457 v36 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8458 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8459 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8460 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8461 if ( (*(int *)(v4 + 20) & 0xF0) != 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8462 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8463 v7 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8464 if ( (*(int *)(v4 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8465 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8466 v36 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8467 LABEL_14:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8468 v40 = &pIcons_LOD->pTextures[v7->LoadTexture(v36, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8469 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8470 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8471 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8472 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8473 *(char *)(v4 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8474 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8475 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8476 v8 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8477 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8478 a2,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8479 a3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8480 (Texture *)(v5 != -1 ? (int)&pIcons_LOD->pTextures[v5] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8481 v40,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8482 (signed __int64)v8,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8483 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8484 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8485 goto LABEL_23;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8486 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8487 LABEL_13:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8488 v36 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8489 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8490 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8491 v36 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8492 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8493 v7 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8494 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8495 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8496 v7 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8497 goto LABEL_13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8498 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8499 v9 = v5 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8500 if ( v6 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8501 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8502 v10 = (Texture *)(v9 != 0 ? (int)&pIcons_LOD->pTextures[v5] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8503 pRenderer->_4A6776(a2, a3, v10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8504 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8505 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8506 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8507 v11 = (v6 & 1) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8508 v12 = &pIcons_LOD->pTextures[v5];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8509 if ( v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8510 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8511 v10 = (Texture *)(v9 != 0 ? (int)v12 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8512 pRenderer->DrawTransparentGreenShade(a2, a3, v10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8513 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8514 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8515 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8516 v10 = (Texture *)(v9 != 0 ? (int)v12 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8517 pRenderer->DrawTextureTransparent(a2, a3, v10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8518 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8519 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8520 pRenderer->_4A601E(a2, a3, v10, v39);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8521 LABEL_23:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8522 pPlayer = v47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8523 LABEL_24:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8524 v46 += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8525 v3 = v48 + 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8526 v14 = __OFSUB__(v48 + 4, 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8527 v11 = v48 == 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8528 v13 = v48 - 16 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8529 v48 += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8530 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8531 while ( (unsigned __int8)(v13 ^ v14) | v11 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8532 v15 = pPlayer->pEquipment.field_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8533 if ( !v15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8534 goto LABEL_46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8535 v41 = pPlayer->pEquipment.field_24;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8536 v49 = (int)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v15 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8537 v16 = pIcons_LOD->LoadTexture(pItemsTable->pItems[*(int *)v49].pIconName, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8538 v17 = *(int *)(v49 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8539 if ( !(*(int *)(v49 + 20) & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8540 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8541 v20 = v16 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8542 if ( v17 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8543 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8544 v21 = 9 * v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8545 v22 = 493;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8546 v23 = (Texture *)(v20 != 0 ? (int)&pIcons_LOD->pTextures[8 * v21 / 0x48u] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8547 pRenderer->_4A6776(0x1EDu, 0x5Bu, v23);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8548 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8549 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8550 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8551 v11 = (v17 & 1) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8552 v24 = 9 * v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8553 v22 = 493;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8554 v25 = (char *)&pIcons_LOD->pTextures[8 * v24 / 0x48u];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8555 if ( v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8556 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8557 v23 = (Texture *)(v20 != 0 ? (int)v25 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8558 pRenderer->DrawTransparentGreenShade(493, 91, v23);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8559 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8560 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8561 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8562 v23 = (Texture *)(v20 != 0 ? (int)v25 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8563 pRenderer->DrawTextureTransparent(0x1EDu, 0x5Bu, v23);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8564 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8565 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8566 pRenderer->_4A601E(v22, 91, v23, v41);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8567 pPlayer = v47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8568 goto LABEL_46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8569 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8570 if ( (*(int *)(v49 + 20) & 0xF0) == 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8571 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8572 v18 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8573 goto LABEL_36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8574 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8575 if ( (*(int *)(v49 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8576 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8577 v37 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8578 goto LABEL_34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8579 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8580 if ( (*(int *)(v49 + 20) & 0xF0) == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8581 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8582 v37 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8583 LABEL_34:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8584 v18 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8585 goto LABEL_37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8586 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8587 v18 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8588 if ( (*(int *)(v49 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8589 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8590 v37 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8591 goto LABEL_37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8592 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8593 LABEL_36:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8594 v37 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8595 LABEL_37:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8596 v42 = &pIcons_LOD->pTextures[v18->LoadTexture(v37, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8597 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8598 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8599 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8600 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8601 *(char *)(v49 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8602 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8603 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8604 v19 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8605 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8606 0x1EDu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8607 0x5Bu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8608 (Texture *)(v16 != -1 ? (int)&pIcons_LOD->pTextures[v16] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8609 v42,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8610 (signed __int64)v19,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8611 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8612 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8613 LABEL_46:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8614 v26 = pPlayer->pEquipment.field_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8615 if ( !v26 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8616 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8617 v43 = pPlayer->pEquipment.field_1C;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8618 v27 = (int)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v26 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8619 v28 = pIcons_LOD->LoadTexture(pItemsTable->pItems[*(int *)v27].pIconName, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8620 v29 = *(int *)(v27 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8621 if ( !(*(int *)(v27 + 20) & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8622 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8623 v33 = v28 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8624 if ( v29 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8625 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8626 v34 = v33 != 0 ? (int)&pIcons_LOD->pTextures[v28] : 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8627 pRenderer->_4A6776(0x24Au, 0x58u, (Texture *)v34);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8628 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8629 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8630 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8631 v11 = (v29 & 1) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8632 v35 = &pIcons_LOD->pTextures[v28];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8633 if ( v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8634 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8635 v34 = v33 != 0 ? (int)v35 : 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8636 pRenderer->DrawTransparentGreenShade(586, 88, (Texture *)v34);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8637 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8638 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8639 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8640 v34 = v33 != 0 ? (int)v35 : 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8641 pRenderer->DrawTextureTransparent(0x24Au, 0x58u, (Texture *)v34);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8642 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8643 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8644 pRenderer->_4A601E(586, 88, (Texture *)v34, v43);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8645 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8646 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8647 if ( (*(int *)(v27 + 20) & 0xF0) == 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8648 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8649 v30 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8650 goto LABEL_57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8651 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8652 if ( (*(int *)(v27 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8653 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8654 v38 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8655 goto LABEL_55;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8656 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8657 if ( (*(int *)(v27 + 20) & 0xF0) == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8658 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8659 v38 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8660 LABEL_55:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8661 v30 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8662 goto LABEL_58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8663 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8664 v30 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8665 if ( (*(int *)(v27 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8666 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8667 v38 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8668 goto LABEL_58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8669 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8670 LABEL_57:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8671 v38 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8672 LABEL_58:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8673 v31 = &pIcons_LOD->pTextures[v30->LoadTexture(v38, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8674 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8675 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8676 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8677 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8678 *(char *)(v27 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8679 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8680 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8681 v32 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8682 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8683 0x24Au,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8684 0x58u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8685 (Texture *)(v28 != -1 ? (int)&pIcons_LOD->pTextures[v28] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8686 v31,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8687 (signed __int64)v32,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8688 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8689 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8690 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8691
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8692
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8693 //----- (0043ED6F) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8694 bool __thiscall sub_43ED6F_get_some_race_sex_relation(unsigned int a1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8695 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8696 unsigned int v1; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8697 Player **v2; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8698 Player *v3; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8699 enum CHARACTER_RACE v4; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8700 bool result; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8701 char v6; // zf@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8702
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8703 v1 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8704 v2 = &pPlayers[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8705 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8706 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8707 v3 = *v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8708 v4 = v3->GetRace();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8709 result = v3->GetSexByVoice();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8710 if ( v4 && v4 != CHARACTER_RACE_ELF && v4 != CHARACTER_RACE_GOBLIN )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8711 v6 = v1 == 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8712 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8713 v6 = v1 == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8714 if ( v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8715 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8716 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8717 if ( (signed int)v2 >= (signed int)&qword_A750D8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8718 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8719 LOBYTE(result) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8720 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8721 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8722 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8723 LOBYTE(result) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8724 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8725 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8726 // A750D8: using guessed type __int64 qword_A750D8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8727
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8728 //----- (0043EDB9) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8729 bool __thiscall sub_43EDB9_get_some_race_sex_relation_2(unsigned int _this)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8730 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8731 unsigned int v1; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8732 Player **v2; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8733 Player *v3; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8734 enum CHARACTER_RACE v4; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8735 bool result; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8736 char v6; // zf@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8737
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8738 v1 = _this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8739 v2 = &pPlayers[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8740 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8741 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8742 v3 = *v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8743 v4 = v3->GetRace();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8744 result = v3->GetSexByVoice();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8745 if ( !v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8746 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8747 if ( v4 == 1 || v4 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8748 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8749 if ( !result && v1 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8750 goto LABEL_15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8751 v6 = v1 == 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8752 LABEL_11:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8753 if ( v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8754 goto LABEL_15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8755 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8756 if ( (signed int)v2 >= (signed int)&qword_A750D8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8757 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8758 LOBYTE(result) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8759 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8760 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8761 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8762 if ( result || v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8763 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8764 v6 = v1 == 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8765 goto LABEL_11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8766 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8767 LABEL_15:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8768 LOBYTE(result) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8769 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8770 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8771 // A750D8: using guessed type __int64 qword_A750D8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8772
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8773 //----- (0043EE15) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8774 bool __fastcall sub_43EE15_player_has_item(unsigned int uItemID, Player *pPlayer, char a3)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8775 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8776 bool result; // eax@0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8777 signed int v4; // edi@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8778 int *v5; // esi@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8779 signed int v6; // edi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8780 bool *v7; // esi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8781
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8782 if ( !a3 || pParty->pPickedItem.uItemID != uItemID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8783 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8784 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8785 v5 = pPlayer->pInventoryIndices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8786 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8787 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8788 if ( *v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8789 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8790 result = 9 * *v5;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8791 if ( *(int *)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * *v5 + 5] == uItemID )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8792 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8793 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8794 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8795 ++v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8796 if ( v4 >= 126 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8797 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8798 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8799 v7 = (bool *)&pPlayer->pEquipment;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8800 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8801 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8802 result = *v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8803 if ( *v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8804 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8805 result *= 9;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8806 if ( *(int *)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[4 * result + 5] == uItemID )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8807 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8808 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8809 ++v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8810 ++v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8811 if ( v6 >= 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8812 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8813 LOBYTE(result) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8814 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8815 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8816 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8817 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8818 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8819 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8820 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8821 LOBYTE(result) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8822 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8823 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8824
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8825 //----- (0043EE77) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8826 bool __fastcall sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(signed int a1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8827 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8828 bool result; // eax@0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8829 Player *v2; // edx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8830 int v3; // ecx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8831 Player **pPlayers; // esi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8832 unsigned int v5; // ecx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8833 Player *v6; // edx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8834
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8835 if ( a1 < 1 || a1 > 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8836 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8837 if ( !a1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8838 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8839 pPlayers = &::pPlayers[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8840 v5 = 604;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8841 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8842 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8843 result = sub_43EE15_player_has_item(v5, *pPlayers, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8844 if ( !result )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8845 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8846 result = v6->pEquipment.uBody;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8847 if ( !result )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8848 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8849 result *= 9;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8850 if ( *(int *)&v6->spellbook.pDarkSpellbook.bIsSpellAvailable[4 * result + 5] != v5 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8851 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8852 ++pPlayers;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8853 if ( (signed int)pPlayers >= (signed int)&qword_A750D8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8854 goto LABEL_13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8855 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8856 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8857 goto LABEL_6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8858 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8859 result = sub_43EE15_player_has_item(604u, ::pPlayers[a1], 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8860 if ( !result
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8861 || (result = v2->pEquipment.uBody) == 0
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8862 || (result *= 9, *(int *)&v2->spellbook.pDarkSpellbook.bIsSpellAvailable[4 * result + 5] != v3) )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8863 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8864 LABEL_6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8865 LOBYTE(result) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8866 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8867 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8868 LABEL_13:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8869 LOBYTE(result) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8870 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8871 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8872 // A750D8: using guessed type __int64 qword_A750D8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8873
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8874 //----- (0043EF2B) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8875 void __fastcall WetsuitOn(unsigned int uPlayerID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8876 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8877 unsigned int v1; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8878 Player **v2; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8879 enum CHARACTER_RACE v3; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8880 signed int v4; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8881 int v5; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8882 unsigned __int8 v6; // al@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8883 char pContainer[20]; // [sp+4h] [bp-1Ch]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8884 unsigned int v8; // [sp+18h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8885 int v9; // [sp+1Ch] [bp-4h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8886
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8887 v1 = uPlayerID - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8888 v8 = uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8889 if ( ((uPlayerID - 1) & 0x80000000u) == 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8890 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8891 v2 = &pPlayers[uPlayerID];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8892 v3 = (*v2)->GetRace();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8893 v4 = (*v2)->GetSexByVoice();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8894 if ( v3 && v3 != 1 && v3 != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8895 v5 = (v4 != 0) + 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8896 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8897 v5 = (v4 != 0) + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8898 v9 = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8899 wsprintfA(pContainer, "pc23v%dBod", v5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8900 papredoll_dbods[v1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8901 wsprintfA(pContainer, "pc23v%dlad", v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8902 papredoll_dlads[v1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8903 wsprintfA(pContainer, "pc23v%dlau", v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8904 papredoll_dlaus[v1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8905 wsprintfA(pContainer, "pc23v%drh", v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8906 papredoll_drhs[v1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8907 wsprintfA(pContainer, "pc23v%dlh", v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8908 papredoll_dlhs[v1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8909 wsprintfA(pContainer, "pc23v%dlhu", v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8910 papredoll_dlhus[v1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8911 v6 = pPlayers[v1 + 1]->uFace;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8912 if ( v6 == 12 || v6 == 13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8913 papredoll_dbrds[pPlayers[v8]->uFace] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8914 papredoll_flying_feet[pPlayers[v8]->uFace] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8915 IsPlayerWearingWatersuit[v8] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8916 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8917 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8918
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8919 //----- (0043F0BD) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8920 unsigned int __fastcall WetsuitOff(unsigned int uPlayerID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8921 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8922 unsigned int result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8923 Player **v2; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8924 unsigned int v3; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8925 int v4; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8926 char v5; // al@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8927 char pContainer[20]; // [sp+0h] [bp-18h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8928 unsigned int v7; // [sp+14h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8929
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8930 result = uPlayerID - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8931 v7 = uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8932 if ( ((uPlayerID - 1) & 0x80000000u) == 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8933 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8934 v2 = &pPlayers[uPlayerID];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8935 v3 = uPlayerID - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8936 papredoll_dbods[v3] = pIcons_LOD->LoadTexture(dbod_texnames_by_face[(*v2)->uFace], TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8937 papredoll_dlads[v3] = pIcons_LOD->LoadTexture(dlad_texnames_by_face[(*v2)->uFace], TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8938 papredoll_dlaus[v3] = pIcons_LOD->LoadTexture(dlau_texnames_by_face[(*v2)->uFace], TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8939 papredoll_drhs[v3] = pIcons_LOD->LoadTexture(drh_texnames_by_face[(*v2)->uFace], TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8940 papredoll_dlhs[v3] = pIcons_LOD->LoadTexture(dlh_texnames_by_face[(*v2)->uFace], TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8941 papredoll_dlhus[v3] = pIcons_LOD->LoadTexture(dlhu_texnames_by_face[(*v2)->uFace], TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8942 v4 = (int)&(*v2)->uFace;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8943 v5 = *(char *)v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8944 if ( *(char *)v4 == 12 || v5 == 13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8945 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8946 wsprintfA(pContainer, "pc%02dbrd", v5 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8947 v4 = (int)&(*v2)->uFace;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8948 papredoll_dbrds[*(char *)v4] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8949 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8950 wsprintfA(pContainer, "item281pc%02d", *(char *)v4 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8951 papredoll_flying_feet[(*v2)->uFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8952 result = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8953 IsPlayerWearingWatersuit[v7] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8954 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8955 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8956 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8957
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8958
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8959 //----- (0043F333) --------------------------------------------------------
50
fde5c5acb66e BLV render
Nomad
parents: 46
diff changeset
8960 void stru170::MakeVisibleSectorList()
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8961 {
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8962 int v6; // ebx@3
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8963
50
fde5c5acb66e BLV render
Nomad
parents: 46
diff changeset
8964 uNumVisibleNotEmptySectors = 0;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8965 for (uint i = 0; i < std__vector_000FA8; ++i)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8966 {
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8967 v6 = 0;
50
fde5c5acb66e BLV render
Nomad
parents: 46
diff changeset
8968 if (!uNumVisibleNotEmptySectors)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8969 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8970 LABEL_7:
50
fde5c5acb66e BLV render
Nomad
parents: 46
diff changeset
8971 pVisibleSectorIDs_toDrawDecorsActorsEtcFrom[uNumVisibleNotEmptySectors++] = field_FA8[i].uSectorID;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8972 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8973 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8974 {
50
fde5c5acb66e BLV render
Nomad
parents: 46
diff changeset
8975 while (pVisibleSectorIDs_toDrawDecorsActorsEtcFrom[v6] != field_FA8[i].uSectorID )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8976 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8977 ++v6;
50
fde5c5acb66e BLV render
Nomad
parents: 46
diff changeset
8978 if ( v6 >= uNumVisibleNotEmptySectors)
fde5c5acb66e BLV render
Nomad
parents: 46
diff changeset
8979 {
fde5c5acb66e BLV render
Nomad
parents: 46
diff changeset
8980 pVisibleSectorIDs_toDrawDecorsActorsEtcFrom[uNumVisibleNotEmptySectors++] = field_FA8[i].uSectorID;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8981 continue;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8982 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8983 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8984 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8985 }
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8986 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8987
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8988
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8989 //----- (0043F515) --------------------------------------------------------
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8990 void MessWithBillboards_BLV()
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8991 {
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8992 for (uint i = 0; i < uNumBillboardsToDraw; ++i)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8993 {
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8994 auto p = pBillboardRenderList + i;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8995
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8996 if (p->field_1E & 2 || uCurrentlyLoadedLevelType == LEVEL_Indoor && !p->uIndoorSectorID)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8997 p->uPaletteSubindex = 0;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8998 else
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8999 p->uPaletteSubindex = _43F55F_get_billboard_light_level(p, -1);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9000 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9001 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9002
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9003 //----- (0043F55F) --------------------------------------------------------
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9004 int __fastcall _43F55F_get_billboard_light_level(RenderBillboard *a1, int uBaseLightLevel)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9005 {
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9006 signed int v3; // ecx@2
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9007
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9008 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9009 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9010 v3 = pIndoor->pSectors[a1->uIndoorSectorID].uMinAmbientLightLevel;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9011 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9012 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9013 {
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9014 if ( uBaseLightLevel == -1 )
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9015 v3 = a1->uPaletteSubindex;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9016 else
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9017 v3 = uBaseLightLevel;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9018 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9019 return _43F5C8_get_point_light_level_with_respect_to_lights(v3, a1->uIndoorSectorID, a1->some_x, a1->some_y, a1->some_z);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9020 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9021
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9022 //----- (0043F5C8) --------------------------------------------------------
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9023 int __fastcall _43F5C8_get_point_light_level_with_respect_to_lights(unsigned int uBaseLightLevel, int uSectorID, float x, float y, float z)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9024 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9025 int v5; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9026 signed int v6; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9027 int v8; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9028 int v9; // ebx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9029 unsigned int v10; // ecx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9030 unsigned int v11; // edx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9031 unsigned int v12; // edx@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9032 signed int v13; // ecx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9033 BLVLightMM7 *v16; // esi@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9034 int v17; // ebx@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9035 int v18; // eax@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9036 int v19; // ebx@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9037 unsigned int v20; // ecx@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9038 int v21; // edx@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9039 unsigned int v22; // edx@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9040 unsigned int v23; // edx@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9041 signed int v24; // ecx@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9042 int v26; // ebx@35
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9043 int v27; // eax@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9044 int v28; // ebx@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9045 unsigned int v29; // ecx@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9046 int v30; // edx@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9047 unsigned int v31; // edx@41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9048 unsigned int v32; // edx@43
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9049 signed int v33; // ecx@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9050 int v37; // [sp+Ch] [bp-18h]@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9051 int v38; // [sp+10h] [bp-14h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9052 int v39; // [sp+10h] [bp-14h]@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9053 int v40; // [sp+10h] [bp-14h]@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9054 int v42; // [sp+14h] [bp-10h]@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9055 unsigned int v43; // [sp+18h] [bp-Ch]@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9056 unsigned int v44; // [sp+18h] [bp-Ch]@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9057 unsigned int v45; // [sp+18h] [bp-Ch]@44
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9058
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9059 v6 = uBaseLightLevel;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9060 for (uint i = 0; i < uNumMobileLightsApplied; ++i)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9061 {
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9062 auto p = pMobileLights + i;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9063
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9064 auto distX = abs(p->vPosition.x - x);
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9065 if ( distX <= p->uRadius)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9066 {
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9067 auto distY = abs(p->vPosition.y - y);
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9068 if ( distY <= p->uRadius)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9069 {
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9070 auto distZ = abs(p->vPosition.z - z);
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9071 if ( distZ <= p->uRadius)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9072 {
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9073 v8 = distX;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9074 v9 = distY;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9075 v10 = distZ;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9076 if (distX < distY)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9077 {
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9078 v8 = distY;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9079 v9 = distX;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9080 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9081 if ( v8 < distZ )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9082 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9083 v11 = v8;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9084 v8 = distZ;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9085 v10 = v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9086 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9087 if ( v9 < (signed int)v10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9088 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9089 v12 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9090 v10 = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9091 v9 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9092 }
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9093 v43 = ((unsigned int)(11 * v9) / 32) + (v10 / 4) + v8;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9094 v13 = p->uRadius;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9095 if ( (signed int)v43 < v13 )
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9096 v6 += ((unsigned __int64)(30i64 * (signed int)(v43 << 16) / v13) >> 16) - 30;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9097 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9098 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9099 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9100 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9101
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9102 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9103 {
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9104 auto pSector = pIndoor->pSectors + uSectorID;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9105
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9106 for (uint i = 0; i < pSector->uNumLights; ++i)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9107 {
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9108 v16 = pIndoor->pLights + *(&pSector->pLights->vPosition.x + i);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9109 if ( !(v16->uAtributes & 8) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9110 {
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9111 v17 = abs(v16->vPosition.x - x);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9112 if ( v17 <= v16->uRadius )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9113 {
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9114 v42 = abs(v16->vPosition.y - y);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9115 if ( v42 <= v16->uRadius )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9116 {
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9117 v39 = abs(v16->vPosition.z - z);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9118 if ( v39 <= v16->uRadius )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9119 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9120 v18 = v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9121 v19 = v42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9122 v20 = v39;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9123 if ( v18 < v42 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9124 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9125 v21 = v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9126 v18 = v42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9127 v19 = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9128 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9129 if ( v18 < v39 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9130 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9131 v22 = v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9132 v18 = v39;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9133 v20 = v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9134 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9135 if ( v19 < (signed int)v20 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9136 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9137 v23 = v20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9138 v20 = v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9139 v19 = v23;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9140 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9141 v44 = ((unsigned int)(11 * v19) >> 5) + (v20 >> 2) + v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9142 v24 = v16->uRadius;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9143 if ( (signed int)v44 < v24 )
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9144 v6 += ((unsigned __int64)(30i64 * (signed int)(v44 << 16) / v24) >> 16) - 30;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9145 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9146 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9147 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9148 }
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9149 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9150 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9151
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9152 for (uint i = 0; i < uNumStationaryLightsApplied; ++i)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9153 {
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9154 auto p = pStationaryLights + i;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9155 v26 = abs(p->vPosition.x - x);
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9156 if ( v26 <= p->uRadius)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9157 {
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9158 v40 = abs(p->vPosition.y - y);
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9159 if ( v40 <= p->uRadius)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9160 {
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9161 v37 = abs(p->vPosition.z - z);
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9162 if ( v37 <= p->uRadius)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9163 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9164 v27 = v26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9165 v28 = v40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9166 v29 = v37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9167 if ( v27 < v40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9168 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9169 v30 = v27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9170 v27 = v40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9171 v28 = v30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9172 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9173 if ( v27 < v37 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9174 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9175 v31 = v27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9176 v27 = v37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9177 v29 = v31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9178 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9179 if ( v28 < (signed int)v29 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9180 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9181 v32 = v29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9182 v29 = v28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9183 v28 = v32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9184 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9185 v45 = ((unsigned int)(11 * v28) >> 5) + (v29 >> 2) + v27;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9186 v33 = p->uRadius;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9187 if ( (signed int)v45 < v33 )
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9188 v6 += ((unsigned __int64)(30i64 * (signed int)(v45 << 16) / v33) >> 16) - 30;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9189 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9190 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9191 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9192 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9193
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9194 if ( v6 <= 31 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9195 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9196 if ( v6 < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9197 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9198 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9199 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9200 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9201 v6 = 31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9202 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9203 return v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9204 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9205
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9206 //----- (00406051) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9207 __int16 stru262_TurnBased::StartTurn()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9208 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9209 stru262_TurnBased *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9210 int v2; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9211 int v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9212 char *v4; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9213 int v5; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9214 int v6; // eax@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9215 char *v7; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9216 TurnBased_QueueElem *v8; // edi@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9217 unsigned int v9; // edx@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9218 char *v10; // eax@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9219 int v11; // eax@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9220 int v12; // ebx@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9221 char *v13; // edi@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9222 int v15; // [sp+Ch] [bp-10h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9223 TurnBased_QueueElem *v16; // [sp+10h] [bp-Ch]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9224 int v17; // [sp+14h] [bp-8h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9225 int v18; // [sp+14h] [bp-8h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9226 signed int v19; // [sp+18h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9227 int v20; // [sp+18h] [bp-4h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9228
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9229 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9230 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9231 v19 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9232 v3 = v1->uActorQueueSize;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9233 v1->field_1C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9234 v4 = (char *)&v1->pQueue[v3].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9235 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9236 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9237 v17 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9238 if ( v1->uActorQueueSize <= v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9239 goto LABEL_11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9240 v16 = v1->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9241 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9242 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9243 v5 = v16->uPackedID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9244 if ( (v16->uPackedID & 7) == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9245 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9246 LABEL_8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9247 ++v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9248 ++v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9249 if ( v17 >= v1->uActorQueueSize )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9250 goto LABEL_11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9251 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9252 v15 = v5 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9253 if ( !pPlayers[(v5 >> 3) + 1]->CanAct() || v19 != v15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9254 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9255 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9256 goto LABEL_8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9257 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9258 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9259 LABEL_11:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9260 if ( v17 == v1->uActorQueueSize )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9261 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9262 *(int *)v4 = 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9263 v6 = 8 * v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9264 LOBYTE(v6) = 8 * v19 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9265 *((int *)v4 + 2) = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9266 *((int *)v4 - 1) = v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9267 *((int *)v4 + 1) = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9268 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9269 v4 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9270 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9271 ++v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9272 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9273 while ( v19 < 4 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9274 v1->uActorQueueSize = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9275 v20 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9276 if ( ai_arrays_size > v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9277 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9278 v7 = (char *)&v1->pQueue[v3].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9279 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9280 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9281 v18 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9282 if ( v1->uActorQueueSize > v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9283 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9284 v8 = v1->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9285 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9286 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9287 if ( (v8->uPackedID & 7) == 3 && ai_array_4F7DB0_actor_ids[v20] == v8->uPackedID >> 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9288 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9289 ++v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9290 ++v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9291 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9292 while ( v18 < v1->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9293 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9294 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9295 if ( v18 == v1->uActorQueueSize )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9296 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9297 v9 = ai_array_4F7DB0_actor_ids[v20];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9298 *(int *)v7 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9299 *((int *)v7 + 2) = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9300 *((int *)v7 - 1) = 8 * v9 | 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9301 *((int *)v7 + 1) = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9302 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9303 v7 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9304 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9305 ++v20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9306 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9307 while ( v20 < ai_arrays_size );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9308 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9309 ++v1->field_0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9310 v1->uActorQueueSize = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9311 v1->field_10 = 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9312 if ( v3 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9313 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9314 v10 = (char *)&v1->pQueue[0].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9315 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9316 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9317 if ( *(int *)v10 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9318 *(int *)v10 = 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9319 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9320 v10 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9321 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9322 while ( v2 < v1->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9323 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9324 LOWORD(v11) = v1->_4063A1();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9325 v12 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9326 if ( v1->uActorQueueSize > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9327 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9328 v13 = (char *)&v1->pQueue[0].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9329 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9330 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9331 v11 = *((int *)v13 - 1) & 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9332 if ( (char)v11 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9333 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9334 if ( *(int *)v13 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9335 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9336 LOWORD(v11) = v1->_40680F(v12++);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9337 v13 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9338 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9339 while ( v12 < v1->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9340 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9341 return v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9342 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9343 // 4F75D8: using guessed type int ai_arrays_size;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9344
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9345 //----- (004061CA) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9346 void stru262_TurnBased::NextTurn()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9347 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9348 stru262_TurnBased *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9349 TurnBased_QueueElem *v2; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9350 int v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9351 int v4; // edi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9352 Actor *v5; // eax@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9353 int v6; // ecx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9354 signed int v7; // ebx@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9355 int v8; // ebp@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9356 TurnBased_QueueElem *v9; // edi@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9357 int v10; // ecx@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9358 unsigned __int16 v11; // ax@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9359 signed int v12; // edx@35
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9360 signed int v13; // [sp+10h] [bp-4h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9361
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9362 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9363 _404544();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9364 v2 = v1->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9365 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9366 if ( (v1->pQueue[0].uPackedID & 7) == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9367 uActiveCharacter = (v1->pQueue[0].uPackedID >> 3) + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9368 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9369 uActiveCharacter = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9370 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9371 if ( v1->field_1C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9372 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9373 pTurnEngine->field_18 |= 2u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9374 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9375 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9376 pTurnEngine->field_18 &= 0xFFFFFFFDu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9377 if ( v1->pQueue[0].field_4 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9378 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9379 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9380 v13 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9381 if ( v1->uActorQueueSize <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9382 goto LABEL_27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9383 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9384 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9385 if ( (v2->uPackedID & 7) != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9386 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9387 v5 = &pActors[v2->uPackedID >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9388 LOWORD(v6) = v5->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9389 if ( (short)v6 == 4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9390 || (short)v6 == 8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9391 || (short)v6 == 2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9392 || (short)v6 == 3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9393 || (short)v6 == 12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9394 || (short)v6 == 13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9395 || (short)v6 == 18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9396 || (short)v6 == 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9397 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9398 v7 = v5->uCurrentActionLength;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9399 v5->uCurrentActionTime += pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9400 if ( (signed int)v5->uCurrentActionTime < v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9401 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9402 v13 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9403 LABEL_19:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9404 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9405 goto LABEL_20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9406 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9407 v6 = (signed __int16)v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9408 if ( (signed __int16)v6 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9409 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9410 v3 = 0;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9411 v5->uAIState = Dead;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9412 v5->uCurrentActionTime = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9413 v5->uCurrentActionLength = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9414 v5->UpdateAnimation();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9415 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9416 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9417 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9418 if ( v6 != 8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9419 goto LABEL_19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9420 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9421 Actor::_403F58(v2->uPackedID >> 3, dword_4F6E08[v2->uPackedID >> 3], 32, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9422 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9423 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9424 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9425 LABEL_20:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9426 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9427 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9428 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9429 while ( v4 < v1->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9430 if ( v13 != v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9431 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9432 v1->field_18 |= 1u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9433 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9434 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9435 LABEL_27:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9436 v1->field_18 &= 0xFFFFFFFEu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9437 v8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9438 if ( v1->uActorQueueSize > v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9439 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9440 v9 = v1->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9441 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9442 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9443 if ( (v9->uPackedID & 7) != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9444 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9445 v10 = v9->uPackedID >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9446 v11 = pActors[v10].uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9447 if ( v11 != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9448 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9449 if ( v11 != 4 && v11 != 11 && v11 != 19 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9450 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9451 if ( v11 != 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9452 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9453 v12 = dword_4F6E08[v10];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9454 v9->uActionLength = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9455 Actor::_403F58(v10, v12, 32, (AIDirection *)v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9456 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9457 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9458 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9459 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9460 ++v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9461 ++v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9462 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9463 while ( v8 < v1->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9464 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9465 v1->field_4 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9466 pParty->uTimePlayed += __PAIR__(v3, 213);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9467 _494035_timed_effects__water_walking_damage__etc();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9468 v1->uActionPointsLeft = 130;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9469 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9470
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9471 //----- (004063A1) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9472 int stru262_TurnBased::_4063A1()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9473 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9474 stru262_TurnBased *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9475 int v2; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9476 signed int result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9477 int v4; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9478 int v5; // edx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9479 int v6; // edi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9480 int v7; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9481 Actor *v8; // ecx@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9482 unsigned __int16 v9; // dx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9483 int v10; // edi@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9484 int v11; // edx@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9485 char v12; // zf@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9486
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9487 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9488 _404544();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9489 v2 = (int)&v1->pQueue[0].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9490 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9491 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9492 v4 = v1->pQueue[0].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9493 if ( v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9494 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9495 if ( (v1->pQueue[0].uPackedID & 7) == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9496 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9497 v5 = v1->uActorQueueSize;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9498 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9499 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9500 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9501 if ( v5 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9502 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9503 v7 = (int)&v1->pQueue[0].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9504 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9505 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9506 --*(int *)v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9507 v5 = v1->uActorQueueSize;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9508 ++v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9509 v7 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9510 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9511 while ( v6 < v5 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9512 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9513 --v1->field_10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9514 if ( v1->field_10 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9515 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9516 if ( !*(int *)v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9517 goto LABEL_9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9518 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9519 LABEL_24:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9520 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9521 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9522 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9523 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9524 v8 = &pActors[v1->pQueue[0].uPackedID >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9525 if ( v4 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9526 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9527 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9528 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9529 v9 = v8->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9530 if ( v9 == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9531 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9532 if ( v9 == 4 || v9 == 19 || v9 == 11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9533 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9534 v10 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9535 if ( v1->uActorQueueSize > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9536 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9537 v11 = (int)&v1->pQueue[0].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9538 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9539 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9540 v12 = (*(int *)v11)-- == 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9541 if ( v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9542 *(int *)(v11 + 4) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9543 ++v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9544 v11 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9545 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9546 while ( v10 < v1->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9547 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9548 --v1->field_10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9549 if ( v1->field_10 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9550 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9551 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9552 while ( *(int *)v2 > 0 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9553 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9554 LABEL_9:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9555 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9556 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9557 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9558 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9559 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9560
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9561 //----- (00406457) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9562 int stru262_TurnBased::_406457(int a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9563 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9564 stru262_TurnBased *v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9565 signed int v3; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9566 signed int v4; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9567 char *v5; // edx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9568 signed int v6; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9569 int result; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9570 int v8; // edx@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9571 int v9; // ecx@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9572 char v10; // zf@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9573
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9574 v2 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9575 v3 = *(&this->field_0 + 4 * (a2 + 2));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9576 if ( (*((char *)&this->field_0 + 16 * (a2 + 2)) & 7) == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9577 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9578 v4 = v3 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9579 v5 = (char *)&pParty->pTurnBasedPlayerRecoveryTimes[v3 >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9580 v6 = *(int *)v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9581 if ( *(int *)v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9582 *(int *)v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9583 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9584 v6 = pPlayers[v4 + 1]->GetAttackRecoveryTime(0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9585 if ( v6 < 30 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9586 v6 = 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9587 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9588 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9589 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9590 v6 = pMonsterStats->pInfos[pActors[v3 >> 3].pMonsterInfo.uID].uRecoveryTime;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9591 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9592 v2->pQueue[a2].field_4 = v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9593 v2->_404544();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9594 if ( (v2->pQueue[0].uPackedID & 7) == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9595 uActiveCharacter = (v2->pQueue[0].uPackedID >> 3) + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9596 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9597 uActiveCharacter = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9598 result = (int)&v2->pQueue[0].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9599 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9600 while ( *(int *)result > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9601 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9602 if ( v2->field_10 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9603 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9604 v8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9605 if ( v2->uActorQueueSize > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9606 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9607 v9 = (int)&v2->pQueue[0].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9608 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9609 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9610 v10 = (*(int *)v9)-- == 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9611 if ( v10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9612 *(int *)(v9 + 4) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9613 ++v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9614 v9 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9615 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9616 while ( v8 < v2->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9617 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9618 --v2->field_10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9619 if ( v2->field_10 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9620 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9621 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9622 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9623 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9624
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9625 //----- (0040652A) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9626 void stru262_TurnBased::_40652A()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9627 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9628 char *v1; // edx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9629 Actor *v2; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9630 unsigned __int16 v3; // si@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9631 unsigned int v4; // esi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9632 int v5; // [sp+Ch] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9633
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9634 v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9635 if ( this->uActorQueueSize > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9636 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9637 v1 = (char *)&this->pQueue[0].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9638 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9639 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9640 if ( !*(int *)v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9641 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9642 if ( (*(v1 - 4) & 7) == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9643 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9644 v2 = &pActors[*((int *)v1 - 1) >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9645 v3 = v2->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9646 if ( !v3 || v3 == 9 || v3 == 7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9647 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9648 v4 = pMonsterStats->pInfos[v2->pMonsterInfo.uID].uRecoveryTime;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9649 *(int *)v1 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9650 if ( (signed __int64)v2->pActorBuffs[7].uExpireTime > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9651 *(int *)v1 = 2 * v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9652 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9653 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9654 ++v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9655 v1 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9656 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9657 while ( v5 < this->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9658 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9659 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9660
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9661 //----- (004065B0) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9662 __int16 stru262_TurnBased::_4065B0()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9663 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9664 stru262_TurnBased *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9665 signed int v2; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9666 int v3; // ebx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9667 int v4; // edi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9668 unsigned int v5; // edi@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9669
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9670 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9671 LOWORD(v2) = _404544();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9672 if ( v1->pQueue[0].field_4 <= 0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9673 || ((_4063A1(), v2 = v1->pQueue[0].uPackedID, (v1->pQueue[0].uPackedID & 7) != 4) ? (uActiveCharacter = 0) : (v2 = (v2 >> 3) + 1, uActiveCharacter = v2),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9674 viewparams->bRedrawGameUI = 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9675 v1->pQueue[0].field_4 <= 0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9676 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9677 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9678 if ( v1->uActorQueueSize > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9679 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9680 v4 = (int)v1->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9681 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9682 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9683 v2 = *(int *)v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9684 if ( (*(char *)v4 & 7) == 4 || *(int *)(v4 + 4) > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9685 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9686 if ( *(int *)(v4 + 8) <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9687 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9688 LOWORD(v2) = v2 & 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9689 if ( (char)v2 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9690 LOWORD(v2) = v1->_40680F(v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9691 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9692 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9693 v4 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9694 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9695 while ( v3 < v1->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9696 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9697 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9698 v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9699 if ( v1->uActorQueueSize > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9700 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9701 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9702 LOWORD(v2) = v1->_406648(v5++);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9703 while ( (signed int)v5 < v1->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9704 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9705 return v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9706 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9707
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9708 //----- (00406648) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9709 __int16 stru262_TurnBased::_406648(unsigned int a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9710 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9711 TurnBased_QueueElem *v1; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9712 int v3; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9713 unsigned int v4; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9714 Actor *v5; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9715 signed int v6; // edi@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9716 int v7; // ecx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9717 int v8; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9718 int v9; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9719 int v10; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9720 int v11; // eax@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9721 int v12; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9722 int v13; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9723 int v14; // eax@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9724 unsigned int v15; // ecx@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9725 unsigned int v16; // edx@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9726 int v17; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9727 int v18; // eax@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9728 char v19; // al@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9729 unsigned int v21; // [sp-8h] [bp-50h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9730 int v22; // [sp-8h] [bp-50h]@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9731 AIDirection *v23; // [sp-4h] [bp-4Ch]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9732 unsigned int v24; // [sp-4h] [bp-4Ch]@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9733 char v25; // [sp-4h] [bp-4Ch]@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9734 AIDirection a3; // [sp+Ch] [bp-3Ch]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9735 AIDirection a4; // [sp+28h] [bp-20h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9736 TurnBased_QueueElem *v28; // [sp+44h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9737 unsigned int a2a; // [sp+50h] [bp+8h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9738
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9739 v1 = (TurnBased_QueueElem *)((char *)this + 16 * (a2 + 2));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9740 v28 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9741 v3 = v1->uPackedID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9742 if ( (v1->uPackedID & 7) != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9743 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9744 v4 = v3 >> 3; // turn based only stuff
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9745 a2a = dword_4F6E08[v3 >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9746 memcpy(&a3, Actor::GetDirectionInfo(v1->uPackedID, dword_4F6E08[v3 >> 3], &a3, 0), sizeof(a3));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9747 memcpy(&a4, &a3, sizeof(a4));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9748 v5 = &pActors[v3 >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9749 LOWORD(v3) = v5->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9750 if ( (short)v3 != Dead )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9751 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9752 if ( (short)v3 != Disabled )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9753 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9754 if ( (short)v3 != Removed )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9755 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9756 v6 = v5->uCurrentActionLength;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9757 v5->uCurrentActionTime += pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9758 if ( (signed int)v5->uCurrentActionTime >= v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9759 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9760 v7 = (signed __int16)v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9761 v8 = (signed __int16)v3 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9762 if ( !v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9763 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9764 v19 = stru_50C198.special_ability_use_check(&pActors[v4], v4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9765 stru_50FE08.Add(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9766 v28->uPackedID,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9767 5120,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9768 v5->vPosition.x,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9769 v5->vPosition.y,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9770 v5->vPosition.z + ((signed int)v5->uActorHeight >> 1),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9771 v19,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9772 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9773 goto LABEL_25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9774 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9775 v9 = v8 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9776 if ( v9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9777 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9778 v10 = v9 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9779 if ( !v10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9780 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9781 v11 = v10 - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9782 if ( !v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9783 goto LABEL_25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9784 v12 = v11 - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9785 if ( v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9786 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9787 v13 = v12 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9788 if ( v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9789 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9790 if ( v13 != Dead )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9791 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9792 if ( v7 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9793 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9794 v14 = rand();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9795 v15 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9796 v23 = &a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9797 v16 = a2a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9798 if ( !(v14 % 2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9799 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9800 LOWORD(v3) = Actor::_402F87(v4, a2a, &a4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9801 return v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9802 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9803 v21 = 64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9804 LABEL_26:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9805 LOWORD(v3) = Actor::_403EB6(v15, v16, v21, v23);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9806 return v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9807 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9808 LABEL_21:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9809 v5->uCurrentActionTime = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9810 v5->uCurrentActionLength = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9811 v5->uAIState = Dead;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9812 return pActors[v4].UpdateAnimation();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9813 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9814 v24 = v5->pMonsterInfo.uSpellSkillAndMastery2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9815 v22 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9816 v17 = v5->pMonsterInfo.uSpell2ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9817 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9818 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9819 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9820 v24 = v5->pMonsterInfo.uSpellSkillAndMastery1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9821 v22 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9822 v17 = v5->pMonsterInfo.uSpell1ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9823 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9824 Actor::_404AC7(v4, &a4, v17, v22, v24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9825 LABEL_25:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9826 v16 = a2a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9827 v23 = &a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9828 v21 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9829 v15 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9830 goto LABEL_26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9831 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9832 v18 = v5->pMonsterInfo.uMissleAttack2Type;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9833 v25 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9834 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9835 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9836 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9837 v18 = v5->pMonsterInfo.uMissleAttack1Type;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9838 v25 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9839 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9840 Actor::_404874(v4, &a4, v18, v25);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9841 goto LABEL_25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9842 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9843 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9844 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9845 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9846 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9847 return v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9848 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9849 // 50FE08: using guessed type stru298 stru_50FE08;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9850
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9851 //----- (0040680F) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9852 __int16 stru262_TurnBased::_40680F(int a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9853 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9854 TurnBased_QueueElem *v2; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9855 TurnBased_QueueElem *v3; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9856 TurnBased_QueueElem *v4; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9857 Actor *v5; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9858 unsigned int *v6; // esi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9859 AIDirection *v7; // esi@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9860 int v8; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9861 unsigned int v9; // ecx@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9862 signed int v10; // eax@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9863 unsigned __int8 v11; // sf@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9864 unsigned __int8 v12; // of@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9865 int v13; // esi@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9866 bool v14; // eax@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9867 unsigned __int8 v15; // cl@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9868 AIDirection a3; // [sp+Ch] [bp-44h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9869 AIDirection v18; // [sp+28h] [bp-28h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9870 int a2a; // [sp+44h] [bp-Ch]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9871 unsigned int v20; // [sp+48h] [bp-8h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9872 TurnBased_QueueElem *v21; // [sp+4Ch] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9873 signed int v22; // [sp+58h] [bp+8h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9874
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9875 v2 = (TurnBased_QueueElem *)((char *)this + 16 * (a2 + 2));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9876 v21 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9877 v2->uActionLength = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9878 v3 = (TurnBased_QueueElem *)v2->uPackedID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9879 if ( (unsigned __int8)v3 & 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9880 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9881 v3 = (TurnBased_QueueElem *)((signed int)v3 >> 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9882 v4 = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9883 a2a = (int)v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9884 v5 = &pActors[(int)v3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9885 LOWORD(v3) = v5->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9886 if ( (short)v3 != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9887 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9888 if ( (short)v3 != 4 && (short)v3 != 11 && (short)v3 != 19 && (short)v3 != 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9889 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9890 v6 = (unsigned int *)&dword_4F6E08[(int)v4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9891 Actor::_401221((unsigned int)v4, &dword_4F6E08[(int)v4], 1u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9892 if ( v5->pMonsterInfo.uHostilityType && !*v6 )
29
e62134245ab0 On BLV loading.
Nomad
parents: 27
diff changeset
9893 v5->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Friendly;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9894 v22 = *v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9895 v7 = Actor::GetDirectionInfo(8 * (int)v4 | 3, *v6, &a3, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9896 v8 = v5->uActorRadius;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9897 memcpy(&a3, v7, sizeof(a3));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9898 memcpy(&v18, &a3, sizeof(v18));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9899 v9 = a3.uDistance - v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9900 v20 = a3.uDistance - v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9901 if ( ((a3.uDistance - v8) & 0x80000000u) != 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9902 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9903 v9 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9904 v20 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9905 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9906 if ( (v22 & 7) == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9907 v10 = (unsigned __int8)*(&byte_5C8D1A[89
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9908 * (pMonsterStats->pInfos[pActors[v22 >> 3].pMonsterInfo.uID].uID - 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9909 / 3]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9910 + (v5->pMonsterInfo.uID - 1) / 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9911 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9912 v10 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9913 if ( v10 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9914 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9915 if ( (double)(signed int)v20 < 307.2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9916 goto LABEL_25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9917 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9918 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9919 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9920 if ( v10 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9921 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9922 v12 = __OFSUB__(v9, 1024);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9923 v11 = ((v9 - 1024) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9924 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9925 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9926 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9927 if ( v10 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9928 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9929 v12 = __OFSUB__(v9, 2560);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9930 v11 = ((v9 - 2560) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9931 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9932 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9933 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9934 if ( v10 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9935 goto LABEL_26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9936 v12 = __OFSUB__(v9, 5120);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9937 v11 = ((v9 - 5120) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9938 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9939 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9940 if ( v11 ^ v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9941 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9942 LABEL_25:
29
e62134245ab0 On BLV loading.
Nomad
parents: 27
diff changeset
9943 v5->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Long;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9944 goto LABEL_26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9945 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9946 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9947 LABEL_26:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9948 if ( v5->pMonsterInfo.uHostilityType != 4 || !v22 || (signed int)v9 >= 5120 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9949 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9950 v13 = a2a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9951 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9952 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9953 v13 = a2a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9954 v14 = stru_50C198.special_ability_use_check(v5, a2a);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9955 if ( v14 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9956 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9957 if ( v5->pMonsterInfo.uMissleAttack2Type )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9958 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9959 Actor::_40368B(v13, v22, &v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9960 goto LABEL_43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9961 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9962 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9963 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9964 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9965 if ( v14 > 1 && v14 <= 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9966 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9967 if ( v14 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9968 v15 = v5->pMonsterInfo.uSpell1ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9969 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9970 v15 = v5->pMonsterInfo.uSpell2ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9971 if ( v15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9972 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9973 if ( v14 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9974 Actor::_403854(v13, v22, &v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9975 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9976 Actor::_403A60(v13, v22, &v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9977 goto LABEL_43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9978 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9979 goto LABEL_44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9980 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9981 if ( v5->pMonsterInfo.uMissleAttack1Type )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9982 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9983 Actor::_403476(v13, v22, &v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9984 LABEL_43:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9985 v3 = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9986 v21->field_C = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9987 LABEL_48:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9988 v3->uActionLength = v5->uCurrentActionLength;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9989 return (signed __int16)v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9990 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9991 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9992 LABEL_44:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9993 if ( (double)(signed int)v20 < 307.2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9994 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9995 Actor::_403C6C(v13, v22, &v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9996 v3 = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9997 v21->field_C = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9998 goto LABEL_48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9999 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10000 LABEL_47:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10001 Actor::_403EB6(v13, v22, 0x40u, &v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10002 v3 = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10003 v21->field_C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10004 goto LABEL_48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10005 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10006 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10007 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10008 return (signed __int16)v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10009 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10010
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10011 //----- (00406A63) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10012 void stru262_TurnBased::_406A63()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10013 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10014 stru262_TurnBased *v1; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10015 int v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10016 unsigned __int8 v3; // zf@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10017 unsigned __int8 v4; // sf@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10018 signed int v5; // ecx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10019 AIDirection a3; // [sp+8h] [bp-44h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10020 AIDirection v7; // [sp+24h] [bp-28h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10021 unsigned int v8; // [sp+40h] [bp-Ch]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10022 signed int a2; // [sp+44h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10023 TurnBased_QueueElem *v10; // [sp+48h] [bp-4h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10024
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10025 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10026 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10027 this->field_8 = 64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10028 dword_50C994 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10029 uActiveCharacter = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10030 v3 = this->uActorQueueSize == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10031 v4 = this->uActorQueueSize < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10032 a2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10033 if ( !(v4 | v3) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10034 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10035 v10 = this->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10036 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10037 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10038 v5 = v10->uPackedID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10039 if ( (v10->uPackedID & 7) == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10040 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10041 v8 = dword_4F6E08[v5 >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10042 memcpy(&v7, Actor::GetDirectionInfo(v5, v8, &a3, v2), sizeof(v7));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10043 if ( !v1->_406D10(a2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10044 Actor::_403EB6(v10->uPackedID >> 3, v8, 0x20u, &v7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10045 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10046 ++a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10047 ++v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10048 if ( a2 >= v1->uActorQueueSize )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10049 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10050 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10051 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10052 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10053 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10054 // 50C994: using guessed type int dword_50C994;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10055
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10056 //----- (00406AFE) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10057 void stru262_TurnBased::_406AFE()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10058 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10059 stru262_TurnBased *v1; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10060 TurnBased_QueueElem *v2; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10061 int v3; // esi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10062 int v4; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10063 AIDirection a3; // [sp+4h] [bp-48h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10064 AIDirection v6; // [sp+20h] [bp-2Ch]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10065 stru262_TurnBased *v7; // [sp+3Ch] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10066 unsigned int v8; // [sp+40h] [bp-Ch]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10067 unsigned int v9; // [sp+44h] [bp-8h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10068 int v10; // [sp+48h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10069
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10070 v10 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10071 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10072 v7 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10073 if ( this->uActorQueueSize > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10074 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10075 v2 = this->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10076 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10077 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10078 if ( (v2->uPackedID & 7) == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10079 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10080 v3 = v2->uPackedID >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10081 v8 = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10082 if ( pActors[v3].CanAct() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10083 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10084 v4 = v2->uPackedID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10085 v9 = dword_4F6E08[v3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10086 memcpy(&v6, Actor::GetDirectionInfo(v4, v9, &a3, 0), sizeof(v6));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10087 Actor::_403EB6(v8, v9, 0x20u, &v6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10088 v2->field_C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10089 v2->uActionLength = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10090 v1 = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10091 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10092 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10093 ++v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10094 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10095 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10096 while ( v10 < v1->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10097 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10098 v1->field_4 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10099 v1->field_8 = 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10100 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10101
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10102 //----- (00406B9F) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10103 int stru262_TurnBased::_406B9F()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10104 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10105 signed int result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10106 unsigned __int8 v2; // zf@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10107 unsigned __int8 v3; // sf@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10108 int v4; // esi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10109 unsigned int v5; // esi@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10110 Actor *v6; // ebx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10111 unsigned __int16 v7; // cx@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10112 AIDirection a3; // [sp+0h] [bp-50h]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10113 AIDirection v9; // [sp+1Ch] [bp-34h]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10114 signed int a1; // [sp+38h] [bp-18h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10115 stru262_TurnBased *thisa; // [sp+3Ch] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10116 unsigned int v12; // [sp+40h] [bp-10h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10117 unsigned int v13; // [sp+44h] [bp-Ch]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10118 TurnBased_QueueElem *v14; // [sp+48h] [bp-8h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10119 signed int a2; // [sp+4Ch] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10120
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10121 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10122 thisa = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10123 v2 = this->uActorQueueSize == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10124 v3 = this->uActorQueueSize < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10125 a2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10126 if ( !(v3 | v2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10127 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10128 v14 = this->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10129 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10130 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10131 v4 = v14->uPackedID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10132 a1 = v14->uPackedID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10133 if ( (a1 & 7) != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10134 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10135 v5 = v4 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10136 v12 = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10137 v6 = &pActors[v5];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10138 if ( SHIDWORD(v6->pActorBuffs[5].uExpireTime) < result
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10139 || SHIDWORD(v6->pActorBuffs[5].uExpireTime) <= result && LODWORD(v6->pActorBuffs[5].uExpireTime) <= result )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10140 v13 = result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10141 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10142 v13 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10143 if ( SHIDWORD(v6->pActorBuffs[6].uExpireTime) >= result
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10144 && (SHIDWORD(v6->pActorBuffs[6].uExpireTime) > result || LODWORD(v6->pActorBuffs[6].uExpireTime) > result) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10145 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10146 if ( !(v13 | result | v6->uAIState == 5 | v6->uAIState == 11 | v6->uAIState == 19) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10147 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10148 v13 = dword_4F6E08[v5];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10149 memcpy(&v9, Actor::GetDirectionInfo(a1, v13, &a3, 0), sizeof(v9));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10150 v7 = v6->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10151 if ( v7 == 6 || v7 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10152 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10153 if ( (double)(signed int)v9.uDistance < 307.2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10154 goto LABEL_26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10155 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10156 v6->uCurrentActionTime += pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10157 if ( (signed int)v6->uCurrentActionTime > v6->uCurrentActionLength )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10158 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10159 if ( v7 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10160 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10161 v6->uCurrentActionTime = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10162 v6->uCurrentActionLength = 0;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
10163 v6->uAIState = Dead;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10164 v6->UpdateAnimation();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10165 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10166 if ( !thisa->_406D10(a2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10167 LABEL_26:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10168 Actor::_403EB6(v12, v13, 0x20u, &v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10169 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10170 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10171 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10172 ++a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10173 result = (signed int)thisa;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10174 ++v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10175 if ( a2 >= thisa->uActorQueueSize )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10176 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10177 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10178 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10179 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10180 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10181 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10182
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10183 //----- (00406D10) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10184 bool stru262_TurnBased::_406D10(signed int a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10185 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10186 int v2; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10187 int v3; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10188 Actor *v4; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10189 unsigned __int16 v5; // dx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10190 int *v6; // esi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10191 TurnBased_QueueElem *v7; // edi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10192 int v8; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10193 AIDirection *v9; // esi@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10194 int v10; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10195 unsigned int v11; // ecx@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10196 unsigned __int8 v12; // al@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10197 unsigned __int8 v13; // sf@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10198 unsigned __int8 v14; // of@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10199 unsigned int v15; // edx@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10200 unsigned int v16; // ecx@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10201 TurnBased_QueueElem *v17; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10202 double v18; // st7@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10203 double v19; // st6@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10204 int v21; // [sp-8h] [bp-5Ch]@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10205 int v22; // [sp-8h] [bp-5Ch]@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10206 AIDirection *v23; // [sp-4h] [bp-58h]@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10207 int v24; // [sp-4h] [bp-58h]@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10208 AIDirection a3; // [sp+Ch] [bp-48h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10209 AIDirection pDir; // [sp+28h] [bp-2Ch]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10210 int v27; // [sp+44h] [bp-10h]@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10211 unsigned int v28; // [sp+48h] [bp-Ch]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10212 TurnBased_QueueElem *v29; // [sp+4Ch] [bp-8h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10213 unsigned int uActorID; // [sp+50h] [bp-4h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10214 unsigned int a2a; // [sp+5Ch] [bp+8h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10215
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10216 v2 = *(&this->field_0 + 4 * (a2 + 2));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10217 if ( (v2 & 7) == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10218 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10219 v3 = v2 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10220 uActorID = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10221 v4 = &pActors[v3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10222 v5 = v4->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10223 if ( v5 == 5 || v5 == 4 || v5 == 11 || v5 == 19 || v5 == 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10224 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10225 v6 = &dword_4F6E08[v3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10226 v7 = &pTurnEngine->pQueue[a2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10227 v8 = *v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10228 v29 = &pTurnEngine->pQueue[a2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10229 a2a = v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10230 Actor::_401221(v3, &dword_4F6E08[v3], 1u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10231 if ( v4->pMonsterInfo.uHostilityType && !*v6 )
29
e62134245ab0 On BLV loading.
Nomad
parents: 27
diff changeset
10232 v4->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Friendly;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10233 v9 = Actor::GetDirectionInfo(v7->uPackedID, a2a, &a3, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10234 v10 = v4->uActorRadius;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10235 memcpy(&a3, v9, sizeof(a3));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10236 memcpy(&pDir, &a3, sizeof(pDir));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10237 v11 = a3.uDistance - v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10238 v28 = a3.uDistance - v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10239 if ( ((a3.uDistance - v10) & 0x80000000u) != 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10240 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10241 v11 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10242 v28 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10243 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10244 v12 = v4->pMonsterInfo.uHostilityType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10245 if ( v12 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10246 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10247 if ( (double)(signed int)v28 >= 307.2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10248 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10249 LABEL_20:
29
e62134245ab0 On BLV loading.
Nomad
parents: 27
diff changeset
10250 v4->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Long;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10251 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10252 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10253 if ( v12 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10254 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10255 v14 = __OFSUB__(v11, 1024);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10256 v13 = ((v11 - 1024) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10257 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10258 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10259 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10260 if ( v12 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10261 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10262 v14 = __OFSUB__(v11, 2560);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10263 v13 = ((v11 - 2560) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10264 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10265 if ( v13 ^ v14 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10266 goto LABEL_20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10267 LABEL_21:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10268 if ( (signed __int64)v4->pActorBuffs[4].uExpireTime > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10269 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10270 v15 = a2a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10271 if ( (signed int)v11 < 10240 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10272 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10273 v23 = &pDir;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10274 v16 = uActorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10275 v21 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10276 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10277 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10278 v24 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10279 v22 = 1024;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10280 goto LABEL_58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10281 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10282 if ( v4->pMonsterInfo.uHostilityType != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10283 goto LABEL_46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10284 if ( !(v4->uAttributes & 0x020000) || v4->pMonsterInfo.uAIType == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10285 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10286 if ( v4->pMonsterInfo.uAIType == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10287 goto LABEL_36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10288 if ( v4->pMonsterInfo.uAIType == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10289 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10290 v27 = v4->sCurrentHP;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10291 v18 = (double)v27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10292 v19 = (double)(signed int)v4->pMonsterInfo.uHP * 0.2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10293 goto LABEL_34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10294 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10295 if ( v4->pMonsterInfo.uAIType == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10296 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10297 v27 = v4->sCurrentHP;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10298 v18 = (double)v27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10299 v19 = (double)(signed int)v4->pMonsterInfo.uHP * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10300 LABEL_34:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10301 if ( v19 > v18 && (signed int)v11 < 10240 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10302 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10303 LABEL_36:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10304 v16 = uActorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10305 v15 = a2a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10306 v23 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10307 v21 = 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10308 if ( v4->pMonsterInfo.uMovementType == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10309 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10310 Actor::_403EB6(uActorID, a2a, 0x20u, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10311 goto LABEL_25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10312 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10313 LABEL_24:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10314 Actor::_402968(v16, v15, v21, v23);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10315 LABEL_25:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10316 v17 = v29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10317 v29->field_C = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10318 LABEL_60:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10319 v17->uActionLength = v4->uCurrentActionLength;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10320 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10321 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10322 goto LABEL_39;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10323 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10324 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10325 LABEL_39:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10326 if ( (double)(signed int)v28 < 307.2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10327 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10328 if ( (signed int)v11 < 5120 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10329 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10330 if ( v4->pMonsterInfo.uMissleAttack1Type && (signed int)v11 < 1024 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10331 Actor::_402AD7(uActorID, a2a, uActorID, 32, &pDir);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10332 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10333 Actor::_40281C(uActorID, a2a, 32, &pDir, 307);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10334 goto LABEL_59;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10335 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10336 LABEL_46:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10337 if ( !v4->pMonsterInfo.uMovementType )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10338 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10339 v24 = 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10340 v22 = 1024;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10341 goto LABEL_57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10342 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10343 if ( v4->pMonsterInfo.uMovementType == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10344 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10345 v24 = 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10346 v22 = 2560;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10347 goto LABEL_57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10348 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10349 if ( v4->pMonsterInfo.uMovementType == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10350 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10351 v24 = 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10352 v22 = 5120;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10353 LABEL_57:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10354 v15 = a2a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10355 LABEL_58:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10356 Actor::_4032B2(uActorID, v15, v22, v24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10357 LABEL_59:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10358 v17 = v29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10359 v29->field_C = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10360 goto LABEL_60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10361 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10362 if ( v4->pMonsterInfo.uMovementType == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10363 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10364 Actor::_4032B2(uActorID, a2a, 10240, 32);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10365 goto LABEL_53;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10366 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10367 if ( v4->pMonsterInfo.uMovementType == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10368 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10369 Actor::_403EB6(uActorID, a2a, 0x20u, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10370 LABEL_53:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10371 v17 = v29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10372 v29->field_C = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10373 goto LABEL_60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10374 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10375 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10376 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10377
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10378 //----- (00406FA8) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10379 void stru262_TurnBased::_406FA8()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10380 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10381 unsigned __int8 v1; // zf@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10382 unsigned __int8 v2; // sf@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10383 TurnBased_QueueElem *v3; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10384 int v4; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10385 Actor *v5; // ebx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10386 unsigned __int16 v6; // cx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10387 unsigned int *v7; // edx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10388 unsigned int v8; // esi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10389 unsigned __int8 v9; // of@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10390 AIDirection a3; // [sp+Ch] [bp-6Ch]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10391 AIDirection v11; // [sp+28h] [bp-50h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10392 AIDirection a4; // [sp+44h] [bp-34h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10393 stru262_TurnBased *v13; // [sp+60h] [bp-18h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10394 TurnBased_QueueElem *v14; // [sp+64h] [bp-14h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10395 int uActorID; // [sp+68h] [bp-10h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10396 unsigned int a2; // [sp+6Ch] [bp-Ch]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10397 int v17; // [sp+70h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10398 unsigned int v18; // [sp+74h] [bp-4h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10399
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10400 v17 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10401 v1 = this->uActorQueueSize == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10402 v2 = this->uActorQueueSize < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10403 v13 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10404 if ( !(v2 | v1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10405 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10406 v3 = this->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10407 v18 = (char *)&pTurnEngine - (char *)this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10408 v14 = this->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10409 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10410 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10411 if ( (v3->uPackedID & 7) != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10412 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10413 v4 = v3->uPackedID >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10414 uActorID = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10415 v5 = &pActors[v4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10416 v6 = v5->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10417 if ( v6 != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10418 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10419 if ( v6 != 11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10420 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10421 if ( v6 != 19 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10422 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10423 if ( v6 != 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10424 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10425 v7 = (unsigned int *)&dword_4F6E08[v4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10426 a2 = *v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10427 v8 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10428 Actor::_401221(v4, (int *)v7, 1u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10429 memcpy(&v11, Actor::GetDirectionInfo(*(int *)((char *)&v3->uPackedID + v18), v8, &a3, 0), sizeof(v11));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10430 memcpy(&a4, &v11, sizeof(a4));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10431 v5->uCurrentActionTime += pMiscTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10432 if ( (signed int)v5->uCurrentActionTime >= v5->uCurrentActionLength )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10433 {
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
10434 if (v5->uAIState == Dying)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10435 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10436 v5->uCurrentActionTime = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10437 v5->uCurrentActionLength = 0;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
10438 v5->uAIState = Dead;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10439 v5->UpdateAnimation();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10440 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10441 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10442 if ( rand() % 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10443 Actor::_403EB6(uActorID, a2, 0x40u, &a4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10444 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10445 Actor::_402F87(uActorID, a2, &a4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10446 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10447 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10448 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10449 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10450 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10451 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10452 ++v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10453 v3 = v14 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10454 v9 = __OFSUB__(v17, v13->uActorQueueSize);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10455 v2 = v17 - v13->uActorQueueSize < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10456 ++v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10457 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10458 while ( v2 ^ v9 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10459 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10460 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10461
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10462 //----- (004070EF) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10463 bool __fastcall sub_4070EF_prolly_collide_objects(unsigned int uObjID, unsigned int uObj2ID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10464 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10465 signed int v2; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10466 unsigned int v3; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10467 signed int v4; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10468 int v5; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10469 signed int v6; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10470 int v7; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10471 float v8; // ST24_4@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10472 double v9; // ST18_8@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10473 signed int v10; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10474 int v11; // ecx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10475 signed int v12; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10476 int v13; // esi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10477 int v14; // esi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10478 int v15; // esi@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10479 signed int v16; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10480 int v17; // edi@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10481 int v18; // esi@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10482 int v19; // eax@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10483 float v20; // ST24_4@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10484 double v21; // ST18_8@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10485 signed int v22; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10486 int v23; // ebx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10487 signed int v24; // ecx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10488 int v25; // eax@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10489 int v26; // eax@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10490 BLVSector *v27; // edx@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10491 int v28; // ecx@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10492 BLVFace *v29; // ebx@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10493 Vec3_short_ *v30; // esi@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10494 int v31; // eax@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10495 int v32; // ST50_4@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10496 int v33; // ST54_4@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10497 int v34; // eax@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10498 char v35; // zf@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10499 int v36; // edi@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10500 int v37; // eax@45
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10501 signed int v38; // esi@45
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10502 int v39; // ST4C_4@49
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10503 signed __int64 v40; // qtt@50
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10504 __int16 v42; // bx@58
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10505 int v43; // [sp-8h] [bp-70h]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10506 int v44; // [sp-4h] [bp-6Ch]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10507 int v45; // [sp+Ch] [bp-5Ch]@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10508 __int16 v46; // [sp+10h] [bp-58h]@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10509 int v47; // [sp+18h] [bp-50h]@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10510 int v48; // [sp+1Ch] [bp-4Ch]@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10511 int v49; // [sp+20h] [bp-48h]@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10512 int v50; // [sp+24h] [bp-44h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10513 signed int v51; // [sp+24h] [bp-44h]@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10514 signed int v52; // [sp+28h] [bp-40h]@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10515 signed int v53; // [sp+2Ch] [bp-3Ch]@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10516 signed int v54; // [sp+30h] [bp-38h]@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10517 signed int v55; // [sp+34h] [bp-34h]@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10518 signed int v56; // [sp+38h] [bp-30h]@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10519 signed int v57; // [sp+3Ch] [bp-2Ch]@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10520 int v58; // [sp+44h] [bp-24h]@50
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10521 int v59; // [sp+48h] [bp-20h]@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10522 int v60; // [sp+50h] [bp-18h]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10523 signed int v61; // [sp+50h] [bp-18h]@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10524 int v62; // [sp+54h] [bp-14h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10525 int v63; // [sp+58h] [bp-10h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10526 int v64; // [sp+5Ch] [bp-Ch]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10527 int v65; // [sp+60h] [bp-8h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10528 int v66; // [sp+64h] [bp-4h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10529
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10530 v2 = (signed int)uObjID >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10531 v3 = (uObjID & 7) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10532 v4 = uObj2ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10533 if ( v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10534 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10535 v5 = v3 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10536 if ( v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10537 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10538 if ( v5 != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10539 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10540 v6 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10541 v63 = pLevelDecorations[v6].vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10542 v64 = pLevelDecorations[v6].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10543 v65 = pLevelDecorations[v6].vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10544 v7 = pIndoor->GetSector(v63, v64, v65);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10545 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10546 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10547 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10548 v63 = pActors[v2].vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10549 v64 = pActors[v2].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10550 v8 = (double)pActors[v2].uActorHeight * 0.69999999;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10551 v9 = v8 + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10552 v65 = LODWORD(v9) + pActors[v2].vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10553 v7 = pActors[v2].uSectorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10554 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10555 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10556 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10557 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10558 v10 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10559 v63 = pLayingItems[v10].vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10560 v64 = pLayingItems[v10].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10561 v11 = pLayingItems[v10].vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10562 v7 = pLayingItems[v10].uSectorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10563 v65 = v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10564 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10565 v66 = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10566 v12 = v4 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10567 v13 = (v4 & 7) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10568 if ( v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10569 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10570 v14 = v13 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10571 if ( v14 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10572 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10573 v15 = v14 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10574 if ( v15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10575 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10576 if ( v15 != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10577 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10578 v16 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10579 v17 = pLevelDecorations[v16].vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10580 v18 = pLevelDecorations[v16].vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10581 v44 = pLevelDecorations[v16].vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10582 v60 = pLevelDecorations[v16].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10583 v43 = pLevelDecorations[v16].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10584 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10585 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10586 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10587 v18 = pParty->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10588 v17 = pParty->sEyelevel + pParty->vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10589 v60 = pParty->vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10590 v44 = pParty->sEyelevel + pParty->vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10591 v43 = pParty->vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10592 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10593 v19 = pIndoor->GetSector(v18, v43, v44);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10594 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10595 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10596 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10597 v60 = pActors[v12].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10598 v18 = pActors[v12].vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10599 v20 = (double)pActors[v12].uActorHeight * 0.69999999;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10600 v21 = v20 + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10601 v17 = LODWORD(v21) + pActors[v12].vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10602 v19 = pActors[v12].uSectorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10603 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10604 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10605 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10606 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10607 v22 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10608 v18 = pLayingItems[v22].vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10609 v17 = pLayingItems[v22].vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10610 v60 = pLayingItems[v22].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10611 v19 = pLayingItems[v22].uSectorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10612 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10613 v62 = v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10614 v23 = v18 - v63;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10615 v50 = v17 - v65;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10616 v24 = sub_452A9E(v23 * v23 + (v60 - v64) * (v60 - v64) + v50 * v50);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10617 if ( v24 > 5120 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10618 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10619 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10620 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10621 v25 = 65536;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10622 if ( v24 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10623 v25 = 65536 / v24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10624 v49 = v23 * v25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10625 v47 = v50 * v25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10626 v48 = (v60 - v64) * v25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10627 v56 = v63;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10628 if ( v63 < v18 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10629 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10630 v55 = v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10631 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10632 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10633 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10634 v56 = v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10635 v55 = v63;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10636 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10637 v54 = v64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10638 if ( v64 < v60 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10639 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10640 v53 = v60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10641 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10642 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10643 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10644 v54 = v60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10645 v53 = v64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10646 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10647 v52 = v65;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10648 if ( v65 < v17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10649 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10650 v51 = v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10651 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10652 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10653 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10654 v52 = v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10655 v51 = v65;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10656 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10657 v57 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10658 v26 = v66;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10659 while ( 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10660 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10661 if ( v26 == v62 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10662 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10663 if ( v57 >= 30 || (v27 = pIndoor->pSectors, v28 = v66, v61 = 0, pIndoor->pSectors[v66].uNumPortals <= 0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10664 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10665 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10666 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10667 v29 = &pIndoor->pFaces[v27[v28].pPortals[v61]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10668 v30 = &pIndoor->pVertices[*v29->pVertexIDs];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10669 v45 = *(int *)&v30->x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10670 v46 = v30->z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10671 v31 = v29->pFacePlane_old.vNormal.z * (v46 - v65)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10672 + v29->pFacePlane_old.vNormal.y * (SHIWORD(v45) - v64)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10673 + v29->pFacePlane_old.vNormal.x * ((signed __int16)v45 - v63);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10674 if ( v66 != v29->uSectorID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10675 v31 = -v31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10676 if ( v31 >= 0 && (signed __int16)v45 != v63 && SHIWORD(v45) != v64 && v46 != v65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10677 || v56 > v29->pBounding.x2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10678 || v55 < v29->pBounding.x1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10679 || v54 > v29->pBounding.y2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10680 || v53 < v29->pBounding.y1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10681 || v52 > v29->pBounding.z2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10682 || v51 < v29->pBounding.z1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10683 goto LABEL_54;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10684 v32 = (unsigned __int64)(v49 * (signed __int64)v29->pFacePlane_old.vNormal.x) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10685 v33 = (unsigned __int64)(v47 * (signed __int64)v29->pFacePlane_old.vNormal.z) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10686 v34 = (unsigned __int64)(v48 * (signed __int64)v29->pFacePlane_old.vNormal.y) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10687 v35 = v32 + v33 + v34 == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10688 v36 = v32 + v33 + v34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10689 v59 = v32 + v33 + v34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10690 if ( v35 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10691 goto LABEL_53;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10692 v37 = v65 * v29->pFacePlane_old.vNormal.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10693 v38 = -(v29->pFacePlane_old.dist + v37 + v63 * v29->pFacePlane_old.vNormal.x + v64 * v29->pFacePlane_old.vNormal.y);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10694 if ( v36 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10695 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10696 if ( v29->pFacePlane_old.dist + v37 + v63 * v29->pFacePlane_old.vNormal.x + v64 * v29->pFacePlane_old.vNormal.y <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10697 goto LABEL_49;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10698 LABEL_53:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10699 v27 = pIndoor->pSectors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10700 LABEL_54:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10701 ++v61;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10702 if ( v61 >= v27[v28].uNumPortals )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10703 goto LABEL_55;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10704 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10705 if ( v29->pFacePlane_old.dist + v37 + v63 * v29->pFacePlane_old.vNormal.x + v64 * v29->pFacePlane_old.vNormal.y < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10706 goto LABEL_53;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10707 LABEL_49:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10708 v39 = abs(-(v29->pFacePlane_old.dist
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10709 + v37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10710 + v63 * v29->pFacePlane_old.vNormal.x
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10711 + v64 * v29->pFacePlane_old.vNormal.y)) >> 14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10712 if ( v39 > abs(v36)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10713 || (LODWORD(v40) = v38 << 16, HIDWORD(v40) = v38 >> 16, v58 = v40 / v59, (signed int)(v40 / v59) < 0)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10714 || !sub_4075DB(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10715 v63 + ((signed int)(((unsigned __int64)(v58 * (signed __int64)v49) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10716 v64 + ((signed int)(((unsigned __int64)(v58 * (signed __int64)v48) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10717 v65 + ((signed int)(((unsigned __int64)(v58 * (signed __int64)v47) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10718 v29) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10719 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10720 v28 = v66;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10721 goto LABEL_53;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10722 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10723 if ( v29->uSectorID == v66 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10724 v42 = v29->uBackSectorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10725 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10726 v42 = v29->uSectorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10727 v26 = v42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10728 if ( v42 != v66 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10729 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10730 ++v57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10731 v66 = v42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10732 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10733 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10734 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10735 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10736 LABEL_55:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10737 if ( v66 != v62 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10738 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10739 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10740 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10741
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10742 //----- (004075DB) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10743 bool __fastcall sub_4075DB(int a1, int a2, int a3, BLVFace *a4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10744 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10745 BLVFace *v4; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10746 unsigned int v5; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10747 signed int v6; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10748 char v7; // zf@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10749 int v8; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10750 Vec3_short_ *v9; // ecx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10751 int v10; // edx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10752 signed int v11; // esi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10753 Vec3_short_ *v12; // ecx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10754 int v13; // edx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10755 signed int v14; // esi@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10756 Vec3_short_ *v15; // ecx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10757 int v16; // edx@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10758 int v17; // eax@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10759 bool v18; // esi@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10760 int v19; // ecx@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10761 int v20; // ecx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10762 int v21; // edx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10763 int v22; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10764 signed int v23; // ebx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10765 int v24; // esi@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10766 signed int v25; // eax@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10767 signed __int64 v26; // qtt@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10768 bool result; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10769 int v28; // [sp+8h] [bp-14h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10770 int v29; // [sp+10h] [bp-Ch]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10771 signed int a3a; // [sp+24h] [bp+8h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10772 int a4a; // [sp+28h] [bp+Ch]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10773
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10774 v4 = a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10775 v5 = a4->uAttributes;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10776 if ( v5 & 0x100 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10777 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10778 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10779 v7 = a4->uNumVertices == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10780 a4a = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10781 v8 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10782 if ( !v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10783 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10784 v9 = pIndoor->pVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10785 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10786 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10787 dword_4F5D98_xs[v6] = v9[v4->pVertexIDs[v6]].x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10788 v10 = v4->pVertexIDs[v6++];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10789 dword_4F5CC4_ys[v6] = v9[v10].y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10790 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10791 while ( v6 < v4->uNumVertices );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10792 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10793 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10794 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10795 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10796 v8 = a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10797 if ( v5 & 0x200 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10798 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10799 v11 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10800 v7 = a4->uNumVertices == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10801 a4a = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10802 if ( !v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10803 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10804 v12 = pIndoor->pVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10805 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10806 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10807 dword_4F5D98_xs[v11] = v12[v4->pVertexIDs[v11]].x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10808 v13 = v4->pVertexIDs[v11++];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10809 dword_4F5CC4_ys[v11] = v12[v13].z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10810 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10811 while ( v11 < v4->uNumVertices );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10812 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10813 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10814 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10815 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10816 v14 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10817 v7 = a4->uNumVertices == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10818 a4a = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10819 if ( !v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10820 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10821 v15 = pIndoor->pVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10822 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10823 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10824 dword_4F5D98_xs[v14] = v15[v4->pVertexIDs[v14]].y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10825 v16 = v4->pVertexIDs[v14++];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10826 dword_4F5CC4_ys[v14] = v15[v16].z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10827 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10828 while ( v14 < v4->uNumVertices );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10829 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10830 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10831 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10832 v17 = v4->uNumVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10833 a3a = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10834 dword_4F5D98_xs[v17] = dword_4F5D98_xs[0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10835 dword_4F5CC4_ys[v17 + 1] = dword_4F5CC4_ys[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10836 v28 = v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10837 v18 = dword_4F5CC4_ys[1] >= v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10838 v19 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10839 v29 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10840 if ( v17 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10841 goto LABEL_29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10842 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10843 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10844 if ( a3a >= 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10845 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10846 v20 = v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10847 v21 = dword_4F5CC4_ys[v20 + 2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10848 if ( v18 ^ v21 >= v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10849 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10850 v22 = dword_4F5D98_xs[v20 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10851 if ( v22 >= a4a )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10852 v23 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10853 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10854 v23 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10855 v24 = v23 | dword_4F5D98_xs[v20] < a4a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10856 if ( v24 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10857 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10858 if ( !v24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10859 || (v25 = v22 - dword_4F5D98_xs[v20],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10860 LODWORD(v26) = v25 << 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10861 HIDWORD(v26) = v25 >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10862 dword_4F5D98_xs[v20]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10863 + ((signed int)(((unsigned __int64)(v26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10864 / (v21 - dword_4F5CC4_ys[v20 + 1])
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10865 * ((v8 - dword_4F5CC4_ys[v20 + 1]) << 16)) >> 16)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10866 + 32768) >> 16) >= a4a) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10867 ++a3a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10868 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10869 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10870 v18 = v21 >= v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10871 v19 = v29++ + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10872 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10873 while ( v29 < v28 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10874 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10875 if ( a3a != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10876 LABEL_29:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10877 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10878 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10879 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10880
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10881 //----- (004077F1) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10882 bool __fastcall sub_4077F1(int a1, int a2, int a3, ODMFace *a4, BSPVertexBuffer *a5)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10883 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10884 ODMFace *v5; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10885 unsigned int v6; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10886 signed int v7; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10887 char v8; // zf@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10888 unsigned __int16 *v9; // edx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10889 int v10; // ecx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10890 unsigned __int16 *v11; // edx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10891 int v12; // ecx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10892 int v13; // edx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10893 int v14; // ecx@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10894 int v15; // esi@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10895 bool v16; // edi@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10896 int v17; // ecx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10897 int v18; // edx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10898 int v19; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10899 signed int v20; // ebx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10900 int v21; // edi@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10901 signed int v22; // eax@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10902 signed __int64 v23; // qtt@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10903 bool result; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10904 int v25; // [sp+14h] [bp-8h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10905 int a4a; // [sp+28h] [bp+Ch]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10906 signed int a5a; // [sp+2Ch] [bp+10h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10907
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10908 v5 = a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10909 v6 = a4->uFaceAttributes;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10910 v7 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10911 if ( v6 & 0x100 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10912 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10913 v8 = a4->uNumVertices == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10914 a4a = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10915 a3 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10916 if ( !v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10917 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10918 v9 = v5->pVertexIDs;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10919 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10920 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10921 ++v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10922 dword_4F5BF4_xs[v7] = a5->pVertices[*v9].x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10923 v10 = *v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10924 ++v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10925 dword_4F5B24_ys[v7] = a5->pVertices[v10].y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10926 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10927 while ( v7 < v5->uNumVertices );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10928 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10929 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10930 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10931 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10932 if ( v6 & 0x200 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10933 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10934 v8 = a4->uNumVertices == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10935 a4a = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10936 if ( !v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10937 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10938 v11 = v5->pVertexIDs;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10939 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10940 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10941 ++v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10942 dword_4F5BF4_xs[v7] = a5->pVertices[*v11].x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10943 v12 = *v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10944 ++v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10945 dword_4F5B24_ys[v7] = a5->pVertices[v12].z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10946 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10947 while ( v7 < v5->uNumVertices );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10948 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10949 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10950 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10951 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10952 v8 = a4->uNumVertices == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10953 a4a = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10954 if ( !v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10955 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10956 v13 = (int)v5->pVertexIDs;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10957 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10958 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10959 ++v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10960 dword_4F5BF4_xs[v7] = a5->pVertices[*(short *)v13].y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10961 v14 = *(short *)v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10962 v13 += 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10963 dword_4F5B24_ys[v7] = a5->pVertices[v14].z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10964 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10965 while ( v7 < v5->uNumVertices );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10966 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10967 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10968 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10969 v15 = v5->uNumVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10970 a5a = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10971 dword_4F5BF4_xs[v15 + 1] = dword_4F5BF4_xs[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10972 dword_4F5B24_ys[v15 + 1] = dword_4F5B24_ys[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10973 v25 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10974 v16 = dword_4F5B24_ys[1] >= a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10975 if ( v15 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10976 goto LABEL_29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10977 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10978 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10979 if ( a5a >= 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10980 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10981 v17 = v25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10982 v18 = dword_4F5B24_ys[v25 + 2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10983 if ( v16 ^ v18 >= a3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10984 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10985 v19 = dword_4F5BF4_xs[v17 + 2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10986 if ( v19 >= a4a )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10987 v20 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10988 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10989 v20 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10990 v21 = v20 | dword_4F5BF4_xs[v17 + 1] < a4a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10991 if ( v21 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10992 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10993 if ( !v21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10994 || (v22 = v19 - dword_4F5BF4_xs[v17 + 1],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10995 LODWORD(v23) = v22 << 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10996 HIDWORD(v23) = v22 >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10997 dword_4F5BF4_xs[v17 + 1]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10998 + ((signed int)(((unsigned __int64)(v23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10999 / (v18 - dword_4F5B24_ys[v17 + 1])
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11000 * ((a3 - dword_4F5B24_ys[v17 + 1]) << 16)) >> 16)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11001 + 32768) >> 16) >= a4a) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11002 ++a5a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11003 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11004 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11005 ++v25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11006 v16 = v18 >= a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11007 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11008 while ( v25 < v15 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11009 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11010 if ( a5a != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11011 LABEL_29:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11012 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11013 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11014 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11015
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11016 //----- (00407A1C) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11017 bool __fastcall sub_407A1C(int x, int z, int y, Vec3_int_ v)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11018 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11019 unsigned int v4; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11020 Vec3_int_ v5; // ST08_12@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11021 int v6; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11022 int v7; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11023 int v8; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11024 signed int v9; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11025 int v10; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11026 int v11; // ecx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11027 int v12; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11028 int v13; // ebx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11029 int v14; // edx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11030 char *v15; // edi@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11031 ODMFace *v16; // esi@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11032 int v17; // ST34_4@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11033 int v18; // ST38_4@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11034 int v19; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11035 char v20; // zf@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11036 int v21; // ebx@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11037 int v22; // eax@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11038 signed int v23; // edi@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11039 int v24; // ST34_4@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11040 signed __int64 v25; // qtt@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11041 int v26; // eax@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11042 Vec3_int_ v27; // ST08_12@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11043 Vec3_int_ v28; // ST08_12@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11044 int v29; // edi@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11045 int v30; // ebx@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11046 int v31; // esi@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11047 signed int v32; // ecx@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11048 int v33; // eax@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11049 int v34; // ecx@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11050 int v35; // eax@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11051 int v36; // ebx@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11052 int v37; // edx@41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11053 char *v38; // edi@51
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11054 ODMFace *v39; // esi@54
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11055 int v40; // ebx@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11056 int v41; // eax@61
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11057 signed int v42; // edi@61
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11058 signed __int64 v43; // qtt@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11059 int v44; // eax@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11060 Vec3_int_ v45; // ST08_12@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11061 int v46; // edi@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11062 int v47; // ebx@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11063 int v48; // esi@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11064 signed int v49; // ecx@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11065 int v50; // eax@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11066 int v51; // edx@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11067 int v52; // ecx@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11068 int v53; // eax@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11069 int v54; // ebx@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11070 int v55; // edi@77
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11071 int v56; // ecx@77
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11072 int v57; // eax@81
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11073 int v58; // esi@81
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11074 int v59; // eax@90
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11075 BLVSector *v60; // edx@90
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11076 int v61; // ecx@90
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11077 BLVFace *v62; // esi@91
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11078 int v63; // ST34_4@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11079 int v64; // ST30_4@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11080 int v65; // eax@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11081 int v66; // ebx@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11082 int v67; // eax@99
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11083 signed int v68; // edi@99
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11084 int v69; // ST2C_4@103
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11085 signed __int64 v70; // qtt@104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11086 int v71; // eax@104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11087 Vec3_int_ v72; // ST08_12@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11088 Vec3_int_ v73; // ST08_12@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11089 int v74; // edi@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11090 int v75; // ebx@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11091 int v76; // esi@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11092 signed int v77; // ecx@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11093 int v78; // eax@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11094 int v79; // edx@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11095 int v80; // ecx@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11096 int v81; // eax@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11097 int v82; // ebx@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11098 int v83; // edi@115
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11099 int v84; // ecx@115
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11100 int v85; // eax@119
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11101 int v86; // esi@119
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11102 int v87; // ecx@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11103 BLVSector *v88; // eax@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11104 int v89; // ecx@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11105 BLVFace *v90; // esi@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11106 int v91; // ebx@136
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11107 int v92; // eax@137
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11108 signed int v93; // edi@137
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11109 signed __int64 v94; // qtt@142
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11110 int v95; // eax@142
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11111 Vec3_int_ v97; // [sp-18h] [bp-94h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11112 int v98; // [sp-Ch] [bp-88h]@88
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11113 int v99; // [sp-Ch] [bp-88h]@126
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11114 int v100; // [sp-8h] [bp-84h]@88
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11115 int v101; // [sp-8h] [bp-84h]@126
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11116 int v102; // [sp-4h] [bp-80h]@88
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11117 int v103; // [sp-4h] [bp-80h]@126
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11118 int v104; // [sp+Ch] [bp-70h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11119 int v105; // [sp+Ch] [bp-70h]@48
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11120 int v106; // [sp+10h] [bp-6Ch]@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11121 int v107; // [sp+10h] [bp-6Ch]@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11122 int v108; // [sp+10h] [bp-6Ch]@104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11123 int v109; // [sp+18h] [bp-64h]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11124 int v110; // [sp+18h] [bp-64h]@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11125 int i; // [sp+18h] [bp-64h]@90
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11126 int v112; // [sp+18h] [bp-64h]@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11127 signed int v113; // [sp+20h] [bp-5Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11128 signed int v114; // [sp+24h] [bp-58h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11129 unsigned __int64 a4; // [sp+28h] [bp-54h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11130 unsigned int a4_8; // [sp+30h] [bp-4Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11131 int v117; // [sp+34h] [bp-48h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11132 int v118; // [sp+34h] [bp-48h]@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11133 int v119; // [sp+34h] [bp-48h]@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11134 int v120; // [sp+34h] [bp-48h]@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11135 int v121; // [sp+38h] [bp-44h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11136 int v122; // [sp+38h] [bp-44h]@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11137 int v123; // [sp+38h] [bp-44h]@76
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11138 int v124; // [sp+38h] [bp-44h]@114
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11139 int v125; // [sp+3Ch] [bp-40h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11140 int v126; // [sp+3Ch] [bp-40h]@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11141 int v127; // [sp+3Ch] [bp-40h]@77
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11142 int v128; // [sp+3Ch] [bp-40h]@115
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11143 int v129; // [sp+40h] [bp-3Ch]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11144 int v130; // [sp+40h] [bp-3Ch]@46
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11145 int v131; // [sp+40h] [bp-3Ch]@78
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11146 int v132; // [sp+40h] [bp-3Ch]@116
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11147 int v133; // [sp+44h] [bp-38h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11148 int v134; // [sp+44h] [bp-38h]@45
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11149 int v135; // [sp+44h] [bp-38h]@81
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11150 int v136; // [sp+44h] [bp-38h]@119
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11151 int v137; // [sp+48h] [bp-34h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11152 int v138; // [sp+48h] [bp-34h]@42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11153 int v139; // [sp+48h] [bp-34h]@82
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11154 int v140; // [sp+48h] [bp-34h]@120
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11155 int v141; // [sp+4Ch] [bp-30h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11156 int v142; // [sp+4Ch] [bp-30h]@41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11157 int v143; // [sp+4Ch] [bp-30h]@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11158 int v144; // [sp+4Ch] [bp-30h]@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11159 int v145; // [sp+50h] [bp-2Ch]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11160 int v146; // [sp+50h] [bp-2Ch]@40
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11161 int v147; // [sp+50h] [bp-2Ch]@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11162 int v148; // [sp+50h] [bp-2Ch]@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11163 int v149; // [sp+54h] [bp-28h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11164 int v150; // [sp+54h] [bp-28h]@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11165 int v151; // [sp+54h] [bp-28h]@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11166 int v152; // [sp+54h] [bp-28h]@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11167 int sDepth; // [sp+58h] [bp-24h]@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11168 int sDeptha; // [sp+58h] [bp-24h]@52
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11169 int sDepthb; // [sp+58h] [bp-24h]@90
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11170 char *a5; // [sp+5Ch] [bp-20h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11171 char *a5a; // [sp+5Ch] [bp-20h]@51
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11172 signed int a5b; // [sp+5Ch] [bp-20h]@83
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11173 signed int a5c; // [sp+5Ch] [bp-20h]@121
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11174 signed int v160; // [sp+60h] [bp-1Ch]@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11175 signed int v161; // [sp+60h] [bp-1Ch]@47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11176 int v162; // [sp+60h] [bp-1Ch]@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11177 int v163; // [sp+64h] [bp-18h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11178 int outx; // [sp+68h] [bp-14h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11179 int outy; // [sp+6Ch] [bp-10h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11180 int outz; // [sp+70h] [bp-Ch]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11181 Vec3_int_ pOut; // [sp+74h] [bp-8h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11182 int ya; // [sp+84h] [bp+8h]@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11183 int yb; // [sp+84h] [bp+8h]@136
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11184 int ve; // [sp+88h] [bp+Ch]@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11185 int va; // [sp+88h] [bp+Ch]@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11186 int vb; // [sp+88h] [bp+Ch]@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11187 int vf; // [sp+88h] [bp+Ch]@136
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11188 int vc; // [sp+88h] [bp+Ch]@136
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11189 int vd; // [sp+88h] [bp+Ch]@142
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11190 int v_4; // [sp+8Ch] [bp+10h]@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11191 int v_4a; // [sp+8Ch] [bp+10h]@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11192 int v_4b; // [sp+8Ch] [bp+10h]@136
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11193 int v_4c; // [sp+8Ch] [bp+10h]@141
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11194 int v_8; // [sp+90h] [bp+14h]@53
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11195
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11196 a4 = __PAIR__(z, x);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11197 v4 = stru_5C6E00->Atan2(v.x - x, v.y - z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11198 v114 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11199 v97.z = y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11200 v113 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11201 a4_8 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11202 *(_QWORD *)&v97.x = a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11203 if ( uCurrentlyLoadedLevelType != LEVEL_Outdoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11204 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11205 Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v97, &pOut.x, &pOut.y, &outz);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11206 v45.z = v.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11207 *(_QWORD *)&v45.x = *(_QWORD *)&v;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11208 Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v45, &outx, &outy, &v163);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11209 v46 = outy - pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11210 v47 = v163 - outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11211 v48 = outx - pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11212 v49 = sub_452A9E(v48 * v48 + v46 * v46 + v47 * v47);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11213 v50 = 65536;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11214 if ( v49 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11215 v50 = 65536 / v49;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11216 v51 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11217 v143 = v48 * v50;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11218 v52 = v46 * v50;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11219 v53 = v47 * v50;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11220 v54 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11221 v147 = v52;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11222 v151 = v53;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11223 v119 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11224 if ( pOut.x < outx )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11225 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11226 v123 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11227 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11228 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11229 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11230 v119 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11231 v123 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11232 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11233 v55 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11234 v56 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11235 v127 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11236 if ( pOut.y < outy )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11237 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11238 v131 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11239 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11240 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11241 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11242 v127 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11243 v131 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11244 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11245 v57 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11246 v58 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11247 v135 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11248 if ( outz < v163 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11249 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11250 v139 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11251 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11252 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11253 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11254 v135 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11255 v139 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11256 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11257 a5b = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11258 while ( !v114 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11259 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11260 if ( a5b )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11261 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11262 v102 = v58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11263 v100 = v55;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11264 v98 = v54;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11265 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11266 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11267 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11268 v102 = v57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11269 v100 = v56;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11270 v98 = v51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11271 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11272 v59 = pIndoor->GetSector(v98, v100, v102);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11273 v60 = pIndoor->pSectors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11274 v61 = 116 * v59;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11275 sDepthb = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11276 for ( i = 116 * v59;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11277 sDepthb < *(__int16 *)((char *)&pIndoor->pSectors->field_C + v61)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11278 + 2 * *(__int16 *)((char *)&pIndoor->pSectors->field_4 + v61);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11279 ++sDepthb )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11280 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11281 v62 = &pIndoor->pFaces[(*(unsigned __int16 **)((char *)&v60->pWalls + v61))[sDepthb]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11282 if ( v62->uAttributes & 1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11283 || v119 > v62->pBounding.x2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11284 || v123 < v62->pBounding.x1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11285 || v127 > v62->pBounding.y2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11286 || v131 < v62->pBounding.y1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11287 || v135 > v62->pBounding.z2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11288 || v139 < v62->pBounding.z1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11289 || (v63 = (unsigned __int64)(v143 * (signed __int64)v62->pFacePlane_old.vNormal.x) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11290 v64 = (unsigned __int64)(v151 * (signed __int64)v62->pFacePlane_old.vNormal.z) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11291 v65 = (unsigned __int64)(v147 * (signed __int64)v62->pFacePlane_old.vNormal.y) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11292 v20 = v63 + v64 + v65 == 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11293 v66 = v63 + v64 + v65,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11294 v107 = v63 + v64 + v65,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11295 v20) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11296 goto LABEL_107;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11297 v67 = outz * v62->pFacePlane_old.vNormal.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11298 v68 = -(v62->pFacePlane_old.dist
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11299 + v67
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11300 + pOut.y * v62->pFacePlane_old.vNormal.y
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11301 + pOut.x * v62->pFacePlane_old.vNormal.x);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11302 if ( v66 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11303 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11304 if ( v62->pFacePlane_old.dist
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11305 + v67
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11306 + pOut.y * v62->pFacePlane_old.vNormal.y
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11307 + pOut.x * v62->pFacePlane_old.vNormal.x < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11308 goto LABEL_107;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11309 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11310 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11311 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11312 if ( v62->pFacePlane_old.dist
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11313 + v67
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11314 + pOut.y * v62->pFacePlane_old.vNormal.y
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11315 + pOut.x * v62->pFacePlane_old.vNormal.x > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11316 goto LABEL_107;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11317 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11318 v69 = abs(-(v62->pFacePlane_old.dist
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11319 + v67
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11320 + pOut.y * v62->pFacePlane_old.vNormal.y
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11321 + pOut.x * v62->pFacePlane_old.vNormal.x)) >> 14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11322 if ( v69 <= abs(v66) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11323 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11324 LODWORD(v70) = v68 << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11325 HIDWORD(v70) = v68 >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11326 v71 = v70 / v107;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11327 v108 = v70 / v107;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11328 if ( v71 >= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11329 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11330 if ( sub_4075DB(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11331 pOut.x + ((signed int)(((unsigned __int64)(v108 * (signed __int64)v143) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11332 pOut.y + ((signed int)(((unsigned __int64)(v108 * (signed __int64)v147) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11333 outz + ((signed int)(((unsigned __int64)(v108 * (signed __int64)v151) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11334 v62) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11335 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11336 v114 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11337 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11338 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11339 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11340 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11341 v61 = i;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11342 LABEL_107:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11343 v60 = pIndoor->pSectors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11344 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11345 ++a5b;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11346 if ( a5b >= 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11347 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11348 v57 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11349 v56 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11350 v51 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11351 v58 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11352 v55 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11353 v54 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11354 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11355 v72.z = y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11356 *(_QWORD *)&v72.x = a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11357 Vec3_int_::Rotate(32, a4_8 - stru_5C6E00->uIntegerHalfPi, 0, v72, &pOut.x, &pOut.y, &outz);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11358 v73.z = v.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11359 *(_QWORD *)&v73.x = *(_QWORD *)&v;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11360 Vec3_int_::Rotate(32, a4_8 - stru_5C6E00->uIntegerHalfPi, 0, v73, &outx, &outy, &v163);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11361 v74 = outy - pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11362 v75 = v163 - outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11363 v76 = outx - pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11364 v77 = sub_452A9E(v76 * v76 + v74 * v74 + v75 * v75);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11365 v78 = 65536;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11366 if ( v77 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11367 v78 = 65536 / v77;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11368 v79 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11369 v144 = v76 * v78;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11370 v80 = v74 * v78;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11371 v81 = v75 * v78;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11372 v82 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11373 v148 = v80;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11374 v152 = v81;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11375 v120 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11376 if ( pOut.x < outx )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11377 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11378 v124 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11379 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11380 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11381 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11382 v120 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11383 v124 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11384 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11385 v83 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11386 v84 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11387 v128 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11388 if ( pOut.y < outy )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11389 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11390 v132 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11391 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11392 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11393 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11394 v128 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11395 v132 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11396 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11397 v85 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11398 v86 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11399 v136 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11400 if ( outz < v163 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11401 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11402 v140 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11403 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11404 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11405 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11406 v136 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11407 v140 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11408 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11409 a5c = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11410 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11411 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11412 if ( v113 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11413 return !v114 || !v113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11414 if ( a5c )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11415 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11416 v103 = v86;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11417 v101 = v83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11418 v99 = v82;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11419 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11420 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11421 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11422 v103 = v85;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11423 v101 = v84;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11424 v99 = v79;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11425 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11426 v87 = pIndoor->GetSector(v99, v101, v103);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11427 v88 = pIndoor->pSectors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11428 v89 = 116 * v87;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11429 v162 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11430 v112 = v89;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11431 if ( *(__int16 *)((char *)&pIndoor->pSectors->field_C + v89)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11432 + 2 * *(__int16 *)((char *)&pIndoor->pSectors->field_4 + v89) > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11433 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11434 LABEL_148:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11435 ++a5c;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11436 if ( a5c >= 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11437 return !v114 || !v113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11438 v85 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11439 v84 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11440 v79 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11441 v86 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11442 v83 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11443 v82 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11444 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11445 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11446 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11447 v90 = &pIndoor->pFaces[(*(unsigned __int16 **)((char *)&v88->pWalls + v89))[v162]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11448 if ( v90->uAttributes & 1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11449 || v120 > v90->pBounding.x2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11450 || v124 < v90->pBounding.x1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11451 || v128 > v90->pBounding.y2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11452 || v132 < v90->pBounding.y1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11453 || v136 > v90->pBounding.z2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11454 || v140 < v90->pBounding.z1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11455 || (yb = (unsigned __int64)(v144 * (signed __int64)v90->pFacePlane_old.vNormal.x) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11456 v_4b = (unsigned __int64)(v148 * (signed __int64)v90->pFacePlane_old.vNormal.y) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11457 vf = (unsigned __int64)(v152 * (signed __int64)v90->pFacePlane_old.vNormal.z) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11458 v20 = yb + vf + v_4b == 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11459 v91 = yb + vf + v_4b,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11460 vc = yb + vf + v_4b,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11461 v20) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11462 goto LABEL_145;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11463 v92 = outz * v90->pFacePlane_old.vNormal.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11464 v93 = -(v90->pFacePlane_old.dist
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11465 + v92
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11466 + pOut.y * v90->pFacePlane_old.vNormal.y
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11467 + pOut.x * v90->pFacePlane_old.vNormal.x);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11468 if ( v91 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11469 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11470 if ( v90->pFacePlane_old.dist
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11471 + v92
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11472 + pOut.y * v90->pFacePlane_old.vNormal.y
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11473 + pOut.x * v90->pFacePlane_old.vNormal.x < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11474 goto LABEL_145;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11475 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11476 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11477 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11478 if ( v90->pFacePlane_old.dist
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11479 + v92
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11480 + pOut.y * v90->pFacePlane_old.vNormal.y
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11481 + pOut.x * v90->pFacePlane_old.vNormal.x > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11482 goto LABEL_145;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11483 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11484 v_4c = abs(-(v90->pFacePlane_old.dist
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11485 + v92
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11486 + pOut.y * v90->pFacePlane_old.vNormal.y
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11487 + pOut.x * v90->pFacePlane_old.vNormal.x)) >> 14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11488 if ( v_4c <= abs(v91) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11489 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11490 LODWORD(v94) = v93 << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11491 HIDWORD(v94) = v93 >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11492 v95 = v94 / vc;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11493 vd = v94 / vc;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11494 if ( v95 >= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11495 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11496 if ( sub_4075DB(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11497 pOut.x + ((signed int)(((unsigned __int64)(vd * (signed __int64)v144) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11498 pOut.y + ((signed int)(((unsigned __int64)(vd * (signed __int64)v148) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11499 outz + ((signed int)(((unsigned __int64)(vd * (signed __int64)v152) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11500 v90) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11501 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11502 v113 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11503 goto LABEL_148;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11504 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11505 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11506 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11507 v89 = v112;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11508 LABEL_145:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11509 v88 = pIndoor->pSectors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11510 ++v162;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11511 if ( v162 >= *(__int16 *)((char *)&pIndoor->pSectors->field_C + v89)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11512 + 2 * *(__int16 *)((char *)&pIndoor->pSectors->field_4 + v89) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11513 goto LABEL_148;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11514 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11515 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11516 Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v97, &pOut.x, &pOut.y, &outz);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11517 v5.z = v.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11518 *(_QWORD *)&v5.x = *(_QWORD *)&v;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11519 Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v5, &outx, &outy, &v163);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11520 v6 = outy - pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11521 v7 = v163 - outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11522 v8 = outx - pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11523 v9 = sub_452A9E(v8 * v8 + v6 * v6 + v7 * v7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11524 v10 = 65536;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11525 if ( v9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11526 v10 = 65536 / v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11527 v125 = v8 * v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11528 v11 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11529 v12 = v7 * v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11530 v13 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11531 v117 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11532 v121 = v6 * v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11533 v149 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11534 if ( pOut.x < outx )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11535 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11536 v145 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11537 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11538 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11539 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11540 v149 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11541 v145 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11542 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11543 v14 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11544 v141 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11545 if ( pOut.y < outy )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11546 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11547 v137 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11548 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11549 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11550 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11551 v141 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11552 v137 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11553 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11554 v133 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11555 if ( outz < v163 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11556 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11557 v129 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11558 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11559 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11560 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11561 v133 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11562 v129 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11563 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11564 v160 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11565 if ( (signed int)pOutdoor->uNumBModels > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11566 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11567 v104 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11568 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11569 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11570 v15 = (char *)&pOutdoor->pBModels[v104].pVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11571 a5 = (char *)&pOutdoor->pBModels[v104].pVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11572 if ( sub_4088E9(v13, pOut.y, outx, v14, pOutdoor->pBModels[v104].vPosition.x, pOutdoor->pBModels[v104].vPosition.y) <= pOutdoor->pBModels[v104].sBoundingRadius + 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11573 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11574 sDepth = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11575 if ( *((int *)v15 + 2) > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11576 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11577 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11578 LABEL_36:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11579 ++v160;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11580 ++v104;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11581 if ( v160 >= (signed int)pOutdoor->uNumBModels )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11582 goto LABEL_37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11583 v14 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11584 v13 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11585 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11586 v106 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11587 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11588 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11589 v16 = (ODMFace *)(v106 + *((int *)a5 + 4));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11590 if ( v149 > v16->pBoundingBox.x2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11591 || v145 < v16->pBoundingBox.x1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11592 || v141 > v16->pBoundingBox.y2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11593 || v137 < v16->pBoundingBox.y1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11594 || v133 > v16->pBoundingBox.z2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11595 || v129 < v16->pBoundingBox.z1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11596 || (v17 = (unsigned __int64)(v125 * (signed __int64)v16->pFacePlane.vNormal.x) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11597 v18 = (unsigned __int64)(v121 * (signed __int64)v16->pFacePlane.vNormal.y) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11598 v19 = (unsigned __int64)(v117 * (signed __int64)v16->pFacePlane.vNormal.z) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11599 v20 = v17 + v18 + v19 == 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11600 v21 = v17 + v18 + v19,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11601 v109 = v17 + v18 + v19,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11602 v20) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11603 goto LABEL_33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11604 v22 = pOut.y * v16->pFacePlane.vNormal.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11605 v23 = -(v16->pFacePlane.dist + v22 + outz * v16->pFacePlane.vNormal.z + pOut.x * v16->pFacePlane.vNormal.x);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11606 if ( v21 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11607 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11608 if ( v16->pFacePlane.dist + v22 + outz * v16->pFacePlane.vNormal.z + pOut.x * v16->pFacePlane.vNormal.x < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11609 goto LABEL_33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11610 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11611 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11612 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11613 if ( v16->pFacePlane.dist + v22 + outz * v16->pFacePlane.vNormal.z + pOut.x * v16->pFacePlane.vNormal.x > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11614 goto LABEL_33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11615 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11616 v24 = abs(-(v16->pFacePlane.dist + v22 + outz * v16->pFacePlane.vNormal.z + pOut.x * v16->pFacePlane.vNormal.x)) >> 14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11617 if ( v24 <= abs(v21) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11618 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11619 LODWORD(v25) = v23 << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11620 HIDWORD(v25) = v23 >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11621 v26 = v25 / v109;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11622 v110 = v25 / v109;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11623 if ( v26 >= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11624 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11625 if ( sub_4077F1(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11626 pOut.x + ((signed int)(((unsigned __int64)(v110 * (signed __int64)v125) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11627 pOut.y + ((signed int)(((unsigned __int64)(v110 * (signed __int64)v121) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11628 outz + ((signed int)(((unsigned __int64)(v110 * (signed __int64)v117) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11629 v16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11630 (BSPVertexBuffer *)a5) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11631 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11632 v114 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11633 goto LABEL_36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11634 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11635 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11636 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11637 LABEL_33:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11638 ++sDepth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11639 v106 += 308;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11640 if ( sDepth >= *((int *)a5 + 2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11641 goto LABEL_36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11642 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11643 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11644 LABEL_37:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11645 v27.z = y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11646 *(_QWORD *)&v27.x = a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11647 Vec3_int_::Rotate(32, a4_8 - stru_5C6E00->uIntegerHalfPi, 0, v27, &pOut.x, &pOut.y, &outz);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11648 v28.z = v.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11649 *(_QWORD *)&v28.x = *(_QWORD *)&v;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11650 Vec3_int_::Rotate(32, a4_8 - stru_5C6E00->uIntegerHalfPi, 0, v28, &outx, &outy, &v163);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11651 v29 = outy - pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11652 v30 = v163 - outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11653 v31 = outx - pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11654 v32 = sub_452A9E(v31 * v31 + v29 * v29 + v30 * v30);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11655 v33 = 65536;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11656 if ( v32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11657 v33 = 65536 / v32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11658 v126 = v31 * v33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11659 v34 = v33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11660 v35 = v30 * v33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11661 v36 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11662 v118 = v35;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11663 v122 = v29 * v34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11664 v150 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11665 if ( pOut.x < outx )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11666 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11667 v146 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11668 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11669 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11670 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11671 v150 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11672 v146 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11673 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11674 v37 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11675 v142 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11676 if ( pOut.y < outy )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11677 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11678 v138 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11679 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11680 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11681 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11682 v142 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11683 v138 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11684 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11685 v134 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11686 if ( outz < v163 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11687 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11688 v130 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11689 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11690 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11691 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11692 v134 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11693 v130 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11694 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11695 v161 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11696 if ( (signed int)pOutdoor->uNumBModels > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11697 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11698 v105 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11699 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11700 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11701 v38 = (char *)&pOutdoor->pBModels[v105].pVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11702 a5a = (char *)&pOutdoor->pBModels[v105].pVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11703 if ( sub_4088E9(v36, pOut.y, outx, v37, pOutdoor->pBModels[v105].vPosition.x, pOutdoor->pBModels[v105].vPosition.y) <= pOutdoor->pBModels[v105].sBoundingRadius + 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11704 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11705 sDeptha = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11706 if ( *((int *)v38 + 2) > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11707 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11708 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11709 LABEL_71:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11710 ++v161;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11711 ++v105;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11712 if ( v161 >= (signed int)pOutdoor->uNumBModels )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11713 return !v114 || !v113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11714 v37 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11715 v36 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11716 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11717 v_8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11718 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11719 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11720 v39 = (ODMFace *)(v_8 + *((int *)a5a + 4));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11721 if ( v150 > v39->pBoundingBox.x2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11722 || v146 < v39->pBoundingBox.x1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11723 || v142 > v39->pBoundingBox.y2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11724 || v138 < v39->pBoundingBox.y1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11725 || v134 > v39->pBoundingBox.z2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11726 || v130 < v39->pBoundingBox.z1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11727 || (ya = (unsigned __int64)(v126 * (signed __int64)v39->pFacePlane.vNormal.x) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11728 ve = (unsigned __int64)(v122 * (signed __int64)v39->pFacePlane.vNormal.y) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11729 v_4 = (unsigned __int64)(v118 * (signed __int64)v39->pFacePlane.vNormal.z) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11730 v20 = ya + ve + v_4 == 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11731 v40 = ya + ve + v_4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11732 va = ya + ve + v_4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11733 v20) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11734 goto LABEL_68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11735 v41 = pOut.y * v39->pFacePlane.vNormal.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11736 v42 = -(v39->pFacePlane.dist + v41 + outz * v39->pFacePlane.vNormal.z + pOut.x * v39->pFacePlane.vNormal.x);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11737 if ( v40 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11738 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11739 if ( v39->pFacePlane.dist + v41 + outz * v39->pFacePlane.vNormal.z + pOut.x * v39->pFacePlane.vNormal.x < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11740 goto LABEL_68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11741 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11742 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11743 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11744 if ( v39->pFacePlane.dist + v41 + outz * v39->pFacePlane.vNormal.z + pOut.x * v39->pFacePlane.vNormal.x > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11745 goto LABEL_68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11746 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11747 v_4a = abs(-(v39->pFacePlane.dist + v41 + outz * v39->pFacePlane.vNormal.z + pOut.x * v39->pFacePlane.vNormal.x)) >> 14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11748 if ( v_4a <= abs(v40) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11749 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11750 LODWORD(v43) = v42 << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11751 HIDWORD(v43) = v42 >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11752 v44 = v43 / va;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11753 vb = v43 / va;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11754 if ( v44 >= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11755 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11756 if ( sub_4077F1(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11757 pOut.x + ((signed int)(((unsigned __int64)(vb * (signed __int64)v126) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11758 pOut.y + ((signed int)(((unsigned __int64)(vb * (signed __int64)v122) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11759 outz + ((signed int)(((unsigned __int64)(vb * (signed __int64)v118) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11760 v39,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11761 (BSPVertexBuffer *)a5a) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11762 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11763 v113 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11764 goto LABEL_71;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11765 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11766 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11767 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11768 LABEL_68:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11769 ++sDeptha;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11770 v_8 += 308;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11771 if ( sDeptha >= *((int *)a5a + 2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11772 goto LABEL_71;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11773 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11774 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11775 return !v114 || !v113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11776 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11777
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11778
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11779 //----- (00408768) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11780 char __cdecl UpdateActors()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11781 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11782 unsigned int v0; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11783 __int16 v1; // ax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11784 char *v2; // esi@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11785 char v3; // zf@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11786 signed int v5; // [sp+Ch] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11787 signed int v6; // [sp+10h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11788 signed int v7; // [sp+14h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11789 signed int v8; // [sp+18h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11790
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11791 v0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11792 v8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11793 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11794 v7 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11795 v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11796 if ( !_strcmpi(pCurrentMapName, "d25.blv") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11797 v8 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11798 if ( !_strcmpi(pCurrentMapName, "d26.blv") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11799 v6 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11800 if ( (unsigned __int16)_449B57_test_bit(pParty->_award_bits, 99) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11801 v7 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11802 v1 = _449B57_test_bit(pParty->_award_bits, 100);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11803 if ( v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11804 v5 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11805 if ( (signed int)uNumActors > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11806 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11807 v2 = (char *)&pActors[0].vPosition;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11808 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11809 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11810 if ( ((Actor *)(v2 - 142))->CanAct() || *((short *)v2 + 17) == 19 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11811 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11812 v3 = *((short *)v2 + 17) == 19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11813 *(short *)v2 = *((short *)v2 + 10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11814 *((short *)v2 + 1) = *((short *)v2 + 11);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11815 *((short *)v2 + 2) = *((short *)v2 + 12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11816 *((short *)v2 - 51) = *((short *)v2 - 17);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11817 if ( !v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11818 Actor::_403EB6(v0, dword_4F6E08[v0], *(int *)(v2 - 18), 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11819 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11820 *(v2 - 81) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11821 LOBYTE(v1) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11822 if ( !v8 || v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11823 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11824 if ( !v6 || v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11825 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11826 LOBYTE(v1) = ((Actor *)(v2 - 142))->_438B9B();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11827 if ( (char)v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11828 *(v2 - 104) &= 0xF7u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11829 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11830 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11831 *(v2 - 104) &= 0x7Fu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11832 if ( *(v2 - 104) & 0x40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11833 LOBYTE(v1) = Actor::_4031C1_update_job(v0, pParty->uCurrentHour, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11834 ++v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11835 v2 += 836;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11836 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11837 while ( (signed int)v0 < (signed int)uNumActors );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11838 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11839 return v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11840 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11841
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11842 //----- (00408896) --------------------------------------------------------
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
11843 void UpdateLayingItems()
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11844 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11845 unsigned int v0; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11846 char *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11847 char *result; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11848
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11849 v0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11850 v1 = (char *)&pLayingItems[0].uObjectDescID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11851 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11852 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11853 if ( *(short *)v1 && (v1[24] & 8 || pObjectList->pObjects[*(short *)v1].uFlags & 0x10) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11854 LayingItem::_42F933(v0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11855 v1 += 112;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11856 ++v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11857 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11858 while ( (signed int)v1 < (signed int)((char *)&pObjectList->uNumObjects + 2) );
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
11859
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
11860 for (uint i = 0; i < 100; ++i)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
11861 array_5118E8.pElements[i].field_C_time_left = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11862 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11863
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11864 //----- (004088E9) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11865 signed int __fastcall sub_4088E9(int a1, int a2, int a3, int a4, int a5, int a6)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11866 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11867 int v6; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11868 int v7; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11869 int v8; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11870 signed int result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11871 int v10; // [sp+Ch] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11872 int v11; // [sp+18h] [bp+8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11873
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11874 v6 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11875 v10 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11876 v7 = a3 - a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11877 v11 = abs(a3 - a1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11878 v8 = abs(a4 - v10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11879 result = sub_452A9E(v11 * v11 + v8 * v8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11880 if ( result )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11881 result = abs((v7 * (v10 - a6) - (a4 - v10) * (v6 - a5)) / result);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11882 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11883 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11884
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11885
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11886 //----- (00408A27) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11887 unsigned int __thiscall SearchAliveActors(unsigned int *pTotalActors)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11888 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11889 unsigned int *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11890 int v2; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11891 unsigned int v3; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11892 signed int v4; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11893 Actor *v5; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11894 unsigned int v6; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11895 int v8; // [sp+Ch] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11896
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11897 v1 = pTotalActors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11898 v2 = GetAlertStatus();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11899 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11900 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11901 *v1 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11902 v8 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11903 if ( (signed int)uNumActors > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11904 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11905 v5 = pActors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11906 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11907 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11908 v6 = v5->uAttributes;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11909 if ( (v6 & 0x100000) == v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11910 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11911 ++*v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11912 if ( v5->IsAlive() == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11913 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11914 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11915 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11916 ++v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11917 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11918 while ( v4 < (signed int)uNumActors );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11919 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11920 return v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11921 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11922
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11923 //----- (00408A7E) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11924 unsigned int __fastcall SearchActorByMonsterID(unsigned int *pTotalActors, int uMonsterID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11925 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11926 unsigned int *v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11927 signed int v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11928 char *v4; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11929 int v5; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11930 int v7; // [sp+8h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11931 int v8; // [sp+Ch] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11932 unsigned int v9; // [sp+10h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11933
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11934 v7 = uMonsterID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11935 v2 = pTotalActors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11936 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11937 v8 = GetAlertStatus();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11938 *v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11939 v9 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11940 if ( (signed int)uNumActors > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11941 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11942 v4 = (char *)&pActors[0].pMonsterInfo.uID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11943 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11944 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11945 v5 = *((int *)v4 - 15); // actor::attributes
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11946 if ( (v5 & 0x100000) == v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11947 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11948 if ( *(short *)v4 - 1 == v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11949 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11950 ++*v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11951 if ( ((Actor *)(v4 - 96))->IsAlive() == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11952 ++v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11953 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11954 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11955 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11956 v4 += 836;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11957 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11958 while ( v3 < (signed int)uNumActors );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11959 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11960 return v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11961 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11962
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11963 //----- (00408AE7) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11964 unsigned int __fastcall SearchActorByGroup(unsigned int *pTotalActors, unsigned int uGroup)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11965 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11966 unsigned int *v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11967 signed int v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11968 char *v4; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11969 int v5; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11970 unsigned int v7; // [sp+8h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11971 int v8; // [sp+Ch] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11972 unsigned int v9; // [sp+10h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11973
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11974 v7 = uGroup;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11975 v2 = pTotalActors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11976 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11977 v8 = GetAlertStatus();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11978 *v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11979 v9 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11980 if ( (signed int)uNumActors > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11981 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11982 v4 = (char *)&pActors[0].uGroup;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11983 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11984 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11985 v5 = *((int *)v4 - 168);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11986 if ( (v5 & 0x100000) == v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11987 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11988 if ( *(int *)v4 == v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11989 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11990 ++*v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11991 if ( ((Actor *)(v4 - 708))->IsAlive() == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11992 ++v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11993 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11994 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11995 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11996 v4 += 836;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11997 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11998 while ( v3 < (signed int)uNumActors );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11999 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12000 return v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12001 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12002
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12003 //----- (00408B54) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12004 unsigned int __fastcall SearchActorByID(unsigned int *pTotalActors, unsigned int a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12005 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12006 unsigned int v2; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12007 unsigned int *v3; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12008 int v4; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12009 unsigned int v5; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12010 unsigned int v6; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12011
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12012 v2 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12013 v3 = pTotalActors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12014 v4 = GetAlertStatus();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12015 v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12016 *v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12017 v6 = pActors[v2].uAttributes;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12018 if ( (v6 & 0x100000) == v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12019 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12020 *v3 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12021 if ( pActors[v2].IsAlive() == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12022 v5 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12023 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12024 return v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12025 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12026
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12027
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12028 //----- (00409BE8) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12029 void __cdecl sub_409BE8()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12030 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12031 void *v0; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12032 stru348 *v1; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12033 int v2; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12034 int v3; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12035
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12036 v0 = ptr_507BC0->ptr_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12037 dword_4E1874 = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12038 v1 = &stru_4E1890[(int)((char *)v0 - 108)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12039 amuint_4E1860 = v1->field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12040 amuint_4E1864 = v1->field_6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12041 amuint_4E1868 = v1->field_8 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12042 amuint_4E186C = v1->field_A - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12043 amuint_4E1870 = v1->field_C - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12044 amuint_505884 = v1->field_E;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12045 amuint_505888 = v1->field_10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12046 amuint_50588C = v1->field_12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12047 dword_4E1878 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12048 dword_4E187C = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12049 dword_4E1880 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12050 dword_4E1884 = v1->field_0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12051 v2 = v1->field_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12052 v3 = v1->field_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12053 dword_4E1888 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12054 dword_4DF3A4 = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12055 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12056 // 4DF3A4: using guessed type int dword_4DF3A4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12057 // 4E1860: using guessed type int amuint_4E1860;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12058 // 4E1864: using guessed type int amuint_4E1864;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12059 // 4E1868: using guessed type int amuint_4E1868;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12060 // 4E186C: using guessed type int amuint_4E186C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12061 // 4E1870: using guessed type int amuint_4E1870;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12062 // 4E1874: using guessed type int dword_4E1874;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12063 // 4E1878: using guessed type int dword_4E1878;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12064 // 4E187C: using guessed type int dword_4E187C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12065 // 4E1880: using guessed type int dword_4E1880;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12066 // 4E1884: using guessed type int dword_4E1884;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12067 // 4E1888: using guessed type int dword_4E1888;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12068 // 505884: using guessed type int amuint_505884;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12069 // 505888: using guessed type int amuint_505888;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12070 // 50588C: using guessed type int amuint_50588C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12071
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12072
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12073
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12074
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12075
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12076
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12077
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12078 //----- (0040D75D) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12079 char __fastcall pGUIWindow0_draws_text(int a1, const char *pText, int *pXY)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12080 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12081 const char *v3; // ST0C_4@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12082 __int64 v4; // qax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12083
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12084 v3 = pText;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12085 v4 = LOBYTE(pFontComic->uFontHeight) - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12086 return pGUIWindow0->DrawText(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12087 pFontComic,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12088 *pXY,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12089 pXY[1] - (((signed int)v4 - HIDWORD(v4)) >> 1) + 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12090 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12091 v3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12092 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12093 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12094 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12095 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12096
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12097
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12098
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12099 //----- (0040DB27) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12100 void __fastcall DrawRect(Vec4_int_ *pXYZW, unsigned __int16 uColor, char bSolidFill)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12101 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12102 Vec4_int_ *v3; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12103 unsigned __int16 v4; // bp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12104 unsigned int i; // ebx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12105
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12106 v3 = pXYZW;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12107 v4 = uColor;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12108 pRenderer->BeginScene();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12109 pRenderer->Clip_v2(0, 0, 639u, 479u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12110 if ( bSolidFill )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12111 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12112 for ( i = v3->y; (signed int)i <= v3->w; ++i )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12113 pRenderer->FillRect(v3->x, i, v3->z, i, v4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12114 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12115 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12116 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12117 pRenderer->FillRect(v3->x, v3->y, v3->z, v3->y, v4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12118 pRenderer->FillRect(v3->z, v3->y, v3->z, v3->w, v4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12119 pRenderer->FillRect(v3->z, v3->w, v3->x, v3->w, v4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12120 pRenderer->FillRect(v3->x, v3->w, v3->x, v3->y, v4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12121 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12122 pRenderer->EndScene();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12123 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12124
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12125
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12126
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12127
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12128 //----- (0040DDB1) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12129 int __fastcall rand_interval(int a, int b)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12130 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12131 return a + rand() % (b - a + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12132 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12133
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12134 //----- (0040DEB4) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12135 char *__fastcall inv_strcat(const char *Source, char *Dest)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12136 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12137 return strcat(Dest, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12138 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12139
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12140 //----- (0040DEBE) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12141 char *__fastcall inv_strcpy(const char *Source, char *Dest)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12142 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12143 return strcpy(Dest, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12144 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12145
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12146 //----- (0040DEC8) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12147 void __fastcall intToString(int val, char *pOut)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12148 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12149 sprintfex(pOut, "%d", val);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12150 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12151
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12152 //----- (0040DEDB) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12153 unsigned int __stdcall R8G8B8_to_TargetFormat(int uColor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12154 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12155 return GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat((unsigned __int8)uColor, BYTE1(uColor), BYTE2(uColor));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12156 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12157
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12158 //----- (0040DEF3) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12159 unsigned int __fastcall GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(unsigned __int16 r, unsigned __int16 g, unsigned __int16 b)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12160 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12161 return ((unsigned int)b >> (8 - LOBYTE(pRenderer->uTargetBBits))) | pRenderer->uTargetGMask & (g << (LOBYTE(pRenderer->uTargetGBits) + LOBYTE(pRenderer->uTargetBBits) - 8)) | pRenderer->uTargetRMask & (r << (LOBYTE(pRenderer->uTargetGBits) + LOBYTE(pRenderer->uTargetRBits) + LOBYTE(pRenderer->uTargetBBits) - 8));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12162 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12163
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12164 //----- (0040DF3D) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12165 void __cdecl CallRenderPresent()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12166 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12167 pRenderer->Present();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12168 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12169
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12170
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12171 //----- (0040DFA7) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12172 int __stdcall retzero_sub_40DFA7(int a1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12173 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12174 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12175 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12176 // 40DFA7: using guessed type int __stdcall retzero_sub_40DFA7(int);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12177
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12178 //----- (0040DFD1) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12179 void stru272::_40DFD1()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12180 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12181 stru272 *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12182 stru272_stru0 *v2; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12183
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12184 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12185 v2 = (stru272_stru0 *)malloc(0x5Cu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12186 v1->ptr_0 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12187 v2->field_0 = 0x67707274u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12188 v1->ptr_0->field_8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12189 v1->ptr_0->field_30 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12190 v1->ptr_0->field_58 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12191 v1->ptr_0->field_59 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12192 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12193
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12194 //----- (0040DFFE) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12195 int stru272_stru0::_40DFFE()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12196 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12197 signed int result; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12198
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12199 if ( this->field_0 == 0x67707274 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12200 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12201 this->field_0 = 0x78787878u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12202 free(this);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12203 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12204 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12205 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12206 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12207 result = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12208 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12209 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12210 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12211
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12212 //----- (0040E01A) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12213 int stru272_stru0::_40E01A(int a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12214 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12215 signed int result; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12216
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12217 auto a1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12218 if ( a1->field_0 == 0x67707274 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12219 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12220 a1->field_4 = *(int *)(a2 + 32);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12221 a1->field_C = *(int *)a2 << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12222 a1->field_10 = *(int *)(a2 + 4) << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12223 a1->field_14 = *(int *)(a2 + 8) << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12224 a1->field_18 = *(int *)(a2 + 12) << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12225 a1->field_1C = *(int *)(a2 + 16);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12226 a1->field_20 = *(int *)(a2 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12227 a1->field_24 = *(int *)(a2 + 24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12228 a1->field_28 = *(float *)(a2 + 28) * 65536.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12229 LODWORD(a1->field_2C) = *(int *)(a2 + 36);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12230 a1->field_34 = (signed __int64)(*(float *)(a2 + 40) * 65536.0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12231 a1->field_38 = (signed __int64)(*(float *)(a2 + 44) * 65536.0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12232 a1->field_3C = *(int *)(a2 + 48);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12233 a1->field_40 = *(int *)(a2 + 52);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12234 a1->field_54 = *(int *)(a2 + 56);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12235 a1->field_59 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12236 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12237 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12238 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12239 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12240 result = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12241 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12242 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12243 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12244
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12245 //----- (0040E0F5) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12246 int stru272_stru0::_40E0F5(char a2, char a3)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12247 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12248 signed int result; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12249 int v4; // edx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12250 int v5; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12251
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12252 auto a1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12253 if ( a1->field_0 == 0x67707274 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12254 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12255 if ( a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12256 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12257 a1->field_8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12258 a1->field_30 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12259 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12260 if ( a1->field_59 && a3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12261 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12262 v4 = a1->field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12263 v5 = a1->field_54;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12264 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12265 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12266 *(int *)v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12267 v5 += 28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12268 --v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12269 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12270 while ( v4 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12271 a1->field_58 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12272 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12273 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12274 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12275 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12276 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12277 result = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12278 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12279 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12280 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12281
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12282 //----- (0040E133) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12283 int stru272_stru0::_40E133()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12284 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12285 stru272_stru0 *v1; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12286 int v3; // ST18_4@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12287 double v4; // st7@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12288 double v5; // st6@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12289 char v6; // bl@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12290 int v7; // esi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12291 int v8; // ecx@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12292 signed int v9; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12293 int v10; // ecx@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12294 signed int v11; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12295 signed int v12; // edx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12296 signed int v13; // edx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12297 int v14; // [sp+8h] [bp-10h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12298 int v15; // [sp+Ch] [bp-Ch]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12299 float v16; // [sp+14h] [bp-4h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12300
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12301 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12302 if ( this->field_0 != 0x67707274 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12303 return 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12304 v3 = this->field_8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12305 v16 = this->field_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12306 v4 = (double)v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12307 if ( v3 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12308 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12309 v5 = v16 + this->field_2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12310 v16 = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12311 if ( v5 > v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12312 v16 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12313 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12314 if ( v16 >= 1.0 || this->field_58 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12315 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12316 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12317 v7 = this->field_54;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12318 v14 = (signed __int64)this->field_28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12319 v15 = this->field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12320 while ( *(int *)v7 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12321 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12322 if ( v16 >= 1.0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12323 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12324 *(int *)v7 = v1->field_3C + rand() % (v1->field_40 - v1->field_3C + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12325 *(int *)(v7 + 20) = (rand() % 17 - 8) << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12326 *(int *)(v7 + 24) = (rand() % 17 - 8) << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12327 v12 = v1->field_C + rand() % (v1->field_14 - 1 - v1->field_C + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12328 *(int *)(v7 + 12) = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12329 *(int *)(v7 + 4) = v12 >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12330 v16 = v16 - 1.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12331 v13 = v1->field_10 + rand() % (v1->field_18 - 1 - v1->field_10 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12332 *(int *)(v7 + 16) = v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12333 *(int *)(v7 + 8) = v13 >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12334 --v1->field_8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12335 goto LABEL_13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12336 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12337 LABEL_14:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12338 v7 += 28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12339 --v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12340 if ( !v15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12341 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12342 v1->field_58 = v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12343 v1->field_30 = v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12344 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12345 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12346 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12347 v8 = *(int *)(v7 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12348 --*(int *)v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12349 v9 = v8 + *(int *)(v7 + 12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12350 v10 = v14 + *(int *)(v7 + 24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12351 *(int *)(v7 + 12) = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12352 *(int *)(v7 + 4) = v9 >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12353 v11 = v10 + *(int *)(v7 + 16);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12354 *(int *)(v7 + 24) = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12355 *(int *)(v7 + 16) = v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12356 *(int *)(v7 + 8) = v11 >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12357 LABEL_13:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12358 v6 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12359 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12360 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12361 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12362 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12363
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12364 //----- (0040E2A7) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12365 int stru272_stru0::_40E2A7()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12366 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12367 int result; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12368
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12369 if ( this->field_0 == 0x67707274 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12370 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12371 if ( this->field_8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12372 result = this->field_58 != 0 ? 2 : 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12373 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12374 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12375 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12376 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12377 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12378 result = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12379 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12380 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12381 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12382
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12383
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12384
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12385
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12386
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12387
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12388
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12389 //----- (0040F82D) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12390 void __fastcall ZBuffer_Fill(int *pZBuffer, int uTextureId, int iZValue)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12391 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12392 ZBuffer_DoFill(pZBuffer, (Texture *)(uTextureId != -1 ? 72 * uTextureId + 0x6D084C : 0), iZValue);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12393 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12394
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12395 //----- (0040F845) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12396 __int16 __fastcall sub_40F845(int a1, int a2, int a3, int a4, int a5, __int16 a6, int a7)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12397 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12398 int v7; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12399 int v8; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12400 int v9; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12401 int v10; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12402
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12403 v7 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12404 v8 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12405 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12406 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12407 v9 = a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12408 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12409 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12410 v10 = *(char *)v8++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12411 if ( (char)v10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12412 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12413 if ( (char)v10 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12414 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12415 LOWORD(v10) = *(short *)(a5 + 2 * v10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12416 *(short *)v7 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12417 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12418 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12419 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12420 LOWORD(v10) = a6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12421 *(short *)v7 = a6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12422 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12423 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12424 v7 += 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12425 --v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12426 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12427 while ( v9 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12428 v7 = a7 + v7 - a3 - a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12429 --a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12430 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12431 while ( a4 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12432 return v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12433 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12434
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12435 //----- (0040F89C) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12436 void __fastcall ZBuffer_DoFill(int *pZBuffer, Texture *pTex, int uZValue)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12437 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12438 void *v3; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12439 void *v4; // esi@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12440 int *v5; // edi@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12441 int v6; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12442 int v7; // ecx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12443 Texture *v8; // [sp+Ch] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12444 int *v9; // [sp+10h] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12445 int v10; // [sp+14h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12446 int v11; // [sp+18h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12447 void *v12; // [sp+1Ch] [bp-4h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12448
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12449 v10 = pTex->uTextureWidth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12450 v8 = pTex;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12451 v9 = pZBuffer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12452 v11 = pTex->uTextureHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12453 if ( pIcons_LOD->dword_011BA4 && pTex->uDecompressedSize )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12454 v3 = pTex->UnzipPalette();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12455 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12456 v3 = pTex->pLevelOfDetail0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12457 v12 = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12458 v4 = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12459 v5 = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12460 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12461 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12462 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12463 v7 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12464 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12465 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12466 LOBYTE(v6) = *(char *)v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12467 v4 = (char *)v4 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12468 if ( v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12469 *v5 = uZValue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12470 ++v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12471 --v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12472 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12473 while ( v7 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12474 v5 += 640 - v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12475 --v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12476 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12477 while ( v11 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12478 if ( pIcons_LOD->dword_011BA4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12479 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12480 if ( v8->uDecompressedSize )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12481 free(v12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12482 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12483 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12484
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12485
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12486 //----- (0040F92A) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12487 void __fastcall sub_40F92A(int *pZBuffer, Texture *a2, int a3)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12488 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12489 Texture *v3; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12490 void *v4; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12491 int *v5; // edi@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12492 int v6; // ecx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12493 int *v7; // [sp+Ch] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12494 int v8; // [sp+10h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12495 int v9; // [sp+18h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12496
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12497 v3 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12498 v7 = pZBuffer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12499 v8 = a2->uTextureWidth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12500 v9 = a2->uTextureHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12501 if ( pIcons_LOD->dword_011BA4 && a2->uDecompressedSize )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12502 v4 = a2->UnzipPalette();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12503 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12504 v4 = a2->pLevelOfDetail0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12505 v5 = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12506 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12507 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12508 v6 = v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12509 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12510 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12511 *v5 = a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12512 ++v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12513 --v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12514 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12515 while ( v6 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12516 v5 += 640 - v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12517 --v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12518 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12519 while ( v9 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12520 if ( pIcons_LOD->dword_011BA4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12521 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12522 if ( v3->uDecompressedSize )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12523 free(v4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12524 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12525 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12526
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12527
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12528
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12529
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12530
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12531
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12532
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12533
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12534
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12535
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12536
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12537
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12538
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12539
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12540 //----- (00410AF5) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12541 void __cdecl SetMoonPhaseNames()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12542 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12543 aMoonPhaseNames[0] = pGlobalTXT_LocalizationStrings[150];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12544 aMoonPhaseNames[1] = pGlobalTXT_LocalizationStrings[171];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12545 aMoonPhaseNames[2] = pGlobalTXT_LocalizationStrings[102];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12546 aMoonPhaseNames[3] = pGlobalTXT_LocalizationStrings[169];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12547 aMoonPhaseNames[4] = pGlobalTXT_LocalizationStrings[92];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12548 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12549
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12550 //----- (00410B28) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12551 void __thiscall DrawSpellDescriptionPopup(void *_this)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12552 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12553 Player *v1; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12554 SpellInfo *v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12555 unsigned int v3; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12556 int v4; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12557 LONG v5; // ecx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12558 int v6; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12559 char *v7; // ST44_4@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12560 unsigned __int16 v8; // ax@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12561 GUIWindow a1; // [sp+Ch] [bp-68h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12562 void *v10; // [sp+60h] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12563 POINT a2; // [sp+64h] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12564 int v12; // [sp+6Ch] [bp-8h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12565 int v13; // [sp+70h] [bp-4h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12566
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12567 v1 = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12568 v10 = _this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12569 v2 = &pSpellStats->pInfos[(signed int)((char *)_this + 11 * v1->field_1A4E) + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12570 if ( pMouse->GetCursorPos(&a2)->y <= 250 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12571 v3 = pMouse->GetCursorPos(&a2)->y + 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12572 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12573 v3 = 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12574 a1.uFrameY = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12575 a1.uFrameWidth = 328;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12576 a1.uFrameHeight = 68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12577 a1.uFrameX = 90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12578 a1.uFrameZ = 417;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12579 a1.uFrameW = v3 + 67;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
12580 a1.Hint = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12581 a2.y = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[431]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12582 v13 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[433]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12583 v12 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[432]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12584 v4 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[96]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12585 v5 = a2.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12586 if ( v13 > a2.y )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12587 v5 = v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12588 if ( v12 > v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12589 v5 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12590 if ( v4 > v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12591 v5 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12592 sprintfex(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12593 pTmpBuf2,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12594 "%s\n\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s",
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12595 v2->pDescription,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12596 pGlobalTXT_LocalizationStrings[431],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12597 v5 + 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12598 v5 + 10,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12599 v2->pBasicSkillDesc,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12600 pGlobalTXT_LocalizationStrings[433],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12601 v5 + 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12602 v5 + 10,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12603 v2->pExpertSkillDesc,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12604 pGlobalTXT_LocalizationStrings[432],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12605 v5 + 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12606 v5 + 10,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12607 v2->pMasterSkillDesc,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12608 pGlobalTXT_LocalizationStrings[96],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12609 v5 + 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12610 v5 + 10,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12611 v2->pGrandmasterSkillDesc);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12612 v6 = pFontSmallnum->CalcTextHeight(pTmpBuf2, &a1, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12613 a1.uFrameHeight += v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12614 if ( (signed int)a1.uFrameHeight < 150 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12615 a1.uFrameHeight = 150;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12616 a1.uFrameWidth = 460;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
12617 a1.DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12618 a1.uFrameWidth -= 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12619 a1.uFrameHeight -= 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12620 v7 = v2->pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12621 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12622 a1.uFrameW = a1.uFrameHeight + a1.uFrameY - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12623 v8 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12624 a1.DrawText2(pFontArrus, 0x78u, 0xCu, v8, v7, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12625 a1.DrawText(pFontSmallnum, 120, 44, 0, pTmpBuf2, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12626 a1.uFrameWidth = 108;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12627 a1.uFrameZ = a1.uFrameX + 107;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12628 a1.DrawText2(pFontComic, 0xCu, 0x4Bu, 0, pSkillNames[v1->field_1A4E + 12], 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12629 sprintfex(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12630 pTmpBuf,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12631 "%s\n%d",
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12632 pGlobalTXT_LocalizationStrings[522],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12633 *(&pSpellDatas[0].field_14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12634 + ((unsigned int)LOBYTE(v1->pActiveSkills[v1->field_1A4E + 12]) >> 6)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12635 + 10 * (int)((char *)v10 + 11 * v1->field_1A4E)));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12636 a1.DrawText2(pFontComic, 0xCu, a1.uFrameHeight - LOBYTE(pFontComic->uFontHeight) - 16, 0, pTmpBuf, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12637 dword_507B00_spell_info_to_draw_in_popup = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12638 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12639 // 507B00: using guessed type int dword_507B00_spell_info_to_draw_in_popup;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12640
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12641 //----- (00410D99) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12642 signed int __fastcall sub_410D99_get_map_index(int a1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12643 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12644 int v1; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12645 signed int v2; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12646 const char **v3; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12647 char *v4; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12648
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12649 v1 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12650 v2 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12651 if ( _strcmpi(pMapStats->pInfos[1].pFilename, (const char *)&pGames_LOD->pSubIndices[a1]) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12652 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12653 v3 = (const char **)&pMapStats->pInfos[1].pFilename;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12654 v4 = (char *)&pMapStats->pInfos[1].pFilename;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12655 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12656 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12657 if ( !*(int *)v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12658 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12659 v3 += 17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12660 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12661 v4 = (char *)v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12662 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12663 while ( _strcmpi(*v3, (const char *)&pGames_LOD->pSubIndices[v1]) );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12664 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12665 return v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12666 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12667
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12668 //----- (00410DEC) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12669 unsigned int __cdecl DrawLloydBeaconsScreen()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12670 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12671 Player *v0; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12672 char *v1; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12673 unsigned __int16 v2; // ax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12674 unsigned int result; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12675 unsigned int v4; // esi@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12676 unsigned int v5; // ecx@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12677 char v6; // zf@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12678 LloydBeacon *v7; // esi@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12679 int v8; // eax@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12680 unsigned __int64 v9; // kr08_8@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12681 unsigned int v10; // esi@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12682 unsigned int v11; // eax@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12683 char *v12; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12684 char *v13; // ecx@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12685 int v14; // eax@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12686 unsigned int v15; // [sp-10h] [bp-98h]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12687 unsigned __int16 v16; // [sp-Ch] [bp-94h]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12688 int v17; // [sp-8h] [bp-90h]@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12689 char *v18; // [sp-8h] [bp-90h]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12690 Texture *v19; // [sp-4h] [bp-8Ch]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12691 char *v20; // [sp-4h] [bp-8Ch]@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12692 unsigned int v21; // [sp-4h] [bp-8Ch]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12693 GUIWindow v22; // [sp+Ch] [bp-7Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12694 unsigned int v23; // [sp+64h] [bp-24h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12695 __int64 v24; // [sp+68h] [bp-20h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12696 unsigned int v25; // [sp+70h] [bp-18h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12697 char *Str; // [sp+74h] [bp-14h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12698 int v27; // [sp+78h] [bp-10h]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12699 LloydBeacon *v28; // [sp+7Ch] [bp-Ch]@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12700 RGBTexture *v29; // [sp+80h] [bp-8h]@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12701 int uNumMaxBeacons; // [sp+84h] [bp-4h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12702
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12703 v0 = &pParty->pPlayers[_506348_current_lloyd_playerid];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12704 pRenderer->DrawTextureIndexed(8u, 8u, pTexture_LloydBeacons[(unsigned __int8)bRecallingBeacon]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12705 v1 = pGlobalTXT_LocalizationStrings[523]; // Recall Beacon
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12706 v22.uFrameX = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12707 v22.uFrameY = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12708 v22.uFrameWidth = 428;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12709 v22.uFrameHeight = 344;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12710 v22.uFrameZ = 435;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12711 v22.uFrameW = 351;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12712 if ( !bRecallingBeacon )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12713 v1 = pGlobalTXT_LocalizationStrings[375]; // Set Beacon
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12714 sprintfex(pTmpBuf, "%s", v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12715 v22.DrawText2(pBook2Font, 0, 22u, 0, pTmpBuf, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12716 if ( bRecallingBeacon )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12717 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12718 pRenderer->DrawTextureTransparent(pBtn_Book_1->uX, pBtn_Book_1->uY, pTex_tab_an_6b__zoom_on);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12719 v19 = pTex_tab_an_6a__zoom_off;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12720 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12721 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12722 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12723 pRenderer->DrawTextureTransparent(pBtn_Book_1->uX, pBtn_Book_1->uY, pTex_tab_an_6a__zoom_off);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12724 v19 = pTex_tab_an_6b__zoom_on;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12725 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12726 pRenderer->DrawTextureTransparent(pBtn_Book_2->uX, pBtn_Book_2->uY, v19);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12727 v2 = v0->pActiveSkills[14];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12728 uNumMaxBeacons = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12729 if ( HIBYTE(v2) & 1 || (v2 & 0x80u) != 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12730 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12731 uNumMaxBeacons = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12732 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12733 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12734 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12735 if ( v2 & 0x40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12736 uNumMaxBeacons = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12737 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12738 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12739 v27 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12740 if ( uNumMaxBeacons > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12741 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12742 v29 = pSavegameThumbnails;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12743 v28 = v0->pInstalledBeacons;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12744 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12745 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12746 v22.uFrameWidth = 92;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12747 v4 = result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12748 v22.uFrameHeight = 68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12749 v5 = pLloydsBeaconsPreviewXs[result];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12750 v22.uFrameY = pLloydsBeaconsPreviewYs[result];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12751 v25 = v22.uFrameY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12752 v22.uFrameX = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12753 v22.uFrameW = v22.uFrameY + 67;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12754 v6 = v29->pPixels == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12755 v22.uFrameZ = v5 + 91;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12756 if ( !v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12757 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12758 if ( !bRecallingBeacon )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12759 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12760 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12761 pLloydsBeacons_SomeXs[v4],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12762 pLloydsBeacons_SomeYs[v4],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12763 pTexture_CurrentBook);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12764 v21 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12765 v18 = pGlobalTXT_LocalizationStrings[19];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12766 v16 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12767 v14 = pSpellFont->CalcTextHeight(pGlobalTXT_LocalizationStrings[19], &v22, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12768 v15 = (signed int)v22.uFrameHeight / 2 - v14 / 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12769 goto LABEL_28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12770 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12771 LABEL_29:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12772 ++v29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12773 ++v28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12774 result = v27++ + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12775 if ( v27 >= uNumMaxBeacons )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12776 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12777 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12778 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12779 pLloydsBeacons_SomeXs[v4],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12780 pLloydsBeacons_SomeYs[v4],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12781 pTexture_CurrentBook);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12782 pRenderer->DrawTextureRGB(pLloydsBeaconsPreviewXs[v4], pLloydsBeaconsPreviewYs[v4], v29);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12783 v7 = v28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12784 Str = pMapStats->pInfos[sub_410D99_get_map_index(HIWORD(v28->field_18))].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12785 v8 = pSpellFont->CalcTextHeight(Str, &v22, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12786 v22.uFrameY += -6 - v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12787 v22.DrawText2(pSpellFont, 0, 0, 1u, Str, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12788 v9 = v7->uBeaconTime - pParty->uTimePlayed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12789 LODWORD(v24) = LODWORD(v7->uBeaconTime) - LODWORD(pParty->uTimePlayed);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12790 HIDWORD(v24) = HIDWORD(v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12791 v23 = (unsigned __int64)((signed __int64)((double)v24 * 0.234375) / 60 / 60) >> 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12792 v10 = (signed __int64)((double)v24 * 0.234375) / 60 / 60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12793 v11 = v10 / 0x18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12794 if ( (unsigned int)((signed __int64)((double)v24 * 0.234375) / 60 / 60) / 0x18 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12795 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12796 v13 = pGlobalTXT_LocalizationStrings[57]; // Days
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12797 if ( v11 > 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12798 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12799 LABEL_24:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12800 v20 = v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12801 v17 = v11 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12802 LABEL_25:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12803 sprintfex(pTmpBuf, "%lu %s", v17, v20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12804 v21 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12805 v18 = pTmpBuf;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12806 v16 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12807 v22.uFrameY = v25 + v22.uFrameHeight + 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12808 v15 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12809 LABEL_28:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12810 v22.DrawText2(pSpellFont, 0, v15, v16, v18, v21);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12811 goto LABEL_29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12812 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12813 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12814 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12815 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12816 if ( (signed __int64)(__PAIR__(v23, v10) + 1) <= 23 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12817 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12818 if ( (v23 & 0x80000000u) != 0 || (signed int)v23 <= 0 && v10 <= 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12819 v12 = pGlobalTXT_LocalizationStrings[109];// Hour
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12820 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12821 v12 = pGlobalTXT_LocalizationStrings[110];// Hours
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12822 v20 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12823 v17 = v10 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12824 goto LABEL_25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12825 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12826 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12827 v13 = pGlobalTXT_LocalizationStrings[56]; // Day
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12828 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12829 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12830 LABEL_30:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12831 if ( byte_506360 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12832 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12833 result = pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12834 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12835 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12836 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)181;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12837 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12838 result = 3 * pMessageQueue_50CBD0->uNumMessages + 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12839 *(&pMessageQueue_50CBD0->uNumMessages + result) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12840 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12841 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12842 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12843 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12844 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12845
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12846
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12847 //----- (00411150) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12848 char *__cdecl DrawTownPortalScreen()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12849 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12850 signed int v0; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12851 __int16 v1; // dx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12852 POINT *v2; // edi@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12853 int v3; // edi@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12854 __int16 v4; // dx@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12855 GUIWindow v6; // [sp+Ch] [bp-64h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12856 POINT v7; // [sp+60h] [bp-10h]@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12857 POINT a2; // [sp+68h] [bp-8h]@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12858
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12859 pRenderer->ClearZBuffer(0, 479);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12860 pRenderer->DrawTextureTransparent(8u, 8u, pTexture_CurrentBook);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12861 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12862 0x1D7u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12863 0x1BDu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12864 (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12865 v6.uFrameX = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12866 v6.uFrameY = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12867 v6.uFrameWidth = 460;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12868 v6.uFrameHeight = 344;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12869 v6.uFrameZ = 467;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12870 v6.uFrameW = 351;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12871 v0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12872 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12873 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12874 if ( !v0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12875 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12876 v1 = 206;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12877 LABEL_14:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12878 if ( !(unsigned __int16)_449B57_test_bit(pParty->_award_bits, v1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12879 goto LABEL_16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12880 goto LABEL_15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12881 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12882 if ( v0 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12883 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12884 v1 = 208;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12885 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12886 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12887 if ( v0 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12888 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12889 v1 = 207;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12890 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12891 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12892 if ( v0 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12893 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12894 v1 = 211;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12895 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12896 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12897 if ( v0 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12898 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12899 v1 = 209;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12900 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12901 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12902 if ( v0 == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12903 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12904 v1 = 210;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12905 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12906 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12907 LABEL_15:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12908 pRenderer->_4A612A(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12909 pTownPortalBook_xs[v0],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12910 pTownPortalBook_ys[v0],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12911 *(&pTexture_TownPortalHarmn + v0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12912 v0 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12913 LABEL_16:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12914 ++v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12915 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12916 while ( v0 < 6 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12917 v2 = pMouse->GetCursorPos(&a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12918 v3 = pRenderer->pActiveZBuffer[v2->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v7)->y]] & 0xFFFF;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12919 if ( !v3 ) // Town Portal
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12920 return v6.DrawText2(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12921 if ( v3 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12922 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12923 v4 = 206;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12924 LABEL_30:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12925 if ( (unsigned __int16)_449B57_test_bit(pParty->_award_bits, v4) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12926 goto LABEL_31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12927 return v6.DrawText2(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12928 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12929 if ( v3 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12930 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12931 v4 = 208;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12932 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12933 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12934 if ( v3 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12935 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12936 v4 = 207;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12937 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12938 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12939 if ( v3 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12940 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12941 v4 = 211;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12942 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12943 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12944 if ( v3 == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12945 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12946 v4 = 209;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12947 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12948 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12949 if ( v3 == 6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12950 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12951 v4 = 210;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12952 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12953 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12954 LABEL_31:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12955 pRenderer->DrawTextureIndexed(word_4E1D3A[v3], pTownPortalBook_xs[v3 + 5], *(&pTex_tab_an_6b__zoom_on + v3));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12956 return v6.DrawText2(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12957 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12958 // 4E1D3A: using guessed type __int16 word_4E1D3A[];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12959
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12960 //----- (00411300) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12961 Texture *__fastcall LoadSpellbook(unsigned int uID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12962 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12963 unsigned int v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12964 Player *pPlayer; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12965 char v3; // al@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12966 int v4; // edi@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12967 Texture *result; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12968 char *v6; // edi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12969 unsigned int v7; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12970 unsigned __int8 v8; // sf@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12971 unsigned __int8 v9; // of@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12972 char pContainer[20]; // [sp+Ch] [bp-1Ch]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12973 Texture *v11; // [sp+20h] [bp-8h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12974 int v12; // [sp+24h] [bp-4h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12975
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12976 byte_506550 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12977 v1 = uID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12978 pPlayer = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12979 v3 = pPlayer->uQuickSpell;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12980 if ( v3 && (unsigned __int8)v3 / 11 == v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12981 dword_50654C = (unsigned __int8)v3 - 11 * v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12982 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12983 dword_50654C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12984 v4 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12985 v12 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12986 v11 = (Texture *)&pPlayer->field_152[11 * v1 + 63];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12987 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12988 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12989 result = v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12990 if ( v11->pName[v4] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12991 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12992 v6 = &byte_4E2430[12 * v1] + v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12993 sprintfex(pContainer, "SB%sS%02d", spellbook_texture_filename_suffices[v1], (unsigned __int8)*v6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12994 v7 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12995 dword_506408[v12] = 72 * v7 + 7145548;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12996 sprintfex(pContainer, "SB%sC%02d", spellbook_texture_filename_suffices[v1], (unsigned __int8)*v6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12997 result = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12998 dword_5063D8[v12] = result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12999 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13000 v4 = v12 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13001 v9 = __OFSUB__(v12 + 1, 12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13002 v8 = v12++ - 11 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13003 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13004 while ( v8 ^ v9 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13005 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13006 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13007 // 4E1D18: using guessed type char *spellbook_texture_filename_suffices[8];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13008 // 506408: using guessed type int dword_506408[];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13009 // 50654C: using guessed type int dword_50654C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13010 // 506550: using guessed type char byte_506550;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13011
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13012 //----- (0041140B) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13013 GUIWindow *__cdecl sub_41140B()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13014 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13015 signed int v0; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13016 GUIButton *v1; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13017 GUIButton *v2; // esi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13018 GUIWindow *result; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13019
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13020 v0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13021 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13022 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13023 dword_506404[v0]->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13024 dword_506434[v0]->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13025 --v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13026 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13027 while ( v0 >= -11 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13028 pIcons_LOD->_40F9C5();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13029 v1 = pGUIWindow_CurrentMenu->pControlsHead;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13030 if ( v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13031 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13032 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13033 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13034 v2 = v1->pNext;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13035 pAllocator->FreeChunk(v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13036 v1 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13037 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13038 while ( v2 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13039 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13040 pGUIWindow_CurrentMenu->pControlsHead = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13041 pGUIWindow_CurrentMenu->pControlsTail = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13042 result = pGUIWindow_CurrentMenu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13043 pGUIWindow_CurrentMenu->uNumControls = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13044 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13045 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13046
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13047 //----- (00411473) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13048 void __cdecl sub_411473()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13049 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13050 char *v0; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13051 Texture **v1; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13052 Texture *v2; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13053 Texture *v3; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13054
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13055 pTexture_pagemask->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13056 pTexture_506448->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13057 pTexture_50643C->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13058 v0 = &pTextures_tabs[0][0].pName[4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13059 v1 = pTextures_5064A0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13060 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13061 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13062 (*v1)->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13063 v2 = (Texture *)*((int *)v0 - 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13064 *v1 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13065 v2->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13066 v3 = *(Texture **)v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13067 *((int *)v0 - 1) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13068 v3->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13069 *(int *)v0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13070 ++v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13071 v0 += 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13072 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13073 while ( (signed int)v1 < (signed int)&pTextures_5064A0[9] );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13074 pAudioPlayer->PlaySound((SoundID)231, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13075 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13076 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13077
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13078
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13079 //----- (00411597) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13080 void __cdecl OnCloseSpellook()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13081 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13082 pAllocator->FreeChunk(pSpellFont);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13083 pSpellFont = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13084 pAllocator->FreeChunk(pBookFont);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13085 pBookFont = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13086 pAllocator->FreeChunk(pBook2Font);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13087 pBook2Font = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13088 pAllocator->FreeChunk(pAutonoteFont);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13089 pAutonoteFont = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13090 pTexture_mapbordr->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13091 pAudioPlayer->PlaySound((SoundID)231, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13092 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13093 dword_506364 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13094 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13095 // 506364: using guessed type int dword_506364;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13096
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13097
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13098
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13099
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13100
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13101
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13102
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13103 //----- (00412AF9) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13104 void __cdecl sub_412AF9()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13105 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13106 int v0; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13107
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13108 v0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13109 if ( uActiveCharacter )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13110 v0 = *((char *)&pParty->pPartyBuffs[5].uExpireTime + 6972 * uActiveCharacter + 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13111 pRenderer->DrawTextureIndexed(8u, 8u, pTextures_5064A0[v0]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13112 pRenderer->DrawTextureIndexed(0x1DCu, 0x1C2u, pTexture_50643C);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13113 pRenderer->DrawTextureIndexed(0x231u, 0x1C2u, pTexture_506448);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13114 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13115
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13116 //----- (00412B58) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13117 void __cdecl sub_412B58()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13118 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13119 Player *v0; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13120 int v1; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13121 unsigned int v2; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13122 Texture *v3; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13123 int v4; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13124 Texture *v5; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13125 Texture *v6; // edx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13126 int v7; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13127 int v8; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13128 POINT *v9; // esi@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13129 int v10; // eax@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13130 Texture *v11; // edx@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13131 int v12; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13132 signed int v13; // ecx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13133 unsigned int v14; // esi@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13134 unsigned int v15; // edi@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13135 Texture *v16; // eax@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13136 unsigned int v17; // [sp-Ch] [bp-2Ch]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13137 unsigned int v18; // [sp-Ch] [bp-2Ch]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13138 unsigned int v19; // [sp-8h] [bp-28h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13139 unsigned int v20; // [sp-8h] [bp-28h]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13140 Texture *v21; // [sp-4h] [bp-24h]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13141 signed int v22; // [sp-4h] [bp-24h]@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13142 int v23[2]; // [sp+10h] [bp-10h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13143 POINT a2; // [sp+18h] [bp-8h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13144
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13145 sub_412AF9();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13146 v0 = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13147 v1 = 11 * v0->field_1A4E;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13148 v2 = pIcons_LOD->FindTextureByName("Pending");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13149 v3 = (Texture *)(v2 != -1 ? (int)&pIcons_LOD->pTextures[v2] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13150 pRenderer->ClearZBuffer(0, 479);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13151 v4 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13152 if ( __OFSUB__(v1, v1 + 11) ^ 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13153 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13154 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13155 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13156 if ( *(&v0->field_152[v1 + 63] + v4) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13157 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13158 v5 = (Texture *)dword_506408[v4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13159 if ( v5 != v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13160 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13161 if ( dword_50654C == v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13162 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13163 v6 = dword_5063D8[v4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13164 v23[0] = (int)dword_5063D8[v4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13165 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13166 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13167 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13168 v23[0] = dword_506408[v4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13169 v6 = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13170 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13171 if ( v6->pLevelOfDetail0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13172 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13173 v7 = 2 * (12 * v0->field_1A4E + (unsigned __int8)*(&byte_4E2430[12 * v0->field_1A4E] + v4));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13174 v19 = pViewport->uViewportY + dword_4E20D0[v7 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13175 v17 = pViewport->uViewportX + dword_4E20D0[v7];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13176 if ( BYTE1(v6->pBits) & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13177 pRenderer->DrawTextureTransparent(v17, v19, v6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13178 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13179 pRenderer->DrawTextureIndexed(v17, v19, v6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13180 v8 = 2 * (12 * v0->field_1A4E + (unsigned __int8)*(&byte_4E2430[12 * v0->field_1A4E] + v4));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13181 pRenderer->_4A612A(dword_4E20D0[v8], dword_4E20D0[v8 + 1], (Texture *)v23[0], v4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13182 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13183 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13184 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13185 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13186 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13187 while ( v4 + v1 - 1 < v1 + 11 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13188 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13189 v9 = pMouse->GetCursorPos(&a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13190 v10 = pRenderer->pActiveZBuffer[v9->x + pSRZBufferLineOffsets[pMouse->GetCursorPos((POINT *)v23)->y]] & 0xFFFF;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13191 if ( v10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13192 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13193 v11 = dword_5063D8[v10];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13194 if ( v11->pLevelOfDetail0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13195 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13196 v21 = dword_5063D8[v10];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13197 v12 = 2 * (12 * v0->field_1A4E + (unsigned __int8)*(&byte_4E2430[12 * v0->field_1A4E] + v10));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13198 v20 = pViewport->uViewportY + dword_4E20D0[v12 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13199 v18 = pViewport->uViewportX + dword_4E20D0[v12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13200 if ( BYTE1(v11->pBits) & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13201 pRenderer->DrawTextureTransparent(v18, v20, v21);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13202 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13203 pRenderer->DrawTextureIndexed(v18, v20, v21);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13204 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13205 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13206 v13 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13207 a2.x = (LONG)&v0->pActiveSkills[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13208 v14 = (unsigned int)&v0->pActiveSkills[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13209 v15 = (unsigned int)&v0->pActiveSkills[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13210 v23[0] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13211 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13212 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13213 if ( *(short *)a2.x )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13214 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13215 if ( v0->field_1A4E == v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13216 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13217 v16 = *(Texture **)&pTextures_tabs[0][0].pName[8 * v13 + 4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13218 switch ( v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13219 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13220 case 0:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13221 v14 = 406;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13222 v22 = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13223 goto LABEL_27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13224 case 1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13225 v14 = 406;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13226 goto LABEL_38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13227 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13228 v14 = 406;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13229 v22 = 84;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13230 goto LABEL_27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13231 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13232 v14 = 406;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13233 goto LABEL_26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13234 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13235 v14 = 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13236 goto LABEL_29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13237 case 5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13238 v15 = 196;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13239 goto LABEL_34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13240 case 6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13241 v15 = 234;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13242 goto LABEL_34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13243 case 7:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13244 v15 = 272;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13245 goto LABEL_34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13246 case 8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13247 v15 = 309;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13248 LABEL_34:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13249 v14 = 405;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13250 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13251 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13252 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13253 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13254 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13255 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13256 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13257 v16 = *(Texture **)&pTextures_tabs[0][0].pName[8 * v13];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13258 switch ( v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13259 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13260 case 0:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13261 v14 = 415;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13262 v22 = 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13263 goto LABEL_27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13264 case 1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13265 v14 = 415;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13266 LABEL_38:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13267 v22 = 46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13268 goto LABEL_27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13269 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13270 v14 = 415;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13271 v22 = 83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13272 goto LABEL_27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13273 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13274 v14 = 415;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13275 LABEL_26:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13276 v22 = 121;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13277 LABEL_27:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13278 v15 = v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13279 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13280 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13281 v14 = 415;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13282 LABEL_29:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13283 v15 = 158;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13284 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13285 case 5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13286 v15 = 196;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13287 goto LABEL_46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13288 case 6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13289 v15 = 234;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13290 goto LABEL_46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13291 case 7:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13292 v15 = 271;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13293 goto LABEL_46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13294 case 8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13295 v15 = 307;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13296 LABEL_46:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13297 v14 = 416;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13298 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13299 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13300 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13301 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13302 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13303 pRenderer->DrawTextureTransparent(v14, v15, v16);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13304 v13 = v23[0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13305 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13306 a2.x += 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13307 ++v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13308 v23[0] = v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13309 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13310 while ( v13 < 9 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13311 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13312 // 506408: using guessed type int dword_506408[];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13313 // 50654C: using guessed type int dword_50654C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13314
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13315 //----- (00412E85) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13316 char __cdecl sub_412E85()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13317 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13318 unsigned int v0; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13319 unsigned int v1; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13320 int v2; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13321 const char *v3; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13322 signed int v4; // ecx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13323 int v5; // ecx@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13324 int v6; // eax@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13325 int v7; // esi@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13326 char *v8; // eax@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13327 int v9; // eax@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13328 unsigned int v11; // [sp-8h] [bp-64h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13329 unsigned int v12; // [sp-8h] [bp-64h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13330 Texture *v13; // [sp-4h] [bp-60h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13331 Texture *v14; // [sp-4h] [bp-60h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13332 GUIWindow a1; // [sp+8h] [bp-54h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13333
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13334 pRenderer->DrawTextureIndexed(pViewport->uViewportX, pViewport->uViewportY, pTextures_5064A0[11]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13335 if ( dword_506548 || !dword_506528 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13336 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13337 v13 = pTex_tab_an_6a__zoom_off;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13338 v11 = pViewport->uViewportY + 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13339 v0 = pViewport->uViewportX + 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13340 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13341 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13342 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13343 v13 = pTex_tab_an_6b__zoom_on;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13344 v11 = pViewport->uViewportY + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13345 v0 = pViewport->uViewportX + 398;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13346 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13347 pRenderer->DrawTextureTransparent(v0, v11, v13);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13348 if ( dword_506544 || dword_506528 + dword_506520 >= dword_506524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13349 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13350 v14 = pTex_tab_an_7a__zoot_off;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13351 v12 = pViewport->uViewportY + 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13352 v1 = pViewport->uViewportX + 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13353 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13354 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13355 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13356 v14 = pTex_tab_an_7b__zoot_on;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13357 v12 = pViewport->uViewportY + 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13358 v1 = pViewport->uViewportX + 398;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13359 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13360 pRenderer->DrawTextureTransparent(v1, v12, v14);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13361 if ( !byte_5C6D50[dword_506528] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13362 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13363 v2 = pStru179->field_0[dword_506528];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13364 a1.uFrameWidth = 460;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13365 a1.uFrameX = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13366 a1.uFrameY = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13367 a1.uFrameHeight = 344;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13368 v3 = (const char *)pStorylineText->field_4[3 * v2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13369 a1.uFrameZ = 467;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13370 a1.uFrameW = 351;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13371 if ( v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13372 a1.DrawText2(pBook2Font, 0, 0x16u, 0, v3, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13373 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13374 a1.uFrameX = 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13375 a1.uFrameY = 70;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13376 a1.uFrameWidth = 360;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13377 a1.uFrameHeight = 264;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13378 v4 = LOBYTE(pAutonoteFont->uFontHeight) - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13379 a1.uFrameZ = 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13380 a1.uFrameHeight = v4 * 264 / v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13381 a1.uFrameW = a1.uFrameHeight + 69;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13382 if ( dword_506544 && dword_506528 + dword_506520 < dword_506524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13383 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13384 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13385 v5 = dword_50651C++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13386 dword_506528 += dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13387 byte_506130[v5] = dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13388 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13389 if ( dword_506548 && dword_50651C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13390 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13391 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13392 --dword_50651C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13393 dword_506528 -= (unsigned __int8)byte_506130[dword_50651C];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13394 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13395 if ( !dword_506520 || dword_506528 < 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13396 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13397 dword_506528 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13398 dword_50651C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13399 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13400 dword_506544 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13401 v6 = pStru179->field_0[dword_506528];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13402 dword_506548 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13403 dword_506520 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13404 v7 = *(&pStorylineText->field_0 + 3 * v6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13405 v8 = sub_495461(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13406 *((char **)&pStorylineText->field_0 + 3 * v6),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13407 uActiveCharacter - 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13408 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13409 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13410 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13411 (__int64 *)&pParty->field_3C.field_440[2 * v6 + 42]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13412 if ( v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13413 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13414 v9 = pAutonoteFont->_44C6C2(v8, &a1, 1u, (unsigned __int8)byte_5C6D50[dword_506528]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13415 LOBYTE(v8) = a1.DrawText(pAutonoteFont, 1, 0, 0, (const char *)v9, 0, a1.uFrameY + a1.uFrameHeight, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13416 ++dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13417 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13418 return (char)v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13419 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13420
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13421
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13422 //----- (00413126) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13423 void __cdecl DrawSpellbook_Quests()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13424 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13425 unsigned int v0; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13426 unsigned int v1; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13427 int v2; // ecx@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13428 int v3; // ebx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13429 int v4; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13430 const char *v5; // edi@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13431 int v6; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13432 unsigned int v7; // edi@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13433 unsigned int v8; // [sp-8h] [bp-68h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13434 unsigned int v9; // [sp-8h] [bp-68h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13435 Texture *v10; // [sp-4h] [bp-64h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13436 Texture *v11; // [sp-4h] [bp-64h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13437 GUIWindow a1; // [sp+Ch] [bp-54h]@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13438
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13439 pRenderer->DrawTextureIndexed(pViewport->uViewportX, pViewport->uViewportY, pTexture_CurrentBook);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13440 if ( dword_506548 || !dword_506528 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13441 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13442 v10 = pTex_tab_an_6a__zoom_off;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13443 v8 = pViewport->uViewportY + 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13444 v0 = pViewport->uViewportX + 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13445 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13446 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13447 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13448 v10 = pTex_tab_an_6b__zoom_on;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13449 v8 = pViewport->uViewportY + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13450 v0 = pViewport->uViewportX + 398;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13451 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13452 pRenderer->DrawTextureTransparent(v0, v8, v10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13453 if ( dword_506544 || dword_506528 + dword_506520 >= dword_506524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13454 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13455 v11 = pTex_tab_an_7a__zoot_off;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13456 v9 = pViewport->uViewportY + 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13457 v1 = pViewport->uViewportX + 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13458 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13459 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13460 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13461 v11 = pTex_tab_an_7b__zoot_on;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13462 v9 = pViewport->uViewportY + 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13463 v1 = pViewport->uViewportX + 398;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13464 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13465 pRenderer->DrawTextureTransparent(v1, v9, v11);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13466 a1.uFrameWidth = 460;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13467 a1.uFrameHeight = 344;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13468 a1.uFrameX = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13469 a1.uFrameY = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13470 a1.uFrameZ = 467;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13471 a1.uFrameW = 351;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13472 a1.DrawText2(pBook2Font, 0, 0x16u, 0, pGlobalTXT_LocalizationStrings[174], 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13473 a1.uFrameX = 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13474 a1.uFrameY = 70;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13475 a1.uFrameWidth = 360;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13476 a1.uFrameHeight = 264;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13477 a1.uFrameZ = 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13478 a1.uFrameW = 333;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13479 if ( dword_506544 && dword_506528 + dword_506520 < dword_506524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13480 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13481 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13482 v2 = dword_50651C++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13483 dword_506528 += dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13484 byte_506130[v2] = dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13485 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13486 if ( dword_506548 && dword_50651C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13487 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13488 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13489 --dword_50651C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13490 dword_506528 -= (unsigned __int8)byte_506130[dword_50651C];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13491 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13492 if ( !dword_506520 || (v3 = dword_506528, dword_506528 < 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13493 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13494 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13495 dword_50651C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13496 dword_506528 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13497 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13498 dword_506544 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13499 dword_506548 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13500 dword_506520 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13501 while ( v3 < dword_506524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13502 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13503 v4 = pStru179->field_0[v3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13504 ++dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13505 v5 = (&dword_722F10)[4 * v4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13506 a1.DrawText(pAutonoteFont, 1, 0, 0, (&dword_722F10)[4 * v4], 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13507 v6 = pAutonoteFont->CalcTextHeight(v5, &a1, 1, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13508 v7 = a1.uFrameY + v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13509 if ( (signed int)(a1.uFrameY + v6) > (signed int)a1.uFrameHeight )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13510 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13511 pRenderer->DrawTextureTransparent(0x64u, v7 + 12, pTextures_5064A0[10]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13512 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13513 a1.uFrameY = v7 + 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13514 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13515 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13516
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13517
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13518 //----- (0041338E) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13519 void __cdecl DrawSpellbook_Autonotes()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13520 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13521 unsigned int v0; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13522 unsigned int v1; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13523 signed int v2; // ebp@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13524 unsigned int v3; // eax@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13525 unsigned int v4; // eax@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13526 unsigned int v5; // eax@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13527 unsigned int v6; // eax@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13528 unsigned int v7; // eax@42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13529 signed int v8; // ebp@47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13530 int v9; // eax@52
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13531 int v10; // eax@56
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13532 int v11; // edx@57
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13533 int v12; // ebp@64
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13534 int v13; // eax@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13535 const char *v14; // edi@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13536 int v15; // eax@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13537 unsigned int v16; // edi@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13538 unsigned int v17; // [sp-8h] [bp-70h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13539 unsigned int v18; // [sp-8h] [bp-70h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13540 unsigned int v19; // [sp-8h] [bp-70h]@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13541 unsigned int v20; // [sp-8h] [bp-70h]@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13542 unsigned int v21; // [sp-8h] [bp-70h]@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13543 unsigned int v22; // [sp-8h] [bp-70h]@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13544 unsigned int v23; // [sp-8h] [bp-70h]@42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13545 Texture *v24; // [sp-4h] [bp-6Ch]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13546 Texture *v25; // [sp-4h] [bp-6Ch]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13547 Texture *v26; // [sp-4h] [bp-6Ch]@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13548 Texture *v27; // [sp-4h] [bp-6Ch]@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13549 Texture *v28; // [sp-4h] [bp-6Ch]@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13550 Texture *v29; // [sp-4h] [bp-6Ch]@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13551 Texture *v30; // [sp-4h] [bp-6Ch]@42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13552 signed __int16 v31; // [sp+10h] [bp-58h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13553 char *v32; // [sp+10h] [bp-58h]@49
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13554 GUIWindow a1; // [sp+14h] [bp-54h]@46
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13555
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13556 v31 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13557 pRenderer->DrawTextureIndexed(pViewport->uViewportX, pViewport->uViewportY, pTexture_AutonotesBook);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13558 if ( dword_506548 || !dword_506528 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13559 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13560 v24 = pTex_tab_an_6a__zoom_off;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13561 v17 = pViewport->uViewportY + 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13562 v0 = pViewport->uViewportX + 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13563 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13564 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13565 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13566 v24 = pTex_tab_an_6b__zoom_on;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13567 v17 = pViewport->uViewportY + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13568 v0 = pViewport->uViewportX + 398;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13569 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13570 pRenderer->DrawTextureTransparent(v0, v17, v24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13571 if ( dword_506544 || dword_506528 + dword_506520 >= dword_506524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13572 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13573 v25 = pTex_tab_an_7a__zoot_off;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13574 v18 = pViewport->uViewportY + 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13575 v1 = pViewport->uViewportX + 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13576 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13577 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13578 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13579 v25 = pTex_tab_an_7b__zoot_on;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13580 v18 = pViewport->uViewportY + 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13581 v1 = pViewport->uViewportX + 398;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13582 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13583 pRenderer->DrawTextureTransparent(v1, v18, v25);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13584 if ( !dword_506540 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13585 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13586 if ( dword_506568 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13587 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13588 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13589 pViewport->uViewportX + 408,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13590 pViewport->uViewportY + 113,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13591 pTexture_506390);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13592 v2 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13593 goto LABEL_16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13594 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13595 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13596 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13597 if ( !dword_506568 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13598 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13599 LABEL_14:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13600 v2 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13601 goto LABEL_15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13602 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13603 v2 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13604 v31 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13605 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13606 LABEL_15:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13607 dword_506568 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13608 pRenderer->DrawTextureTransparent(pViewport->uViewportX + 398, pViewport->uViewportY + 113, pTexture_506394);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13609 LABEL_16:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13610 if ( dword_50653C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13611 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13612 if ( dword_506568 != v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13613 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13614 v31 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13615 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13616 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13617 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13618 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13619 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13620 if ( dword_506568 != v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13621 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13622 v26 = pTexture_506388;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13623 v19 = pViewport->uViewportY + 150;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13624 v3 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13625 goto LABEL_22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13626 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13627 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13628 v26 = pTexture_50638C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13629 dword_506568 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13630 v19 = pViewport->uViewportY + 150;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13631 v3 = pViewport->uViewportX + 399;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13632 LABEL_22:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13633 pRenderer->DrawTextureTransparent(v3, v19, v26);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13634 if ( dword_506538 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13635 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13636 if ( dword_506568 != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13637 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13638 v31 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13639 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13640 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13641 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13642 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13643 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13644 if ( dword_506568 != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13645 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13646 v27 = pTexture_506380;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13647 v20 = pViewport->uViewportY + 188;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13648 v4 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13649 goto LABEL_28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13650 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13651 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13652 v27 = pTexture_506384;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13653 dword_506568 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13654 v20 = pViewport->uViewportY + 188;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13655 v4 = pViewport->uViewportX + 397;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13656 LABEL_28:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13657 pRenderer->DrawTextureTransparent(v4, v20, v27);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13658 if ( dword_506534 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13659 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13660 if ( dword_506568 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13661 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13662 v31 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13663 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13664 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13665 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13666 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13667 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13668 if ( dword_506568 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13669 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13670 v28 = pTexture_506378;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13671 v21 = pViewport->uViewportY + 226;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13672 v5 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13673 goto LABEL_34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13674 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13675 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13676 v28 = pTexture_50637C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13677 dword_506568 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13678 v21 = pViewport->uViewportY + 226;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13679 v5 = pViewport->uViewportX + 397;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13680 LABEL_34:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13681 pRenderer->DrawTextureTransparent(v5, v21, v28);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13682 if ( dword_506530 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13683 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13684 if ( dword_506568 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13685 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13686 v31 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13687 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13688 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13689 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13690 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13691 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13692 if ( dword_506568 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13693 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13694 v29 = pTexture_506370;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13695 v22 = pViewport->uViewportY + 263;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13696 v6 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13697 goto LABEL_40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13698 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13699 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13700 v29 = pTexture_506374;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13701 dword_506568 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13702 v22 = pViewport->uViewportY + 264;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13703 v6 = pViewport->uViewportX + 397;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13704 LABEL_40:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13705 pRenderer->DrawTextureTransparent(v6, v22, v29);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13706 if ( dword_50652C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13707 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13708 if ( dword_506568 != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13709 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13710 v31 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13711 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13712 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13713 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13714 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13715 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13716 if ( dword_506568 != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13717 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13718 v30 = pTexture_506368;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13719 v23 = pViewport->uViewportY + 302;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13720 v7 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13721 goto LABEL_46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13722 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13723 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13724 v30 = pTexture_50636C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13725 dword_506568 = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13726 v23 = pViewport->uViewportY + 302;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13727 v7 = pViewport->uViewportX + 397;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13728 LABEL_46:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13729 pRenderer->DrawTextureTransparent(v7, v23, v30);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13730 a1.uFrameWidth = 460;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13731 a1.uFrameHeight = 344;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13732 a1.uFrameX = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13733 a1.uFrameY = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13734 a1.uFrameZ = 467;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13735 a1.uFrameW = 467;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13736 a1.DrawText2(pBook2Font, 0, 0x16u, 0, pGlobalTXT_LocalizationStrings[154], 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13737 a1.uFrameX = 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13738 a1.uFrameY = 70;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13739 a1.uFrameWidth = 360;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13740 a1.uFrameHeight = 264;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13741 a1.uFrameZ = 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13742 a1.uFrameW = 333;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13743 if ( v31 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13744 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13745 dword_506524 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13746 dword_506528 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13747 dword_50651C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13748 dword_506520 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13749 v8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13750 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13751 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13752 if ( dword_72371C[2 * v8] == dword_506568 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13753 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13754 v32 = (&dword_723718_autonote_related)[8 * (signed __int16)v8];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13755 if ( (short)v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13756 {
26
93bf1d5f6a6d Game loading.
Nomad
parents: 23
diff changeset
13757 if ( (unsigned __int16)_449B57_test_bit(pParty->_autonote_bits, v8) && v32 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13758 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13759 v9 = dword_506520++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13760 pStru179->field_0[v9] = (signed __int16)v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13761 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13762 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13763 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13764 ++v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13765 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13766 while ( v8 < 196 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13767 dword_506524 = dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13768 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13769 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13770 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13771 if ( dword_506544 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13772 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13773 v10 = dword_506520 + dword_506528;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13774 if ( dword_506520 + dword_506528 < dword_506524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13775 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13776 v11 = dword_50651C++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13777 byte_506130[v11] = dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13778 dword_506528 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13779 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13780 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13781 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13782 if ( dword_506548 && dword_50651C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13783 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13784 --dword_50651C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13785 dword_506528 -= (unsigned __int8)byte_506130[dword_50651C];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13786 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13787 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13788 if ( !dword_506520 || dword_506528 < 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13789 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13790 dword_506528 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13791 dword_50651C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13792 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13793 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13794 v12 = dword_506528;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13795 dword_50652C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13796 dword_506544 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13797 dword_506548 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13798 dword_506520 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13799 dword_506530 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13800 dword_506534 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13801 dword_506538 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13802 dword_50653C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13803 dword_506540 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13804 while ( v12 < dword_506524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13805 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13806 v13 = pStru179->field_0[v12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13807 ++dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13808 v14 = (&dword_723718_autonote_related)[8 * v13];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13809 a1.DrawText(pAutonoteFont, 1, 0, 0, (&dword_723718_autonote_related)[8 * v13], 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13810 v15 = pAutonoteFont->CalcTextHeight(v14, &a1, 1, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13811 v16 = a1.uFrameY + v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13812 if ( (signed int)(a1.uFrameY + v15) > (signed int)a1.uFrameHeight )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13813 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13814 pRenderer->DrawTextureTransparent(0x64u, v16 + 12, pTextures_5064A0[10]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13815 ++v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13816 a1.uFrameY = v16 + 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13817 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13818 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13819
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13820
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13821 //----- (00413980) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13822 char *__cdecl DrawSpellbook_Map()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13823 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13824 unsigned int v0; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13825 unsigned int v1; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13826 unsigned int v2; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13827 unsigned int v3; // eax@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13828 unsigned int v4; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13829 unsigned int v5; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13830 int v6; // eax@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13831 unsigned int v7; // eax@35
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13832 unsigned int v9; // [sp-8h] [bp-E0h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13833 unsigned int v10; // [sp-8h] [bp-E0h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13834 unsigned int v11; // [sp-8h] [bp-E0h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13835 unsigned int v12; // [sp-8h] [bp-E0h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13836 unsigned int v13; // [sp-8h] [bp-E0h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13837 unsigned int v14; // [sp-8h] [bp-E0h]@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13838 Texture *v15; // [sp-4h] [bp-DCh]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13839 Texture *v16; // [sp-4h] [bp-DCh]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13840 Texture *v17; // [sp-4h] [bp-DCh]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13841 Texture *v18; // [sp-4h] [bp-DCh]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13842 Texture *v19; // [sp-4h] [bp-DCh]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13843 Texture *v20; // [sp-4h] [bp-DCh]@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13844 char Str[120]; // [sp+Ch] [bp-CCh]@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13845 GUIWindow v22; // [sp+84h] [bp-54h]@35
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13846
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13847 pRenderer->DrawTextureIndexed(pViewport->uViewportX, pViewport->uViewportY, pTextures_5064A0[12]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13848 if ( dword_506548 || viewparams->field_2C / 128 >= 12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13849 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13850 v15 = pTex_tab_an_6a__zoom_off;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13851 v9 = pViewport->uViewportY + 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13852 v0 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13853 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13854 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13855 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13856 v15 = pTex_tab_an_6b__zoom_on;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13857 v9 = pViewport->uViewportY + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13858 v0 = pViewport->uViewportX + 398;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13859 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13860 pRenderer->DrawTextureTransparent(v0, v9, v15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13861 if ( dword_506544 || viewparams->field_2C / 128 <= 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13862 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13863 v16 = pTex_tab_an_7a__zoot_off;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13864 v10 = pViewport->uViewportY + 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13865 v1 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13866 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13867 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13868 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13869 v16 = pTex_tab_an_7b__zoot_on;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13870 v10 = pViewport->uViewportY + 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13871 v1 = pViewport->uViewportX + 398;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13872 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13873 pRenderer->DrawTextureTransparent(v1, v10, v16);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13874 if ( dword_506540 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13875 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13876 v17 = pTexture_506390;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13877 v11 = pViewport->uViewportY + 113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13878 v2 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13879 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13880 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13881 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13882 v17 = pTexture_506394;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13883 v11 = pViewport->uViewportY + 113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13884 v2 = pViewport->uViewportX + 398;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13885 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13886 pRenderer->DrawTextureTransparent(v2, v11, v17);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13887 if ( dword_50653C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13888 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13889 v18 = pTexture_506388;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13890 v12 = pViewport->uViewportX + 150;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13891 v3 = pViewport->uViewportY + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13892 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13893 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13894 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13895 v18 = pTexture_50638C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13896 v12 = pViewport->uViewportX + 150;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13897 v3 = pViewport->uViewportY + 399;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13898 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13899 pRenderer->DrawTextureTransparent(v3, v12, v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13900 if ( dword_506538 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13901 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13902 v19 = pTexture_506380;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13903 v13 = pViewport->uViewportY + 188;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13904 v4 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13905 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13906 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13907 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13908 v19 = pTexture_506384;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13909 v13 = pViewport->uViewportY + 188;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13910 v4 = pViewport->uViewportX + 397;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13911 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13912 pRenderer->DrawTextureTransparent(v4, v13, v19);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13913 if ( dword_506534 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13914 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13915 v20 = pTexture_506378;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13916 v14 = pViewport->uViewportY + 226;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13917 v5 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13918 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13919 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13920 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13921 v20 = pTexture_50637C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13922 v14 = pViewport->uViewportY + 226;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13923 v5 = pViewport->uViewportX + 397;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13924 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13925 pRenderer->DrawTextureTransparent(v5, v14, v20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13926 if ( dword_506544 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13927 viewparams->_443291();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13928 if ( dword_506548 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13929 viewparams->_443249();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13930 if ( dword_506540 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13931 viewparams->_443219();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13932 if ( dword_50653C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13933 viewparams->_443231();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13934 if ( dword_506538 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13935 viewparams->_44323D();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13936 v6 = dword_506534;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13937 if ( dword_506534 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13938 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13939 viewparams->_443225();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13940 v6 = dword_506534;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13941 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13942 if ( dword_506548 | dword_506544 | dword_506540 | dword_50653C | dword_506538 | v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13943 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13944 dword_506548 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13945 dword_506544 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13946 dword_506534 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13947 dword_506538 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13948 dword_50653C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13949 dword_506540 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13950 DrawSpellbook_Map_sub(0x61u, 0x31u, 0x169u, 313, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13951 pRenderer->DrawTextureTransparent(0x4Bu, 0x16u, pTexture_mapbordr);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13952 v22.uFrameWidth = 460;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13953 v22.uFrameHeight = 344;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13954 v22.uFrameX = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13955 v22.uFrameY = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13956 v22.uFrameZ = 467;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13957 v22.uFrameW = 467;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13958 v7 = pMapStats->GetMapInfo(pCurrentMapName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13959 if ( v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13960 v22.DrawText2(pBook2Font, 0xFFFFFFF2u, 0xCu, 0, pMapStats->pInfos[v7].pName, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13961 v22.uFrameX = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13962 sprintfex(Str, pGlobalTXT_LocalizationStrings[659], pParty->vPosition.x, pParty->vPosition.z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13963 return v22.DrawText2(pFontComic, 0, 0x140u, 0, Str, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13964 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13965
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13966
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13967 //----- (00413CC6) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13968 void __thiscall DrawSpellbook(unsigned int uBook)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13969 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13970 unsigned int v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13971
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13972 v1 = uBook;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13973 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13974 471u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13975 445u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13976 (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13977 switch ( v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13978 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13979 case 0xB1u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13980 DrawLloydBeaconsScreen();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13981 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13982 case 0xC3u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13983 DrawTownPortalScreen();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13984 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13985 case 0xC8u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13986 DrawSpellbook_Quests();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13987 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13988 case 0xC9u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13989 DrawSpellbook_Autonotes();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13990 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13991 case 0xCAu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13992 DrawSpellbook_Map();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13993 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13994 case 0xCBu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13995 DrawSpellbook_Calendar();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13996 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13997 case 0xE0u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13998 sub_412E85();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13999 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14000 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14001 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14002
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14003 //----- (00413D3C) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14004 char *__cdecl GetDayPart()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14005 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14006 if ( pParty->uCurrentHour > 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14007 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14008 if ( pParty->uCurrentHour == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14009 return pGlobalTXT_LocalizationStrings[55];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14010 if ( pParty->uCurrentHour == 20 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14011 return pGlobalTXT_LocalizationStrings[566];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14012 if ( pParty->uCurrentHour <= 0x14 || pParty->uCurrentHour > 0x17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14013 return pGlobalTXT_LocalizationStrings[56];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14014 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14015 return pGlobalTXT_LocalizationStrings[567];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14016 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14017
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14018 //----- (00413D6F) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14019 char __cdecl DrawSpellbook_Calendar()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14020 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14021 unsigned int v0; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14022 char *v1; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14023 int v2; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14024 char *v3; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14025 GUIWindow a1; // [sp+Ch] [bp-60h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14026 unsigned int v6; // [sp+60h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14027 int v7; // [sp+64h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14028 int a5; // [sp+68h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14029
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14030 v0 = pParty->uCurrentHour;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14031 v6 = pMapStats->GetMapInfo(pCurrentMapName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14032 a5 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0x4Bu, 0x4Bu, 0x4Bu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14033 pRenderer->DrawTextureIndexed(pViewport->uViewportX, pViewport->uViewportY, pTextures_5064A0[13]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14034 v7 = (unsigned __int8)pDayMoonPhase[pParty->uDaysPlayed];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14035 if ( (signed int)v0 <= 12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14036 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14037 if ( !v0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14038 v0 = 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14039 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14040 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14041 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14042 v0 -= 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14043 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14044 a1.uFrameX = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14045 a1.uFrameY = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14046 a1.uFrameWidth = 460;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14047 a1.uFrameHeight = 344;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14048 a1.uFrameZ = 467;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14049 a1.uFrameW = 467;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14050 a1.DrawText2(pBook2Font, 0, 0x16u, 0, pGlobalTXT_LocalizationStrings[186], 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14051 v1 = GetDayPart();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14052 sprintfex(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14053 pTmpBuf,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14054 "%s\t100:\t110%d:%02d %s - %s",
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14055 pGlobalTXT_LocalizationStrings[526],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14056 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14057 pParty->uCurrentMinute,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14058 aAMPMNames[v2],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14059 v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14060 a1.DrawText(pBookFont, 70, 55, a5, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14061 sprintfex(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14062 pTmpBuf,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14063 "%s\t100:\t110%d - %s",
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14064 pGlobalTXT_LocalizationStrings[56],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14065 pParty->uDaysPlayed + 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14066 aDayNames[pParty->uDaysPlayed % 7]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14067 a1.DrawText(pBookFont, 70, 2 * LOBYTE(pBookFont->uFontHeight) + 49, a5, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14068 sprintfex(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14069 pTmpBuf,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14070 "%s\t100:\t110%d - %s",
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14071 pGlobalTXT_LocalizationStrings[146],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14072 pParty->uCurrentMonth + 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14073 aMonthNames[pParty->uCurrentMonth]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14074 a1.DrawText(pBookFont, 70, 4 * LOBYTE(pBookFont->uFontHeight) + 43, a5, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14075 sprintfex(pTmpBuf, "%s\t100:\t110%d", pGlobalTXT_LocalizationStrings[245], pParty->uCurrentYear);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14076 a1.DrawText(pBookFont, 70, 6 * LOBYTE(pBookFont->uFontHeight) + 37, a5, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14077 sprintfex(pTmpBuf, "%s\t100:\t110%s", pGlobalTXT_LocalizationStrings[530], aMoonPhaseNames[v7]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14078 a1.DrawText(pBookFont, 70, 8 * LOBYTE(pBookFont->uFontHeight) + 31, a5, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14079 if ( v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14080 v3 = pMapStats->pInfos[v6].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14081 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14082 v3 = "Unknown";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14083 sprintfex(pTmpBuf, "%s\t100:\t110%s", pGlobalTXT_LocalizationStrings[531], v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14084 return a1.DrawText(pBookFont, 70, 10 * LOBYTE(pBookFont->uFontHeight) + 25, a5, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14085 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14086
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14087 //----- (00413FF1) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14088 void __cdecl SetMonthNames()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14089 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14090 aMonthNames[0] = pGlobalTXT_LocalizationStrings[415];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14091 aMonthNames[1] = pGlobalTXT_LocalizationStrings[416];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14092 aMonthNames[2] = pGlobalTXT_LocalizationStrings[417];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14093 aMonthNames[3] = pGlobalTXT_LocalizationStrings[418];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14094 aMonthNames[4] = pGlobalTXT_LocalizationStrings[419];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14095 aMonthNames[5] = pGlobalTXT_LocalizationStrings[420];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14096 aMonthNames[6] = pGlobalTXT_LocalizationStrings[421];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14097 aMonthNames[7] = pGlobalTXT_LocalizationStrings[422];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14098 aMonthNames[8] = pGlobalTXT_LocalizationStrings[423];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14099 aMonthNames[9] = pGlobalTXT_LocalizationStrings[424];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14100 aMonthNames[10] = pGlobalTXT_LocalizationStrings[425];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14101 aMonthNames[11] = pGlobalTXT_LocalizationStrings[426];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14102 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14103
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14104 //----- (0041406F) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14105 void __cdecl SetDayNames()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14106 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14107 aDayNames[0] = pGlobalTXT_LocalizationStrings[145];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14108 aDayNames[1] = pGlobalTXT_LocalizationStrings[230];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14109 aDayNames[2] = pGlobalTXT_LocalizationStrings[243];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14110 aDayNames[3] = pGlobalTXT_LocalizationStrings[227];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14111 aDayNames[4] = pGlobalTXT_LocalizationStrings[91];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14112 aDayNames[5] = pGlobalTXT_LocalizationStrings[188];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14113 aDayNames[6] = pGlobalTXT_LocalizationStrings[222];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14114 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14115
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14116 //----- (004140BB) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14117 void __cdecl SetSpellSchoolNames()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14118 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14119 aSpellSchoolNames[0] = pGlobalTXT_LocalizationStrings[87];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14120 aSpellSchoolNames[1] = pGlobalTXT_LocalizationStrings[6];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14121 aSpellSchoolNames[2] = pGlobalTXT_LocalizationStrings[240];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14122 aSpellSchoolNames[3] = pGlobalTXT_LocalizationStrings[70];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14123 aSpellSchoolNames[4] = pGlobalTXT_LocalizationStrings[214];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14124 aSpellSchoolNames[5] = pGlobalTXT_LocalizationStrings[142];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14125 aSpellSchoolNames[6] = pGlobalTXT_LocalizationStrings[29];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14126 aSpellSchoolNames[7] = pGlobalTXT_LocalizationStrings[133];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14127 aSpellSchoolNames[8] = pGlobalTXT_LocalizationStrings[54];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14128 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14130 //----- (0041411B) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14131 void __cdecl SetAttributeNames()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14132 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14133 aAttributeNames[0] = pGlobalTXT_LocalizationStrings[144];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14134 aAttributeNames[1] = pGlobalTXT_LocalizationStrings[116];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14135 aAttributeNames[2] = pGlobalTXT_LocalizationStrings[163];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14136 aAttributeNames[3] = pGlobalTXT_LocalizationStrings[75];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14137 aAttributeNames[4] = pGlobalTXT_LocalizationStrings[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14138 aAttributeNames[5] = pGlobalTXT_LocalizationStrings[211];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14139 aAttributeNames[6] = pGlobalTXT_LocalizationStrings[136];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14140 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14141
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14142 //----- (00414162) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14143 void __cdecl uGameUIFontMain_initialize()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14144 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14145 uGameUIFontMain = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xAu, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14146 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14147
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14148 //----- (00414174) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14149 void __cdecl uGameUIFontShadow_initialize()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14150 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14151 uGameUIFontShadow = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE6u, 214u, 193u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14152 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14153
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14154
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14155
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14156
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14157
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14158 //----- (004141CA) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14159 GUIWindow *__fastcall ModalWindow(const char *pStr, int a4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14160 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14161 const char *v2; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14162 int v3; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14163 GUIWindow *result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14164
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14165 v2 = pStr;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14166 v3 = a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14167 pEventTimer->Pause();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14168 dword_506F0C[0] = pCurrentScreen;
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
14169 result = GUIWindow::Create(0, 0, 640, 480, WINDOW_FinalWindow, v3, (int)v2);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14170 ptr_507BDC = result;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14171 pCurrentScreen = 22;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14172 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14173 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14174 // 4E28F8: using guessed type int pCurrentScreen;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14175
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14176 //----- (0041420D) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14177 void __cdecl sub_41420D_press_esc()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14178 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14179 GUIWindow v0; // [sp+4h] [bp-54h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14180
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14181 sprintfex(pTmpBuf2, "%s\n \n%s", ptr_507BDC->Hint, pGlobalTXT_LocalizationStrings[61]);// Press Escape
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14182 v0.Hint = pTmpBuf2;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14183 v0.uFrameWidth = 400;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14184 v0.uFrameHeight = 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14185 v0.uFrameX = 120;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14186 v0.uFrameY = 140;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14187 v0.uFrameZ = 519;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14188 v0.uFrameW = 239;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14189 v0.DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14190 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14191
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14192 //----- (0041426F) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14193 void __cdecl sub_41426F()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14194 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14195 GUIWindow *v0; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14196
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14197 v0 = ptr_507BDC;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14198 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14199 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14200 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)(int)ptr_507BDC->ptr_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14201 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14202 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14203 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14204 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14205 v0->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14206 ptr_507BDC = 0;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14207 pCurrentScreen = dword_506F0C[0];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14208 pEventTimer->Resume();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14209 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14210 // 4E28F8: using guessed type int pCurrentScreen;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14211
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14212 //----- (004142D3) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14213 char __cdecl GameMenuUI_DrawKeyBindings()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14214 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14215 unsigned int v0; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14216 int v1; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14217 unsigned int v2; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14218 GUIWindow *v3; // edx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14219 signed int v4; // ecx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14220 signed int v5; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14221 const char *v6; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14222 unsigned int v7; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14223 const char *v8; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14224 unsigned int v9; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14225 const char *v10; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14226 unsigned int v11; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14227 const char *v12; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14228 unsigned int v13; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14229 const char *v14; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14230 unsigned int v15; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14231 const char *v16; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14232 unsigned int v17; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14233 const char *v18; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14234 unsigned int v19; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14235 const char *v20; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14236 unsigned int v21; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14237 signed int v22; // ebp@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14238 const char *v23; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14239 unsigned int v24; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14240 const char *v25; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14241 unsigned int v26; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14242 const char *v27; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14243 unsigned int v28; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14244 const char *v29; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14245 unsigned int v30; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14246 const char *v31; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14247 unsigned int v32; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14248 const char *v33; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14249 unsigned int v34; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14250 const char *v35; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14251 unsigned int v36; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14252 const char *v37; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14253 unsigned int v38; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14254 const char *v39; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14255 unsigned int v40; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14256 const char *v41; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14257 unsigned int v42; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14258 const char *v43; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14259 unsigned int v44; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14260 const char *v45; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14261 unsigned int v46; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14262 const char *v47; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14263 unsigned int v48; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14264 const char *v49; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14265 unsigned int v50; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14266 const char *v51; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14267 unsigned int v52; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14268 const char *v53; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14269 unsigned int v54; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14270 const char *v55; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14271 unsigned int v56; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14272 const char *v57; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14273 unsigned int v58; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14274 unsigned int v59; // eax@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14275 int v61; // [sp-14h] [bp-28h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14276 const char *v62; // [sp-10h] [bp-24h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14277 int v63; // [sp-Ch] [bp-20h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14278 int v64; // [sp-8h] [bp-1Ch]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14279 unsigned int v65; // [sp-4h] [bp-18h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14280 unsigned int a5; // [sp+10h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14281
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14282 v0 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14283 a5 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14284 if ( byte_4E28FC )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14285 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14286 v1 = dword_507C0C + 15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14287 dword_507C0C = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14288 if ( v1 == 255 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14289 byte_4E28FC = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14290 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14291 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14292 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14293 v1 = dword_507C0C - 15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14294 dword_507C0C = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14295 if ( v1 == 15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14296 byte_4E28FC = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14297 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14298 v2 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(v1, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14299 v3 = pGUIWindow_CurrentMenu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14300 dword_507C08 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14301 if ( pGUIWindow_CurrentMenu->field_40 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14302 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14303 pPrevVirtualCidesMapping[dword_506E68] = pKeyActionMap->pPressedKeysBuffer[0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14304 memset(word_506E6C, 0, 0x1Cu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14305 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14306 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14307 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14308 v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14309 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14310 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14311 if ( v4 != v5 && pPrevVirtualCidesMapping[v4] == pPrevVirtualCidesMapping[v5] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14312 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14313 *((char *)word_506E6C + v4) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14314 *((char *)word_506E6C + v5) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14315 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14316 ++v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14317 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14318 while ( v5 < 28 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14319 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14320 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14321 while ( v4 < 28 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14322 dword_506E68 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14323 v3->field_40 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14324 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14325 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14326 8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14327 8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14328 (Texture *)(uTextureID_507BF4 != -1 ? &pIcons_LOD->pTextures[uTextureID_507BF4] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14329 if ( dword_506F08 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14330 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14331 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14332 0x13u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14333 0x12Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14334 (Texture *)(uTextureID_507C00 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C00] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14335 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, v0, ascii_4E2D5C, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14336 v6 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[0]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14337 v7 = sub_414D24(0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14338 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 142, v7, v6, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14339 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, v0, ascii_4E2D50, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14340 v8 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[1]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14341 v9 = sub_414D24(1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14342 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 163, v9, v8, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14343 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, v0, ascii_4E2D48, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14344 v10 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[2]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14345 v11 = sub_414D24(2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14346 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 184, v11, v10, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14347 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, v0, ascii_4E2D40, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14348 v12 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[3]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14349 v13 = sub_414D24(3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14350 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 205, v13, v12, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14351 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, v0, ascii_4E2D38, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14352 v14 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[4]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14353 v15 = sub_414D24(4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14354 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 226, v15, v14, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14355 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, v0, ascii_4E2D30, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14356 v16 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[5]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14357 v17 = sub_414D24(5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14358 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 247, v17, v16, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14359 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, v0, ascii_4E2D28, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14360 v18 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[6]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14361 v19 = sub_414D24(6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14362 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 268, v19, v18, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14363 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, v0, ascii_4E2D1C, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14364 v20 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[7]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14365 v21 = sub_414D24(7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14366 v22 = 350;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14367 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 142, v21, v20, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14368 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, a5, ascii_4E2D14, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14369 v23 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[8]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14370 v24 = sub_414D24(8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14371 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 163, v24, v23, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14372 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, a5, ascii_4E2D0C, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14373 v25 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[9]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14374 v26 = sub_414D24(9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14375 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 184, v26, v25, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14376 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, a5, ascii_4E2D04, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14377 v27 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[10]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14378 v28 = sub_414D24(10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14379 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 205, v28, v27, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14380 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, a5, ascii_4E2CFC, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14381 v29 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[11]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14382 v30 = sub_414D24(11);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14383 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 226, v30, v29, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14384 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, a5, ascii_4E2CF0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14385 v31 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[12]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14386 v32 = sub_414D24(12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14387 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 247, v32, v31, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14388 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, a5, ascii_4E2CE8, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14389 v65 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14390 v64 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14391 v63 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14392 v62 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[13]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14393 v61 = 13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14394 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14395 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14396 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14397 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14398 0x7Fu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14399 0x12Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14400 (Texture *)(uTextureID_507C04 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C04] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14401 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, v0, ascii_4E2CDC, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14402 v33 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[14]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14403 v34 = sub_414D24(14);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14404 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 142, v34, v33, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14405 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, v0, ascii_4E2CD4, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14406 v35 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[15]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14407 v36 = sub_414D24(15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14408 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 163, v36, v35, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14409 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, v0, ascii_4E2CC8, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14410 v37 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[16]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14411 v38 = sub_414D24(16);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14412 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 184, v38, v37, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14413 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, v0, ascii_4E2CBC, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14414 v39 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[17]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14415 v40 = sub_414D24(17);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14416 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 205, v40, v39, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14417 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, v0, ascii_4E2CB0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14418 v41 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[18]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14419 v42 = sub_414D24(18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14420 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 226, v42, v41, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14421 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, v0, ascii_4E2CA4, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14422 v43 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[19]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14423 v44 = sub_414D24(19);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14424 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 247, v44, v43, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14425 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, v0, ascii_4E2C9C, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14426 v45 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[20]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14427 v46 = sub_414D24(20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14428 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 268, v46, v45, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14429 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, v0, ascii_4E2C90, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14430 v47 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[21]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14431 v48 = sub_414D24(21);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14432 v22 = 350;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14433 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 142, v48, v47, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14434 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, a5, ascii_4E2C84, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14435 v49 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[22]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14436 v50 = sub_414D24(22);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14437 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 163, v50, v49, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14438 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, a5, ascii_4E2C7C, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14439 v51 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[23]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14440 v52 = sub_414D24(23);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14441 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 184, v52, v51, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14442 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, a5, ascii_4E2C70, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14443 v53 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[24]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14444 v54 = sub_414D24(24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14445 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 205, v54, v53, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14446 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, a5, ascii_4E2C68, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14447 v55 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[25]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14448 v56 = sub_414D24(25);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14449 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 226, v56, v55, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14450 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, a5, ascii_4E2C5C, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14451 v57 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[26]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14452 v58 = sub_414D24(26);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14453 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 247, v58, v57, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14454 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, a5, ascii_4E2C54, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14455 v65 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14456 v64 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14457 v63 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14458 v62 = pKeyActionMap->GetVKeyDisplayName(pWindowList_at_506F50_minus1_indexing[0]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14459 v61 = 27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14460 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14461 v59 = sub_414D24(v61);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14462 return pGUIWindow_CurrentMenu->DrawText(pFontLucida, v22, 268, v59, v62, v63, v64, v65);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14463 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14464
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14465
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14466 //----- (00414D24) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14467 unsigned int __thiscall sub_414D24(int _this)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14468 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14469 int v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14470 unsigned int v2; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14471 unsigned int v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14472 unsigned int result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14473
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14474 v1 = _this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14475 v2 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE1u, 0xCDu, 0x23u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14476 v3 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFu, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14477 result = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14478 if ( dword_506E68 == v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14479 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14480 if ( GetTickCount() % 0x3E8 <= 0x1F4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14481 result = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14482 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14483 result = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14484 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14485 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14486 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14487 if ( *((char *)word_506E6C + v1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14488 result = dword_507C08;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14489 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14490 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14491 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14492 // 506E68: using guessed type int dword_506E68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14493 // 506E6C: using guessed type __int16 word_506E6C[18];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14494 // 507C08: using guessed type int dword_507C08;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14495
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14496 //----- (00414D9A) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14497 void __cdecl GameMenuUI_DrawVideoOptions()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14498 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14499 const char *v0; // ST0C_4@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14500 unsigned __int16 v1; // ax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14501 int v2; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14502 GUIWindow v3; // [sp+8h] [bp-54h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14503
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14504 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14505 8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14506 8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14507 (Texture *)(uTextureID_507C10 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C10] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14508 if ( !pRenderer->bWindowMode && GammaController::IsGammaSupported() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14509 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14510 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14511 17 * uGammaPos + 42,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14512 162u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14513 (Texture *)(pTextureIDs_GammaPositions[uGammaPos] != -1 ? &pIcons_LOD->pTextures[pTextureIDs_GammaPositions[uGammaPos]] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14514 pRenderer->DrawTextureRGB(0x112u, 0xA9u, &stru_506E40);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14515 v3.uFrameX = 22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14516 v0 = pGlobalTXT_LocalizationStrings[226];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14517 v3.uFrameY = 190;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14518 v3.uFrameWidth = 211;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14519 v3.uFrameHeight = 79;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14520 v3.uFrameZ = 232;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14521 v3.uFrameW = 268;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14522 v1 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14523 v3.DrawText2(pFontSmallnum, 0, 0, v1, v0, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14524 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14525 if ( !pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14526 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14527 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14528 0x14u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14529 0x119u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14530 (Texture *)(uTextureID_507C50 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C50] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14531 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14532 0x14u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14533 0x12Fu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14534 (Texture *)(uTextureID_507C54 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C54] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14535 v2 = uTextureID_507C58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14536 goto LABEL_12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14537 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14538 if ( pGame->uFlags2 & 0x20 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14539 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14540 0x14u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14541 0x119u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14542 (Texture *)(uTextureID_507C14 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C14] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14543 if ( pRenderer->bUseColoredLights )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14544 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14545 0x14u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14546 0x12Fu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14547 (Texture *)(uTextureID_507C18 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C18] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14548 if ( pRenderer->bTinting )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14549 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14550 v2 = uTextureID_507C1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14551 LABEL_12:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14552 pRenderer->DrawTextureIndexed(0x14u, 0x145u, (Texture *)(v2 != -1 ? &pIcons_LOD->pTextures[v2] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14553 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14554 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14555
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14556
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14557
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14558 //----- (00414F82) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14559 void __cdecl sub_414F82_DrawGameOptions()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14560 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14561 signed int v0; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14562
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14563 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14564 8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14565 8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14566 (Texture *)(uTextureID_507944 != -1 ? &pIcons_LOD->pTextures[uTextureID_507944] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14567 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14568 8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14569 0x84u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14570 (Texture *)(uTextureID_507C60 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C60] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14571 v0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14572 if ( uTurnSpeed == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14573 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14574 v0 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14575 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14576 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14577 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14578 if ( uTurnSpeed == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14579 v0 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14580 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14581 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14582 dword_4E2910[v0],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14583 0x10Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14584 (Texture *)(uTextureID_507C64[v0] != -1 ? &pIcons_LOD->pTextures[uTextureID_507C64[v0]] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14585 if ( bWalkSound )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14586 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14587 0x14u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14588 0x12Fu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14589 (Texture *)(uTextureID_507CB4 != -1 ? &pIcons_LOD->pTextures[uTextureID_507CB4] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14590 if ( bShowDamage )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14591 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14592 0x80u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14593 0x12Fu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14594 (Texture *)(uTextureID_507CB8 != -1 ? &pIcons_LOD->pTextures[uTextureID_507CB8] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14595 if ( bFlipOnExit )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14596 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14597 0x80u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14598 0x145u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14599 (Texture *)(uTextureID_507C84 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C84] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14600 if ( bAlwaysRun )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14601 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14602 0x14u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14603 0x145u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14604 (Texture *)(uTextureID_507CB0 != -1 ? &pIcons_LOD->pTextures[uTextureID_507CB0] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14605 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14606 17 * (char)uSoundVolumeMultiplier + 265,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14607 0xA2u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14608 (Texture *)(pTextureIDs_SoundLevels[(char)uSoundVolumeMultiplier] != -1 ? &pIcons_LOD->pTextures[pTextureIDs_SoundLevels[(char)uSoundVolumeMultiplier]] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14609 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14610 17 * (char)uMusicVolimeMultiplier + 265,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14611 0xD8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14612 (Texture *)(pTextureIDs_SoundLevels[(char)uMusicVolimeMultiplier] != -1 ? &pIcons_LOD->pTextures[pTextureIDs_SoundLevels[(char)uMusicVolimeMultiplier]] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14613 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14614 17 * (char)uVoicesVolumeMultiplier + 265,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14615 0x10Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14616 (Texture *)(pTextureIDs_SoundLevels[(char)uVoicesVolumeMultiplier] != -1 ? &pIcons_LOD->pTextures[pTextureIDs_SoundLevels[(char)uVoicesVolumeMultiplier]] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14617 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14618
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14619
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14620
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14621
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14622 //----- (004151D9) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14623 void __fastcall DrawPopupWindow(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14624 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14625 unsigned int v4; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14626 Texture *v5; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14627 signed int uTileWidth; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14628 int v7; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14629 int v8; // ecx@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14630 unsigned int v9; // ebx@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14631 int v10; // [sp+10h] [bp-28h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14632 signed int uTileHeight; // [sp+18h] [bp-20h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14633 int v12; // [sp+1Ch] [bp-1Ch]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14634 int v13; // [sp+20h] [bp-18h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14635 int a5; // [sp+24h] [bp-14h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14636 unsigned int a5a; // [sp+24h] [bp-14h]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14637 unsigned int a4; // [sp+28h] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14638 int uNumXTiles; // [sp+2Ch] [bp-Ch]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14639 unsigned int uNumXTilesa; // [sp+2Ch] [bp-Ch]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14640 unsigned int uNumXTilesb; // [sp+2Ch] [bp-Ch]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14641 unsigned int a2a; // [sp+30h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14642 unsigned int v21; // [sp+34h] [bp-4h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14643 unsigned int v22; // [sp+34h] [bp-4h]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14644
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14645 v4 = uY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14646 a2a = uX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14647 a4 = uX + uWidth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14648 pRenderer->Clip(uX, v4, uX + uWidth, v4 + uHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14649 v5 = (Texture *)(uTextureID_Parchment != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Parchment] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14650 uTileWidth = (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureWidth : 24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14651 v13 = (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureWidth : 24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14652 uTileHeight = (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureHeight : 26);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14653 if ( (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureWidth : 24)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14654 && (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureHeight : 26) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14655 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14656 uNumXTiles = (signed int)uWidth / uTileWidth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14657 if ( (signed int)uWidth % uTileWidth )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14658 ++uNumXTiles;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14659 a5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14660 v21 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14661 v7 = uNumXTiles + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14662 v10 = uNumXTiles + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14663 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14664 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14665 uNumXTilesa = a2a - v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14666 if ( v7 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14667 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14668 v12 = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14669 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14670 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14671 uNumXTilesa += v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14672 pRenderer->DrawTextureIndexed(uNumXTilesa, v21, v5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14673 --v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14674 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14675 while ( v12 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14676 v7 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14677 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14678 v21 += uTileHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14679 v8 = a5++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14680 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14681 while ( v8 < (signed int)uHeight / uTileHeight );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14682 a5a = v4 + uHeight - 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14683 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14684 a2a,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14685 v4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14686 (Texture *)(uTextureID_5076AC != -1 ? &pIcons_LOD->pTextures[uTextureID_5076AC] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14687 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14688 a2a,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14689 a5a,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14690 (Texture *)(uTextureID_5076B4 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076B4] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14691 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14692 a4 - 32,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14693 v4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14694 (Texture *)(uTextureID_5076A8 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076A8] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14695 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14696 a4 - 32,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14697 a5a,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14698 (Texture *)(uTextureID_5076B0 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_5076B0] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14699 uNumXTilesb = a2a + 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14700 v22 = v4 + uHeight - 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14701 if ( (signed int)uWidth > 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14702 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14703 pRenderer->Clip(a2a + 32, v4, a4 - 32, v4 + uHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14704 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14705 uNumXTilesb,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14706 v4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14707 (Texture *)(uTextureID_507698 != -1 ? &pIcons_LOD->pTextures[uTextureID_507698] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14708 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14709 uNumXTilesb,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14710 v22,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14711 (Texture *)(uTextureID_5076A4 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076A4] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14712 if ( (signed int)uWidth > 512 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14713 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14714 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14715 a2a + 544,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14716 v4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14717 (Texture *)(uTextureID_507698 != -1 ? &pIcons_LOD->pTextures[uTextureID_507698] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14718 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14719 a2a + 544,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14720 v22,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14721 (Texture *)(uTextureID_5076A4 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076A4] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14722 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14723 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14724 v9 = v4 + 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14725 if ( (signed int)uHeight > 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14726 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14727 pRenderer->Clip(a2a, v9, a4, a5a);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14728 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14729 a2a,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14730 v9,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14731 (Texture *)(uTextureID_5076A0 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076A0] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14732 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14733 a4 - 10,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14734 v9,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14735 (Texture *)(uTextureID_50769C != -1 ? &pIcons_LOD->pTextures[uTextureID_50769C] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14736 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14737 pRenderer->ResetClip();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14738 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14739 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14740
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14741
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14742 //----- (00415485) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14743 char *__cdecl DrawCopyrightWindow()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14744 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14745 GUIWindow Dst; // [sp+8h] [bp-54h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14746
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14747 memset(&Dst, 0, 0x54u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14748 Dst.uFrameWidth = 624;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14749 Dst.uFrameHeight = 256;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14750 Dst.uFrameX = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14751 Dst.uFrameY = 30; // c 1999 The 3DO Company.
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14752 Dst.uFrameHeight = pFontSmallnum->CalcTextHeight(pGlobalTXT_LocalizationStrings[157], &Dst, 24, 0)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14753 + 2 * LOBYTE(pFontSmallnum->uFontHeight)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14754 + 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14755 Dst.uFrameY = 470 - Dst.uFrameHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14756 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14757 Dst.uFrameW = 469;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14758 Dst.DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14759 Dst.uFrameWidth -= 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14760 Dst.uFrameX += 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14761 Dst.uFrameY += 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14762 Dst.uFrameHeight -= 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14763 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14764 Dst.uFrameW = Dst.uFrameY + Dst.uFrameHeight - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14765 return Dst.DrawText2(pFontSmallnum, 0, 0xCu, 0, pGlobalTXT_LocalizationStrings[157], 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14766 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14767
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14768
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14769
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14770
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14771 //----- (004156F0) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14772 void __cdecl GUI_UpdateWindows()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14773 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14774 GUIWindow *v0; // esi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14775 unsigned int v1; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14776 int v2; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14777 int v3; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14778 int v4; // eax@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14779 int v5; // eax@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14780 int v6; // eax@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14781 int v7; // eax@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14782 int v8; // eax@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14783 int v9; // eax@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14784 void *v10; // eax@41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14785 int v11; // ecx@42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14786 int v12; // eax@48
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14787 int v13; // eax@49
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14788 int v14; // eax@57
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14789 int v15; // eax@58
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14790 int v16; // eax@59
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14791 int v17; // eax@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14792 int v18; // eax@61
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14793 int v19; // eax@62
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14794 void *v20; // ebp@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14795 char *v21; // edx@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14796 GUIButton *v22; // ebp@79
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14797 char *v23; // edx@80
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14798 char v24; // zf@81
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14799 unsigned int v25; // eax@91
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14800 int v26; // eax@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14801 unsigned int v27; // ebp@106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14802 GUIWindow *v28; // ecx@109
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14803 unsigned int v29; // eax@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14804 GUIFont *v30; // ST1C_4@115
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14805 int v31; // eax@115
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14806 void *v32; // ebp@118
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14807 int v33; // eax@119
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14808 int v34; // eax@120
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14809 int v35; // eax@121
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14810 int v36; // eax@122
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14811 int v37; // eax@123
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14812 int v38; // eax@124
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14813 int v39; // eax@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14814 char *v40; // edx@138
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14815 unsigned int v41; // eax@142
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14816 GUIButton *v42; // ebp@146
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14817 char *v43; // edx@146
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14818 unsigned int v44; // [sp-1Ch] [bp-124h]@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14819 unsigned int v45; // [sp-18h] [bp-120h]@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14820 Texture *v46; // [sp-14h] [bp-11Ch]@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14821 Texture *v47; // [sp-14h] [bp-11Ch]@86
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14822 int i; // [sp+0h] [bp-108h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14823 ItemGen _this; // [sp+4h] [bp-104h]@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14824 GUIButton Dst; // [sp+28h] [bp-E0h]@133
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14825 ItemGen v51; // [sp+E4h] [bp-24h]@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14826
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
14827 if (GetCurrentMenuID() != MENU_CREATEPARTY)
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
14828 sub_41CD4F(34);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14829 for ( i = 1; i <= uNumVisibleWindows; ++i )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14830 {
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
14831 //v0 = (GUIWindow *)&pWindowList_at_506F50_minus1_indexing[21 * pVisibleWindowsIdxs[i]];
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
14832 v0 = &pWindowList[pVisibleWindowsIdxs[i] - 1];
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
14833 v1 = v0->eWindowType;
3
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
14834
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
14835 switch (v0->eWindowType)
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
14836 {
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
14837 case WINDOW_MainMenu_Load:
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
14838 GameUI_MainMenu_DrawLoad();
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
14839 continue;
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14840
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14841 case WINDOW_5E: // window that initiates savegame loading
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14842 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14843 if (v0->Hint != (char *)1)
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14844 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14845 auto v20 = (GUIButton *)v0->ptr_1C;
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14846 pRenderer->DrawTextureIndexed(v0->uFrameX, v0->uFrameY, v20->pTextures[0]);
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14847 v21 = v0->Hint;
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14848 viewparams->bRedrawGameUI = 1;
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14849 if ( v21 && v21 != (char *)1 )
14
Nomad
parents: 4
diff changeset
14850 v20->DrawLabel(v21, pFontCreate, 0, 0);
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14851 v0->Release();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14852 if (pCurrentScreen == 11)
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14853 pMessageQueue_50CBD0->SendMessage(UIMSG_SaveGame, 0, 0);
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14854 else
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14855 pMessageQueue_50CBD0->SendMessage(UIMSG_LoadGame, 0, 0);
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14856 }
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14857 continue;
3
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
14858 }
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
14859
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
14860
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14861 if ( (signed int)v1 > 70 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14862 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14863 if ( (signed int)v1 > 95 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14864 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14865 v33 = v1 - 96;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14866 if ( !v33 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14867 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14868 if ( v0->Hint != (char *)1 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14869 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14870 v42 = (GUIButton *)v0->ptr_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14871 pRenderer->DrawTextureIndexed(v0->uFrameX, v0->uFrameY, v42->pTextures[0]);
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14872 v43 = v0->Hint;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14873 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14874 if ( v43 && v43 != (char *)1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14875 v42->DrawLabel(v43, pFontCreate, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14876 v0->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14877 if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14878 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14879 v41 = pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14880 LABEL_151:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14881 pMessageQueue_50CBD0->pMessages[v41].eType = (UIMessageType)113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14882 LABEL_152:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14883 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14884 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14885 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14886 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14887 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14888 v34 = v33 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14889 if ( v34 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14890 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14891 v35 = v34 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14892 if ( v35 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14893 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14894 v36 = v35 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14895 if ( v36 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14896 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14897 v37 = v36 - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14898 if ( v37 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14899 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14900 v38 = v37 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14901 if ( v38 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14902 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14903 if ( v38 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14904 GameMenuUI_DrawVideoOptions();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14905 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14906 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14907 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14908 GameMenuUI_DrawKeyBindings();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14909 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14910 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14911 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14912 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14913 v0->DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14914 v0->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14915 v0->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14916 if ( !pKeyActionMap->field_204 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14917 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14918 v51.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14919 v0->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14920 pEventTimer->Resume();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14921 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14922 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14923 v39 = atoi((const char *)pKeyActionMap->pPressedKeysBuffer);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14924 if ( v39 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14925 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14926 if ( v39 < 800 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14927 SpawnActor(v39);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14928 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14929 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14930 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14931 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14932 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14933 v46 = (Texture *)*((_DWORD *)v0->ptr_1C + 15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14934 v45 = v0->uFrameY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14935 v44 = v0->uFrameX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14936 LABEL_18:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14937 pRenderer->DrawTextureIndexed(v44, v45, v46);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14938 LABEL_114:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14939 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14940 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14941 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14942 memset(&Dst, 0, 0xBCu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14943 Dst.uZ = 197;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14944 Dst.uW = 197;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14945 Dst.uX = 27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14946 Dst.uY = 161;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14947 Dst.uWidth = 171;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14948 Dst.uHeight = 37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14949 Dst.pParent = pButton_RestUI_WaitUntilDawn->pParent;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14950 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14951 pRenderer->DrawTextureIndexed(v0->uFrameX, v0->uFrameY, *((Texture **)v0->ptr_1C + 15));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14952 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14953 Dst.DrawLabel(pGlobalTXT_LocalizationStrings[183], pFontCreate, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14954 Dst.pParent = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14955 goto LABEL_134;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14956 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14957 if ( v0->Hint != (char *)1 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14958 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14959 v32 = v0->ptr_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14960 pRenderer->DrawTextureIndexed(v0->uFrameX, v0->uFrameY, *((Texture **)v32 + 16));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14961 goto LABEL_138;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14962 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14963 if ( v1 == 95 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14964 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14965 if ( v0->Hint != (char *)1 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14966 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14967 v32 = v0->ptr_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14968 pRenderer->DrawTextureTransparent(v0->uFrameX, v0->uFrameY, *((Texture **)v32 + 15));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14969 LABEL_138:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14970 v40 = v0->Hint;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14971 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14972 if ( v40 && v40 != (char *)1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14973 ((GUIButton *)v32)->DrawLabel(v40, pFontCreate, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14974 v0->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14975 LABEL_142:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14976 v41 = pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14977 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14978 goto LABEL_151;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14979 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14980 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14981 v14 = v1 - 80;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14982 if ( v14 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14983 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14984 v15 = v14 - 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14985 if ( !v15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14986 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14987 v0->DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14988 v0->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14989 v0->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14990 if ( !pKeyActionMap->field_204 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14991 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14992 _this.Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14993 v0->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14994 pEventTimer->Resume();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14995 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14996 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14997 v26 = atoi((const char *)pKeyActionMap->pPressedKeysBuffer);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14998 if ( v26 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14999 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15000 if ( v26 < 800 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15001 {
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
15002 _this.uAttributes |= 1u;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15003 _this.uItemID = v26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15004 if ( pItemsTable->pItems[v26].uEquipType == 12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15005 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15006 _this.uNumCharges = rand() % 6 + pItemsTable->pItems[_this.uItemID].uDamageMod + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15007 _this.uMaxCharges = LOBYTE(_this.uNumCharges);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15008 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15009 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15010 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15011 if ( v26 >= 221 && v26 < 271 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15012 _this._bonus_type = rand() % 10 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15013 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15014 pItemsTable->SetSpecialBonus(&_this);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15015 pParty->SetHoldingItem(&_this);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15016 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15017 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15018 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15019 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15020 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15021 v16 = v15 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15022 if ( !v16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15023 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15024 if ( v0->Hint != (char *)1 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15025 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15026 v22 = (GUIButton *)v0->ptr_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15027 if ( (v22->uX & 0x80000000u) == 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15028 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15029 if ( (signed int)v22->uX <= 640 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15030 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15031 v25 = v22->uY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15032 if ( (v25 & 0x80000000u) == 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15033 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15034 if ( (signed int)v25 <= 480 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15035 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15036 v47 = v22->pTextures[0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15037 goto LABEL_94;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15038 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15039 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15040 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15041 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15042 v23 = v0->Hint;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15043 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15044 if ( v23 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15045 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15046 v24 = v23 == (char *)1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15047 goto LABEL_82;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15048 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15049 LABEL_134:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15050 v28 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15051 goto LABEL_110;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15052 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15053 v17 = v16 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15054 if ( !v17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15055 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15056 if ( v0->Hint != (char *)1 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15057 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15058 v22 = (GUIButton *)v0->ptr_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15059 v47 = v22->pTextures[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15060 LABEL_94:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15061 pRenderer->DrawTextureIndexed(v0->uFrameX, v0->uFrameY, v47);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15062 LABEL_80:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15063 v23 = v0->Hint;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15064 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15065 if ( v23 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15066 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15067 v24 = v23 == (char *)1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15068 LABEL_82:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15069 if ( !v24 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15070 v22->DrawLabel(v23, pFontCreate, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15071 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15072 goto LABEL_134;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15073 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15074 v18 = v17 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15075 if ( !v18 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15076 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15077 if ( v0->Hint != (char *)1 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15078 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15079 v22 = (GUIButton *)v0->ptr_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15080 pRenderer->DrawTextureTransparent(v0->uFrameX, v0->uFrameY, v22->pTextures[0]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15081 goto LABEL_80;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15082 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15083 v19 = v18 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15084 if ( !v19 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15085 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15086 if ( v0->Hint != (char *)1 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15087 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15088 pRenderer->DrawTextureTransparent(v0->uFrameX, v0->uFrameY, *((Texture **)v0->ptr_1C + 16));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15089 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15090 goto LABEL_134;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15091 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15092 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15093 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15094 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15095 v27 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15096 if ( ptr_507BD0->field_40 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15097 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15098 ptr_507BD0->DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15099 ptr_507BD0->DrawText(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15100 pFontCreate,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15101 30,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15102 40,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15103 v27,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15104 (const char *)pKeyActionMap->pPressedKeysBuffer,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15105 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15106 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15107 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15108 v30 = pFontCreate;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15109 v31 = pFontCreate->GetLineWidth((const char *)pKeyActionMap->pPressedKeysBuffer);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15110 ptr_507BD0->DrawFlashingInputCursor(v31 + 30, 40, v30);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15111 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15112 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15113 if ( ptr_507BD0->field_40 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15114 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15115 v29 = pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15116 v0->field_40 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15117 if ( (signed int)v29 < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15118 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15119 pMessageQueue_50CBD0->pMessages[v29].eType = (UIMessageType)(int)ptr_507BD0->ptr_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15120 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15121 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15122 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15123 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15124 pEventTimer->Resume();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15125 ptr_507BD0->Release();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15126 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15127 goto LABEL_114;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15128 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15129 if ( ptr_507BD0->field_40 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15130 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15131 v0->field_40 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15132 pEventTimer->Resume();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15133 v28 = ptr_507BD0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15134 LABEL_110:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15135 v28->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15136 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15137 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15138 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15139 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15140 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15141 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15142 if ( v1 == 70 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15143 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15144 sub_41420D_press_esc();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15145 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15146 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15147 if ( (signed int)v1 > 18 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15148 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15149 if ( (signed int)v1 > 25 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15150 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15151 v12 = v1 - 26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15152 if ( v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15153 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15154 v13 = v12 - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15155 if ( v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15156 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15157 if ( v13 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15158 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15159 pRenderer->ClearZBuffer(0, 479);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15160 draw_leather();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15161 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15162 CharacterUI_DrawPaperdoll(uActiveCharacter);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15163 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15164 ptr_5076F4->uX,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15165 ptr_5076F4->uY,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15166 (Texture *)(uTextureID_x_x_u != -1 ? &pIcons_LOD->pTextures[uTextureID_x_x_u] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15167 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15168 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15169 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15170 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15171 sub_467FB6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15172 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15173 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15174 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15175 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15176 TransitionUI_Draw();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15177 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15178 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15179 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15180 if ( v1 != 25 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15181 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15182 v7 = v1 - 19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15183 if ( v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15184 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15185 v8 = v7 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15186 if ( v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15187 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15188 v9 = v8 - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15189 if ( v9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15190 {
3
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
15191 //if ( v9 == 1 )
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
15192 // sub_4606F7();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15193 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15194 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15195 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15196 sub_4606FE();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15197 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15198 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15199 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15200 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15201 if ( pCurrentScreen == 10 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15202 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15203 Chest::DrawChestUI((unsigned int)v0->ptr_1C);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15204 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15205 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15206 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15207 if ( pCurrentScreen == 15 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15208 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15209 pRenderer->ClearZBuffer(0, 479);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15210 draw_leather();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15211 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15212 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15213 ptr_5076F4->uX,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15214 ptr_5076F4->uY,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15215 (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15216 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15217 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15218 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15219 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15220 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15221 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15222 DrawBranchlessDialogueUI();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15223 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15224 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15225 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15226 pWindowList[pVisibleWindowsIdxs[i] - 1]._4B3157();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15227 if ( !ptr_507BC0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15228 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15229 v10 = ptr_507BC0->ptr_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15230 if ( (signed int)v10 >= 53 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15231 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15232 v11 = pParty->field_3C._shop_ban_times[2 * (_DWORD)v10 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15233 if ( !__PAIR__(v11, pParty->field_3C._shop_ban_times[2 * (_DWORD)v10])
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15234 || v11 < SHIDWORD(pParty->uTimePlayed)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15235 || v11 <= SHIDWORD(pParty->uTimePlayed)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15236 && (unsigned int)pParty->field_3C._shop_ban_times[2 * (_DWORD)v10] <= LODWORD(pParty->uTimePlayed) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15237 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15238 if ( (signed int)v10 < 53 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15239 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15240 pParty->field_3C._shop_ban_times[2 * (_DWORD)v10] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15241 pParty->field_3C._shop_ban_times[2 * (_DWORD)v10 + 1] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15242 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15243 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15244 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15245 goto LABEL_142;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15246 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15247 if ( v1 == 18 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15248 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15249 sub_412B58();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15250 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15251 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15252 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15253 if ( (signed int)v1 > 10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15254 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15255 v5 = v1 - 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15256 if ( v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15257 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15258 v6 = v5 - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15259 if ( v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15260 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15261 if ( v6 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15262 TravelUI_Draw();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15263 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15264 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15265 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15266 RestUI_Draw();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15267 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15268 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15269 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15270 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15271 QuickRefDraw();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15272 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15273 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15274 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15275 if ( v1 != 10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15276 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15277 v2 = v1 - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15278 if ( v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15279 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15280 v3 = v2 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15281 if ( v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15282 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15283 v4 = v3 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15284 if ( v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15285 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15286 if ( v4 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15287 DrawSpellbook((unsigned int)v0->ptr_1C);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15288 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15289 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15290 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15291 sub_414F82_DrawGameOptions();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15292 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15293 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15294 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15295 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15296 CharacterUI_CharacterScreen_Draw(uActiveCharacter);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15297 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15298 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15299 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15300 v46 = (Texture *)(uTextureID_507944 != -1 ? &pIcons_LOD->pTextures[uTextureID_507944] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15301 v45 = pViewport->uViewportY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15302 v44 = pViewport->uViewportX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15303 goto LABEL_18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15304 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15305 DrawDialogueUI();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15306 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15307 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15308 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15309 if ( GetCurrentMenuID() == -1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15310 GameUI_DrawFoodAndGold();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15311 if ( sub_4637E0_is_there_popup_onscreen() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15312 sub_416D62_ShowPopupWindow_MonsterRecord_ItemInfo_etcsub_416D62(0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15313 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15314
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15315
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15316
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15317
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15318
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15319
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15320
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15321 //----- (00416196) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15322 void __cdecl identify_item()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15323 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15324 Player *v0; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15325 POINT *v1; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15326 signed int v2; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15327 signed int v3; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15328 int v4; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15329 char v5; // sf@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15330 int v6; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15331 int v7; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15332 unsigned __int16 v8; // ax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15333 int v9; // edi@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15334 int v10; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15335 int v11; // edx@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15336 LONG v12; // edx@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15337 signed int v13; // edx@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15338 int v14; // edx@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15339 unsigned int v15; // edi@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15340 signed int v16; // edx@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15341 int v17; // eax@54
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15342 unsigned int v18; // edx@57
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15343 int v19; // eax@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15344 int v20; // edi@67
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15345 int v21; // eax@72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15346 int v22; // ecx@74
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15347 int v23; // edx@78
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15348 int v24; // eax@79
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15349 int v25; // eax@80
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15350 int v26; // eax@84
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15351 ItemGen *v27; // esi@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15352 unsigned int v28; // eax@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15353 ItemGen *v29; // edi@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15354 unsigned int v30; // ecx@103
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15355 double v31; // st7@112
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15356 unsigned __int64 v32; // qax@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15357 unsigned int v33; // ecx@117
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15358 int v34; // eax@126
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15359 unsigned int v35; // ecx@127
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15360 double v36; // st7@132
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15361 signed __int64 v37; // qax@135
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15362 unsigned int v38; // eax@138
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15363 Vec3_int_ v39; // [sp-18h] [bp-A8h]@83
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15364 int *v40; // [sp-Ch] [bp-9Ch]@83
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15365 int *v41; // [sp-8h] [bp-98h]@83
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15366 int *v42; // [sp-4h] [bp-94h]@83
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15367 GUIWindow v43; // [sp+Ch] [bp-84h]@137
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15368 unsigned int pY; // [sp+60h] [bp-30h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15369 int v45; // [sp+64h] [bp-2Ch]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15370 unsigned int pX; // [sp+68h] [bp-28h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15371 int v47; // [sp+6Ch] [bp-24h]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15372 POINT y; // [sp+70h] [bp-20h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15373 POINT a2; // [sp+78h] [bp-18h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15374 Vec3_int_ pOut; // [sp+80h] [bp-10h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15375 unsigned int v51; // [sp+8Ch] [bp-4h]@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15376
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15377 if ( dword_50CDCC )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15378 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15379 v0 = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15380 v1 = pMouse->GetCursorPos(&a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15381 pOut.z = pRenderer->pActiveZBuffer[v1->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&y)->y]] & 0xFFFF;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15382 pMouse->GetClickPos(&pX, &pY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15383 if ( !pOut.z )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15384 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15385 if ( (signed int)pX <= 13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15386 || (signed int)pX >= 462
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15387 || (v2 = pX - 14,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15388 v3 = pY - 17,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15389 pX = v2,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15390 pY = v3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15391 v4 = 14 * (v3 >> 5),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15392 v2 >>= 5,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15393 v5 = v2 + v4 < 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15394 v6 = v2 + v4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15395 pOut.z = v6,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15396 v5)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15397 || v6 > 126
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15398 || (v7 = v0->GetItemIDAtInventoryIndex(&pOut.z)) == 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15399 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15400 pOut.z = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15401 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15402 if ( !v0->CanAct() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15403 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15404 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[427], v0->pName, pGlobalTXT_LocalizationStrings[541]);
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15405 v43.Hint = pTmpBuf;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15406 v43.uFrameWidth = 384;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15407 v43.uFrameHeight = 180;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15408 v43.uFrameY = 40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15409 if ( pMouse->GetCursorPos(&a2)->x <= 320 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15410 v38 = pMouse->GetCursorPos(&a2)->x + 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15411 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15412 v38 = pMouse->GetCursorPos(&a2)->x - 414;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15413 v43.uFrameX = v38;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15414 v43.DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15415 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15416 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15417 --pOut.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15418 LOBYTE(v8) = v0->GetActualSkillLevel(PLAYER_SKILL_ALCHEMY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15419 v9 = v8 & 0x3F;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15420 v45 = v8 & 0x3F;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15421 pOut.y = SkillToMastery(v8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15422 v10 = pOut.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15423 if ( pParty->pPickedItem.uItemID == 220 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15424 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15425 LABEL_116:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15426 GameUI_DrawItemInfo(&v0->pInventoryItems[v10]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15427 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15428 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15429 if ( (signed int)pParty->pPickedItem.uItemID < 200
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15430 || (signed int)pParty->pPickedItem.uItemID > 219
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15431 || (v11 = (int)((char *)v0 + 36 * pOut.z), *(int *)(v11 + 532) != 220) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15432 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15433 if ( (signed int)pParty->pPickedItem.uItemID < 221
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15434 || (signed int)pParty->pPickedItem.uItemID > 271
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15435 || (v12 = (LONG)((char *)v0 + 36 * pOut.z), a2.y = v12, v13 = *(int *)(v12 + 532), v51 = v13, v13 < 221)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15436 || v13 > 271 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15437 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15438 if ( pParty->pPickedItem.uItemID != 236
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15439 && ((signed int)pParty->pPickedItem.uItemID < 246 || (signed int)pParty->pPickedItem.uItemID > 250)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15440 && pParty->pPickedItem.uItemID != 263
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15441 && pParty->pPickedItem.uItemID != 233 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15442 goto LABEL_116;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15443 v27 = &v0->pInventoryItems[pOut.z];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15444 v28 = v27->uItemID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15445 v51 = pItemsTable->pItems[v27->uItemID].uEquipType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15446 v29 = (ItemGen *)(1800 * pParty->pPickedItem._bonus_type);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15447 if ( pParty->pPickedItem.uItemID != 233 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15448 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15449 if ( pParty->pPickedItem.uItemID == 236 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15450 {
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
15451 v35 = v27->uAttributes;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15452 if ( v35 & 2 || (v51 & 0x80000000u) != 0 || (signed int)v51 > 12 || (signed int)v28 >= 500 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15453 goto LABEL_92;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15454 LOWORD(v35) = v35 | 0x210;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
15455 v27->uAttributes = v35;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15456 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15457 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15458 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15459 if ( (signed int)pParty->pPickedItem.uItemID <= 245 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15460 goto LABEL_92;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15461 if ( (signed int)pParty->pPickedItem.uItemID <= 250 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15462 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15463 v27->UpdateTempBonus(pParty->uTimePlayed);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15464 v33 = v27->uItemID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15465 if ( (signed int)v27->uItemID >= 64 && (signed int)v33 <= 65
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
15466 || (pOut.y = v27->uAttributes, pOut.y & 2)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15467 || v27->uAdditionalValue
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15468 || v27->_bonus_type
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15469 || v51 && v51 != 1 && v51 != 2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15470 || (signed int)v33 >= 500 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15471 goto LABEL_92;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15472 v34 = *(int *)&aSbwb00[4 * pParty->pPickedItem.uItemID + 4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15473 a2.y = (int)v29 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15474 v31 = (double)(signed int)((int)v29 << 7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15475 v27->uAdditionalValue = v34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15476 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15477 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15478 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15479 if ( pParty->pPickedItem.uItemID != 263
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15480 || (v27->UpdateTempBonus(pParty->uTimePlayed), v30 = v27->uItemID, (signed int)v27->uItemID >= 64)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15481 && (signed int)v30 <= 65
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
15482 || (pOut.y = v27->uAttributes, pOut.y & 2)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15483 || v27->uAdditionalValue
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15484 || v27->_bonus_type
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15485 || v51 && v51 != 1 && v51 != 2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15486 || (signed int)v30 >= 500 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15487 goto LABEL_92;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15488 a2.y = (int)v29 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15489 v27->uAdditionalValue = 40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15490 v31 = (double)a2.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15491 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15492 v32 = pParty->uTimePlayed + (signed int)(signed __int64)(v31 * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15493 LODWORD(v27->uExpireTime) = v32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15494 LODWORD(v32) = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15495 LOBYTE(v32) = LOBYTE(pOut.y) | 0x18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15496 HIDWORD(v27->uExpireTime) = HIDWORD(v32);
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
15497 v27->uAttributes = v32;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15498 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15499 dword_50C9A8 = 256;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15500 goto LABEL_92;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15501 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15502 v36 = (70.0 - (double)pParty->pPickedItem._bonus_type) * 0.01;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15503 if ( v36 < 0.0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15504 v36 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15505 if ( v51 != 12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15506 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15507 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15508 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15509 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15510 a2.y = v27->uMaxCharges;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15511 v37 = (signed __int64)((double)a2.y - v36 * (double)a2.y);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15512 v27->uMaxCharges = v37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15513 v27->uNumCharges = (unsigned __int8)v37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15514 goto LABEL_92;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15515 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15516 v14 = v13 - 222;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15517 v15 = pParty->pPickedItem.uItemID - 222;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15518 v47 = v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15519 y.y = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15520 if ( pParty->pPickedItem.uItemID == 221 || v51 == 221 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15521 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15522 v16 = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15523 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15524 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15525 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15526 v16 = *(short *)&pItemsTable->field_EDE0[2 * (v14 + 50 * v15) + 388];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15527 v10 = pOut.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15528 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15529 v51 = v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15530 if ( v45 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15531 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15532 if ( v16 < 225 || v16 > 227 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15533 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15534 if ( v16 < 228 || v16 > 239 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15535 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15536 if ( v16 < 240 || v16 > 261 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15537 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15538 if ( v16 >= 262 && pOut.y != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15539 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15540 LABEL_53:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15541 v51 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15542 goto LABEL_54;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15543 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15544 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15545 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15546 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15547 if ( pOut.y <= 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15548 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15549 LABEL_38:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15550 v51 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15551 goto LABEL_54;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15552 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15553 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15554 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15555 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15556 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15557 if ( pOut.y == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15558 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15559 LABEL_35:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15560 v51 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15561 goto LABEL_54;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15562 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15563 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15564 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15565 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15566 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15567 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15568 if ( v16 >= 225 && v16 <= 227 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15569 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15570 v51 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15571 goto LABEL_54;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15572 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15573 if ( v16 >= 228 && v16 <= 239 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15574 goto LABEL_35;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15575 if ( v16 >= 240 && v16 <= 261 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15576 goto LABEL_38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15577 if ( v16 >= 262 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15578 goto LABEL_53;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15579 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15580 LABEL_54:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15581 pOut.y = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15582 pOut.x = v10 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15583 v17 = (int)v0->pInventoryIndices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15584 while ( *(int *)v17 != pOut.x )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15585 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15586 ++pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15587 v17 += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15588 if ( pOut.y >= 126 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15589 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15590 v18 = y.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15591 goto LABEL_59;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15592 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15593 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15594 v18 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15595 LABEL_59:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15596 if ( !v51 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15597 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15598 LABEL_115:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15599 v10 = pOut.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15600 goto LABEL_116;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15601 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15602 if ( v51 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15603 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15604 v0->RemoveItemAtInventoryIndex(v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15605 v26 = rand();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15606 v0->ReceiveDamage(v26 % 11 + 10, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15607 pAudioPlayer->PlaySound(SOUND_8, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15608 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15609 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15610 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15611 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15612 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15613 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15614 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15615 v42 = (int *)&a2.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15616 v41 = (int *)&y.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15617 v40 = (int *)&pOut;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15618 v39.z = pParty->vPosition.y + pParty->sEyelevel;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15619 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15620 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15621 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15622 if ( v51 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15623 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15624 v0->RemoveItemAtInventoryIndex(v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15625 v25 = rand();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15626 v0->ReceiveDamage(v25 % 71 + 30, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15627 v23 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15628 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15629 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15630 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15631 if ( v51 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15632 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15633 v0->RemoveItemAtInventoryIndex(v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15634 v24 = rand();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15635 v0->ReceiveDamage(v24 % 201 + 50, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15636 v23 = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15637 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15638 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15639 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15640 if ( v51 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15641 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15642 if ( v51 != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15643 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15644 v19 = v0->AddItem(0xFFFFFFFFu, 0xDCu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15645 if ( v19 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15646 *(int *)&v0->field_1F5[36 * v19 + 15] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15647 v20 = v47 + 50 * v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15648 v0->pInventoryItems[pOut.z].uItemID = v51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15649 v0->pInventoryItems[pOut.z]._bonus_type = (pParty->pPickedItem._bonus_type
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15650 + v0->pInventoryItems[pOut.z]._bonus_type)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15651 / 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15652 v0->SetVariable(VAR_AutoNotes, *(short *)&pItemsTable->field_10168[2 * v20 + 388]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15653 LABEL_74:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15654 v22 = (int)((char *)v0 + 36 * pOut.z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15655 if ( !BYTE2(pItemsTable->pItems[*(int *)(v22 + 532) + 1].uItemID) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15656 *(int *)(v22 + 552) |= 1u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15657 if ( !dword_4E455C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15658 goto LABEL_92;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15659 v0->PlaySound(16, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15660 goto LABEL_91;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15661 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15662 if ( v45 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15663 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15664 if ( *(int *)(a2.y + 532) == 221 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15665 *(int *)(a2.y + 532) = pParty->pPickedItem.uItemID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15666 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15667 *(int *)(a2.y + 536) = pParty->pPickedItem._bonus_type;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15668 v21 = v0->AddItem(0xFFFFFFFFu, 0xDCu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15669 if ( v21 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15670 *(int *)&v0->field_1F5[36 * v21 + 15] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15671 goto LABEL_74;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15672 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15673 goto LABEL_115;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15674 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15675 v0->RemoveItemAtInventoryIndex(v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15676 v0->SetCondition(0x10u, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15677 v23 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15678 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15679 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15680 v0->_4160CA(v23);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15681 pAudioPlayer->PlaySound(SOUND_8, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15682 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15683 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15684 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15685 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15686 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15687 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15688 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15689 v42 = (int *)&a2.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15690 v41 = (int *)&y.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15691 v40 = (int *)&pOut;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15692 v39.z = pParty->vPosition.y + pParty->sEyelevel;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15693 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15694 *(_QWORD *)&v39.x = *(_QWORD *)&pParty->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15695 Vec3_int_::Rotate(64, pParty->sRotationY, pParty->sRotationX, v39, v40, v41, v42);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15696 sub_42F7EB_DropItemAt(0x41Bu, pOut.x, y.y, a2.y, 0, 1, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15697 if ( dword_4E455C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15698 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15699 if ( v0->CanAct() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15700 v0->PlaySound(17, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15701 ShowStatusBarString(pGlobalTXT_LocalizationStrings[444], 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15702 LABEL_91:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15703 dword_4E455C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15704 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15705 LABEL_92:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15706 pMouse->RemoveHoldingItem();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15707 dword_50CDCC = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15708 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15709 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15710 *(int *)(v11 + 536) = v9 + pItemsTable->pItems[pParty->pPickedItem.uItemID].uDamageDice;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15711 switch ( pParty->pPickedItem.uItemID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15712 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15713 case 0xC8u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15714 case 0xC9u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15715 case 0xCAu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15716 case 0xCBu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15717 case 0xCCu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15718 v0->pInventoryItems[pOut.z].uItemID = 222;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15719 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15720 case 0xCDu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15721 case 0xCEu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15722 case 0xCFu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15723 case 0xD0u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15724 case 0xD1u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15725 v0->pInventoryItems[pOut.z].uItemID = 223;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15726 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15727 case 0xD2u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15728 case 0xD3u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15729 case 0xD4u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15730 case 0xD5u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15731 case 0xD6u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15732 v0->pInventoryItems[pOut.z].uItemID = 224;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15733 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15734 case 0xD7u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15735 case 0xD8u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15736 case 0xD9u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15737 case 0xDAu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15738 case 0xDBu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15739 v0->pInventoryItems[pOut.z].uItemID = 221;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15740 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15741 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15742 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15743 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15744 pMouse->RemoveHoldingItem();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15745 dword_50CDCC = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15746 if ( dword_4E455C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15747 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15748 v0->PlaySound(16, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15749 dword_4E455C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15750 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15751 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15752
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15753
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15754 //----- (00416B01) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15755 void __thiscall sub_416B01(void *_this)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15756 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15757 int v1; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15758 int v2; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15759 NPCData *v3; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15760 NPCData *v4; // esi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15761 NPCData *v5; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15762 NPCData *v6; // esi@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15763 const CHAR *v7; // eax@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15764 unsigned int v8; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15765 unsigned int v9; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15766 const char *v10; // ST14_4@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15767 char *v11; // esi@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15768 const char *v12; // ST18_4@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15769 unsigned __int16 v13; // ax@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15770 char *v14; // eax@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15771 GUIWindow a1; // [sp+Ch] [bp-60h]@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15772 int a2; // [sp+60h] [bp-Ch]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15773 void *v17; // [sp+64h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15774 LPCSTR lpsz; // [sp+68h] [bp-4h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15775
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15776 v17 = _this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15777 if ( bNoNPCHiring != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15778 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15779 v1 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15780 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15781 v3 = pParty->pHirelings;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15782 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15783 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15784 if ( v3->pName )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15785 pTmpBuf[v1++] = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15786 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15787 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15788 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15789 while ( (signed int)v3 < (signed int)&pParty->pPickedItem );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15790 lpsz = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15791 if ( (signed int)pNPCStats->uNumNewNPCs > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15792 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15793 v4 = pNPCStats->pNewNPCData;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15794 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15795 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15796 if ( v4->uFlags & 0x80
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15797 && (!pParty->pHirelings[0].pName || strcmp(v4->pName, pParty->pHirelings[0].pName))
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15798 && (!pParty->pHirelings[1].pName || strcmp(v4->pName, pParty->pHirelings[1].pName)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15799 pTmpBuf[v1++] = (char)lpsz + 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15800 ++lpsz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15801 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15802 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15803 while ( (signed int)lpsz < (signed int)pNPCStats->uNumNewNPCs );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15804 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15805 if ( (signed int)((char *)v17 + (unsigned __int8)pParty->field_709) < v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15806 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15807 uDialogue_SpeakingActorNPC_ID = -1 - (unsigned __int8)pParty->field_709 - (int)v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15808 v5 = GetNewNPCData(uDialogue_SpeakingActorNPC_ID, (int)&a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15809 v6 = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15810 if ( v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15811 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15812 if ( a2 == 57 )
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
15813 v7 = pNPCTopics[512].pText;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15814 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15815 v7 = (const CHAR *)*(&pNPCStats->field_13A5C + 5 * v5->uProfession);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15816 lpsz = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15817 if ( !v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15818 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15819 lpsz = (LPCSTR)*(&pNPCStats->field_13A64 + 5 * v6->uProfession);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15820 if ( !lpsz )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15821 lpsz = nullstring;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15822 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15823 a1.Hint = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15824 a1.uFrameX = 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15825 a1.uFrameY = 60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15826 a1.uFrameWidth = 276;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15827 a1.uFrameZ = 313;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15828 a1.uFrameHeight = pFontArrus->CalcTextHeight(lpsz, &a1, 0, 0)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15829 + 2 * LOBYTE(pFontArrus->uFontHeight)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15830 + 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15831 if ( (signed int)a1.uFrameHeight < 130 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15832 a1.uFrameHeight = 130;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15833 a1.uFrameWidth = 400;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15834 a1.uFrameZ = a1.uFrameX + 399;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15835 a1.DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15836 sprintfex(pTmpBuf2, "NPC%03d", v6->uPortraitID);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15837 v8 = pIcons_LOD->LoadTexture(pTmpBuf2, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15838 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15839 a1.uFrameX + 22,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15840 a1.uFrameY + 36,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15841 (Texture *)(v8 != -1 ? &pIcons_LOD->pTextures[v8] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15842 v9 = v6->uProfession;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15843 if ( v9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15844 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15845 v10 = v6->pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15846 v11 = pTmpBuf;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15847 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[429], v10, aNPCProfessionNames[v9]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15848 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15849 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15850 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15851 v12 = v6->pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15852 v11 = pTmpBuf;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15853 strcpy(pTmpBuf, v12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15854 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15855 v13 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15856 a1.DrawText2(pFontArrus, 0, 0xCu, v13, v11, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15857 a1.uFrameWidth -= 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15858 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15859 v14 = sub_495461((char *)lpsz, uActiveCharacter - 1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15860 a1.DrawText(pFontArrus, 100, 36, 0, v14, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15861 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15862 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15863 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15864 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15865
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15866
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15867 //----- (00416D62) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15868 void sub_416D62_ShowPopupWindow_MonsterRecord_ItemInfo_etcsub_416D62(Vec2_int_ *_this)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15869 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15870 signed int v1; // eax@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15871 char *v2; // eax@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15872 void *v3; // ecx@52
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15873 unsigned int v4; // eax@59
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15874 int v5; // esi@62
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15875 signed int v6; // esi@64
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15876 signed int v7; // esi@69
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15877 ItemGen *v8; // ecx@70
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15878 unsigned int v9; // eax@72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15879 unsigned int v10; // eax@76
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15880 char v11; // zf@83
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15881 GUIButton *v12; // esi@84
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15882 unsigned int v13; // ecx@85
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15883 char *v14; // edi@85
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15884 signed int v15; // eax@92
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15885 int v16; // eax@95
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15886 int v17; // eax@96
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15887 enum PLAYER_SKILL_TYPE v18; // eax@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15888 char *v19; // eax@99
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15889 unsigned int v20; // eax@108
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15890 unsigned int v21; // eax@109
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15891 const char *v22; // eax@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15892 char *v23; // ebx@112
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15893 char *v24; // edx@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15894 unsigned int v25; // eax@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15895 GUIWindow a1; // [sp+4h] [bp-74h]@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15896 double v27; // [sp+58h] [bp-20h]@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15897 struct tagPOINT Point; // [sp+60h] [bp-18h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15898 char *v29; // [sp+68h] [bp-10h]@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15899 float v30; // [sp+6Ch] [bp-Ch]@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15900 unsigned int pX; // [sp+70h] [bp-8h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15901 unsigned int pY; // [sp+74h] [bp-4h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15902
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15903 if ( pCurrentScreen == 16 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15904 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15905 if ( _this )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15906 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15907 pX = _this->x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15908 pY = _this->y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15909 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15910 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15911 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15912 pMouse->GetClickPos(&pX, &pY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15913 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15914 if ( pRenderer->bWindowMode )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15915 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15916 GetCursorPos(&Point);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15917 ScreenToClient(hWnd, &Point);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15918 if ( Point.x < 1 || Point.y < 1 || Point.x > 638 || Point.y > 478 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15919 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15920 back_to_game();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15921 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15922 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15923 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15924 if ( pParty->pPickedItem.uItemID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15925 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15926 v1 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15927 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15928 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15929 if ( (signed int)pX > word_4E2930[v1]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15930 && (signed int)pX < word_4E2938[v1]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15931 && (signed int)pY > 375
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15932 && (signed int)pY < 466 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15933 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15934 pPlayers[uActiveCharacter]->UseItem_DrinkPotion_etc(v1 + 1, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15935 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15936 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15937 ++v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15938 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15939 while ( v1 < 4 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15940 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15941 pEventTimer->Pause();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15942 if ( pCurrentScreen <= 10 )
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15943 {
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15944 if ( pCurrentScreen == 10 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15945 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15946 if ( !pPlayers[uActiveCharacter]->CanAct() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15947 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15948 sprintfex(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15949 pTmpBuf,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15950 pGlobalTXT_LocalizationStrings[427],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15951 pPlayers[uActiveCharacter]->pName,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15952 pGlobalTXT_LocalizationStrings[541]);
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15953 a1.Hint = pTmpBuf;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15954 a1.uFrameWidth = 384;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15955 a1.uFrameHeight = 180;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15956 a1.uFrameY = 40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15957 if ( (signed int)pX <= 320 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15958 v10 = pX + 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15959 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15960 v10 = pX - 414;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15961 a1.uFrameX = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15962 goto LABEL_42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15963 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15964 v9 = pX + pSRZBufferLineOffsets[pY];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15965 if ( !(pRenderer->pActiveZBuffer[v9] & 0xFFFF) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15966 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15967 v8 = (ItemGen *)(&pOtherOverlayList->pOverlays[49].field_4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15968 + 2662 * (unsigned int)ptr_507BB8->ptr_1C
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15969 + 18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15970 * *((short *)&pChests[0].mm7__vector_pItems[139].uExpireTime
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15971 + (pRenderer->pActiveZBuffer[v9] & 0xFFFF)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15972 + 2662 * (unsigned int)ptr_507BB8->ptr_1C
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15973 + 3));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15974 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15975 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15976 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15977 if ( pCurrentScreen )
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15978 {
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15979 if ( pCurrentScreen != 3 )
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15980 {
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15981 if ( pCurrentScreen != 7 )
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15982 {
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15983 if ( pCurrentScreen == 8 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15984 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15985 if ( dword_507B00_spell_info_to_draw_in_popup )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15986 DrawSpellDescriptionPopup((void *)(dword_507B00_spell_info_to_draw_in_popup - 1));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15987 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15988 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15989 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15990 LABEL_119:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15991 if ( (signed int)pX > 467
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15992 && pCurrentScreen != 14 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15993 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15994 LABEL_126:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15995 identify_item();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15996 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15997 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15998 if ( (signed int)pY >= 345 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15999 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16000 if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 100 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16001 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16002 CharacterUI_StatsTab_ShowHint();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16003 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16004 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16005 if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 101 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16006 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16007 CharacterUI_SkillsTab_ShowHint();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16008 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16009 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16010 v11 = pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16011 LABEL_125:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16012 if ( !v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16013 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16014 goto LABEL_126;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16015 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16016 if ( !dword_506364
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16017 || (signed int)pX < (signed int)pViewport->uViewportX
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16018 || (signed int)pX > (signed int)pViewport->uViewportZ
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16019 || (signed int)pY < (signed int)pViewport->uViewportY
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16020 || (signed int)pY > (signed int)pViewport->uViewportW
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16021 || (v2 = (char *)sub_444564(), (a1.Hint = v2) == 0) )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16022 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16023 v30 = (double)(pFontArrus->GetLineWidth(v2) + 32);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16024 v27 = v30 + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16025 v29 = (char *)LODWORD(v27);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16026 a1.uFrameWidth = LODWORD(v27);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16027 a1.uFrameX = pX + 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16028 a1.uFrameY = pY + 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16029 goto LABEL_41;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16030 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16031 if ( (GetCurrentMenuID() & 0x80000000u) == 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16032 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16033 if ( (signed int)pY > (signed int)pViewport->uViewportW )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16034 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16035 a1.ptr_1C = (void *)((signed int)pX / 118);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16036 if ( (signed int)pX / 118 < 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16037 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16038 a1.Hint = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16039 a1.uFrameWidth = 400;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16040 a1.uFrameHeight = 200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16041 a1.uFrameX = 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16042 a1.uFrameY = 60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16043 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16044 a1._41D3B7();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16045 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16046 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16047 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16048 if ( (signed int)pX > (signed int)pViewport->uViewportZ )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16049 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16050 if ( (signed int)pY >= 130 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16051 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16052 if ( (signed int)pX >= 476 && (signed int)pX <= 636 && (signed int)pY >= 240 && (signed int)pY <= 300 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16053 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16054 a1.Hint = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16055 a1.uFrameWidth = 400;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16056 a1.uFrameHeight = 200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16057 a1.uFrameX = 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16058 a1.uFrameY = 60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16059 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16060 a1._41D73D_draw_buff_tooltip();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16061 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16062 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16063 if ( (signed int)pX < 485 || (signed int)pX > 548 || (signed int)pY < 156 || (signed int)pY > 229 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16064 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16065 if ( (signed int)pX < 566 || (signed int)pX > 629 || (signed int)pY < 156 || (signed int)pY > 229 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16066 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16067 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16068 v3 = (void *)1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16069 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16070 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16071 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16072 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16073 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16074 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16075 sub_416B01(v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16076 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16077 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16078 a1.Hint = _4443D5_GetMinimapRightClickText();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16079 a1.uFrameWidth = 256;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16080 a1.uFrameX = 130;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16081 a1.uFrameY = 140;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16082 LABEL_41:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16083 a1.uFrameHeight = 64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16084 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16085 LABEL_42:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16086 a1.DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16087 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16088 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16089 a1.Hint = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16090 a1.uFrameWidth = 320;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16091 a1.uFrameHeight = 320;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16092 v4 = pX - 350;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16093 if ( (signed int)pX <= 320 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16094 v4 = pX + 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16095 a1.uFrameX = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16096 a1.uFrameY = 40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16097 if ( pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16098 LOWORD(v5) = pGame->pVisInstance->get_picked_object_zbuf_val();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16099 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16100 v5 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16101 v6 = (unsigned __int16)v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16102 if ( (v6 & 7) != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16103 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16104 if ( (v6 & 7) == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16105 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16106 if ( pRenderer->uNumSceneBegins )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16107 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16108 a1.DrawMessageBox(1);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16109 MonsterPopup_Draw(v6 >> 3, &a1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16110 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16111 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16112 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16113 pRenderer->BeginScene();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16114 a1.DrawMessageBox(1);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16115 MonsterPopup_Draw(v6 >> 3, &a1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16116 pRenderer->EndScene();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16117 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16118 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16119 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16120 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16121 v7 = v6 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16122 if ( pObjectList->pObjects[pLayingItems[v7].uObjectDescID].uFlags & 0x10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16123 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16124 v8 = &pLayingItems[v7].stru_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16125 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16126 GameUI_DrawItemInfo(v8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16127 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16128 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16129 if ( pCurrentScreen == 13 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16130 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16131 if ( (signed int)pY < 345 && (signed int)pX < 469 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16132 sub_4B1A2D();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16133 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16134 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16135 if ( pCurrentScreen <= 13 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16136 goto LABEL_132;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16137 if ( pCurrentScreen <= 15 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16138 goto LABEL_119;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16139 if ( pCurrentScreen != 21 )
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16140 {
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16141 v11 = pCurrentScreen == 23;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16142 goto LABEL_125;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16143 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16144 a1.Hint = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16145 v12 = pGUIWindow_CurrentMenu->pControlsHead;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16146 if ( !v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16147 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16148 v13 = pY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16149 v14 = v29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16150 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16151 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16152 if ( v12->uButtonType != 1 && v12->uButtonType != 3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16153 || (signed int)pX < (signed int)v12->uX
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16154 || (signed int)pX > (signed int)v12->uZ
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16155 || (signed int)v13 < (signed int)v12->uY
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16156 || (signed int)v13 > (signed int)v12->uW )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16157 goto LABEL_117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16158 v15 = v12->uControlID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16159 if ( v15 <= 65 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16160 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16161 if ( v15 == 65 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16162 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16163 a1.Hint = pClassDescriptions[v12->uControlParam];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16164 v14 = pClassNames[v12->uControlParam];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16165 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16166 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16167 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16168 if ( v15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16169 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16170 v16 = v15 - 62;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16171 if ( v16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16172 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16173 v17 = v16 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16174 if ( v17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16175 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16176 if ( v17 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16177 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16178 v18 = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].GetSkillIdxByOrder(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16179 v12->uControlParam + 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16180 v14 = pSkillNames[v18];
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16181 a1.Hint = pSkillDesc[v18];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16182 v13 = pY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16183 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16184 goto LABEL_117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16185 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16186 v14 = pGlobalTXT_LocalizationStrings[668];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16187 v19 = pGlobalTXT_LocalizationStrings[669];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16188 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16189 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16190 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16191 v14 = pGlobalTXT_LocalizationStrings[670];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16192 v19 = pGlobalTXT_LocalizationStrings[671];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16193 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16194 goto LABEL_116;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16195 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16196 a1.Hint = pAttributeDescriptions[(signed int)v12->uControlParam % 7];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16197 v14 = aAttributeNames[(signed int)v12->uControlParam % 7];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16198 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16199 goto LABEL_117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16200 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16201 if ( v15 == 66 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16202 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16203 v19 = pGlobalTXT_LocalizationStrings[664];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16204 v14 = pGlobalTXT_LocalizationStrings[665];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16205 goto LABEL_116;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16206 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16207 if ( v15 == 67 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16208 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16209 v19 = pGlobalTXT_LocalizationStrings[666];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16210 v14 = pGlobalTXT_LocalizationStrings[667];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16211 goto LABEL_116;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16212 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16213 if ( v15 > 71 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16214 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16215 LABEL_117:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16216 v12 = v12->pNext;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16217 if ( !v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16218 goto LABEL_112;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16219 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16220 if ( v15 > 75 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16221 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16222 if ( v15 == 118 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16223 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16224 v20 = v12->uControlParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16225 v14 = pParty->pPlayers[v20].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16226 v19 = pClassDescriptions[pParty->pPlayers[v20].uClass];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16227 LABEL_116:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16228 a1.Hint = v19;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16229 goto LABEL_117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16230 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16231 goto LABEL_117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16232 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16233 v21 = pParty->pPlayers[v12->uControlParam].GetSkillIdxByOrder(v15 - 72);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16234 v13 = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16235 pY = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16236 if ( (v21 & 0x80000000u) != 0 || (signed int)v21 >= 37 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16237 goto LABEL_117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16238 v22 = CharacterUI_GetSkillDescText(v12->uControlParam, (enum PLAYER_SKILL_TYPE)v21);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16239 strcpy(pTmpBuf2, v22);
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16240 a1.Hint = pTmpBuf2;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16241 v14 = pSkillNames[pY];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16242 LABEL_112:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16243 v23 = a1.Hint;
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16244 if ( a1.Hint )
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16245 {
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16246 v24 = a1.Hint;
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16247 a1.Hint = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16248 a1.uFrameWidth = 384;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16249 a1.uFrameHeight = 256;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16250 a1.uFrameX = 128;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16251 a1.uFrameY = 40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16252 a1.uFrameHeight = pFontSmallnum->CalcTextHeight(v24, &a1, 24, 0)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16253 + 2 * LOBYTE(pFontLucida->uFontHeight)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16254 + 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16255 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16256 a1.uFrameW = a1.uFrameY + a1.uFrameHeight - 1;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16257 a1.DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16258 a1.uFrameX += 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16259 a1.uFrameWidth -= 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16260 a1.uFrameY += 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16261 a1.uFrameHeight -= 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16262 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16263 a1.uFrameW = a1.uFrameY + a1.uFrameHeight - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16264 v25 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16265 sprintfex(pTmpBuf, format_4E2D80, v25, v14);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16266 a1.DrawText2(pFontCreate, 0, 0, 0, pTmpBuf, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16267 a1.DrawText(pFontSmallnum, 1, LOBYTE(pFontLucida->uFontHeight), 0, v23, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16268 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16269 LABEL_132:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16270 dword_507BF0_is_there_popup_onscreen = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16271 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16272 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16273
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16274
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16275 //----- (004175C0) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16276 void __thiscall UI_OnMouseLeftClick(int *pXY)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16277 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16278 int *pXY_; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16279 signed int y; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16280 signed int x; // ecx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16281 unsigned int v4; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16282 signed int v5; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16283 signed int v6; // esi@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16284 int v7; // esi@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16285 GUIWindow *v8; // edx@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16286 GUIButton *i; // esi@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16287 signed int v10; // eax@50
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16288 int v11; // ecx@52
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16289 unsigned int pX; // [sp+14h] [bp-8h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16290 unsigned int pY; // [sp+18h] [bp-4h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16291
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16292 pXY_ = pXY;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16293 if ( pCurrentScreen == 16
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16294 || sub_4637E0_is_there_popup_onscreen() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16295 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16296 if ( pGUIWindow2 && pGUIWindow2->ptr_1C == (void *)33 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16297 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16298 sub_4452BB();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16299 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16300 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16301 if ( pXY_ )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16302 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16303 x = *pXY_;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16304 y = pXY_[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16305 pX = *pXY_;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16306 pY = y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16307 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16308 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16309 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16310 pMouse->GetClickPos(&pX, &pY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16311 y = pY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16312 x = pX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16313 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16314 if ( pCurrentScreen
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16315 || !dword_507B98_ctrl_pressed )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16316 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16317 v4 = GetCurrentMenuID();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16318 x = pX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16319 if ( (v4 & 0x80000000u) == 0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16320 || (signed int)pX < (signed int)pViewport->uViewportX
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16321 || (signed int)pX > (signed int)pViewport->uViewportZ )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16322 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16323 y = pY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16324 LABEL_30:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16325 v7 = uNumVisibleWindows;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16326 if ( uNumVisibleWindows < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16327 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16328 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16329 {
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
16330 //v8 = (GUIWindow *)&pWindowList_at_506F50_minus1_indexing[21 * pVisibleWindowsIdxs[v7]];
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
16331 v8 = &pWindowList[pVisibleWindowsIdxs[v7] - 1];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16332 if ( x >= (signed int)v8->uFrameX )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16333 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16334 if ( x <= (signed int)v8->uFrameZ && y >= (signed int)v8->uFrameY && y <= (signed int)v8->uFrameW )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16335 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16336 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16337 --v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16338 if ( v7 < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16339 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16340 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16341 for ( i = v8->pControlsHead; ; i = i->pNext )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16342 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16343 if ( !i )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16344 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16345 if ( i->uButtonType == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16346 goto LABEL_41;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16347 if ( i->uButtonType != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16348 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16349 if ( (signed int)(signed __int64)sqrt((double)((x - i->uX) * (x - i->uX) + (y - i->uY) * (y - i->uY))) < (signed int)i->uWidth )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16350 goto LABEL_50;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16351 y = pY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16352 x = pX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16353 LABEL_45:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16354 ;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16355 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16356 if ( i->uButtonType != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16357 goto LABEL_45;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16358 LABEL_41:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16359 if ( x >= (signed int)i->uX && x <= (signed int)i->uZ && y >= (signed int)i->uY && y <= (signed int)i->uW )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16360 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16361 LABEL_50:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16362 i->field_2C = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16363 v10 = pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16364 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16365 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16366 v10 = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16367 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16368 }
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
16369 //v11 = i->uControlParam;
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
16370 pMessageQueue_50CBD0->SendMessage((UIMessageType)i->uControlID, i->uControlParam, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16371 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16372 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16373 goto LABEL_45;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16374 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16375 y = pY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16376 if ( (signed int)pY < (signed int)pViewport->uViewportY || (signed int)pY > (signed int)pViewport->uViewportW )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16377 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16378 if ( pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16379 v5 = pGame->pVisInstance->get_picked_object_zbuf_val();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16380 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16381 v5 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16382 v6 = (unsigned __int16)v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16383 if ( (v5 & 7) == 3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16384 && uActiveCharacter
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16385 && v5 < 33554432
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16386 && pPlayers[uActiveCharacter]->CanAct()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16387 && pPlayers[uActiveCharacter]->CanSteal() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16388 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16389 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16390 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16391 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16392 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v6 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16393 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16394 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16395 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16396 if ( pParty->bTurnBasedModeOn == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16397 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16398 if ( pTurnEngine->field_4 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16399 pTurnEngine->field_18 |= 8u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16400 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16401 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16402 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16403
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16404
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16405
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16406 //----- (00417871) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16407 void __thiscall sub_417871(int *pXY)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16408 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16409 POINT v1; // [sp+0h] [bp-18h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16410 POINT a2; // [sp+8h] [bp-10h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16411 unsigned int pY; // [sp+10h] [bp-8h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16412 unsigned int pX; // [sp+14h] [bp-4h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16413
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16414 if ( !pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16415 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16416 if ( pXY )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16417 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16418 pX = *pXY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16419 pY = pXY[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16420 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16421 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16422 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16423 pMouse->GetClickPos(&pX, &pY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16424 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16425 pMouse->GetCursorPos(&a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16426 pMouse->GetCursorPos(&v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16427 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16428 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16429
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16430 //----- (004178C4) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16431 void __cdecl sub_4178C4()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16432 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16433 if ( pArcomageGame->bGameInProgress == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16434 {
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
16435 if (pAsyncMouse)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16436 pArcomageGame->stru1.field_0 = 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16437 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16438 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16439
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16440 //----- (004178E1) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16441 void __cdecl sub_4178E1()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16442 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16443 if ( pArcomageGame->bGameInProgress == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16444 {
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
16445 if (pAsyncMouse)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16446 pArcomageGame->stru1.field_0 = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16447 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16448 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16449
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16450 //----- (004178FE) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16451 unsigned int __fastcall sub_4178FE(signed int a1, signed int a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16452 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16453 unsigned __int16 v2; // dx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16454 unsigned __int16 v3; // cx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16455 int v5; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16456 unsigned __int16 v6; // [sp-4h] [bp-8h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16457
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16458 if ( a1 <= a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16459 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16460 if ( a1 == a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16461 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16462 v5 = 100 * a1 / a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16463 v3 = 255;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16464 if ( v5 >= 25 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16465 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16466 v6 = 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16467 v2 = 255;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16468 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16469 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16470 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16471 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16472 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16473 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16474 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16475 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16476 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16477 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16478 v2 = 255;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16479 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16480 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16481 return GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(v3, v2, v6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16482 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16483
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16484 //----- (00417939) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16485 signed int __thiscall GetConditionDrawColor(unsigned int uConditionIdx)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16486 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16487 unsigned int v1; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16488 signed int v2; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16489 unsigned int v3; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16490 unsigned int v4; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16491 unsigned int v6; // [sp+Ch] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16492
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16493 v1 = uConditionIdx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16494 v2 = 65535;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16495 v3 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE1u, 0xCDu, 0x23u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16496 v6 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0x23u, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16497 v4 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16498 switch ( v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16499 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16500 case 0u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16501 case 1u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16502 case 3u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16503 case 4u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16504 case 5u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16505 case 6u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16506 case 7u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16507 v2 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16508 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16509 case 2u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16510 case 8u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16511 case 9u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16512 case 0xCu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16513 case 0xDu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16514 v2 = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16515 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16516 case 0xAu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16517 case 0xBu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16518 case 0xEu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16519 case 0xFu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16520 case 0x10u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16521 v2 = v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16522 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16523 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16524 return v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16525 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16526 return v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16527 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16528
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16529 //----- (004179BC) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16530 char __fastcall sub_4179BC_draw_tooltip(const char *a1, const char *a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16531 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16532 const char *v2; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16533 const char *v3; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16534 unsigned int v4; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16535 GUIWindow Dst; // [sp+Ch] [bp-5Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16536 POINT v6; // [sp+60h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16537
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16538 v2 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16539 v3 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16540 memset(&Dst, 0, 0x54u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16541 Dst.uFrameWidth = 384;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16542 Dst.uFrameHeight = 256;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16543 Dst.uFrameX = 128;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16544 Dst.uFrameY = pMouse->GetCursorPos(&v6)->y + 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16545 Dst.uFrameHeight = pFontSmallnum->CalcTextHeight(v2, &Dst, 24, 0) + 2 * LOBYTE(pFontLucida->uFontHeight) + 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16546 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16547 Dst.uFrameW = Dst.uFrameY + Dst.uFrameHeight - 1;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16548 Dst.DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16549 Dst.uFrameX += 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16550 Dst.uFrameWidth -= 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16551 Dst.uFrameY += 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16552 Dst.uFrameHeight -= 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16553 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16554 Dst.uFrameW = Dst.uFrameY + Dst.uFrameHeight - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16555 v4 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16556 sprintfex(pTmpBuf, format_4E2D80, v4, v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16557 Dst.DrawText2(pFontCreate, 0, 0, 0, pTmpBuf, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16558 return Dst.DrawText(pFontSmallnum, 1, LOBYTE(pFontLucida->uFontHeight), 0, v2, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16559 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16560
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16561 //----- (00417AD4) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16562 unsigned int __fastcall sub_417AD4(unsigned int uPlayerClass, enum PLAYER_SKILL_TYPE uPlayerSkillType, signed int a3)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16563 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16564 enum PLAYER_SKILL_TYPE v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16565 signed int v4; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16566 unsigned int v5; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16567 int v6; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16568 int v7; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16569 int v8; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16570 unsigned __int8 v9; // sf@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16571 unsigned __int8 v10; // of@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16572 int v11; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16573 int v12; // eax@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16574 unsigned int yellow; // [sp+Ch] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16575 unsigned int red; // [sp+10h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16576 unsigned int white; // [sp+14h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16577
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16578 v3 = uPlayerSkillType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16579 v4 = uPlayerClass;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16580 white = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16581 red = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16582 yellow = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16583 v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16584 v6 = v4 % 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16585 if ( !(v4 % 4) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16586 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16587 v11 = 37 * v4 + v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16588 if ( byte_4ED970_skill_learn_ability_by_class_table[0][v11] >= a3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16589 goto LABEL_8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16590 if ( byte_4ED970_skill_learn_ability_by_class_table[1][v11] < a3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16591 && byte_4ED970_skill_learn_ability_by_class_table[2][v11] < a3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16592 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16593 v12 = byte_4ED970_skill_learn_ability_by_class_table[3][v11];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16594 v10 = __OFSUB__(v12, a3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16595 v9 = v12 - a3 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16596 LABEL_15:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16597 v5 = red;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16598 if ( v9 ^ v10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16599 return v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16600 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16601 return yellow;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16602 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16603 if ( v6 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16604 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16605 v7 = 37 * v4 + v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16606 if ( byte_4ED970_skill_learn_ability_by_class_table[0][v7] >= a3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16607 goto LABEL_8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16608 if ( byte_4ED970_skill_learn_ability_by_class_table[1][v7] < a3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16609 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16610 v8 = byte_4ED970_skill_learn_ability_by_class_table[2][v7];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16611 v10 = __OFSUB__(v8, a3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16612 v9 = v8 - a3 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16613 goto LABEL_15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16614 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16615 return yellow;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16616 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16617 if ( v6 > 1 && v6 <= 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16618 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16619 if ( byte_4ED970_skill_learn_ability_by_class_table[v4][v3] < a3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16620 return red;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16621 LABEL_8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16622 v5 = white;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16623 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16624 return v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16625 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16626
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16627 //----- (00417BB5) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16628 const char *__fastcall CharacterUI_GetSkillDescText(unsigned int uPlayerID, enum PLAYER_SKILL_TYPE uPlayerSkillType)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16629 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16630 enum PLAYER_SKILL_TYPE v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16631 unsigned int v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16632 int v4; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16633 int v5; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16634 Player *pPlayer; // ebx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16635 char v7; // al@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16636 char v8; // cl@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16637 unsigned int v9; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16638 unsigned int v10; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16639 unsigned int v11; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16640 enum PLAYER_SKILL_TYPE v12; // edi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16641 unsigned int v13; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16642 unsigned int v14; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16643 enum PLAYER_SKILL_TYPE v15; // esi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16644 int v16; // edi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16645 char v17; // al@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16646 int v18; // ST5C_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16647 int v19; // ST4C_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16648 int v20; // ST3C_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16649 int v21; // ST2C_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16650 int v22; // ST1C_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16651 char *v23; // esi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16652 unsigned int v24; // eax@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16653 unsigned int v25; // eax@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16654 unsigned int v26; // eax@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16655 unsigned int v27; // ecx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16656 enum PLAYER_SKILL_TYPE v28; // ebx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16657 unsigned int v29; // eax@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16658 char a2[1200]; // [sp+Ch] [bp-538h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16659 char Source[120]; // [sp+4BCh] [bp-88h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16660 unsigned __int16 *v33; // [sp+534h] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16661 int v34; // [sp+538h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16662 unsigned __int16 *v35; // [sp+53Ch] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16663 enum PLAYER_SKILL_TYPE v36; // [sp+540h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16664
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16665 v2 = uPlayerSkillType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16666 v3 = uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16667 v36 = uPlayerSkillType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16668 v4 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[431]);// Normal
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16669 v34 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[433]);// Expert
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16670 v33 = (unsigned __int16 *)pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[432]);// Master
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16671 v5 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[96]);// Grand
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16672 v35 = (unsigned __int16 *)v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16673 if ( v34 > v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16674 v35 = (unsigned __int16 *)v34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16675 if ( (signed int)v33 > (signed int)v35 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16676 v35 = v33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16677 if ( v5 > (signed int)v35 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16678 v35 = (unsigned __int16 *)v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16679 pPlayer = &pParty->pPlayers[v3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16680 v33 = &pPlayer->pActiveSkills[v2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16681 v7 = pPlayer->GetActualSkillLevel(v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16682 v8 = LOBYTE(pPlayer->pActiveSkills[v2]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16683 a2[0] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16684 Source[0] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16685 if ( (v8 & 0x3F) == (v7 & 0x3F) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16686 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16687 strcpy(a2, "%s\n\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16688 v24 = sub_417AD4(pPlayer->uClass, v2, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16689 sprintfex(Source, format_4E2DC8, v24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16690 strcat(a2, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16691 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16692 v25 = sub_417AD4(pPlayer->uClass, v36, 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16693 sprintfex(Source, format_4E2DC8, v25);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16694 strcat(a2, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16695 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16696 v26 = sub_417AD4(pPlayer->uClass, v36, 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16697 sprintfex(Source, format_4E2DC8, v26);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16698 strcat(a2, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16699 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16700 v27 = pPlayer->uClass;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16701 v28 = v36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16702 v29 = sub_417AD4(v27, v36, 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16703 sprintfex(Source, format_4E2DC8, v29);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16704 strcat(a2, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16705 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16706
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16707 v23 = static_sub_417BB5_out_string;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16708 sprintfex(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16709 static_sub_417BB5_out_string,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16710 a2,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16711 pSkillDesc[v28],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16712 pGlobalTXT_LocalizationStrings[431], // Normal
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16713 (char *)v35 + 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16714 v35 + 5,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16715 pNormalSkillDesc[v28],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16716 pGlobalTXT_LocalizationStrings[433], // Expert
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16717 (char *)v35 + 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16718 v35 + 5,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16719 pExpertSkillDesc[v28],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16720 pGlobalTXT_LocalizationStrings[432], // Master
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16721 (char *)v35 + 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16722 v35 + 5,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16723 pMasterSkillDesc[v28],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16724 pGlobalTXT_LocalizationStrings[96], // Grand
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16725 (char *)v35 + 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16726 v35 + 5,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16727 pGrandSkillDesc[v28]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16728 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16729 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16730 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16731 strcpy(a2, "%s\n\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16732 v9 = sub_417AD4(pPlayer->uClass, v2, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16733 sprintfex(Source, format_4E2DC8, v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16734 strcat(a2, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16735 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16736 v10 = sub_417AD4(pPlayer->uClass, v36, 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16737 sprintfex(Source, format_4E2DC8, v10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16738 strcat(a2, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16739 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16740 v11 = sub_417AD4(pPlayer->uClass, v36, 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16741 sprintfex(Source, format_4E2DC8, v11);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16742 strcat(a2, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16743 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16744 v12 = v36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16745 v13 = sub_417AD4(pPlayer->uClass, v36, 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16746 sprintfex(Source, format_4E2DC8, v13);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16747 strcat(a2, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16748 strcat(a2, "%s\t%03d:\t%03d%s\t000\n\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16749 v14 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16750 sprintfex(Source, format_4E2DC8, v14);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16751 strcat(a2, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16752 strcat(a2, "%s: +%d");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16753 v15 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16754 v16 = (int)(v35 + 5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16755 v15 = (PLAYER_SKILL_TYPE)((int)v15 * 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16756 v34 = (int)((char *)v35 + 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16757 v17 = pPlayer->GetActualSkillLevel(v36);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16758 v18 = *(int *)((char *)pGrandSkillDesc + v15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16759 v19 = *(int *)((char *)pMasterSkillDesc + v15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16760 v20 = *(int *)((char *)pExpertSkillDesc + v15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16761 v21 = *(int *)((char *)pNormalSkillDesc + v15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16762 v22 = *(int *)((char *)pSkillDesc + v15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16763 v23 = static_sub_417BB5_out_string;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16764 sprintfex(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16765 static_sub_417BB5_out_string,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16766 a2,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16767 v22,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16768 pGlobalTXT_LocalizationStrings[431],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16769 v34,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16770 v16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16771 v21,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16772 pGlobalTXT_LocalizationStrings[433],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16773 v34,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16774 v16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16775 v20,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16776 pGlobalTXT_LocalizationStrings[432],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16777 v34,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16778 v16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16779 v19,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16780 pGlobalTXT_LocalizationStrings[96],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16781 v34,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16782 v16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16783 v18,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16784 pGlobalTXT_LocalizationStrings[623],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16785 (v17 & 0x3F) - (*(char *)v33 & 0x3F));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16786 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16787 return v23;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16788 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16789
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16790 //----- (00417FE5) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16791 char __cdecl CharacterUI_SkillsTab_ShowHint()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16792 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16793 unsigned int v0; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16794 unsigned int v1; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16795 GUIButton *i; // esi@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16796 const char *v3; // eax@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16797 unsigned int pX; // [sp+4h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16798 unsigned int pY; // [sp+8h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16799
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16800 pMouse->GetClickPos(&pX, &pY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16801 v0 = pX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16802 v1 = pY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16803 if ( (signed int)pX < 24 || (signed int)pX > 455 || (signed int)pY < 18 || (signed int)pY > 36 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16804 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16805 for ( i = pGUIWindow_CurrentMenu->pControlsHead; i; i = i->pNext )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16806 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16807 if ( i->uControlID == 121
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16808 && (signed int)v0 >= (signed int)i->uX
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16809 && (signed int)v0 <= (signed int)i->uZ
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16810 && (signed int)v1 >= (signed int)i->uY
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16811 && (signed int)v1 <= (signed int)i->uW )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16812 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16813 v3 = CharacterUI_GetSkillDescText(uActiveCharacter - 1, (enum PLAYER_SKILL_TYPE)i->uControlParam);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16814 sub_4179BC_draw_tooltip(pSkillNames[i->uControlParam], v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16815 v1 = pY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16816 v0 = pX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16817 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16818 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16819 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16820 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16821 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16822 LOBYTE(v1) = sub_4179BC_draw_tooltip(pGlobalTXT_LocalizationStrings[207], pSkillPointsAttributeDescription);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16823 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16824 return v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16825 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16826
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16827 //----- (00418083) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16828 char __cdecl CharacterUI_StatsTab_ShowHint()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16829 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16830 LONG _x; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16831 Player *_y; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16832 int v2; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16833 __int16 *v3; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16834 LONG v4; // edx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16835 signed int v5; // edx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16836 char *v6; // ecx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16837 char *v7; // ebx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16838 unsigned int v8; // ebx@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16839 unsigned __int64 v9; // kr00_8@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16840 char *v10; // ST2C_4@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16841 signed int v11; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16842 char *v12; // ecx@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16843 char *v13; // eax@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16844 Player *v14; // esi@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16845 int v15; // ebx@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16846 int v16; // eax@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16847 POINT a2; // [sp+Ch] [bp-24h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16848 __int64 v19; // [sp+14h] [bp-1Ch]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16849 char *v20; // [sp+1Ch] [bp-14h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16850 Player *v21; // [sp+20h] [bp-10h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16851 unsigned int v22; // [sp+24h] [bp-Ch]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16852 int *v23; // [sp+28h] [bp-8h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16853 const char *v24; // [sp+2Ch] [bp-4h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16854
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16855 _x = pMouse->GetCursorPos(&a2)->x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16856 _y = (Player *)pMouse->GetCursorPos(&a2)->y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16857 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16858 v3 = &array_4E2940[0].field_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16859 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16860 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16861 v4 = *(v3 - 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16862 if ( _x >= v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16863 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16864 if ( _x <= v4 + v3[1] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16865 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16866 v5 = *v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16867 if ( (signed int)_y >= v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16868 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16869 if ( (signed int)_y <= v5 + v3[2] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16870 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16871 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16872 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16873 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16874 v3 += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16875 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16876 if ( (signed int)v3 >= (signed int)&off_4E2A12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16877 return (char)_y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16878 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16879 switch ( v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16880 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16881 case 0:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16882 case 1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16883 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16884 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16885 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16886 case 5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16887 case 6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16888 LOBYTE(_y) = 4 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16889 v6 = aAttributeNames[v2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16890 v7 = pAttributeDescriptions[v2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16891 goto LABEL_46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16892 case 7:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16893 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[108]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16894 v7 = pHealthPointsAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16895 v24 = pGlobalTXT_LocalizationStrings[108];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16896 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16897 case 8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16898 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[212]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16899 v7 = pSpellPointsAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16900 v24 = pGlobalTXT_LocalizationStrings[212];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16901 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16902 case 9:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16903 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[12]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16904 v7 = pArmourClassAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16905 v24 = pGlobalTXT_LocalizationStrings[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16906 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16907 case 10:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16908 v24 = pGlobalTXT_LocalizationStrings[47];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16909 strcpy(pTmpBuf2, pPlayerConditionAttributeDescription);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16910 v7 = pTmpBuf2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16911 v20 = pTmpBuf2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16912 strcat(pTmpBuf2, "\n");
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
16913
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
16914 extern unsigned int pConditionImportancyTable[18];
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
16915 v23 = (int *)pConditionImportancyTable;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16916 _y = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16917 v21 = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16918 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16919 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16920 if ( _y->pConditions[*v23] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16921 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16922 strcat(pTmpBuf2, " \n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16923 v8 = *v23;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16924 v9 = pParty->uTimePlayed - v21->pConditions[*v23];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16925 a2.x = LODWORD(pParty->uTimePlayed) - LODWORD(v21->pConditions[*v23]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16926 a2.y = HIDWORD(v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16927 v19 = (signed __int64)((double)*(signed __int64 *)&a2 * 0.234375) / 60 / 60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16928 v22 = (unsigned int)v19 / 0x18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16929 v10 = aCharacterConditionNames[v8];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16930 v19 %= 24i64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16931 v11 = GetConditionDrawColor(v8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16932 sprintfex(pTmpBuf, &byte_4E2DE8, v11, v10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16933 strcat(pTmpBuf2, pTmpBuf);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16934 if ( v19 && v19 <= 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16935 v12 = pGlobalTXT_LocalizationStrings[109];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16936 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16937 v12 = pGlobalTXT_LocalizationStrings[110];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16938 if ( !v22 || (v13 = pGlobalTXT_LocalizationStrings[56], v22 > 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16939 v13 = pGlobalTXT_LocalizationStrings[57];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16940 sprintfex(pTmpBuf, "%lu %s, %lu %s", v22, v13, v19, v12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16941 strcat(pTmpBuf2, pTmpBuf);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16942 v7 = v20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16943 _y = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16944 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16945 ++v23;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16946 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16947 while ( (signed int)v23 < (signed int)&unk_4EDF40 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16948 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16949 case 11:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16950 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[172]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16951 v7 = pFastSpellAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16952 v24 = pGlobalTXT_LocalizationStrings[172];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16953 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16954 case 12:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16955 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[5]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16956 v7 = pPlayerAgeAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16957 v24 = pGlobalTXT_LocalizationStrings[5];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16958 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16959 case 13:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16960 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[131]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16961 v7 = pPlayerLevelAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16962 v24 = pGlobalTXT_LocalizationStrings[131];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16963 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16964 case 14:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16965 v14 = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16966 v24 = pGlobalTXT_LocalizationStrings[83];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16967 v15 = v14->uLevel;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16968 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16969 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16970 if ( (signed __int64)v14->uExperience < (unsigned int)sub_4B46F8(v15) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16971 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16972 ++v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16973 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16974 while ( v15 <= 10000 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16975 pTmpBuf[0] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16976 pTmpBuf2[0] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16977 if ( v15 > v14->uLevel )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16978 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[147], v15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16979 v16 = sub_4B46F8(v15) - LODWORD(v14->uExperience);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16980 sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[538], v16, v15 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16981 strcat(pTmpBuf, "\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16982 strcat(pTmpBuf, pTmpBuf2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16983 LOBYTE(_y) = sprintfex(pTmpBuf2, "%s\n \n%s", pPlayerExperienceAttributeDescription, pTmpBuf);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16984 v7 = pTmpBuf2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16985 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16986 case 15:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16987 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[587]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16988 v7 = pAttackBonusAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16989 v24 = pGlobalTXT_LocalizationStrings[587];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16990 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16991 case 16:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16992 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[588]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16993 v7 = pAttackDamageAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16994 v24 = pGlobalTXT_LocalizationStrings[588];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16995 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16996 case 17:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16997 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[589]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16998 v7 = pMissleBonusAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16999 v24 = pGlobalTXT_LocalizationStrings[589];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17000 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17001 case 18:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17002 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[590]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17003 v7 = pMissleDamageAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17004 v24 = pGlobalTXT_LocalizationStrings[590];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17005 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17006 case 19:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17007 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[87]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17008 v7 = pFireResistanceAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17009 v24 = pGlobalTXT_LocalizationStrings[87];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17010 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17011 case 20:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17012 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[6]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17013 v7 = pAirResistanceAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17014 v24 = pGlobalTXT_LocalizationStrings[6];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17015 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17016 case 21:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17017 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[240]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17018 v7 = pWaterResistanceAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17019 v24 = pGlobalTXT_LocalizationStrings[240];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17020 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17021 case 22:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17022 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[70]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17023 v7 = pEarthResistanceAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17024 v24 = pGlobalTXT_LocalizationStrings[70];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17025 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17026 case 23:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17027 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[142]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17028 v7 = pMindResistanceAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17029 v24 = pGlobalTXT_LocalizationStrings[142];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17030 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17031 case 24:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17032 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[29]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17033 v7 = pBodyResistanceAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17034 v24 = pGlobalTXT_LocalizationStrings[29];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17035 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17036 case 25:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17037 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[207]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17038 v7 = pSkillPointsAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17039 v24 = pGlobalTXT_LocalizationStrings[207];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17040 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17041 case 26:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17042 _y = (Player *)(4 * pPlayers[uActiveCharacter]->uClass);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17043 v6 = *(char **)((char *)_y->pConditions + (int)pClassNames);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17044 v7 = *(char **)((char *)_y->pConditions + (int)pClassDescriptions);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17045 LABEL_46:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17046 v24 = v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17047 LABEL_47:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17048 if ( v24 && v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17049 LOBYTE(_y) = sub_4179BC_draw_tooltip(v24, v7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17050 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17051 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17052 return (char)_y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17053 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17054 return (char)_y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17055 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17056
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17057 //----- (00418511) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17058 char __fastcall CharacterUI_StatsTab_Draw(unsigned int uPlayerID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17059 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17060 Player *pPlayer; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17061 unsigned int v2; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17062 unsigned int v3; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17063 unsigned int v4; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17064 int v5; // ST20_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17065 int v6; // ST1C_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17066 int v7; // ebp@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17067 int v8; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17068 unsigned int v9; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17069 int v10; // ST34_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17070 int v11; // ST20_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17071 int v12; // ST1C_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17072 int v13; // ebp@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17073 int v14; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17074 unsigned int v15; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17075 int v16; // ST34_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17076 int v17; // ST20_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17077 int v18; // ST1C_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17078 int v19; // ebp@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17079 int v20; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17080 unsigned int v21; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17081 int v22; // ST34_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17082 int v23; // ST20_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17083 int v24; // ST1C_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17084 int v25; // ebp@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17085 int v26; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17086 unsigned int v27; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17087 int v28; // ST34_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17088 int v29; // ST20_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17089 int v30; // ST1C_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17090 int v31; // ebp@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17091 int v32; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17092 unsigned int v33; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17093 int v34; // ST34_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17094 int v35; // ST20_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17095 int v36; // ST1C_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17096 int v37; // ebp@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17097 int v38; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17098 unsigned int v39; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17099 int v40; // ST34_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17100 int v41; // ST20_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17101 int v42; // ST1C_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17102 int v43; // ebp@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17103 int v44; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17104 unsigned int v45; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17105 int v46; // ebp@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17106 signed int v47; // ST20_4@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17107 int v48; // ST1C_4@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17108 signed int v49; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17109 unsigned int v50; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17110 int v51; // ST20_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17111 int v52; // ST1C_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17112 int v53; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17113 unsigned int v54; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17114 int v55; // ST34_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17115 int v56; // ST20_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17116 int v57; // ST1C_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17117 int v58; // ebp@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17118 int v59; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17119 unsigned int v60; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17120 unsigned int v61; // ebp@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17121 unsigned int v62; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17122 char *v63; // ST20_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17123 signed int v64; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17124 unsigned int v65; // ebp@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17125 unsigned __int8 v66; // al@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17126 char *v67; // eax@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17127 unsigned int v68; // ST20_4@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17128 unsigned int v69; // ST1C_4@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17129 signed int v70; // ebp@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17130 signed int v71; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17131 unsigned int v72; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17132 int v73; // ST20_4@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17133 int v74; // ST1C_4@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17134 int v75; // ebp@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17135 int v76; // eax@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17136 unsigned int v77; // eax@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17137 char *v78; // ecx@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17138 int v79; // ST20_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17139 char *v80; // ST40_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17140 unsigned int v81; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17141 int v82; // ST34_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17142 int v83; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17143 int v84; // ST34_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17144 char *v85; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17145 int v86; // ST34_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17146 int v87; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17147 int v88; // ST34_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17148 char *v89; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17149 int v90; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17150 int v91; // ST20_4@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17151 unsigned int v92; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17152 int v93; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17153 int v94; // ST20_4@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17154 unsigned int v95; // eax@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17155 int v96; // eax@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17156 int v97; // ST20_4@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17157 unsigned int v98; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17158 int v99; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17159 int v100; // ST20_4@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17160 unsigned int v101; // eax@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17161 int v102; // eax@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17162 int v103; // ST20_4@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17163 unsigned int v104; // eax@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17164 char *v105; // ST20_4@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17165 unsigned int v106; // eax@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17166 int v107; // eax@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17167 int v108; // ST20_4@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17168 unsigned int v109; // eax@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17169 char *v110; // ST20_4@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17170 unsigned int v111; // eax@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17171 int uY; // [sp+10h] [bp-10h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17172 int uYa; // [sp+10h] [bp-10h]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17173 int uYb; // [sp+10h] [bp-10h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17174 int uYc; // [sp+10h] [bp-10h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17175 int uYd; // [sp+10h] [bp-10h]@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17176 int uYe; // [sp+10h] [bp-10h]@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17177 int uYf; // [sp+10h] [bp-10h]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17178 int uYg; // [sp+10h] [bp-10h]@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17179 int uYh; // [sp+10h] [bp-10h]@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17180 const char *a2; // [sp+14h] [bp-Ch]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17181 const char *a2a; // [sp+14h] [bp-Ch]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17182 const char *a2b; // [sp+14h] [bp-Ch]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17183 const char *a2c; // [sp+14h] [bp-Ch]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17184 const char *a2d; // [sp+14h] [bp-Ch]@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17185 const char *a2e; // [sp+14h] [bp-Ch]@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17186 const char *a2f; // [sp+14h] [bp-Ch]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17187 const char *a2g; // [sp+14h] [bp-Ch]@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17188 const char *a2h; // [sp+14h] [bp-Ch]@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17189 int v131; // [sp+18h] [bp-8h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17190 int v132; // [sp+18h] [bp-8h]@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17191 int v133; // [sp+18h] [bp-8h]@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17192 int v134; // [sp+18h] [bp-8h]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17193 int v135; // [sp+18h] [bp-8h]@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17194 int v136; // [sp+18h] [bp-8h]@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17195 int v137; // [sp+1Ch] [bp-4h]@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17196 int v138; // [sp+1Ch] [bp-4h]@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17197
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17198 pPlayer = (Player *)&stru_AA1058[3].pSounds[6972 * uPlayerID + 40552];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17199 v2 = pIcons_LOD->LoadTexture("fr_stats", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17200 pRenderer->DrawTextureIndexed(8u, 8u, (Texture *)(v2 != -1 ? (int)&pIcons_LOD->pTextures[v2] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17201 v3 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17202 sprintfex(pTmpBuf, format_4E2DC8, v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17203 sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[429], pPlayer->pName, pClassNames[pPlayer->uClass]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17204 strcat(pTmpBuf, pTmpBuf2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17205 if ( pPlayer->uSkillPoints )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17206 v4 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17207 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17208 v4 = 0xFFFFu;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
17209 sprintfex(pTmpBuf2, "\xC" "00000\xD" "180%s: \xC%05d%d\xC" "00000\n\n\n", pGlobalTXT_LocalizationStrings[207], v4, pPlayer->uSkillPoints);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17210 strcat(pTmpBuf, pTmpBuf2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17211 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 18, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17212 v5 = pPlayer->GetBaseStrength();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17213 v6 = pPlayer->GetActualMight();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17214 v7 = pPlayer->GetBaseStrength();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17215 v8 = pPlayer->GetActualMight();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17216 v9 = sub_4178FE(v8, v7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17217 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[144], v9, v6, v5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17218 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 53, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17219 v10 = LOBYTE(pFontArrus->uFontHeight) + 51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17220 v11 = pPlayer->GetBaseIntelligence();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17221 v12 = pPlayer->GetActualIntelligence();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17222 v13 = pPlayer->GetBaseIntelligence();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17223 v14 = pPlayer->GetActualIntelligence();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17224 v15 = sub_4178FE(v14, v13);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17225 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[116], v15, v12, v11);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17226 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17227 v16 = LOBYTE(pFontArrus->uFontHeight) + v10 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17228 v17 = pPlayer->GetBaseWillpower();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17229 v18 = pPlayer->GetActualWillpower();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17230 v19 = pPlayer->GetBaseWillpower();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17231 v20 = pPlayer->GetActualWillpower();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17232 v21 = sub_4178FE(v20, v19);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17233 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[163], v21, v18, v17);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17234 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v16, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17235 v22 = LOBYTE(pFontArrus->uFontHeight) + v16 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17236 v23 = pPlayer->GetBaseEndurance();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17237 v24 = pPlayer->GetActualEndurance();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17238 v25 = pPlayer->GetBaseEndurance();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17239 v26 = pPlayer->GetActualEndurance();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17240 v27 = sub_4178FE(v26, v25);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17241 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[75], v27, v24, v23);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17242 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v22, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17243 v28 = LOBYTE(pFontArrus->uFontHeight) + v22 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17244 v29 = pPlayer->GetBaseAccuracy();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17245 v30 = pPlayer->GetActualAccuracy();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17246 v31 = pPlayer->GetBaseAccuracy();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17247 v32 = pPlayer->GetActualAccuracy();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17248 v33 = sub_4178FE(v32, v31);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17249 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[1], v33, v30, v29);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17250 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v28, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17251 v34 = LOBYTE(pFontArrus->uFontHeight) + v28 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17252 v35 = pPlayer->GetBaseSpeed();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17253 v36 = pPlayer->GetActualSpeed();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17254 v37 = pPlayer->GetBaseSpeed();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17255 v38 = pPlayer->GetActualSpeed();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17256 v39 = sub_4178FE(v38, v37);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17257 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[211], v39, v36, v35);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17258 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v34, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17259 v40 = LOBYTE(pFontArrus->uFontHeight) + v34 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17260 v41 = pPlayer->GetBaseLuck();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17261 v42 = pPlayer->GetActualLuck();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17262 v43 = pPlayer->GetBaseLuck();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17263 v44 = pPlayer->GetActualLuck();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17264 v45 = sub_4178FE(v44, v43);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17265 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[136], v45, v42, v41);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17266 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v40, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17267 a2 = "%s";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17268 v46 = v40 + 2 * LOBYTE(pFontArrus->uFontHeight) + 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17269 if ( pPlayer->GetMaxHealth() >= 1000 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17270 a2 = (const char *)&unk_4E2EB8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17271 v47 = pPlayer->GetMaxHealth();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17272 v48 = pPlayer->sHealth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17273 v49 = pPlayer->GetMaxHealth();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17274 v50 = sub_4178FE(pPlayer->sHealth, v49);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17275 sprintfex(pTmpBuf, a2, pGlobalTXT_LocalizationStrings[108], v50, v48, v47);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17276 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v46, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17277 a2a = "%s";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17278 uY = LOBYTE(pFontArrus->uFontHeight) + v46 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17279 if ( pPlayer->GetMaxMana() >= 1000 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17280 a2a = (const char *)&unk_4E2EB8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17281 v51 = pPlayer->GetMaxMana();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17282 v52 = pPlayer->sMana;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17283 v53 = pPlayer->GetMaxMana();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17284 v54 = sub_4178FE(pPlayer->sMana, v53);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17285 sprintfex(pTmpBuf, a2a, pGlobalTXT_LocalizationStrings[212], v54, v52, v51);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17286 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, uY, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17287 v55 = LOBYTE(pFontArrus->uFontHeight) + uY - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17288 v56 = pPlayer->GetBaseAC();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17289 v57 = pPlayer->GetActualAC();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17290 v58 = pPlayer->GetBaseAC();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17291 v59 = pPlayer->GetActualAC();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17292 v60 = sub_4178FE(v59, v58);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17293 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[12], v60, v57, v56);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17294 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v55, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17295 v61 = v55 + 2 * LOBYTE(pFontArrus->uFontHeight) - 2;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
17296 v62 = pPlayer->GetMajorConditionIdx();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17297 v63 = aCharacterConditionNames[v62];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17298 v64 = GetConditionDrawColor(v62);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17299 sprintfex(pTmpBuf, "%s: ", pGlobalTXT_LocalizationStrings[47], v64, v63);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17300 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x1Au, v61, 0, pTmpBuf, 226, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17301 v65 = LOBYTE(pFontArrus->uFontHeight) + v61 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17302 v66 = pPlayer->uQuickSpell;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17303 if ( v66 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17304 v67 = pSpellStats->pInfos[v66].pShortName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17305 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17306 v67 = pGlobalTXT_LocalizationStrings[153];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17307 sprintfex(pTmpBuf, "%s: %s", pGlobalTXT_LocalizationStrings[172], v67);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17308 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x1Au, v65, 0, pTmpBuf, 226, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17309 v68 = pPlayer->GetBaseAge();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17310 v69 = pPlayer->GetActualAge();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17311 v70 = pPlayer->GetBaseAge();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17312 v71 = pPlayer->GetActualAge();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17313 v72 = sub_4178FE(v71, v70);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17314 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[5], v72, v69, v68);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17315 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, 50, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17316 a2b = "%s";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17317 uYa = LOBYTE(pFontArrus->uFontHeight) + 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17318 if ( pPlayer->GetBaseLevel() > 99 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17319 a2b = format_4E2E68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17320 v73 = pPlayer->GetBaseLevel();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17321 v74 = pPlayer->GetActualLevel();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17322 v75 = pPlayer->GetBaseLevel();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17323 v76 = pPlayer->GetActualLevel();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17324 v77 = sub_4178FE(v76, v75);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17325 sprintfex(pTmpBuf, a2b, pGlobalTXT_LocalizationStrings[131], v77, v74, v73);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17326 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYa, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17327 uYb = uYa + LOBYTE(pFontArrus->uFontHeight) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17328 if ( (signed __int64)pPlayer->uExperience <= 9999999 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17329 v78 = pGlobalTXT_LocalizationStrings[83];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17330 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17331 v78 = pGlobalTXT_LocalizationStrings[17];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17332 v79 = LODWORD(pPlayer->uExperience);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17333 v80 = v78;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17334 v81 = pPlayer->GetExperienceDisplayColor();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17335 sprintfex(pTmpBuf, "%s\r180", v80, v81, v79);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17336 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYb, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17337 v82 = uYb + 2 * LOBYTE(pFontArrus->uFontHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17338 v83 = pPlayer->GetActualAttack(0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17339 sprintfex(pTmpBuf, "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[18], v83);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17340 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v82, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17341 v84 = v82 + LOBYTE(pFontArrus->uFontHeight) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17342 v85 = pPlayer->GetMeleeDamageString();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17343 sprintfex(pTmpBuf, "%s\t100 %s\n", pGlobalTXT_LocalizationStrings[53], v85);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17344 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v84, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17345 v86 = v84 + LOBYTE(pFontArrus->uFontHeight) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17346 v87 = pPlayer->GetRangedAttack();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17347 sprintfex(pTmpBuf, "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[203], v87);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17348 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v86, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17349 v88 = v86 + LOBYTE(pFontArrus->uFontHeight) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17350 v89 = pPlayer->GetRangedDamageString();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17351 sprintfex(pTmpBuf, "%s\t100 %s\n\n", pGlobalTXT_LocalizationStrings[53], v89);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17352 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v88, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17353 a2c = format_4E2E10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17354 uYc = v88 + 2 * LOBYTE(pFontArrus->uFontHeight) - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17355 v131 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17356 v90 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17357 if ( v131 > 99 || v90 > 99 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17358 a2c = format_4E2E68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17359 v91 = v90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17360 v92 = sub_4178FE(v131, v90);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17361 sprintfex(pTmpBuf, a2c, pGlobalTXT_LocalizationStrings[87], v92, v131, v91);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17362 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYc, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17363 a2d = format_4E2E10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17364 uYd = uYc + LOBYTE(pFontArrus->uFontHeight) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17365 v132 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_AIR);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17366 v93 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_AIR);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17367 if ( v132 > 99 || v93 > 99 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17368 a2d = format_4E2E68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17369 v94 = v93;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17370 v95 = sub_4178FE(v132, v93);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17371 sprintfex(pTmpBuf, a2d, pGlobalTXT_LocalizationStrings[6], v95, v132, v94);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17372 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYd, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17373 a2e = format_4E2E10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17374 uYe = uYd + LOBYTE(pFontArrus->uFontHeight) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17375 v133 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_WATER);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17376 v96 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_WATER);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17377 if ( v133 > 99 || v96 > 99 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17378 a2e = format_4E2E68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17379 v97 = v96;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17380 v98 = sub_4178FE(v133, v96);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17381 sprintfex(pTmpBuf, a2e, pGlobalTXT_LocalizationStrings[240], v98, v133, v97);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17382 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYe, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17383 a2f = format_4E2E10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17384 uYf = uYe + LOBYTE(pFontArrus->uFontHeight) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17385 v134 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17386 v99 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17387 if ( v134 > 99 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17388 a2f = format_4E2E68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17389 v100 = v99;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17390 v101 = sub_4178FE(v134, v99);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17391 sprintfex(pTmpBuf, a2f, pGlobalTXT_LocalizationStrings[70], v101, v134, v100);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17392 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYf, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17393 a2g = format_4E2E10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17394 uYg = uYf + LOBYTE(pFontArrus->uFontHeight) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17395 v135 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17396 v102 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17397 v137 = v102;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17398 if ( v135 > 99 || v102 > 99 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17399 a2g = format_4E2E68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17400 v103 = v102;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17401 v104 = sub_4178FE(v135, v102);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17402 sprintfex(pTmpBuf, a2g, pGlobalTXT_LocalizationStrings[142], v104, v135, v103);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17403 if ( pPlayer->uClass == 35 && v137 == 200 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17404 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17405 v105 = pGlobalTXT_LocalizationStrings[625];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17406 v106 = sub_4178FE(v135, 200);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17407 sprintfex(pTmpBuf, format_4E2E00, pGlobalTXT_LocalizationStrings[142], v106, v105);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17408 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17409 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYg, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17410 a2h = format_4E2E10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17411 uYh = uYg + LOBYTE(pFontArrus->uFontHeight) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17412 v136 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17413 v107 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17414 v138 = v107;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17415 if ( v136 > 99 || v107 > 99 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17416 a2h = format_4E2E68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17417 v108 = v107;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17418 v109 = sub_4178FE(v136, v107);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17419 sprintfex(pTmpBuf, a2h, pGlobalTXT_LocalizationStrings[29], v109, v136, v108);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17420 if ( pPlayer->uClass == 35 && v138 == 200 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17421 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17422 v110 = pGlobalTXT_LocalizationStrings[625];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17423 v111 = sub_4178FE(v136, 200);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17424 sprintfex(pTmpBuf, format_4E2E00, pGlobalTXT_LocalizationStrings[29], v111, v110);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17425 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17426 return pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYh, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17427 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17428
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17429 //----- (00419100) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17430 int __cdecl sub_419100()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17431 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17432 Player *v0; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17433 int v1; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17434 unsigned __int8 *v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17435 int v3; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17436 int result; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17437 int v5; // esi@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17438 unsigned __int8 v6; // zf@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17439 unsigned __int8 v7; // sf@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17440 int v8; // edx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17441 int v9; // ecx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17442 unsigned __int8 v10; // of@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17443 stru179 *v11; // edi@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17444 int v12; // edx@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17445 int v13; // [sp+Ch] [bp-8h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17446 signed int v14; // [sp+Ch] [bp-8h]@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17447 int i; // [sp+10h] [bp-4h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17448
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17449 v0 = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17450 memset(&pStru179, 0, 0xFA0u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17451 memset(pTmpBuf2, 0, 0x7D0u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17452 v1 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17453 dword_506544 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17454 dword_506548 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17455 dword_506520 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17456 dword_50651C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17457 dword_506528 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17458 v2 = (unsigned __int8 *)v0->field_152;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17459 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17460 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17461 v13 = dword_723E80_award_related[2 * v1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17462 if ( (unsigned __int16)_449B57_test_bit(v2, v1) && v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17463 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17464 v3 = dword_506520++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17465 pStru179->field_0[v3] = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17466 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17467 ++v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17468 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17469 while ( v1 < 105 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17470 result = dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17471 v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17472 v6 = dword_506520 == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17473 v7 = dword_506520 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17474 dword_506524 = dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17475 dword_506520 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17476 if ( !(v7 | v6) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17477 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17478 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17479 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17480 v8 = rand() % 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17481 result = dword_506524;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17482 v9 = dword_506524 + v5++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17483 v10 = __OFSUB__(v5, dword_506524);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17484 v7 = v5 - dword_506524 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17485 pStru179->field_0[v9] = v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17486 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17487 while ( v7 ^ v10 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17488 if ( result > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17489 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17490 v14 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17491 v11 = pStru179;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17492 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17493 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17494 for ( i = v14; i < result; ++i )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17495 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17496 v12 = pStru179->field_0[i];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17497 if ( dword_723E84[2 * v12] < dword_723E84[2 * v11->field_0[0]] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17498 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17499 pStru179->field_0[i] = v11->field_0[0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17500 v11->field_0[0] = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17501 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17502 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17503 ++v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17504 v11 = (stru179 *)((char *)v11 + 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17505 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17506 while ( v14 - 1 < result );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17507 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17508 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17509 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17510 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17511
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17512
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17513 //----- (00419220) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17514 void __cdecl sub_419220()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17515 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17516 GUIButton *i; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17517
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17518 if ( !dword_507CBC )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17519 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17520 dword_507CBC = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17521 for ( i = pGUIWindow_CurrentMenu->pControlsHead; i; i = i->pNext )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17522 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17523 if ( i->uControlID == 120 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17524 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17525 dword_50698C = i->uX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17526 dword_506988 = i->uY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17527 dword_506984 = i->uZ;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17528 dword_506980 = i->uW;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17529 i->uW = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17530 i->uZ = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17531 i->uY = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17532 i->uX = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17533 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17534 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17535 ptr_507B9C = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17536 0x1B6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17537 0x2Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17538 (uTextureID_ar_up_up != -1 ? pIcons_LOD->pTextures[uTextureID_ar_up_up].uTextureWidth : 24),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17539 (uTextureID_ar_up_up != -1 ? pIcons_LOD->pTextures[uTextureID_ar_up_up].uTextureHeight : 26),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17540 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17541 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17542 0xA9u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17543 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17544 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17545 nullstring,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17546 (Texture *)(uTextureID_ar_up_up != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ar_up_up] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17547 uTextureID_ar_up_dn != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ar_up_dn] : 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17548 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17549 ptr_507BA0 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17550 0x1B6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17551 0x124u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17552 (uTextureID_ar_dn_up != -1 ? pIcons_LOD->pTextures[uTextureID_ar_dn_up].uTextureWidth : 24),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17553 (uTextureID_ar_dn_up != -1 ? pIcons_LOD->pTextures[uTextureID_ar_dn_up].uTextureHeight : 26),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17554 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17555 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17556 0xAAu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17557 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17558 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17559 nullstring,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17560 (Texture *)(uTextureID_ar_dn_up != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ar_dn_up] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17561 uTextureID_ar_dn_dn != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ar_dn_dn] : 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17562 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17563 ptr_507BA4 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17564 0x1B8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17565 0x3Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17566 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17567 0xE8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17568 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17569 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17570 0xC0u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17571 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17572 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17573 nullstring,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17574 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17575 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17576 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17577
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17578
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17579
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17580 //----- (00419379) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17581 void __cdecl sub_419379()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17582 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17583 GUIButton *i; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17584
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17585 if ( dword_507CBC )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17586 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17587 dword_507CBC = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17588 GUIButton::_41D0D8(ptr_507BA4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17589 GUIButton::_41D0D8(ptr_507B9C);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17590 GUIButton::_41D0D8(ptr_507BA0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17591 ptr_507BA0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17592 ptr_507B9C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17593 for ( i = pGUIWindow_CurrentMenu->pControlsHead; i; i = i->pNext )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17594 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17595 if ( i->uControlID == 120 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17596 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17597 i->uX = dword_50698C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17598 i->uY = dword_506988;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17599 i->uZ = dword_506984;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17600 i->uW = dword_506980;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17601 pGUIWindow_CurrentMenu->_41D08F(1, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17602 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17603 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17604 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17605 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17606
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17607
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17608 //----- (00419401) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17609 void __cdecl sub_419401()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17610 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17611 unsigned int v0; // ecx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17612 GUIButton *i; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17613 GUIFont *v2; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17614 unsigned int v3; // esi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17615 int v4; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17616 unsigned int v5; // esi@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17617 int v6; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17618 unsigned int v7; // esi@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17619 int v8; // eax@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17620 unsigned int v9; // esi@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17621 int v10; // eax@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17622 int a2; // [sp+10h] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17623 int v12; // [sp+14h] [bp-10h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17624 int v13; // [sp+14h] [bp-10h]@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17625 unsigned int *v14; // [sp+18h] [bp-Ch]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17626 unsigned int *v15; // [sp+18h] [bp-Ch]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17627 unsigned int *v16; // [sp+18h] [bp-Ch]@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17628 unsigned int *v17; // [sp+18h] [bp-Ch]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17629 char *v18; // [sp+1Ch] [bp-8h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17630 int a5; // [sp+20h] [bp-4h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17631
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17632 a2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17633 if ( dword_507CC0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17634 sub_4196A0();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17635 v0 = uActiveCharacter;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17636 dword_507CC0 = uActiveCharacter;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17637 for ( i = pGUIWindow_CurrentMenu->pControlsHead; i; i = i->pNext )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17638 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17639 if ( i->uControlID == 120 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17640 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17641 dword_50698C = i->uX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17642 dword_506988 = i->uY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17643 dword_506984 = i->uZ;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17644 dword_506980 = i->uW;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17645 i->uW = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17646 i->uZ = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17647 i->uY = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17648 i->uX = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17649 v0 = uActiveCharacter;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17650 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17651 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17652 v12 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17653 a5 = pGUIWindow_CurrentMenu->uNumControls;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17654 v18 = &stru_AA1058[3].pSounds[6972 * v0 + 40552];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17655 v2 = pFontLucida;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17656 v14 = (unsigned int *)dword_4E2A2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17657 v3 = 2 * LOBYTE(pFontLucida->uFontHeight) + 13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17658 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17659 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17660 if ( v18[2 * *v14 + 264] & 0x3F )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17661 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17662 v4 = LOBYTE(v2->uFontHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17663 v3 = v3 + v4 - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17664 ++a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17665 ++v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17666 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17667 0x18u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17668 v3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17669 0xCCu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17670 v4 - 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17671 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17672 *v14 | 0x8000,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17673 0x79u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17674 *v14,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17675 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17676 nullstring,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17677 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17678 v2 = pFontLucida;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17679 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17680 ++v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17681 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17682 while ( (signed int)v14 < (signed int)dword_4E2A50 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17683 if ( !v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17684 v3 = v3 + LOBYTE(v2->uFontHeight) - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17685 v15 = (unsigned int *)_4E2A80_skills;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17686 v5 = v3 + 2 * LOBYTE(v2->uFontHeight) - 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17687 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17688 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17689 if ( v18[2 * *v15 + 264] & 0x3F && a2 < 15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17690 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17691 v6 = LOBYTE(v2->uFontHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17692 v5 = v5 + v6 - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17693 ++a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17694 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17695 0x18u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17696 v5,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17697 0xCCu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17698 v6 - 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17699 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17700 *v15 | 0x8000,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17701 0x79u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17702 *v15,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17703 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17704 nullstring,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17705 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17706 v2 = pFontLucida;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17707 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17708 ++v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17709 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17710 while ( (signed int)v15 < (signed int)pAwardsTextColors );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17711 v13 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17712 v16 = (unsigned int *)dword_4E2A18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17713 v7 = 2 * LOBYTE(v2->uFontHeight) + 13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17714 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17715 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17716 if ( v18[2 * *v16 + 264] & 0x3F )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17717 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17718 v8 = LOBYTE(v2->uFontHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17719 v7 = v7 + v8 - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17720 ++a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17721 ++v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17722 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17723 0xF6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17724 v7,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17725 0xCCu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17726 v8 - 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17727 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17728 *v16 | 0x8000,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17729 0x79u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17730 *v16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17731 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17732 nullstring,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17733 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17734 v2 = pFontLucida;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17735 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17736 ++v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17737 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17738 while ( (signed int)v16 < (signed int)dword_4E2A2C );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17739 if ( !v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17740 v7 = v7 + LOBYTE(v2->uFontHeight) - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17741 v17 = (unsigned int *)dword_4E2A50;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17742 v9 = v7 + 2 * LOBYTE(v2->uFontHeight) - 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17743 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17744 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17745 if ( v18[2 * *v17 + 264] & 0x3F )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17746 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17747 v10 = LOBYTE(v2->uFontHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17748 v9 = v9 + v10 - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17749 ++a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17750 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17751 0xF6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17752 v9,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17753 0xCCu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17754 v10 - 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17755 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17756 *v17 | 0x8000,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17757 0x79u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17758 *v17,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17759 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17760 nullstring,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17761 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17762 v2 = pFontLucida;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17763 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17764 ++v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17765 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17766 while ( (signed int)v17 < (signed int)_4E2A80_skills );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17767 if ( a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17768 pGUIWindow_CurrentMenu->_41D08F(a2, 1, 0, a5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17769 }